Try it now and let us know what you think. Switch to the new look >>
You can return to the original look by selecting English in the language selector above.
SetAlarmState
Temporarily sets the state of an alarm for testing purposes. When the updated
state differs from the previous value, the action configured for
the appropriate state is invoked. For example, if your alarm is configured to send
an
Amazon SNS message when an alarm is triggered, temporarily changing the alarm state
to
ALARM sends an SNS message. The alarm
returns to its actual state (often within seconds). Because the alarm state change
happens quickly, it is typically only visible in the alarm's History tab in the Amazon CloudWatch console or through
DescribeAlarmHistory.
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
- AlarmName
-
The name for the alarm. This name must be unique within the AWS account. The maximum length is 255 characters.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: Yes
- StateReason
-
The reason that this alarm is set to this specific state, in text format.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 1023.
Required: Yes
- StateReasonData
-
The reason that this alarm is set to this specific state, in JSON format.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 4000.
Required: No
- StateValue
-
The value of the state.
Type: String
Valid Values:
OK | ALARM | INSUFFICIENT_DATARequired: Yes
Errors
For information about the errors that are common to all actions, see Common Errors.
- InvalidFormat
-
Data was not syntactically valid JSON.
HTTP Status Code: 400
- ResourceNotFound
-
The named resource does not exist.
HTTP Status Code: 404
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:


