Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class GetDownloadUrlForLayerCommandProtected

Retrieves the pre-signed Amazon S3 download URL corresponding to an image layer. You can only get URLs for image layers that are referenced in an image.

When an image is pulled, the GetDownloadUrlForLayer API is called once per image layer that is not already cached.

This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.

Example

Use a bare-bones client and the command you need to make an API call.

import { ECRClient, GetDownloadUrlForLayerCommand } from "@aws-sdk/client-ecr"; // ES Modules import
// const { ECRClient, GetDownloadUrlForLayerCommand } = require("@aws-sdk/client-ecr"); // CommonJS import
const client = new ECRClient(config);
const input = { // GetDownloadUrlForLayerRequest
registryId: "STRING_VALUE",
repositoryName: "STRING_VALUE", // required
layerDigest: "STRING_VALUE", // required
};
const command = new GetDownloadUrlForLayerCommand(input);
const response = await client.send(command);
// { // GetDownloadUrlForLayerResponse
// downloadUrl: "STRING_VALUE",
// layerDigest: "STRING_VALUE",
// };

Param

GetDownloadUrlForLayerCommandInput

Returns

GetDownloadUrlForLayerCommandOutput

See

Throws

InvalidParameterException (client fault)

The specified parameter is invalid. Review the available parameters for the API request.

Throws

LayerInaccessibleException (client fault)

The specified layer is not available because it is not associated with an image. Unassociated image layers may be cleaned up at any time.

Throws

LayersNotFoundException (client fault)

The specified layers could not be found, or the specified layer is not valid for this repository.

Throws

RepositoryNotFoundException (client fault)

The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.

Throws

ServerException (server fault)

These errors are usually caused by a server-side issue.

Throws

UnableToGetUpstreamLayerException (client fault)

There was an issue getting the upstream layer matching the pull through cache rule.

Throws

ECRServiceException

Base exception class for all service exceptions from ECR service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods