Amazon EC2 Container Registry 2015-09-21
- Client: Aws\Ecr\EcrClient
- Service ID: ecr
- Version: 2015-09-21
This page describes the parameters and results for the operations of the Amazon EC2 Container Registry (2015-09-21), and shows how to use the Aws\Ecr\EcrClient object to call the described operations. This documentation is specific to the 2015-09-21 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName')
, where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */)
.
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */)
.
- BatchCheckLayerAvailability ( array $params = [] )
Checks the availability of one or more image layers in a repository.
- BatchDeleteImage ( array $params = [] )
Deletes a list of specified images within a repository.
- BatchGetImage ( array $params = [] )
Gets detailed information for an image.
- CompleteLayerUpload ( array $params = [] )
Informs Amazon ECR that the image layer upload has completed for a specified registry, repository name, and upload ID.
- CreateRepository ( array $params = [] )
Creates a repository.
- DeleteLifecyclePolicy ( array $params = [] )
Deletes the lifecycle policy associated with the specified repository.
- DeleteRegistryPolicy ( array $params = [] )
Deletes the registry permissions policy.
- DeleteRepository ( array $params = [] )
Deletes a repository.
- DeleteRepositoryPolicy ( array $params = [] )
Deletes the repository policy associated with the specified repository.
- DescribeImageScanFindings ( array $params = [] )
Returns the scan findings for the specified image.
- DescribeImages ( array $params = [] )
Returns metadata about the images in a repository.
- DescribeRegistry ( array $params = [] )
Describes the settings for a registry.
- DescribeRepositories ( array $params = [] )
Describes image repositories in a registry.
- GetAuthorizationToken ( array $params = [] )
Retrieves an authorization token.
- GetDownloadUrlForLayer ( array $params = [] )
Retrieves the pre-signed Amazon S3 download URL corresponding to an image layer.
- GetLifecyclePolicy ( array $params = [] )
Retrieves the lifecycle policy for the specified repository.
- GetLifecyclePolicyPreview ( array $params = [] )
Retrieves the results of the lifecycle policy preview request for the specified repository.
- GetRegistryPolicy ( array $params = [] )
Retrieves the permissions policy for a registry.
- GetRepositoryPolicy ( array $params = [] )
Retrieves the repository policy for the specified repository.
- InitiateLayerUpload ( array $params = [] )
Notifies Amazon ECR that you intend to upload an image layer.
- ListImages ( array $params = [] )
Lists all the image IDs for the specified repository.
- ListTagsForResource ( array $params = [] )
List the tags for an Amazon ECR resource.
- PutImage ( array $params = [] )
Creates or updates the image manifest and tags associated with an image.
- PutImageScanningConfiguration ( array $params = [] )
Updates the image scanning configuration for the specified repository.
- PutImageTagMutability ( array $params = [] )
Updates the image tag mutability settings for the specified repository.
- PutLifecyclePolicy ( array $params = [] )
Creates or updates the lifecycle policy for the specified repository.
- PutRegistryPolicy ( array $params = [] )
Creates or updates the permissions policy for your registry.
- PutReplicationConfiguration ( array $params = [] )
Creates or updates the replication configuration for a registry.
- SetRepositoryPolicy ( array $params = [] )
Applies a repository policy to the specified repository to control access permissions.
- StartImageScan ( array $params = [] )
Starts an image vulnerability scan.
- StartLifecyclePolicyPreview ( array $params = [] )
Starts a preview of a lifecycle policy for the specified repository.
- TagResource ( array $params = [] )
Adds specified tags to a resource with the specified ARN.
- UntagResource ( array $params = [] )
Deletes specified tags from a resource.
- UploadLayerPart ( array $params = [] )
Uploads an image layer part to Amazon ECR.
Paginators
Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:
Waiters
Waiters allow you to poll a resource until it enters into a desired state. A waiter has a name used to describe what it does, and is associated with an API operation. When creating a waiter, you can provide the API operation parameters associated with the corresponding operation. Waiters can be accessed using the getWaiter($waiterName, $operationParameters) method of a client object. This client supports the following waiters:
Waiter name | API Operation | Delay | Max Attempts |
---|---|---|---|
ImageScanComplete | DescribeImageScanFindings | 5 | 60 |
LifecyclePolicyPreviewComplete | GetLifecyclePolicyPreview | 5 | 20 |
Operations
BatchCheckLayerAvailability
$result = $client->batchCheckLayerAvailability
([/* ... */]); $promise = $client->batchCheckLayerAvailabilityAsync
([/* ... */]);
Checks the availability of one or more image layers in a repository.
When an image is pushed to a repository, each image layer is checked to verify if it has been uploaded before. If it has been uploaded, then the image layer is skipped.
This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
Parameter Syntax
$result = $client->batchCheckLayerAvailability([ 'layerDigests' => ['<string>', ...], // REQUIRED 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- layerDigests
-
- Required: Yes
- Type: Array of strings
The digests of the image layers to check.
- registryId
-
- Type: string
The AWS account ID associated with the registry that contains the image layers to check. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository that is associated with the image layers to check.
Result Syntax
[ 'failures' => [ [ 'failureCode' => 'InvalidLayerDigest|MissingLayerDigest', 'failureReason' => '<string>', 'layerDigest' => '<string>', ], // ... ], 'layers' => [ [ 'layerAvailability' => 'AVAILABLE|UNAVAILABLE', 'layerDigest' => '<string>', 'layerSize' => <integer>, 'mediaType' => '<string>', ], // ... ], ]
Result Details
Members
- failures
-
- Type: Array of LayerFailure structures
Any failures associated with the call.
- layers
-
- Type: Array of Layer structures
A list of image layer objects corresponding to the image layer references in the request.
Errors
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
These errors are usually caused by a server-side issue.
BatchDeleteImage
$result = $client->batchDeleteImage
([/* ... */]); $promise = $client->batchDeleteImageAsync
([/* ... */]);
Deletes a list of specified images within a repository. Images are specified with either an imageTag
or imageDigest
.
You can remove a tag from an image by specifying the image's tag in your request. When you remove the last tag from an image, the image is deleted from your repository.
You can completely delete an image (and all of its tags) by specifying the image's digest in your request.
Parameter Syntax
$result = $client->batchDeleteImage([ 'imageIds' => [ // REQUIRED [ 'imageDigest' => '<string>', 'imageTag' => '<string>', ], // ... ], 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- imageIds
-
- Required: Yes
- Type: Array of ImageIdentifier structures
A list of image ID references that correspond to images to delete. The format of the
imageIds
reference isimageTag=tag
orimageDigest=digest
. - registryId
-
- Type: string
The AWS account ID associated with the registry that contains the image to delete. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The repository that contains the image to delete.
Result Syntax
[ 'failures' => [ [ 'failureCode' => 'InvalidImageDigest|InvalidImageTag|ImageTagDoesNotMatchDigest|ImageNotFound|MissingDigestAndTag|ImageReferencedByManifestList|KmsError', 'failureReason' => '<string>', 'imageId' => [ 'imageDigest' => '<string>', 'imageTag' => '<string>', ], ], // ... ], 'imageIds' => [ [ 'imageDigest' => '<string>', 'imageTag' => '<string>', ], // ... ], ]
Result Details
Members
- failures
-
- Type: Array of ImageFailure structures
Any failures associated with the call.
- imageIds
-
- Type: Array of ImageIdentifier structures
The image IDs of the deleted images.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
Examples
Example 1: To delete multiple images
This example deletes images with the tags precise and trusty in a repository called ubuntu in the default registry for an account.
$result = $client->batchDeleteImage([ 'imageIds' => [ [ 'imageTag' => 'precise', ], ], 'repositoryName' => 'ubuntu', ]);
Result syntax:
[ 'failures' => [ ], 'imageIds' => [ [ 'imageDigest' => 'sha256:examplee6d1e504117a17000003d3753086354a38375961f2e665416ef4b1b2f', 'imageTag' => 'precise', ], ], ]
BatchGetImage
$result = $client->batchGetImage
([/* ... */]); $promise = $client->batchGetImageAsync
([/* ... */]);
Gets detailed information for an image. Images are specified with either an imageTag
or imageDigest
.
When an image is pulled, the BatchGetImage API is called once to retrieve the image manifest.
Parameter Syntax
$result = $client->batchGetImage([ 'acceptedMediaTypes' => ['<string>', ...], 'imageIds' => [ // REQUIRED [ 'imageDigest' => '<string>', 'imageTag' => '<string>', ], // ... ], 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- acceptedMediaTypes
-
- Type: Array of strings
The accepted media types for the request.
Valid values:
application/vnd.docker.distribution.manifest.v1+json
|application/vnd.docker.distribution.manifest.v2+json
|application/vnd.oci.image.manifest.v1+json
- imageIds
-
- Required: Yes
- Type: Array of ImageIdentifier structures
A list of image ID references that correspond to images to describe. The format of the
imageIds
reference isimageTag=tag
orimageDigest=digest
. - registryId
-
- Type: string
The AWS account ID associated with the registry that contains the images to describe. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The repository that contains the images to describe.
Result Syntax
[ 'failures' => [ [ 'failureCode' => 'InvalidImageDigest|InvalidImageTag|ImageTagDoesNotMatchDigest|ImageNotFound|MissingDigestAndTag|ImageReferencedByManifestList|KmsError', 'failureReason' => '<string>', 'imageId' => [ 'imageDigest' => '<string>', 'imageTag' => '<string>', ], ], // ... ], 'images' => [ [ 'imageId' => [ 'imageDigest' => '<string>', 'imageTag' => '<string>', ], 'imageManifest' => '<string>', 'imageManifestMediaType' => '<string>', 'registryId' => '<string>', 'repositoryName' => '<string>', ], // ... ], ]
Result Details
Members
- failures
-
- Type: Array of ImageFailure structures
Any failures associated with the call.
- images
-
- Type: Array of Image structures
A list of image objects corresponding to the image references in the request.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
Examples
Example 1: To obtain multiple images in a single request
This example obtains information for an image with a specified image digest ID from the repository named ubuntu in the current account.
$result = $client->batchGetImage([ 'imageIds' => [ [ 'imageTag' => 'precise', ], ], 'repositoryName' => 'ubuntu', ]);
Result syntax:
[ 'failures' => [ ], 'images' => [ [ 'imageId' => [ 'imageDigest' => 'sha256:example76bdff6d83a09ba2a818f0d00000063724a9ac3ba5019c56f74ebf42a', 'imageTag' => 'precise', ], 'imageManifest' => '{ "schemaVersion": 1, "name": "ubuntu", "tag": "precise",...', 'registryId' => '244698725403', 'repositoryName' => 'ubuntu', ], ], ]
CompleteLayerUpload
$result = $client->completeLayerUpload
([/* ... */]); $promise = $client->completeLayerUploadAsync
([/* ... */]);
Informs Amazon ECR that the image layer upload has completed for a specified registry, repository name, and upload ID. You can optionally provide a sha256
digest of the image layer for data validation purposes.
When an image is pushed, the CompleteLayerUpload API is called once per each new image layer to verify that the upload has completed.
This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
Parameter Syntax
$result = $client->completeLayerUpload([ 'layerDigests' => ['<string>', ...], // REQUIRED 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED 'uploadId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- layerDigests
-
- Required: Yes
- Type: Array of strings
The
sha256
digest of the image layer. - registryId
-
- Type: string
The AWS account ID associated with the registry to which to upload layers. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository to associate with the image layer.
- uploadId
-
- Required: Yes
- Type: string
The upload ID from a previous InitiateLayerUpload operation to associate with the image layer.
Result Syntax
[ 'layerDigest' => '<string>', 'registryId' => '<string>', 'repositoryName' => '<string>', 'uploadId' => '<string>', ]
Result Details
Members
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
The upload could not be found, or the specified upload ID is not valid for this repository.
-
The layer digest calculation performed by Amazon ECR upon receipt of the image layer does not match the digest specified.
-
Layer parts must be at least 5 MiB in size.
-
The image layer already exists in the associated repository.
-
The specified layer upload does not contain any layer parts.
-
The operation failed due to a KMS exception.
CreateRepository
$result = $client->createRepository
([/* ... */]); $promise = $client->createRepositoryAsync
([/* ... */]);
Creates a repository. For more information, see Amazon ECR Repositories in the Amazon Elastic Container Registry User Guide.
Parameter Syntax
$result = $client->createRepository([ 'encryptionConfiguration' => [ 'encryptionType' => 'AES256|KMS', // REQUIRED 'kmsKey' => '<string>', ], 'imageScanningConfiguration' => [ 'scanOnPush' => true || false, ], 'imageTagMutability' => 'MUTABLE|IMMUTABLE', 'repositoryName' => '<string>', // REQUIRED 'tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], ]);
Parameter Details
Members
- encryptionConfiguration
-
- Type: EncryptionConfiguration structure
The encryption configuration for the repository. This determines how the contents of your repository are encrypted at rest.
- imageScanningConfiguration
-
- Type: ImageScanningConfiguration structure
The image scanning configuration for the repository. This determines whether images are scanned for known vulnerabilities after being pushed to the repository.
- imageTagMutability
-
- Type: string
The tag mutability setting for the repository. If this parameter is omitted, the default setting of
MUTABLE
will be used which will allow image tags to be overwritten. IfIMMUTABLE
is specified, all image tags within the repository will be immutable which will prevent them from being overwritten. - repositoryName
-
- Required: Yes
- Type: string
The name to use for the repository. The repository name may be specified on its own (such as
nginx-web-app
) or it can be prepended with a namespace to group the repository into a category (such asproject-a/nginx-web-app
). - tags
-
- Type: Array of Tag structures
The metadata that you apply to the repository to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
Result Syntax
[ 'repository' => [ 'createdAt' => <DateTime>, 'encryptionConfiguration' => [ 'encryptionType' => 'AES256|KMS', 'kmsKey' => '<string>', ], 'imageScanningConfiguration' => [ 'scanOnPush' => true || false, ], 'imageTagMutability' => 'MUTABLE|IMMUTABLE', 'registryId' => '<string>', 'repositoryArn' => '<string>', 'repositoryName' => '<string>', 'repositoryUri' => '<string>', ], ]
Result Details
Members
- repository
-
- Type: Repository structure
The repository that was created.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
An invalid parameter has been specified. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
-
The list of tags on the repository is over the limit. The maximum number of tags that can be applied to a repository is 50.
-
RepositoryAlreadyExistsException:
The specified repository already exists in the specified registry.
-
The operation did not succeed because it would have exceeded a service limit for your account. For more information, see Amazon ECR Service Quotas in the Amazon Elastic Container Registry User Guide.
-
The operation failed due to a KMS exception.
Examples
Example 1: To create a new repository
This example creates a repository called nginx-web-app inside the project-a namespace in the default registry for an account.
$result = $client->createRepository([ 'repositoryName' => 'project-a/nginx-web-app', ]);
Result syntax:
[ 'repository' => [ 'registryId' => '012345678901', 'repositoryArn' => 'arn:aws:ecr:us-west-2:012345678901:repository/project-a/nginx-web-app', 'repositoryName' => 'project-a/nginx-web-app', ], ]
DeleteLifecyclePolicy
$result = $client->deleteLifecyclePolicy
([/* ... */]); $promise = $client->deleteLifecyclePolicyAsync
([/* ... */]);
Deletes the lifecycle policy associated with the specified repository.
Parameter Syntax
$result = $client->deleteLifecyclePolicy([ 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
Result Syntax
[ 'lastEvaluatedAt' => <DateTime>, 'lifecyclePolicyText' => '<string>', 'registryId' => '<string>', 'repositoryName' => '<string>', ]
Result Details
Members
- lastEvaluatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time stamp of the last time that the lifecycle policy was run.
- lifecyclePolicyText
-
- Type: string
The JSON lifecycle policy text.
- registryId
-
- Type: string
The registry ID associated with the request.
- repositoryName
-
- Type: string
The repository name associated with the request.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
LifecyclePolicyNotFoundException:
The lifecycle policy could not be found, and no policy is set to the repository.
DeleteRegistryPolicy
$result = $client->deleteRegistryPolicy
([/* ... */]); $promise = $client->deleteRegistryPolicyAsync
([/* ... */]);
Deletes the registry permissions policy.
Parameter Syntax
$result = $client->deleteRegistryPolicy([ ]);
Parameter Details
Members
Result Syntax
[ 'policyText' => '<string>', 'registryId' => '<string>', ]
Result Details
Members
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
RegistryPolicyNotFoundException:
The registry doesn't have an associated registry policy.
DeleteRepository
$result = $client->deleteRepository
([/* ... */]); $promise = $client->deleteRepositoryAsync
([/* ... */]);
Deletes a repository. If the repository contains images, you must either delete all images in the repository or use the force
option to delete the repository.
Parameter Syntax
$result = $client->deleteRepository([ 'force' => true || false, 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- force
-
- Type: boolean
If a repository contains images, forces the deletion.
- registryId
-
- Type: string
The AWS account ID associated with the registry that contains the repository to delete. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository to delete.
Result Syntax
[ 'repository' => [ 'createdAt' => <DateTime>, 'encryptionConfiguration' => [ 'encryptionType' => 'AES256|KMS', 'kmsKey' => '<string>', ], 'imageScanningConfiguration' => [ 'scanOnPush' => true || false, ], 'imageTagMutability' => 'MUTABLE|IMMUTABLE', 'registryId' => '<string>', 'repositoryArn' => '<string>', 'repositoryName' => '<string>', 'repositoryUri' => '<string>', ], ]
Result Details
Members
- repository
-
- Type: Repository structure
The repository that was deleted.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
The specified repository contains images. To delete a repository that contains images, you must force the deletion with the
force
parameter. -
The operation failed due to a KMS exception.
Examples
Example 1: To force delete a repository
This example force deletes a repository named ubuntu in the default registry for an account. The force parameter is required if the repository contains images.
$result = $client->deleteRepository([ 'force' => 1, 'repositoryName' => 'ubuntu', ]);
Result syntax:
[ 'repository' => [ 'registryId' => '012345678901', 'repositoryArn' => 'arn:aws:ecr:us-west-2:012345678901:repository/ubuntu', 'repositoryName' => 'ubuntu', ], ]
DeleteRepositoryPolicy
$result = $client->deleteRepositoryPolicy
([/* ... */]); $promise = $client->deleteRepositoryPolicyAsync
([/* ... */]);
Deletes the repository policy associated with the specified repository.
Parameter Syntax
$result = $client->deleteRepositoryPolicy([ 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- registryId
-
- Type: string
The AWS account ID associated with the registry that contains the repository policy to delete. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository that is associated with the repository policy to delete.
Result Syntax
[ 'policyText' => '<string>', 'registryId' => '<string>', 'repositoryName' => '<string>', ]
Result Details
Members
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
RepositoryPolicyNotFoundException:
The specified repository and registry combination does not have an associated repository policy.
Examples
Example 1: To delete the policy associated with a repository
This example deletes the policy associated with the repository named ubuntu in the current account.
$result = $client->deleteRepositoryPolicy([ 'repositoryName' => 'ubuntu', ]);
Result syntax:
[ 'policyText' => '{ ... }', 'registryId' => '012345678901', 'repositoryName' => 'ubuntu', ]
DescribeImageScanFindings
$result = $client->describeImageScanFindings
([/* ... */]); $promise = $client->describeImageScanFindingsAsync
([/* ... */]);
Returns the scan findings for the specified image.
Parameter Syntax
$result = $client->describeImageScanFindings([ 'imageId' => [ // REQUIRED 'imageDigest' => '<string>', 'imageTag' => '<string>', ], 'maxResults' => <integer>, 'nextToken' => '<string>', 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- imageId
-
- Required: Yes
- Type: ImageIdentifier structure
An object with identifying information for an Amazon ECR image.
- maxResults
-
- Type: int
The maximum number of image scan results returned by
DescribeImageScanFindings
in paginated output. When this parameter is used,DescribeImageScanFindings
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherDescribeImageScanFindings
request with the returnednextToken
value. This value can be between 1 and 1000. If this parameter is not used, thenDescribeImageScanFindings
returns up to 100 results and anextToken
value, if applicable. - nextToken
-
- Type: string
The
nextToken
value returned from a previous paginatedDescribeImageScanFindings
request wheremaxResults
was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextToken
value. This value is null when there are no more results to return. - registryId
-
- Type: string
The AWS account ID associated with the registry that contains the repository in which to describe the image scan findings for. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The repository for the image for which to describe the scan findings.
Result Syntax
[ 'imageId' => [ 'imageDigest' => '<string>', 'imageTag' => '<string>', ], 'imageScanFindings' => [ 'findingSeverityCounts' => [<integer>, ...], 'findings' => [ [ 'attributes' => [ [ 'key' => '<string>', 'value' => '<string>', ], // ... ], 'description' => '<string>', 'name' => '<string>', 'severity' => 'INFORMATIONAL|LOW|MEDIUM|HIGH|CRITICAL|UNDEFINED', 'uri' => '<string>', ], // ... ], 'imageScanCompletedAt' => <DateTime>, 'vulnerabilitySourceUpdatedAt' => <DateTime>, ], 'imageScanStatus' => [ 'description' => '<string>', 'status' => 'IN_PROGRESS|COMPLETE|FAILED', ], 'nextToken' => '<string>', 'registryId' => '<string>', 'repositoryName' => '<string>', ]
Result Details
Members
- imageId
-
- Type: ImageIdentifier structure
An object with identifying information for an Amazon ECR image.
- imageScanFindings
-
- Type: ImageScanFindings structure
The information contained in the image scan findings.
- imageScanStatus
-
- Type: ImageScanStatus structure
The current state of the scan.
- nextToken
-
- Type: string
The
nextToken
value to include in a futureDescribeImageScanFindings
request. When the results of aDescribeImageScanFindings
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value is null when there are no more results to return. - registryId
-
- Type: string
The registry ID associated with the request.
- repositoryName
-
- Type: string
The repository name associated with the request.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
The image requested does not exist in the specified repository.
-
The specified image scan could not be found. Ensure that image scanning is enabled on the repository and try again.
DescribeImages
$result = $client->describeImages
([/* ... */]); $promise = $client->describeImagesAsync
([/* ... */]);
Returns metadata about the images in a repository.
Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker registry. The output of the docker images
command shows the uncompressed image size, so it may return a larger image size than the image sizes returned by DescribeImages.
Parameter Syntax
$result = $client->describeImages([ 'filter' => [ 'tagStatus' => 'TAGGED|UNTAGGED|ANY', ], 'imageIds' => [ [ 'imageDigest' => '<string>', 'imageTag' => '<string>', ], // ... ], 'maxResults' => <integer>, 'nextToken' => '<string>', 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- filter
-
- Type: DescribeImagesFilter structure
The filter key and value with which to filter your
DescribeImages
results. - imageIds
-
- Type: Array of ImageIdentifier structures
The list of image IDs for the requested repository.
- maxResults
-
- Type: int
The maximum number of repository results returned by
DescribeImages
in paginated output. When this parameter is used,DescribeImages
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherDescribeImages
request with the returnednextToken
value. This value can be between 1 and 1000. If this parameter is not used, thenDescribeImages
returns up to 100 results and anextToken
value, if applicable. This option cannot be used when you specify images withimageIds
. - nextToken
-
- Type: string
The
nextToken
value returned from a previous paginatedDescribeImages
request wheremaxResults
was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextToken
value. This value isnull
when there are no more results to return. This option cannot be used when you specify images withimageIds
. - registryId
-
- Type: string
The AWS account ID associated with the registry that contains the repository in which to describe images. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The repository that contains the images to describe.
Result Syntax
[ 'imageDetails' => [ [ 'artifactMediaType' => '<string>', 'imageDigest' => '<string>', 'imageManifestMediaType' => '<string>', 'imagePushedAt' => <DateTime>, 'imageScanFindingsSummary' => [ 'findingSeverityCounts' => [<integer>, ...], 'imageScanCompletedAt' => <DateTime>, 'vulnerabilitySourceUpdatedAt' => <DateTime>, ], 'imageScanStatus' => [ 'description' => '<string>', 'status' => 'IN_PROGRESS|COMPLETE|FAILED', ], 'imageSizeInBytes' => <integer>, 'imageTags' => ['<string>', ...], 'registryId' => '<string>', 'repositoryName' => '<string>', ], // ... ], 'nextToken' => '<string>', ]
Result Details
Members
- imageDetails
-
- Type: Array of ImageDetail structures
A list of ImageDetail objects that contain data about the image.
- nextToken
-
- Type: string
The
nextToken
value to include in a futureDescribeImages
request. When the results of aDescribeImages
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
The image requested does not exist in the specified repository.
DescribeRegistry
$result = $client->describeRegistry
([/* ... */]); $promise = $client->describeRegistryAsync
([/* ... */]);
Describes the settings for a registry. The replication configuration for a repository can be created or updated with the PutReplicationConfiguration API action.
Parameter Syntax
$result = $client->describeRegistry([ ]);
Parameter Details
Members
Result Syntax
[ 'registryId' => '<string>', 'replicationConfiguration' => [ 'rules' => [ [ 'destinations' => [ [ 'region' => '<string>', 'registryId' => '<string>', ], // ... ], ], // ... ], ], ]
Result Details
Members
- registryId
-
- Type: string
The ID of the registry.
- replicationConfiguration
-
- Type: ReplicationConfiguration structure
The replication configuration for the registry.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
There was an exception validating this request.
DescribeRepositories
$result = $client->describeRepositories
([/* ... */]); $promise = $client->describeRepositoriesAsync
([/* ... */]);
Describes image repositories in a registry.
Parameter Syntax
$result = $client->describeRepositories([ 'maxResults' => <integer>, 'nextToken' => '<string>', 'registryId' => '<string>', 'repositoryNames' => ['<string>', ...], ]);
Parameter Details
Members
- maxResults
-
- Type: int
The maximum number of repository results returned by
DescribeRepositories
in paginated output. When this parameter is used,DescribeRepositories
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherDescribeRepositories
request with the returnednextToken
value. This value can be between 1 and 1000. If this parameter is not used, thenDescribeRepositories
returns up to 100 results and anextToken
value, if applicable. This option cannot be used when you specify repositories withrepositoryNames
. - nextToken
-
- Type: string
The
nextToken
value returned from a previous paginatedDescribeRepositories
request wheremaxResults
was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextToken
value. This value isnull
when there are no more results to return. This option cannot be used when you specify repositories withrepositoryNames
.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
- registryId
-
- Type: string
The AWS account ID associated with the registry that contains the repositories to be described. If you do not specify a registry, the default registry is assumed.
- repositoryNames
-
- Type: Array of strings
A list of repositories to describe. If this parameter is omitted, then all repositories in a registry are described.
Result Syntax
[ 'nextToken' => '<string>', 'repositories' => [ [ 'createdAt' => <DateTime>, 'encryptionConfiguration' => [ 'encryptionType' => 'AES256|KMS', 'kmsKey' => '<string>', ], 'imageScanningConfiguration' => [ 'scanOnPush' => true || false, ], 'imageTagMutability' => 'MUTABLE|IMMUTABLE', 'registryId' => '<string>', 'repositoryArn' => '<string>', 'repositoryName' => '<string>', 'repositoryUri' => '<string>', ], // ... ], ]
Result Details
Members
- nextToken
-
- Type: string
The
nextToken
value to include in a futureDescribeRepositories
request. When the results of aDescribeRepositories
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return. - repositories
-
- Type: Array of Repository structures
A list of repository objects corresponding to valid repositories.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
Examples
Example 1: To describe all repositories in the current account
The following example obtains a list and description of all repositories in the default registry to which the current user has access.
$result = $client->describeRepositories([ ]);
Result syntax:
[ 'repositories' => [ [ 'registryId' => '012345678910', 'repositoryArn' => 'arn:aws:ecr:us-west-2:012345678910:repository/ubuntu', 'repositoryName' => 'ubuntu', ], [ 'registryId' => '012345678910', 'repositoryArn' => 'arn:aws:ecr:us-west-2:012345678910:repository/test', 'repositoryName' => 'test', ], ], ]
GetAuthorizationToken
$result = $client->getAuthorizationToken
([/* ... */]); $promise = $client->getAuthorizationTokenAsync
([/* ... */]);
Retrieves an authorization token. An authorization token represents your IAM authentication credentials and can be used to access any Amazon ECR registry that your IAM principal has access to. The authorization token is valid for 12 hours.
The authorizationToken
returned is a base64 encoded string that can be decoded and used in a docker login
command to authenticate to a registry. The AWS CLI offers an get-login-password
command that simplifies the login process. For more information, see Registry Authentication in the Amazon Elastic Container Registry User Guide.
Parameter Syntax
$result = $client->getAuthorizationToken([ 'registryIds' => ['<string>', ...], ]);
Parameter Details
Members
Result Syntax
[ 'authorizationData' => [ [ 'authorizationToken' => '<string>', 'expiresAt' => <DateTime>, 'proxyEndpoint' => '<string>', ], // ... ], ]
Result Details
Members
- authorizationData
-
- Type: Array of AuthorizationData structures
A list of authorization token data objects that correspond to the
registryIds
values in the request.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
Examples
Example 1: To obtain an authorization token
This example gets an authorization token for your default registry.
$result = $client->getAuthorizationToken([ ]);
Result syntax:
[ 'authorizationData' => [ [ 'authorizationToken' => 'QVdTOkN...', 'expiresAt' =>, 'proxyEndpoint' => 'https://012345678901.dkr.ecr.us-west-2.amazonaws.com', ], ], ]
GetDownloadUrlForLayer
$result = $client->getDownloadUrlForLayer
([/* ... */]); $promise = $client->getDownloadUrlForLayerAsync
([/* ... */]);
Retrieves the pre-signed Amazon S3 download URL corresponding to an image layer. You can only get URLs for image layers that are referenced in an image.
When an image is pulled, the GetDownloadUrlForLayer API is called once per image layer that is not already cached.
This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
Parameter Syntax
$result = $client->getDownloadUrlForLayer([ 'layerDigest' => '<string>', // REQUIRED 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- layerDigest
-
- Required: Yes
- Type: string
The digest of the image layer to download.
- registryId
-
- Type: string
The AWS account ID associated with the registry that contains the image layer to download. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository that is associated with the image layer to download.
Result Syntax
[ 'downloadUrl' => '<string>', 'layerDigest' => '<string>', ]
Result Details
Members
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified layers could not be found, or the specified layer is not valid for this repository.
-
The specified layer is not available because it is not associated with an image. Unassociated image layers may be cleaned up at any time.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
GetLifecyclePolicy
$result = $client->getLifecyclePolicy
([/* ... */]); $promise = $client->getLifecyclePolicyAsync
([/* ... */]);
Retrieves the lifecycle policy for the specified repository.
Parameter Syntax
$result = $client->getLifecyclePolicy([ 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
Result Syntax
[ 'lastEvaluatedAt' => <DateTime>, 'lifecyclePolicyText' => '<string>', 'registryId' => '<string>', 'repositoryName' => '<string>', ]
Result Details
Members
- lastEvaluatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time stamp of the last time that the lifecycle policy was run.
- lifecyclePolicyText
-
- Type: string
The JSON lifecycle policy text.
- registryId
-
- Type: string
The registry ID associated with the request.
- repositoryName
-
- Type: string
The repository name associated with the request.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
LifecyclePolicyNotFoundException:
The lifecycle policy could not be found, and no policy is set to the repository.
GetLifecyclePolicyPreview
$result = $client->getLifecyclePolicyPreview
([/* ... */]); $promise = $client->getLifecyclePolicyPreviewAsync
([/* ... */]);
Retrieves the results of the lifecycle policy preview request for the specified repository.
Parameter Syntax
$result = $client->getLifecyclePolicyPreview([ 'filter' => [ 'tagStatus' => 'TAGGED|UNTAGGED|ANY', ], 'imageIds' => [ [ 'imageDigest' => '<string>', 'imageTag' => '<string>', ], // ... ], 'maxResults' => <integer>, 'nextToken' => '<string>', 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- filter
-
- Type: LifecyclePolicyPreviewFilter structure
An optional parameter that filters results based on image tag status and all tags, if tagged.
- imageIds
-
- Type: Array of ImageIdentifier structures
The list of imageIDs to be included.
- maxResults
-
- Type: int
The maximum number of repository results returned by
GetLifecyclePolicyPreviewRequest
in paginated output. When this parameter is used,GetLifecyclePolicyPreviewRequest
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherGetLifecyclePolicyPreviewRequest
request with the returnednextToken
value. This value can be between 1 and 1000. If this parameter is not used, thenGetLifecyclePolicyPreviewRequest
returns up to 100 results and anextToken
value, if applicable. This option cannot be used when you specify images withimageIds
. - nextToken
-
- Type: string
The
nextToken
value returned from a previous paginatedGetLifecyclePolicyPreviewRequest
request wheremaxResults
was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextToken
value. This value isnull
when there are no more results to return. This option cannot be used when you specify images withimageIds
. - registryId
-
- Type: string
The AWS account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository.
Result Syntax
[ 'lifecyclePolicyText' => '<string>', 'nextToken' => '<string>', 'previewResults' => [ [ 'action' => [ 'type' => 'EXPIRE', ], 'appliedRulePriority' => <integer>, 'imageDigest' => '<string>', 'imagePushedAt' => <DateTime>, 'imageTags' => ['<string>', ...], ], // ... ], 'registryId' => '<string>', 'repositoryName' => '<string>', 'status' => 'IN_PROGRESS|COMPLETE|EXPIRED|FAILED', 'summary' => [ 'expiringImageTotalCount' => <integer>, ], ]
Result Details
Members
- lifecyclePolicyText
-
- Type: string
The JSON lifecycle policy text.
- nextToken
-
- Type: string
The
nextToken
value to include in a futureGetLifecyclePolicyPreview
request. When the results of aGetLifecyclePolicyPreview
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return. - previewResults
-
- Type: Array of LifecyclePolicyPreviewResult structures
The results of the lifecycle policy preview request.
- registryId
-
- Type: string
The registry ID associated with the request.
- repositoryName
-
- Type: string
The repository name associated with the request.
- status
-
- Type: string
The status of the lifecycle policy preview request.
- summary
-
- Type: LifecyclePolicyPreviewSummary structure
The list of images that is returned as a result of the action.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
LifecyclePolicyPreviewNotFoundException:
There is no dry run for this repository.
GetRegistryPolicy
$result = $client->getRegistryPolicy
([/* ... */]); $promise = $client->getRegistryPolicyAsync
([/* ... */]);
Retrieves the permissions policy for a registry.
Parameter Syntax
$result = $client->getRegistryPolicy([ ]);
Parameter Details
Members
Result Syntax
[ 'policyText' => '<string>', 'registryId' => '<string>', ]
Result Details
Members
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
RegistryPolicyNotFoundException:
The registry doesn't have an associated registry policy.
GetRepositoryPolicy
$result = $client->getRepositoryPolicy
([/* ... */]); $promise = $client->getRepositoryPolicyAsync
([/* ... */]);
Retrieves the repository policy for the specified repository.
Parameter Syntax
$result = $client->getRepositoryPolicy([ 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
Result Syntax
[ 'policyText' => '<string>', 'registryId' => '<string>', 'repositoryName' => '<string>', ]
Result Details
Members
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
RepositoryPolicyNotFoundException:
The specified repository and registry combination does not have an associated repository policy.
Examples
Example 1: To get the current policy for a repository
This example obtains the repository policy for the repository named ubuntu.
$result = $client->getRepositoryPolicy([ 'repositoryName' => 'ubuntu', ]);
Result syntax:
[ 'policyText' => '{ "Version" : "2008-10-17", "Statement" : [ { "Sid" : "new statement", "Effect" : "Allow", "Principal" : { "AWS" : "arn:aws:iam::012345678901:role/CodeDeployDemo" },"Action" : [ "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage", "ecr:BatchCheckLayerAvailability" ] } ]}', 'registryId' => '012345678901', 'repositoryName' => 'ubuntu', ]
InitiateLayerUpload
$result = $client->initiateLayerUpload
([/* ... */]); $promise = $client->initiateLayerUploadAsync
([/* ... */]);
Notifies Amazon ECR that you intend to upload an image layer.
When an image is pushed, the InitiateLayerUpload API is called once per image layer that has not already been uploaded. Whether or not an image layer has been uploaded is determined by the BatchCheckLayerAvailability API action.
This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
Parameter Syntax
$result = $client->initiateLayerUpload([ 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
Result Syntax
[ 'partSize' => <integer>, 'uploadId' => '<string>', ]
Result Details
Members
- partSize
-
- Type: long (int|float)
The size, in bytes, that Amazon ECR expects future layer part uploads to be.
- uploadId
-
- Type: string
The upload ID for the layer upload. This parameter is passed to further UploadLayerPart and CompleteLayerUpload operations.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
The operation failed due to a KMS exception.
ListImages
$result = $client->listImages
([/* ... */]); $promise = $client->listImagesAsync
([/* ... */]);
Lists all the image IDs for the specified repository.
You can filter images based on whether or not they are tagged by using the tagStatus
filter and specifying either TAGGED
, UNTAGGED
or ANY
. For example, you can filter your results to return only UNTAGGED
images and then pipe that result to a BatchDeleteImage operation to delete them. Or, you can filter your results to return only TAGGED
images to list all of the tags in your repository.
Parameter Syntax
$result = $client->listImages([ 'filter' => [ 'tagStatus' => 'TAGGED|UNTAGGED|ANY', ], 'maxResults' => <integer>, 'nextToken' => '<string>', 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- filter
-
- Type: ListImagesFilter structure
The filter key and value with which to filter your
ListImages
results. - maxResults
-
- Type: int
The maximum number of image results returned by
ListImages
in paginated output. When this parameter is used,ListImages
only returnsmaxResults
results in a single page along with anextToken
response element. The remaining results of the initial request can be seen by sending anotherListImages
request with the returnednextToken
value. This value can be between 1 and 1000. If this parameter is not used, thenListImages
returns up to 100 results and anextToken
value, if applicable. - nextToken
-
- Type: string
The
nextToken
value returned from a previous paginatedListImages
request wheremaxResults
was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextToken
value. This value isnull
when there are no more results to return.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
- registryId
-
- Type: string
The AWS account ID associated with the registry that contains the repository in which to list images. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The repository with image IDs to be listed.
Result Syntax
[ 'imageIds' => [ [ 'imageDigest' => '<string>', 'imageTag' => '<string>', ], // ... ], 'nextToken' => '<string>', ]
Result Details
Members
- imageIds
-
- Type: Array of ImageIdentifier structures
The list of image IDs for the requested repository.
- nextToken
-
- Type: string
The
nextToken
value to include in a futureListImages
request. When the results of aListImages
request exceedmaxResults
, this value can be used to retrieve the next page of results. This value isnull
when there are no more results to return.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
Examples
Example 1: To list all images in a repository
This example lists all of the images in the repository named ubuntu in the default registry in the current account.
$result = $client->listImages([ 'repositoryName' => 'ubuntu', ]);
Result syntax:
[ 'imageIds' => [ [ 'imageDigest' => 'sha256:764f63476bdff6d83a09ba2a818f0d35757063724a9ac3ba5019c56f74ebf42a', 'imageTag' => 'precise', ], ], ]
ListTagsForResource
$result = $client->listTagsForResource
([/* ... */]); $promise = $client->listTagsForResourceAsync
([/* ... */]);
List the tags for an Amazon ECR resource.
Parameter Syntax
$result = $client->listTagsForResource([ 'resourceArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
Result Syntax
[ 'tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], ]
Result Details
Members
- tags
-
- Type: Array of Tag structures
The tags for the resource.
Errors
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
These errors are usually caused by a server-side issue.
PutImage
$result = $client->putImage
([/* ... */]); $promise = $client->putImageAsync
([/* ... */]);
Creates or updates the image manifest and tags associated with an image.
When an image is pushed and all new image layers have been uploaded, the PutImage API is called once to create or update the image manifest and the tags associated with the image.
This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
Parameter Syntax
$result = $client->putImage([ 'imageDigest' => '<string>', 'imageManifest' => '<string>', // REQUIRED 'imageManifestMediaType' => '<string>', 'imageTag' => '<string>', 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- imageDigest
-
- Type: string
The image digest of the image manifest corresponding to the image.
- imageManifest
-
- Required: Yes
- Type: string
The image manifest corresponding to the image to be uploaded.
- imageManifestMediaType
-
- Type: string
The media type of the image manifest. If you push an image manifest that does not contain the
mediaType
field, you must specify theimageManifestMediaType
in the request. - imageTag
-
- Type: string
The tag to associate with the image. This parameter is required for images that use the Docker Image Manifest V2 Schema 2 or Open Container Initiative (OCI) formats.
- registryId
-
- Type: string
The AWS account ID associated with the registry that contains the repository in which to put the image. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository in which to put the image.
Result Syntax
[ 'image' => [ 'imageId' => [ 'imageDigest' => '<string>', 'imageTag' => '<string>', ], 'imageManifest' => '<string>', 'imageManifestMediaType' => '<string>', 'registryId' => '<string>', 'repositoryName' => '<string>', ], ]
Result Details
Members
- image
-
- Type: Image structure
Details of the image uploaded.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
The specified image has already been pushed, and there were no changes to the manifest or image tag after the last push.
-
The specified layers could not be found, or the specified layer is not valid for this repository.
-
ReferencedImagesNotFoundException:
The manifest list is referencing an image that does not exist.
-
The operation did not succeed because it would have exceeded a service limit for your account. For more information, see Amazon ECR Service Quotas in the Amazon Elastic Container Registry User Guide.
-
ImageTagAlreadyExistsException:
The specified image is tagged with a tag that already exists. The repository is configured for tag immutability.
-
ImageDigestDoesNotMatchException:
The specified image digest does not match the digest that Amazon ECR calculated for the image.
-
The operation failed due to a KMS exception.
PutImageScanningConfiguration
$result = $client->putImageScanningConfiguration
([/* ... */]); $promise = $client->putImageScanningConfigurationAsync
([/* ... */]);
Updates the image scanning configuration for the specified repository.
Parameter Syntax
$result = $client->putImageScanningConfiguration([ 'imageScanningConfiguration' => [ // REQUIRED 'scanOnPush' => true || false, ], 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- imageScanningConfiguration
-
- Required: Yes
- Type: ImageScanningConfiguration structure
The image scanning configuration for the repository. This setting determines whether images are scanned for known vulnerabilities after being pushed to the repository.
- registryId
-
- Type: string
The AWS account ID associated with the registry that contains the repository in which to update the image scanning configuration setting. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository in which to update the image scanning configuration setting.
Result Syntax
[ 'imageScanningConfiguration' => [ 'scanOnPush' => true || false, ], 'registryId' => '<string>', 'repositoryName' => '<string>', ]
Result Details
Members
- imageScanningConfiguration
-
- Type: ImageScanningConfiguration structure
The image scanning configuration setting for the repository.
- registryId
-
- Type: string
The registry ID associated with the request.
- repositoryName
-
- Type: string
The repository name associated with the request.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
PutImageTagMutability
$result = $client->putImageTagMutability
([/* ... */]); $promise = $client->putImageTagMutabilityAsync
([/* ... */]);
Updates the image tag mutability settings for the specified repository. For more information, see Image Tag Mutability in the Amazon Elastic Container Registry User Guide.
Parameter Syntax
$result = $client->putImageTagMutability([ 'imageTagMutability' => 'MUTABLE|IMMUTABLE', // REQUIRED 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- imageTagMutability
-
- Required: Yes
- Type: string
The tag mutability setting for the repository. If
MUTABLE
is specified, image tags can be overwritten. IfIMMUTABLE
is specified, all image tags within the repository will be immutable which will prevent them from being overwritten. - registryId
-
- Type: string
The AWS account ID associated with the registry that contains the repository in which to update the image tag mutability settings. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository in which to update the image tag mutability settings.
Result Syntax
[ 'imageTagMutability' => 'MUTABLE|IMMUTABLE', 'registryId' => '<string>', 'repositoryName' => '<string>', ]
Result Details
Members
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
PutLifecyclePolicy
$result = $client->putLifecyclePolicy
([/* ... */]); $promise = $client->putLifecyclePolicyAsync
([/* ... */]);
Creates or updates the lifecycle policy for the specified repository. For more information, see Lifecycle Policy Template.
Parameter Syntax
$result = $client->putLifecyclePolicy([ 'lifecyclePolicyText' => '<string>', // REQUIRED 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- lifecyclePolicyText
-
- Required: Yes
- Type: string
The JSON repository policy text to apply to the repository.
- registryId
-
- Type: string
The AWS account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository to receive the policy.
Result Syntax
[ 'lifecyclePolicyText' => '<string>', 'registryId' => '<string>', 'repositoryName' => '<string>', ]
Result Details
Members
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
PutRegistryPolicy
$result = $client->putRegistryPolicy
([/* ... */]); $promise = $client->putRegistryPolicyAsync
([/* ... */]);
Creates or updates the permissions policy for your registry.
A registry policy is used to specify permissions for another AWS account and is used when configuring cross-account replication. For more information, see Registry permissions in the Amazon Elastic Container Registry User Guide.
Parameter Syntax
$result = $client->putRegistryPolicy([ 'policyText' => '<string>', // REQUIRED ]);
Parameter Details
Members
- policyText
-
- Required: Yes
- Type: string
The JSON policy text to apply to your registry. The policy text follows the same format as IAM policy text. For more information, see Registry permissions in the Amazon Elastic Container Registry User Guide.
Result Syntax
[ 'policyText' => '<string>', 'registryId' => '<string>', ]
Result Details
Members
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
PutReplicationConfiguration
$result = $client->putReplicationConfiguration
([/* ... */]); $promise = $client->putReplicationConfigurationAsync
([/* ... */]);
Creates or updates the replication configuration for a registry. The existing replication configuration for a repository can be retrieved with the DescribeRegistry API action. The first time the PutReplicationConfiguration API is called, a service-linked IAM role is created in your account for the replication process. For more information, see Using Service-Linked Roles for Amazon ECR in the Amazon Elastic Container Registry User Guide.
When configuring cross-account replication, the destination account must grant the source account permission to replicate. This permission is controlled using a registry permissions policy. For more information, see PutRegistryPolicy.
Parameter Syntax
$result = $client->putReplicationConfiguration([ 'replicationConfiguration' => [ // REQUIRED 'rules' => [ // REQUIRED [ 'destinations' => [ // REQUIRED [ 'region' => '<string>', // REQUIRED 'registryId' => '<string>', // REQUIRED ], // ... ], ], // ... ], ], ]);
Parameter Details
Members
- replicationConfiguration
-
- Required: Yes
- Type: ReplicationConfiguration structure
An object representing the replication configuration for a registry.
Result Syntax
[ 'replicationConfiguration' => [ 'rules' => [ [ 'destinations' => [ [ 'region' => '<string>', 'registryId' => '<string>', ], // ... ], ], // ... ], ], ]
Result Details
Members
- replicationConfiguration
-
- Type: ReplicationConfiguration structure
The contents of the replication configuration for the registry.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
There was an exception validating this request.
SetRepositoryPolicy
$result = $client->setRepositoryPolicy
([/* ... */]); $promise = $client->setRepositoryPolicyAsync
([/* ... */]);
Applies a repository policy to the specified repository to control access permissions. For more information, see Amazon ECR Repository Policies in the Amazon Elastic Container Registry User Guide.
Parameter Syntax
$result = $client->setRepositoryPolicy([ 'force' => true || false, 'policyText' => '<string>', // REQUIRED 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- force
-
- Type: boolean
If the policy you are attempting to set on a repository policy would prevent you from setting another policy in the future, you must force the SetRepositoryPolicy operation. This is intended to prevent accidental repository lock outs.
- policyText
-
- Required: Yes
- Type: string
The JSON repository policy text to apply to the repository. For more information, see Amazon ECR Repository Policies in the Amazon Elastic Container Registry User Guide.
- registryId
-
- Type: string
The AWS account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository to receive the policy.
Result Syntax
[ 'policyText' => '<string>', 'registryId' => '<string>', 'repositoryName' => '<string>', ]
Result Details
Members
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
StartImageScan
$result = $client->startImageScan
([/* ... */]); $promise = $client->startImageScanAsync
([/* ... */]);
Starts an image vulnerability scan. An image scan can only be started once per day on an individual image. This limit includes if an image was scanned on initial push. For more information, see Image Scanning in the Amazon Elastic Container Registry User Guide.
Parameter Syntax
$result = $client->startImageScan([ 'imageId' => [ // REQUIRED 'imageDigest' => '<string>', 'imageTag' => '<string>', ], 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- imageId
-
- Required: Yes
- Type: ImageIdentifier structure
An object with identifying information for an Amazon ECR image.
- registryId
-
- Type: string
The AWS account ID associated with the registry that contains the repository in which to start an image scan request. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository that contains the images to scan.
Result Syntax
[ 'imageId' => [ 'imageDigest' => '<string>', 'imageTag' => '<string>', ], 'imageScanStatus' => [ 'description' => '<string>', 'status' => 'IN_PROGRESS|COMPLETE|FAILED', ], 'registryId' => '<string>', 'repositoryName' => '<string>', ]
Result Details
Members
- imageId
-
- Type: ImageIdentifier structure
An object with identifying information for an Amazon ECR image.
- imageScanStatus
-
- Type: ImageScanStatus structure
The current state of the scan.
- registryId
-
- Type: string
The registry ID associated with the request.
- repositoryName
-
- Type: string
The repository name associated with the request.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
UnsupportedImageTypeException:
The image is of a type that cannot be scanned.
-
The operation did not succeed because it would have exceeded a service limit for your account. For more information, see Amazon ECR Service Quotas in the Amazon Elastic Container Registry User Guide.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
The image requested does not exist in the specified repository.
StartLifecyclePolicyPreview
$result = $client->startLifecyclePolicyPreview
([/* ... */]); $promise = $client->startLifecyclePolicyPreviewAsync
([/* ... */]);
Starts a preview of a lifecycle policy for the specified repository. This allows you to see the results before associating the lifecycle policy with the repository.
Parameter Syntax
$result = $client->startLifecyclePolicyPreview([ 'lifecyclePolicyText' => '<string>', 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- lifecyclePolicyText
-
- Type: string
The policy to be evaluated against. If you do not specify a policy, the current policy for the repository is used.
- registryId
-
- Type: string
The AWS account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository to be evaluated.
Result Syntax
[ 'lifecyclePolicyText' => '<string>', 'registryId' => '<string>', 'repositoryName' => '<string>', 'status' => 'IN_PROGRESS|COMPLETE|EXPIRED|FAILED', ]
Result Details
Members
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
LifecyclePolicyNotFoundException:
The lifecycle policy could not be found, and no policy is set to the repository.
-
LifecyclePolicyPreviewInProgressException:
The previous lifecycle policy preview request has not completed. Wait and try again.
TagResource
$result = $client->tagResource
([/* ... */]); $promise = $client->tagResourceAsync
([/* ... */]);
Adds specified tags to a resource with the specified ARN. Existing tags on a resource are not changed if they are not specified in the request parameters.
Parameter Syntax
$result = $client->tagResource([ 'resourceArn' => '<string>', // REQUIRED 'tags' => [ // REQUIRED [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], ]);
Parameter Details
Members
- resourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the the resource to which to add tags. Currently, the only supported resource is an Amazon ECR repository.
- tags
-
- Required: Yes
- Type: Array of Tag structures
The tags to add to the resource. A tag is an array of key-value pairs. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
Result Syntax
[]
Result Details
Errors
-
The specified parameter is invalid. Review the available parameters for the API request.
-
An invalid parameter has been specified. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
-
The list of tags on the repository is over the limit. The maximum number of tags that can be applied to a repository is 50.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
These errors are usually caused by a server-side issue.
UntagResource
$result = $client->untagResource
([/* ... */]); $promise = $client->untagResourceAsync
([/* ... */]);
Deletes specified tags from a resource.
Parameter Syntax
$result = $client->untagResource([ 'resourceArn' => '<string>', // REQUIRED 'tagKeys' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
Result Syntax
[]
Result Details
Errors
-
The specified parameter is invalid. Review the available parameters for the API request.
-
An invalid parameter has been specified. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
-
The list of tags on the repository is over the limit. The maximum number of tags that can be applied to a repository is 50.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
These errors are usually caused by a server-side issue.
UploadLayerPart
$result = $client->uploadLayerPart
([/* ... */]); $promise = $client->uploadLayerPartAsync
([/* ... */]);
Uploads an image layer part to Amazon ECR.
When an image is pushed, each new image layer is uploaded in parts. The maximum size of each image layer part can be 20971520 bytes (or about 20MB). The UploadLayerPart API is called once per each new image layer part.
This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
Parameter Syntax
$result = $client->uploadLayerPart([ 'layerPartBlob' => <string || resource || Psr\Http\Message\StreamInterface>, // REQUIRED 'partFirstByte' => <integer>, // REQUIRED 'partLastByte' => <integer>, // REQUIRED 'registryId' => '<string>', 'repositoryName' => '<string>', // REQUIRED 'uploadId' => '<string>', // REQUIRED ]);
Parameter Details
Members
- layerPartBlob
-
- Required: Yes
- Type: blob (string|resource|Psr\Http\Message\StreamInterface)
The base64-encoded layer part payload.
- partFirstByte
-
- Required: Yes
- Type: long (int|float)
The position of the first byte of the layer part witin the overall image layer.
- partLastByte
-
- Required: Yes
- Type: long (int|float)
The position of the last byte of the layer part within the overall image layer.
- registryId
-
- Type: string
The AWS account ID associated with the registry to which you are uploading layer parts. If you do not specify a registry, the default registry is assumed.
- repositoryName
-
- Required: Yes
- Type: string
The name of the repository to which you are uploading layer parts.
- uploadId
-
- Required: Yes
- Type: string
The upload ID from a previous InitiateLayerUpload operation to associate with the layer part upload.
Result Syntax
[ 'lastByteReceived' => <integer>, 'registryId' => '<string>', 'repositoryName' => '<string>', 'uploadId' => '<string>', ]
Result Details
Members
- lastByteReceived
-
- Type: long (int|float)
The integer value of the last byte received in the request.
- registryId
-
- Type: string
The registry ID associated with the request.
- repositoryName
-
- Type: string
The repository name associated with the request.
- uploadId
-
- Type: string
The upload ID associated with the request.
Errors
-
These errors are usually caused by a server-side issue.
-
The specified parameter is invalid. Review the available parameters for the API request.
-
The layer part size is not valid, or the first byte specified is not consecutive to the last byte of a previous layer part upload.
-
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
-
The upload could not be found, or the specified upload ID is not valid for this repository.
-
The operation did not succeed because it would have exceeded a service limit for your account. For more information, see Amazon ECR Service Quotas in the Amazon Elastic Container Registry User Guide.
-
The operation failed due to a KMS exception.
Shapes
Attribute
AuthorizationData
Description
An object representing authorization data for an Amazon ECR registry.
Members
- authorizationToken
-
- Type: string
A base64-encoded string that contains authorization data for the specified Amazon ECR registry. When the string is decoded, it is presented in the format
user:password
for private registry authentication usingdocker login
. - expiresAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The Unix time in seconds and milliseconds when the authorization token expires. Authorization tokens are valid for 12 hours.
- proxyEndpoint
-
- Type: string
The registry URL to use for this authorization token in a
docker login
command. The Amazon ECR registry URL format ishttps://aws_account_id.dkr.ecr.region.amazonaws.com
. For example,https://012345678910.dkr.ecr.us-east-1.amazonaws.com
..
DescribeImagesFilter
Description
An object representing a filter on a DescribeImages operation.
Members
- tagStatus
-
- Type: string
The tag status with which to filter your DescribeImages results. You can filter results based on whether they are
TAGGED
orUNTAGGED
.
EmptyUploadException
Description
The specified layer upload does not contain any layer parts.
Members
EncryptionConfiguration
Description
The encryption configuration for the repository. This determines how the contents of your repository are encrypted at rest.
By default, when no encryption configuration is set or the AES256
encryption type is used, Amazon ECR uses server-side encryption with Amazon S3-managed encryption keys which encrypts your data at rest using an AES-256 encryption algorithm. This does not require any action on your part.
For more control over the encryption of the contents of your repository, you can use server-side encryption with customer master keys (CMKs) stored in AWS Key Management Service (AWS KMS) to encrypt your images. For more information, see Amazon ECR encryption at rest in the Amazon Elastic Container Registry User Guide.
Members
- encryptionType
-
- Required: Yes
- Type: string
The encryption type to use.
If you use the
KMS
encryption type, the contents of the repository will be encrypted using server-side encryption with customer master keys (CMKs) stored in AWS KMS. When you use AWS KMS to encrypt your data, you can either use the default AWS managed CMK for Amazon ECR, or specify your own CMK, which you already created. For more information, see Protecting Data Using Server-Side Encryption with CMKs Stored in AWS Key Management Service (SSE-KMS) in the Amazon Simple Storage Service Console Developer Guide..If you use the
AES256
encryption type, Amazon ECR uses server-side encryption with Amazon S3-managed encryption keys which encrypts the images in the repository using an AES-256 encryption algorithm. For more information, see Protecting Data Using Server-Side Encryption with Amazon S3-Managed Encryption Keys (SSE-S3) in the Amazon Simple Storage Service Console Developer Guide.. - kmsKey
-
- Type: string
If you use the
KMS
encryption type, specify the CMK to use for encryption. The alias, key ID, or full ARN of the CMK can be specified. The key must exist in the same Region as the repository. If no key is specified, the default AWS managed CMK for Amazon ECR will be used.
Image
Description
An object representing an Amazon ECR image.
Members
- imageId
-
- Type: ImageIdentifier structure
An object containing the image tag and image digest associated with an image.
- imageManifest
-
- Type: string
The image manifest associated with the image.
- imageManifestMediaType
-
- Type: string
The manifest media type of the image.
- registryId
-
- Type: string
The AWS account ID associated with the registry containing the image.
- repositoryName
-
- Type: string
The name of the repository associated with the image.
ImageAlreadyExistsException
Description
The specified image has already been pushed, and there were no changes to the manifest or image tag after the last push.
Members
ImageDetail
Description
An object that describes an image returned by a DescribeImages operation.
Members
- artifactMediaType
-
- Type: string
The artifact media type of the image.
- imageDigest
-
- Type: string
The
sha256
digest of the image manifest. - imageManifestMediaType
-
- Type: string
The media type of the image manifest.
- imagePushedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time, expressed in standard JavaScript date format, at which the current image was pushed to the repository.
- imageScanFindingsSummary
-
- Type: ImageScanFindingsSummary structure
A summary of the last completed image scan.
- imageScanStatus
-
- Type: ImageScanStatus structure
The current state of the scan.
- imageSizeInBytes
-
- Type: long (int|float)
The size, in bytes, of the image in the repository.
If the image is a manifest list, this will be the max size of all manifests in the list.
Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker registry. The output of the
docker images
command shows the uncompressed image size, so it may return a larger image size than the image sizes returned by DescribeImages. - imageTags
-
- Type: Array of strings
The list of tags associated with this image.
- registryId
-
- Type: string
The AWS account ID associated with the registry to which this image belongs.
- repositoryName
-
- Type: string
The name of the repository to which this image belongs.
ImageDigestDoesNotMatchException
Description
The specified image digest does not match the digest that Amazon ECR calculated for the image.
Members
ImageFailure
Description
An object representing an Amazon ECR image failure.
Members
- failureCode
-
- Type: string
The code associated with the failure.
- failureReason
-
- Type: string
The reason for the failure.
- imageId
-
- Type: ImageIdentifier structure
The image ID associated with the failure.
ImageIdentifier
Description
An object with identifying information for an Amazon ECR image.
Members
ImageNotFoundException
Description
The image requested does not exist in the specified repository.
Members
ImageScanFinding
Description
Contains information about an image scan finding.
Members
- attributes
-
- Type: Array of Attribute structures
A collection of attributes of the host from which the finding is generated.
- description
-
- Type: string
The description of the finding.
- name
-
- Type: string
The name associated with the finding, usually a CVE number.
- severity
-
- Type: string
The finding severity.
- uri
-
- Type: string
A link containing additional details about the security vulnerability.
ImageScanFindings
Description
The details of an image scan.
Members
- findingSeverityCounts
-
- Type: Associative array of custom strings keys (FindingSeverity) to ints
The image vulnerability counts, sorted by severity.
- findings
-
- Type: Array of ImageScanFinding structures
The findings from the image scan.
- imageScanCompletedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time of the last completed image scan.
- vulnerabilitySourceUpdatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the vulnerability data was last scanned.
ImageScanFindingsSummary
Description
A summary of the last completed image scan.
Members
- findingSeverityCounts
-
- Type: Associative array of custom strings keys (FindingSeverity) to ints
The image vulnerability counts, sorted by severity.
- imageScanCompletedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time of the last completed image scan.
- vulnerabilitySourceUpdatedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time when the vulnerability data was last scanned.
ImageScanStatus
Description
The current status of an image scan.
Members
ImageScanningConfiguration
Description
The image scanning configuration for a repository.
Members
- scanOnPush
-
- Type: boolean
The setting that determines whether images are scanned after being pushed to a repository. If set to
true
, images will be scanned after being pushed. If this parameter is not specified, it will default tofalse
and images will not be scanned unless a scan is manually started with the StartImageScan API.
ImageTagAlreadyExistsException
Description
The specified image is tagged with a tag that already exists. The repository is configured for tag immutability.
Members
InvalidLayerException
Description
The layer digest calculation performed by Amazon ECR upon receipt of the image layer does not match the digest specified.
Members
InvalidLayerPartException
Description
The layer part size is not valid, or the first byte specified is not consecutive to the last byte of a previous layer part upload.
Members
- lastValidByteReceived
-
- Type: long (int|float)
The last valid byte received from the layer part upload that is associated with the exception.
- message
-
- Type: string
The error message associated with the exception.
- registryId
-
- Type: string
The registry ID associated with the exception.
- repositoryName
-
- Type: string
The repository name associated with the exception.
- uploadId
-
- Type: string
The upload ID associated with the exception.
InvalidParameterException
Description
The specified parameter is invalid. Review the available parameters for the API request.
Members
InvalidTagParameterException
Description
An invalid parameter has been specified. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
Members
KmsException
Description
The operation failed due to a KMS exception.
Members
Layer
Description
An object representing an Amazon ECR image layer.
Members
- layerAvailability
-
- Type: string
The availability status of the image layer.
- layerDigest
-
- Type: string
The
sha256
digest of the image layer. - layerSize
-
- Type: long (int|float)
The size, in bytes, of the image layer.
- mediaType
-
- Type: string
The media type of the layer, such as
application/vnd.docker.image.rootfs.diff.tar.gzip
orapplication/vnd.oci.image.layer.v1.tar+gzip
.
LayerAlreadyExistsException
Description
The image layer already exists in the associated repository.
Members
LayerFailure
Description
An object representing an Amazon ECR image layer failure.
Members
LayerInaccessibleException
Description
The specified layer is not available because it is not associated with an image. Unassociated image layers may be cleaned up at any time.
Members
LayerPartTooSmallException
Description
Layer parts must be at least 5 MiB in size.
Members
LayersNotFoundException
Description
The specified layers could not be found, or the specified layer is not valid for this repository.
Members
LifecyclePolicyNotFoundException
Description
The lifecycle policy could not be found, and no policy is set to the repository.
Members
LifecyclePolicyPreviewFilter
Description
The filter for the lifecycle policy preview.
Members
LifecyclePolicyPreviewInProgressException
Description
The previous lifecycle policy preview request has not completed. Wait and try again.
Members
LifecyclePolicyPreviewNotFoundException
LifecyclePolicyPreviewResult
Description
The result of the lifecycle policy preview.
Members
- action
-
- Type: LifecyclePolicyRuleAction structure
The type of action to be taken.
- appliedRulePriority
-
- Type: int
The priority of the applied rule.
- imageDigest
-
- Type: string
The
sha256
digest of the image manifest. - imagePushedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time, expressed in standard JavaScript date format, at which the current image was pushed to the repository.
- imageTags
-
- Type: Array of strings
The list of tags associated with this image.
LifecyclePolicyPreviewSummary
Description
The summary of the lifecycle policy preview request.
Members
LifecyclePolicyRuleAction
Description
The type of action to be taken.
Members
LimitExceededException
Description
The operation did not succeed because it would have exceeded a service limit for your account. For more information, see Amazon ECR Service Quotas in the Amazon Elastic Container Registry User Guide.
Members
ListImagesFilter
Description
An object representing a filter on a ListImages operation.
Members
- tagStatus
-
- Type: string
The tag status with which to filter your ListImages results. You can filter results based on whether they are
TAGGED
orUNTAGGED
.
ReferencedImagesNotFoundException
Description
The manifest list is referencing an image that does not exist.
Members
RegistryPolicyNotFoundException
ReplicationConfiguration
Description
The replication configuration for a registry.
Members
- rules
-
- Required: Yes
- Type: Array of ReplicationRule structures
An array of objects representing the replication rules for a replication configuration. A replication configuration may contain only one replication rule but the rule may contain one or more replication destinations.
ReplicationDestination
Description
An array of objects representing the details of a replication destination.
Members
ReplicationRule
Description
An array of objects representing the replication destinations for a replication configuration. A replication configuration may contain only one replication rule but the rule may contain one or more replication destinations.
Members
- destinations
-
- Required: Yes
- Type: Array of ReplicationDestination structures
An array of objects representing the details of a replication destination.
Repository
Description
An object representing a repository.
Members
- createdAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The date and time, in JavaScript date format, when the repository was created.
- encryptionConfiguration
-
- Type: EncryptionConfiguration structure
The encryption configuration for the repository. This determines how the contents of your repository are encrypted at rest.
- imageScanningConfiguration
-
- Type: ImageScanningConfiguration structure
The image scanning configuration for a repository.
- imageTagMutability
-
- Type: string
The tag mutability setting for the repository.
- registryId
-
- Type: string
The AWS account ID associated with the registry that contains the repository.
- repositoryArn
-
- Type: string
The Amazon Resource Name (ARN) that identifies the repository. The ARN contains the
arn:aws:ecr
namespace, followed by the region of the repository, AWS account ID of the repository owner, repository namespace, and repository name. For example,arn:aws:ecr:region:012345678910:repository/test
. - repositoryName
-
- Type: string
The name of the repository.
- repositoryUri
-
- Type: string
The URI for the repository. You can use this URI for container image
push
andpull
operations.
RepositoryAlreadyExistsException
Description
The specified repository already exists in the specified registry.
Members
RepositoryNotEmptyException
Description
The specified repository contains images. To delete a repository that contains images, you must force the deletion with the force
parameter.
Members
RepositoryNotFoundException
Description
The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.
Members
RepositoryPolicyNotFoundException
Description
The specified repository and registry combination does not have an associated repository policy.
Members
ScanNotFoundException
Description
The specified image scan could not be found. Ensure that image scanning is enabled on the repository and try again.
Members
ServerException
Description
These errors are usually caused by a server-side issue.
Members
Tag
Description
The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
Members
TooManyTagsException
Description
The list of tags on the repository is over the limit. The maximum number of tags that can be applied to a repository is 50.
Members
UnsupportedImageTypeException
UploadNotFoundException
Description
The upload could not be found, or the specified upload ID is not valid for this repository.