com.amazonaws.services.cloudwatch.model
Class PutMetricAlarmRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest

public class PutMetricAlarmRequest
extends AmazonWebServiceRequest

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.

See Also:
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

PutMetricAlarmRequest

public PutMetricAlarmRequest()
Method Detail

getAlarmName

public String getAlarmName()
The descriptive name for the alarm. This name must be unique within the user's AWS account

Constraints:
Length: 1 - 255

Returns:
The descriptive name for the alarm. This name must be unique within the user's AWS account

setAlarmName

public void setAlarmName(String alarmName)
The descriptive name for the alarm. This name must be unique within the user's AWS account

Constraints:
Length: 1 - 255

Parameters:
alarmName - The descriptive name for the alarm. This name must be unique within the user's AWS account

withAlarmName

public PutMetricAlarmRequest withAlarmName(String alarmName)
The descriptive name for the alarm. This name must be unique within the user's AWS account

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 255

Parameters:
alarmName - The descriptive name for the alarm. This name must be unique within the user's AWS account
Returns:
A reference to this updated object so that method calls can be chained together.

getAlarmDescription

public String getAlarmDescription()
The description for the alarm.

Constraints:
Length: 0 - 255

Returns:
The description for the alarm.

setAlarmDescription

public void setAlarmDescription(String alarmDescription)
The description for the alarm.

Constraints:
Length: 0 - 255

Parameters:
alarmDescription - The description for the alarm.

withAlarmDescription

public PutMetricAlarmRequest withAlarmDescription(String alarmDescription)
The description for the alarm.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 255

Parameters:
alarmDescription - The description for the alarm.
Returns:
A reference to this updated object so that method calls can be chained together.

isActionsEnabled

public Boolean 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.

setActionsEnabled

public void setActionsEnabled(Boolean actionsEnabled)
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.

withActionsEnabled

public PutMetricAlarmRequest withActionsEnabled(Boolean actionsEnabled)
Indicates whether or not actions should be executed during any changes to the alarm's state.

Returns a reference to this object so that method calls can be chained together.

Parameters:
actionsEnabled - Indicates whether or not actions should be executed during any changes to the alarm's state.
Returns:
A reference to this updated object so that method calls can be chained together.

getActionsEnabled

public Boolean 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.

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 Number (ARN). Currently the only action supported is publishing to an Amazon SNS topic or an Amazon Auto Scaling policy.

Constraints:
Length: 0 - 5

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 Number (ARN). Currently the only action supported is publishing to an Amazon SNS topic or an Amazon Auto Scaling policy.

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 Number (ARN). Currently the only action supported is publishing to an Amazon SNS topic or an Amazon Auto Scaling policy.

Constraints:
Length: 0 - 5

Parameters:
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.

withOKActions

public PutMetricAlarmRequest 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 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

Parameters:
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.
Returns:
A reference to this updated object so that method calls can be chained together.

withOKActions

public PutMetricAlarmRequest 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 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

Parameters:
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.
Returns:
A reference to this updated 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 Number (ARN). Currently the only action supported is publishing to an Amazon SNS topic or an Amazon Auto Scaling policy.

Constraints:
Length: 0 - 5

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 Number (ARN). Currently the only action supported is publishing to an Amazon SNS topic or an Amazon Auto Scaling policy.

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 Number (ARN). Currently the only action supported is publishing to an Amazon SNS topic or an Amazon Auto Scaling policy.

Constraints:
Length: 0 - 5

Parameters:
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.

withAlarmActions

public PutMetricAlarmRequest 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 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

Parameters:
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.
Returns:
A reference to this updated object so that method calls can be chained together.

withAlarmActions

public PutMetricAlarmRequest 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 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

Parameters:
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.
Returns:
A reference to this updated 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 Number (ARN). Currently the only action supported is publishing to an Amazon SNS topic or an Amazon Auto Scaling policy.

Constraints:
Length: 0 - 5

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 Number (ARN). Currently the only action supported is publishing to an Amazon SNS topic or an Amazon Auto Scaling policy.

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 Number (ARN). Currently the only action supported is publishing to an Amazon SNS topic or an Amazon Auto Scaling policy.

Constraints:
Length: 0 - 5

Parameters:
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.

withInsufficientDataActions

public PutMetricAlarmRequest 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 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

Parameters:
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.
Returns:
A reference to this updated 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 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

Parameters:
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.
Returns:
A reference to this updated object so that method calls can be chained together.

getMetricName

public String getMetricName()
The name for the alarm's associated metric.

Constraints:
Length: 1 - 255

Returns:
The name for the alarm's associated metric.

setMetricName

public void setMetricName(String metricName)
The name for the alarm's associated metric.

Constraints:
Length: 1 - 255

Parameters:
metricName - The name for the alarm's associated metric.

withMetricName

public PutMetricAlarmRequest withMetricName(String metricName)
The name for the alarm's associated metric.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 255

Parameters:
metricName - The name for the alarm's associated metric.
Returns:
A reference to this updated object so that method calls can be chained together.

getNamespace

public String getNamespace()
The namespace for the alarm's associated metric.

Constraints:
Length: 1 - 255
Pattern: [^:].*

Returns:
The namespace for the alarm's associated metric.

setNamespace

public void setNamespace(String namespace)
The namespace for the alarm's associated metric.

Constraints:
Length: 1 - 255
Pattern: [^:].*

Parameters:
namespace - The namespace for the alarm's associated metric.

withNamespace

public PutMetricAlarmRequest withNamespace(String namespace)
The namespace for the alarm's associated metric.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 255
Pattern: [^:].*

Parameters:
namespace - The namespace for the alarm's associated metric.
Returns:
A reference to this updated object so that method calls can be chained together.

getStatistic

public String getStatistic()
The statistic to apply to the alarm's associated metric.

Constraints:
Allowed Values: SampleCount, Average, Sum, Minimum, Maximum

Returns:
The statistic to apply to the alarm's associated metric.
See Also:
Statistic

setStatistic

public void setStatistic(String statistic)
The statistic to apply to the alarm's associated metric.

Constraints:
Allowed Values: SampleCount, Average, Sum, Minimum, Maximum

Parameters:
statistic - The statistic to apply to the alarm's associated metric.
See Also:
Statistic

withStatistic

public PutMetricAlarmRequest withStatistic(String statistic)
The statistic to apply to the alarm's associated metric.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: SampleCount, Average, Sum, Minimum, Maximum

Parameters:
statistic - The statistic to apply to the alarm's associated metric.
Returns:
A reference to this updated 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.

Constraints:
Allowed Values: SampleCount, Average, Sum, Minimum, Maximum

Parameters:
statistic - The statistic to apply to the alarm's associated metric.
See Also:
Statistic

withStatistic

public PutMetricAlarmRequest withStatistic(Statistic statistic)
The statistic to apply to the alarm's associated metric.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: SampleCount, Average, Sum, Minimum, Maximum

Parameters:
statistic - The statistic to apply to the alarm's associated metric.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
Statistic

getDimensions

public List<Dimension> getDimensions()
The dimensions for the alarm's associated metric.

Constraints:
Length: 0 - 10

Returns:
The dimensions for the alarm's associated metric.

setDimensions

public void setDimensions(Collection<Dimension> dimensions)
The dimensions for the alarm's associated metric.

Constraints:
Length: 0 - 10

Parameters:
dimensions - The dimensions for the alarm's associated metric.

withDimensions

public PutMetricAlarmRequest withDimensions(Dimension... dimensions)
The dimensions for the alarm's associated metric.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 10

Parameters:
dimensions - The dimensions for the alarm's associated metric.
Returns:
A reference to this updated object so that method calls can be chained together.

withDimensions

public PutMetricAlarmRequest withDimensions(Collection<Dimension> dimensions)
The dimensions for the alarm's associated metric.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 10

Parameters:
dimensions - The dimensions for the alarm's associated metric.
Returns:
A reference to this updated object so that method calls can be chained together.

getPeriod

public Integer getPeriod()
The period in seconds over which the specified statistic is applied.

Constraints:
Range: 60 -

Returns:
The period in seconds over which the specified statistic is applied.

setPeriod

public void setPeriod(Integer period)
The period in seconds over which the specified statistic is applied.

Constraints:
Range: 60 -

Parameters:
period - The period in seconds over which the specified statistic is applied.

withPeriod

public PutMetricAlarmRequest withPeriod(Integer period)
The period in seconds over which the specified statistic is applied.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 60 -

Parameters:
period - The period in seconds over which the specified statistic is applied.
Returns:
A reference to this updated object so that method calls can be chained together.

getUnit

public String getUnit()
The unit for the alarm's associated metric.

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

Returns:
The unit for the alarm's associated metric.
See Also:
StandardUnit

setUnit

public void setUnit(String unit)
The unit for the alarm's associated metric.

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

Parameters:
unit - The unit for the alarm's associated metric.
See Also:
StandardUnit

withUnit

public PutMetricAlarmRequest withUnit(String unit)
The unit for the alarm's associated metric.

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

Parameters:
unit - The unit for the alarm's associated metric.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
StandardUnit

setUnit

public void setUnit(StandardUnit unit)
The unit for the alarm's associated metric.

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

Parameters:
unit - The unit for the alarm's associated metric.
See Also:
StandardUnit

withUnit

public PutMetricAlarmRequest withUnit(StandardUnit unit)
The unit for the alarm's associated metric.

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

Parameters:
unit - The unit for the alarm's associated metric.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
StandardUnit

getEvaluationPeriods

public Integer getEvaluationPeriods()
The number of periods over which data is compared to the specified threshold.

Constraints:
Range: 1 -

Returns:
The number of periods over which data is compared to the specified threshold.

setEvaluationPeriods

public void setEvaluationPeriods(Integer evaluationPeriods)
The number of periods over which data is compared to the specified threshold.

Constraints:
Range: 1 -

Parameters:
evaluationPeriods - The number of periods over which data is compared to the specified threshold.

withEvaluationPeriods

public PutMetricAlarmRequest withEvaluationPeriods(Integer evaluationPeriods)
The number of periods over which data is compared to the specified threshold.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Range: 1 -

Parameters:
evaluationPeriods - The number of periods over which data is compared to the specified threshold.
Returns:
A reference to this updated object so that method calls can be chained together.

getThreshold

public Double getThreshold()
The value against which the specified statistic is compared.

Returns:
The value against which the specified statistic is compared.

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.

withThreshold

public PutMetricAlarmRequest withThreshold(Double threshold)
The value against which the specified statistic is compared.

Returns a reference to this object so that method calls can be chained together.

Parameters:
threshold - The value against which the specified statistic is compared.
Returns:
A reference to this updated object so that method calls can be chained together.

getComparisonOperator

public String getComparisonOperator()
The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.

Constraints:
Allowed Values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold

Returns:
The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.
See Also:
ComparisonOperator

setComparisonOperator

public void setComparisonOperator(String comparisonOperator)
The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.

Constraints:
Allowed Values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold

Parameters:
comparisonOperator - The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.
See Also:
ComparisonOperator

withComparisonOperator

public PutMetricAlarmRequest withComparisonOperator(String comparisonOperator)
The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold

Parameters:
comparisonOperator - The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.
Returns:
A reference to this updated 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 and Threshold. The specified Statistic value is used as the first operand.

Constraints:
Allowed Values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold

Parameters:
comparisonOperator - The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.
See Also:
ComparisonOperator

withComparisonOperator

public PutMetricAlarmRequest withComparisonOperator(ComparisonOperator comparisonOperator)
The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold

Parameters:
comparisonOperator - The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.
Returns:
A reference to this updated 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 class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.