You are viewing the documentation for an older major version of the AWS SDK for JavaScript.
The modular AWS SDK for JavaScript (v3), the latest major version of AWS SDK for JavaScript, is now stable and recommended for general use. For more information, see the Migration Guide and API Reference.

Class: AWS.ECRPUBLIC

Inherits:
AWS.Service show all
Identifier:
ecrpublic
API Version:
2020-10-30
Defined in:
(unknown)

Overview

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

Service Description

Amazon Elastic Container Registry (Amazon ECR) is a managed container image registry service. Amazon ECR provides both public and private registries to host your container images. You 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 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();

Version:

  • 2020-10-30

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

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.

Examples:

Constructing a ECRPUBLIC object

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

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.ECRPUBLIC.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.ECRPUBLIC.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.ECRPUBLIC.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

Property Details

endpointAWS.Endpoint (readwrite)

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

Returns:

  • (AWS.Endpoint)

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

Service Reference:

Examples:

Calling the batchCheckLayerAvailability operation

var params = {
  layerDigests: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  repositoryName: 'STRING_VALUE', /* required */
  registryId: 'STRING_VALUE'
};
ecrpublic.batchCheckLayerAvailability(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • registryId — (String)

      The AWS account ID associated with the public registry that contains the image layers to check. If you do not specify a registry, the default public registry is assumed.

    • repositoryName — (String)

      The name of the repository that is associated with the image layers to check.

    • layerDigests — (Array<String>)

      The digests of the image layers to check.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • layers — (Array<map>)

        A list of image layer objects corresponding to the image layer references in the request.

        • layerDigest — (String)

          The sha256 digest of the image layer.

        • layerAvailability — (String)

          The availability status of the image layer.

          Possible values include:
          • "AVAILABLE"
          • "UNAVAILABLE"
        • layerSize — (Integer)

          The size, in bytes, of the image layer.

        • mediaType — (String)

          The media type of the layer, such as application/vnd.docker.image.rootfs.diff.tar.gzip or application/vnd.oci.image.layer.v1.tar+gzip.

      • failures — (Array<map>)

        Any failures associated with the call.

        • layerDigest — (String)

          The layer digest associated with the failure.

        • failureCode — (String)

          The failure code associated with the failure.

          Possible values include:
          • "InvalidLayerDigest"
          • "MissingLayerDigest"
        • failureReason — (String)

          The reason for the failure.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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

Deletes a list of specified images 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 image's digest in your request.

Service Reference:

Examples:

Calling the batchDeleteImage operation

var params = {
  imageIds: [ /* required */
    {
      imageDigest: 'STRING_VALUE',
      imageTag: 'STRING_VALUE'
    },
    /* more items */
  ],
  repositoryName: 'STRING_VALUE', /* required */
  registryId: 'STRING_VALUE'
};
ecrpublic.batchDeleteImage(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • registryId — (String)

      The AWS account ID associated with the registry that contains the image to delete. If you do not specify a registry, the default public registry is assumed.

    • repositoryName — (String)

      The repository in a public registry that contains the image to delete.

    • imageIds — (Array<map>)

      A list of image ID references that correspond to images to delete. The format of the imageIds reference is imageTag=tag or imageDigest=digest.

      • imageDigest — (String)

        The sha256 digest of the image manifest.

      • imageTag — (String)

        The tag used for the image.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • imageIds — (Array<map>)

        The image IDs of the deleted images.

        • imageDigest — (String)

          The sha256 digest of the image manifest.

        • imageTag — (String)

          The tag used for the image.

      • failures — (Array<map>)

        Any failures associated with the call.

        • imageId — (map)

          The image ID associated with the failure.

          • imageDigest — (String)

            The sha256 digest of the image manifest.

          • imageTag — (String)

            The tag used for the image.

        • failureCode — (String)

          The code associated with the failure.

          Possible values include:
          • "InvalidImageDigest"
          • "InvalidImageTag"
          • "ImageTagDoesNotMatchDigest"
          • "ImageNotFound"
          • "MissingDigestAndTag"
          • "ImageReferencedByManifestList"
          • "KmsError"
        • failureReason — (String)

          The reason for the failure.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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

Informs Amazon ECR that the image layer upload has completed 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 per each new image layer to verify that the upload has completed.

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.

Service Reference:

Examples:

Calling the completeLayerUpload operation

var params = {
  layerDigests: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  repositoryName: 'STRING_VALUE', /* required */
  uploadId: 'STRING_VALUE', /* required */
  registryId: 'STRING_VALUE'
};
ecrpublic.completeLayerUpload(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • registryId — (String)

      The AWS account ID associated with the registry to which to upload layers. If you do not specify a registry, the default public registry is assumed.

    • repositoryName — (String)

      The name of the repository in a public registry to associate with the image layer.

    • uploadId — (String)

      The upload ID from a previous InitiateLayerUpload operation to associate with the image layer.

    • layerDigests — (Array<String>)

      The sha256 digest of the image layer.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • registryId — (String)

        The public registry ID associated with the request.

      • repositoryName — (String)

        The repository name associated with the request.

      • uploadId — (String)

        The upload ID associated with the layer.

      • layerDigest — (String)

        The sha256 digest of the image layer.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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.

Service Reference:

Examples:

Calling the createRepository operation

var params = {
  repositoryName: 'STRING_VALUE', /* required */
  catalogData: {
    aboutText: 'STRING_VALUE',
    architectures: [
      'STRING_VALUE',
      /* more items */
    ],
    description: 'STRING_VALUE',
    logoImageBlob: Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */,
    operatingSystems: [
      'STRING_VALUE',
      /* more items */
    ],
    usageText: 'STRING_VALUE'
  },
  tags: [
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
ecrpublic.createRepository(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryName — (String)

      The name to use for the repository. This appears publicly in the Amazon ECR Public Gallery. The repository name may be specified on its own (such as nginx-web-app) or it can be prepended with a namespace to group the repository into a category (such as project-a/nginx-web-app).

    • catalogData — (map)

      The details about the repository that are publicly visible in the Amazon ECR Public Gallery.

      • description — (String)

        A short description of the contents of the repository. This text appears in both the image details and also when searching for repositories on the Amazon ECR Public Gallery.

      • architectures — (Array<String>)

        The system architecture that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported architectures will appear as badges on the repository and are used as search filters.

        • Linux

        • Windows

        Note: If an unsupported tag is added to your repository catalog data, it will be associated with the repository and can be retrieved using the API but will not be discoverable in the Amazon ECR Public Gallery.
      • operatingSystems — (Array<String>)

        The operating systems that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported operating systems will appear as badges on the repository and are used as search filters.

        • ARM

        • ARM 64

        • x86

        • x86-64

        Note: If an unsupported tag is added to your repository catalog data, it will be associated with the repository and can be retrieved using the API but will not be discoverable in the Amazon ECR Public Gallery.
      • logoImageBlob — (Buffer, Typed Array, Blob, String)

        The base64-encoded repository logo payload.

        Note: The repository logo is only publicly visible in the Amazon ECR Public Gallery for verified accounts.
      • aboutText — (String)

        A detailed description of the contents of the repository. It is publicly visible in the Amazon ECR Public Gallery. The text must be in markdown format.

      • usageText — (String)

        Detailed information on how to use the contents of the repository. It is publicly visible in the Amazon ECR Public Gallery. The usage text provides context, support information, and additional usage details for users of the repository. The text must be in markdown format.

    • tags — (Array<map>)

      The metadata that you apply to the repository to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

      • Key — (String)

        One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.

      • Value — (String)

        The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repository — (map)

        The repository that was created.

        • repositoryArn — (String)

          The Amazon Resource Name (ARN) that identifies the repository. The ARN contains the arn:aws:ecr namespace, followed by the region of the repository, AWS account ID of the repository owner, repository namespace, and repository name. For example, arn:aws:ecr:region:012345678910:repository/test.

        • registryId — (String)

          The AWS account ID associated with the public registry that contains the repository.

        • repositoryName — (String)

          The name of the repository.

        • repositoryUri — (String)

          The URI for the repository. You can use this URI for container image push and pull operations.

        • createdAt — (Date)

          The date and time, in JavaScript date format, when the repository was created.

      • catalogData — (map)

        The catalog data for a repository. This data is publicly visible in the Amazon ECR Public Gallery.

        • description — (String)

          The short description of the repository.

        • architectures — (Array<String>)

          The architecture tags that are associated with the repository.

          Note: Only supported operating system tags appear publicly in the Amazon ECR Public Gallery. For more information, see RepositoryCatalogDataInput.
        • operatingSystems — (Array<String>)

          The operating system tags that are associated with the repository.

          Note: Only supported operating system tags appear publicly in the Amazon ECR Public Gallery. For more information, see RepositoryCatalogDataInput.
        • logoUrl — (String)

          The URL containing the logo associated with the repository.

        • aboutText — (String)

          The longform description of the contents of the repository. This text appears in the repository details on the Amazon ECR Public Gallery.

        • usageText — (String)

          The longform usage details of the contents of the repository. The usage text provides context for users of the repository.

        • marketplaceCertified — (Boolean)

          Whether or not the repository is certified by AWS Marketplace.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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

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

Service Reference:

Examples:

Calling the deleteRepository operation

var params = {
  repositoryName: 'STRING_VALUE', /* required */
  force: true || false,
  registryId: 'STRING_VALUE'
};
ecrpublic.deleteRepository(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • registryId — (String)

      The AWS account ID associated with the public registry that contains the repository to delete. If you do not specify a registry, the default public registry is assumed.

    • repositoryName — (String)

      The name of the repository to delete.

    • force — (Boolean)

      If a repository contains images, forces the deletion.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repository — (map)

        The repository that was deleted.

        • repositoryArn — (String)

          The Amazon Resource Name (ARN) that identifies the repository. The ARN contains the arn:aws:ecr namespace, followed by the region of the repository, AWS account ID of the repository owner, repository namespace, and repository name. For example, arn:aws:ecr:region:012345678910:repository/test.

        • registryId — (String)

          The AWS account ID associated with the public registry that contains the repository.

        • repositoryName — (String)

          The name of the repository.

        • repositoryUri — (String)

          The URI for the repository. You can use this URI for container image push and pull operations.

        • createdAt — (Date)

          The date and time, in JavaScript date format, when the repository was created.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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

Deletes the repository policy associated with the specified repository.

Service Reference:

Examples:

Calling the deleteRepositoryPolicy operation

var params = {
  repositoryName: 'STRING_VALUE', /* required */
  registryId: 'STRING_VALUE'
};
ecrpublic.deleteRepositoryPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • registryId — (String)

      The AWS account ID associated with the public registry that contains the repository policy to delete. If you do not specify a registry, the default public registry is assumed.

    • repositoryName — (String)

      The name of the repository that is associated with the repository policy to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • registryId — (String)

        The registry ID associated with the request.

      • repositoryName — (String)

        The repository name associated with the request.

      • policyText — (String)

        The JSON repository policy that was deleted from the repository.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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

Returns metadata about 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, so it may return a larger image size than the image sizes returned by DescribeImages.

Service Reference:

Examples:

Calling the describeImages operation

var params = {
  repositoryName: 'STRING_VALUE', /* required */
  imageIds: [
    {
      imageDigest: 'STRING_VALUE',
      imageTag: 'STRING_VALUE'
    },
    /* more items */
  ],
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  registryId: 'STRING_VALUE'
};
ecrpublic.describeImages(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • registryId — (String)

      The AWS account ID associated with the public registry that contains the repository in which to describe images. If you do not specify a registry, the default public registry is assumed.

    • repositoryName — (String)

      The repository that contains the images to describe.

    • imageIds — (Array<map>)

      The list of image IDs for the requested repository.

      • imageDigest — (String)

        The sha256 digest of the image manifest.

      • imageTag — (String)

        The tag used for the image.

    • nextToken — (String)

      The nextToken value returned from a previous paginated DescribeImages request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. This option cannot be used when you specify images with imageIds.

    • maxResults — (Integer)

      The maximum number of repository results returned by DescribeImages in paginated output. When this parameter is used, DescribeImages only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeImages request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeImages returns up to 100 results and a nextToken value, if applicable. This option cannot be used when you specify images with imageIds.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • imageDetails — (Array<map>)

        A list of ImageDetail objects that contain data about the image.

        • registryId — (String)

          The AWS account ID associated with the public registry to which this image belongs.

        • repositoryName — (String)

          The name of the repository to which this image belongs.

        • imageDigest — (String)

          The sha256 digest of the image manifest.

        • imageTags — (Array<String>)

          The list of tags associated with this image.

        • imageSizeInBytes — (Integer)

          The size, in bytes, of the image in the repository.

          If the image is a manifest list, this will be the max size of all manifests in the list.

          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, so it may return a larger image size than the image sizes returned by DescribeImages.
        • imagePushedAt — (Date)

          The date and time, expressed in standard JavaScript date format, at which the current image was pushed to the repository.

        • imageManifestMediaType — (String)

          The media type of the image manifest.

        • artifactMediaType — (String)

          The artifact media type of the image.

      • nextToken — (String)

        The nextToken value to include in a future DescribeImages request. When the results of a DescribeImages request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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

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

Service Reference:

Examples:

Calling the describeImageTags operation

var params = {
  repositoryName: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  registryId: 'STRING_VALUE'
};
ecrpublic.describeImageTags(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • registryId — (String)

      The AWS account ID associated with the public registry that contains the repository in which to describe images. If you do not specify a registry, the default public registry is assumed.

    • repositoryName — (String)

      The name of the repository that contains the image tag details to describe.

    • nextToken — (String)

      The nextToken value returned from a previous paginated DescribeImageTags request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. This option cannot be used when you specify images with imageIds.

    • maxResults — (Integer)

      The maximum number of repository results returned by DescribeImageTags in paginated output. When this parameter is used, DescribeImageTags only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeImageTags request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeImageTags returns up to 100 results and a nextToken value, if applicable. This option cannot be used when you specify images with imageIds.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • imageTagDetails — (Array<map>)

        The image tag details for the images in the requested repository.

        • imageTag — (String)

          The tag associated with the image.

        • createdAt — (Date)

          The time stamp indicating when the image tag was created.

        • imageDetail — (map)

          An object that describes the details of an image.

          • imageDigest — (String)

            The sha256 digest of the image manifest.

          • imageSizeInBytes — (Integer)

            The size, in bytes, of the image in the repository.

            If the image is a manifest list, this will be the max size of all manifests in the list.

            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, so it may return a larger image size than the image sizes returned by DescribeImages.
          • imagePushedAt — (Date)

            The date and time, expressed in standard JavaScript date format, at which the current image tag was pushed to the repository.

          • imageManifestMediaType — (String)

            The media type of the image manifest.

          • artifactMediaType — (String)

            The artifact media type of the image.

      • nextToken — (String)

        The nextToken value to include in a future DescribeImageTags request. When the results of a DescribeImageTags request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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

Returns details for a public registry.

Service Reference:

Examples:

Calling the describeRegistries operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
ecrpublic.describeRegistries(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

      The nextToken value returned from a previous paginated DescribeRegistries request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return.

      Note: This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
    • maxResults — (Integer)

      The maximum number of repository results returned by DescribeRegistries in paginated output. When this parameter is used, DescribeRegistries only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeRegistries request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeRegistries returns up to 100 results and a nextToken value, if applicable.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • registries — (Array<map>)

        An object containing the details for a public registry.

        • registryIdrequired — (String)

          The AWS account ID associated with the registry. If you do not specify a registry, the default public registry is assumed.

        • registryArnrequired — (String)

          The Amazon Resource Name (ARN) of the public registry.

        • registryUrirequired — (String)

          The URI of a public registry. The URI contains a universal prefix and the registry alias.

        • verifiedrequired — (Boolean)

          Whether the account is verified. This indicates whether the account is an AWS Marketplace vendor. If an account is verified, each public repository will received a verified account badge on the Amazon ECR Public Gallery.

        • aliasesrequired — (Array<map>)

          An array of objects representing the aliases for a public registry.

          • namerequired — (String)

            The name of the registry alias.

          • statusrequired — (String)

            The status of the registry alias.

            Possible values include:
            • "ACTIVE"
            • "PENDING"
            • "REJECTED"
          • primaryRegistryAliasrequired — (Boolean)

            Whether or not the registry alias is the primary alias for the registry. If true, the alias is the primary registry alias and is displayed in both the repository URL and the image URI used in the docker pull commands on the Amazon ECR Public Gallery.

            Note: A registry alias that is not the primary registry alias can be used in the repository URI in a docker pull command.
          • defaultRegistryAliasrequired — (Boolean)

            Whether or not the registry alias is the default alias for the registry. When the first public repository is created, your public registry is assigned a default registry alias.

      • nextToken — (String)

        The nextToken value to include in a future DescribeRepositories request. When the results of a DescribeRepositories request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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

Describes repositories in a public registry.

Service Reference:

Examples:

Calling the describeRepositories operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  registryId: 'STRING_VALUE',
  repositoryNames: [
    'STRING_VALUE',
    /* more items */
  ]
};
ecrpublic.describeRepositories(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • registryId — (String)

      The AWS account ID associated with the registry that contains the repositories to be described. If you do not specify a registry, the default public registry is assumed.

    • repositoryNames — (Array<String>)

      A list of repositories to describe. If this parameter is omitted, then all repositories in a registry are described.

    • nextToken — (String)

      The nextToken value returned from a previous paginated DescribeRepositories request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. This option cannot be used when you specify repositories with repositoryNames.

      Note: This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
    • maxResults — (Integer)

      The maximum number of repository results returned by DescribeRepositories in paginated output. When this parameter is used, DescribeRepositories only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeRepositories request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeRepositories returns up to 100 results and a nextToken value, if applicable. This option cannot be used when you specify repositories with repositoryNames.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repositories — (Array<map>)

        A list of repository objects corresponding to valid repositories.

        • repositoryArn — (String)

          The Amazon Resource Name (ARN) that identifies the repository. The ARN contains the arn:aws:ecr namespace, followed by the region of the repository, AWS account ID of the repository owner, repository namespace, and repository name. For example, arn:aws:ecr:region:012345678910:repository/test.

        • registryId — (String)

          The AWS account ID associated with the public registry that contains the repository.

        • repositoryName — (String)

          The name of the repository.

        • repositoryUri — (String)

          The URI for the repository. You can use this URI for container image push and pull operations.

        • createdAt — (Date)

          The date and time, in JavaScript date format, when the repository was created.

      • nextToken — (String)

        The nextToken value to include in a future DescribeRepositories request. When the results of a DescribeRepositories request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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

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. This API requires the ecr-public:GetAuthorizationToken and sts:GetServiceBearerToken permissions.

Service Reference:

Examples:

Calling the getAuthorizationToken operation

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

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • authorizationData — (map)

        An authorization token data object that corresponds to a public registry.

        • authorizationToken — (String)

          A base64-encoded string that contains authorization data for a public Amazon ECR registry. When the string is decoded, it is presented in the format user:password for public registry authentication using docker login.

        • expiresAt — (Date)

          The Unix time in seconds and milliseconds when the authorization token expires. Authorization tokens are valid for 12 hours.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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

Retrieves catalog metadata for a public registry.

Service Reference:

Examples:

Calling the getRegistryCatalogData operation

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

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • registryCatalogData — (map)

        The catalog metadata for the public registry.

        • displayName — (String)

          The display name for a public registry. This appears on the Amazon ECR Public Gallery.

          Only accounts that have the verified account badge can have a registry display name.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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.

Service Reference:

Examples:

Calling the getRepositoryCatalogData operation

var params = {
  repositoryName: 'STRING_VALUE', /* required */
  registryId: 'STRING_VALUE'
};
ecrpublic.getRepositoryCatalogData(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • registryId — (String)

      The AWS account ID associated with the registry that contains the repositories to be described. If you do not specify a registry, the default public registry is assumed.

    • repositoryName — (String)

      The name of the repository to retrieve the catalog metadata for.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • catalogData — (map)

        The catalog metadata for the repository.

        • description — (String)

          The short description of the repository.

        • architectures — (Array<String>)

          The architecture tags that are associated with the repository.

          Note: Only supported operating system tags appear publicly in the Amazon ECR Public Gallery. For more information, see RepositoryCatalogDataInput.
        • operatingSystems — (Array<String>)

          The operating system tags that are associated with the repository.

          Note: Only supported operating system tags appear publicly in the Amazon ECR Public Gallery. For more information, see RepositoryCatalogDataInput.
        • logoUrl — (String)

          The URL containing the logo associated with the repository.

        • aboutText — (String)

          The longform description of the contents of the repository. This text appears in the repository details on the Amazon ECR Public Gallery.

        • usageText — (String)

          The longform usage details of the contents of the repository. The usage text provides context for users of the repository.

        • marketplaceCertified — (Boolean)

          Whether or not the repository is certified by AWS Marketplace.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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

Retrieves the repository policy for the specified repository.

Service Reference:

Examples:

Calling the getRepositoryPolicy operation

var params = {
  repositoryName: 'STRING_VALUE', /* required */
  registryId: 'STRING_VALUE'
};
ecrpublic.getRepositoryPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • registryId — (String)

      The AWS account ID associated with the public registry that contains the repository. If you do not specify a registry, the default public registry is assumed.

    • repositoryName — (String)

      The name of the repository with the policy to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • registryId — (String)

        The registry ID associated with the request.

      • repositoryName — (String)

        The repository name associated with the request.

      • policyText — (String)

        The repository policy text associated with the repository. The policy text will be in JSON format.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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

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.

Service Reference:

Examples:

Calling the initiateLayerUpload operation

var params = {
  repositoryName: 'STRING_VALUE', /* required */
  registryId: 'STRING_VALUE'
};
ecrpublic.initiateLayerUpload(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • registryId — (String)

      The AWS account ID associated with the registry to which you intend to upload layers. If you do not specify a registry, the default public registry is assumed.

    • repositoryName — (String)

      The name of the repository to which you intend to upload layers.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • uploadId — (String)

        The upload ID for the layer upload. This parameter is passed to further UploadLayerPart and CompleteLayerUpload operations.

      • partSize — (Integer)

        The size, in bytes, that Amazon ECR expects future layer part uploads to be.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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

List the tags for an Amazon ECR Public resource.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  resourceArn: 'STRING_VALUE' /* required */
};
ecrpublic.listTagsForResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The Amazon Resource Name (ARN) that identifies the resource for which to list the tags. Currently, the supported resource is an Amazon ECR Public repository.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • tags — (Array<map>)

        The tags for the resource.

        • Key — (String)

          One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.

        • Value — (String)

          The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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

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.

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.

Service Reference:

Examples:

Calling the putImage operation

var params = {
  imageManifest: 'STRING_VALUE', /* required */
  repositoryName: 'STRING_VALUE', /* required */
  imageDigest: 'STRING_VALUE',
  imageManifestMediaType: 'STRING_VALUE',
  imageTag: 'STRING_VALUE',
  registryId: 'STRING_VALUE'
};
ecrpublic.putImage(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • registryId — (String)

      The AWS account ID associated with the public registry that contains the repository in which to put the image. If you do not specify a registry, the default public registry is assumed.

    • repositoryName — (String)

      The name of the repository in which to put the image.

    • imageManifest — (String)

      The image manifest corresponding to the image to be uploaded.

    • imageManifestMediaType — (String)

      The media type of the image manifest. If you push an image manifest that does not contain the mediaType field, you must specify the imageManifestMediaType in the request.

    • imageTag — (String)

      The tag to associate with the image. This parameter is required for images that use the Docker Image Manifest V2 Schema 2 or Open Container Initiative (OCI) formats.

    • imageDigest — (String)

      The image digest of the image manifest corresponding to the image.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • image — (map)

        Details of the image uploaded.

        • registryId — (String)

          The AWS account ID associated with the registry containing the image.

        • repositoryName — (String)

          The name of the repository associated with the image.

        • imageId — (map)

          An object containing the image tag and image digest associated with an image.

          • imageDigest — (String)

            The sha256 digest of the image manifest.

          • imageTag — (String)

            The tag used for the image.

        • imageManifest — (String)

          The image manifest associated with the image.

        • imageManifestMediaType — (String)

          The manifest media type of the image.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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

Create or updates the catalog data for a public registry.

Service Reference:

Examples:

Calling the putRegistryCatalogData operation

var params = {
  displayName: 'STRING_VALUE'
};
ecrpublic.putRegistryCatalogData(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • displayName — (String)

      The display name for a public registry. The display name is shown as the repository author in the Amazon ECR Public Gallery.

      Note: The registry display name is only publicly visible in the Amazon ECR Public Gallery for verified accounts.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • registryCatalogData — (map)

        The catalog data for the public registry.

        • displayName — (String)

          The display name for a public registry. This appears on the Amazon ECR Public Gallery.

          Only accounts that have the verified account badge can have a registry display name.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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

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

Service Reference:

Examples:

Calling the putRepositoryCatalogData operation

var params = {
  catalogData: { /* required */
    aboutText: 'STRING_VALUE',
    architectures: [
      'STRING_VALUE',
      /* more items */
    ],
    description: 'STRING_VALUE',
    logoImageBlob: Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */,
    operatingSystems: [
      'STRING_VALUE',
      /* more items */
    ],
    usageText: 'STRING_VALUE'
  },
  repositoryName: 'STRING_VALUE', /* required */
  registryId: 'STRING_VALUE'
};
ecrpublic.putRepositoryCatalogData(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • registryId — (String)

      The AWS account ID associated with the public registry the repository is in. If you do not specify a registry, the default public registry is assumed.

    • repositoryName — (String)

      The name of the repository to create or update the catalog data for.

    • catalogData — (map)

      An object containing the catalog data for a repository. This data is publicly visible in the Amazon ECR Public Gallery.

      • description — (String)

        A short description of the contents of the repository. This text appears in both the image details and also when searching for repositories on the Amazon ECR Public Gallery.

      • architectures — (Array<String>)

        The system architecture that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported architectures will appear as badges on the repository and are used as search filters.

        • Linux

        • Windows

        Note: If an unsupported tag is added to your repository catalog data, it will be associated with the repository and can be retrieved using the API but will not be discoverable in the Amazon ECR Public Gallery.
      • operatingSystems — (Array<String>)

        The operating systems that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported operating systems will appear as badges on the repository and are used as search filters.

        • ARM

        • ARM 64

        • x86

        • x86-64

        Note: If an unsupported tag is added to your repository catalog data, it will be associated with the repository and can be retrieved using the API but will not be discoverable in the Amazon ECR Public Gallery.
      • logoImageBlob — (Buffer, Typed Array, Blob, String)

        The base64-encoded repository logo payload.

        Note: The repository logo is only publicly visible in the Amazon ECR Public Gallery for verified accounts.
      • aboutText — (String)

        A detailed description of the contents of the repository. It is publicly visible in the Amazon ECR Public Gallery. The text must be in markdown format.

      • usageText — (String)

        Detailed information on how to use the contents of the repository. It is publicly visible in the Amazon ECR Public Gallery. The usage text provides context, support information, and additional usage details for users of the repository. The text must be in markdown format.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • catalogData — (map)

        The catalog data for the repository.

        • description — (String)

          The short description of the repository.

        • architectures — (Array<String>)

          The architecture tags that are associated with the repository.

          Note: Only supported operating system tags appear publicly in the Amazon ECR Public Gallery. For more information, see RepositoryCatalogDataInput.
        • operatingSystems — (Array<String>)

          The operating system tags that are associated with the repository.

          Note: Only supported operating system tags appear publicly in the Amazon ECR Public Gallery. For more information, see RepositoryCatalogDataInput.
        • logoUrl — (String)

          The URL containing the logo associated with the repository.

        • aboutText — (String)

          The longform description of the contents of the repository. This text appears in the repository details on the Amazon ECR Public Gallery.

        • usageText — (String)

          The longform usage details of the contents of the repository. The usage text provides context for users of the repository.

        • marketplaceCertified — (Boolean)

          Whether or not the repository is certified by AWS Marketplace.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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.

Service Reference:

Examples:

Calling the setRepositoryPolicy operation

var params = {
  policyText: 'STRING_VALUE', /* required */
  repositoryName: 'STRING_VALUE', /* required */
  force: true || false,
  registryId: 'STRING_VALUE'
};
ecrpublic.setRepositoryPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • registryId — (String)

      The AWS account ID associated with the registry that contains the repository. If you do not specify a registry, the default public registry is assumed.

    • repositoryName — (String)

      The name of the repository to receive the policy.

    • policyText — (String)

      The JSON repository policy text to apply to the repository. For more information, see Amazon ECR Repository Policies in the Amazon Elastic Container Registry User Guide.

    • force — (Boolean)

      If the policy you are attempting to set on a repository policy would prevent you from setting another policy in the future, you must force the SetRepositoryPolicy operation. This is intended to prevent accidental repository lock outs.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • registryId — (String)

        The registry ID associated with the request.

      • repositoryName — (String)

        The repository name associated with the request.

      • policyText — (String)

        The JSON repository policy text applied to the repository.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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

Associates the specified tags to a resource with the specified resourceArn. If existing tags on a resource are not specified in the request parameters, they are not changed. When a resource is deleted, the tags associated with that resource are deleted as well.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tags: [ /* required */
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
ecrpublic.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The Amazon Resource Name (ARN) of the resource to which to add tags. Currently, the supported resource is an Amazon ECR Public repository.

    • tags — (Array<map>)

      The tags to add to the resource. A tag is an array of key-value pairs. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

      • Key — (String)

        One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values.

      • Value — (String)

        The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key).

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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

Deletes specified tags from a resource.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
ecrpublic.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The Amazon Resource Name (ARN) of the resource from which to delete tags. Currently, the supported resource is an Amazon ECR Public repository.

    • tagKeys — (Array<String>)

      The keys of the tags to be removed.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

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 (or about 20MB). The UploadLayerPart API is called once per 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.

Service Reference:

Examples:

Calling the uploadLayerPart operation

var params = {
  layerPartBlob: Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */, /* required */
  partFirstByte: 'NUMBER_VALUE', /* required */
  partLastByte: 'NUMBER_VALUE', /* required */
  repositoryName: 'STRING_VALUE', /* required */
  uploadId: 'STRING_VALUE', /* required */
  registryId: 'STRING_VALUE'
};
ecrpublic.uploadLayerPart(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • registryId — (String)

      The AWS account ID associated with the registry to which you are uploading layer parts. If you do not specify a registry, the default public registry is assumed.

    • repositoryName — (String)

      The name of the repository to which you are uploading layer parts.

    • uploadId — (String)

      The upload ID from a previous InitiateLayerUpload operation to associate with the layer part upload.

    • partFirstByte — (Integer)

      The position of the first byte of the layer part witin the overall image layer.

    • partLastByte — (Integer)

      The position of the last byte of the layer part within the overall image layer.

    • layerPartBlob — (Buffer, Typed Array, Blob, String)

      The base64-encoded layer part payload.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • registryId — (String)

        The registry ID associated with the request.

      • repositoryName — (String)

        The repository name associated with the request.

      • uploadId — (String)

        The upload ID associated with the request.

      • lastByteReceived — (Integer)

        The integer value of the last byte received in the request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.