CmdID / aws / aws codeartifact
aws codeartifact delete-repository-permissions-policy
Deletes the resource policy that is set on a repository. AWS CLI reference
1 example 4 options Its page in the AWS CLI reference
Examples
To delete a permissions policy from a repository
The following delete-repository-permissions-policy example deletes the permission policy from a repository named test-repo.
aws codeartifact delete-repository-permissions-policy --domain test-domain --repository test-repoIdentify--domainThe name of the domain that contains the repository associated with the resource policy to be deleted.--repositoryThe name of the repository that is associated with the resource policy to be deletedIts 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 Delete 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 that contains the repository associated with the resource policy to be deleted.--policy-revisionThe revision of the repository's resource policy to be deleted.--repositoryThe name of the repository that is associated with the resource policy to be deleted