public class Rule extends Object implements Serializable, Cloneable
Contains information about a rule in Amazon CloudWatch Events. A ListRulesResult contains a list of Rules.
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 |
getEventPattern()
The event pattern of the rule.
|
String |
getName()
The rule's name.
|
String |
getRoleArn()
The Amazon Resource Name (ARN) associated with the role that is used for
target invocation.
|
String |
getScheduleExpression()
The scheduling expression.
|
String |
getState()
The rule's state.
|
int |
hashCode() |
void |
setArn(String arn)
The Amazon Resource Name (ARN) of the rule.
|
void |
setDescription(String description)
The description of the rule.
|
void |
setEventPattern(String eventPattern)
The event pattern of the rule.
|
void |
setName(String name)
The rule's name.
|
void |
setRoleArn(String roleArn)
The Amazon Resource Name (ARN) associated with the role that is used for
target invocation.
|
void |
setScheduleExpression(String scheduleExpression)
The scheduling expression.
|
void |
setState(RuleState state)
The rule's state.
|
void |
setState(String state)
The rule's state.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Rule |
withArn(String arn)
The Amazon Resource Name (ARN) of the rule.
|
Rule |
withDescription(String description)
The description of the rule.
|
Rule |
withEventPattern(String eventPattern)
The event pattern of the rule.
|
Rule |
withName(String name)
The rule's name.
|
Rule |
withRoleArn(String roleArn)
The Amazon Resource Name (ARN) associated with the role that is used for
target invocation.
|
Rule |
withScheduleExpression(String scheduleExpression)
The scheduling expression.
|
Rule |
withState(RuleState state)
The rule's state.
|
Rule |
withState(String state)
The rule's state.
|
public void setName(String name)
The rule's name.
name
- The rule's name.public String getName()
The rule's name.
public Rule withName(String name)
The rule's name.
name
- The rule's name.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.
eventPattern
- The event pattern of the rule.public String getEventPattern()
The event pattern of the rule.
public Rule withEventPattern(String eventPattern)
The event pattern of the rule.
eventPattern
- The event pattern of the rule.public void setState(String state)
The rule's state.
state
- The rule's state.RuleState
public Rule withState(String state)
The rule's state.
state
- The rule's state.RuleState
public void setState(RuleState state)
The rule's state.
state
- The rule's state.RuleState
public Rule withState(RuleState state)
The rule's state.
state
- The rule's state.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)".
scheduleExpression
- The scheduling expression. For example, "cron(0 20 * * ? *)",
"rate(5 minutes)".public String getScheduleExpression()
The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)".
public Rule withScheduleExpression(String scheduleExpression)
The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)".
scheduleExpression
- The scheduling expression. For example, "cron(0 20 * * ? *)",
"rate(5 minutes)".public void setRoleArn(String roleArn)
The Amazon Resource Name (ARN) associated with the role that is used for target invocation.
roleArn
- The Amazon Resource Name (ARN) associated with the role that is
used for target invocation.public String getRoleArn()
The Amazon Resource Name (ARN) associated with the role that is used for target invocation.
public Rule withRoleArn(String roleArn)
The Amazon Resource Name (ARN) associated with the role that is used for target invocation.
roleArn
- The Amazon Resource Name (ARN) associated with the role that is
used for target invocation.public String toString()
toString
in class Object
Object.toString()
Copyright © 2018. All rights reserved.