import { CodePipelineExecutionStateChangeDetectionEventRule } from '@gammarers/aws-codesuite-state-change-detection-event-rules'
new CodePipelineExecutionStateChangeDetectionEventRule(scope: Construct, id: string, props: CodePipelineExecutionStateChangeDetectionEventRuleProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
CodePipelineExecutionStateChangeDetectionEventRuleProps |
No description. |
- Type: constructs.Construct
- Type: string
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
applyRemovalPolicy |
Apply the given removal policy to this resource. |
addEventPattern |
Adds an event pattern filter to this rule. |
addTarget |
Adds a target to the rule. The abstract class RuleTarget can be extended to define new targets. |
public toString(): string
Returns a string representation of this construct.
public applyRemovalPolicy(policy: RemovalPolicy): void
Apply the given removal policy to this resource.
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
).
- Type: aws-cdk-lib.RemovalPolicy
public addEventPattern(eventPattern?: EventPattern): void
Adds an event pattern filter to this rule.
If a pattern was already specified, these values are merged into the existing pattern.
For example, if the rule already contains the pattern:
{ "resources": [ "r1" ], "detail": { "hello": [ 1 ] } }
And addEventPattern
is called with the pattern:
{ "resources": [ "r2" ], "detail": { "foo": [ "bar" ] } }
The resulting event pattern will be:
{ "resources": [ "r1", "r2" ], "detail": { "hello": [ 1 ], "foo": [ "bar" ] } }
- Type: aws-cdk-lib.aws_events.EventPattern
public addTarget(target?: IRuleTarget): void
Adds a target to the rule. The abstract class RuleTarget can be extended to define new targets.
No-op if target is undefined.
- Type: aws-cdk-lib.aws_events.IRuleTarget
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
isOwnedResource |
Returns true if the construct was created by CDK, and false otherwise. |
isResource |
Check whether the given construct is a Resource. |
fromEventRuleArn |
Import an existing EventBridge Rule provided an ARN. |
import { CodePipelineExecutionStateChangeDetectionEventRule } from '@gammarers/aws-codesuite-state-change-detection-event-rules'
CodePipelineExecutionStateChangeDetectionEventRule.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
import { CodePipelineExecutionStateChangeDetectionEventRule } from '@gammarers/aws-codesuite-state-change-detection-event-rules'
CodePipelineExecutionStateChangeDetectionEventRule.isOwnedResource(construct: IConstruct)
Returns true if the construct was created by CDK, and false otherwise.
- Type: constructs.IConstruct
import { CodePipelineExecutionStateChangeDetectionEventRule } from '@gammarers/aws-codesuite-state-change-detection-event-rules'
CodePipelineExecutionStateChangeDetectionEventRule.isResource(construct: IConstruct)
Check whether the given construct is a Resource.
- Type: constructs.IConstruct
import { CodePipelineExecutionStateChangeDetectionEventRule } from '@gammarers/aws-codesuite-state-change-detection-event-rules'
CodePipelineExecutionStateChangeDetectionEventRule.fromEventRuleArn(scope: Construct, id: string, eventRuleArn: string)
Import an existing EventBridge Rule provided an ARN.
- Type: constructs.Construct
The parent creating construct (usually this
).
- Type: string
The construct's name.
- Type: string
Event Rule ARN (i.e. arn:aws:events:::rule/MyScheduledRule).
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
env |
aws-cdk-lib.ResourceEnvironment |
The environment this resource belongs to. |
stack |
aws-cdk-lib.Stack |
The stack in which this resource is defined. |
ruleArn |
string |
The value of the event rule Amazon Resource Name (ARN), such as arn:aws:events:us-east-2:123456789012:rule/example. |
ruleName |
string |
The name event rule. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly env: ResourceEnvironment;
- Type: aws-cdk-lib.ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
public readonly stack: Stack;
- Type: aws-cdk-lib.Stack
The stack in which this resource is defined.
public readonly ruleArn: string;
- Type: string
The value of the event rule Amazon Resource Name (ARN), such as arn:aws:events:us-east-2:123456789012:rule/example.
public readonly ruleName: string;
- Type: string
The name event rule.
import { CodePipelineExecutionStateChangeDetectionEventRuleProps } from '@gammarers/aws-codesuite-state-change-detection-event-rules'
const codePipelineExecutionStateChangeDetectionEventRuleProps: CodePipelineExecutionStateChangeDetectionEventRuleProps = { ... }
Name | Type | Description |
---|---|---|
crossStackScope |
constructs.Construct |
The scope to use if the source of the rule and its target are in different Stacks (but in the same account & region). |
description |
string |
A description of the rule's purpose. |
eventPattern |
aws-cdk-lib.aws_events.EventPattern |
Additional restrictions for the event to route to the specified target. |
ruleName |
string |
A name for the rule. |
enabled |
boolean |
Indicates whether the rule is enabled. |
eventBus |
aws-cdk-lib.aws_events.IEventBus |
The event bus to associate with this rule. |
schedule |
aws-cdk-lib.aws_events.Schedule |
The schedule or rate (frequency) that determines when EventBridge runs the rule. |
targets |
aws-cdk-lib.aws_events.IRuleTarget[] |
Targets to invoke when this rule matches an event. |
targetStates |
CodePipelineExecutionState[] |
No description. |
public readonly crossStackScope: Construct;
- Type: constructs.Construct
- Default: none (the main scope will be used, even for cross-stack Events)
The scope to use if the source of the rule and its target are in different Stacks (but in the same account & region).
This helps dealing with cycles that often arise in these situations.
public readonly description: string;
- Type: string
- Default: No description
A description of the rule's purpose.
public readonly eventPattern: EventPattern;
- Type: aws-cdk-lib.aws_events.EventPattern
- Default: No additional filtering based on an event pattern.
Additional restrictions for the event to route to the specified target.
The method that generates the rule probably imposes some type of event filtering. The filtering implied by what you pass here is added on top of that filtering.
https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html
public readonly ruleName: string;
- Type: string
- Default: AWS CloudFormation generates a unique physical ID.
A name for the rule.
public readonly enabled: boolean;
- Type: boolean
- Default: true
Indicates whether the rule is enabled.
public readonly eventBus: IEventBus;
- Type: aws-cdk-lib.aws_events.IEventBus
- Default: The default event bus.
The event bus to associate with this rule.
public readonly schedule: Schedule;
- Type: aws-cdk-lib.aws_events.Schedule
- Default: None.
The schedule or rate (frequency) that determines when EventBridge runs the rule.
You must specify this property, the eventPattern
property, or both.
For more information, see Schedule Expression Syntax for Rules in the Amazon EventBridge User Guide.
https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html
public readonly targets: IRuleTarget[];
- Type: aws-cdk-lib.aws_events.IRuleTarget[]
- Default: No targets.
Targets to invoke when this rule matches an event.
Input will be the full matched event. If you wish to specify custom
target input, use addTarget(target[, inputOptions])
.
public readonly targetStates: CodePipelineExecutionState[];
- Type: CodePipelineExecutionState[]
Name | Description |
---|---|
CANCELED |
No description. |
FAILED |
No description. |
RESUMED |
No description. |
STARTED |
No description. |
STOPPED |
No description. |
STOPPING |
No description. |
SUCCEEDED |
No description. |
SUPERSEDED |
No description. |