import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CodeartifactClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CodeartifactClient"; import type { DeletePackageVersionsRequest, DeletePackageVersionsResult } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link DeletePackageVersionsCommand}. */ export interface DeletePackageVersionsCommandInput extends DeletePackageVersionsRequest { } /** * @public * * The output of {@link DeletePackageVersionsCommand}. */ export interface DeletePackageVersionsCommandOutput extends DeletePackageVersionsResult, __MetadataBearer { } declare const DeletePackageVersionsCommand_base: { new (input: DeletePackageVersionsCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: DeletePackageVersionsCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Deletes one or more versions of a package. A deleted package version cannot be restored * in your repository. If you want to remove a package version from your repository and be able * to restore it later, set its status to Archived. Archived packages cannot be * downloaded from a repository and don't show up with list package APIs (for example, * ListPackageVersions), but you can restore them using UpdatePackageVersionsStatus.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CodeartifactClient, DeletePackageVersionsCommand } from "@aws-sdk/client-codeartifact"; // ES Modules import * // const { CodeartifactClient, DeletePackageVersionsCommand } = require("@aws-sdk/client-codeartifact"); // CommonJS import * // import type { CodeartifactClientConfig } from "@aws-sdk/client-codeartifact"; * const config = {}; // type is CodeartifactClientConfig * const client = new CodeartifactClient(config); * const input = { // DeletePackageVersionsRequest * domain: "STRING_VALUE", // required * domainOwner: "STRING_VALUE", * repository: "STRING_VALUE", // required * format: "npm" || "pypi" || "maven" || "nuget" || "generic" || "ruby" || "swift" || "cargo", // required * namespace: "STRING_VALUE", * package: "STRING_VALUE", // required * versions: [ // PackageVersionList // required * "STRING_VALUE", * ], * expectedStatus: "Published" || "Unfinished" || "Unlisted" || "Archived" || "Disposed" || "Deleted", * }; * const command = new DeletePackageVersionsCommand(input); * const response = await client.send(command); * // { // DeletePackageVersionsResult * // successfulVersions: { // SuccessfulPackageVersionInfoMap * // "": { // SuccessfulPackageVersionInfo * // revision: "STRING_VALUE", * // status: "Published" || "Unfinished" || "Unlisted" || "Archived" || "Disposed" || "Deleted", * // }, * // }, * // failedVersions: { // PackageVersionErrorMap * // "": { // PackageVersionError * // errorCode: "ALREADY_EXISTS" || "MISMATCHED_REVISION" || "MISMATCHED_STATUS" || "NOT_ALLOWED" || "NOT_FOUND" || "SKIPPED", * // errorMessage: "STRING_VALUE", * // }, * // }, * // }; * * ``` * * @param DeletePackageVersionsCommandInput - {@link DeletePackageVersionsCommandInput} * @returns {@link DeletePackageVersionsCommandOutput} * @see {@link DeletePackageVersionsCommandInput} for command's `input` shape. * @see {@link DeletePackageVersionsCommandOutput} for command's `response` shape. * @see {@link CodeartifactClientResolvedConfig | config} for CodeartifactClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

* The operation did not succeed because of an unauthorized access attempt. *

* * @throws {@link ConflictException} (client fault) *

* The operation did not succeed because prerequisites are not met. *

* * @throws {@link InternalServerException} (server fault) *

The operation did not succeed because of an error that occurred inside CodeArtifact.

* * @throws {@link ResourceNotFoundException} (client fault) *

* The operation did not succeed because the resource requested is not found in the service. *

* * @throws {@link ThrottlingException} (client fault) *

* The operation did not succeed because too many requests are sent to the service. *

* * @throws {@link ValidationException} (client fault) *

* The operation did not succeed because a parameter in the request was sent with an invalid value. *

* * @throws {@link CodeartifactServiceException} *

Base exception class for all service exceptions from Codeartifact service.

* * * @public */ export declare class DeletePackageVersionsCommand extends DeletePackageVersionsCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: DeletePackageVersionsRequest; output: DeletePackageVersionsResult; }; sdk: { input: DeletePackageVersionsCommandInput; output: DeletePackageVersionsCommandOutput; }; }; }