Class MetricAlarm
- java.lang.Object
-
- com.amazonaws.services.cloudwatch.model.MetricAlarm
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class MetricAlarm extends Object implements Serializable, Cloneable
The MetricAlarm data type represents an alarm. You can use PutMetricAlarm to create or update an alarm.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MetricAlarm()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MetricAlarm
clone()
boolean
equals(Object obj)
Boolean
getActionsEnabled()
Indicates whether actions should be executed during any changes to the alarm's state.List<String>
getAlarmActions()
The list of actions to execute when this alarm transitions into anALARM
state from any other state.String
getAlarmArn()
The Amazon Resource Name (ARN) of the alarm.Date
getAlarmConfigurationUpdatedTimestamp()
The time stamp of the last update to the alarm configuration.String
getAlarmDescription()
The description for the alarm.String
getAlarmName()
The name of the alarm.String
getComparisonOperator()
The arithmetic operation to use when comparing the specifiedStatistic
andThreshold
.List<Dimension>
getDimensions()
The list of dimensions associated with the alarm's associated metric.Integer
getEvaluationPeriods()
The number of periods over which data is compared to the specified threshold.List<String>
getInsufficientDataActions()
The list of actions to execute when this alarm transitions into anINSUFFICIENT_DATA
state from any other state.String
getMetricName()
The name of the alarm's metric.String
getNamespace()
The namespace of alarm's associated metric.List<String>
getOKActions()
The list of actions to execute when this alarm transitions into anOK
state from any other state.Integer
getPeriod()
The period in seconds over which the statistic is applied.String
getStateReason()
A human-readable explanation for the alarm's state.String
getStateReasonData()
An explanation for the alarm's state in machine-readable JSON formatDate
getStateUpdatedTimestamp()
The time stamp of the last update to the alarm's state.String
getStateValue()
The state value for the alarm.String
getStatistic()
The statistic to apply to the alarm's associated metric.Double
getThreshold()
The value against which the specified statistic is compared.String
getUnit()
The unit of the alarm's associated metric.int
hashCode()
Boolean
isActionsEnabled()
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
setPeriod(Integer period)
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
setUnit(String unit)
The unit of the alarm's associated metric.String
toString()
Returns a string representation of this object; useful for testing and debugging.MetricAlarm
withActionsEnabled(Boolean actionsEnabled)
Indicates whether actions should be executed during any changes to the alarm's state.MetricAlarm
withAlarmActions(String... alarmActions)
The list of actions to execute when this alarm transitions into anALARM
state from any other state.MetricAlarm
withAlarmActions(Collection<String> alarmActions)
The list of actions to execute when this alarm transitions into anALARM
state from any other state.MetricAlarm
withAlarmArn(String alarmArn)
The Amazon Resource Name (ARN) of the alarm.MetricAlarm
withAlarmConfigurationUpdatedTimestamp(Date alarmConfigurationUpdatedTimestamp)
The time stamp of the last update to the alarm configuration.MetricAlarm
withAlarmDescription(String alarmDescription)
The description for the alarm.MetricAlarm
withAlarmName(String alarmName)
The name of the alarm.MetricAlarm
withComparisonOperator(ComparisonOperator comparisonOperator)
The arithmetic operation to use when comparing the specifiedStatistic
andThreshold
.MetricAlarm
withComparisonOperator(String comparisonOperator)
The arithmetic operation to use when comparing the specifiedStatistic
andThreshold
.MetricAlarm
withDimensions(Dimension... dimensions)
The list of dimensions associated with the alarm's associated metric.MetricAlarm
withDimensions(Collection<Dimension> dimensions)
The list of dimensions associated with the alarm's associated metric.MetricAlarm
withEvaluationPeriods(Integer evaluationPeriods)
The number of periods over which data is compared to the specified threshold.MetricAlarm
withInsufficientDataActions(String... insufficientDataActions)
The list of actions to execute when this alarm transitions into anINSUFFICIENT_DATA
state from any other state.MetricAlarm
withInsufficientDataActions(Collection<String> insufficientDataActions)
The list of actions to execute when this alarm transitions into anINSUFFICIENT_DATA
state from any other state.MetricAlarm
withMetricName(String metricName)
The name of the alarm's metric.MetricAlarm
withNamespace(String namespace)
The namespace of alarm's associated metric.MetricAlarm
withOKActions(String... oKActions)
The list of actions to execute when this alarm transitions into anOK
state from any other state.MetricAlarm
withOKActions(Collection<String> oKActions)
The list of actions to execute when this alarm transitions into anOK
state from any other state.MetricAlarm
withPeriod(Integer period)
The period in seconds over which the statistic is applied.MetricAlarm
withStateReason(String stateReason)
A human-readable explanation for the alarm's state.MetricAlarm
withStateReasonData(String stateReasonData)
An explanation for the alarm's state in machine-readable JSON formatMetricAlarm
withStateUpdatedTimestamp(Date stateUpdatedTimestamp)
The time stamp of the last update to the alarm's state.MetricAlarm
withStateValue(StateValue stateValue)
The state value for the alarm.MetricAlarm
withStateValue(String stateValue)
The state value for the alarm.MetricAlarm
withStatistic(Statistic statistic)
The statistic to apply to the alarm's associated metric.MetricAlarm
withStatistic(String statistic)
The statistic to apply to the alarm's associated metric.MetricAlarm
withThreshold(Double threshold)
The value against which the specified statistic is compared.MetricAlarm
withUnit(StandardUnit unit)
The unit of the alarm's associated metric.MetricAlarm
withUnit(String unit)
The unit of the alarm's associated metric.
-
-
-
Method Detail
-
setAlarmName
public void setAlarmName(String alarmName)
The name of the alarm.
- Parameters:
alarmName
- The name of the alarm.
-
getAlarmName
public String getAlarmName()
The name of the alarm.
- Returns:
- The name of the alarm.
-
withAlarmName
public MetricAlarm withAlarmName(String alarmName)
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
public void setAlarmArn(String alarmArn)
The Amazon Resource Name (ARN) of the alarm.
- Parameters:
alarmArn
- The Amazon Resource Name (ARN) of the alarm.
-
getAlarmArn
public String getAlarmArn()
The Amazon Resource Name (ARN) of the alarm.
- Returns:
- The Amazon Resource Name (ARN) of the alarm.
-
withAlarmArn
public MetricAlarm withAlarmArn(String alarmArn)
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
public void setAlarmDescription(String alarmDescription)
The description for the alarm.
- Parameters:
alarmDescription
- The description for the alarm.
-
getAlarmDescription
public String getAlarmDescription()
The description for the alarm.
- Returns:
- The description for the alarm.
-
withAlarmDescription
public MetricAlarm withAlarmDescription(String alarmDescription)
The description for the alarm.
- Parameters:
alarmDescription
- The description for the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAlarmConfigurationUpdatedTimestamp
public void setAlarmConfigurationUpdatedTimestamp(Date alarmConfigurationUpdatedTimestamp)
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
public Date 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
public MetricAlarm withAlarmConfigurationUpdatedTimestamp(Date alarmConfigurationUpdatedTimestamp)
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
public void setActionsEnabled(Boolean actionsEnabled)
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
public Boolean 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
public MetricAlarm withActionsEnabled(Boolean actionsEnabled)
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
public Boolean 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
public List<String> getOKActions()
The list of actions to execute when this alarm transitions into an
OK
state from any other state. Each action is specified as an Amazon Resource Name (ARN).- 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
public void setOKActions(Collection<String> oKActions)
The list of actions to execute when this alarm transitions into an
OK
state from any other state. Each action is specified as an Amazon Resource Name (ARN).- 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
public MetricAlarm withOKActions(String... oKActions)
The list of actions to execute when this alarm transitions into an
OK
state from any other state. Each action is specified as an Amazon Resource Name (ARN).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
public MetricAlarm withOKActions(Collection<String> oKActions)
The list of actions to execute when this alarm transitions into an
OK
state from any other state. Each action is specified as an Amazon Resource Name (ARN).- 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
public List<String> getAlarmActions()
The list of actions to execute when this alarm transitions into an
ALARM
state from any other state. Each action is specified as an Amazon Resource Name (ARN).- 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
public void setAlarmActions(Collection<String> alarmActions)
The list of actions to execute when this alarm transitions into an
ALARM
state from any other state. Each action is specified as an Amazon Resource Name (ARN).- 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
public MetricAlarm withAlarmActions(String... alarmActions)
The list of actions to execute when this alarm transitions into an
ALARM
state from any other state. Each action is specified as an Amazon Resource Name (ARN).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
public MetricAlarm withAlarmActions(Collection<String> alarmActions)
The list of actions to execute when this alarm transitions into an
ALARM
state from any other state. Each action is specified as an Amazon Resource Name (ARN).- 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
public List<String> getInsufficientDataActions()
The list of actions to execute when this alarm transitions into an
INSUFFICIENT_DATA
state from any other state. Each action is specified as an Amazon Resource Name (ARN).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
public void setInsufficientDataActions(Collection<String> insufficientDataActions)
The list of actions to execute when this alarm transitions into an
INSUFFICIENT_DATA
state from any other state. Each action is specified as an Amazon Resource Name (ARN).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
public MetricAlarm withInsufficientDataActions(String... insufficientDataActions)
The list of actions to execute when this alarm transitions into an
INSUFFICIENT_DATA
state from any other state. Each action is specified as an Amazon Resource Name (ARN).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
public MetricAlarm 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).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
public void setStateValue(String stateValue)
The state value for the alarm.
- Parameters:
stateValue
- The state value for the alarm.- See Also:
StateValue
-
getStateValue
public String getStateValue()
The state value for the alarm.
- Returns:
- The state value for the alarm.
- See Also:
StateValue
-
withStateValue
public MetricAlarm withStateValue(String stateValue)
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:
StateValue
-
setStateValue
public void setStateValue(StateValue stateValue)
The state value for the alarm.
- Parameters:
stateValue
- The state value for the alarm.- See Also:
StateValue
-
withStateValue
public MetricAlarm withStateValue(StateValue stateValue)
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:
StateValue
-
setStateReason
public void setStateReason(String stateReason)
A human-readable explanation for the alarm's state.
- Parameters:
stateReason
- A human-readable explanation for the alarm's state.
-
getStateReason
public String getStateReason()
A human-readable explanation for the alarm's state.
- Returns:
- A human-readable explanation for the alarm's state.
-
withStateReason
public MetricAlarm withStateReason(String stateReason)
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
public void setStateReasonData(String stateReasonData)
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
public String 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
public MetricAlarm withStateReasonData(String stateReasonData)
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
public void setStateUpdatedTimestamp(Date stateUpdatedTimestamp)
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
public Date 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
public MetricAlarm withStateUpdatedTimestamp(Date stateUpdatedTimestamp)
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
public void setMetricName(String metricName)
The name of the alarm's metric.
- Parameters:
metricName
- The name of the alarm's metric.
-
getMetricName
public String getMetricName()
The name of the alarm's metric.
- Returns:
- The name of the alarm's metric.
-
withMetricName
public MetricAlarm withMetricName(String metricName)
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
public void setNamespace(String namespace)
The namespace of alarm's associated metric.
- Parameters:
namespace
- The namespace of alarm's associated metric.
-
getNamespace
public String getNamespace()
The namespace of alarm's associated metric.
- Returns:
- The namespace of alarm's associated metric.
-
withNamespace
public MetricAlarm withNamespace(String namespace)
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
public void setStatistic(String statistic)
The statistic to apply to the alarm's associated metric.
- Parameters:
statistic
- The statistic to apply to the alarm's associated metric.- See Also:
Statistic
-
getStatistic
public String getStatistic()
The statistic to apply to the alarm's associated metric.
- Returns:
- The statistic to apply to the alarm's associated metric.
- See Also:
Statistic
-
withStatistic
public MetricAlarm withStatistic(String statistic)
The statistic to apply to the alarm's associated metric.
- Parameters:
statistic
- The statistic to apply to the alarm's associated metric.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
Statistic
-
setStatistic
public void setStatistic(Statistic statistic)
The statistic to apply to the alarm's associated metric.
- Parameters:
statistic
- The statistic to apply to the alarm's associated metric.- See Also:
Statistic
-
withStatistic
public MetricAlarm withStatistic(Statistic statistic)
The statistic to apply to the alarm's associated metric.
- Parameters:
statistic
- The statistic to apply to the alarm's associated metric.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
Statistic
-
getDimensions
public List<Dimension> getDimensions()
The list of dimensions associated with the alarm's associated metric.
- Returns:
- The list of dimensions associated with the alarm's associated metric.
-
setDimensions
public void setDimensions(Collection<Dimension> dimensions)
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
public MetricAlarm withDimensions(Dimension... dimensions)
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
public MetricAlarm withDimensions(Collection<Dimension> dimensions)
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
public void setPeriod(Integer period)
The period in seconds over which the statistic is applied.
- Parameters:
period
- The period in seconds over which the statistic is applied.
-
getPeriod
public Integer getPeriod()
The period in seconds over which the statistic is applied.
- Returns:
- The period in seconds over which the statistic is applied.
-
withPeriod
public MetricAlarm withPeriod(Integer period)
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
public void setUnit(String unit)
The unit of the alarm's associated metric.
- Parameters:
unit
- The unit of the alarm's associated metric.- See Also:
StandardUnit
-
getUnit
public String getUnit()
The unit of the alarm's associated metric.
- Returns:
- The unit of the alarm's associated metric.
- See Also:
StandardUnit
-
withUnit
public MetricAlarm withUnit(String unit)
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:
StandardUnit
-
setUnit
public void setUnit(StandardUnit unit)
The unit of the alarm's associated metric.
- Parameters:
unit
- The unit of the alarm's associated metric.- See Also:
StandardUnit
-
withUnit
public MetricAlarm withUnit(StandardUnit unit)
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:
StandardUnit
-
setEvaluationPeriods
public void setEvaluationPeriods(Integer evaluationPeriods)
The number of periods over which data is compared to the specified threshold.
- Parameters:
evaluationPeriods
- The number of periods over which data is compared to the specified threshold.
-
getEvaluationPeriods
public Integer getEvaluationPeriods()
The number of periods over which data is compared to the specified threshold.
- Returns:
- The number of periods over which data is compared to the specified threshold.
-
withEvaluationPeriods
public MetricAlarm withEvaluationPeriods(Integer evaluationPeriods)
The number of periods over which data is compared to the specified threshold.
- Parameters:
evaluationPeriods
- The number of periods over which data is compared to the specified threshold.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setThreshold
public void setThreshold(Double threshold)
The value against which the specified statistic is compared.
- Parameters:
threshold
- The value against which the specified statistic is compared.
-
getThreshold
public Double getThreshold()
The value against which the specified statistic is compared.
- Returns:
- The value against which the specified statistic is compared.
-
withThreshold
public MetricAlarm withThreshold(Double threshold)
The value against which the specified statistic is compared.
- Parameters:
threshold
- The value against which the specified statistic is compared.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setComparisonOperator
public void setComparisonOperator(String comparisonOperator)
The arithmetic operation to use when comparing the specified
Statistic
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:
ComparisonOperator
-
getComparisonOperator
public String 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:
ComparisonOperator
-
withComparisonOperator
public MetricAlarm withComparisonOperator(String comparisonOperator)
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:
ComparisonOperator
-
setComparisonOperator
public void setComparisonOperator(ComparisonOperator comparisonOperator)
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:
ComparisonOperator
-
withComparisonOperator
public MetricAlarm withComparisonOperator(ComparisonOperator comparisonOperator)
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:
ComparisonOperator
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public MetricAlarm clone()
-
-