UNPKG

@aws-sdk/client-lambda

Version:

AWS SDK for JavaScript Lambda Client for Node.js, Browser and React Native

97 lines (96 loc) 4.19 kB
import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { DeleteLayerVersionRequest } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link DeleteLayerVersionCommand}. */ export interface DeleteLayerVersionCommandInput extends DeleteLayerVersionRequest { } /** * @public * * The output of {@link DeleteLayerVersionCommand}. */ export interface DeleteLayerVersionCommandOutput extends __MetadataBearer { } declare const DeleteLayerVersionCommand_base: { new (input: DeleteLayerVersionCommandInput): import("@smithy/core/client").CommandImpl<DeleteLayerVersionCommandInput, DeleteLayerVersionCommandOutput, import("..").LambdaClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>; new (input: DeleteLayerVersionCommandInput): import("@smithy/core/client").CommandImpl<DeleteLayerVersionCommandInput, DeleteLayerVersionCommandOutput, import("..").LambdaClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** * <p>Deletes a version of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">Lambda layer</a>. Deleted versions can no longer be viewed or added to functions. To avoid breaking functions, a copy of the version remains in Lambda until no functions refer to it.</p> * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { LambdaClient, DeleteLayerVersionCommand } from "@aws-sdk/client-lambda"; // ES Modules import * // const { LambdaClient, DeleteLayerVersionCommand } = require("@aws-sdk/client-lambda"); // CommonJS import * // import type { LambdaClientConfig } from "@aws-sdk/client-lambda"; * const config = {}; // type is LambdaClientConfig * const client = new LambdaClient(config); * const input = { // DeleteLayerVersionRequest * LayerName: "STRING_VALUE", // required * VersionNumber: Number("long"), // required * }; * const command = new DeleteLayerVersionCommand(input); * const response = await client.send(command); * // {}; * * ``` * * @param DeleteLayerVersionCommandInput - {@link DeleteLayerVersionCommandInput} * @returns {@link DeleteLayerVersionCommandOutput} * @see {@link DeleteLayerVersionCommandInput} for command's `input` shape. * @see {@link DeleteLayerVersionCommandOutput} for command's `response` shape. * @see {@link LambdaClientResolvedConfig | config} for LambdaClient's `config` shape. * * @throws {@link InvalidParameterValueException} (client fault) * <p>One of the parameters in the request is not valid.</p> * * @throws {@link ResourceNotFoundException} (client fault) * <p>The resource specified in the request does not exist.</p> * * @throws {@link ServiceException} (server fault) * <p>The Lambda service encountered an internal error.</p> * * @throws {@link TooManyRequestsException} (client fault) * <p>The request throughput limit was exceeded. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests">Lambda quotas</a>.</p> * * @throws {@link LambdaServiceException} * <p>Base exception class for all service exceptions from Lambda service.</p> * * * @example To delete a version of a Lambda layer * ```javascript * // The following example deletes version 2 of a layer named my-layer. * const input = { * LayerName: "my-layer", * VersionNumber: 2 * }; * const command = new DeleteLayerVersionCommand(input); * const response = await client.send(command); * /* response is * { /* metadata only *\/ } * *\/ * ``` * * @public */ export declare class DeleteLayerVersionCommand extends DeleteLayerVersionCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: DeleteLayerVersionRequest; output: {}; }; sdk: { input: DeleteLayerVersionCommandInput; output: DeleteLayerVersionCommandOutput; }; }; }