delete_event_source_mapping - Boto3 1.38.13 documentation (original) (raw)

Toggle table of contents sidebar

Lambda / Client / delete_event_source_mapping

Lambda.Client.delete_event_source_mapping(**kwargs)

Deletes an event source mapping. You can get the identifier of a mapping from the output of ListEventSourceMappings.

When you delete an event source mapping, it enters a Deleting state and might not be completely deleted for several seconds.

See also: AWS API Documentation

Request Syntax

response = client.delete_event_source_mapping( UUID='string' )

Parameters:

UUID (string) –

[REQUIRED]

The identifier of the event source mapping.

Return type:

dict

Returns:

Response Syntax

{ 'UUID': 'string', 'StartingPosition': 'TRIM_HORIZON'|'LATEST'|'AT_TIMESTAMP', 'StartingPositionTimestamp': datetime(2015, 1, 1), 'BatchSize': 123, 'MaximumBatchingWindowInSeconds': 123, 'ParallelizationFactor': 123, 'EventSourceArn': 'string', 'FilterCriteria': { 'Filters': [ { 'Pattern': 'string' }, ] }, 'FunctionArn': 'string', 'LastModified': datetime(2015, 1, 1), 'LastProcessingResult': 'string', 'State': 'string', 'StateTransitionReason': 'string', 'DestinationConfig': { 'OnSuccess': { 'Destination': 'string' }, 'OnFailure': { 'Destination': 'string' } }, 'Topics': [ 'string', ], 'Queues': [ 'string', ], 'SourceAccessConfigurations': [ { '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' }, ], 'SelfManagedEventSource': { 'Endpoints': { 'string': [ 'string', ] } }, 'MaximumRecordAgeInSeconds': 123, 'BisectBatchOnFunctionError': True|False, 'MaximumRetryAttempts': 123, 'TumblingWindowInSeconds': 123, 'FunctionResponseTypes': [ 'ReportBatchItemFailures', ], 'AmazonManagedKafkaEventSourceConfig': { 'ConsumerGroupId': 'string' }, 'SelfManagedKafkaEventSourceConfig': { 'ConsumerGroupId': 'string' }, 'ScalingConfig': { 'MaximumConcurrency': 123 }, 'DocumentDBEventSourceConfig': { 'DatabaseName': 'string', 'CollectionName': 'string', 'FullDocument': 'UpdateLookup'|'Default' }, 'KMSKeyArn': 'string', 'FilterCriteriaError': { 'ErrorCode': 'string', 'Message': 'string' }, 'EventSourceMappingArn': 'string', 'MetricsConfig': { 'Metrics': [ 'EventCount', ] }, 'ProvisionedPollerConfig': { 'MinimumPollers': 123, 'MaximumPollers': 123 } }

Response Structure

Exceptions

Examples

The following example deletes an event source mapping. To get a mapping’s UUID, use ListEventSourceMappings.

response = client.delete_event_source_mapping( UUID='14e0db71-xmpl-4eb5-b481-8945cf9d10c2', )

print(response)

Expected Output:

{ 'BatchSize': 5, 'EventSourceArn': 'arn:aws:sqs:us-west-2:123456789012:my-queue', 'FunctionArn': 'arn:aws:lambda:us-east-2:123456789012:function:my-function', 'LastModified': datetime(2016, 11, 21, 19, 49, 20, 0, 326, 0), 'State': 'Enabled', 'StateTransitionReason': 'USER_INITIATED', 'UUID': '14e0db71-xmpl-4eb5-b481-8945cf9d10c2', 'ResponseMetadata': { '...': '...', }, }