aws_sdk_autoscaling/client/
set_instance_health.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 [`SetInstanceHealth`](crate::operation::set_instance_health::builders::SetInstanceHealthFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`instance_id(impl Into<String>)`](crate::operation::set_instance_health::builders::SetInstanceHealthFluentBuilder::instance_id) / [`set_instance_id(Option<String>)`](crate::operation::set_instance_health::builders::SetInstanceHealthFluentBuilder::set_instance_id):<br>required: **true**<br><p>The ID of the instance.</p><br>
7    ///   - [`health_status(impl Into<String>)`](crate::operation::set_instance_health::builders::SetInstanceHealthFluentBuilder::health_status) / [`set_health_status(Option<String>)`](crate::operation::set_instance_health::builders::SetInstanceHealthFluentBuilder::set_health_status):<br>required: **true**<br><p>The health status of the instance. Set to <code>Healthy</code> to have the instance remain in service. Set to <code>Unhealthy</code> to have the instance be out of service. Amazon EC2 Auto Scaling terminates and replaces the unhealthy instance.</p><br>
8    ///   - [`should_respect_grace_period(bool)`](crate::operation::set_instance_health::builders::SetInstanceHealthFluentBuilder::should_respect_grace_period) / [`set_should_respect_grace_period(Option<bool>)`](crate::operation::set_instance_health::builders::SetInstanceHealthFluentBuilder::set_should_respect_grace_period):<br>required: **false**<br><p>If the Auto Scaling group of the specified instance has a <code>HealthCheckGracePeriod</code> specified for the group, by default, this call respects the grace period. Set this to <code>False</code>, to have the call not respect the grace period associated with the group.</p> <p>For more information about the health check grace period, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/health-check-grace-period.html">Set the health check grace period for an Auto Scaling group</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p><br>
9    /// - On success, responds with [`SetInstanceHealthOutput`](crate::operation::set_instance_health::SetInstanceHealthOutput)
10    /// - On failure, responds with [`SdkError<SetInstanceHealthError>`](crate::operation::set_instance_health::SetInstanceHealthError)
11    pub fn set_instance_health(&self) -> crate::operation::set_instance_health::builders::SetInstanceHealthFluentBuilder {
12        crate::operation::set_instance_health::builders::SetInstanceHealthFluentBuilder::new(self.handle.clone())
13    }
14}