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 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Request to terminate an environment.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TerminateEnvironmentInput {
/// <p>The ID of the environment to terminate.</p>
/// <p>Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
pub environment_id: ::std::option::Option<::std::string::String>,
/// <p>The name of the environment to terminate.</p>
/// <p>Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
pub environment_name: ::std::option::Option<::std::string::String>,
/// <p>Indicates whether the associated AWS resources should shut down when the environment is terminated:</p>
/// <ul>
/// <li>
/// <p><code>true</code>: The specified environment as well as the associated AWS resources, such as Auto Scaling group and LoadBalancer, are terminated.</p></li>
/// <li>
/// <p><code>false</code>: AWS Elastic Beanstalk resource management is removed from the environment, but the AWS resources continue to operate.</p></li>
/// </ul>
/// <p>For more information, see the <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/ug/"> AWS Elastic Beanstalk User Guide. </a></p>
/// <p>Default: <code>true</code></p>
/// <p>Valid Values: <code>true</code> | <code>false</code></p>
pub terminate_resources: ::std::option::Option<bool>,
/// <p>Terminates the target environment even if another environment in the same group is dependent on it.</p>
pub force_terminate: ::std::option::Option<bool>,
}
impl TerminateEnvironmentInput {
/// <p>The ID of the environment to terminate.</p>
/// <p>Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
pub fn environment_id(&self) -> ::std::option::Option<&str> {
self.environment_id.as_deref()
}
/// <p>The name of the environment to terminate.</p>
/// <p>Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
pub fn environment_name(&self) -> ::std::option::Option<&str> {
self.environment_name.as_deref()
}
/// <p>Indicates whether the associated AWS resources should shut down when the environment is terminated:</p>
/// <ul>
/// <li>
/// <p><code>true</code>: The specified environment as well as the associated AWS resources, such as Auto Scaling group and LoadBalancer, are terminated.</p></li>
/// <li>
/// <p><code>false</code>: AWS Elastic Beanstalk resource management is removed from the environment, but the AWS resources continue to operate.</p></li>
/// </ul>
/// <p>For more information, see the <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/ug/"> AWS Elastic Beanstalk User Guide. </a></p>
/// <p>Default: <code>true</code></p>
/// <p>Valid Values: <code>true</code> | <code>false</code></p>
pub fn terminate_resources(&self) -> ::std::option::Option<bool> {
self.terminate_resources
}
/// <p>Terminates the target environment even if another environment in the same group is dependent on it.</p>
pub fn force_terminate(&self) -> ::std::option::Option<bool> {
self.force_terminate
}
}
impl TerminateEnvironmentInput {
/// Creates a new builder-style object to manufacture [`TerminateEnvironmentInput`](crate::operation::terminate_environment::TerminateEnvironmentInput).
pub fn builder() -> crate::operation::terminate_environment::builders::TerminateEnvironmentInputBuilder {
crate::operation::terminate_environment::builders::TerminateEnvironmentInputBuilder::default()
}
}
/// A builder for [`TerminateEnvironmentInput`](crate::operation::terminate_environment::TerminateEnvironmentInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct TerminateEnvironmentInputBuilder {
pub(crate) environment_id: ::std::option::Option<::std::string::String>,
pub(crate) environment_name: ::std::option::Option<::std::string::String>,
pub(crate) terminate_resources: ::std::option::Option<bool>,
pub(crate) force_terminate: ::std::option::Option<bool>,
}
impl TerminateEnvironmentInputBuilder {
/// <p>The ID of the environment to terminate.</p>
/// <p>Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.environment_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the environment to terminate.</p>
/// <p>Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.environment_id = input;
self
}
/// <p>The ID of the environment to terminate.</p>
/// <p>Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
&self.environment_id
}
/// <p>The name of the environment to terminate.</p>
/// <p>Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
pub fn environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.environment_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the environment to terminate.</p>
/// <p>Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
pub fn set_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.environment_name = input;
self
}
/// <p>The name of the environment to terminate.</p>
/// <p>Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
pub fn get_environment_name(&self) -> &::std::option::Option<::std::string::String> {
&self.environment_name
}
/// <p>Indicates whether the associated AWS resources should shut down when the environment is terminated:</p>
/// <ul>
/// <li>
/// <p><code>true</code>: The specified environment as well as the associated AWS resources, such as Auto Scaling group and LoadBalancer, are terminated.</p></li>
/// <li>
/// <p><code>false</code>: AWS Elastic Beanstalk resource management is removed from the environment, but the AWS resources continue to operate.</p></li>
/// </ul>
/// <p>For more information, see the <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/ug/"> AWS Elastic Beanstalk User Guide. </a></p>
/// <p>Default: <code>true</code></p>
/// <p>Valid Values: <code>true</code> | <code>false</code></p>
pub fn terminate_resources(mut self, input: bool) -> Self {
self.terminate_resources = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether the associated AWS resources should shut down when the environment is terminated:</p>
/// <ul>
/// <li>
/// <p><code>true</code>: The specified environment as well as the associated AWS resources, such as Auto Scaling group and LoadBalancer, are terminated.</p></li>
/// <li>
/// <p><code>false</code>: AWS Elastic Beanstalk resource management is removed from the environment, but the AWS resources continue to operate.</p></li>
/// </ul>
/// <p>For more information, see the <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/ug/"> AWS Elastic Beanstalk User Guide. </a></p>
/// <p>Default: <code>true</code></p>
/// <p>Valid Values: <code>true</code> | <code>false</code></p>
pub fn set_terminate_resources(mut self, input: ::std::option::Option<bool>) -> Self {
self.terminate_resources = input;
self
}
/// <p>Indicates whether the associated AWS resources should shut down when the environment is terminated:</p>
/// <ul>
/// <li>
/// <p><code>true</code>: The specified environment as well as the associated AWS resources, such as Auto Scaling group and LoadBalancer, are terminated.</p></li>
/// <li>
/// <p><code>false</code>: AWS Elastic Beanstalk resource management is removed from the environment, but the AWS resources continue to operate.</p></li>
/// </ul>
/// <p>For more information, see the <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/ug/"> AWS Elastic Beanstalk User Guide. </a></p>
/// <p>Default: <code>true</code></p>
/// <p>Valid Values: <code>true</code> | <code>false</code></p>
pub fn get_terminate_resources(&self) -> &::std::option::Option<bool> {
&self.terminate_resources
}
/// <p>Terminates the target environment even if another environment in the same group is dependent on it.</p>
pub fn force_terminate(mut self, input: bool) -> Self {
self.force_terminate = ::std::option::Option::Some(input);
self
}
/// <p>Terminates the target environment even if another environment in the same group is dependent on it.</p>
pub fn set_force_terminate(mut self, input: ::std::option::Option<bool>) -> Self {
self.force_terminate = input;
self
}
/// <p>Terminates the target environment even if another environment in the same group is dependent on it.</p>
pub fn get_force_terminate(&self) -> &::std::option::Option<bool> {
&self.force_terminate
}
/// Consumes the builder and constructs a [`TerminateEnvironmentInput`](crate::operation::terminate_environment::TerminateEnvironmentInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::terminate_environment::TerminateEnvironmentInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::terminate_environment::TerminateEnvironmentInput {
environment_id: self.environment_id,
environment_name: self.environment_name,
terminate_resources: self.terminate_resources,
force_terminate: self.force_terminate,
})
}
}