|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectcom.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest
public class PutMetricAlarmRequest
Container for the parameters to the PutMetricAlarm operation.
Creates or updates an alarm and associates it with the specified Amazon CloudWatch metric. Optionally, this operation can associate one or more Amazon Simple Notification Service resources with the alarm.
When this operation creates an alarm, the alarm state is immediately set to INSUFFICIENT_DATA . The alarm is evaluated and its
StateValue is set appropriately. Any actions associated with the StateValue is then executed.
NOTE: When updating an existing alarm, its StateValue is left unchanged.
AmazonCloudWatch.putMetricAlarm(PutMetricAlarmRequest)| Constructor Summary | |
|---|---|
PutMetricAlarmRequest()
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
Boolean |
getActionsEnabled()
Indicates whether or not 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 an ALARM state from any other state. |
String |
getAlarmDescription()
The description for the alarm. |
String |
getAlarmName()
The descriptive name for the alarm. |
String |
getComparisonOperator()
The arithmetic operation to use when comparing the specified Statistic and Threshold. |
List<Dimension> |
getDimensions()
The dimensions for 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 an INSUFFICIENT_DATA state from any other state. |
String |
getMetricName()
The name for the alarm's associated metric. |
String |
getNamespace()
The namespace for the alarm's associated metric. |
List<String> |
getOKActions()
The list of actions to execute when this alarm transitions into an OK state from any other state. |
Integer |
getPeriod()
The period in seconds over which the specified statistic is applied. |
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 for the alarm's associated metric. |
int |
hashCode()
|
Boolean |
isActionsEnabled()
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 an ALARM 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 specified Statistic and Threshold. |
void |
setComparisonOperator(String comparisonOperator)
The arithmetic operation to use when comparing the specified Statistic and Threshold. |
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 an INSUFFICIENT_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 an OK state from any other state. |
void |
setPeriod(Integer period)
The period in seconds over which the specified statistic is applied. |
void |
setStatistic(Statistic statistic)
The statistic to apply to the alarm's associated metric. |
void |
setStatistic(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 for the alarm's associated metric. |
void |
setUnit(String unit)
The unit for the alarm's associated metric. |
String |
toString()
Returns a string representation of this object; useful for testing and debugging. |
PutMetricAlarmRequest |
withActionsEnabled(Boolean actionsEnabled)
Indicates whether or not actions should be executed during any changes to the alarm's state. |
PutMetricAlarmRequest |
withAlarmActions(Collection<String> alarmActions)
The list of actions to execute when this alarm transitions into an ALARM state from any other state. |
PutMetricAlarmRequest |
withAlarmActions(String... alarmActions)
The list of actions to execute when this alarm transitions into an ALARM state from any other state. |
PutMetricAlarmRequest |
withAlarmDescription(String alarmDescription)
The description for the alarm. |
PutMetricAlarmRequest |
withAlarmName(String alarmName)
The descriptive name for the alarm. |
PutMetricAlarmRequest |
withComparisonOperator(ComparisonOperator comparisonOperator)
The arithmetic operation to use when comparing the specified Statistic and Threshold. |
PutMetricAlarmRequest |
withComparisonOperator(String comparisonOperator)
The arithmetic operation to use when comparing the specified Statistic and Threshold. |
PutMetricAlarmRequest |
withDimensions(Collection<Dimension> dimensions)
The dimensions for the alarm's associated metric. |
PutMetricAlarmRequest |
withDimensions(Dimension... dimensions)
The dimensions for the alarm's associated metric. |
PutMetricAlarmRequest |
withEvaluationPeriods(Integer evaluationPeriods)
The number of periods over which data is compared to the specified threshold. |
PutMetricAlarmRequest |
withInsufficientDataActions(Collection<String> insufficientDataActions)
The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. |
PutMetricAlarmRequest |
withInsufficientDataActions(String... insufficientDataActions)
The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. |
PutMetricAlarmRequest |
withMetricName(String metricName)
The name for the alarm's associated metric. |
PutMetricAlarmRequest |
withNamespace(String namespace)
The namespace for the alarm's associated metric. |
PutMetricAlarmRequest |
withOKActions(Collection<String> oKActions)
The list of actions to execute when this alarm transitions into an OK state from any other state. |
PutMetricAlarmRequest |
withOKActions(String... oKActions)
The list of actions to execute when this alarm transitions into an OK state from any other state. |
PutMetricAlarmRequest |
withPeriod(Integer period)
The period in seconds over which the specified statistic is applied. |
PutMetricAlarmRequest |
withStatistic(Statistic statistic)
The statistic to apply to the alarm's associated metric. |
PutMetricAlarmRequest |
withStatistic(String statistic)
The statistic to apply to the alarm's associated metric. |
PutMetricAlarmRequest |
withThreshold(Double threshold)
The value against which the specified statistic is compared. |
PutMetricAlarmRequest |
withUnit(StandardUnit unit)
The unit for the alarm's associated metric. |
PutMetricAlarmRequest |
withUnit(String unit)
The unit for the alarm's associated metric. |
| Methods inherited from class com.amazonaws.AmazonWebServiceRequest |
|---|
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PutMetricAlarmRequest()
| Method Detail |
|---|
public String getAlarmName()
Constraints:
Length: 1 - 255
public void setAlarmName(String alarmName)
Constraints:
Length: 1 - 255
alarmName - The descriptive name for the alarm. This name must be unique within
the user's AWS accountpublic PutMetricAlarmRequest withAlarmName(String alarmName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 255
alarmName - The descriptive name for the alarm. This name must be unique within
the user's AWS account
public String getAlarmDescription()
Constraints:
Length: 0 - 255
public void setAlarmDescription(String alarmDescription)
Constraints:
Length: 0 - 255
alarmDescription - The description for the alarm.public PutMetricAlarmRequest withAlarmDescription(String alarmDescription)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 255
alarmDescription - The description for the alarm.
public Boolean isActionsEnabled()
public void setActionsEnabled(Boolean actionsEnabled)
actionsEnabled - Indicates whether or not actions should be executed during any changes
to the alarm's state.public PutMetricAlarmRequest withActionsEnabled(Boolean actionsEnabled)
Returns a reference to this object so that method calls can be chained together.
actionsEnabled - Indicates whether or not actions should be executed during any changes
to the alarm's state.
public Boolean getActionsEnabled()
public List<String> getOKActions()
OK state from any other state. Each action is specified
as an Amazon Resource Number (ARN). Currently the only action
supported is publishing to an Amazon SNS topic or an Amazon Auto
Scaling policy.
Constraints:
Length: 0 - 5
OK state from any other state. Each action is specified
as an Amazon Resource Number (ARN). Currently the only action
supported is publishing to an Amazon SNS topic or an Amazon Auto
Scaling policy.public void setOKActions(Collection<String> oKActions)
OK state from any other state. Each action is specified
as an Amazon Resource Number (ARN). Currently the only action
supported is publishing to an Amazon SNS topic or an Amazon Auto
Scaling policy.
Constraints:
Length: 0 - 5
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 Number (ARN). Currently the only action
supported is publishing to an Amazon SNS topic or an Amazon Auto
Scaling policy.public PutMetricAlarmRequest withOKActions(String... oKActions)
OK state from any other state. Each action is specified
as an Amazon Resource Number (ARN). Currently the only action
supported is publishing to an Amazon SNS topic or an Amazon Auto
Scaling policy.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 5
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 Number (ARN). Currently the only action
supported is publishing to an Amazon SNS topic or an Amazon Auto
Scaling policy.
public PutMetricAlarmRequest withOKActions(Collection<String> oKActions)
OK state from any other state. Each action is specified
as an Amazon Resource Number (ARN). Currently the only action
supported is publishing to an Amazon SNS topic or an Amazon Auto
Scaling policy.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 5
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 Number (ARN). Currently the only action
supported is publishing to an Amazon SNS topic or an Amazon Auto
Scaling policy.
public List<String> getAlarmActions()
ALARM state from any other state. Each action is
specified as an Amazon Resource Number (ARN). Currently the only
action supported is publishing to an Amazon SNS topic or an Amazon
Auto Scaling policy.
Constraints:
Length: 0 - 5
ALARM state from any other state. Each action is
specified as an Amazon Resource Number (ARN). Currently the only
action supported is publishing to an Amazon SNS topic or an Amazon
Auto Scaling policy.public void setAlarmActions(Collection<String> alarmActions)
ALARM state from any other state. Each action is
specified as an Amazon Resource Number (ARN). Currently the only
action supported is publishing to an Amazon SNS topic or an Amazon
Auto Scaling policy.
Constraints:
Length: 0 - 5
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 Number (ARN). Currently the only
action supported is publishing to an Amazon SNS topic or an Amazon
Auto Scaling policy.public PutMetricAlarmRequest withAlarmActions(String... alarmActions)
ALARM state from any other state. Each action is
specified as an Amazon Resource Number (ARN). Currently the only
action supported is publishing to an Amazon SNS topic or an Amazon
Auto Scaling policy.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 5
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 Number (ARN). Currently the only
action supported is publishing to an Amazon SNS topic or an Amazon
Auto Scaling policy.
public PutMetricAlarmRequest withAlarmActions(Collection<String> alarmActions)
ALARM state from any other state. Each action is
specified as an Amazon Resource Number (ARN). Currently the only
action supported is publishing to an Amazon SNS topic or an Amazon
Auto Scaling policy.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 5
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 Number (ARN). Currently the only
action supported is publishing to an Amazon SNS topic or an Amazon
Auto Scaling policy.
public List<String> getInsufficientDataActions()
INSUFFICIENT_DATA state from any other state. Each action
is specified as an Amazon Resource Number (ARN). Currently the only
action supported is publishing to an Amazon SNS topic or an Amazon
Auto Scaling policy.
Constraints:
Length: 0 - 5
INSUFFICIENT_DATA state from any other state. Each action
is specified as an Amazon Resource Number (ARN). Currently the only
action supported is publishing to an Amazon SNS topic or an Amazon
Auto Scaling policy.public void setInsufficientDataActions(Collection<String> insufficientDataActions)
INSUFFICIENT_DATA state from any other state. Each action
is specified as an Amazon Resource Number (ARN). Currently the only
action supported is publishing to an Amazon SNS topic or an Amazon
Auto Scaling policy.
Constraints:
Length: 0 - 5
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 Number (ARN). Currently the only
action supported is publishing to an Amazon SNS topic or an Amazon
Auto Scaling policy.public PutMetricAlarmRequest withInsufficientDataActions(String... insufficientDataActions)
INSUFFICIENT_DATA state from any other state. Each action
is specified as an Amazon Resource Number (ARN). Currently the only
action supported is publishing to an Amazon SNS topic or an Amazon
Auto Scaling policy.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 5
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 Number (ARN). Currently the only
action supported is publishing to an Amazon SNS topic or an Amazon
Auto Scaling policy.
public PutMetricAlarmRequest withInsufficientDataActions(Collection<String> insufficientDataActions)
INSUFFICIENT_DATA state from any other state. Each action
is specified as an Amazon Resource Number (ARN). Currently the only
action supported is publishing to an Amazon SNS topic or an Amazon
Auto Scaling policy.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 5
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 Number (ARN). Currently the only
action supported is publishing to an Amazon SNS topic or an Amazon
Auto Scaling policy.
public String getMetricName()
Constraints:
Length: 1 - 255
public void setMetricName(String metricName)
Constraints:
Length: 1 - 255
metricName - The name for the alarm's associated metric.public PutMetricAlarmRequest withMetricName(String metricName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 255
metricName - The name for the alarm's associated metric.
public String getNamespace()
Constraints:
Length: 1 - 255
Pattern: [^:].*
public void setNamespace(String namespace)
Constraints:
Length: 1 - 255
Pattern: [^:].*
namespace - The namespace for the alarm's associated metric.public PutMetricAlarmRequest withNamespace(String namespace)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 255
Pattern: [^:].*
namespace - The namespace for the alarm's associated metric.
public String getStatistic()
Constraints:
Allowed Values: SampleCount, Average, Sum, Minimum, Maximum
Statisticpublic void setStatistic(String statistic)
Constraints:
Allowed Values: SampleCount, Average, Sum, Minimum, Maximum
statistic - The statistic to apply to the alarm's associated metric.Statisticpublic PutMetricAlarmRequest withStatistic(String statistic)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: SampleCount, Average, Sum, Minimum, Maximum
statistic - The statistic to apply to the alarm's associated metric.
Statisticpublic void setStatistic(Statistic statistic)
Constraints:
Allowed Values: SampleCount, Average, Sum, Minimum, Maximum
statistic - The statistic to apply to the alarm's associated metric.Statisticpublic PutMetricAlarmRequest withStatistic(Statistic statistic)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: SampleCount, Average, Sum, Minimum, Maximum
statistic - The statistic to apply to the alarm's associated metric.
Statisticpublic List<Dimension> getDimensions()
Constraints:
Length: 0 - 10
public void setDimensions(Collection<Dimension> dimensions)
Constraints:
Length: 0 - 10
dimensions - The dimensions for the alarm's associated metric.public PutMetricAlarmRequest withDimensions(Dimension... dimensions)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 10
dimensions - The dimensions for the alarm's associated metric.
public PutMetricAlarmRequest withDimensions(Collection<Dimension> dimensions)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 10
dimensions - The dimensions for the alarm's associated metric.
public Integer getPeriod()
Constraints:
Range: 60 -
public void setPeriod(Integer period)
Constraints:
Range: 60 -
period - The period in seconds over which the specified statistic is applied.public PutMetricAlarmRequest withPeriod(Integer period)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 60 -
period - The period in seconds over which the specified statistic is applied.
public String getUnit()
Constraints:
Allowed Values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, None
StandardUnitpublic void setUnit(String unit)
Constraints:
Allowed Values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, None
unit - The unit for the alarm's associated metric.StandardUnitpublic PutMetricAlarmRequest withUnit(String unit)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, None
unit - The unit for the alarm's associated metric.
StandardUnitpublic void setUnit(StandardUnit unit)
Constraints:
Allowed Values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, None
unit - The unit for the alarm's associated metric.StandardUnitpublic PutMetricAlarmRequest withUnit(StandardUnit unit)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, None
unit - The unit for the alarm's associated metric.
StandardUnitpublic Integer getEvaluationPeriods()
Constraints:
Range: 1 -
public void setEvaluationPeriods(Integer evaluationPeriods)
Constraints:
Range: 1 -
evaluationPeriods - The number of periods over which data is compared to the specified
threshold.public PutMetricAlarmRequest withEvaluationPeriods(Integer evaluationPeriods)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 1 -
evaluationPeriods - The number of periods over which data is compared to the specified
threshold.
public Double getThreshold()
public void setThreshold(Double threshold)
threshold - The value against which the specified statistic is compared.public PutMetricAlarmRequest withThreshold(Double threshold)
Returns a reference to this object so that method calls can be chained together.
threshold - The value against which the specified statistic is compared.
public String getComparisonOperator()
Statistic and Threshold. The specified
Statistic value is used as the first operand.
Constraints:
Allowed Values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold
Statistic and Threshold. The specified
Statistic value is used as the first operand.ComparisonOperatorpublic void setComparisonOperator(String comparisonOperator)
Statistic and Threshold. The specified
Statistic value is used as the first operand.
Constraints:
Allowed Values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold
comparisonOperator - The arithmetic operation to use when comparing the specified
Statistic and Threshold. The specified
Statistic value is used as the first operand.ComparisonOperatorpublic PutMetricAlarmRequest withComparisonOperator(String comparisonOperator)
Statistic and Threshold. The specified
Statistic value is used as the first operand.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold
comparisonOperator - The arithmetic operation to use when comparing the specified
Statistic and Threshold. The specified
Statistic value is used as the first operand.
ComparisonOperatorpublic void setComparisonOperator(ComparisonOperator comparisonOperator)
Statistic and Threshold. The specified
Statistic value is used as the first operand.
Constraints:
Allowed Values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold
comparisonOperator - The arithmetic operation to use when comparing the specified
Statistic and Threshold. The specified
Statistic value is used as the first operand.ComparisonOperatorpublic PutMetricAlarmRequest withComparisonOperator(ComparisonOperator comparisonOperator)
Statistic and Threshold. The specified
Statistic value is used as the first operand.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold
comparisonOperator - The arithmetic operation to use when comparing the specified
Statistic and Threshold. The specified
Statistic value is used as the first operand.
ComparisonOperatorpublic String toString()
toString in class ObjectObject.toString()public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||