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