CodeArtifact.Client.
put_repository_permissions_policy
(**kwargs)¶Sets the resource policy on a repository that specifies permissions to access it.
When you call PutRepositoryPermissionsPolicy
, the resource policy on the repository is ignored when evaluting permissions. This ensures that the owner of a repository cannot lock themselves out of the repository, which would prevent them from being able to update the resource policy.
See also: AWS API Documentation
Request Syntax
response = client.put_repository_permissions_policy(
domain='string',
domainOwner='string',
repository='string',
policyRevision='string',
policyDocument='string'
)
[REQUIRED]
The name of the domain containing the repository to set the resource policy on.
[REQUIRED]
The name of the repository to set the resource policy on.
[REQUIRED]
A valid displayable JSON Aspen policy string to be set as the access control resource policy on the provided repository.
dict
Response Syntax
{
'policy': {
'resourceArn': 'string',
'revision': 'string',
'document': 'string'
}
}
Response Structure
(dict) --
policy (dict) --
The resource policy that was set after processing the request.
resourceArn (string) --
The ARN of the resource associated with the resource policy
revision (string) --
The current revision of the resource policy.
document (string) --
The resource policy formatted in JSON.
Exceptions
CodeArtifact.Client.exceptions.AccessDeniedException
CodeArtifact.Client.exceptions.ConflictException
CodeArtifact.Client.exceptions.InternalServerException
CodeArtifact.Client.exceptions.ResourceNotFoundException
CodeArtifact.Client.exceptions.ServiceQuotaExceededException
CodeArtifact.Client.exceptions.ThrottlingException
CodeArtifact.Client.exceptions.ValidationException