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:
  • Constructor Details

    • Rule

      public Rule()
  • Method Details

    • 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:
    • getState

      public String getState()

      The rule's state.

      Returns:
      The rule's state.
      See Also:
    • 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:
    • setState

      public void setState(RuleState state)

      The rule's state.

      Parameters:
      state - The rule's state.
      See Also:
    • 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:
    • 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 class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Rule clone()
      Overrides:
      clone in class Object