Class: AWS.ECR
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.ECR
- Identifier:
- ecr
- API Version:
- 2015-09-21
- 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. 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.
Sending a Request Using ECR
var ecr = new AWS.ECR();
ecr.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 ECR object uses this specific API, you can
construct the object by passing the apiVersion
option to the constructor:
var ecr = new AWS.ECR({apiVersion: '2015-09-21'});
You can also set the API version globally in AWS.config.apiVersions
using
the ecr service identifier:
AWS.config.apiVersions = {
ecr: '2015-09-21',
// other service API versions
};
var ecr = new AWS.ECR();
Waiter Resource States
This service supports a list of resource states that can be polled using the waitFor() method. The resource states are:
imageScanComplete, lifecyclePolicyPreviewComplete
Constructor Summary collapse
-
new AWS.ECR(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary collapse
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary collapse
-
batchCheckLayerAvailability(params = {}, callback) ⇒ AWS.Request
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.
-
batchDeleteImage(params = {}, callback) ⇒ AWS.Request
Deletes a list of specified images within a repository.
-
batchGetImage(params = {}, callback) ⇒ AWS.Request
Gets detailed information for an image.
-
completeLayerUpload(params = {}, callback) ⇒ AWS.Request
Informs Amazon ECR that the image layer upload has completed for a specified registry, repository name, and upload ID.
-
createRepository(params = {}, callback) ⇒ AWS.Request
Creates a repository.
-
deleteLifecyclePolicy(params = {}, callback) ⇒ AWS.Request
Deletes the lifecycle policy associated with the specified repository.
.
-
deleteRegistryPolicy(params = {}, callback) ⇒ AWS.Request
Deletes the registry permissions policy.
.
-
deleteRepository(params = {}, callback) ⇒ AWS.Request
Deletes a repository.
-
deleteRepositoryPolicy(params = {}, callback) ⇒ AWS.Request
Deletes the repository policy associated with the specified repository.
.
-
describeImageReplicationStatus(params = {}, callback) ⇒ AWS.Request
Returns the replication status for a specified image.
.
-
describeImages(params = {}, callback) ⇒ AWS.Request
Returns metadata about the images in a repository.
Note: Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker registry.- describeImageScanFindings(params = {}, callback) ⇒ AWS.Request
Returns the scan findings for the specified image.
.
- describeRegistry(params = {}, callback) ⇒ AWS.Request
Describes the settings for a registry.
- describeRepositories(params = {}, callback) ⇒ AWS.Request
Describes image repositories in a registry.
.
- getAuthorizationToken(params = {}, callback) ⇒ AWS.Request
Retrieves an authorization token.
- getDownloadUrlForLayer(params = {}, callback) ⇒ AWS.Request
Retrieves the pre-signed Amazon S3 download URL corresponding to an image layer.
- getLifecyclePolicy(params = {}, callback) ⇒ AWS.Request
Retrieves the lifecycle policy for the specified repository.
.
- getLifecyclePolicyPreview(params = {}, callback) ⇒ AWS.Request
Retrieves the results of the lifecycle policy preview request for the specified repository.
.
- getRegistryPolicy(params = {}, callback) ⇒ AWS.Request
Retrieves the permissions policy for a registry.
.
- 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 per image layer that has not already been uploaded.
- listImages(params = {}, callback) ⇒ AWS.Request
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 eitherTAGGED
,UNTAGGED
orANY
.- listTagsForResource(params = {}, callback) ⇒ AWS.Request
List the tags for an Amazon ECR resource.
.
- 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.- putImageScanningConfiguration(params = {}, callback) ⇒ AWS.Request
Updates the image scanning configuration for the specified repository.
.
- putImageTagMutability(params = {}, callback) ⇒ AWS.Request
Updates the image tag mutability settings for the specified repository.
- putLifecyclePolicy(params = {}, callback) ⇒ AWS.Request
Creates or updates the lifecycle policy for the specified repository.
- putRegistryPolicy(params = {}, callback) ⇒ AWS.Request
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.
- putReplicationConfiguration(params = {}, callback) ⇒ AWS.Request
Creates or updates the replication configuration for a registry.
- setRepositoryPolicy(params = {}, callback) ⇒ AWS.Request
Applies a repository policy to the specified repository to control access permissions.
- startImageScan(params = {}, callback) ⇒ AWS.Request
Starts an image vulnerability scan.
- startLifecyclePolicyPreview(params = {}, callback) ⇒ AWS.Request
Starts a preview of a lifecycle policy for the specified repository.
- tagResource(params = {}, callback) ⇒ AWS.Request
Adds specified tags to a resource with the specified ARN.
- 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.
- waitFor(state, params = {}, callback) ⇒ AWS.Request
Waits for a given ECR resource.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, setupRequestListeners, defineService
Constructor Details
new AWS.ECR(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Property Details
Method Details
batchCheckLayerAvailability(params = {}, callback) ⇒ AWS.Request
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.
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 thedocker
CLI to pull, tag, and push images.batchDeleteImage(params = {}, callback) ⇒ AWS.Request
Deletes a list of specified images within a repository. Images are specified with either an
imageTag
orimageDigest
.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.
batchGetImage(params = {}, callback) ⇒ AWS.Request
Gets detailed information for an image. Images are specified with either an
imageTag
orimageDigest
.When an image is pulled, the BatchGetImage API is called once to retrieve the image manifest.
completeLayerUpload(params = {}, callback) ⇒ AWS.Request
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.
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 thedocker
CLI to pull, tag, and push images.createRepository(params = {}, callback) ⇒ AWS.Request
Creates a repository. For more information, see Amazon ECR repositories in the Amazon Elastic Container Registry User Guide.
deleteLifecyclePolicy(params = {}, callback) ⇒ AWS.Request
Deletes the lifecycle policy associated with the specified repository.
deleteRepository(params = {}, callback) ⇒ AWS.Request
Deletes a repository. If the repository contains images, you must either delete all images in the repository or use the
force
option to delete the repository.deleteRepositoryPolicy(params = {}, callback) ⇒ AWS.Request
Deletes the repository policy associated with the specified repository.
describeImageReplicationStatus(params = {}, callback) ⇒ AWS.Request
Returns the replication status for a specified image.
describeImages(params = {}, callback) ⇒ AWS.Request
Returns metadata about the images in a repository.
Note: Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker registry. The output of thedocker images
command shows the uncompressed image size, so it may return a larger image size than the image sizes returned by DescribeImages.describeImageScanFindings(params = {}, callback) ⇒ AWS.Request
Returns the scan findings for the specified image.
describeRegistry(params = {}, callback) ⇒ AWS.Request
Describes the settings for a registry. The replication configuration for a repository can be created or updated with the PutReplicationConfiguration API action.
describeRepositories(params = {}, callback) ⇒ AWS.Request
Describes image repositories in a registry.
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.
The
authorizationToken
returned is a base64 encoded string that can be decoded and used in adocker login
command to authenticate to a registry. The CLI offers anget-login-password
command that simplifies the login process. For more information, see Registry authentication in the Amazon Elastic Container Registry User Guide.getDownloadUrlForLayer(params = {}, callback) ⇒ AWS.Request
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.
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 thedocker
CLI to pull, tag, and push images.getLifecyclePolicy(params = {}, callback) ⇒ AWS.Request
Retrieves the lifecycle policy for the specified repository.
getLifecyclePolicyPreview(params = {}, callback) ⇒ AWS.Request
Retrieves the results of the lifecycle policy preview request for the specified repository.
getRegistryPolicy(params = {}, callback) ⇒ AWS.Request
Retrieves the permissions policy for a registry.
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 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 thedocker
CLI to pull, tag, and push images.listImages(params = {}, callback) ⇒ AWS.Request
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 eitherTAGGED
,UNTAGGED
orANY
. For example, you can filter your results to return onlyUNTAGGED
images and then pipe that result to a BatchDeleteImage operation to delete them. Or, you can filter your results to return onlyTAGGED
images to list all of the tags in your repository.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 thedocker
CLI to pull, tag, and push images.putImageScanningConfiguration(params = {}, callback) ⇒ AWS.Request
Updates the image scanning configuration for the specified repository.
putImageTagMutability(params = {}, callback) ⇒ AWS.Request
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.
putLifecyclePolicy(params = {}, callback) ⇒ AWS.Request
Creates or updates the lifecycle policy for the specified repository. For more information, see Lifecycle policy template.
putRegistryPolicy(params = {}, callback) ⇒ AWS.Request
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.
putReplicationConfiguration(params = {}, callback) ⇒ AWS.Request
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.
Note: 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.setRepositoryPolicy(params = {}, callback) ⇒ AWS.Request
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.
startImageScan(params = {}, callback) ⇒ AWS.Request
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.
startLifecyclePolicyPreview(params = {}, callback) ⇒ AWS.Request
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.
tagResource(params = {}, callback) ⇒ AWS.Request
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.
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 thedocker
CLI to pull, tag, and push images.waitFor(state, params = {}, callback) ⇒ AWS.Request
Waits for a given ECR resource. The final callback or 'complete' event will be fired only when the resource is either in its final state or the waiter has timed out and stopped polling for the final state.
Waiter Resource Details
ecr.waitFor('imageScanComplete', params = {}, [callback]) ⇒ AWS.Request
Waits for the
imageScanComplete
state by periodically calling the underlying ECR.describeImageScanFindings() operation every 5 seconds (at most 60 times).ecr.waitFor('lifecyclePolicyPreviewComplete', params = {}, [callback]) ⇒ AWS.Request
Waits for the
lifecyclePolicyPreviewComplete
state by periodically calling the underlying ECR.getLifecyclePolicyPreview() operation every 5 seconds (at most 20 times). - describeImageScanFindings(params = {}, callback) ⇒ AWS.Request