put_domain_permissions_policy
(**kwargs)¶Sets a resource policy on a domain that specifies permissions to access it.
When you call PutDomainPermissionsPolicy
, the resource policy on the domain is ignored when evaluting permissions. This ensures that the owner of a domain cannot lock themselves out of the domain, which would prevent them from being able to update the resource policy.
See also: AWS API Documentation
Request Syntax
response = client.put_domain_permissions_policy(
domain='string',
domainOwner='string',
policyRevision='string',
policyDocument='string'
)
[REQUIRED]
The name of the domain on which to set the resource policy.
[REQUIRED]
A valid displayable JSON Aspen policy string to be set as the access control resource policy on the provided domain.
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