describeImages method

Future<DescribeImagesResponse> describeImages({
  1. required String repositoryName,
  2. List<ImageIdentifier>? imageIds,
  3. int? maxResults,
  4. String? nextToken,
  5. String? registryId,
})

Returns metadata that's related to the images in a repository in a public registry.

May throw ImageNotFoundException. May throw InvalidParameterException. May throw RepositoryNotFoundException. May throw ServerException. May throw UnsupportedCommandException.

Parameter repositoryName : The repository that contains the images to describe.

Parameter imageIds : The list of image IDs for the requested repository.

Parameter maxResults : The maximum number of repository results that's returned by DescribeImages in paginated output. When this parameter is used, DescribeImages only returns maxResults results in a single page along with a nextToken response element. You can see the remaining results of the initial request by sending another DescribeImages request with the returned nextToken value. This value can be between 1 and 1000. If this parameter isn't used, then DescribeImages returns up to 100 results and a nextToken value, if applicable. If you specify images with imageIds, you can't use this option.

Parameter nextToken : The nextToken value that's returned from a previous paginated DescribeImages request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. If there are no more results to return, this value is null. If you specify images with imageIds, you can't use this option.

Parameter registryId : The Amazon Web Services account ID that's associated with the public registry that contains the repository where images are described. If you do not specify a registry, the default public registry is assumed.

Implementation

Future<DescribeImagesResponse> describeImages({
  required String repositoryName,
  List<ImageIdentifier>? imageIds,
  int? maxResults,
  String? nextToken,
  String? registryId,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SpencerFrontendService.DescribeImages'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'repositoryName': repositoryName,
      if (imageIds != null) 'imageIds': imageIds,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
      if (registryId != null) 'registryId': registryId,
    },
  );

  return DescribeImagesResponse.fromJson(jsonResponse.body);
}