delete_repository_policy
(**kwargs)¶Deletes the repository policy associated with the specified repository.
See also: AWS API Documentation
Request Syntax
response = client.delete_repository_policy(
registryId='string',
repositoryName='string'
)
[REQUIRED]
The name of the repository that is associated with the repository policy to delete.
dict
Response Syntax
{
'registryId': 'string',
'repositoryName': 'string',
'policyText': 'string'
}
Response Structure
(dict) --
registryId (string) --
The registry ID associated with the request.
repositoryName (string) --
The repository name associated with the request.
policyText (string) --
The JSON repository policy that was deleted from the repository.
Exceptions
ECR.Client.exceptions.ServerException
ECR.Client.exceptions.InvalidParameterException
ECR.Client.exceptions.RepositoryNotFoundException
ECR.Client.exceptions.RepositoryPolicyNotFoundException
Examples
This example deletes the policy associated with the repository named ubuntu in the current account.
response = client.delete_repository_policy(
repositoryName='ubuntu',
)
print(response)
Expected Output:
{
'policyText': '{ ... }',
'registryId': '012345678901',
'repositoryName': 'ubuntu',
'ResponseMetadata': {
'...': '...',
},
}