Actions, resources, and condition keys for AWS CodeArtifact - AWS Identity and Access Management

Actions, resources, and condition keys for AWS CodeArtifact

Tip

This page is moving to a new location on November 16, 2020. Please update your bookmark to use the new page at https://docs.aws.amazon.com/service-authorization/latest/reference/list_awscodeartifact.html.

AWS CodeArtifact (service prefix: codeartifact) provides the following service-specific resources, actions, and condition context keys for use in IAM permission policies.

References:

Actions defined by AWS CodeArtifact

You can specify the following actions in the Action element of an IAM policy statement. Use policies to grant permissions to perform an operation in AWS. When you use an action in a policy, you usually allow or deny access to the API operation or CLI command with the same name. However, in some cases, a single action controls access to more than one operation. Alternatively, some operations require several different actions.

The Resource types column indicates whether each action supports resource-level permissions. If there is no value for this column, you must specify all resources ("*") in the Resource element of your policy statement. If the column includes a resource type, then you can specify an ARN of that type in a statement with that action. Required resources are indicated in the table with an asterisk (*). If you specify a resource-level permission ARN in a statement using this action, then it must be of this type. Some actions support multiple resource types. If the resource type is optional (not indicated as required), then you can choose to use one but not the other.

For details about the columns in the following table, see The actions table.

Actions Description Access level Resource types (*required) Condition keys Dependent actions
AssociateExternalConnection Grants permission to add an external connection to a repository Write

domain*

AssociateWithDownstreamRepository Grants permission to associate an existing repository as an upstream repository to another repository Write

repository*

CopyPackageVersions Grants permission to copy package versions from one repository to another repository in the same domain. Write

repository*

CreateDomain Grants permission to create a new domain Write

domain*

CreateRepository Grants permission to create a new repository Write

repository*

DeleteDomain Grants permission to delete a domain Write

domain*

DeleteDomainPermissionsPolicy Grants permission to delete the resource policy set on a domain Permissions management

domain*

DeletePackageVersions Grants permission to delete package versions Write

package*

DeleteRepository Grants permission to delete a repository Write

repository*

DeleteRepositoryPermissionsPolicy Grants permission to delete the resource policy set on a repository Permissions management

repository*

DescribeDomain Grants permission to return information about a domain Read

domain*

DescribePackageVersion Grants permission to return information about a package version Read

package*

DescribeRepository Grants permission to return detailed information about a repository Read

repository*

DisassociateExternalConnection Grants permission to disassociate an external connection from a repository Write

domain*

DisposePackageVersions Grants permission to set the status of package versions to Disposed and delete their assets Write

package*

GetAuthorizationToken Grants permission to generate a temporary authentication token for accessing repositories in a domain Read

domain*

GetDomainPermissionsPolicy Grants permission to return a domain's resource policy Read

domain*

GetPackageVersionAsset Grants permission to return an asset (or file) that is part of a package version Read

package*

GetPackageVersionReadme Grants permission to return a package version's readme file Read

package*

GetRepositoryEndpoint Grants permission to return an endpoint for a repository Read

repository*

GetRepositoryPermissionsPolicy Grants permission to return a repository's resource policy Read

repository*

ListDomains Grants permission to list the domains in the current user's AWS account List
ListPackageVersionAssets Grants permission to list a package version's assets List

package*

ListPackageVersionDependencies Grants permission to list the direct dependencies of a package version List

package*

ListPackageVersions Grants permission to list a package's versions List

package*

ListPackages Grants permission to list the packages in a repository List

repository*

ListRepositories Grants permission to list the repositories administered by the calling account List
ListRepositoriesInDomain Grants permission to list the repositories in a domain List

domain*

PublishPackageVersion Grants permission to publish assets and metadata to a repository endpoint Write

package*

PutDomainPermissionsPolicy Grants permission to attach a resource policy to a domain Write

domain*

PutPackageMetadata Grants permission to add, modify or remove package metadata using a repository endpoint Write

package*

PutRepositoryPermissionsPolicy Grants permission to attach a resource policy to a repository Write

repository*

ReadFromRepository Grants permission to return package assets and metadata from a repository endpoint Read

repository*

UpdatePackageVersionsStatus Grants permission to modify the status of one or more versions of a package Write

package*

UpdateRepository Grants permission to modify the properties of a repository Write

repository*

Resource types defined by AWS CodeArtifact

The following resource types are defined by this service and can be used in the Resource element of IAM permission policy statements. Each action in the Actions table identifies the resource types that can be specified with that action. A resource type can also define which condition keys you can include in a policy. These keys are displayed in the last column of the table. For details about the columns in the following table, see The resource types table.

Resource types ARN Condition keys
domain arn:${Partition}:codeartifact:${Region}:${Account}:domain/${DomainName}
repository arn:${Partition}:codeartifact:${Region}:${Account}:repository/${DomainName}/${RepositoryName}
package arn:${Partition}:codeartifact:${Region}:${Account}:package/${DomainName}/${RepositoryName}/${PackageFormat}/${PackageNamespace}/${PackageName}

Condition keys for AWS CodeArtifact

CodeArtifact has no service-specific context keys that can be used in the Condition element of policy statements. For the list of the global context keys that are available to all services, see Available keys for conditions.