describeRepositories method

Future<DescribeRepositoriesResponse> describeRepositories({
  1. int? maxResults,
  2. String? nextToken,
  3. String? registryId,
  4. List<String>? repositoryNames,
})

Describes image repositories in a registry.

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

Parameter maxResults : The maximum number of repository results returned by DescribeRepositories in paginated output. When this parameter is used, DescribeRepositories 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 DescribeRepositories request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeRepositories returns up to 100 results and a nextToken value, if applicable. This option cannot be used when you specify repositories with repositoryNames.

Parameter nextToken : The nextToken value returned from a previous paginated DescribeRepositories 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 repositories with repositoryNames.

Parameter registryId : The AWS account ID associated with the registry that contains the repositories to be described. If you do not specify a registry, the default registry is assumed.

Parameter repositoryNames : A list of repositories to describe. If this parameter is omitted, then all repositories in a registry are described.

Implementation

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

  return DescribeRepositoriesResponse.fromJson(jsonResponse.body);
}