deleteRepositoryPolicy method
Deletes the repository policy associated with the specified repository.
May throw ServerException. May throw InvalidParameterException. May throw RepositoryNotFoundException. May throw RepositoryPolicyNotFoundException.
Parameter repositoryName
:
The name of the repository that is associated with the repository policy
to delete.
Parameter registryId
:
The AWS account ID associated with the registry that contains the
repository policy to delete. If you do not specify a registry, the default
registry is assumed.
Implementation
Future<DeleteRepositoryPolicyResponse> deleteRepositoryPolicy({
required String repositoryName,
String? registryId,
}) async {
ArgumentError.checkNotNull(repositoryName, 'repositoryName');
_s.validateStringLength(
'repositoryName',
repositoryName,
2,
256,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'AmazonEC2ContainerRegistry_V20150921.DeleteRepositoryPolicy'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'repositoryName': repositoryName,
if (registryId != null) 'registryId': registryId,
},
);
return DeleteRepositoryPolicyResponse.fromJson(jsonResponse.body);
}