aws_sdk_lightsail/client/
test_alarm.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`TestAlarm`](crate::operation::test_alarm::builders::TestAlarmFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`alarm_name(impl Into<String>)`](crate::operation::test_alarm::builders::TestAlarmFluentBuilder::alarm_name) / [`set_alarm_name(Option<String>)`](crate::operation::test_alarm::builders::TestAlarmFluentBuilder::set_alarm_name):<br>required: **true**<br><p>The name of the alarm to test.</p><br>
7    ///   - [`state(AlarmState)`](crate::operation::test_alarm::builders::TestAlarmFluentBuilder::state) / [`set_state(Option<AlarmState>)`](crate::operation::test_alarm::builders::TestAlarmFluentBuilder::set_state):<br>required: **true**<br><p>The alarm state to test.</p> <p>An alarm has the following possible states that can be tested:</p> <ul>  <li>   <p><code>ALARM</code> - The metric is outside of the defined threshold.</p></li>  <li>   <p><code>INSUFFICIENT_DATA</code> - The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state.</p></li>  <li>   <p><code>OK</code> - The metric is within the defined threshold.</p></li> </ul><br>
8    /// - On success, responds with [`TestAlarmOutput`](crate::operation::test_alarm::TestAlarmOutput) with field(s):
9    ///   - [`operations(Option<Vec::<Operation>>)`](crate::operation::test_alarm::TestAlarmOutput::operations): <p>An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.</p>
10    /// - On failure, responds with [`SdkError<TestAlarmError>`](crate::operation::test_alarm::TestAlarmError)
11    pub fn test_alarm(&self) -> crate::operation::test_alarm::builders::TestAlarmFluentBuilder {
12        crate::operation::test_alarm::builders::TestAlarmFluentBuilder::new(self.handle.clone())
13    }
14}