CfnSubscriberPropsMixin

class aws_cdk.cfn_property_mixins.aws_eventsv2.CfnSubscriberPropsMixin(props, *, strategy=None)

Bases: Mixin

Resource 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 x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

BatchConfigurationProperty

class CfnSubscriberPropsMixin.BatchConfigurationProperty(*, max_batch_size=None, max_batch_window_in_seconds=None)

Bases: object

Configuration 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:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-batchconfiguration.html

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-batchconfiguration.html#cfn-eventsv2-subscriber-batchconfiguration-maxbatchsize

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-batchconfiguration.html#cfn-eventsv2-subscriber-batchconfiguration-maxbatchwindowinseconds

FilterConfigurationProperty

class CfnSubscriberPropsMixin.FilterConfigurationProperty(*, filters=None, language=None)

Bases: object

Configuration 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:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-filterconfiguration.html

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-filterconfiguration.html#cfn-eventsv2-subscriber-filterconfiguration-filters

language

The filter language.

The default is EVENT_BRIDGE_PATTERN.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-filterconfiguration.html#cfn-eventsv2-subscriber-filterconfiguration-language

FilterProperty

class CfnSubscriberPropsMixin.FilterProperty(*, pattern=None, scope=None)

Bases: object

A 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:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-filter.html

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-filter.html#cfn-eventsv2-subscriber-filter-pattern

scope

DATA (the event payload), METADATA (event metadata), or SYSTEM_METADATA (service-generated metadata).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-filter.html#cfn-eventsv2-subscriber-filter-scope

Type:

Which part of the event the pattern is evaluated against

JsonataConfigurationProperty

class CfnSubscriberPropsMixin.JsonataConfigurationProperty(*, expression=None)

Bases: object

JSONata transform settings.

Parameters:

expression (Optional[str]) – The JSONata expression that transforms the event, enclosed in {% %} delimiters.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-jsonataconfiguration.html

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-jsonataconfiguration.html#cfn-eventsv2-subscriber-jsonataconfiguration-expression

LogConfigurationProperty

class CfnSubscriberPropsMixin.LogConfigurationProperty(*, include_payload=None, level=None)

Bases: object

Delivery 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:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-logconfiguration.html

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:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-logconfiguration.html#cfn-eventsv2-subscriber-logconfiguration-includepayload

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-logconfiguration.html#cfn-eventsv2-subscriber-logconfiguration-level

Type:

The minimum log level

OnFailureConfigurationProperty

class CfnSubscriberPropsMixin.OnFailureConfigurationProperty(*, arn=None)

Bases: object

The 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:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-onfailureconfiguration.html

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-onfailureconfiguration.html#cfn-eventsv2-subscriber-onfailureconfiguration-arn

PointInTimeConfigurationProperty

class CfnSubscriberPropsMixin.PointInTimeConfigurationProperty(*, end_point=None, point_type=None, starting_point=None)

Bases: object

The 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:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-pointintimeconfiguration.html

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-pointintimeconfiguration.html#cfn-eventsv2-subscriber-pointintimeconfiguration-endpoint

point_type

HORIZON starts from the earliest available event;

TIMESTAMP starts from the StartingPoint timestamp.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-pointintimeconfiguration.html#cfn-eventsv2-subscriber-pointintimeconfiguration-pointtype

Type:

Where to start

starting_point

The time to start delivering events from, in seconds since the Unix epoch.

Required when PointType is TIMESTAMP.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-pointintimeconfiguration.html#cfn-eventsv2-subscriber-pointintimeconfiguration-startingpoint

RetryPolicyProperty

class CfnSubscriberPropsMixin.RetryPolicyProperty(*, max_event_age_in_seconds=None, max_retry_attempts=None, retry_strategy=None)

Bases: object

The 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:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-retrypolicy.html

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-retrypolicy.html#cfn-eventsv2-subscriber-retrypolicy-maxeventageinseconds

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-retrypolicy.html#cfn-eventsv2-subscriber-retrypolicy-maxretryattempts

retry_strategy

Which errors are retried.

ALL retries all errors. The default is ALL.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-retrypolicy.html#cfn-eventsv2-subscriber-retrypolicy-retrystrategy

TransformerProperty

class CfnSubscriberPropsMixin.TransformerProperty(*, jsonata_configuration=None, type=None)

Bases: object

Configuration 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:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-transformer.html

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-transformer.html#cfn-eventsv2-subscriber-transformer-jsonataconfiguration

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:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eventsv2-subscriber-transformer.html#cfn-eventsv2-subscriber-transformer-type

Type:

The transform type