validatePullThroughCacheRule method
Validates an existing pull through cache rule for an upstream registry that requires authentication. This will retrieve the contents of the Amazon Web Services Secrets Manager secret, verify the syntax, and then validate that authentication to the upstream registry is successful.
May throw InvalidParameterException.
May throw PullThroughCacheRuleNotFoundException.
May throw ServerException.
May throw ValidationException.
Parameter ecrRepositoryPrefix :
The repository name prefix associated with the pull through cache rule.
Parameter registryId :
The registry ID associated with the pull through cache rule. If you do not
specify a registry, the default registry is assumed.
Implementation
Future<ValidatePullThroughCacheRuleResponse> validatePullThroughCacheRule({
required String ecrRepositoryPrefix,
String? registryId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'AmazonEC2ContainerRegistry_V20150921.ValidatePullThroughCacheRule'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ecrRepositoryPrefix': ecrRepositoryPrefix,
if (registryId != null) 'registryId': registryId,
},
);
return ValidatePullThroughCacheRuleResponse.fromJson(jsonResponse.body);
}