describePullThroughCacheRules method
Returns the pull through cache rules for a registry.
May throw InvalidParameterException.
May throw PullThroughCacheRuleNotFoundException.
May throw ServerException.
May throw ValidationException.
Parameter ecrRepositoryPrefixes :
The Amazon ECR repository prefixes associated with the pull through cache
rules to return. If no repository prefix value is specified, all pull
through cache rules are returned.
Parameter maxResults :
The maximum number of pull through cache rules returned by
DescribePullThroughCacheRulesRequest in paginated output.
When this parameter is used,
DescribePullThroughCacheRulesRequest 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
DescribePullThroughCacheRulesRequest request with the
returned nextToken value. This value can be between 1 and
1000. If this parameter is not used, then
DescribePullThroughCacheRulesRequest returns up to 100
results and a nextToken value, if applicable.
Parameter nextToken :
The nextToken value returned from a previous paginated
DescribePullThroughCacheRulesRequest 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 registryId :
The Amazon Web Services account ID associated with the registry to return
the pull through cache rules for. If you do not specify a registry, the
default registry is assumed.
Implementation
Future<DescribePullThroughCacheRulesResponse> describePullThroughCacheRules({
List<String>? ecrRepositoryPrefixes,
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':
'AmazonEC2ContainerRegistry_V20150921.DescribePullThroughCacheRules'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (ecrRepositoryPrefixes != null)
'ecrRepositoryPrefixes': ecrRepositoryPrefixes,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (registryId != null) 'registryId': registryId,
},
);
return DescribePullThroughCacheRulesResponse.fromJson(jsonResponse.body);
}