Protected
Gets detailed information for an image. Images are specified with either an imageTag or imageDigest.
imageTag
imageDigest
When an image is pulled, the BatchGetImage API is called once to retrieve the image manifest.
Use a bare-bones client and the command you need to make an API call.
import { ECRClient, BatchGetImageCommand } from "@aws-sdk/client-ecr"; // ES Modules import// const { ECRClient, BatchGetImageCommand } = require("@aws-sdk/client-ecr"); // CommonJS importconst client = new ECRClient(config);const command = new BatchGetImageCommand(input);const response = await client.send(command);
BatchGetImageCommandInput
BatchGetImageCommandOutput
input
response
config
InvalidParameterException (client fault)
The specified parameter is invalid. Review the available parameters for the API request.
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.
ServerException (server fault)
These errors are usually caused by a server-side issue.
To obtain multiple images in a single request
// This example obtains information for an image with a specified image digest ID from the repository named ubuntu in the current account.const input = { "imageIds": [ { "imageTag": "precise" } ], "repositoryName": "ubuntu"};const command = new BatchGetImageCommand(input);const response = await client.send(command);/* response =={ "failures": [], "images": [ { "imageId": { "imageDigest": "sha256:example76bdff6d83a09ba2a818f0d00000063724a9ac3ba5019c56f74ebf42a", "imageTag": "precise" }, "imageManifest": "{\n \"schemaVersion\": 1,\n \"name\": \"ubuntu\",\n \"tag\": \"precise\",\n...", "registryId": "244698725403", "repositoryName": "ubuntu" } ]}*/// example id: batchgetimage-example-1470862771437
Readonly
Static
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.
Example
Use a bare-bones client and the command you need to make an API call.
Param
BatchGetImageCommandInput
Returns
BatchGetImageCommandOutput
See
input
shape.response
shape.config
shape.Throws
InvalidParameterException (client fault)
The specified parameter is invalid. Review the available parameters for the API request.
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.
Example
To obtain multiple images in a single request