ECR.Client.
set_repository_policy
(**kwargs)¶Applies a repository policy to the specified 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 associated with the request.
repositoryName (string) --
The repository name associated with the request.
policyText (string) --
The JSON repository policy text applied to the repository.
Exceptions
ECR.Client.exceptions.ServerException
ECR.Client.exceptions.InvalidParameterException
ECR.Client.exceptions.RepositoryNotFoundException