AWS.ECRPUBLIC — AWS SDK for JavaScript (original) (raw)

We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.ECRPUBLIC

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Amazon Elastic Container Registry Public (Amazon ECR Public) is a managed container image registry service. Amazon ECR provides both public and private registries to host your container images. You can use the Docker CLI or your 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 public repositories with this API. For information about the Amazon ECR API for private repositories, see Amazon Elastic Container Registry API Reference.

Sending a Request Using ECRPUBLIC

var ecrpublic = new AWS.ECRPUBLIC();
ecrpublic.batchCheckLayerAvailability(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the ECRPUBLIC object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var ecrpublic = new AWS.ECRPUBLIC({apiVersion: '2020-10-30'});

You can also set the API version globally in AWS.config.apiVersions using the ecrpublic service identifier:

AWS.config.apiVersions = {
  ecrpublic: '2020-10-30',
  // other service API versions
};

var ecrpublic = new AWS.ECRPUBLIC();

Constructor Summarycollapse

Property Summarycollapse

Properties inherited from AWS.Service

apiVersions

Method Summarycollapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.ECRPUBLIC(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Property Details

endpointAWS.Endpoint

Returns an Endpoint object representing the endpoint URL for service requests.

Method Details

batchCheckLayerAvailability(params = {}, callback) ⇒ AWS.Request

Checks the availability of one or more image layers that are within a repository in a public registry. 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.

Note: 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.

batchDeleteImage(params = {}, callback) ⇒ AWS.Request

Deletes a list of specified images that are within a repository in a public registry. 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 digest of the image in your request.

completeLayerUpload(params = {}, callback) ⇒ AWS.Request

Informs Amazon ECR that the image layer upload is complete for a specified public 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 for each new image layer to verify that the upload is complete.

Note: 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.

createRepository(params = {}, callback) ⇒ AWS.Request

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

deleteRepository(params = {}, callback) ⇒ AWS.Request

Deletes a repository in a public registry. If the repository contains images, you must either manually delete all images in the repository or use the force option. This option deletes all images on your behalf before deleting the repository.

deleteRepositoryPolicy(params = {}, callback) ⇒ AWS.Request

Deletes the repository policy that's associated with the specified repository.

describeImages(params = {}, callback) ⇒ AWS.Request

Returns metadata that's related to the images in a repository in a public registry.

Note: 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. Therefore, it might return a larger image size than the image sizes that are returned by DescribeImages.

describeImageTags(params = {}, callback) ⇒ AWS.Request

Returns the image tag details for a repository in a public registry.

describeRegistries(params = {}, callback) ⇒ AWS.Request

Returns details for a public registry.

describeRepositories(params = {}, callback) ⇒ AWS.Request

Describes repositories that are in a public registry.

Retrieves an authorization token. An authorization token represents your IAM authentication credentials. You can use it to access any Amazon ECR registry that your IAM principal has access to. The authorization token is valid for 12 hours. This API requires the ecr-public:GetAuthorizationToken and sts:GetServiceBearerToken permissions.

getRegistryCatalogData(params = {}, callback) ⇒ AWS.Request

Retrieves catalog metadata for a public registry.

getRepositoryCatalogData(params = {}, callback) ⇒ AWS.Request

Retrieve catalog metadata for a repository in a public registry. This metadata is displayed publicly in the Amazon ECR Public Gallery.

getRepositoryPolicy(params = {}, callback) ⇒ AWS.Request

Retrieves the repository policy for the specified repository.

initiateLayerUpload(params = {}, callback) ⇒ AWS.Request

Notifies Amazon ECR that you intend to upload an image layer.

When an image is pushed, the InitiateLayerUpload API is called once for each image layer that hasn't already been uploaded. Whether an image layer uploads is determined by the BatchCheckLayerAvailability API action.

Note: 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.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

List the tags for an Amazon ECR Public resource.

putImage(params = {}, callback) ⇒ AWS.Request

Creates or updates the image manifest and tags that are 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 that are associated with the image.

Note: 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.

putRegistryCatalogData(params = {}, callback) ⇒ AWS.Request

Create or update the catalog data for a public registry.

putRepositoryCatalogData(params = {}, callback) ⇒ AWS.Request

Creates or updates the catalog data for a repository in a public registry.

setRepositoryPolicy(params = {}, callback) ⇒ AWS.Request

Applies a repository policy to the specified public repository to control access permissions. For more information, see Amazon ECR Repository Policies in the Amazon Elastic Container Registry User Guide.

tagResource(params = {}, callback) ⇒ AWS.Request

Associates the specified tags to a resource with the specified resourceArn. If existing tags on a resource aren't specified in the request parameters, they aren't changed. When a resource is deleted, the tags associated with that resource are also deleted.

untagResource(params = {}, callback) ⇒ AWS.Request

Deletes specified tags from a resource.

uploadLayerPart(params = {}, callback) ⇒ AWS.Request

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 (about 20MB). The UploadLayerPart API is called once for each new image layer part.

Note: 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.