aws_sdk_lightsail/client/stop_instance.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 [`StopInstance`](crate::operation::stop_instance::builders::StopInstanceFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`instance_name(impl Into<String>)`](crate::operation::stop_instance::builders::StopInstanceFluentBuilder::instance_name) / [`set_instance_name(Option<String>)`](crate::operation::stop_instance::builders::StopInstanceFluentBuilder::set_instance_name):<br>required: **true**<br><p>The name of the instance (a virtual private server) to stop.</p><br>
7 /// - [`force(bool)`](crate::operation::stop_instance::builders::StopInstanceFluentBuilder::force) / [`set_force(Option<bool>)`](crate::operation::stop_instance::builders::StopInstanceFluentBuilder::set_force):<br>required: **false**<br><p>When set to <code>True</code>, forces a Lightsail instance that is stuck in a <code>stopping</code> state to stop.</p><important> <p>Only use the <code>force</code> parameter if your instance is stuck in the <code>stopping</code> state. In any other state, your instance should stop normally without adding this parameter to your API request.</p> </important><br>
8 /// - On success, responds with [`StopInstanceOutput`](crate::operation::stop_instance::StopInstanceOutput) with field(s):
9 /// - [`operations(Option<Vec::<Operation>>)`](crate::operation::stop_instance::StopInstanceOutput::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<StopInstanceError>`](crate::operation::stop_instance::StopInstanceError)
11 pub fn stop_instance(&self) -> crate::operation::stop_instance::builders::StopInstanceFluentBuilder {
12 crate::operation::stop_instance::builders::StopInstanceFluentBuilder::new(self.handle.clone())
13 }
14}