describeImages method

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

Returns metadata about the images in a repository.

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

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

Parameter filter : The filter key and value with which to filter your DescribeImages results.

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

Parameter maxResults : The maximum number of repository results 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. The remaining results of the initial request can be seen by sending another DescribeImages request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeImages returns up to 100 results and a nextToken value, if applicable. This option cannot be used when you specify images with imageIds.

Parameter nextToken : The nextToken value 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. This value is null when there are no more results to return. This option cannot be used when you specify images with imageIds.

Parameter registryId : The AWS account ID associated with the registry that contains the repository in which to describe images. If you do not specify a registry, the default registry is assumed.

Implementation

Future<DescribeImagesResponse> describeImages({
  required String repositoryName,
  DescribeImagesFilter? filter,
  List<ImageIdentifier>? imageIds,
  int? maxResults,
  String? nextToken,
  String? registryId,
}) async {
  ArgumentError.checkNotNull(repositoryName, 'repositoryName');
  _s.validateStringLength(
    'repositoryName',
    repositoryName,
    2,
    256,
    isRequired: true,
  );
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonEC2ContainerRegistry_V20150921.DescribeImages'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'repositoryName': repositoryName,
      if (filter != null) 'filter': filter,
      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);
}