CfnSubscriberPropsMixin
- class aws_cdk.cfn_property_mixins.aws_eventsv2.CfnSubscriberPropsMixin(props, *, strategy=None)
Bases:
MixinResource type definition for AWS::EventsV2::Subscriber, an Amazon EventBridge subscription that delivers events from an event bus to a target.
Canonical identity is the combination of bus, name, and target. Replacement uses delete_then_create.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eventsv2-subscriber.html
- CloudformationResource:
AWS::EventsV2::Subscriber
- Mixin:
true
- 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.cfn_property_mixins import aws_eventsv2 as eventsv2 import aws_cdk as cdk # merge_strategy: cdk.IMergeStrategy cfn_subscriber_props_mixin = eventsv2.CfnSubscriberPropsMixin(eventsv2.CfnSubscriberMixinProps( batch_configuration=eventsv2.CfnSubscriberPropsMixin.BatchConfigurationProperty( max_batch_size=123, max_batch_window_in_seconds=123 ), description="description", event_bus_arn="eventBusArn", filter_configuration=eventsv2.CfnSubscriberPropsMixin.FilterConfigurationProperty( filters=[eventsv2.CfnSubscriberPropsMixin.FilterProperty( pattern="pattern", scope="scope" )], language="language" ), log_configuration=eventsv2.CfnSubscriberPropsMixin.LogConfigurationProperty( include_payload="includePayload", level="level" ), name="name", on_failure_configuration=eventsv2.CfnSubscriberPropsMixin.OnFailureConfigurationProperty( arn="arn" ), point_in_time_configuration=eventsv2.CfnSubscriberPropsMixin.PointInTimeConfigurationProperty( end_point=123, point_type="pointType", starting_point=123 ), resume_position="resumePosition", retry_policy=eventsv2.CfnSubscriberPropsMixin.RetryPolicyProperty( max_event_age_in_seconds=123, max_retry_attempts=123, retry_strategy="retryStrategy" ), starting_position="startingPosition", state="state", tags=[cdk.CfnTag( key="key", value="value" )], transformer=eventsv2.CfnSubscriberPropsMixin.TransformerProperty( jsonata_configuration=eventsv2.CfnSubscriberPropsMixin.JsonataConfigurationProperty( expression="expression" ), type="type" ), type="type" ), strategy=merge_strategy )
Create a mixin to apply properties to
AWS::EventsV2::Subscriber.- Parameters:
props (
Union[CfnSubscriberMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[IMergeStrategy]) – Strategy for merging nested properties. Default: - PropertyMergeStrategy.combine()
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
None
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['batchConfiguration', 'description', 'eventBusArn', 'filterConfiguration', 'logConfiguration', 'name', 'onFailureConfiguration', 'pointInTimeConfiguration', 'resumePosition', 'retryPolicy', 'startingPosition', 'state', 'tags', 'transformer', 'type']
Static Methods
- classmethod is_mixin(x)
Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.
BatchConfigurationProperty
- class CfnSubscriberPropsMixin.BatchConfigurationProperty(*, max_batch_size=None, max_batch_window_in_seconds=None)
Bases:
objectConfiguration for batching events into a single delivery.
- Parameters:
max_batch_size (
Union[int,float,None]) – The maximum number of events in a single batch delivered to the target. The maximum depends on the target: 500 for Kinesis Data Streams and Amazon Data Firehose, 100 for Lambda, Step Functions, and AWS::EventsV2::EventBus targets, 10 for Amazon SQS, Amazon SNS, and AWS::Events::EventBus targets, and 1 for API Gateway, API destinations, and universal service integration targets. The service rejects a value above the target’s maximum. Fewer events may be delivered when the batch window elapses. When omitted, the default is 10 for Lambda and Step Functions targets and the target’s maximum for other targets. The resolved value applied by the service is returned on read.max_batch_window_in_seconds (
Union[int,float,None]) – The maximum time in seconds to wait for a batch to fill before delivering it, 0-300. The default is 0 (no wait). The resolved value applied by the service is returned on read.
- 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.cfn_property_mixins import aws_eventsv2 as eventsv2 batch_configuration_property = eventsv2.CfnSubscriberPropsMixin.BatchConfigurationProperty( max_batch_size=123, max_batch_window_in_seconds=123 )
Attributes
- max_batch_size
The maximum number of events in a single batch delivered to the target.
The maximum depends on the target: 500 for Kinesis Data Streams and Amazon Data Firehose, 100 for Lambda, Step Functions, and AWS::EventsV2::EventBus targets, 10 for Amazon SQS, Amazon SNS, and AWS::Events::EventBus targets, and 1 for API Gateway, API destinations, and universal service integration targets. The service rejects a value above the target’s maximum. Fewer events may be delivered when the batch window elapses. When omitted, the default is 10 for Lambda and Step Functions targets and the target’s maximum for other targets. The resolved value applied by the service is returned on read.
- max_batch_window_in_seconds
The maximum time in seconds to wait for a batch to fill before delivering it, 0-300.
The default is 0 (no wait). The resolved value applied by the service is returned on read.
FilterConfigurationProperty
- class CfnSubscriberPropsMixin.FilterConfigurationProperty(*, filters=None, language=None)
Bases:
objectConfiguration for filtering which events are delivered to the target.
An event must match every filter to be delivered.
- Parameters:
filters (
Union[IResolvable,Sequence[Union[IResolvable,FilterProperty,Dict[str,Any]]],None]) – The list of filters, 1-50 entries. An event must match every filter to be delivered.language (
Optional[str]) – The filter language. The default is EVENT_BRIDGE_PATTERN.
- 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.cfn_property_mixins import aws_eventsv2 as eventsv2 filter_configuration_property = eventsv2.CfnSubscriberPropsMixin.FilterConfigurationProperty( filters=[eventsv2.CfnSubscriberPropsMixin.FilterProperty( pattern="pattern", scope="scope" )], language="language" )
Attributes
- filters
The list of filters, 1-50 entries.
An event must match every filter to be delivered.
- language
The filter language.
The default is EVENT_BRIDGE_PATTERN.
FilterProperty
- class CfnSubscriberPropsMixin.FilterProperty(*, pattern=None, scope=None)
Bases:
objectA single filter entry: an event pattern and the scope of the event it is evaluated against.
- Parameters:
pattern (
Optional[str]) – The event pattern, as a JSON string.scope (
Optional[str]) – Which part of the event the pattern is evaluated against: DATA (the event payload), METADATA (event metadata), or SYSTEM_METADATA (service-generated metadata).
- 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.cfn_property_mixins import aws_eventsv2 as eventsv2 filter_property = eventsv2.CfnSubscriberPropsMixin.FilterProperty( pattern="pattern", scope="scope" )
Attributes
- pattern
The event pattern, as a JSON string.
- scope
DATA (the event payload), METADATA (event metadata), or SYSTEM_METADATA (service-generated metadata).
- See:
- Type:
Which part of the event the pattern is evaluated against
JsonataConfigurationProperty
- class CfnSubscriberPropsMixin.JsonataConfigurationProperty(*, expression=None)
Bases:
objectJSONata transform settings.
- Parameters:
expression (
Optional[str]) – The JSONata expression that transforms the event, enclosed in {% %} delimiters.- 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.cfn_property_mixins import aws_eventsv2 as eventsv2 jsonata_configuration_property = eventsv2.CfnSubscriberPropsMixin.JsonataConfigurationProperty( expression="expression" )
Attributes
- expression
The JSONata expression that transforms the event, enclosed in {% %} delimiters.
LogConfigurationProperty
- class CfnSubscriberPropsMixin.LogConfigurationProperty(*, include_payload=None, level=None)
Bases:
objectDelivery logging configuration.
- Parameters:
include_payload (
Optional[str]) – Whether the event payload is included in emitted log records: FULL includes it in every emitted record, and ON_ERROR_ONLY includes it only in error records. The default is ON_ERROR_ONLY.level (
Optional[str]) – The minimum log level: OFF (no logging), ERROR, or INFO. Records below this level are not emitted. The default is OFF.
- 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.cfn_property_mixins import aws_eventsv2 as eventsv2 log_configuration_property = eventsv2.CfnSubscriberPropsMixin.LogConfigurationProperty( include_payload="includePayload", level="level" )
Attributes
- include_payload
FULL includes it in every emitted record, and ON_ERROR_ONLY includes it only in error records.
The default is ON_ERROR_ONLY.
- See:
- Type:
Whether the event payload is included in emitted log records
- level
OFF (no logging), ERROR, or INFO.
Records below this level are not emitted. The default is OFF.
OnFailureConfigurationProperty
- class CfnSubscriberPropsMixin.OnFailureConfigurationProperty(*, arn=None)
Bases:
objectThe destination for events that could not be delivered.
- Parameters:
arn (
Optional[str]) – The ARN of the destination that receives events that could not be delivered. An Amazon SQS queue is the supported destination.- 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.cfn_property_mixins import aws_eventsv2 as eventsv2 on_failure_configuration_property = eventsv2.CfnSubscriberPropsMixin.OnFailureConfigurationProperty( arn="arn" )
Attributes
- arn
The ARN of the destination that receives events that could not be delivered.
An Amazon SQS queue is the supported destination.
PointInTimeConfigurationProperty
- class CfnSubscriberPropsMixin.PointInTimeConfigurationProperty(*, end_point=None, point_type=None, starting_point=None)
Bases:
objectThe point in time to start delivering events from, used when StartingPosition is POINT_IN_TIME.
- Parameters:
end_point (
Union[int,float,None]) – An optional time to stop delivering events at, in seconds since the Unix epoch.point_type (
Optional[str]) – Where to start: HORIZON starts from the earliest available event; TIMESTAMP starts from the StartingPoint timestamp.starting_point (
Union[int,float,None]) – The time to start delivering events from, in seconds since the Unix epoch. Required when PointType is TIMESTAMP.
- 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.cfn_property_mixins import aws_eventsv2 as eventsv2 point_in_time_configuration_property = eventsv2.CfnSubscriberPropsMixin.PointInTimeConfigurationProperty( end_point=123, point_type="pointType", starting_point=123 )
Attributes
- end_point
An optional time to stop delivering events at, in seconds since the Unix epoch.
- point_type
HORIZON starts from the earliest available event;
TIMESTAMP starts from the StartingPoint timestamp.
- starting_point
The time to start delivering events from, in seconds since the Unix epoch.
Required when PointType is TIMESTAMP.
RetryPolicyProperty
- class CfnSubscriberPropsMixin.RetryPolicyProperty(*, max_event_age_in_seconds=None, max_retry_attempts=None, retry_strategy=None)
Bases:
objectThe retry policy for failed deliveries.
- Parameters:
max_event_age_in_seconds (
Union[int,float,None]) – The maximum age of an event in seconds, 60-86400 (24 hours). When an event reaches this age, retries stop; if OnFailureConfiguration is set, the event is delivered to that destination, otherwise it is dropped. The default is 300.max_retry_attempts (
Union[int,float,None]) – The maximum number of retry attempts, 0-185. When the attempts are exhausted, retries stop; if OnFailureConfiguration is set, the event is delivered to that destination, otherwise it is dropped. The default is 5.retry_strategy (
Optional[str]) – Which errors are retried. ALL retries all errors. The default is ALL.
- 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.cfn_property_mixins import aws_eventsv2 as eventsv2 retry_policy_property = eventsv2.CfnSubscriberPropsMixin.RetryPolicyProperty( max_event_age_in_seconds=123, max_retry_attempts=123, retry_strategy="retryStrategy" )
Attributes
- max_event_age_in_seconds
The maximum age of an event in seconds, 60-86400 (24 hours).
When an event reaches this age, retries stop; if OnFailureConfiguration is set, the event is delivered to that destination, otherwise it is dropped. The default is 300.
- max_retry_attempts
The maximum number of retry attempts, 0-185.
When the attempts are exhausted, retries stop; if OnFailureConfiguration is set, the event is delivered to that destination, otherwise it is dropped. The default is 5.
- retry_strategy
Which errors are retried.
ALL retries all errors. The default is ALL.
TransformerProperty
- class CfnSubscriberPropsMixin.TransformerProperty(*, jsonata_configuration=None, type=None)
Bases:
objectConfiguration for transforming events before delivery: the raw payload, the payload with its metadata envelope, or the output of a JSONata expression.
- Parameters:
jsonata_configuration (
Union[IResolvable,JsonataConfigurationProperty,Dict[str,Any],None]) – JSONata transform settings.type (
Optional[str]) – The transform type: RAW delivers the event payload only; WITH_METADATA delivers the event with its metadata envelope; JSONATA delivers the output of the JSONata expression in JsonataConfiguration.
- 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.cfn_property_mixins import aws_eventsv2 as eventsv2 transformer_property = eventsv2.CfnSubscriberPropsMixin.TransformerProperty( jsonata_configuration=eventsv2.CfnSubscriberPropsMixin.JsonataConfigurationProperty( expression="expression" ), type="type" )
Attributes
- jsonata_configuration
JSONata transform settings.
- type
RAW delivers the event payload only;
WITH_METADATA delivers the event with its metadata envelope; JSONATA delivers the output of the JSONata expression in JsonataConfiguration.