Struct aws_sdk_cloudwatch::input::SetAlarmStateInput
source · #[non_exhaustive]pub struct SetAlarmStateInput { /* private fields */ }Implementations§
source§impl SetAlarmStateInput
impl SetAlarmStateInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<SetAlarmState, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<SetAlarmState, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<SetAlarmState>
Examples found in repository?
src/client.rs (line 5132)
5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::SetAlarmState,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::SetAlarmStateError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// 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](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::SetAlarmStateOutput,
aws_smithy_http::result::SdkError<crate::error::SetAlarmStateError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture SetAlarmStateInput.
source§impl SetAlarmStateInput
impl SetAlarmStateInput
sourcepub fn alarm_name(&self) -> Option<&str>
pub fn alarm_name(&self) -> Option<&str>
The name of the alarm.
sourcepub fn state_value(&self) -> Option<&StateValue>
pub fn state_value(&self) -> Option<&StateValue>
The value of the state.
sourcepub fn state_reason(&self) -> Option<&str>
pub fn state_reason(&self) -> Option<&str>
The reason that this alarm is set to this specific state, in text format.
sourcepub fn state_reason_data(&self) -> Option<&str>
pub fn state_reason_data(&self) -> Option<&str>
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§
source§impl Clone for SetAlarmStateInput
impl Clone for SetAlarmStateInput
source§fn clone(&self) -> SetAlarmStateInput
fn clone(&self) -> SetAlarmStateInput
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more