aws_ddk_core.stages.S3EventStage¶
- class aws_ddk_core.stages.S3EventStage(*args: Any, **kwargs)¶
Class that represents an S3 Event DDK Stage.
- __init__(scope: constructs.Construct, id: str, environment_id: str, event_names: List[str], bucket_name: str, key_prefix: Optional[str] = None, **kwargs: Any) None ¶
DDK S3 Event stage.
It implements an S3 event pattern based on event names, a bucket name and optional key prefix. A CloudTrail Trail and associated bucket are created to enable S3 object level tracking.
- Parameters
scope (Construct) – Scope within which this construct is defined
id (str) – Identifier of the stage
environment_id (str) – Identifier of the environment
event_names (Optional[List[str]]) – https://docs.aws.amazon.com/AmazonS3/latest/userguide/cloudtrail-logging-s3-info.html#cloudtrail-object-level-tracking The list of events to capture
bucket_name (str) – The name of the S3 bucket
key_prefix (Optional[str]) – The S3 prefix. Capture root level prefix (“/”) by default
Methods
__init__
(scope, id, environment_id, ...[, ...])DDK S3 Event stage.
Get output event pattern of the stage.
Get input targets of the stage.
is_construct
(x)(deprecated) Checks if
x
is a construct.to_string
()Returns a string representation of this construct.
Attributes
EventPattern The S3 event pattern
node
The tree node.
Trail The CloudTrail Trail
IBucket The CloudTrail Trail bucket
- property event_pattern: aws_cdk.aws_events.EventPattern¶
EventPattern The S3 event pattern
- Type
Return
- get_event_pattern() Optional[aws_cdk.aws_events.EventPattern] ¶
Get output event pattern of the stage.
Event pattern describes the structure of output event(s) produced by this stage. Event Rules use event patterns to select events and route them to targets.
- Returns
event_pattern – Event pattern
- Return type
Optional[EventPattern]
- get_targets() Optional[List[aws_cdk.aws_events.IRuleTarget]] ¶
Get input targets of the stage.
Targets are used by Event Rules to describe what should be invoked when a rule matches an event.
- Returns
targets – List of targets
- Return type
Optional[List[IRuleTarget]]
- property trail: aws_cdk.aws_cloudtrail.Trail¶
Trail The CloudTrail Trail
- Type
Return
- property trail_bucket: aws_cdk.aws_s3.IBucket¶
IBucket The CloudTrail Trail bucket
- Type
Return