CloudWatchClient.set_alarm_state
rboto-cloudwatch==0.4.0 · Service index · Types
Model summary (excerpt): 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. Metric alarms returns to their actual state quickly,...
Install and imports
Signature
async def set_alarm_state(
*,
alarm_name: str,
state_value: StateValue,
state_reason: str,
state_reason_data: str | None = None,
) -> None: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
alarm_name |
Yes | The name of the alarm. |
state_value |
Yes | The value of the state. |
state_reason |
Yes | The reason that this alarm is set to this specific state, in text format. |
state_reason_data |
No | The reason that this alarm is set to this specific state, in JSON format. For SNS or EC2 alarm actions, this is just informational. But for EC2 Auto Scaling or application Auto Scaling alarm actions, the Auto Scaling policy uses the information in this field to take the correct action. |
Output
None.
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_cloudwatch.exceptions:
InvalidFormatFaultError, ResourceNotFoundError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.