public class PutMetricAlarmRequest extends AmazonWebServiceRequest implements java.io.Serializable
Creates or updates an alarm and associates it with the specified Amazon CloudWatch metric. Optionally, this operation can associate one or more Amazon Simple Notification Service resources with the alarm.
When this operation creates an alarm, the alarm state is immediately set to
INSUFFICIENT_DATA
. The alarm is evaluated and its
StateValue
is set appropriately. Any actions associated with the
StateValue
is then executed.
StateValue
is left
unchanged. ec2:DescribeInstanceStatus
and
ec2:DescribeInstances
for all alarms on Amazon EC2 instance
status metrics.ec2:StopInstances
for alarms with stop actions.ec2:TerminateInstances
for alarms with terminate actions.ec2:DescribeInstanceRecoveryAttribute
, and
ec2:RecoverInstances
for alarms with recover actions.If you have read/write permissions for Amazon CloudWatch but not for Amazon EC2, you can still create an alarm but the stop or terminate actions won't be performed on the Amazon EC2 instance. However, if you are later granted permission to use the associated Amazon EC2 APIs, the alarm actions you created earlier will be performed. For more information about IAM permissions, see Permissions and Policies in Using IAM.
If you are using an IAM role (e.g., an Amazon EC2 instance profile), you cannot stop or terminate the instance using alarm actions. However, you can still see the alarm state and perform any other actions such as Amazon SNS notifications or Auto Scaling policies.
If you are using temporary security credentials granted using the AWS Security Token Service (AWS STS), you cannot stop or terminate an Amazon EC2 instance using alarm actions.
Constructor and Description |
---|
PutMetricAlarmRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.Boolean |
getActionsEnabled()
Indicates whether or not actions should be executed during any changes to
the alarm's state.
|
java.util.List<java.lang.String> |
getAlarmActions()
The list of actions to execute when this alarm transitions into an
ALARM state from any other state. |
java.lang.String |
getAlarmDescription()
The description for the alarm.
|
java.lang.String |
getAlarmName()
The descriptive name for the alarm.
|
java.lang.String |
getComparisonOperator()
The arithmetic operation to use when comparing the specified
Statistic and Threshold . |
java.util.List<Dimension> |
getDimensions()
The dimensions for the alarm's associated metric.
|
java.lang.Integer |
getEvaluationPeriods()
The number of periods over which data is compared to the specified
threshold.
|
java.util.List<java.lang.String> |
getInsufficientDataActions()
The list of actions to execute when this alarm transitions into an
INSUFFICIENT_DATA state from any other state. |
java.lang.String |
getMetricName()
The name for the alarm's associated metric.
|
java.lang.String |
getNamespace()
The namespace for the alarm's associated metric.
|
java.util.List<java.lang.String> |
getOKActions()
The list of actions to execute when this alarm transitions into an
OK state from any other state. |
java.lang.Integer |
getPeriod()
The period in seconds over which the specified statistic is applied.
|
java.lang.String |
getStatistic()
The statistic to apply to the alarm's associated metric.
|
java.lang.Double |
getThreshold()
The value against which the specified statistic is compared.
|
java.lang.String |
getUnit()
The statistic's unit of measure.
|
int |
hashCode() |
java.lang.Boolean |
isActionsEnabled()
Indicates whether or not actions should be executed during any changes to
the alarm's state.
|
void |
setActionsEnabled(java.lang.Boolean actionsEnabled)
Indicates whether or not actions should be executed during any changes to
the alarm's state.
|
void |
setAlarmActions(java.util.Collection<java.lang.String> alarmActions)
The list of actions to execute when this alarm transitions into an
ALARM state from any other state. |
void |
setAlarmDescription(java.lang.String alarmDescription)
The description for the alarm.
|
void |
setAlarmName(java.lang.String alarmName)
The descriptive name for the alarm.
|
void |
setComparisonOperator(ComparisonOperator comparisonOperator)
The arithmetic operation to use when comparing the specified
Statistic and Threshold . |
void |
setComparisonOperator(java.lang.String comparisonOperator)
The arithmetic operation to use when comparing the specified
Statistic and Threshold . |
void |
setDimensions(java.util.Collection<Dimension> dimensions)
The dimensions for the alarm's associated metric.
|
void |
setEvaluationPeriods(java.lang.Integer evaluationPeriods)
The number of periods over which data is compared to the specified
threshold.
|
void |
setInsufficientDataActions(java.util.Collection<java.lang.String> insufficientDataActions)
The list of actions to execute when this alarm transitions into an
INSUFFICIENT_DATA state from any other state. |
void |
setMetricName(java.lang.String metricName)
The name for the alarm's associated metric.
|
void |
setNamespace(java.lang.String namespace)
The namespace for the alarm's associated metric.
|
void |
setOKActions(java.util.Collection<java.lang.String> oKActions)
The list of actions to execute when this alarm transitions into an
OK state from any other state. |
void |
setPeriod(java.lang.Integer period)
The period in seconds over which the specified statistic is applied.
|
void |
setStatistic(Statistic statistic)
The statistic to apply to the alarm's associated metric.
|
void |
setStatistic(java.lang.String statistic)
The statistic to apply to the alarm's associated metric.
|
void |
setThreshold(java.lang.Double threshold)
The value against which the specified statistic is compared.
|
void |
setUnit(StandardUnit unit)
The statistic's unit of measure.
|
void |
setUnit(java.lang.String unit)
The statistic's unit of measure.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
PutMetricAlarmRequest |
withActionsEnabled(java.lang.Boolean actionsEnabled)
Indicates whether or not actions should be executed during any changes to
the alarm's state.
|
PutMetricAlarmRequest |
withAlarmActions(java.util.Collection<java.lang.String> alarmActions)
The list of actions to execute when this alarm transitions into an
ALARM state from any other state. |
PutMetricAlarmRequest |
withAlarmActions(java.lang.String... alarmActions)
The list of actions to execute when this alarm transitions into an
ALARM state from any other state. |
PutMetricAlarmRequest |
withAlarmDescription(java.lang.String alarmDescription)
The description for the alarm.
|
PutMetricAlarmRequest |
withAlarmName(java.lang.String alarmName)
The descriptive name for the alarm.
|
PutMetricAlarmRequest |
withComparisonOperator(ComparisonOperator comparisonOperator)
The arithmetic operation to use when comparing the specified
Statistic and Threshold . |
PutMetricAlarmRequest |
withComparisonOperator(java.lang.String comparisonOperator)
The arithmetic operation to use when comparing the specified
Statistic and Threshold . |
PutMetricAlarmRequest |
withDimensions(java.util.Collection<Dimension> dimensions)
The dimensions for the alarm's associated metric.
|
PutMetricAlarmRequest |
withDimensions(Dimension... dimensions)
The dimensions for the alarm's associated metric.
|
PutMetricAlarmRequest |
withEvaluationPeriods(java.lang.Integer evaluationPeriods)
The number of periods over which data is compared to the specified
threshold.
|
PutMetricAlarmRequest |
withInsufficientDataActions(java.util.Collection<java.lang.String> insufficientDataActions)
The list of actions to execute when this alarm transitions into an
INSUFFICIENT_DATA state from any other state. |
PutMetricAlarmRequest |
withInsufficientDataActions(java.lang.String... insufficientDataActions)
The list of actions to execute when this alarm transitions into an
INSUFFICIENT_DATA state from any other state. |
PutMetricAlarmRequest |
withMetricName(java.lang.String metricName)
The name for the alarm's associated metric.
|
PutMetricAlarmRequest |
withNamespace(java.lang.String namespace)
The namespace for the alarm's associated metric.
|
PutMetricAlarmRequest |
withOKActions(java.util.Collection<java.lang.String> oKActions)
The list of actions to execute when this alarm transitions into an
OK state from any other state. |
PutMetricAlarmRequest |
withOKActions(java.lang.String... oKActions)
The list of actions to execute when this alarm transitions into an
OK state from any other state. |
PutMetricAlarmRequest |
withPeriod(java.lang.Integer period)
The period in seconds over which the specified statistic is applied.
|
PutMetricAlarmRequest |
withStatistic(Statistic statistic)
The statistic to apply to the alarm's associated metric.
|
PutMetricAlarmRequest |
withStatistic(java.lang.String statistic)
The statistic to apply to the alarm's associated metric.
|
PutMetricAlarmRequest |
withThreshold(java.lang.Double threshold)
The value against which the specified statistic is compared.
|
PutMetricAlarmRequest |
withUnit(StandardUnit unit)
The statistic's unit of measure.
|
PutMetricAlarmRequest |
withUnit(java.lang.String unit)
The statistic's unit of measure.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.lang.String getAlarmName()
The descriptive name for the alarm. This name must be unique within the user's AWS account
Constraints:
Length: 1 - 255
The descriptive name for the alarm. This name must be unique within the user's AWS account
public void setAlarmName(java.lang.String alarmName)
The descriptive name for the alarm. This name must be unique within the user's AWS account
Constraints:
Length: 1 - 255
alarmName
- The descriptive name for the alarm. This name must be unique within the user's AWS account
public PutMetricAlarmRequest withAlarmName(java.lang.String alarmName)
The descriptive name for the alarm. This name must be unique within the user's AWS account
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 255
alarmName
- The descriptive name for the alarm. This name must be unique within the user's AWS account
public java.lang.String getAlarmDescription()
The description for the alarm.
Constraints:
Length: 0 - 1024
The description for the alarm.
public void setAlarmDescription(java.lang.String alarmDescription)
The description for the alarm.
Constraints:
Length: 0 - 1024
alarmDescription
- The description for the alarm.
public PutMetricAlarmRequest withAlarmDescription(java.lang.String alarmDescription)
The description for the alarm.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 1024
alarmDescription
- The description for the alarm.
public java.lang.Boolean isActionsEnabled()
Indicates whether or not actions should be executed during any changes to the alarm's state.
Indicates whether or not actions should be executed during any changes to the alarm's state.
public java.lang.Boolean getActionsEnabled()
Indicates whether or not actions should be executed during any changes to the alarm's state.
Indicates whether or not actions should be executed during any changes to the alarm's state.
public void setActionsEnabled(java.lang.Boolean actionsEnabled)
Indicates whether or not actions should be executed during any changes to the alarm's state.
actionsEnabled
- Indicates whether or not actions should be executed during any changes to the alarm's state.
public PutMetricAlarmRequest withActionsEnabled(java.lang.Boolean actionsEnabled)
Indicates whether or not actions should be executed during any changes to the alarm's state.
Returns a reference to this object so that method calls can be chained together.
actionsEnabled
- Indicates whether or not actions should be executed during any changes to the alarm's state.
public java.util.List<java.lang.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.
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.
public void setOKActions(java.util.Collection<java.lang.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.
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:{< i>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.
public PutMetricAlarmRequest withOKActions(java.lang.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.
Returns a reference to this object so that method calls can be chained together.
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:{< i>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.
public PutMetricAlarmRequest withOKActions(java.util.Collection<java.lang.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.
Returns a reference to this object so that method calls can be chained together.
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:{< i>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.
public java.util.List<java.lang.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.
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.
public void setAlarmActions(java.util.Collection<java.lang.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.
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:{< i>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.
public PutMetricAlarmRequest withAlarmActions(java.lang.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.
Returns a reference to this object so that method calls can be chained together.
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:{< i>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.
public PutMetricAlarmRequest withAlarmActions(java.util.Collection<java.lang.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.
Returns a reference to this object so that method calls can be chained together.
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:{< i>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.
public java.util.List<java.lang.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.
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.
public void setInsufficientDataActions(java.util.Collection<java.lang.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.
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:{< i>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.
public PutMetricAlarmRequest withInsufficientDataActions(java.lang.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.
Returns a reference to this object so that method calls can be chained together.
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:{< i>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.
public PutMetricAlarmRequest withInsufficientDataActions(java.util.Collection<java.lang.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.
Returns a reference to this object so that method calls can be chained together.
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:{< i>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.
public java.lang.String getMetricName()
The name for the alarm's associated metric.
Constraints:
Length: 1 - 255
The name for the alarm's associated metric.
public void setMetricName(java.lang.String metricName)
The name for the alarm's associated metric.
Constraints:
Length: 1 - 255
metricName
- The name for the alarm's associated metric.
public PutMetricAlarmRequest withMetricName(java.lang.String metricName)
The name for the alarm's associated metric.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 255
metricName
- The name for the alarm's associated metric.
public java.lang.String getNamespace()
The namespace for the alarm's associated metric.
Constraints:
Length: 1 - 255
Pattern: [^:].*
The namespace for the alarm's associated metric.
public void setNamespace(java.lang.String namespace)
The namespace for the alarm's associated metric.
Constraints:
Length: 1 - 255
Pattern: [^:].*
namespace
- The namespace for the alarm's associated metric.
public PutMetricAlarmRequest withNamespace(java.lang.String namespace)
The namespace for the alarm's associated metric.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 255
Pattern: [^:].*
namespace
- The namespace for the alarm's associated metric.
public java.lang.String getStatistic()
The statistic to apply to the alarm's associated metric.
Constraints:
Allowed Values: SampleCount, Average, Sum, Minimum, Maximum
The statistic to apply to the alarm's associated metric.
Statistic
public void setStatistic(java.lang.String statistic)
The statistic to apply to the alarm's associated metric.
Constraints:
Allowed Values: SampleCount, Average, Sum, Minimum, Maximum
statistic
- The statistic to apply to the alarm's associated metric.
Statistic
public PutMetricAlarmRequest withStatistic(java.lang.String statistic)
The statistic to apply to the alarm's associated metric.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: SampleCount, Average, Sum, Minimum, Maximum
statistic
- The statistic to apply to the alarm's associated metric.
Statistic
public void setStatistic(Statistic statistic)
The statistic to apply to the alarm's associated metric.
Constraints:
Allowed Values: SampleCount, Average, Sum, Minimum, Maximum
statistic
- The statistic to apply to the alarm's associated metric.
Statistic
public PutMetricAlarmRequest withStatistic(Statistic statistic)
The statistic to apply to the alarm's associated metric.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: SampleCount, Average, Sum, Minimum, Maximum
statistic
- The statistic to apply to the alarm's associated metric.
Statistic
public java.util.List<Dimension> getDimensions()
The dimensions for the alarm's associated metric.
The dimensions for the alarm's associated metric.
public void setDimensions(java.util.Collection<Dimension> dimensions)
The dimensions for the alarm's associated metric.
dimensions
- The dimensions for the alarm's associated metric.
public PutMetricAlarmRequest withDimensions(Dimension... dimensions)
The dimensions for the alarm's associated metric.
Returns a reference to this object so that method calls can be chained together.
dimensions
- The dimensions for the alarm's associated metric.
public PutMetricAlarmRequest withDimensions(java.util.Collection<Dimension> dimensions)
The dimensions for the alarm's associated metric.
Returns a reference to this object so that method calls can be chained together.
dimensions
- The dimensions for the alarm's associated metric.
public java.lang.Integer getPeriod()
The period in seconds over which the specified statistic is applied.
Constraints:
Range: 60 -
The period in seconds over which the specified statistic is applied.
public void setPeriod(java.lang.Integer period)
The period in seconds over which the specified statistic is applied.
Constraints:
Range: 60 -
period
- The period in seconds over which the specified statistic is applied.
public PutMetricAlarmRequest withPeriod(java.lang.Integer period)
The period in seconds over which the specified statistic is applied.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 60 -
period
- The period in seconds over which the specified statistic is applied.
public java.lang.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.
Constraints:
Allowed Values: Seconds, Microseconds, Milliseconds, Bytes,
Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits,
Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second,
Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second,
Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second,
Count/Second, None
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.
StandardUnit
public void setUnit(java.lang.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.
Constraints:
Allowed Values: Seconds, Microseconds, Milliseconds, Bytes,
Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits,
Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second,
Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second,
Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second,
Count/Second, None
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.
StandardUnit
public PutMetricAlarmRequest withUnit(java.lang.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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Seconds, Microseconds, Milliseconds, Bytes,
Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits,
Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second,
Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second,
Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second,
Count/Second, None
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.
StandardUnit
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.
Constraints:
Allowed Values: Seconds, Microseconds, Milliseconds, Bytes,
Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits,
Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second,
Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second,
Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second,
Count/Second, None
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.
StandardUnit
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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Seconds, Microseconds, Milliseconds, Bytes,
Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits,
Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second,
Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second,
Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second,
Count/Second, None
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.
StandardUnit
public java.lang.Integer getEvaluationPeriods()
The number of periods over which data is compared to the specified threshold.
Constraints:
Range: 1 -
The number of periods over which data is compared to the specified threshold.
public void setEvaluationPeriods(java.lang.Integer evaluationPeriods)
The number of periods over which data is compared to the specified threshold.
Constraints:
Range: 1 -
evaluationPeriods
- The number of periods over which data is compared to the specified threshold.
public PutMetricAlarmRequest withEvaluationPeriods(java.lang.Integer evaluationPeriods)
The number of periods over which data is compared to the specified threshold.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 1 -
evaluationPeriods
- The number of periods over which data is compared to the specified threshold.
public java.lang.Double getThreshold()
The value against which the specified statistic is compared.
The value against which the specified statistic is compared.
public void setThreshold(java.lang.Double threshold)
The value against which the specified statistic is compared.
threshold
- The value against which the specified statistic is compared.
public PutMetricAlarmRequest withThreshold(java.lang.Double threshold)
The value against which the specified statistic is compared.
Returns a reference to this object so that method calls can be chained together.
threshold
- The value against which the specified statistic is compared.
public java.lang.String getComparisonOperator()
The arithmetic operation to use when comparing the specified
Statistic
and Threshold
. The specified
Statistic
value is used as the first operand.
Constraints:
Allowed Values: GreaterThanOrEqualToThreshold,
GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold
The arithmetic operation to use when comparing the specified
Statistic
and Threshold
. The specified
Statistic
value is used as the first operand.
ComparisonOperator
public void setComparisonOperator(java.lang.String comparisonOperator)
The arithmetic operation to use when comparing the specified
Statistic
and Threshold
. The specified
Statistic
value is used as the first operand.
Constraints:
Allowed Values: GreaterThanOrEqualToThreshold,
GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold
comparisonOperator
-
The arithmetic operation to use when comparing the specified
Statistic
and Threshold
. The
specified Statistic
value is used as the first
operand.
ComparisonOperator
public PutMetricAlarmRequest withComparisonOperator(java.lang.String comparisonOperator)
The arithmetic operation to use when comparing the specified
Statistic
and Threshold
. The specified
Statistic
value is used as the first operand.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: GreaterThanOrEqualToThreshold,
GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold
comparisonOperator
-
The arithmetic operation to use when comparing the specified
Statistic
and Threshold
. The
specified Statistic
value is used as the first
operand.
ComparisonOperator
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.
Constraints:
Allowed Values: GreaterThanOrEqualToThreshold,
GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold
comparisonOperator
-
The arithmetic operation to use when comparing the specified
Statistic
and Threshold
. The
specified Statistic
value is used as the first
operand.
ComparisonOperator
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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: GreaterThanOrEqualToThreshold,
GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold
comparisonOperator
-
The arithmetic operation to use when comparing the specified
Statistic
and Threshold
. The
specified Statistic
value is used as the first
operand.
ComparisonOperator
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.