Class PutMetricAlarmRequest
- All Implemented Interfaces:
ReadLimitInfo
,Serializable
,Cloneable
- See Also:
-
Field Summary
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a shallow clone of this request.boolean
Indicates whether or not actions should be executed during any changes to the alarm's state.The list of actions to execute when this alarm transitions into anALARM
state from any other state.The description for the alarm.The descriptive name for the alarm.The arithmetic operation to use when comparing the specifiedStatistic
andThreshold
.The dimensions for the alarm's associated metric.The number of periods over which data is compared to the specified threshold.The list of actions to execute when this alarm transitions into anINSUFFICIENT_DATA
state from any other state.The name for the alarm's associated metric.The namespace for the alarm's associated metric.The list of actions to execute when this alarm transitions into anOK
state from any other state.The period in seconds over which the specified statistic is applied.The statistic to apply to the alarm's associated metric.The value against which the specified statistic is compared.getUnit()
The statistic's unit of measure.int
hashCode()
Indicates whether or not actions should be executed during any changes to the alarm's state.void
setActionsEnabled
(Boolean actionsEnabled) Indicates whether or not actions should be executed during any changes to the alarm's state.void
setAlarmActions
(Collection<String> alarmActions) The list of actions to execute when this alarm transitions into anALARM
state from any other state.void
setAlarmDescription
(String alarmDescription) The description for the alarm.void
setAlarmName
(String alarmName) The descriptive name for the alarm.void
setComparisonOperator
(ComparisonOperator comparisonOperator) The arithmetic operation to use when comparing the specifiedStatistic
andThreshold
.void
setComparisonOperator
(String comparisonOperator) The arithmetic operation to use when comparing the specifiedStatistic
andThreshold
.void
setDimensions
(Collection<Dimension> dimensions) The dimensions for the alarm's associated metric.void
setEvaluationPeriods
(Integer evaluationPeriods) The number of periods over which data is compared to the specified threshold.void
setInsufficientDataActions
(Collection<String> insufficientDataActions) The list of actions to execute when this alarm transitions into anINSUFFICIENT_DATA
state from any other state.void
setMetricName
(String metricName) The name for the alarm's associated metric.void
setNamespace
(String namespace) The namespace for the alarm's associated metric.void
setOKActions
(Collection<String> oKActions) The list of actions to execute when this alarm transitions into anOK
state from any other state.void
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
(String statistic) The statistic to apply to the alarm's associated metric.void
setThreshold
(Double threshold) The value against which the specified statistic is compared.void
setUnit
(StandardUnit unit) The statistic's unit of measure.void
The statistic's unit of measure.toString()
Returns a string representation of this object; useful for testing and debugging.withActionsEnabled
(Boolean actionsEnabled) Indicates whether or not actions should be executed during any changes to the alarm's state.withAlarmActions
(String... alarmActions) The list of actions to execute when this alarm transitions into anALARM
state from any other state.withAlarmActions
(Collection<String> alarmActions) The list of actions to execute when this alarm transitions into anALARM
state from any other state.withAlarmDescription
(String alarmDescription) The description for the alarm.withAlarmName
(String alarmName) The descriptive name for the alarm.withComparisonOperator
(ComparisonOperator comparisonOperator) The arithmetic operation to use when comparing the specifiedStatistic
andThreshold
.withComparisonOperator
(String comparisonOperator) The arithmetic operation to use when comparing the specifiedStatistic
andThreshold
.withDimensions
(Dimension... dimensions) The dimensions for the alarm's associated metric.withDimensions
(Collection<Dimension> dimensions) The dimensions for the alarm's associated metric.withEvaluationPeriods
(Integer evaluationPeriods) The number of periods over which data is compared to the specified threshold.withInsufficientDataActions
(String... insufficientDataActions) The list of actions to execute when this alarm transitions into anINSUFFICIENT_DATA
state from any other state.withInsufficientDataActions
(Collection<String> insufficientDataActions) The list of actions to execute when this alarm transitions into anINSUFFICIENT_DATA
state from any other state.withMetricName
(String metricName) The name for the alarm's associated metric.withNamespace
(String namespace) The namespace for the alarm's associated metric.withOKActions
(String... oKActions) The list of actions to execute when this alarm transitions into anOK
state from any other state.withOKActions
(Collection<String> oKActions) The list of actions to execute when this alarm transitions into anOK
state from any other state.withPeriod
(Integer period) The period in seconds over which the specified statistic is applied.withStatistic
(Statistic statistic) The statistic to apply to the alarm's associated metric.withStatistic
(String statistic) The statistic to apply to the alarm's associated metric.withThreshold
(Double threshold) The value against which the specified statistic is compared.withUnit
(StandardUnit unit) The statistic's unit of measure.The statistic's unit of measure.Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
Constructor Details
-
PutMetricAlarmRequest
public PutMetricAlarmRequest()
-
-
Method Details
-
setAlarmName
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
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
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
The description for the alarm.
- Parameters:
alarmDescription
- The description for the alarm.
-
getAlarmDescription
The description for the alarm.
- Returns:
- The description for the alarm.
-
withAlarmDescription
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
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
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
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
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
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
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 anOK
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
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)
orwithOKActions(java.util.Collection)
if you want to override the existing values.- Parameters:
oKActions
- The list of actions to execute when this alarm transitions into anOK
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
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 anOK
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
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
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 anALARM
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
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)
orwithAlarmActions(java.util.Collection)
if you want to override the existing values.- Parameters:
alarmActions
- The list of actions to execute when this alarm transitions into anALARM
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
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 anALARM
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
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
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 anINSUFFICIENT_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
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)
orwithInsufficientDataActions(java.util.Collection)
if you want to override the existing values.- Parameters:
insufficientDataActions
- The list of actions to execute when this alarm transitions into anINSUFFICIENT_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 anINSUFFICIENT_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
The name for the alarm's associated metric.
- Parameters:
metricName
- The name for the alarm's associated metric.
-
getMetricName
The name for the alarm's associated metric.
- Returns:
- The name for the alarm's associated metric.
-
withMetricName
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
The namespace for the alarm's associated metric.
- Parameters:
namespace
- The namespace for the alarm's associated metric.
-
getNamespace
The namespace for the alarm's associated metric.
- Returns:
- The namespace for the alarm's associated metric.
-
withNamespace
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
The statistic to apply to the alarm's associated metric.
- Parameters:
statistic
- The statistic to apply to the alarm's associated metric.- See Also:
-
getStatistic
The statistic to apply to the alarm's associated metric.
- Returns:
- The statistic to apply to the alarm's associated metric.
- See Also:
-
withStatistic
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:
-
setStatistic
The statistic to apply to the alarm's associated metric.
- Parameters:
statistic
- The statistic to apply to the alarm's associated metric.- See Also:
-
withStatistic
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:
-
getDimensions
The dimensions for the alarm's associated metric.
- Returns:
- The dimensions for the alarm's associated metric.
-
setDimensions
The dimensions for the alarm's associated metric.
- Parameters:
dimensions
- The dimensions for the alarm's associated metric.
-
withDimensions
The dimensions for the alarm's associated metric.
NOTE: This method appends the values to the existing list (if any). Use
setDimensions(java.util.Collection)
orwithDimensions(java.util.Collection)
if you want to override the existing values.- 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.
-
withDimensions
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
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
The period in seconds over which the specified statistic is applied.
- Returns:
- The period in seconds over which the specified statistic is applied.
-
withPeriod
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
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:
-
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:
-
withUnit
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:
-
setUnit
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:
-
withUnit
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:
-
setEvaluationPeriods
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
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
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
The value against which the specified statistic is compared.
- Parameters:
threshold
- The value against which the specified statistic is compared.
-
getThreshold
The value against which the specified statistic is compared.
- Returns:
- The value against which the specified statistic is compared.
-
withThreshold
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
The arithmetic operation to use when comparing the specified
Statistic
andThreshold
. The specifiedStatistic
value is used as the first operand.- Parameters:
comparisonOperator
- The arithmetic operation to use when comparing the specifiedStatistic
andThreshold
. The specifiedStatistic
value is used as the first operand.- See Also:
-
getComparisonOperator
The arithmetic operation to use when comparing the specified
Statistic
andThreshold
. The specifiedStatistic
value is used as the first operand.- Returns:
- The arithmetic operation to use when comparing the specified
Statistic
andThreshold
. The specifiedStatistic
value is used as the first operand. - See Also:
-
withComparisonOperator
The arithmetic operation to use when comparing the specified
Statistic
andThreshold
. The specifiedStatistic
value is used as the first operand.- Parameters:
comparisonOperator
- The arithmetic operation to use when comparing the specifiedStatistic
andThreshold
. The specifiedStatistic
value is used as the first operand.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setComparisonOperator
The arithmetic operation to use when comparing the specified
Statistic
andThreshold
. The specifiedStatistic
value is used as the first operand.- Parameters:
comparisonOperator
- The arithmetic operation to use when comparing the specifiedStatistic
andThreshold
. The specifiedStatistic
value is used as the first operand.- See Also:
-
withComparisonOperator
The arithmetic operation to use when comparing the specified
Statistic
andThreshold
. The specifiedStatistic
value is used as the first operand.- Parameters:
comparisonOperator
- The arithmetic operation to use when comparing the specifiedStatistic
andThreshold
. The specifiedStatistic
value is used as the first operand.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
Description copied from class:AmazonWebServiceRequest
Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.- Overrides:
clone
in classAmazonWebServiceRequest
- See Also:
-