@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Rule extends Object implements Serializable, Cloneable, StructuredPojo
Contains information about a rule in Amazon EventBridge.
Constructor and Description |
---|
Rule() |
Modifier and Type | Method and Description |
---|---|
Rule |
clone() |
boolean |
equals(Object obj) |
String |
getArn()
The Amazon Resource Name (ARN) of the rule.
|
String |
getDescription()
The description of the rule.
|
String |
getEventBusName()
The name or ARN of the event bus associated with the rule.
|
String |
getEventPattern()
The event pattern of the rule.
|
String |
getManagedBy()
If the rule was created on behalf of your account by an Amazon Web Services service, this field displays the
principal name of the service that created the rule.
|
String |
getName()
The name of the rule.
|
String |
getRoleArn()
The Amazon Resource Name (ARN) of the role that is used for target invocation.
|
String |
getScheduleExpression()
The scheduling expression.
|
String |
getState()
The state of the rule.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setArn(String arn)
The Amazon Resource Name (ARN) of the rule.
|
void |
setDescription(String description)
The description of the rule.
|
void |
setEventBusName(String eventBusName)
The name or ARN of the event bus associated with the rule.
|
void |
setEventPattern(String eventPattern)
The event pattern of the rule.
|
void |
setManagedBy(String managedBy)
If the rule was created on behalf of your account by an Amazon Web Services service, this field displays the
principal name of the service that created the rule.
|
void |
setName(String name)
The name of the rule.
|
void |
setRoleArn(String roleArn)
The Amazon Resource Name (ARN) of the role that is used for target invocation.
|
void |
setScheduleExpression(String scheduleExpression)
The scheduling expression.
|
void |
setState(String state)
The state of the rule.
|
String |
toString()
Returns a string representation of this object.
|
Rule |
withArn(String arn)
The Amazon Resource Name (ARN) of the rule.
|
Rule |
withDescription(String description)
The description of the rule.
|
Rule |
withEventBusName(String eventBusName)
The name or ARN of the event bus associated with the rule.
|
Rule |
withEventPattern(String eventPattern)
The event pattern of the rule.
|
Rule |
withManagedBy(String managedBy)
If the rule was created on behalf of your account by an Amazon Web Services service, this field displays the
principal name of the service that created the rule.
|
Rule |
withName(String name)
The name of the rule.
|
Rule |
withRoleArn(String roleArn)
The Amazon Resource Name (ARN) of the role that is used for target invocation.
|
Rule |
withScheduleExpression(String scheduleExpression)
The scheduling expression.
|
Rule |
withState(RuleState state)
The state of the rule.
|
Rule |
withState(String state)
The state of the rule.
|
public void setName(String name)
The name of the rule.
name
- The name of the rule.public String getName()
The name of the rule.
public Rule withName(String name)
The name of the rule.
name
- The name of the rule.public void setArn(String arn)
The Amazon Resource Name (ARN) of the rule.
arn
- The Amazon Resource Name (ARN) of the rule.public String getArn()
The Amazon Resource Name (ARN) of the rule.
public Rule withArn(String arn)
The Amazon Resource Name (ARN) of the rule.
arn
- The Amazon Resource Name (ARN) of the rule.public void setEventPattern(String eventPattern)
The event pattern of the rule. For more information, see Events and Event Patterns in the Amazon EventBridge User Guide .
eventPattern
- The event pattern of the rule. For more information, see Events
and Event Patterns in the Amazon EventBridge User Guide .public String getEventPattern()
The event pattern of the rule. For more information, see Events and Event Patterns in the Amazon EventBridge User Guide .
public Rule withEventPattern(String eventPattern)
The event pattern of the rule. For more information, see Events and Event Patterns in the Amazon EventBridge User Guide .
eventPattern
- The event pattern of the rule. For more information, see Events
and Event Patterns in the Amazon EventBridge User Guide .public void setState(String state)
The state of the rule.
Valid values include:
DISABLED
: The rule is disabled. EventBridge does not match any events against the rule.
ENABLED
: The rule is enabled. EventBridge matches events against the rule, except for Amazon
Web Services management events delivered through CloudTrail.
ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS
: The rule is enabled for all events, including Amazon
Web Services management events delivered through CloudTrail.
Management events provide visibility into management operations that are performed on resources in your Amazon Web Services account. These are also known as control plane operations. For more information, see Logging management events in the CloudTrail User Guide, and Filtering management events from Amazon Web Services services in the Amazon EventBridge User Guide .
This value is only valid for rules on the default event bus or custom event buses. It does not apply to partner event buses.
state
- The state of the rule.
Valid values include:
DISABLED
: The rule is disabled. EventBridge does not match any events against the rule.
ENABLED
: The rule is enabled. EventBridge matches events against the rule, except for
Amazon Web Services management events delivered through CloudTrail.
ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS
: The rule is enabled for all events, including
Amazon Web Services management events delivered through CloudTrail.
Management events provide visibility into management operations that are performed on resources in your Amazon Web Services account. These are also known as control plane operations. For more information, see Logging management events in the CloudTrail User Guide, and Filtering management events from Amazon Web Services services in the Amazon EventBridge User Guide .
This value is only valid for rules on the default event bus or custom event buses. It does not apply to partner event buses.
RuleState
public String getState()
The state of the rule.
Valid values include:
DISABLED
: The rule is disabled. EventBridge does not match any events against the rule.
ENABLED
: The rule is enabled. EventBridge matches events against the rule, except for Amazon
Web Services management events delivered through CloudTrail.
ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS
: The rule is enabled for all events, including Amazon
Web Services management events delivered through CloudTrail.
Management events provide visibility into management operations that are performed on resources in your Amazon Web Services account. These are also known as control plane operations. For more information, see Logging management events in the CloudTrail User Guide, and Filtering management events from Amazon Web Services services in the Amazon EventBridge User Guide .
This value is only valid for rules on the default event bus or custom event buses. It does not apply to partner event buses.
Valid values include:
DISABLED
: The rule is disabled. EventBridge does not match any events against the rule.
ENABLED
: The rule is enabled. EventBridge matches events against the rule, except for
Amazon Web Services management events delivered through CloudTrail.
ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS
: The rule is enabled for all events, including
Amazon Web Services management events delivered through CloudTrail.
Management events provide visibility into management operations that are performed on resources in your Amazon Web Services account. These are also known as control plane operations. For more information, see Logging management events in the CloudTrail User Guide, and Filtering management events from Amazon Web Services services in the Amazon EventBridge User Guide .
This value is only valid for rules on the default event bus or custom event buses. It does not apply to partner event buses.
RuleState
public Rule withState(String state)
The state of the rule.
Valid values include:
DISABLED
: The rule is disabled. EventBridge does not match any events against the rule.
ENABLED
: The rule is enabled. EventBridge matches events against the rule, except for Amazon
Web Services management events delivered through CloudTrail.
ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS
: The rule is enabled for all events, including Amazon
Web Services management events delivered through CloudTrail.
Management events provide visibility into management operations that are performed on resources in your Amazon Web Services account. These are also known as control plane operations. For more information, see Logging management events in the CloudTrail User Guide, and Filtering management events from Amazon Web Services services in the Amazon EventBridge User Guide .
This value is only valid for rules on the default event bus or custom event buses. It does not apply to partner event buses.
state
- The state of the rule.
Valid values include:
DISABLED
: The rule is disabled. EventBridge does not match any events against the rule.
ENABLED
: The rule is enabled. EventBridge matches events against the rule, except for
Amazon Web Services management events delivered through CloudTrail.
ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS
: The rule is enabled for all events, including
Amazon Web Services management events delivered through CloudTrail.
Management events provide visibility into management operations that are performed on resources in your Amazon Web Services account. These are also known as control plane operations. For more information, see Logging management events in the CloudTrail User Guide, and Filtering management events from Amazon Web Services services in the Amazon EventBridge User Guide .
This value is only valid for rules on the default event bus or custom event buses. It does not apply to partner event buses.
RuleState
public Rule withState(RuleState state)
The state of the rule.
Valid values include:
DISABLED
: The rule is disabled. EventBridge does not match any events against the rule.
ENABLED
: The rule is enabled. EventBridge matches events against the rule, except for Amazon
Web Services management events delivered through CloudTrail.
ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS
: The rule is enabled for all events, including Amazon
Web Services management events delivered through CloudTrail.
Management events provide visibility into management operations that are performed on resources in your Amazon Web Services account. These are also known as control plane operations. For more information, see Logging management events in the CloudTrail User Guide, and Filtering management events from Amazon Web Services services in the Amazon EventBridge User Guide .
This value is only valid for rules on the default event bus or custom event buses. It does not apply to partner event buses.
state
- The state of the rule.
Valid values include:
DISABLED
: The rule is disabled. EventBridge does not match any events against the rule.
ENABLED
: The rule is enabled. EventBridge matches events against the rule, except for
Amazon Web Services management events delivered through CloudTrail.
ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS
: The rule is enabled for all events, including
Amazon Web Services management events delivered through CloudTrail.
Management events provide visibility into management operations that are performed on resources in your Amazon Web Services account. These are also known as control plane operations. For more information, see Logging management events in the CloudTrail User Guide, and Filtering management events from Amazon Web Services services in the Amazon EventBridge User Guide .
This value is only valid for rules on the default event bus or custom event buses. It does not apply to partner event buses.
RuleState
public void setDescription(String description)
The description of the rule.
description
- The description of the rule.public String getDescription()
The description of the rule.
public Rule withDescription(String description)
The description of the rule.
description
- The description of the rule.public void setScheduleExpression(String scheduleExpression)
The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". For more information, see Creating an Amazon EventBridge rule that runs on a schedule.
scheduleExpression
- The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". For more information, see
Creating
an Amazon EventBridge rule that runs on a schedule.public String getScheduleExpression()
The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". For more information, see Creating an Amazon EventBridge rule that runs on a schedule.
public Rule withScheduleExpression(String scheduleExpression)
The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". For more information, see Creating an Amazon EventBridge rule that runs on a schedule.
scheduleExpression
- The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)". For more information, see
Creating
an Amazon EventBridge rule that runs on a schedule.public void setRoleArn(String roleArn)
The Amazon Resource Name (ARN) of the role that is used for target invocation.
If you're setting an event bus in another account as the target and that account granted permission to your
account through an organization instead of directly by the account ID, you must specify a RoleArn
with proper permissions in the Target
structure, instead of here in this parameter.
roleArn
- The Amazon Resource Name (ARN) of the role that is used for target invocation.
If you're setting an event bus in another account as the target and that account granted permission to
your account through an organization instead of directly by the account ID, you must specify a
RoleArn
with proper permissions in the Target
structure, instead of here in this
parameter.
public String getRoleArn()
The Amazon Resource Name (ARN) of the role that is used for target invocation.
If you're setting an event bus in another account as the target and that account granted permission to your
account through an organization instead of directly by the account ID, you must specify a RoleArn
with proper permissions in the Target
structure, instead of here in this parameter.
If you're setting an event bus in another account as the target and that account granted permission to
your account through an organization instead of directly by the account ID, you must specify a
RoleArn
with proper permissions in the Target
structure, instead of here in
this parameter.
public Rule withRoleArn(String roleArn)
The Amazon Resource Name (ARN) of the role that is used for target invocation.
If you're setting an event bus in another account as the target and that account granted permission to your
account through an organization instead of directly by the account ID, you must specify a RoleArn
with proper permissions in the Target
structure, instead of here in this parameter.
roleArn
- The Amazon Resource Name (ARN) of the role that is used for target invocation.
If you're setting an event bus in another account as the target and that account granted permission to
your account through an organization instead of directly by the account ID, you must specify a
RoleArn
with proper permissions in the Target
structure, instead of here in this
parameter.
public void setManagedBy(String managedBy)
If the rule was created on behalf of your account by an Amazon Web Services service, this field displays the principal name of the service that created the rule.
managedBy
- If the rule was created on behalf of your account by an Amazon Web Services service, this field displays
the principal name of the service that created the rule.public String getManagedBy()
If the rule was created on behalf of your account by an Amazon Web Services service, this field displays the principal name of the service that created the rule.
public Rule withManagedBy(String managedBy)
If the rule was created on behalf of your account by an Amazon Web Services service, this field displays the principal name of the service that created the rule.
managedBy
- If the rule was created on behalf of your account by an Amazon Web Services service, this field displays
the principal name of the service that created the rule.public void setEventBusName(String eventBusName)
The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
eventBusName
- The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is
used.public String getEventBusName()
The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
public Rule withEventBusName(String eventBusName)
The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is used.
eventBusName
- The name or ARN of the event bus associated with the rule. If you omit this, the default event bus is
used.public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.