@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public interface AmazonECR
Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
AbstractAmazonECR
instead.
Amazon EC2 Container Registry (Amazon ECR) is a managed Docker registry service. Customers can use the familiar Docker CLI to push, pull, and manage images. Amazon ECR provides a secure, scalable, and reliable registry. Amazon ECR supports private Docker repositories with resource-based permissions using IAM so that specific users or Amazon EC2 instances can access repositories and images. Developers can use the Docker CLI to author and manage images.
Modifier and Type | Field and Description |
---|---|
static String |
ENDPOINT_PREFIX
The region metadata service name for computing region endpoints.
|
Modifier and Type | Method and Description |
---|---|
BatchCheckLayerAvailabilityResult |
batchCheckLayerAvailability(BatchCheckLayerAvailabilityRequest batchCheckLayerAvailabilityRequest)
Check the availability of multiple image layers in a specified registry and repository.
|
BatchDeleteImageResult |
batchDeleteImage(BatchDeleteImageRequest batchDeleteImageRequest)
Deletes a list of specified images within a specified repository.
|
BatchGetImageResult |
batchGetImage(BatchGetImageRequest batchGetImageRequest)
Gets detailed information for specified images within a specified repository.
|
CompleteLayerUploadResult |
completeLayerUpload(CompleteLayerUploadRequest completeLayerUploadRequest)
Informs Amazon ECR that the image layer upload has completed for a specified registry, repository name, and
upload ID.
|
CreateRepositoryResult |
createRepository(CreateRepositoryRequest createRepositoryRequest)
Creates an image repository.
|
DeleteLifecyclePolicyResult |
deleteLifecyclePolicy(DeleteLifecyclePolicyRequest deleteLifecyclePolicyRequest)
Deletes the specified lifecycle policy.
|
DeleteRepositoryResult |
deleteRepository(DeleteRepositoryRequest deleteRepositoryRequest)
Deletes an existing image repository.
|
DeleteRepositoryPolicyResult |
deleteRepositoryPolicy(DeleteRepositoryPolicyRequest deleteRepositoryPolicyRequest)
Deletes the repository policy from a specified repository.
|
DescribeImagesResult |
describeImages(DescribeImagesRequest describeImagesRequest)
Returns metadata about the images in a repository, including image size, image tags, and creation date.
|
DescribeRepositoriesResult |
describeRepositories(DescribeRepositoriesRequest describeRepositoriesRequest)
Describes image repositories in a registry.
|
GetAuthorizationTokenResult |
getAuthorizationToken(GetAuthorizationTokenRequest getAuthorizationTokenRequest)
Retrieves a token that is valid for a specified registry for 12 hours.
|
ResponseMetadata |
getCachedResponseMetadata(AmazonWebServiceRequest request)
Returns additional metadata for a previously executed successful request, typically used for debugging issues
where a service isn't acting as expected.
|
GetDownloadUrlForLayerResult |
getDownloadUrlForLayer(GetDownloadUrlForLayerRequest getDownloadUrlForLayerRequest)
Retrieves the pre-signed Amazon S3 download URL corresponding to an image layer.
|
GetLifecyclePolicyResult |
getLifecyclePolicy(GetLifecyclePolicyRequest getLifecyclePolicyRequest)
Retrieves the specified lifecycle policy.
|
GetLifecyclePolicyPreviewResult |
getLifecyclePolicyPreview(GetLifecyclePolicyPreviewRequest getLifecyclePolicyPreviewRequest)
Retrieves the results of the specified lifecycle policy preview request.
|
GetRepositoryPolicyResult |
getRepositoryPolicy(GetRepositoryPolicyRequest getRepositoryPolicyRequest)
Retrieves the repository policy for a specified repository.
|
InitiateLayerUploadResult |
initiateLayerUpload(InitiateLayerUploadRequest initiateLayerUploadRequest)
Notify Amazon ECR that you intend to upload an image layer.
|
ListImagesResult |
listImages(ListImagesRequest listImagesRequest)
Lists all the image IDs for a given repository.
|
PutImageResult |
putImage(PutImageRequest putImageRequest)
Creates or updates the image manifest and tags associated with an image.
|
PutLifecyclePolicyResult |
putLifecyclePolicy(PutLifecyclePolicyRequest putLifecyclePolicyRequest)
Creates or updates a lifecycle policy.
|
void |
setEndpoint(String endpoint)
Deprecated.
use
AwsClientBuilder#setEndpointConfiguration(AwsClientBuilder.EndpointConfiguration) for
example:
builder.setEndpointConfiguration(new EndpointConfiguration(endpoint, signingRegion)); |
void |
setRegion(Region region)
Deprecated.
use
AwsClientBuilder#setRegion(String) |
SetRepositoryPolicyResult |
setRepositoryPolicy(SetRepositoryPolicyRequest setRepositoryPolicyRequest)
Applies a repository policy on a specified repository to control access permissions.
|
void |
shutdown()
Shuts down this client object, releasing any resources that might be held open.
|
StartLifecyclePolicyPreviewResult |
startLifecyclePolicyPreview(StartLifecyclePolicyPreviewRequest startLifecyclePolicyPreviewRequest)
Starts a preview of the specified lifecycle policy.
|
UploadLayerPartResult |
uploadLayerPart(UploadLayerPartRequest uploadLayerPartRequest)
Uploads an image layer part to Amazon ECR.
|
static final String ENDPOINT_PREFIX
@Deprecated void setEndpoint(String endpoint)
AwsClientBuilder#setEndpointConfiguration(AwsClientBuilder.EndpointConfiguration)
for
example:
builder.setEndpointConfiguration(new EndpointConfiguration(endpoint, signingRegion));
Callers can pass in just the endpoint (ex: "ecr.us-east-1.amazonaws.com") or a full URL, including the protocol
(ex: "ecr.us-east-1.amazonaws.com"). If the protocol is not specified here, the default protocol from this
client's ClientConfiguration
will be used, which by default is HTTPS.
For more information on using AWS regions with the AWS SDK for Java, and a complete list of all available endpoints for all AWS services, see: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=3912
This method is not threadsafe. An endpoint should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit or retrying.
endpoint
- The endpoint (ex: "ecr.us-east-1.amazonaws.com") or a full URL, including the protocol (ex:
"ecr.us-east-1.amazonaws.com") of the region specific AWS endpoint this client will communicate with.@Deprecated void setRegion(Region region)
AwsClientBuilder#setRegion(String)
setEndpoint(String)
, sets the regional endpoint for this client's service
calls. Callers can use this method to control which AWS region they want to work with.
By default, all service endpoints in all regions use the https protocol. To use http instead, specify it in the
ClientConfiguration
supplied at construction.
This method is not threadsafe. A region should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit or retrying.
region
- The region this client will communicate with. See Region.getRegion(com.amazonaws.regions.Regions)
for accessing a given region. Must not be null and must be a region where the service is available.Region.getRegion(com.amazonaws.regions.Regions)
,
Region.createClient(Class, com.amazonaws.auth.AWSCredentialsProvider, ClientConfiguration)
,
Region.isServiceSupported(String)
BatchCheckLayerAvailabilityResult batchCheckLayerAvailability(BatchCheckLayerAvailabilityRequest batchCheckLayerAvailabilityRequest)
Check the availability of multiple image layers in a specified registry and repository.
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling
and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
batchCheckLayerAvailabilityRequest
- RepositoryNotFoundException
- 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.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.ServerException
- These errors are usually caused by a server-side issue.BatchDeleteImageResult batchDeleteImage(BatchDeleteImageRequest batchDeleteImageRequest)
Deletes a list of specified images within a specified repository. Images are specified with either
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.
batchDeleteImageRequest
- Deletes specified images within a specified repository. Images are specified with either the
imageTag
or imageDigest
.ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.RepositoryNotFoundException
- 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.BatchGetImageResult batchGetImage(BatchGetImageRequest batchGetImageRequest)
Gets detailed information for specified images within a specified repository. Images are specified with either
imageTag
or imageDigest
.
batchGetImageRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.RepositoryNotFoundException
- 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.CompleteLayerUploadResult completeLayerUpload(CompleteLayerUploadRequest completeLayerUploadRequest)
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.
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling
and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
completeLayerUploadRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.RepositoryNotFoundException
- 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.UploadNotFoundException
- The upload could not be found, or the specified upload id is not valid for this repository.InvalidLayerException
- The layer digest calculation performed by Amazon ECR upon receipt of the image layer does not match the
digest specified.LayerPartTooSmallException
- Layer parts must be at least 5 MiB in size.LayerAlreadyExistsException
- The image layer already exists in the associated repository.EmptyUploadException
- The specified layer upload does not contain any layer parts.CreateRepositoryResult createRepository(CreateRepositoryRequest createRepositoryRequest)
Creates an image repository.
createRepositoryRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.RepositoryAlreadyExistsException
- The specified repository already exists in the specified registry.LimitExceededException
- The operation did not succeed because it would have exceeded a service limit for your account. For more
information, see Amazon ECR Default
Service Limits in the Amazon EC2 Container Registry User Guide.DeleteLifecyclePolicyResult deleteLifecyclePolicy(DeleteLifecyclePolicyRequest deleteLifecyclePolicyRequest)
Deletes the specified lifecycle policy.
deleteLifecyclePolicyRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.RepositoryNotFoundException
- 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.DeleteRepositoryResult deleteRepository(DeleteRepositoryRequest deleteRepositoryRequest)
Deletes an existing image repository. If a repository contains images, you must use the force
option
to delete it.
deleteRepositoryRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.RepositoryNotFoundException
- 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.RepositoryNotEmptyException
- The specified repository contains images. To delete a repository that contains images, you must force the
deletion with the force
parameter.DeleteRepositoryPolicyResult deleteRepositoryPolicy(DeleteRepositoryPolicyRequest deleteRepositoryPolicyRequest)
Deletes the repository policy from a specified repository.
deleteRepositoryPolicyRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.RepositoryNotFoundException
- 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.DescribeImagesResult describeImages(DescribeImagesRequest describeImagesRequest)
Returns metadata about the images in a repository, including image size, image tags, and creation date.
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.
describeImagesRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.RepositoryNotFoundException
- 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.ImageNotFoundException
- The image requested does not exist in the specified repository.DescribeRepositoriesResult describeRepositories(DescribeRepositoriesRequest describeRepositoriesRequest)
Describes image repositories in a registry.
describeRepositoriesRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.RepositoryNotFoundException
- 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.GetAuthorizationTokenResult getAuthorizationToken(GetAuthorizationTokenRequest getAuthorizationTokenRequest)
Retrieves a token that is valid for a specified registry for 12 hours. This command allows you to use the
docker
CLI to push and pull images with Amazon ECR. If you do not specify a registry, the default
registry is assumed.
The authorizationToken
returned for each registry specified 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
aws ecr get-login
command that simplifies the login process.
getAuthorizationTokenRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.GetDownloadUrlForLayerResult getDownloadUrlForLayer(GetDownloadUrlForLayerRequest getDownloadUrlForLayerRequest)
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.
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling
and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
getDownloadUrlForLayerRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.LayersNotFoundException
- The specified layers could not be found, or the specified layer is not valid for this repository.LayerInaccessibleException
- The specified layer is not available because it is not associated with an image. Unassociated image
layers may be cleaned up at any time.RepositoryNotFoundException
- 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.GetLifecyclePolicyResult getLifecyclePolicy(GetLifecyclePolicyRequest getLifecyclePolicyRequest)
Retrieves the specified lifecycle policy.
getLifecyclePolicyRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.RepositoryNotFoundException
- 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.GetLifecyclePolicyPreviewResult getLifecyclePolicyPreview(GetLifecyclePolicyPreviewRequest getLifecyclePolicyPreviewRequest)
Retrieves the results of the specified lifecycle policy preview request.
getLifecyclePolicyPreviewRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.RepositoryNotFoundException
- 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.GetRepositoryPolicyResult getRepositoryPolicy(GetRepositoryPolicyRequest getRepositoryPolicyRequest)
Retrieves the repository policy for a specified repository.
getRepositoryPolicyRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.RepositoryNotFoundException
- 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.InitiateLayerUploadResult initiateLayerUpload(InitiateLayerUploadRequest initiateLayerUploadRequest)
Notify Amazon ECR that you intend to upload an image layer.
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling
and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
initiateLayerUploadRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.RepositoryNotFoundException
- 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.ListImagesResult listImages(ListImagesRequest listImagesRequest)
Lists all the image IDs for a given repository.
You can filter images based on whether or not they are tagged by setting the tagStatus
parameter to
TAGGED
or UNTAGGED
. 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.
listImagesRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.RepositoryNotFoundException
- 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.PutImageResult putImage(PutImageRequest putImageRequest)
Creates or updates the image manifest and tags associated with an image.
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling
and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
putImageRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.RepositoryNotFoundException
- 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.ImageAlreadyExistsException
- The specified image has already been pushed, and there were no changes to the manifest or image tag after
the last push.LayersNotFoundException
- The specified layers could not be found, or the specified layer is not valid for this repository.LimitExceededException
- The operation did not succeed because it would have exceeded a service limit for your account. For more
information, see Amazon ECR Default
Service Limits in the Amazon EC2 Container Registry User Guide.PutLifecyclePolicyResult putLifecyclePolicy(PutLifecyclePolicyRequest putLifecyclePolicyRequest)
Creates or updates a lifecycle policy.
putLifecyclePolicyRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.RepositoryNotFoundException
- 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.SetRepositoryPolicyResult setRepositoryPolicy(SetRepositoryPolicyRequest setRepositoryPolicyRequest)
Applies a repository policy on a specified repository to control access permissions.
setRepositoryPolicyRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.RepositoryNotFoundException
- 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.StartLifecyclePolicyPreviewResult startLifecyclePolicyPreview(StartLifecyclePolicyPreviewRequest startLifecyclePolicyPreviewRequest)
Starts a preview of the specified lifecycle policy. This allows you to see the results before creating the lifecycle policy.
startLifecyclePolicyPreviewRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.RepositoryNotFoundException
- 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. Please try again later.UploadLayerPartResult uploadLayerPart(UploadLayerPartRequest uploadLayerPartRequest)
Uploads an image layer part to Amazon ECR.
This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling
and pushing images. In most cases, you should use the docker
CLI to pull, tag, and push images.
uploadLayerPartRequest
- ServerException
- These errors are usually caused by a server-side issue.InvalidParameterException
- The specified parameter is invalid. Review the available parameters for the API request.InvalidLayerPartException
- 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.RepositoryNotFoundException
- 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.UploadNotFoundException
- The upload could not be found, or the specified upload id is not valid for this repository.LimitExceededException
- The operation did not succeed because it would have exceeded a service limit for your account. For more
information, see Amazon ECR Default
Service Limits in the Amazon EC2 Container Registry User Guide.void shutdown()
ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing a request.
request
- The originally executed request.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.