CmdID / aws / aws codeartifact
aws codeartifact get-domain-permissions-policy
Returns the resource policy attached to the specified domain. AWS CLI reference
1 example 2 options Its page in the AWS CLI reference
Examples
To get the permissions policy document for a domain
The following get-domain-permissions-policy example gets the permission policy attached to a domain named test-domain.
aws codeartifact get-domain-permissions-policy --domain test-domainIdentify--domainThe name of the domain to which the resource policy is attached.Its output
{
"policy": {
"resourceArn": "arn:aws:codeartifact:us-west-2:123456789012:domain/test-domain",
"document": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"BasicDomainPolicy\",\"Action\":[\"codeartifact:GetDomainPermissionsPolicy\",\"codeartifact:ListRepositoriesInDomain\",\"codeartifact:GetAuthorizationToken\",\"codeartifact:CreateRepository\"],\"Effect\":\"Allow\",\"Resource\":\"*\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"}}]}"
}
}For more information, see Read a domain policy in the AWS CodeArtifact User Guide.
Options
--domain-ownerThe 12-digit account number of the Amazon Web Services account that owns the domain.--domainThe name of the domain to which the resource policy is attached.