import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { ECRClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ECRClient"; import type { BatchDeleteImageRequest, BatchDeleteImageResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link BatchDeleteImageCommand}. */ export interface BatchDeleteImageCommandInput extends BatchDeleteImageRequest { } /** * @public * * The output of {@link BatchDeleteImageCommand}. */ export interface BatchDeleteImageCommandOutput extends BatchDeleteImageResponse, __MetadataBearer { } declare const BatchDeleteImageCommand_base: { new (input: BatchDeleteImageCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: BatchDeleteImageCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Deletes a list of specified images within a repository. 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.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { ECRClient, BatchDeleteImageCommand } from "@aws-sdk/client-ecr"; // ES Modules import * // const { ECRClient, BatchDeleteImageCommand } = require("@aws-sdk/client-ecr"); // CommonJS import * // import type { ECRClientConfig } from "@aws-sdk/client-ecr"; * const config = {}; // type is ECRClientConfig * const client = new ECRClient(config); * const input = { // BatchDeleteImageRequest * registryId: "STRING_VALUE", * repositoryName: "STRING_VALUE", // required * imageIds: [ // ImageIdentifierList // required * { // ImageIdentifier * imageDigest: "STRING_VALUE", * imageTag: "STRING_VALUE", * }, * ], * }; * const command = new BatchDeleteImageCommand(input); * const response = await client.send(command); * // { // BatchDeleteImageResponse * // imageIds: [ // ImageIdentifierList * // { // ImageIdentifier * // imageDigest: "STRING_VALUE", * // imageTag: "STRING_VALUE", * // }, * // ], * // failures: [ // ImageFailureList * // { // ImageFailure * // imageId: { * // imageDigest: "STRING_VALUE", * // imageTag: "STRING_VALUE", * // }, * // failureCode: "InvalidImageDigest" || "InvalidImageTag" || "ImageTagDoesNotMatchDigest" || "ImageNotFound" || "MissingDigestAndTag" || "ImageReferencedByManifestList" || "KmsError" || "UpstreamAccessDenied" || "UpstreamTooManyRequests" || "UpstreamUnavailable" || "ImageInaccessible", * // failureReason: "STRING_VALUE", * // }, * // ], * // }; * * ``` * * @param BatchDeleteImageCommandInput - {@link BatchDeleteImageCommandInput} * @returns {@link BatchDeleteImageCommandOutput} * @see {@link BatchDeleteImageCommandInput} for command's `input` shape. * @see {@link BatchDeleteImageCommandOutput} for command's `response` shape. * @see {@link ECRClientResolvedConfig | config} for ECRClient's `config` shape. * * @throws {@link InvalidParameterException} (client fault) *

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

* * @throws {@link 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 {@link ServerException} (server fault) *

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

* * @throws {@link ECRServiceException} *

Base exception class for all service exceptions from ECR service.

* * * @example To delete multiple images * ```javascript * // This example deletes images with the tags precise and trusty in a repository called ubuntu in the default registry for an account. * const input = { * imageIds: [ * { * imageTag: "precise" * } * ], * repositoryName: "ubuntu" * }; * const command = new BatchDeleteImageCommand(input); * const response = await client.send(command); * /* response is * { * failures: [], * imageIds: [ * { * imageDigest: "sha256:examplee6d1e504117a17000003d3753086354a38375961f2e665416ef4b1b2f", * imageTag: "precise" * } * ] * } * *\/ * ``` * * @public */ export declare class BatchDeleteImageCommand extends BatchDeleteImageCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: BatchDeleteImageRequest; output: BatchDeleteImageResponse; }; sdk: { input: BatchDeleteImageCommandInput; output: BatchDeleteImageCommandOutput; }; }; }