Actions, resources, and condition keys for Amazon Elastic Container Registry
Amazon Elastic Container Registry (service prefix: ecr) provides the following
service-specific operations, resources, actions, and condition keys for use in IAM permission
policies.
References:
-
Learn how to configure this service.
-
View a list of the API operations available for this service.
-
Learn how to secure this service and its resources by using IAM permission policies.
-
View the programmatic service authorization reference
for this service.
Topics
API operations defined by Amazon Elastic Container Registry
The following table maps API operations to the IAM actions they authorize. Only condition keys that have static values for the given API and action are listed; for the full set of condition keys supported by each action, see the Actions table.
| Operation | IAM action | Condition key | Possible value(s) | Access level |
|---|---|---|---|---|
|
BatchCheckLayerAvailability |
Read |
|||
|
BatchDeleteImage |
Write |
|||
|
BatchGetImage |
Read |
|||
Write |
||||
Write |
||||
Tagging, Write |
||||
|
BatchGetRepositoryScanningConfiguration |
Read |
|||
|
CompleteLayerUpload |
Write |
|||
|
CreatePullThroughCacheRule |
Write |
|||
iam:PassedToService |
ecr.amazonaws.com |
Write |
||
|
CreateRepository |
Write |
|||
Tagging, Write |
||||
|
CreateRepositoryCreationTemplate |
Write |
|||
Write |
||||
Write |
||||
Permissions management, Write |
||||
iam:PassedToService |
ecr.amazonaws.com |
Write |
||
|
DeleteLifecyclePolicy |
Write |
|||
|
DeletePullThroughCacheRule |
Write |
|||
|
DeleteRegistryPolicy |
Permissions management, Write |
|||
|
DeleteRepository |
Write |
|||
|
DeleteRepositoryCreationTemplate |
Write |
|||
|
DeleteRepositoryPolicy |
Permissions management, Write |
|||
|
DeleteSigningConfiguration |
Write |
|||
|
DeregisterPullTimeUpdateExclusion |
Write |
|||
|
DescribeImageReplicationStatus |
Read |
|||
|
DescribeImageScanFindings |
Read |
|||
|
DescribeImageSigningStatus |
Read |
|||
|
DescribeImages |
List |
|||
|
DescribePullThroughCacheRules |
List |
|||
|
DescribeRegistry |
Read |
|||
|
DescribeRepositories |
Read |
|||
|
DescribeRepositoryCreationTemplates |
Read |
|||
|
GetAccountSetting |
Read |
|||
|
GetAuthorizationToken |
Read |
|||
|
GetDownloadUrlForLayer |
Write |
|||
Read |
||||
|
GetLifecyclePolicy |
Read |
|||
|
GetLifecyclePolicyPreview |
Read |
|||
|
GetRegistryPolicy |
Read |
|||
|
GetRegistryScanningConfiguration |
Read |
|||
|
GetRepositoryPolicy |
Read |
|||
|
GetSigningConfiguration |
Read |
|||
|
InitiateLayerUpload |
Write |
|||
|
ListImageReferrers |
Read |
|||
Write |
||||
Write |
||||
|
ListImages |
List |
|||
|
ListPullTimeUpdateExclusions |
List |
|||
|
ListTagsForResource |
Read |
|||
|
PutAccountSetting |
Write |
|||
|
PutImage |
Write |
|||
|
PutImageScanningConfiguration |
Write |
|||
|
PutImageTagMutability |
Write |
|||
|
PutLifecyclePolicy |
Write |
|||
|
PutRegistryPolicy |
Permissions management, Write |
|||
|
PutRegistryScanningConfiguration |
Write |
|||
|
PutReplicationConfiguration |
Write |
|||
|
PutSigningConfiguration |
Write |
|||
|
RegisterPullTimeUpdateExclusion |
Write |
|||
|
SetRepositoryPolicy |
Permissions management, Write |
|||
|
StartImageScan |
Write |
|||
|
StartLifecyclePolicyPreview |
Write |
|||
|
TagResource |
Tagging, Write |
|||
|
UntagResource |
Tagging, Write |
|||
|
UpdateImageStorageClass |
Write |
|||
|
UpdatePullThroughCacheRule |
Write |
|||
iam:PassedToService |
ecr.amazonaws.com |
Write |
||
|
UpdateRepositoryCreationTemplate |
Write |
|||
Write |
||||
Permissions management, Write |
||||
Write |
||||
iam:PassedToService |
ecr.amazonaws.com |
Write |
||
|
UploadLayerPart |
Write |
|||
|
ValidatePullThroughCacheRule |
Read |
Actions defined by Amazon Elastic Container Registry
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 Amazon. 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.
| Actions | Description | Resource types (*required) | Condition keys | Access level |
|---|---|---|---|---|
Grants permission to check the availability of multiple image layers in a specified registry and repository |
Read |
|||
Grants permission to delete a list of specified images within a specified repository |
Write |
|||
Grants permission to get detailed information for specified images within a specified repository |
Read |
|||
Grants permission to retrieve repository scanning configuration for a list of repositories |
Read |
|||
Grants permission to inform Amazon ECR that the image layer upload for a specified registry, repository name, and upload ID, has completed |
Write |
|||
Grants permission to create new pull-through cache rule |
Write |
|||
Grants permission to create an image repository |
Write |
|||
Grants permission to create the repository creation template |
Write |
|||
Grants permission to delete the specified lifecycle policy |
Write |
|||
Grants permission to delete the pull-through cache rule |
Write |
|||
Grants permission to delete the registry policy |
Permissions management, Write |
|||
Grants permission to delete an existing image repository |
Write |
|||
Grants permission to delete the repository creation template |
Write |
|||
Grants permission to delete the repository policy from a specified repository |
Permissions management, Write |
|||
Grants permission to delete the signing configuration for the registry |
Write |
|||
Grants permission to deregister a pull time update exclusion |
Write |
|||
Grants permission to retrieve replication status about an image in a registry, including failure reason if replication fails |
Read |
|||
Grants permission to describe the image scan findings for the specified image |
Read |
|||
Grants permission to retrieve signing status about an image in a specified registry |
Read |
|||
Grants permission to get metadata about the images in a repository, including image size, image tags, and creation date |
List |
|||
Grants permission to describe the pull-through cache rules |
List |
|||
Grants permission to describe the registry settings |
Read |
|||
Grants permission to describe image repositories in a registry |
Read |
|||
Grants permission to describe the repository creation template |
Read |
|||
Grants permission to retrieve account settings |
Read |
|||
Grants permission to retrieve a token that is valid for a specified registry for 12 hours |
Read |
|||
Grants permission to retrieve the download URL corresponding to an image layer |
Read |
|||
Grants permission to retrieve the specified lifecycle policy |
Read |
|||
Grants permission to retrieve the results of the specified lifecycle policy preview request |
Read |
|||
Grants permission to retrieve the registry policy |
Read |
|||
Grants permission to retrieve registry scanning configuration |
Read |
|||
Grants permission to retrieve the repository policy for a specified repository |
Read |
|||
Grants permission to retrieve the signing configuration for the registry |
Read |
|||
Grants permission to notify Amazon ECR that you intend to upload an image layer |
Write |
|||
Grants permission to list all the image IDs for a given repository |
List |
|||
Grants permission to list pull time update exclusions for the registry |
List |
|||
Grants permission to list the tags for an Amazon ECR resource |
Read |
|||
Grants permission to update account settings |
Write |
|||
Grants permission to create or update the image manifest associated with an image |
Write |
|||
Grants permission to update the image scanning configuration for a repository |
Write |
|||
Grants permission to update the image tag mutability settings for a repository |
Write |
|||
Grants permission to create or update a lifecycle policy |
Write |
|||
Grants permission to update the registry policy |
Permissions management, Write |
|||
Grants permission to update registry scanning configuration |
Write |
|||
Grants permission to update the replication configuration for the registry |
Write |
|||
Grants permission to update the signing configuration for the registry |
Write |
|||
Grants permission to register a pull time update exclusion |
Write |
|||
Grants permission to apply a repository policy on a specified repository to control access permissions |
Permissions management, Write |
|||
Grants permission to start an image scan |
Write |
|||
Grants permission to start a preview of the specified lifecycle policy |
Write |
|||
Grants permission to tag an Amazon ECR resource |
Tagging, Write |
|||
Grants permission to untag an Amazon ECR resource |
Tagging, Write |
|||
Grants permission to get update the storage class of a specified image within a specified repository |
Write |
|||
Grants permission to update the pull-through cache rule |
Write |
|||
Grants permission to update the repository creation template |
Write |
|||
Grants permission to upload an image layer part to Amazon ECR |
Write |
|||
Grants permission to validate the pull-through cache rule |
Read |
Permission-only actions for Amazon Elastic Container Registry
The following actions are defined by Amazon Elastic Container Registry but are not directly invocable through any API operation. They can only be used in IAM policy statements to grant or deny permissions.
| Actions | Description | Resource types (*required) | Condition keys | Access level |
|---|---|---|---|---|
Grants permission to retrieve the image from the upstream registry and import it to your private registry |
Write |
|||
Grants permission to retrieve the status about an image copy |
Read |
|||
Grants permission to replicate images to the destination registry |
Write |
Resource types defined by Amazon Elastic Container Registry
The following resource types are defined by this service and can be used in the
Resource element of IAM permission policy statements.
| Resource types | ARN | Condition keys |
|---|---|---|
arn:${Partition}:ecr:${Region}:${Account}:repository/${RepositoryName} |
Condition keys for Amazon Elastic Container Registry
Amazon Elastic Container Registry defines the following condition keys that can be used in the
Condition element of an IAM policy.
| Condition keys | Description | Type |
|---|---|---|
Filters access by the allowed set of values for each of the tags |
String |
|
Filters access by tag-value associated with the resource |
String |
|
Filters access by the presence of mandatory tags in the request |
ArrayOfString |
|
Filters access by the ECR account setting name |
String |
|
Filters access by tag-value associated with the resource |
String |