CmdID / aws / aws codeartifact
aws codeartifact get-repository-permissions-policy
Returns the resource policy that is set on a repository. AWS CLI reference
1 example 3 options Its page in the AWS CLI reference
Examples
To get the permissions policy document for a repository
The following get-repository-permissions-policy example gets the permission policy attached to a repository named test-repo.
aws codeartifact get-repository-permissions-policy --domain test-domain --repository test-repoIdentify--domainThe name of the domain containing the repository whose associated resource policy is to be retrieved.--repositoryThe name of the repository whose associated resource policy is to be retrieved.Its output
{
"policy": {
"resourceArn": "arn:aws:codeartifact:us-west-2:123456789012:repository/test-domain/test-repo",
"document": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"},\"Action\":[\"codeartifact:DescribePackageVersion\",\"codeartifact:DescribeRepository\",\"codeartifact:GetPackageVersionReadme\",\"codeartifact:GetRepositoryEndpoint\",\"codeartifact:ListPackages\",\"codeartifact:ListPackageVersions\",\"codeartifact:ListPackageVersionAssets\",\"codeartifact:ListPackageVersionDependencies\",\"codeartifact:ReadFromRepository\"],\"Resource\":\"*\"}]}"
}
}For more information, see Read a 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 containing the repository whose associated resource policy is to be retrieved.--repositoryThe name of the repository whose associated resource policy is to be retrieved.