@aws-sdk/client-lambda
Version:
AWS SDK for JavaScript Lambda Client for Node.js, Browser and React Native
223 lines (222 loc) • 9.54 kB
TypeScript
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { LambdaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LambdaClient";
import { DeleteEventSourceMappingRequest, EventSourceMappingConfiguration } from "../models/models_0";
/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link DeleteEventSourceMappingCommand}.
*/
export interface DeleteEventSourceMappingCommandInput extends DeleteEventSourceMappingRequest {
}
/**
* @public
*
* The output of {@link DeleteEventSourceMappingCommand}.
*/
export interface DeleteEventSourceMappingCommandOutput extends EventSourceMappingConfiguration, __MetadataBearer {
}
declare const DeleteEventSourceMappingCommand_base: {
new (input: DeleteEventSourceMappingCommandInput): import("@smithy/smithy-client").CommandImpl<DeleteEventSourceMappingCommandInput, DeleteEventSourceMappingCommandOutput, LambdaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
new (input: DeleteEventSourceMappingCommandInput): import("@smithy/smithy-client").CommandImpl<DeleteEventSourceMappingCommandInput, DeleteEventSourceMappingCommandOutput, LambdaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
/**
* <p>Deletes an <a href="https://docs.aws.amazon.com/lambda/latest/dg/intro-invocation-modes.html">event source mapping</a>. You can get the identifier of a mapping from the output of <a>ListEventSourceMappings</a>.</p> <p>When you delete an event source mapping, it enters a <code>Deleting</code> state and might not be completely deleted for several seconds.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { LambdaClient, DeleteEventSourceMappingCommand } from "@aws-sdk/client-lambda"; // ES Modules import
* // const { LambdaClient, DeleteEventSourceMappingCommand } = require("@aws-sdk/client-lambda"); // CommonJS import
* const client = new LambdaClient(config);
* const input = { // DeleteEventSourceMappingRequest
* UUID: "STRING_VALUE", // required
* };
* const command = new DeleteEventSourceMappingCommand(input);
* const response = await client.send(command);
* // { // EventSourceMappingConfiguration
* // UUID: "STRING_VALUE",
* // StartingPosition: "TRIM_HORIZON" || "LATEST" || "AT_TIMESTAMP",
* // StartingPositionTimestamp: new Date("TIMESTAMP"),
* // BatchSize: Number("int"),
* // MaximumBatchingWindowInSeconds: Number("int"),
* // ParallelizationFactor: Number("int"),
* // EventSourceArn: "STRING_VALUE",
* // FilterCriteria: { // FilterCriteria
* // Filters: [ // FilterList
* // { // Filter
* // Pattern: "STRING_VALUE",
* // },
* // ],
* // },
* // FunctionArn: "STRING_VALUE",
* // LastModified: new Date("TIMESTAMP"),
* // LastProcessingResult: "STRING_VALUE",
* // State: "STRING_VALUE",
* // StateTransitionReason: "STRING_VALUE",
* // DestinationConfig: { // DestinationConfig
* // OnSuccess: { // OnSuccess
* // Destination: "STRING_VALUE",
* // },
* // OnFailure: { // OnFailure
* // Destination: "STRING_VALUE",
* // },
* // },
* // Topics: [ // Topics
* // "STRING_VALUE",
* // ],
* // Queues: [ // Queues
* // "STRING_VALUE",
* // ],
* // SourceAccessConfigurations: [ // SourceAccessConfigurations
* // { // SourceAccessConfiguration
* // Type: "BASIC_AUTH" || "VPC_SUBNET" || "VPC_SECURITY_GROUP" || "SASL_SCRAM_512_AUTH" || "SASL_SCRAM_256_AUTH" || "VIRTUAL_HOST" || "CLIENT_CERTIFICATE_TLS_AUTH" || "SERVER_ROOT_CA_CERTIFICATE",
* // URI: "STRING_VALUE",
* // },
* // ],
* // SelfManagedEventSource: { // SelfManagedEventSource
* // Endpoints: { // Endpoints
* // "<keys>": [ // EndpointLists
* // "STRING_VALUE",
* // ],
* // },
* // },
* // MaximumRecordAgeInSeconds: Number("int"),
* // BisectBatchOnFunctionError: true || false,
* // MaximumRetryAttempts: Number("int"),
* // TumblingWindowInSeconds: Number("int"),
* // FunctionResponseTypes: [ // FunctionResponseTypeList
* // "ReportBatchItemFailures",
* // ],
* // AmazonManagedKafkaEventSourceConfig: { // AmazonManagedKafkaEventSourceConfig
* // ConsumerGroupId: "STRING_VALUE",
* // SchemaRegistryConfig: { // KafkaSchemaRegistryConfig
* // SchemaRegistryURI: "STRING_VALUE",
* // EventRecordFormat: "JSON" || "SOURCE",
* // AccessConfigs: [ // KafkaSchemaRegistryAccessConfigList
* // { // KafkaSchemaRegistryAccessConfig
* // Type: "BASIC_AUTH" || "CLIENT_CERTIFICATE_TLS_AUTH" || "SERVER_ROOT_CA_CERTIFICATE",
* // URI: "STRING_VALUE",
* // },
* // ],
* // SchemaValidationConfigs: [ // KafkaSchemaValidationConfigList
* // { // KafkaSchemaValidationConfig
* // Attribute: "KEY" || "VALUE",
* // },
* // ],
* // },
* // },
* // SelfManagedKafkaEventSourceConfig: { // SelfManagedKafkaEventSourceConfig
* // ConsumerGroupId: "STRING_VALUE",
* // SchemaRegistryConfig: {
* // SchemaRegistryURI: "STRING_VALUE",
* // EventRecordFormat: "JSON" || "SOURCE",
* // AccessConfigs: [
* // {
* // Type: "BASIC_AUTH" || "CLIENT_CERTIFICATE_TLS_AUTH" || "SERVER_ROOT_CA_CERTIFICATE",
* // URI: "STRING_VALUE",
* // },
* // ],
* // SchemaValidationConfigs: [
* // {
* // Attribute: "KEY" || "VALUE",
* // },
* // ],
* // },
* // },
* // ScalingConfig: { // ScalingConfig
* // MaximumConcurrency: Number("int"),
* // },
* // DocumentDBEventSourceConfig: { // DocumentDBEventSourceConfig
* // DatabaseName: "STRING_VALUE",
* // CollectionName: "STRING_VALUE",
* // FullDocument: "UpdateLookup" || "Default",
* // },
* // KMSKeyArn: "STRING_VALUE",
* // FilterCriteriaError: { // FilterCriteriaError
* // ErrorCode: "STRING_VALUE",
* // Message: "STRING_VALUE",
* // },
* // EventSourceMappingArn: "STRING_VALUE",
* // MetricsConfig: { // EventSourceMappingMetricsConfig
* // Metrics: [ // EventSourceMappingMetricList
* // "EventCount",
* // ],
* // },
* // ProvisionedPollerConfig: { // ProvisionedPollerConfig
* // MinimumPollers: Number("int"),
* // MaximumPollers: Number("int"),
* // },
* // };
*
* ```
*
* @param DeleteEventSourceMappingCommandInput - {@link DeleteEventSourceMappingCommandInput}
* @returns {@link DeleteEventSourceMappingCommandOutput}
* @see {@link DeleteEventSourceMappingCommandInput} for command's `input` shape.
* @see {@link DeleteEventSourceMappingCommandOutput} 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 ResourceConflictException} (client fault)
* <p>The resource already exists, or another operation is in progress.</p>
*
* @throws {@link ResourceInUseException} (client fault)
* <p>The operation conflicts with the resource's availability. For example, you tried to update an event source mapping in the CREATING state, or you tried to delete an event source mapping currently UPDATING.</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 Lambda function event source mapping
* ```javascript
* // The following example deletes an event source mapping. To get a mapping's UUID, use ListEventSourceMappings.
* const input = {
* UUID: "14e0db71-xmpl-4eb5-b481-8945cf9d10c2"
* };
* const command = new DeleteEventSourceMappingCommand(input);
* const response = await client.send(command);
* /* response is
* {
* BatchSize: 5,
* EventSourceArn: "arn:aws:sqs:us-west-2:123456789012:my-queue",
* FunctionArn: "arn:aws:lambda:us-east-2:123456789012:function:my-function",
* LastModified: "2016-11-21T19:49:20.006Z",
* State: "Enabled",
* StateTransitionReason: "USER_INITIATED",
* UUID: "14e0db71-xmpl-4eb5-b481-8945cf9d10c2"
* }
* *\/
* ```
*
* @public
*/
export declare class DeleteEventSourceMappingCommand extends DeleteEventSourceMappingCommand_base {
/** @internal type navigation helper, not in runtime. */
protected static __types: {
api: {
input: DeleteEventSourceMappingRequest;
output: EventSourceMappingConfiguration;
};
sdk: {
input: DeleteEventSourceMappingCommandInput;
output: DeleteEventSourceMappingCommandOutput;
};
};
}