Class PutMetricAlarmRequest

    • Constructor Detail

      • PutMetricAlarmRequest

        public PutMetricAlarmRequest()
    • Method Detail

      • setAlarmName

        public void setAlarmName​(String alarmName)

        The descriptive name for the alarm. This name must be unique within the user's AWS account

        Parameters:
        alarmName - The descriptive name for the alarm. This name must be unique within the user's AWS account
      • getAlarmName

        public String getAlarmName()

        The descriptive name for the alarm. This name must be unique within the user's AWS account

        Returns:
        The descriptive name for the alarm. This name must be unique within the user's AWS account
      • withAlarmName

        public PutMetricAlarmRequest withAlarmName​(String alarmName)

        The descriptive name for the alarm. This name must be unique within the user's AWS account

        Parameters:
        alarmName - The descriptive name for the alarm. This name must be unique within the user's AWS account
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setAlarmDescription

        public void setAlarmDescription​(String alarmDescription)

        The description for the alarm.

        Parameters:
        alarmDescription - The description for the alarm.
      • getAlarmDescription

        public String getAlarmDescription()

        The description for the alarm.

        Returns:
        The description for the alarm.
      • withAlarmDescription

        public PutMetricAlarmRequest withAlarmDescription​(String alarmDescription)

        The description for the alarm.

        Parameters:
        alarmDescription - The description for the alarm.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setActionsEnabled

        public void setActionsEnabled​(Boolean actionsEnabled)

        Indicates whether or not actions should be executed during any changes to the alarm's state.

        Parameters:
        actionsEnabled - Indicates whether or not actions should be executed during any changes to the alarm's state.
      • getActionsEnabled

        public Boolean getActionsEnabled()

        Indicates whether or not actions should be executed during any changes to the alarm's state.

        Returns:
        Indicates whether or not actions should be executed during any changes to the alarm's state.
      • withActionsEnabled

        public PutMetricAlarmRequest withActionsEnabled​(Boolean actionsEnabled)

        Indicates whether or not actions should be executed during any changes to the alarm's state.

        Parameters:
        actionsEnabled - Indicates whether or not actions should be executed during any changes to the alarm's state.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • isActionsEnabled

        public Boolean isActionsEnabled()

        Indicates whether or not actions should be executed during any changes to the alarm's state.

        Returns:
        Indicates whether or not actions should be executed during any changes to the alarm's state.
      • getOKActions

        public List<String> getOKActions()

        The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer- account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:us-east -1:{customer-account}:action/actions/AWS_EC2.InstanceId .Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account}:action/actions /AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

        Returns:
        The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer -account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws :swf:us-east-1:{customer-account}:action/actions/AWS_EC2 .InstanceId.Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account }:action/actions/AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

      • setOKActions

        public void setOKActions​(Collection<String> oKActions)

        The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer- account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:us-east -1:{customer-account}:action/actions/AWS_EC2.InstanceId .Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account}:action/actions /AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

        Parameters:
        oKActions - The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer -account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws: swf:us-east-1:{customer-account}:action/actions/AWS_EC2 .InstanceId.Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account }:action/actions/AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

      • withOKActions

        public PutMetricAlarmRequest withOKActions​(String... oKActions)

        The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer- account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:us-east -1:{customer-account}:action/actions/AWS_EC2.InstanceId .Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account}:action/actions /AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

        NOTE: This method appends the values to the existing list (if any). Use setOKActions(java.util.Collection) or withOKActions(java.util.Collection) if you want to override the existing values.

        Parameters:
        oKActions - The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer -account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws: swf:us-east-1:{customer-account}:action/actions/AWS_EC2 .InstanceId.Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account }:action/actions/AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • withOKActions

        public PutMetricAlarmRequest withOKActions​(Collection<String> oKActions)

        The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer- account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:us-east -1:{customer-account}:action/actions/AWS_EC2.InstanceId .Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account}:action/actions /AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

        Parameters:
        oKActions - The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer -account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws: swf:us-east-1:{customer-account}:action/actions/AWS_EC2 .InstanceId.Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account }:action/actions/AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getAlarmActions

        public List<String> getAlarmActions()

        The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer- account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:us-east -1:{customer-account}:action/actions/AWS_EC2.InstanceId .Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account}:action/actions /AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

        Returns:
        The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer -account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws :swf:us-east-1:{customer-account}:action/actions/AWS_EC2 .InstanceId.Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account }:action/actions/AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

      • setAlarmActions

        public void setAlarmActions​(Collection<String> alarmActions)

        The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer- account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:us-east -1:{customer-account}:action/actions/AWS_EC2.InstanceId .Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account}:action/actions /AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

        Parameters:
        alarmActions - The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer -account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws: swf:us-east-1:{customer-account}:action/actions/AWS_EC2 .InstanceId.Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account }:action/actions/AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

      • withAlarmActions

        public PutMetricAlarmRequest withAlarmActions​(String... alarmActions)

        The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer- account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:us-east -1:{customer-account}:action/actions/AWS_EC2.InstanceId .Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account}:action/actions /AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

        NOTE: This method appends the values to the existing list (if any). Use setAlarmActions(java.util.Collection) or withAlarmActions(java.util.Collection) if you want to override the existing values.

        Parameters:
        alarmActions - The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer -account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws: swf:us-east-1:{customer-account}:action/actions/AWS_EC2 .InstanceId.Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account }:action/actions/AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • withAlarmActions

        public PutMetricAlarmRequest withAlarmActions​(Collection<String> alarmActions)

        The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer- account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:us-east -1:{customer-account}:action/actions/AWS_EC2.InstanceId .Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account}:action/actions /AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

        Parameters:
        alarmActions - The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer -account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws: swf:us-east-1:{customer-account}:action/actions/AWS_EC2 .InstanceId.Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account }:action/actions/AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getInsufficientDataActions

        public List<String> getInsufficientDataActions()

        The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer- account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:us-east -1:{customer-account}:action/actions/AWS_EC2.InstanceId .Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account}:action/actions /AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

        Returns:
        The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer -account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws :swf:us-east-1:{customer-account}:action/actions/AWS_EC2 .InstanceId.Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account }:action/actions/AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

      • setInsufficientDataActions

        public void setInsufficientDataActions​(Collection<String> insufficientDataActions)

        The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer- account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:us-east -1:{customer-account}:action/actions/AWS_EC2.InstanceId .Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account}:action/actions /AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

        Parameters:
        insufficientDataActions - The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer -account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws: swf:us-east-1:{customer-account}:action/actions/AWS_EC2 .InstanceId.Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account }:action/actions/AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

      • withInsufficientDataActions

        public PutMetricAlarmRequest withInsufficientDataActions​(String... insufficientDataActions)

        The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer- account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:us-east -1:{customer-account}:action/actions/AWS_EC2.InstanceId .Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account}:action/actions /AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

        NOTE: This method appends the values to the existing list (if any). Use setInsufficientDataActions(java.util.Collection) or withInsufficientDataActions(java.util.Collection) if you want to override the existing values.

        Parameters:
        insufficientDataActions - The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer -account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws: swf:us-east-1:{customer-account}:action/actions/AWS_EC2 .InstanceId.Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account }:action/actions/AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • withInsufficientDataActions

        public PutMetricAlarmRequest withInsufficientDataActions​(Collection<String> insufficientDataActions)

        The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer- account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:us-east -1:{customer-account}:action/actions/AWS_EC2.InstanceId .Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account}:action/actions /AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

        Parameters:
        insufficientDataActions - The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).

        Valid Values: arn:aws:automate:region (e.g., us-east-1):ec2:stop | arn:aws:automate:region (e.g., us-east-1):ec2:terminate | arn:aws:automate:region (e.g., us-east-1):ec2:recover

        Valid Values (for use with IAM roles): arn:aws:swf:us-east-1:{customer -account}:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws: swf:us-east-1:{customer-account}:action/actions/AWS_EC2 .InstanceId.Terminate/1.0 | arn:aws:swf:us-east-1:{customer-account }:action/actions/AWS_EC2.InstanceId.Reboot/1.0

        Note: You must create at least one stop, terminate, or reboot alarm using the Amazon EC2 or CloudWatch console to create the EC2ActionsAccess IAM role for the first time. After this IAM role is created, you can create stop, terminate, or reboot alarms using the CLI.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setMetricName

        public void setMetricName​(String metricName)

        The name for the alarm's associated metric.

        Parameters:
        metricName - The name for the alarm's associated metric.
      • getMetricName

        public String getMetricName()

        The name for the alarm's associated metric.

        Returns:
        The name for the alarm's associated metric.
      • withMetricName

        public PutMetricAlarmRequest withMetricName​(String metricName)

        The name for the alarm's associated metric.

        Parameters:
        metricName - The name for the alarm's associated metric.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setNamespace

        public void setNamespace​(String namespace)

        The namespace for the alarm's associated metric.

        Parameters:
        namespace - The namespace for the alarm's associated metric.
      • getNamespace

        public String getNamespace()

        The namespace for the alarm's associated metric.

        Returns:
        The namespace for the alarm's associated metric.
      • withNamespace

        public PutMetricAlarmRequest withNamespace​(String namespace)

        The namespace for the alarm's associated metric.

        Parameters:
        namespace - The namespace for the alarm's associated metric.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setStatistic

        public void setStatistic​(String statistic)

        The statistic to apply to the alarm's associated metric.

        Parameters:
        statistic - The statistic to apply to the alarm's associated metric.
        See Also:
        Statistic
      • getStatistic

        public String getStatistic()

        The statistic to apply to the alarm's associated metric.

        Returns:
        The statistic to apply to the alarm's associated metric.
        See Also:
        Statistic
      • withStatistic

        public PutMetricAlarmRequest withStatistic​(String statistic)

        The statistic to apply to the alarm's associated metric.

        Parameters:
        statistic - The statistic to apply to the alarm's associated metric.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        Statistic
      • setStatistic

        public void setStatistic​(Statistic statistic)

        The statistic to apply to the alarm's associated metric.

        Parameters:
        statistic - The statistic to apply to the alarm's associated metric.
        See Also:
        Statistic
      • withStatistic

        public PutMetricAlarmRequest withStatistic​(Statistic statistic)

        The statistic to apply to the alarm's associated metric.

        Parameters:
        statistic - The statistic to apply to the alarm's associated metric.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        Statistic
      • getDimensions

        public List<Dimension> getDimensions()

        The dimensions for the alarm's associated metric.

        Returns:
        The dimensions for the alarm's associated metric.
      • setDimensions

        public void setDimensions​(Collection<Dimension> dimensions)

        The dimensions for the alarm's associated metric.

        Parameters:
        dimensions - The dimensions for the alarm's associated metric.
      • withDimensions

        public PutMetricAlarmRequest withDimensions​(Collection<Dimension> dimensions)

        The dimensions for the alarm's associated metric.

        Parameters:
        dimensions - The dimensions for the alarm's associated metric.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setPeriod

        public void setPeriod​(Integer period)

        The period in seconds over which the specified statistic is applied.

        Parameters:
        period - The period in seconds over which the specified statistic is applied.
      • getPeriod

        public Integer getPeriod()

        The period in seconds over which the specified statistic is applied.

        Returns:
        The period in seconds over which the specified statistic is applied.
      • withPeriod

        public PutMetricAlarmRequest withPeriod​(Integer period)

        The period in seconds over which the specified statistic is applied.

        Parameters:
        period - The period in seconds over which the specified statistic is applied.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setUnit

        public void setUnit​(String unit)

        The statistic's unit of measure. For example, the units for the Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that an instance receives on all network interfaces. You can also specify a unit when you create a custom metric. Units help provide conceptual meaning to your data. Metric data points that specify a unit of measure, such as Percent, are aggregated separately.

        Note: If you specify a unit, you must use a unit that is appropriate for the metric. Otherwise, this can cause an Amazon CloudWatch alarm to get stuck in the INSUFFICIENT DATA state.

        Parameters:
        unit - The statistic's unit of measure. For example, the units for the Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that an instance receives on all network interfaces. You can also specify a unit when you create a custom metric. Units help provide conceptual meaning to your data. Metric data points that specify a unit of measure, such as Percent, are aggregated separately.

        Note: If you specify a unit, you must use a unit that is appropriate for the metric. Otherwise, this can cause an Amazon CloudWatch alarm to get stuck in the INSUFFICIENT DATA state.

        See Also:
        StandardUnit
      • getUnit

        public String getUnit()

        The statistic's unit of measure. For example, the units for the Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that an instance receives on all network interfaces. You can also specify a unit when you create a custom metric. Units help provide conceptual meaning to your data. Metric data points that specify a unit of measure, such as Percent, are aggregated separately.

        Note: If you specify a unit, you must use a unit that is appropriate for the metric. Otherwise, this can cause an Amazon CloudWatch alarm to get stuck in the INSUFFICIENT DATA state.

        Returns:
        The statistic's unit of measure. For example, the units for the Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that an instance receives on all network interfaces. You can also specify a unit when you create a custom metric. Units help provide conceptual meaning to your data. Metric data points that specify a unit of measure, such as Percent, are aggregated separately.

        Note: If you specify a unit, you must use a unit that is appropriate for the metric. Otherwise, this can cause an Amazon CloudWatch alarm to get stuck in the INSUFFICIENT DATA state.

        See Also:
        StandardUnit
      • withUnit

        public PutMetricAlarmRequest withUnit​(String unit)

        The statistic's unit of measure. For example, the units for the Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that an instance receives on all network interfaces. You can also specify a unit when you create a custom metric. Units help provide conceptual meaning to your data. Metric data points that specify a unit of measure, such as Percent, are aggregated separately.

        Note: If you specify a unit, you must use a unit that is appropriate for the metric. Otherwise, this can cause an Amazon CloudWatch alarm to get stuck in the INSUFFICIENT DATA state.

        Parameters:
        unit - The statistic's unit of measure. For example, the units for the Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that an instance receives on all network interfaces. You can also specify a unit when you create a custom metric. Units help provide conceptual meaning to your data. Metric data points that specify a unit of measure, such as Percent, are aggregated separately.

        Note: If you specify a unit, you must use a unit that is appropriate for the metric. Otherwise, this can cause an Amazon CloudWatch alarm to get stuck in the INSUFFICIENT DATA state.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        StandardUnit
      • setUnit

        public void setUnit​(StandardUnit unit)

        The statistic's unit of measure. For example, the units for the Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that an instance receives on all network interfaces. You can also specify a unit when you create a custom metric. Units help provide conceptual meaning to your data. Metric data points that specify a unit of measure, such as Percent, are aggregated separately.

        Note: If you specify a unit, you must use a unit that is appropriate for the metric. Otherwise, this can cause an Amazon CloudWatch alarm to get stuck in the INSUFFICIENT DATA state.

        Parameters:
        unit - The statistic's unit of measure. For example, the units for the Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that an instance receives on all network interfaces. You can also specify a unit when you create a custom metric. Units help provide conceptual meaning to your data. Metric data points that specify a unit of measure, such as Percent, are aggregated separately.

        Note: If you specify a unit, you must use a unit that is appropriate for the metric. Otherwise, this can cause an Amazon CloudWatch alarm to get stuck in the INSUFFICIENT DATA state.

        See Also:
        StandardUnit
      • withUnit

        public PutMetricAlarmRequest withUnit​(StandardUnit unit)

        The statistic's unit of measure. For example, the units for the Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that an instance receives on all network interfaces. You can also specify a unit when you create a custom metric. Units help provide conceptual meaning to your data. Metric data points that specify a unit of measure, such as Percent, are aggregated separately.

        Note: If you specify a unit, you must use a unit that is appropriate for the metric. Otherwise, this can cause an Amazon CloudWatch alarm to get stuck in the INSUFFICIENT DATA state.

        Parameters:
        unit - The statistic's unit of measure. For example, the units for the Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that an instance receives on all network interfaces. You can also specify a unit when you create a custom metric. Units help provide conceptual meaning to your data. Metric data points that specify a unit of measure, such as Percent, are aggregated separately.

        Note: If you specify a unit, you must use a unit that is appropriate for the metric. Otherwise, this can cause an Amazon CloudWatch alarm to get stuck in the INSUFFICIENT DATA state.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        StandardUnit
      • setEvaluationPeriods

        public void setEvaluationPeriods​(Integer evaluationPeriods)

        The number of periods over which data is compared to the specified threshold.

        Parameters:
        evaluationPeriods - The number of periods over which data is compared to the specified threshold.
      • getEvaluationPeriods

        public Integer getEvaluationPeriods()

        The number of periods over which data is compared to the specified threshold.

        Returns:
        The number of periods over which data is compared to the specified threshold.
      • withEvaluationPeriods

        public PutMetricAlarmRequest withEvaluationPeriods​(Integer evaluationPeriods)

        The number of periods over which data is compared to the specified threshold.

        Parameters:
        evaluationPeriods - The number of periods over which data is compared to the specified threshold.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setThreshold

        public void setThreshold​(Double threshold)

        The value against which the specified statistic is compared.

        Parameters:
        threshold - The value against which the specified statistic is compared.
      • getThreshold

        public Double getThreshold()

        The value against which the specified statistic is compared.

        Returns:
        The value against which the specified statistic is compared.
      • withThreshold

        public PutMetricAlarmRequest withThreshold​(Double threshold)

        The value against which the specified statistic is compared.

        Parameters:
        threshold - The value against which the specified statistic is compared.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setComparisonOperator

        public void setComparisonOperator​(String comparisonOperator)

        The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.

        Parameters:
        comparisonOperator - The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.
        See Also:
        ComparisonOperator
      • getComparisonOperator

        public String getComparisonOperator()

        The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.

        Returns:
        The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.
        See Also:
        ComparisonOperator
      • withComparisonOperator

        public PutMetricAlarmRequest withComparisonOperator​(String comparisonOperator)

        The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.

        Parameters:
        comparisonOperator - The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        ComparisonOperator
      • setComparisonOperator

        public void setComparisonOperator​(ComparisonOperator comparisonOperator)

        The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.

        Parameters:
        comparisonOperator - The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.
        See Also:
        ComparisonOperator
      • withComparisonOperator

        public PutMetricAlarmRequest withComparisonOperator​(ComparisonOperator comparisonOperator)

        The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.

        Parameters:
        comparisonOperator - The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        ComparisonOperator
      • 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:
        Object.toString()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object