@Generated(value="jsii-pacmak/1.1.0 (build df55f5e)", date="2020-04-10T14:28:19.283Z") @Stability(value=Stable) public class Rule extends Resource implements IRule
| Modifier and Type | Class and Description |
|---|---|
static class |
Rule.Builder
A fluent builder for
Rule. |
software.amazon.jsii.JsiiObject.InitializationModeIRule.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
Rule(Construct scope,
String id) |
|
Rule(Construct scope,
String id,
RuleProps props) |
protected |
Rule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Rule(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventPattern()
Adds an event pattern filter to this rule.
|
void |
addEventPattern(EventPattern eventPattern)
Adds an event pattern filter to this rule.
|
void |
addTarget()
Adds a target to the rule.
|
void |
addTarget(IRuleTarget target)
Adds a target to the rule.
|
static IRule |
fromEventRuleArn(Construct scope,
String id,
String eventRuleArn) |
String |
getRuleArn()
The value of the event rule Amazon Resource Name (ARN), such as arn:aws:events:us-east-2:123456789012:rule/example.
|
String |
getRuleName()
The name event rule.
|
protected List<String> |
validate()
Validate the current construct.
|
generatePhysicalName, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStackgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesizejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNodeprotected Rule(software.amazon.jsii.JsiiObjectRef objRef)
protected Rule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public Rule(@NotNull
Construct scope,
@NotNull
String id,
@Nullable
RuleProps props)
scope - This parameter is required.id - This parameter is required.props - @Stability(value=Stable) @NotNull public static IRule fromEventRuleArn(@NotNull Construct scope, @NotNull String id, @NotNull String eventRuleArn)
scope - This parameter is required.id - This parameter is required.eventRuleArn - This parameter is required.@Stability(value=Stable)
public void addEventPattern(@Nullable
EventPattern eventPattern)
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" ]
}
}
eventPattern - @Stability(value=Stable) public void addEventPattern()
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" ]
}
}
@Stability(value=Stable)
public void addTarget(@Nullable
IRuleTarget target)
No-op if target is undefined.
target - @Stability(value=Stable) public void addTarget()
No-op if target is undefined.
@Stability(value=Stable) @NotNull protected List<String> validate()
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.
@Stability(value=Stable) @NotNull public String getRuleArn()
getRuleArn in interface IRule@Stability(value=Stable) @NotNull public String getRuleName()
getRuleName in interface IRuleCopyright © 2020. All rights reserved.