describeRepositoryCreationTemplates method

Future<DescribeRepositoryCreationTemplatesResponse> describeRepositoryCreationTemplates({
  1. int? maxResults,
  2. String? nextToken,
  3. List<String>? prefixes,
})

Returns details about the repository creation templates in a registry. The prefixes request parameter can be used to return the details for a specific repository creation template.

May throw InvalidParameterException. May throw ServerException. May throw ValidationException.

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

Parameter nextToken : The nextToken value returned from a previous paginated DescribeRepositoryCreationTemplates 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.

Parameter prefixes : The repository namespace prefixes associated with the repository creation templates to describe. If this value is not specified, all repository creation templates are returned.

Implementation

Future<DescribeRepositoryCreationTemplatesResponse>
    describeRepositoryCreationTemplates({
  int? maxResults,
  String? nextToken,
  List<String>? prefixes,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'AmazonEC2ContainerRegistry_V20150921.DescribeRepositoryCreationTemplates'
  };
  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 (prefixes != null) 'prefixes': prefixes,
    },
  );

  return DescribeRepositoryCreationTemplatesResponse.fromJson(
      jsonResponse.body);
}