Struct aws_sdk_cloudwatch::client::fluent_builders::SetAlarmState [−][src]
pub struct SetAlarmState<C = DynConnector, M = AwsMiddleware, R = Standard> { /* fields omitted */ }
Expand description
Fluent builder constructing a request to 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.
Metric alarms returns to their actual state quickly, often within seconds. Because the metric alarm state change happens quickly, it is typically only visible in the alarm's History tab in the Amazon CloudWatch console or through DescribeAlarmHistory.
If you use SetAlarmState
on a composite alarm, the composite alarm is not guaranteed to return
to its actual state. It
returns to its actual state only once any of its children alarms change state. It is also
reevaluated if you update its
configuration.
If an alarm triggers EC2 Auto Scaling policies or application Auto Scaling policies, you must include
information in the StateReasonData
parameter to enable the policy to take the correct action.
Implementations
impl<C, M, R> SetAlarmState<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> SetAlarmState<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
pub async fn send(
self
) -> Result<SetAlarmStateOutput, SdkError<SetAlarmStateError>> where
R::Policy: SmithyRetryPolicy<SetAlarmStateInputOperationOutputAlias, SetAlarmStateOutput, SetAlarmStateError, SetAlarmStateInputOperationRetryAlias>,
pub async fn send(
self
) -> Result<SetAlarmStateOutput, SdkError<SetAlarmStateError>> where
R::Policy: SmithyRetryPolicy<SetAlarmStateInputOperationOutputAlias, SetAlarmStateOutput, SetAlarmStateError, SetAlarmStateInputOperationRetryAlias>,
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
The name of the alarm.
The name of the alarm.
The value of the state.
The value of the state.
The reason that this alarm is set to this specific state, in text format.
The reason that this alarm is set to this specific state, in text format.
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.
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.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = AwsMiddleware, R = Standard> !RefUnwindSafe for SetAlarmState<C, M, R>
impl<C, M, R> Unpin for SetAlarmState<C, M, R>
impl<C = DynConnector, M = AwsMiddleware, R = Standard> !UnwindSafe for SetAlarmState<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more