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 Ruleclone()booleanequals(Object obj)StringgetArn()The Amazon Resource Name (ARN) of the rule.StringgetDescription()The description of the rule.StringgetEventPattern()The event pattern of the rule.StringgetName()The rule's name.StringgetRoleArn()The Amazon Resource Name (ARN) associated with the role that is used for target invocation.StringgetScheduleExpression()The scheduling expression.StringgetState()The rule's state.inthashCode()voidsetArn(String arn)The Amazon Resource Name (ARN) of the rule.voidsetDescription(String description)The description of the rule.voidsetEventPattern(String eventPattern)The event pattern of the rule.voidsetName(String name)The rule's name.voidsetRoleArn(String roleArn)The Amazon Resource Name (ARN) associated with the role that is used for target invocation.voidsetScheduleExpression(String scheduleExpression)The scheduling expression.voidsetState(RuleState state)The rule's state.voidsetState(String state)The rule's state.StringtoString()Returns a string representation of this object; useful for testing and debugging.RulewithArn(String arn)The Amazon Resource Name (ARN) of the rule.RulewithDescription(String description)The description of the rule.RulewithEventPattern(String eventPattern)The event pattern of the rule.RulewithName(String name)The rule's name.RulewithRoleArn(String roleArn)The Amazon Resource Name (ARN) associated with the role that is used for target invocation.RulewithScheduleExpression(String scheduleExpression)The scheduling expression.RulewithState(RuleState state)The rule's state.RulewithState(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:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-