updatePullThroughCacheRule method
Updates an existing pull through cache rule.
May throw InvalidParameterException.
May throw PullThroughCacheRuleNotFoundException.
May throw SecretNotFoundException.
May throw ServerException.
May throw UnableToAccessSecretException.
May throw UnableToDecryptSecretValueException.
May throw ValidationException.
Parameter ecrRepositoryPrefix :
The repository name prefix to use when caching images from the source
registry.
Parameter credentialArn :
The Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager
secret that identifies the credentials to authenticate to the upstream
registry.
Parameter customRoleArn :
Amazon Resource Name (ARN) of the IAM role to be assumed by Amazon ECR to
authenticate to the ECR upstream registry. This role must be in the same
account as the registry that you are configuring.
Parameter registryId :
The Amazon Web Services account ID associated with the registry associated
with the pull through cache rule. If you do not specify a registry, the
default registry is assumed.
Implementation
Future<UpdatePullThroughCacheRuleResponse> updatePullThroughCacheRule({
required String ecrRepositoryPrefix,
String? credentialArn,
String? customRoleArn,
String? registryId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'AmazonEC2ContainerRegistry_V20150921.UpdatePullThroughCacheRule'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ecrRepositoryPrefix': ecrRepositoryPrefix,
if (credentialArn != null) 'credentialArn': credentialArn,
if (customRoleArn != null) 'customRoleArn': customRoleArn,
if (registryId != null) 'registryId': registryId,
},
);
return UpdatePullThroughCacheRuleResponse.fromJson(jsonResponse.body);
}