set_repository_policy
(**kwargs)¶Applies a repository policy to the specified public repository to control access permissions. For more information, see Amazon ECR Repository Policies in the Amazon Elastic Container Registry User Guide .
See also: AWS API Documentation
Request Syntax
response = client.set_repository_policy(
registryId='string',
repositoryName='string',
policyText='string',
force=True|False
)
[REQUIRED]
The name of the repository to receive the policy.
[REQUIRED]
The JSON repository policy text to apply to the repository. For more information, see Amazon ECR Repository Policies in the Amazon Elastic Container Registry User Guide .
dict
Response Syntax
{
'registryId': 'string',
'repositoryName': 'string',
'policyText': 'string'
}
Response Structure
(dict) --
registryId (string) --
The registry ID that's associated with the request.
repositoryName (string) --
The repository name that's associated with the request.
policyText (string) --
The JSON repository policy text that's applied to the repository.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException