aws_ddk_core.pipelines.EventStage¶
- class aws_ddk_core.pipelines.EventStage(*args: Any, **kwargs)¶
Class that represents an event stage within a data pipeline.
To create an EventStage, inherit from this class, add infrastructure required by the stage, and implement get_event_pattern method. For example:
class MyStage(EventStage): def __init__( self, scope: Construct, id: str, environment_id: str, ) -> None: super().__init__(scope, id) # Define stage infrastructure, for example an S3 event pattern self._event_pattern = EventPattern( source=["aws.s3"], detail=detail, detail_type=event_names, ) @property def event_pattern(self) -> EventPattern: return self._event_pattern def get_event_pattern(self) -> Optional[EventPattern]: return self._event_pattern
- __init__(scope: constructs.Construct, id: str, name: Optional[str] = None, description: Optional[str] = None) None ¶
Create a stage.
- Parameters
scope (Construct) – Scope within which this construct is defined
id (str) – Identifier of the stage
name (Optional[str]) – Name of the stage
description (Optional[str]) – Description of the stage
Methods
__init__
(scope, id[, name, description])Create a stage.
get_event_pattern
()Get output event pattern of the stage.
Get input targets of the stage.
is_construct
(x)Checks if
x
is a construct.to_string
()Returns a string representation of this construct.
Attributes
node
The tree node.
- 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]]