Class Rule
- java.lang.Object
-
- com.amazonaws.services.cloudwatchevents.model.Rule
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class Rule extends Object implements Serializable, Cloneable
Contains information about a rule in Amazon CloudWatch Events. A ListRulesResult contains a list of Rules.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Rule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
setName
public void setName(String name)
The rule's name.
- Parameters:
name
- The rule's name.
-
getName
public String getName()
The rule's name.
- Returns:
- The rule's name.
-
withName
public Rule withName(String name)
The rule's name.
- Parameters:
name
- The rule's name.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setArn
public void setArn(String arn)
The Amazon Resource Name (ARN) of the rule.
- Parameters:
arn
- The Amazon Resource Name (ARN) of the rule.
-
getArn
public String getArn()
The Amazon Resource Name (ARN) of the rule.
- Returns:
- The Amazon Resource Name (ARN) of the rule.
-
withArn
public Rule withArn(String arn)
The Amazon Resource Name (ARN) of the rule.
- Parameters:
arn
- The Amazon Resource Name (ARN) of the rule.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEventPattern
public void setEventPattern(String eventPattern)
The event pattern of the rule.
- Parameters:
eventPattern
- The event pattern of the rule.
-
getEventPattern
public String getEventPattern()
The event pattern of the rule.
- Returns:
- The event pattern of the rule.
-
withEventPattern
public Rule withEventPattern(String eventPattern)
The event pattern of the rule.
- Parameters:
eventPattern
- The event pattern of the rule.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setState
public void setState(String state)
The rule's state.
- Parameters:
state
- The rule's state.- See Also:
RuleState
-
withState
public Rule withState(String state)
The rule's state.
- Parameters:
state
- The rule's state.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
RuleState
-
setState
public void setState(RuleState state)
The rule's state.
- Parameters:
state
- The rule's state.- See Also:
RuleState
-
withState
public Rule withState(RuleState state)
The rule's state.
- Parameters:
state
- The rule's state.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
RuleState
-
setDescription
public void setDescription(String description)
The description of the rule.
- Parameters:
description
- The description of the rule.
-
getDescription
public String getDescription()
The description of the rule.
- Returns:
- The description of the rule.
-
withDescription
public Rule withDescription(String description)
The description of the rule.
- Parameters:
description
- The description of the rule.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setScheduleExpression
public void setScheduleExpression(String scheduleExpression)
The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)".
- Parameters:
scheduleExpression
- The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)".
-
getScheduleExpression
public String getScheduleExpression()
The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)".
- Returns:
- The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)".
-
withScheduleExpression
public Rule withScheduleExpression(String scheduleExpression)
The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)".
- Parameters:
scheduleExpression
- The scheduling expression. For example, "cron(0 20 * * ? *)", "rate(5 minutes)".- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRoleArn
public void setRoleArn(String roleArn)
The Amazon Resource Name (ARN) associated with the role that is used for target invocation.
- Parameters:
roleArn
- The Amazon Resource Name (ARN) associated with the role that is used for target invocation.
-
getRoleArn
public String getRoleArn()
The Amazon Resource Name (ARN) associated with the role that is used for target invocation.
- Returns:
- The Amazon Resource Name (ARN) associated with the role that is used for target invocation.
-
withRoleArn
public Rule withRoleArn(String roleArn)
The Amazon Resource Name (ARN) associated with the role that is used for target invocation.
- Parameters:
roleArn
- The Amazon Resource Name (ARN) associated with the role that is used for target invocation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-