1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StopInstanceInput {
/// <p>The instance ID.</p>
#[doc(hidden)]
pub instance_id: std::option::Option<std::string::String>,
/// <p>Specifies whether to force an instance to stop. If the instance's root device type is <code>ebs</code>, or EBS-backed, adding the <code>Force</code> parameter to the <code>StopInstances</code> API call disassociates the AWS OpsWorks Stacks instance from EC2, and forces deletion of <i>only</i> the OpsWorks Stacks instance. You must also delete the formerly-associated instance in EC2 after troubleshooting and replacing the AWS OpsWorks Stacks instance with a new one.</p>
#[doc(hidden)]
pub force: std::option::Option<bool>,
}
impl StopInstanceInput {
/// <p>The instance ID.</p>
pub fn instance_id(&self) -> std::option::Option<&str> {
self.instance_id.as_deref()
}
/// <p>Specifies whether to force an instance to stop. If the instance's root device type is <code>ebs</code>, or EBS-backed, adding the <code>Force</code> parameter to the <code>StopInstances</code> API call disassociates the AWS OpsWorks Stacks instance from EC2, and forces deletion of <i>only</i> the OpsWorks Stacks instance. You must also delete the formerly-associated instance in EC2 after troubleshooting and replacing the AWS OpsWorks Stacks instance with a new one.</p>
pub fn force(&self) -> std::option::Option<bool> {
self.force
}
}
impl StopInstanceInput {
/// Creates a new builder-style object to manufacture [`StopInstanceInput`](crate::operation::stop_instance::StopInstanceInput).
pub fn builder() -> crate::operation::stop_instance::builders::StopInstanceInputBuilder {
crate::operation::stop_instance::builders::StopInstanceInputBuilder::default()
}
}
/// A builder for [`StopInstanceInput`](crate::operation::stop_instance::StopInstanceInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct StopInstanceInputBuilder {
pub(crate) instance_id: std::option::Option<std::string::String>,
pub(crate) force: std::option::Option<bool>,
}
impl StopInstanceInputBuilder {
/// <p>The instance ID.</p>
pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
self.instance_id = Some(input.into());
self
}
/// <p>The instance ID.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.instance_id = input;
self
}
/// <p>Specifies whether to force an instance to stop. If the instance's root device type is <code>ebs</code>, or EBS-backed, adding the <code>Force</code> parameter to the <code>StopInstances</code> API call disassociates the AWS OpsWorks Stacks instance from EC2, and forces deletion of <i>only</i> the OpsWorks Stacks instance. You must also delete the formerly-associated instance in EC2 after troubleshooting and replacing the AWS OpsWorks Stacks instance with a new one.</p>
pub fn force(mut self, input: bool) -> Self {
self.force = Some(input);
self
}
/// <p>Specifies whether to force an instance to stop. If the instance's root device type is <code>ebs</code>, or EBS-backed, adding the <code>Force</code> parameter to the <code>StopInstances</code> API call disassociates the AWS OpsWorks Stacks instance from EC2, and forces deletion of <i>only</i> the OpsWorks Stacks instance. You must also delete the formerly-associated instance in EC2 after troubleshooting and replacing the AWS OpsWorks Stacks instance with a new one.</p>
pub fn set_force(mut self, input: std::option::Option<bool>) -> Self {
self.force = input;
self
}
/// Consumes the builder and constructs a [`StopInstanceInput`](crate::operation::stop_instance::StopInstanceInput).
pub fn build(
self,
) -> Result<
crate::operation::stop_instance::StopInstanceInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::stop_instance::StopInstanceInput {
instance_id: self.instance_id,
force: self.force,
})
}
}