CfnSubscriber

class aws_cdk.aws_eventsv2.CfnSubscriber(scope, id, *, event_bus_arn, name, batch_configuration=None, description=None, filter_configuration=None, log_configuration=None, on_failure_configuration=None, point_in_time_configuration=None, resume_position=None, retry_policy=None, starting_position=None, state=None, tags=None, transformer=None, type=None)

Bases: CfnResource

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

ExampleMetadata:

fixture=_generated

Example:

from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_eventsv2 as eventsv2

cfn_subscriber = eventsv2.CfnSubscriber(self, "MyCfnSubscriber",
    event_bus_arn="eventBusArn",
    name="name",

    # the properties below are optional
    batch_configuration=eventsv2.CfnSubscriber.BatchConfigurationProperty(
        max_batch_size=123,
        max_batch_window_in_seconds=123
    ),
    description="description",
    filter_configuration=eventsv2.CfnSubscriber.FilterConfigurationProperty(
        filters=[eventsv2.CfnSubscriber.FilterProperty(
            pattern="pattern",
            scope="scope"
        )],

        # the properties below are optional
        language="language"
    ),
    log_configuration=eventsv2.CfnSubscriber.LogConfigurationProperty(
        include_payload="includePayload",
        level="level"
    ),
    on_failure_configuration=eventsv2.CfnSubscriber.OnFailureConfigurationProperty(
        arn="arn"
    ),
    point_in_time_configuration=eventsv2.CfnSubscriber.PointInTimeConfigurationProperty(
        point_type="pointType",

        # the properties below are optional
        end_point=123,
        starting_point=123
    ),
    resume_position="resumePosition",
    retry_policy=eventsv2.CfnSubscriber.RetryPolicyProperty(
        max_event_age_in_seconds=123,
        max_retry_attempts=123,
        retry_strategy="retryStrategy"
    ),
    starting_position="startingPosition",
    state="state",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    transformer=eventsv2.CfnSubscriber.TransformerProperty(
        jsonata_configuration=eventsv2.CfnSubscriber.JsonataConfigurationProperty(
            expression="expression"
        ),
        type="type"
    ),
    type="type"
)

Create a new AWS::EventsV2::Subscriber.

Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • event_bus_arn (str) – The ARN of the event bus this subscriber belongs to.

  • name (str) – The name of the subscriber. The first character must be alphanumeric; the remaining characters may also include ‘.’, ‘-’, and ‘_’.

  • batch_configuration (Union[IResolvable, BatchConfigurationProperty, Dict[str, Any], None]) – Configuration for batching events into a single delivery.

  • description (Optional[str]) – A description of the subscriber. Control characters and Unicode line separators are not allowed.

  • filter_configuration (Union[IResolvable, FilterConfigurationProperty, Dict[str, Any], None]) – Configuration for filtering which events are delivered to the target. An event must match every filter to be delivered.

  • log_configuration (Union[IResolvable, LogConfigurationProperty, Dict[str, Any], None]) – Delivery logging configuration.

  • on_failure_configuration (Union[IResolvable, OnFailureConfigurationProperty, Dict[str, Any], None]) – The destination for events that could not be delivered.

  • point_in_time_configuration (Union[IResolvable, PointInTimeConfigurationProperty, Dict[str, Any], None]) – The point in time to start delivering events from, used when StartingPosition is POINT_IN_TIME.

  • resume_position (Optional[str]) – Resume-time control, never returned by the service. Applied only when an update transitions State from STOPPED to RUNNING: LAST_PROCESSED (default) resumes from the last processed event, LATEST skips to the newest. Ignored on create and on any update that does not perform that transition.

  • retry_policy (Union[IResolvable, RetryPolicyProperty, Dict[str, Any], None]) – The retry policy for failed deliveries.

  • starting_position (Optional[str]) – Where the subscriber starts reading events: LATEST starts from the newest events; POINT_IN_TIME starts from the point specified in PointInTimeConfiguration.

  • state (Optional[str]) – The run state of the subscriber. Events are delivered only while the state is RUNNING. Setting the state to STOPPED pauses delivery. When an update sets a stopped subscriber back to RUNNING, ResumePosition controls where delivery resumes.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – The tags assigned to the subscriber.

  • transformer (Union[IResolvable, TransformerProperty, Dict[str, Any], None]) – Configuration for transforming events before delivery: the raw payload, the payload with its metadata envelope, or the output of a JSONata expression.

  • type (Optional[str]) – The delivery ordering mode of the subscriber. FIFO delivers events in order within an event group; UNORDERED delivers without an ordering guarantee.

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)

(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This method has been renamed to addResourceDependency to more clearly set it apart from construct.node.addDependency. See the documentation of that function for more details.

Parameters:

target (CfnResource)

Deprecated:

Use addResourceDependency instead.

Stability:

deprecated

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.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

This method has been renamed to addResourceDependency, which makes it more clear that this method operates at a different level from the construct-level construct.node.addDependency() mechanism.

Parameters:

target (CfnResource)

Deprecated:

Use addResourceDependency instead.

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

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

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 prefix path 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 to addOverride 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

add_resource_dependency(target, reason=None)

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.

This method only adds dependencies between L1 resources. If you are looking for a generic construct-to-construct dependency mechanism that works for all constructs including L2s, use construct.node.addDependency instead.

Parameters:
Return type:

None

apply_cross_stack_reference_strength(strength)

Sets the cross-stack reference strength for this resource.

When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack’s context.

Parameters:

strength (ReferenceStrength) –

  • The reference strength to use for this resource.

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

  • default (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:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

cfn_property_name(cdk_property_name)
Parameters:

cdk_property_name (str)

Return type:

Optional[str]

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:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str)

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

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 and stacks this resource depends on.

For resources depended on directly, returns the CfnResource object. For dependencies on other stacks, returns the Stack object. The order of the array is not guaranteed.

Return type:

List[Union[Stack, 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)

(deprecated) 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)

Deprecated:

Use removeResourceDependency instead

Stability:

deprecated

Return type:

None

remove_resource_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:
Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

with_(*mixins)

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

Parameters:

mixins (IMixin)

Return type:

IConstruct

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::EventsV2::Subscriber'
attr_bus_name

The name of the event bus this subscriber belongs to.

This property is read-only.

CloudformationAttribute:

BusName

attr_creation_time

Creation timestamp (ISO-8601), read-only.

CloudformationAttribute:

CreationTime

attr_last_modified_time

Last-modification timestamp (ISO-8601), read-only.

CloudformationAttribute:

LastModifiedTime

attr_subscriber_arn

The Amazon Resource Name (ARN) of the subscriber.

CloudformationAttribute:

SubscriberArn

batch_configuration

Configuration for batching events into a single delivery.

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.

description

A description of the subscriber.

env
event_bus_arn

The ARN of the event bus this subscriber belongs to.

filter_configuration

Configuration for filtering which events are delivered to the target.

log_configuration

Delivery logging configuration.

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.

name

The name of the subscriber.

node

The tree node.

on_failure_configuration

The destination for events that could not be delivered.

point_in_time_configuration

The point in time to start delivering events from, used when StartingPosition is POINT_IN_TIME.

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 }).

resume_position

Resume-time control, never returned by the service.

retry_policy

The retry policy for failed deliveries.

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

starting_position

LATEST starts from the newest events;

Type:

Where the subscriber starts reading events

state

The run state of the subscriber.

subscriber_ref

A reference to a Subscriber resource.

tags

The tags assigned to the subscriber.

transformer

the raw payload, the payload with its metadata envelope, or the output of a JSONata expression.

Type:

Configuration for transforming events before delivery

type

The delivery ordering mode of the subscriber.

Static Methods

classmethod arn_for_subscriber(resource)
Parameters:

resource (ISubscriberRef)

Return type:

str

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_cfn_subscriber(x)

Checks whether the given object is a CfnSubscriber.

Parameters:

x (Any)

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct 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 class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof 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 the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, 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 extends Construct.

BatchConfigurationProperty

class CfnSubscriber.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 import aws_eventsv2 as eventsv2

batch_configuration_property = eventsv2.CfnSubscriber.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 CfnSubscriber.FilterConfigurationProperty(*, filters, 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]]]]) – 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 import aws_eventsv2 as eventsv2

filter_configuration_property = eventsv2.CfnSubscriber.FilterConfigurationProperty(
    filters=[eventsv2.CfnSubscriber.FilterProperty(
        pattern="pattern",
        scope="scope"
    )],

    # the properties below are optional
    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 CfnSubscriber.FilterProperty(*, pattern, scope)

Bases: object

A single filter entry: an event pattern and the scope of the event it is evaluated against.

Parameters:
  • pattern (str) – The event pattern, as a JSON string.

  • scope (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 import aws_eventsv2 as eventsv2

filter_property = eventsv2.CfnSubscriber.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 CfnSubscriber.JsonataConfigurationProperty(*, expression)

Bases: object

JSONata transform settings.

Parameters:

expression (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 import aws_eventsv2 as eventsv2

jsonata_configuration_property = eventsv2.CfnSubscriber.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 CfnSubscriber.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 import aws_eventsv2 as eventsv2

log_configuration_property = eventsv2.CfnSubscriber.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 CfnSubscriber.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 import aws_eventsv2 as eventsv2

on_failure_configuration_property = eventsv2.CfnSubscriber.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 CfnSubscriber.PointInTimeConfigurationProperty(*, point_type, end_point=None, starting_point=None)

Bases: object

The point in time to start delivering events from, used when StartingPosition is POINT_IN_TIME.

Parameters:
  • point_type (str) – Where to start: HORIZON starts from the earliest available event; TIMESTAMP starts from the StartingPoint timestamp.

  • end_point (Union[int, float, None]) – An optional time to stop delivering events at, in seconds since the Unix epoch.

  • 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 import aws_eventsv2 as eventsv2

point_in_time_configuration_property = eventsv2.CfnSubscriber.PointInTimeConfigurationProperty(
    point_type="pointType",

    # the properties below are optional
    end_point=123,
    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 CfnSubscriber.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 import aws_eventsv2 as eventsv2

retry_policy_property = eventsv2.CfnSubscriber.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 CfnSubscriber.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 import aws_eventsv2 as eventsv2

transformer_property = eventsv2.CfnSubscriber.TransformerProperty(
    jsonata_configuration=eventsv2.CfnSubscriber.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