CfnEventSourceMapping
- class aws_cdk.aws_lambda.CfnEventSourceMapping(scope, id, *, function_name, amazon_managed_kafka_event_source_config=None, batch_size=None, bisect_batch_on_function_error=None, destination_config=None, document_db_event_source_config=None, enabled=None, event_source_arn=None, filter_criteria=None, function_response_types=None, kms_key_arn=None, maximum_batching_window_in_seconds=None, maximum_record_age_in_seconds=None, maximum_retry_attempts=None, metrics_config=None, parallelization_factor=None, provisioned_poller_config=None, queues=None, scaling_config=None, self_managed_event_source=None, self_managed_kafka_event_source_config=None, source_access_configurations=None, starting_position=None, starting_position_timestamp=None, tags=None, topics=None, tumbling_window_in_seconds=None)
Bases:
CfnResource
The
AWS::Lambda::EventSourceMapping
resource creates a mapping between an event source and an AWS Lambda function.Lambda reads items from the event source and triggers the function.
For details about each event source type, see the following topics. In particular, each of the topics describes the required and optional parameters for the specific event source.
- See:
- CloudformationResource:
AWS::Lambda::EventSourceMapping
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_lambda as lambda_ cfn_event_source_mapping = lambda_.CfnEventSourceMapping(self, "MyCfnEventSourceMapping", function_name="functionName", # the properties below are optional amazon_managed_kafka_event_source_config=lambda.CfnEventSourceMapping.AmazonManagedKafkaEventSourceConfigProperty( consumer_group_id="consumerGroupId" ), batch_size=123, bisect_batch_on_function_error=False, destination_config=lambda.CfnEventSourceMapping.DestinationConfigProperty( on_failure=lambda.CfnEventSourceMapping.OnFailureProperty( destination="destination" ) ), document_db_event_source_config=lambda.CfnEventSourceMapping.DocumentDBEventSourceConfigProperty( collection_name="collectionName", database_name="databaseName", full_document="fullDocument" ), enabled=False, event_source_arn="eventSourceArn", filter_criteria=lambda.CfnEventSourceMapping.FilterCriteriaProperty( filters=[lambda.CfnEventSourceMapping.FilterProperty( pattern="pattern" )] ), function_response_types=["functionResponseTypes"], kms_key_arn="kmsKeyArn", maximum_batching_window_in_seconds=123, maximum_record_age_in_seconds=123, maximum_retry_attempts=123, metrics_config=lambda.CfnEventSourceMapping.MetricsConfigProperty( metrics=["metrics"] ), parallelization_factor=123, provisioned_poller_config=lambda.CfnEventSourceMapping.ProvisionedPollerConfigProperty( maximum_pollers=123, minimum_pollers=123 ), queues=["queues"], scaling_config=lambda.CfnEventSourceMapping.ScalingConfigProperty( maximum_concurrency=123 ), self_managed_event_source=lambda.CfnEventSourceMapping.SelfManagedEventSourceProperty( endpoints=lambda.CfnEventSourceMapping.EndpointsProperty( kafka_bootstrap_servers=["kafkaBootstrapServers"] ) ), self_managed_kafka_event_source_config=lambda.CfnEventSourceMapping.SelfManagedKafkaEventSourceConfigProperty( consumer_group_id="consumerGroupId" ), source_access_configurations=[lambda.CfnEventSourceMapping.SourceAccessConfigurationProperty( type="type", uri="uri" )], starting_position="startingPosition", starting_position_timestamp=123, tags=[CfnTag( key="key", value="value" )], topics=["topics"], tumbling_window_in_seconds=123 )
- Parameters:
scope (
Construct
) – Scope in which this resource is defined.id (
str
) – Construct identifier for this resource (unique in its scope).function_name (
str
) – The name of the Lambda function.amazon_managed_kafka_event_source_config (
Union
[IResolvable
,AmazonManagedKafkaEventSourceConfigProperty
,Dict
[str
,Any
],None
]) – Specific configuration settings for an MSK event source.batch_size (
Union
[int
,float
,None
]) – The maximum number of items to retrieve in a single batch.bisect_batch_on_function_error (
Union
[bool
,IResolvable
,None
]) – (Streams) If the function returns an error, split the batch in two and retry.destination_config (
Union
[IResolvable
,DestinationConfigProperty
,Dict
[str
,Any
],None
]) – A configuration object that specifies the destination of an event after Lambda processes it.document_db_event_source_config (
Union
[IResolvable
,DocumentDBEventSourceConfigProperty
,Dict
[str
,Any
],None
]) – Document db event source config.enabled (
Union
[bool
,IResolvable
,None
]) – Disables the event source mapping to pause polling and invocation.event_source_arn (
Optional
[str
]) – The Amazon Resource Name (ARN) of the event source.filter_criteria (
Union
[IResolvable
,FilterCriteriaProperty
,Dict
[str
,Any
],None
]) – The filter criteria to control event filtering.function_response_types (
Optional
[Sequence
[str
]]) – (Streams) A list of response types supported by the function.kms_key_arn (
Optional
[str
]) – The Amazon Resource Name (ARN) of the KMS key.maximum_batching_window_in_seconds (
Union
[int
,float
,None
]) – (Streams) The maximum amount of time to gather records before invoking the function, in seconds.maximum_record_age_in_seconds (
Union
[int
,float
,None
]) – (Streams) The maximum age of a record that Lambda sends to a function for processing.maximum_retry_attempts (
Union
[int
,float
,None
]) – (Streams) The maximum number of times to retry when the function returns an error.metrics_config (
Union
[IResolvable
,MetricsConfigProperty
,Dict
[str
,Any
],None
]) – Metrics config for Event Source Mapping Metrics.parallelization_factor (
Union
[int
,float
,None
]) – (Streams) The number of batches to process from each shard concurrently.provisioned_poller_config (
Union
[IResolvable
,ProvisionedPollerConfigProperty
,Dict
[str
,Any
],None
]) – ProvisionedPollerConfig.queues (
Optional
[Sequence
[str
]]) – (ActiveMQ) A list of ActiveMQ queues.scaling_config (
Union
[IResolvable
,ScalingConfigProperty
,Dict
[str
,Any
],None
]) – The scaling configuration for the event source.self_managed_event_source (
Union
[IResolvable
,SelfManagedEventSourceProperty
,Dict
[str
,Any
],None
]) – The configuration used by AWS Lambda to access a self-managed event source.self_managed_kafka_event_source_config (
Union
[IResolvable
,SelfManagedKafkaEventSourceConfigProperty
,Dict
[str
,Any
],None
]) – Specific configuration settings for a Self-Managed Apache Kafka event source.source_access_configurations (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,SourceAccessConfigurationProperty
,Dict
[str
,Any
]]],None
]) – A list of SourceAccessConfiguration.starting_position (
Optional
[str
]) – The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Streams sources.starting_position_timestamp (
Union
[int
,float
,None
]) – With StartingPosition set to AT_TIMESTAMP, the time from which to start reading, in Unix time seconds.tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – A list of tags to apply to event source mapping resource.topics (
Optional
[Sequence
[str
]]) – (Kafka) A list of Kafka topics.tumbling_window_in_seconds (
Union
[int
,float
,None
]) – (Streams) Tumbling window (non-overlapping time window) duration to perform aggregations.
Methods
- add_deletion_override(path)
Syntactic sugar for
addOverride(path, undefined)
.- Parameters:
path (
str
) – The path of the value to delete.- Return type:
None
- add_dependency(target)
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
- Parameters:
target (
CfnResource
) –- Return type:
None
- add_depends_on(target)
(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
- Parameters:
target (
CfnResource
) –- Deprecated:
use addDependency
- Stability:
deprecated
- Return type:
None
- add_metadata(key, value)
Add a value to the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –value (
Any
) –
- See:
- Return type:
None
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- add_override(path, value)
Adds an override to the synthesized CloudFormation resource.
To add a property override, either use
addPropertyOverride
or prefixpath
with “Properties.” (i.e.Properties.TopicName
).If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal
.
in the property name, prefix with a\
. In most programming languages you will need to write this as"\\."
because the\
itself will need to be escaped.For example:
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"]) cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")
would add the overrides Example:
"Properties": { "GlobalSecondaryIndexes": [ { "Projection": { "NonKeyAttributes": [ "myattribute" ] ... } ... }, { "ProjectionType": "INCLUDE" ... }, ] ... }
The
value
argument toaddOverride
will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.- Parameters:
path (
str
) –The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.
value (
Any
) –The value. Could be primitive or complex.
- Return type:
None
- add_property_deletion_override(property_path)
Adds an override that deletes the value of a property from the resource definition.
- Parameters:
property_path (
str
) – The path to the property.- Return type:
None
- add_property_override(property_path, value)
Adds an override to a resource property.
Syntactic sugar for
addOverride("Properties.<...>", value)
.- Parameters:
property_path (
str
) – The path of the property.value (
Any
) – The value.
- Return type:
None
- apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)
Sets the deletion policy of the resource based on the removal policy specified.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT
). A list of resources that support this policy can be found in the following link:- Parameters:
policy (
Optional
[RemovalPolicy
]) –apply_to_update_replace_policy (
Optional
[bool
]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: truedefault (
Optional
[RemovalPolicy
]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.
- See:
- Return type:
None
- get_att(attribute_name, type_hint=None)
Returns a token for an runtime attribute of this resource.
Ideally, use generated attribute accessors (e.g.
resource.arn
), but this can be used for future compatibility in case there is no generated attribute.- Parameters:
attribute_name (
str
) – The name of the attribute.type_hint (
Optional
[ResolutionTypeHint
]) –
- Return type:
- get_metadata(key)
Retrieve a value value from the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –- See:
- Return type:
Any
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- inspect(inspector)
Examines the CloudFormation resource and discloses attributes.
- Parameters:
inspector (
TreeInspector
) – tree inspector to collect and process attributes.- Return type:
None
- obtain_dependencies()
Retrieves an array of resources this resource depends on.
This assembles dependencies on resources across stacks (including nested stacks) automatically.
- Return type:
List
[Union
[Stack
,CfnResource
]]
- obtain_resource_dependencies()
Get a shallow copy of dependencies between this resource and other resources in the same stack.
- Return type:
List
[CfnResource
]
- override_logical_id(new_logical_id)
Overrides the auto-generated logical ID with a specific ID.
- Parameters:
new_logical_id (
str
) – The new logical ID to use for this stack element.- Return type:
None
- remove_dependency(target)
Indicates that this resource no longer depends on another resource.
This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
- Parameters:
target (
CfnResource
) –- Return type:
None
- replace_dependency(target, new_target)
Replaces one dependency with another.
- Parameters:
target (
CfnResource
) – The dependency to replace.new_target (
CfnResource
) – The new dependency to add.
- Return type:
None
- to_string()
Returns a string representation of this construct.
- Return type:
str
- Returns:
a string representation of this resource
Attributes
- CFN_RESOURCE_TYPE_NAME = 'AWS::Lambda::EventSourceMapping'
- amazon_managed_kafka_event_source_config
Specific configuration settings for an MSK event source.
- attr_event_source_mapping_arn
The Amazon Resource Name (ARN) of the event source mapping resource.
- CloudformationAttribute:
EventSourceMappingArn
- attr_id
Event Source Mapping Identifier UUID.
- CloudformationAttribute:
Id
- batch_size
The maximum number of items to retrieve in a single batch.
- bisect_batch_on_function_error
(Streams) If the function returns an error, split the batch in two and retry.
- cdk_tag_manager
Tag Manager which manages the tags for this resource.
- cfn_options
Options for this resource, such as condition, update policy etc.
- cfn_resource_type
AWS resource type.
- creation_stack
return:
the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.
- destination_config
A configuration object that specifies the destination of an event after Lambda processes it.
- document_db_event_source_config
Document db event source config.
- enabled
Disables the event source mapping to pause polling and invocation.
- event_source_arn
The Amazon Resource Name (ARN) of the event source.
- filter_criteria
The filter criteria to control event filtering.
- function_name
The name of the Lambda function.
- function_response_types
(Streams) A list of response types supported by the function.
- kms_key_arn
The Amazon Resource Name (ARN) of the KMS key.
- logical_id
The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use
overrideLogicalId(newLogicalId)
.- Returns:
the logical ID as a stringified token. This value will only get resolved during synthesis.
- maximum_batching_window_in_seconds
(Streams) The maximum amount of time to gather records before invoking the function, in seconds.
- maximum_record_age_in_seconds
(Streams) The maximum age of a record that Lambda sends to a function for processing.
- maximum_retry_attempts
(Streams) The maximum number of times to retry when the function returns an error.
- metrics_config
Metrics config for Event Source Mapping Metrics.
- node
The tree node.
- parallelization_factor
(Streams) The number of batches to process from each shard concurrently.
- provisioned_poller_config
ProvisionedPollerConfig.
- queues
(ActiveMQ) A list of ActiveMQ queues.
- ref
Return a string that will be resolved to a CloudFormation
{ Ref }
for this element.If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through
Lazy.any({ produce: resource.ref })
.
- scaling_config
The scaling configuration for the event source.
- self_managed_event_source
The configuration used by AWS Lambda to access a self-managed event source.
- self_managed_kafka_event_source_config
Specific configuration settings for a Self-Managed Apache Kafka event source.
- source_access_configurations
A list of SourceAccessConfiguration.
- stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
- starting_position
The position in a stream from which to start reading.
- starting_position_timestamp
With StartingPosition set to AT_TIMESTAMP, the time from which to start reading, in Unix time seconds.
- tags
A list of tags to apply to event source mapping resource.
- topics
(Kafka) A list of Kafka topics.
- tumbling_window_in_seconds
(Streams) Tumbling window (non-overlapping time window) duration to perform aggregations.
Static Methods
- classmethod is_cfn_element(x)
Returns
true
if a construct is a stack element (i.e. part of the synthesized cloudformation template).Uses duck-typing instead of
instanceof
to allow stack elements from different versions of this library to be included in the same stack.- Parameters:
x (
Any
) –- Return type:
bool
- Returns:
The construct as a stack element or undefined if it is not a stack element.
- classmethod is_cfn_resource(x)
Check whether the given object is a CfnResource.
- Parameters:
x (
Any
) –- Return type:
bool
- classmethod is_construct(x)
Checks if
x
is a construct.Use this method instead of
instanceof
to properly detectConstruct
instances, even when the construct library is symlinked.Explanation: in JavaScript, multiple copies of the
constructs
library on disk are seen as independent, completely different libraries. As a consequence, the classConstruct
in each copy of theconstructs
library is seen as a different class, and an instance of one class will not test asinstanceof
the other class.npm install
will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of theconstructs
library can be accidentally installed, andinstanceof
will behave unpredictably. It is safest to avoid usinginstanceof
, and using this type-testing method instead.- Parameters:
x (
Any
) – Any object.- Return type:
bool
- Returns:
true if
x
is an object created from a class which extendsConstruct
.
AmazonManagedKafkaEventSourceConfigProperty
- class CfnEventSourceMapping.AmazonManagedKafkaEventSourceConfigProperty(*, consumer_group_id=None)
Bases:
object
Specific configuration settings for an MSK event source.
- Parameters:
consumer_group_id (
Optional
[str
]) – The identifier for the Kafka Consumer Group to join.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_lambda as lambda_ amazon_managed_kafka_event_source_config_property = lambda.CfnEventSourceMapping.AmazonManagedKafkaEventSourceConfigProperty( consumer_group_id="consumerGroupId" )
Attributes
- consumer_group_id
The identifier for the Kafka Consumer Group to join.
DestinationConfigProperty
- class CfnEventSourceMapping.DestinationConfigProperty(*, on_failure=None)
Bases:
object
A configuration object that specifies the destination of an event after Lambda processes it.
- Parameters:
on_failure (
Union
[IResolvable
,OnFailureProperty
,Dict
[str
,Any
],None
]) – A destination for records of invocations that failed processing.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_lambda as lambda_ destination_config_property = lambda.CfnEventSourceMapping.DestinationConfigProperty( on_failure=lambda.CfnEventSourceMapping.OnFailureProperty( destination="destination" ) )
Attributes
- on_failure
A destination for records of invocations that failed processing.
DocumentDBEventSourceConfigProperty
- class CfnEventSourceMapping.DocumentDBEventSourceConfigProperty(*, collection_name=None, database_name=None, full_document=None)
Bases:
object
Document db event source config.
- Parameters:
collection_name (
Optional
[str
]) – The collection name to connect to.database_name (
Optional
[str
]) – The database name to connect to.full_document (
Optional
[str
]) – Include full document in change stream response. The default option will only send the changes made to documents to Lambda. If you want the complete document sent to Lambda, set this to UpdateLookup.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_lambda as lambda_ document_dBEvent_source_config_property = lambda.CfnEventSourceMapping.DocumentDBEventSourceConfigProperty( collection_name="collectionName", database_name="databaseName", full_document="fullDocument" )
Attributes
- collection_name
The collection name to connect to.
- database_name
The database name to connect to.
- full_document
Include full document in change stream response.
The default option will only send the changes made to documents to Lambda. If you want the complete document sent to Lambda, set this to UpdateLookup.
EndpointsProperty
- class CfnEventSourceMapping.EndpointsProperty(*, kafka_bootstrap_servers=None)
Bases:
object
The endpoints used by AWS Lambda to access a self-managed event source.
- Parameters:
kafka_bootstrap_servers (
Optional
[Sequence
[str
]]) – A list of Kafka server endpoints.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_lambda as lambda_ endpoints_property = lambda.CfnEventSourceMapping.EndpointsProperty( kafka_bootstrap_servers=["kafkaBootstrapServers"] )
Attributes
- kafka_bootstrap_servers
A list of Kafka server endpoints.
FilterCriteriaProperty
- class CfnEventSourceMapping.FilterCriteriaProperty(*, filters=None)
Bases:
object
The filter criteria to control event filtering.
- Parameters:
filters (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,FilterProperty
,Dict
[str
,Any
]]],None
]) – List of filters of this FilterCriteria.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_lambda as lambda_ filter_criteria_property = lambda.CfnEventSourceMapping.FilterCriteriaProperty( filters=[lambda.CfnEventSourceMapping.FilterProperty( pattern="pattern" )] )
Attributes
- filters
List of filters of this FilterCriteria.
FilterProperty
- class CfnEventSourceMapping.FilterProperty(*, pattern=None)
Bases:
object
The filter object that defines parameters for ESM filtering.
- Parameters:
pattern (
Optional
[str
]) – The filter pattern that defines which events should be passed for invocations.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_lambda as lambda_ filter_property = lambda.CfnEventSourceMapping.FilterProperty( pattern="pattern" )
Attributes
- pattern
The filter pattern that defines which events should be passed for invocations.
MetricsConfigProperty
- class CfnEventSourceMapping.MetricsConfigProperty(*, metrics=None)
Bases:
object
Metrics config for Event Source Mapping Metrics.
- Parameters:
metrics (
Optional
[Sequence
[str
]]) – Metric groups to enable.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_lambda as lambda_ metrics_config_property = lambda.CfnEventSourceMapping.MetricsConfigProperty( metrics=["metrics"] )
Attributes
OnFailureProperty
- class CfnEventSourceMapping.OnFailureProperty(*, destination=None)
Bases:
object
A destination for records of invocations that failed processing.
- Parameters:
destination (
Optional
[str
]) – The Amazon Resource Name (ARN) of the destination resource.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_lambda as lambda_ on_failure_property = lambda.CfnEventSourceMapping.OnFailureProperty( destination="destination" )
Attributes
- destination
The Amazon Resource Name (ARN) of the destination resource.
ProvisionedPollerConfigProperty
- class CfnEventSourceMapping.ProvisionedPollerConfigProperty(*, maximum_pollers=None, minimum_pollers=None)
Bases:
object
ProvisionedPollerConfig.
- Parameters:
maximum_pollers (
Union
[int
,float
,None
]) – Maximum poller count.minimum_pollers (
Union
[int
,float
,None
]) – Minimum poller count.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_lambda as lambda_ provisioned_poller_config_property = lambda.CfnEventSourceMapping.ProvisionedPollerConfigProperty( maximum_pollers=123, minimum_pollers=123 )
Attributes
- maximum_pollers
Maximum poller count.
ScalingConfigProperty
- class CfnEventSourceMapping.ScalingConfigProperty(*, maximum_concurrency=None)
Bases:
object
The scaling configuration for the event source.
- Parameters:
maximum_concurrency (
Union
[int
,float
,None
]) – The maximum number of concurrent functions that an event source can invoke.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_lambda as lambda_ scaling_config_property = lambda.CfnEventSourceMapping.ScalingConfigProperty( maximum_concurrency=123 )
Attributes
- maximum_concurrency
The maximum number of concurrent functions that an event source can invoke.
SelfManagedEventSourceProperty
- class CfnEventSourceMapping.SelfManagedEventSourceProperty(*, endpoints=None)
Bases:
object
The configuration used by AWS Lambda to access a self-managed event source.
- Parameters:
endpoints (
Union
[IResolvable
,EndpointsProperty
,Dict
[str
,Any
],None
]) – The endpoints used by AWS Lambda to access a self-managed event source.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_lambda as lambda_ self_managed_event_source_property = lambda.CfnEventSourceMapping.SelfManagedEventSourceProperty( endpoints=lambda.CfnEventSourceMapping.EndpointsProperty( kafka_bootstrap_servers=["kafkaBootstrapServers"] ) )
Attributes
- endpoints
The endpoints used by AWS Lambda to access a self-managed event source.
SelfManagedKafkaEventSourceConfigProperty
- class CfnEventSourceMapping.SelfManagedKafkaEventSourceConfigProperty(*, consumer_group_id=None)
Bases:
object
Specific configuration settings for a Self-Managed Apache Kafka event source.
- Parameters:
consumer_group_id (
Optional
[str
]) – The identifier for the Kafka Consumer Group to join.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_lambda as lambda_ self_managed_kafka_event_source_config_property = lambda.CfnEventSourceMapping.SelfManagedKafkaEventSourceConfigProperty( consumer_group_id="consumerGroupId" )
Attributes
- consumer_group_id
The identifier for the Kafka Consumer Group to join.
SourceAccessConfigurationProperty
- class CfnEventSourceMapping.SourceAccessConfigurationProperty(*, type=None, uri=None)
Bases:
object
The configuration used by AWS Lambda to access event source.
- Parameters:
type (
Optional
[str
]) – The type of source access configuration.uri (
Optional
[str
]) – The URI for the source access configuration resource.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_lambda as lambda_ source_access_configuration_property = lambda.CfnEventSourceMapping.SourceAccessConfigurationProperty( type="type", uri="uri" )
Attributes
- type
The type of source access configuration.
- uri
The URI for the source access configuration resource.