All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.ecr.AmazonECR Maven / Gradle / Ivy

Go to download

The AWS Java SDK for the Amazon EC2 Container Registry holds the client classes that are used for communicating with the Amazon EC2 Container Registry Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.ecr;

import javax.annotation.Generated;

import com.amazonaws.*;
import com.amazonaws.regions.*;

import com.amazonaws.services.ecr.model.*;
import com.amazonaws.services.ecr.waiters.AmazonECRWaiters;

/**
 * Interface for accessing Amazon ECR.
 * 

* Note: Do not directly implement this interface, new methods are added to it regularly. Extend from * {@link com.amazonaws.services.ecr.AbstractAmazonECR} instead. *

*

* Amazon Elastic Container Registry *

* Amazon Elastic Container Registry (Amazon ECR) is a managed container image registry service. Customers can use the * familiar Docker CLI, or their preferred client, to push, pull, and manage images. Amazon ECR provides a secure, * scalable, and reliable registry for your Docker or Open Container Initiative (OCI) images. Amazon ECR supports * private repositories with resource-based permissions using IAM so that specific users or Amazon EC2 instances can * access repositories and images. *

*

* Amazon ECR has service endpoints in each supported Region. For more information, see Amazon ECR endpoints in the Amazon Web Services * General Reference. *

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public interface AmazonECR { /** * The region metadata service name for computing region endpoints. You can use this value to retrieve metadata * (such as supported regions) of the service. * * @see RegionUtils#getRegionsForService(String) */ String ENDPOINT_PREFIX = "api.ecr"; /** * Overrides the default endpoint for this client ("api.ecr.us-east-1.amazonaws.com"). Callers can use this method * to control which AWS region they want to work with. *

* Callers can pass in just the endpoint (ex: "api.ecr.us-east-1.amazonaws.com") or a full URL, including the * protocol (ex: "api.ecr.us-east-1.amazonaws.com"). If the protocol is not specified here, the default protocol * from this client's {@link 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: https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/java-dg-region-selection.html#region-selection- * choose-endpoint *

* 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. * * @param endpoint * The endpoint (ex: "api.ecr.us-east-1.amazonaws.com") or a full URL, including the protocol (ex: * "api.ecr.us-east-1.amazonaws.com") of the region specific AWS endpoint this client will communicate with. * @deprecated use {@link AwsClientBuilder#setEndpointConfiguration(AwsClientBuilder.EndpointConfiguration)} for * example: * {@code builder.setEndpointConfiguration(new EndpointConfiguration(endpoint, signingRegion));} */ @Deprecated void setEndpoint(String endpoint); /** * An alternative to {@link AmazonECR#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 * {@link 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. * * @param region * The region this client will communicate with. See {@link 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. * * @see Region#getRegion(com.amazonaws.regions.Regions) * @see Region#createClient(Class, com.amazonaws.auth.AWSCredentialsProvider, ClientConfiguration) * @see Region#isServiceSupported(String) * @deprecated use {@link AwsClientBuilder#setRegion(String)} */ @Deprecated void setRegion(Region region); /** *

* 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. *

*
* * @param batchCheckLayerAvailabilityRequest * @return Result of the BatchCheckLayerAvailability operation returned by the service. * @throws 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. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws ServerException * These errors are usually caused by a server-side issue. * @sample AmazonECR.BatchCheckLayerAvailability * @see AWS API Documentation */ BatchCheckLayerAvailabilityResult batchCheckLayerAvailability(BatchCheckLayerAvailabilityRequest batchCheckLayerAvailabilityRequest); /** *

* 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. *

* * @param batchDeleteImageRequest * Deletes specified images within a specified repository. Images are specified with either the * imageTag or imageDigest. * @return Result of the BatchDeleteImage operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @sample AmazonECR.BatchDeleteImage * @see AWS API * Documentation */ BatchDeleteImageResult batchDeleteImage(BatchDeleteImageRequest batchDeleteImageRequest); /** *

* 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. *

* * @param batchGetImageRequest * @return Result of the BatchGetImage operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @throws LimitExceededException * 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. * @throws UnableToGetUpstreamImageException * The image or images were unable to be pulled using the pull through cache rule. This is usually caused * because of an issue with the Secrets Manager secret containing the credentials for the upstream registry. * @sample AmazonECR.BatchGetImage * @see AWS API * Documentation */ BatchGetImageResult batchGetImage(BatchGetImageRequest batchGetImageRequest); /** *

* Gets the scanning configuration for one or more repositories. *

* * @param batchGetRepositoryScanningConfigurationRequest * @return Result of the BatchGetRepositoryScanningConfiguration operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @throws ValidationException * There was an exception validating this request. * @sample AmazonECR.BatchGetRepositoryScanningConfiguration * @see AWS API Documentation */ BatchGetRepositoryScanningConfigurationResult batchGetRepositoryScanningConfiguration( BatchGetRepositoryScanningConfigurationRequest batchGetRepositoryScanningConfigurationRequest); /** *

* 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. *

*
* * @param completeLayerUploadRequest * @return Result of the CompleteLayerUpload operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @throws UploadNotFoundException * The upload could not be found, or the specified upload ID is not valid for this repository. * @throws InvalidLayerException * The layer digest calculation performed by Amazon ECR upon receipt of the image layer does not match the * digest specified. * @throws LayerPartTooSmallException * Layer parts must be at least 5 MiB in size. * @throws LayerAlreadyExistsException * The image layer already exists in the associated repository. * @throws EmptyUploadException * The specified layer upload does not contain any layer parts. * @throws KmsException * The operation failed due to a KMS exception. * @sample AmazonECR.CompleteLayerUpload * @see AWS API * Documentation */ CompleteLayerUploadResult completeLayerUpload(CompleteLayerUploadRequest completeLayerUploadRequest); /** *

* Creates a pull through cache rule. A pull through cache rule provides a way to cache images from an upstream * registry source in your Amazon ECR private registry. For more information, see Using pull through cache * rules in the Amazon Elastic Container Registry User Guide. *

* * @param createPullThroughCacheRuleRequest * @return Result of the CreatePullThroughCacheRule operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws ValidationException * There was an exception validating this request. * @throws PullThroughCacheRuleAlreadyExistsException * A pull through cache rule with these settings already exists for the private registry. * @throws UnsupportedUpstreamRegistryException * The specified upstream registry isn't supported. * @throws LimitExceededException * 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. * @throws UnableToAccessSecretException * The secret is unable to be accessed. Verify the resource permissions for the secret and try again. * @throws SecretNotFoundException * The ARN of the secret specified in the pull through cache rule was not found. Update the pull through * cache rule with a valid secret ARN and try again. * @throws UnableToDecryptSecretValueException * The secret is accessible but is unable to be decrypted. Verify the resource permisisons and try again. * @sample AmazonECR.CreatePullThroughCacheRule * @see AWS * API Documentation */ CreatePullThroughCacheRuleResult createPullThroughCacheRule(CreatePullThroughCacheRuleRequest createPullThroughCacheRuleRequest); /** *

* Creates a repository. For more information, see Amazon ECR repositories in * the Amazon Elastic Container Registry User Guide. *

* * @param createRepositoryRequest * @return Result of the CreateRepository operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws InvalidTagParameterException * 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. * @throws TooManyTagsException * 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. * @throws RepositoryAlreadyExistsException * The specified repository already exists in the specified registry. * @throws LimitExceededException * 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. * @throws KmsException * The operation failed due to a KMS exception. * @sample AmazonECR.CreateRepository * @see AWS API * Documentation */ CreateRepositoryResult createRepository(CreateRepositoryRequest createRepositoryRequest); /** *

* Creates a repository creation template. This template is used to define the settings for repositories created by * Amazon ECR on your behalf. For example, repositories created through pull through cache actions. For more * information, see Private * repository creation templates in the Amazon Elastic Container Registry User Guide. *

* * @param createRepositoryCreationTemplateRequest * @return Result of the CreateRepositoryCreationTemplate operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws ValidationException * There was an exception validating this request. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws LimitExceededException * 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. * @throws TemplateAlreadyExistsException * The repository creation template already exists. Specify a unique prefix and try again. * @sample AmazonECR.CreateRepositoryCreationTemplate * @see AWS API Documentation */ CreateRepositoryCreationTemplateResult createRepositoryCreationTemplate(CreateRepositoryCreationTemplateRequest createRepositoryCreationTemplateRequest); /** *

* Deletes the lifecycle policy associated with the specified repository. *

* * @param deleteLifecyclePolicyRequest * @return Result of the DeleteLifecyclePolicy operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @throws LifecyclePolicyNotFoundException * The lifecycle policy could not be found, and no policy is set to the repository. * @throws ValidationException * There was an exception validating this request. * @sample AmazonECR.DeleteLifecyclePolicy * @see AWS API * Documentation */ DeleteLifecyclePolicyResult deleteLifecyclePolicy(DeleteLifecyclePolicyRequest deleteLifecyclePolicyRequest); /** *

* Deletes a pull through cache rule. *

* * @param deletePullThroughCacheRuleRequest * @return Result of the DeletePullThroughCacheRule operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws ValidationException * There was an exception validating this request. * @throws PullThroughCacheRuleNotFoundException * The pull through cache rule was not found. Specify a valid pull through cache rule and try again. * @sample AmazonECR.DeletePullThroughCacheRule * @see AWS * API Documentation */ DeletePullThroughCacheRuleResult deletePullThroughCacheRule(DeletePullThroughCacheRuleRequest deletePullThroughCacheRuleRequest); /** *

* Deletes the registry permissions policy. *

* * @param deleteRegistryPolicyRequest * @return Result of the DeleteRegistryPolicy operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws RegistryPolicyNotFoundException * The registry doesn't have an associated registry policy. * @throws ValidationException * There was an exception validating this request. * @sample AmazonECR.DeleteRegistryPolicy * @see AWS API * Documentation */ DeleteRegistryPolicyResult deleteRegistryPolicy(DeleteRegistryPolicyRequest deleteRegistryPolicyRequest); /** *

* Deletes a repository. If the repository isn't empty, you must either delete the contents of the repository or use * the force option to delete the repository and have Amazon ECR delete all of its contents on your * behalf. *

* * @param deleteRepositoryRequest * @return Result of the DeleteRepository operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @throws RepositoryNotEmptyException * The specified repository contains images. To delete a repository that contains images, you must force the * deletion with the force parameter. * @throws KmsException * The operation failed due to a KMS exception. * @sample AmazonECR.DeleteRepository * @see AWS API * Documentation */ DeleteRepositoryResult deleteRepository(DeleteRepositoryRequest deleteRepositoryRequest); /** *

* Deletes a repository creation template. *

* * @param deleteRepositoryCreationTemplateRequest * @return Result of the DeleteRepositoryCreationTemplate operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws ValidationException * There was an exception validating this request. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws TemplateNotFoundException * The specified repository creation template can't be found. Verify the registry ID and prefix and try * again. * @sample AmazonECR.DeleteRepositoryCreationTemplate * @see AWS API Documentation */ DeleteRepositoryCreationTemplateResult deleteRepositoryCreationTemplate(DeleteRepositoryCreationTemplateRequest deleteRepositoryCreationTemplateRequest); /** *

* Deletes the repository policy associated with the specified repository. *

* * @param deleteRepositoryPolicyRequest * @return Result of the DeleteRepositoryPolicy operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @throws RepositoryPolicyNotFoundException * The specified repository and registry combination does not have an associated repository policy. * @sample AmazonECR.DeleteRepositoryPolicy * @see AWS API * Documentation */ DeleteRepositoryPolicyResult deleteRepositoryPolicy(DeleteRepositoryPolicyRequest deleteRepositoryPolicyRequest); /** *

* Returns the replication status for a specified image. *

* * @param describeImageReplicationStatusRequest * @return Result of the DescribeImageReplicationStatus operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws ImageNotFoundException * The image requested does not exist in the specified repository. * @throws 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. * @throws ValidationException * There was an exception validating this request. * @sample AmazonECR.DescribeImageReplicationStatus * @see AWS API Documentation */ DescribeImageReplicationStatusResult describeImageReplicationStatus(DescribeImageReplicationStatusRequest describeImageReplicationStatusRequest); /** *

* Returns the scan findings for the specified image. *

* * @param describeImageScanFindingsRequest * @return Result of the DescribeImageScanFindings operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @throws ImageNotFoundException * The image requested does not exist in the specified repository. * @throws ScanNotFoundException * The specified image scan could not be found. Ensure that image scanning is enabled on the repository and * try again. * @throws ValidationException * There was an exception validating this request. * @sample AmazonECR.DescribeImageScanFindings * @see AWS * API Documentation */ DescribeImageScanFindingsResult describeImageScanFindings(DescribeImageScanFindingsRequest describeImageScanFindingsRequest); /** *

* 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. *

*
* * @param describeImagesRequest * @return Result of the DescribeImages operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @throws ImageNotFoundException * The image requested does not exist in the specified repository. * @sample AmazonECR.DescribeImages * @see AWS API * Documentation */ DescribeImagesResult describeImages(DescribeImagesRequest describeImagesRequest); /** *

* Returns the pull through cache rules for a registry. *

* * @param describePullThroughCacheRulesRequest * @return Result of the DescribePullThroughCacheRules operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws ValidationException * There was an exception validating this request. * @throws PullThroughCacheRuleNotFoundException * The pull through cache rule was not found. Specify a valid pull through cache rule and try again. * @sample AmazonECR.DescribePullThroughCacheRules * @see AWS API Documentation */ DescribePullThroughCacheRulesResult describePullThroughCacheRules(DescribePullThroughCacheRulesRequest describePullThroughCacheRulesRequest); /** *

* Describes the settings for a registry. The replication configuration for a repository can be created or updated * with the PutReplicationConfiguration API action. *

* * @param describeRegistryRequest * @return Result of the DescribeRegistry operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws ValidationException * There was an exception validating this request. * @sample AmazonECR.DescribeRegistry * @see AWS API * Documentation */ DescribeRegistryResult describeRegistry(DescribeRegistryRequest describeRegistryRequest); /** *

* Describes image repositories in a registry. *

* * @param describeRepositoriesRequest * @return Result of the DescribeRepositories operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @sample AmazonECR.DescribeRepositories * @see AWS API * Documentation */ DescribeRepositoriesResult describeRepositories(DescribeRepositoriesRequest describeRepositoriesRequest); /** *

* Returns details about the repository creation templates in a registry. The prefixes request * parameter can be used to return the details for a specific repository creation template. *

* * @param describeRepositoryCreationTemplatesRequest * @return Result of the DescribeRepositoryCreationTemplates operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws ValidationException * There was an exception validating this request. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @sample AmazonECR.DescribeRepositoryCreationTemplates * @see AWS API Documentation */ DescribeRepositoryCreationTemplatesResult describeRepositoryCreationTemplates( DescribeRepositoryCreationTemplatesRequest describeRepositoryCreationTemplatesRequest); /** *

* 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 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. *

* * @param getAuthorizationTokenRequest * @return Result of the GetAuthorizationToken operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @sample AmazonECR.GetAuthorizationToken * @see AWS API * Documentation */ GetAuthorizationTokenResult getAuthorizationToken(GetAuthorizationTokenRequest getAuthorizationTokenRequest); /** *

* 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. *

*
* * @param getDownloadUrlForLayerRequest * @return Result of the GetDownloadUrlForLayer operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws LayersNotFoundException * The specified layers could not be found, or the specified layer is not valid for this repository. * @throws 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. * @throws 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. * @throws UnableToGetUpstreamLayerException * There was an issue getting the upstream layer matching the pull through cache rule. * @sample AmazonECR.GetDownloadUrlForLayer * @see AWS API * Documentation */ GetDownloadUrlForLayerResult getDownloadUrlForLayer(GetDownloadUrlForLayerRequest getDownloadUrlForLayerRequest); /** *

* Retrieves the lifecycle policy for the specified repository. *

* * @param getLifecyclePolicyRequest * @return Result of the GetLifecyclePolicy operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @throws LifecyclePolicyNotFoundException * The lifecycle policy could not be found, and no policy is set to the repository. * @throws ValidationException * There was an exception validating this request. * @sample AmazonECR.GetLifecyclePolicy * @see AWS API * Documentation */ GetLifecyclePolicyResult getLifecyclePolicy(GetLifecyclePolicyRequest getLifecyclePolicyRequest); /** *

* Retrieves the results of the lifecycle policy preview request for the specified repository. *

* * @param getLifecyclePolicyPreviewRequest * @return Result of the GetLifecyclePolicyPreview operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @throws LifecyclePolicyPreviewNotFoundException * There is no dry run for this repository. * @throws ValidationException * There was an exception validating this request. * @sample AmazonECR.GetLifecyclePolicyPreview * @see AWS * API Documentation */ GetLifecyclePolicyPreviewResult getLifecyclePolicyPreview(GetLifecyclePolicyPreviewRequest getLifecyclePolicyPreviewRequest); /** *

* Retrieves the permissions policy for a registry. *

* * @param getRegistryPolicyRequest * @return Result of the GetRegistryPolicy operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws RegistryPolicyNotFoundException * The registry doesn't have an associated registry policy. * @throws ValidationException * There was an exception validating this request. * @sample AmazonECR.GetRegistryPolicy * @see AWS API * Documentation */ GetRegistryPolicyResult getRegistryPolicy(GetRegistryPolicyRequest getRegistryPolicyRequest); /** *

* Retrieves the scanning configuration for a registry. *

* * @param getRegistryScanningConfigurationRequest * @return Result of the GetRegistryScanningConfiguration operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws ValidationException * There was an exception validating this request. * @sample AmazonECR.GetRegistryScanningConfiguration * @see AWS API Documentation */ GetRegistryScanningConfigurationResult getRegistryScanningConfiguration(GetRegistryScanningConfigurationRequest getRegistryScanningConfigurationRequest); /** *

* Retrieves the repository policy for the specified repository. *

* * @param getRepositoryPolicyRequest * @return Result of the GetRepositoryPolicy operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @throws RepositoryPolicyNotFoundException * The specified repository and registry combination does not have an associated repository policy. * @sample AmazonECR.GetRepositoryPolicy * @see AWS API * Documentation */ GetRepositoryPolicyResult getRepositoryPolicy(GetRepositoryPolicyRequest getRepositoryPolicyRequest); /** *

* 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. *

*
* * @param initiateLayerUploadRequest * @return Result of the InitiateLayerUpload operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @throws KmsException * The operation failed due to a KMS exception. * @sample AmazonECR.InitiateLayerUpload * @see AWS API * Documentation */ InitiateLayerUploadResult initiateLayerUpload(InitiateLayerUploadRequest initiateLayerUploadRequest); /** *

* 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. *

* * @param listImagesRequest * @return Result of the ListImages operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @sample AmazonECR.ListImages * @see AWS API * Documentation */ ListImagesResult listImages(ListImagesRequest listImagesRequest); /** *

* List the tags for an Amazon ECR resource. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @throws ServerException * These errors are usually caused by a server-side issue. * @sample AmazonECR.ListTagsForResource * @see AWS API * Documentation */ ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest); /** *

* 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. *

*
* * @param putImageRequest * @return Result of the PutImage operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @throws ImageAlreadyExistsException * The specified image has already been pushed, and there were no changes to the manifest or image tag after * the last push. * @throws LayersNotFoundException * The specified layers could not be found, or the specified layer is not valid for this repository. * @throws ReferencedImagesNotFoundException * The manifest list is referencing an image that does not exist. * @throws LimitExceededException * 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. * @throws ImageTagAlreadyExistsException * The specified image is tagged with a tag that already exists. The repository is configured for tag * immutability. * @throws ImageDigestDoesNotMatchException * The specified image digest does not match the digest that Amazon ECR calculated for the image. * @throws KmsException * The operation failed due to a KMS exception. * @sample AmazonECR.PutImage * @see AWS API * Documentation */ PutImageResult putImage(PutImageRequest putImageRequest); /** * *

* The PutImageScanningConfiguration API is being deprecated, in favor of specifying the image scanning * configuration at the registry level. For more information, see PutRegistryScanningConfiguration. *

*
*

* Updates the image scanning configuration for the specified repository. *

* * @param putImageScanningConfigurationRequest * @return Result of the PutImageScanningConfiguration operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @throws ValidationException * There was an exception validating this request. * @sample AmazonECR.PutImageScanningConfiguration * @see AWS API Documentation */ PutImageScanningConfigurationResult putImageScanningConfiguration(PutImageScanningConfigurationRequest putImageScanningConfigurationRequest); /** *

* 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. *

* * @param putImageTagMutabilityRequest * @return Result of the PutImageTagMutability operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @sample AmazonECR.PutImageTagMutability * @see AWS API * Documentation */ PutImageTagMutabilityResult putImageTagMutability(PutImageTagMutabilityRequest putImageTagMutabilityRequest); /** *

* Creates or updates the lifecycle policy for the specified repository. For more information, see Lifecycle policy * template. *

* * @param putLifecyclePolicyRequest * @return Result of the PutLifecyclePolicy operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @throws ValidationException * There was an exception validating this request. * @sample AmazonECR.PutLifecyclePolicy * @see AWS API * Documentation */ PutLifecyclePolicyResult putLifecyclePolicy(PutLifecyclePolicyRequest putLifecyclePolicyRequest); /** *

* Creates or updates the permissions policy for your registry. *

*

* A registry policy is used to specify permissions for another Amazon Web Services account and is used when * configuring cross-account replication. For more information, see Registry permissions * in the Amazon Elastic Container Registry User Guide. *

* * @param putRegistryPolicyRequest * @return Result of the PutRegistryPolicy operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws ValidationException * There was an exception validating this request. * @sample AmazonECR.PutRegistryPolicy * @see AWS API * Documentation */ PutRegistryPolicyResult putRegistryPolicy(PutRegistryPolicyRequest putRegistryPolicyRequest); /** *

* Creates or updates the scanning configuration for your private registry. *

* * @param putRegistryScanningConfigurationRequest * @return Result of the PutRegistryScanningConfiguration operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws ValidationException * There was an exception validating this request. * @sample AmazonECR.PutRegistryScanningConfiguration * @see AWS API Documentation */ PutRegistryScanningConfigurationResult putRegistryScanningConfiguration(PutRegistryScanningConfigurationRequest putRegistryScanningConfigurationRequest); /** *

* 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. For more * information on the custom role for replication, see Creating an IAM role for replication. *

* *

* 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. *

*
* * @param putReplicationConfigurationRequest * @return Result of the PutReplicationConfiguration operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws ValidationException * There was an exception validating this request. * @sample AmazonECR.PutReplicationConfiguration * @see AWS API Documentation */ PutReplicationConfigurationResult putReplicationConfiguration(PutReplicationConfigurationRequest putReplicationConfigurationRequest); /** *

* 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. *

* * @param setRepositoryPolicyRequest * @return Result of the SetRepositoryPolicy operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @sample AmazonECR.SetRepositoryPolicy * @see AWS API * Documentation */ SetRepositoryPolicyResult setRepositoryPolicy(SetRepositoryPolicyRequest setRepositoryPolicyRequest); /** *

* Starts an image vulnerability scan. An image scan can only be started once per 24 hours 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. *

* * @param startImageScanRequest * @return Result of the StartImageScan operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws UnsupportedImageTypeException * The image is of a type that cannot be scanned. * @throws LimitExceededException * 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. * @throws 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. * @throws ImageNotFoundException * The image requested does not exist in the specified repository. * @throws ValidationException * There was an exception validating this request. * @sample AmazonECR.StartImageScan * @see AWS API * Documentation */ StartImageScanResult startImageScan(StartImageScanRequest startImageScanRequest); /** *

* 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. *

* * @param startLifecyclePolicyPreviewRequest * @return Result of the StartLifecyclePolicyPreview operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @throws LifecyclePolicyNotFoundException * The lifecycle policy could not be found, and no policy is set to the repository. * @throws LifecyclePolicyPreviewInProgressException * The previous lifecycle policy preview request has not completed. Wait and try again. * @throws ValidationException * There was an exception validating this request. * @sample AmazonECR.StartLifecyclePolicyPreview * @see AWS API Documentation */ StartLifecyclePolicyPreviewResult startLifecyclePolicyPreview(StartLifecyclePolicyPreviewRequest startLifecyclePolicyPreviewRequest); /** *

* 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. *

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws InvalidTagParameterException * 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. * @throws TooManyTagsException * 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. * @throws 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. * @throws ServerException * These errors are usually caused by a server-side issue. * @sample AmazonECR.TagResource * @see AWS API * Documentation */ TagResourceResult tagResource(TagResourceRequest tagResourceRequest); /** *

* Deletes specified tags from a resource. *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws InvalidTagParameterException * 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. * @throws TooManyTagsException * 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. * @throws 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. * @throws ServerException * These errors are usually caused by a server-side issue. * @sample AmazonECR.UntagResource * @see AWS API * Documentation */ UntagResourceResult untagResource(UntagResourceRequest untagResourceRequest); /** *

* Updates an existing pull through cache rule. *

* * @param updatePullThroughCacheRuleRequest * @return Result of the UpdatePullThroughCacheRule operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws ValidationException * There was an exception validating this request. * @throws UnableToAccessSecretException * The secret is unable to be accessed. Verify the resource permissions for the secret and try again. * @throws PullThroughCacheRuleNotFoundException * The pull through cache rule was not found. Specify a valid pull through cache rule and try again. * @throws SecretNotFoundException * The ARN of the secret specified in the pull through cache rule was not found. Update the pull through * cache rule with a valid secret ARN and try again. * @throws UnableToDecryptSecretValueException * The secret is accessible but is unable to be decrypted. Verify the resource permisisons and try again. * @sample AmazonECR.UpdatePullThroughCacheRule * @see AWS * API Documentation */ UpdatePullThroughCacheRuleResult updatePullThroughCacheRule(UpdatePullThroughCacheRuleRequest updatePullThroughCacheRuleRequest); /** *

* Updates an existing repository creation template. *

* * @param updateRepositoryCreationTemplateRequest * @return Result of the UpdateRepositoryCreationTemplate operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws ValidationException * There was an exception validating this request. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws TemplateNotFoundException * The specified repository creation template can't be found. Verify the registry ID and prefix and try * again. * @sample AmazonECR.UpdateRepositoryCreationTemplate * @see AWS API Documentation */ UpdateRepositoryCreationTemplateResult updateRepositoryCreationTemplate(UpdateRepositoryCreationTemplateRequest updateRepositoryCreationTemplateRequest); /** *

* 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. *

*
* * @param uploadLayerPartRequest * @return Result of the UploadLayerPart operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws 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. * @throws 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. * @throws UploadNotFoundException * The upload could not be found, or the specified upload ID is not valid for this repository. * @throws LimitExceededException * 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. * @throws KmsException * The operation failed due to a KMS exception. * @sample AmazonECR.UploadLayerPart * @see AWS API * Documentation */ UploadLayerPartResult uploadLayerPart(UploadLayerPartRequest uploadLayerPartRequest); /** *

* Validates an existing pull through cache rule for an upstream registry that requires authentication. This will * retrieve the contents of the Amazon Web Services Secrets Manager secret, verify the syntax, and then validate * that authentication to the upstream registry is successful. *

* * @param validatePullThroughCacheRuleRequest * @return Result of the ValidatePullThroughCacheRule operation returned by the service. * @throws ServerException * These errors are usually caused by a server-side issue. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws ValidationException * There was an exception validating this request. * @throws PullThroughCacheRuleNotFoundException * The pull through cache rule was not found. Specify a valid pull through cache rule and try again. * @sample AmazonECR.ValidatePullThroughCacheRule * @see AWS API Documentation */ ValidatePullThroughCacheRuleResult validatePullThroughCacheRule(ValidatePullThroughCacheRuleRequest validatePullThroughCacheRuleRequest); /** * Shuts down this client object, releasing any resources that might be held open. This is an optional method, and * callers are not expected to call it, but can if they want to explicitly release any open resources. Once a client * has been shutdown, it should not be used to make any more requests. */ void shutdown(); /** * Returns additional metadata for a previously executed successful request, typically used for debugging issues * where a service isn't acting as expected. This data isn't considered part of the result data returned by an * operation, so it's available through this separate, diagnostic interface. *

* 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. * * @param request * The originally executed request. * * @return The response metadata for the specified request, or null if none is available. */ ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request); AmazonECRWaiters waiters(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy