EC2InstanceStateChangeNotification

class aws_cdk.mixins_preview.aws_ec2.events.EC2InstanceStateChangeNotification

Bases: object

(experimental) EventBridge event pattern for aws.ec2@EC2InstanceStateChangeNotification.

Stability:

experimental

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.mixins_preview.aws_ec2 import events as ec2_events

e_c2_instance_state_change_notification = ec2_events.EC2InstanceStateChangeNotification()
Stability:

experimental

Static Methods

classmethod ec2_instance_state_change_notification_pattern(*, event_metadata=None, instance_id=None, state=None)

(experimental) EventBridge event pattern for EC2 Instance State-change Notification.

Parameters:
  • event_metadata (Union[AWSEventMetadataProps, Dict[str, Any], None]) – (experimental) EventBridge event metadata. Default: - -

  • instance_id (Optional[Sequence[str]]) – (experimental) instance-id property. Specify an array of string values to match this event if the actual value of instance-id is one of the values in the array. Use one of the constructors on the aws_events.Match for more advanced matching options. Default: - Filter with the Instance reference

  • state (Optional[Sequence[str]]) – (experimental) state property. Specify an array of string values to match this event if the actual value of state is one of the values in the array. Use one of the constructors on the aws_events.Match for more advanced matching options. Default: - Do not filter on this field

Stability:

experimental

Return type:

EventPattern

EC2InstanceStateChangeNotificationProps

class EC2InstanceStateChangeNotification.EC2InstanceStateChangeNotificationProps(*, event_metadata=None, instance_id=None, state=None)

Bases: object

(experimental) Props type for aws.ec2@EC2InstanceStateChangeNotification event.

Parameters:
  • event_metadata (Union[AWSEventMetadataProps, Dict[str, Any], None]) – (experimental) EventBridge event metadata. Default: - -

  • instance_id (Optional[Sequence[str]]) – (experimental) instance-id property. Specify an array of string values to match this event if the actual value of instance-id is one of the values in the array. Use one of the constructors on the aws_events.Match for more advanced matching options. Default: - Filter with the Instance reference

  • state (Optional[Sequence[str]]) – (experimental) state property. Specify an array of string values to match this event if the actual value of state is one of the values in the array. Use one of the constructors on the aws_events.Match for more advanced matching options. Default: - Do not filter on this field

Stability:

experimental

ExampleMetadata:

fixture=_generated

Example:

from aws_cdk import AWSEventMetadataProps
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_ec2 import events as ec2_events

e_c2_instance_state_change_notification_props = ec2_events.EC2InstanceStateChangeNotification.EC2InstanceStateChangeNotificationProps(
    event_metadata=AWSEventMetadataProps(
        region=["region"],
        resources=["resources"],
        version=["version"]
    ),
    instance_id=["instanceId"],
    state=["state"]
)

Attributes

event_metadata

(experimental) EventBridge event metadata.

Default:

Stability:

experimental

instance_id

(experimental) instance-id property.

Specify an array of string values to match this event if the actual value of instance-id is one of the values in the array. Use one of the constructors on the aws_events.Match for more advanced matching options.

Default:
  • Filter with the Instance reference

Stability:

experimental

state

(experimental) state property.

Specify an array of string values to match this event if the actual value of state is one of the values in the array. Use one of the constructors on the aws_events.Match for more advanced matching options.

Default:
  • Do not filter on this field

Stability:

experimental