Class MetricAlarm
- All Implemented Interfaces:
Serializable
,Cloneable
The MetricAlarm data type represents an alarm. You can use PutMetricAlarm to create or update an alarm.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
Indicates whether 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 Amazon Resource Name (ARN) of the alarm.The time stamp of the last update to the alarm configuration.The description for the alarm.The name of the alarm.The arithmetic operation to use when comparing the specifiedStatistic
andThreshold
.The list of dimensions associated with 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 of the alarm's metric.The namespace of 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 statistic is applied.A human-readable explanation for the alarm's state.An explanation for the alarm's state in machine-readable JSON formatThe time stamp of the last update to the alarm's state.The state value for the alarm.The statistic to apply to the alarm's associated metric.The value against which the specified statistic is compared.getUnit()
The unit of the alarm's associated metric.int
hashCode()
Indicates whether actions should be executed during any changes to the alarm's state.void
setActionsEnabled
(Boolean actionsEnabled) Indicates whether 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
setAlarmArn
(String alarmArn) The Amazon Resource Name (ARN) of the alarm.void
setAlarmConfigurationUpdatedTimestamp
(Date alarmConfigurationUpdatedTimestamp) The time stamp of the last update to the alarm configuration.void
setAlarmDescription
(String alarmDescription) The description for the alarm.void
setAlarmName
(String alarmName) The name of 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 list of dimensions associated with 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 of the alarm's metric.void
setNamespace
(String namespace) The namespace of 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 statistic is applied.void
setStateReason
(String stateReason) A human-readable explanation for the alarm's state.void
setStateReasonData
(String stateReasonData) An explanation for the alarm's state in machine-readable JSON formatvoid
setStateUpdatedTimestamp
(Date stateUpdatedTimestamp) The time stamp of the last update to the alarm's state.void
setStateValue
(StateValue stateValue) The state value for the alarm.void
setStateValue
(String stateValue) The state value for the alarm.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 unit of the alarm's associated metric.void
The unit of the alarm's associated metric.toString()
Returns a string representation of this object; useful for testing and debugging.withActionsEnabled
(Boolean actionsEnabled) Indicates whether 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.withAlarmArn
(String alarmArn) The Amazon Resource Name (ARN) of the alarm.withAlarmConfigurationUpdatedTimestamp
(Date alarmConfigurationUpdatedTimestamp) The time stamp of the last update to the alarm configuration.withAlarmDescription
(String alarmDescription) The description for the alarm.withAlarmName
(String alarmName) The name of 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 list of dimensions associated with the alarm's associated metric.withDimensions
(Collection<Dimension> dimensions) The list of dimensions associated with 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 of the alarm's metric.withNamespace
(String namespace) The namespace of 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 statistic is applied.withStateReason
(String stateReason) A human-readable explanation for the alarm's state.withStateReasonData
(String stateReasonData) An explanation for the alarm's state in machine-readable JSON formatwithStateUpdatedTimestamp
(Date stateUpdatedTimestamp) The time stamp of the last update to the alarm's state.withStateValue
(StateValue stateValue) The state value for the alarm.withStateValue
(String stateValue) The state value for the alarm.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 unit of the alarm's associated metric.The unit of the alarm's associated metric.
-
Constructor Details
-
MetricAlarm
public MetricAlarm()
-
-
Method Details
-
setAlarmName
The name of the alarm.
- Parameters:
alarmName
- The name of the alarm.
-
getAlarmName
The name of the alarm.
- Returns:
- The name of the alarm.
-
withAlarmName
The name of the alarm.
- Parameters:
alarmName
- The name of the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAlarmArn
The Amazon Resource Name (ARN) of the alarm.
- Parameters:
alarmArn
- The Amazon Resource Name (ARN) of the alarm.
-
getAlarmArn
The Amazon Resource Name (ARN) of the alarm.
- Returns:
- The Amazon Resource Name (ARN) of the alarm.
-
withAlarmArn
The Amazon Resource Name (ARN) of the alarm.
- Parameters:
alarmArn
- The Amazon Resource Name (ARN) of the alarm.- 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.
-
setAlarmConfigurationUpdatedTimestamp
The time stamp of the last update to the alarm configuration.
- Parameters:
alarmConfigurationUpdatedTimestamp
- The time stamp of the last update to the alarm configuration.
-
getAlarmConfigurationUpdatedTimestamp
The time stamp of the last update to the alarm configuration.
- Returns:
- The time stamp of the last update to the alarm configuration.
-
withAlarmConfigurationUpdatedTimestamp
The time stamp of the last update to the alarm configuration.
- Parameters:
alarmConfigurationUpdatedTimestamp
- The time stamp of the last update to the alarm configuration.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setActionsEnabled
Indicates whether actions should be executed during any changes to the alarm's state.
- Parameters:
actionsEnabled
- Indicates whether actions should be executed during any changes to the alarm's state.
-
getActionsEnabled
Indicates whether actions should be executed during any changes to the alarm's state.
- Returns:
- Indicates whether actions should be executed during any changes to the alarm's state.
-
withActionsEnabled
Indicates whether actions should be executed during any changes to the alarm's state.
- Parameters:
actionsEnabled
- Indicates whether 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 actions should be executed during any changes to the alarm's state.
- Returns:
- Indicates whether 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).- 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).
-
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).- 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).
-
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).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).- 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).- 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).- 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).- 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).
-
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).- 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).
-
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).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).- 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).- 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).- 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).The current WSDL lists this attribute as UnknownActions
.- 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).The current WSDL lists this attribute as UnknownActions
.
-
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).The current WSDL lists this attribute as UnknownActions
.- 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).The current WSDL lists this attribute as UnknownActions
.
-
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).The current WSDL lists this attribute as UnknownActions
.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).The current WSDL lists this attribute as UnknownActions
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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).The current WSDL lists this attribute as UnknownActions
.- 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).The current WSDL lists this attribute as UnknownActions
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStateValue
The state value for the alarm.
- Parameters:
stateValue
- The state value for the alarm.- See Also:
-
getStateValue
The state value for the alarm.
- Returns:
- The state value for the alarm.
- See Also:
-
withStateValue
The state value for the alarm.
- Parameters:
stateValue
- The state value for the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setStateValue
The state value for the alarm.
- Parameters:
stateValue
- The state value for the alarm.- See Also:
-
withStateValue
The state value for the alarm.
- Parameters:
stateValue
- The state value for the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setStateReason
A human-readable explanation for the alarm's state.
- Parameters:
stateReason
- A human-readable explanation for the alarm's state.
-
getStateReason
A human-readable explanation for the alarm's state.
- Returns:
- A human-readable explanation for the alarm's state.
-
withStateReason
A human-readable explanation for the alarm's state.
- Parameters:
stateReason
- A human-readable explanation for the alarm's state.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStateReasonData
An explanation for the alarm's state in machine-readable JSON format
- Parameters:
stateReasonData
- An explanation for the alarm's state in machine-readable JSON format
-
getStateReasonData
An explanation for the alarm's state in machine-readable JSON format
- Returns:
- An explanation for the alarm's state in machine-readable JSON format
-
withStateReasonData
An explanation for the alarm's state in machine-readable JSON format
- Parameters:
stateReasonData
- An explanation for the alarm's state in machine-readable JSON format- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStateUpdatedTimestamp
The time stamp of the last update to the alarm's state.
- Parameters:
stateUpdatedTimestamp
- The time stamp of the last update to the alarm's state.
-
getStateUpdatedTimestamp
The time stamp of the last update to the alarm's state.
- Returns:
- The time stamp of the last update to the alarm's state.
-
withStateUpdatedTimestamp
The time stamp of the last update to the alarm's state.
- Parameters:
stateUpdatedTimestamp
- The time stamp of the last update to the alarm's state.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMetricName
The name of the alarm's metric.
- Parameters:
metricName
- The name of the alarm's metric.
-
getMetricName
The name of the alarm's metric.
- Returns:
- The name of the alarm's metric.
-
withMetricName
The name of the alarm's metric.
- Parameters:
metricName
- The name of the alarm's metric.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setNamespace
The namespace of alarm's associated metric.
- Parameters:
namespace
- The namespace of alarm's associated metric.
-
getNamespace
The namespace of alarm's associated metric.
- Returns:
- The namespace of alarm's associated metric.
-
withNamespace
The namespace of alarm's associated metric.
- Parameters:
namespace
- The namespace of 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 list of dimensions associated with the alarm's associated metric.
- Returns:
- The list of dimensions associated with the alarm's associated metric.
-
setDimensions
The list of dimensions associated with the alarm's associated metric.
- Parameters:
dimensions
- The list of dimensions associated with the alarm's associated metric.
-
withDimensions
The list of dimensions associated with 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 list of dimensions associated with the alarm's associated metric.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withDimensions
The list of dimensions associated with the alarm's associated metric.
- Parameters:
dimensions
- The list of dimensions associated with 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 statistic is applied.
- Parameters:
period
- The period in seconds over which the statistic is applied.
-
getPeriod
The period in seconds over which the statistic is applied.
- Returns:
- The period in seconds over which the statistic is applied.
-
withPeriod
The period in seconds over which the statistic is applied.
- Parameters:
period
- The period in seconds over which the statistic is applied.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setUnit
The unit of the alarm's associated metric.
- Parameters:
unit
- The unit of the alarm's associated metric.- See Also:
-
getUnit
The unit of the alarm's associated metric.
- Returns:
- The unit of the alarm's associated metric.
- See Also:
-
withUnit
The unit of the alarm's associated metric.
- Parameters:
unit
- The unit of the alarm's associated metric.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setUnit
The unit of the alarm's associated metric.
- Parameters:
unit
- The unit of the alarm's associated metric.- See Also:
-
withUnit
The unit of the alarm's associated metric.
- Parameters:
unit
- The unit of the alarm's associated metric.- 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
-