aws_sdk_appconfig/operation/delete_environment/
_delete_environment_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteEnvironmentInput {
6    /// <p>The ID of the environment that you want to delete.</p>
7    pub environment_id: ::std::option::Option<::std::string::String>,
8    /// <p>The application ID that includes the environment that you want to delete.</p>
9    pub application_id: ::std::option::Option<::std::string::String>,
10    /// <p>A parameter to configure deletion protection. Deletion protection prevents a user from deleting an environment if your application called either <a href="https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/API_appconfigdata_GetLatestConfiguration.html">GetLatestConfiguration</a> or in the environment during the specified interval.</p>
11    /// <p>This parameter supports the following values:</p>
12    /// <ul>
13    /// <li>
14    /// <p><code>BYPASS</code>: Instructs AppConfig to bypass the deletion protection check and delete a configuration profile even if deletion protection would have otherwise prevented it.</p></li>
15    /// <li>
16    /// <p><code>APPLY</code>: Instructs the deletion protection check to run, even if deletion protection is disabled at the account level. <code>APPLY</code> also forces the deletion protection check to run against resources created in the past hour, which are normally excluded from deletion protection checks.</p></li>
17    /// <li>
18    /// <p><code>ACCOUNT_DEFAULT</code>: The default setting, which instructs AppConfig to implement the deletion protection value specified in the <code>UpdateAccountSettings</code> API.</p></li>
19    /// </ul>
20    pub deletion_protection_check: ::std::option::Option<crate::types::DeletionProtectionCheck>,
21}
22impl DeleteEnvironmentInput {
23    /// <p>The ID of the environment that you want to delete.</p>
24    pub fn environment_id(&self) -> ::std::option::Option<&str> {
25        self.environment_id.as_deref()
26    }
27    /// <p>The application ID that includes the environment that you want to delete.</p>
28    pub fn application_id(&self) -> ::std::option::Option<&str> {
29        self.application_id.as_deref()
30    }
31    /// <p>A parameter to configure deletion protection. Deletion protection prevents a user from deleting an environment if your application called either <a href="https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/API_appconfigdata_GetLatestConfiguration.html">GetLatestConfiguration</a> or in the environment during the specified interval.</p>
32    /// <p>This parameter supports the following values:</p>
33    /// <ul>
34    /// <li>
35    /// <p><code>BYPASS</code>: Instructs AppConfig to bypass the deletion protection check and delete a configuration profile even if deletion protection would have otherwise prevented it.</p></li>
36    /// <li>
37    /// <p><code>APPLY</code>: Instructs the deletion protection check to run, even if deletion protection is disabled at the account level. <code>APPLY</code> also forces the deletion protection check to run against resources created in the past hour, which are normally excluded from deletion protection checks.</p></li>
38    /// <li>
39    /// <p><code>ACCOUNT_DEFAULT</code>: The default setting, which instructs AppConfig to implement the deletion protection value specified in the <code>UpdateAccountSettings</code> API.</p></li>
40    /// </ul>
41    pub fn deletion_protection_check(&self) -> ::std::option::Option<&crate::types::DeletionProtectionCheck> {
42        self.deletion_protection_check.as_ref()
43    }
44}
45impl DeleteEnvironmentInput {
46    /// Creates a new builder-style object to manufacture [`DeleteEnvironmentInput`](crate::operation::delete_environment::DeleteEnvironmentInput).
47    pub fn builder() -> crate::operation::delete_environment::builders::DeleteEnvironmentInputBuilder {
48        crate::operation::delete_environment::builders::DeleteEnvironmentInputBuilder::default()
49    }
50}
51
52/// A builder for [`DeleteEnvironmentInput`](crate::operation::delete_environment::DeleteEnvironmentInput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct DeleteEnvironmentInputBuilder {
56    pub(crate) environment_id: ::std::option::Option<::std::string::String>,
57    pub(crate) application_id: ::std::option::Option<::std::string::String>,
58    pub(crate) deletion_protection_check: ::std::option::Option<crate::types::DeletionProtectionCheck>,
59}
60impl DeleteEnvironmentInputBuilder {
61    /// <p>The ID of the environment that you want to delete.</p>
62    /// This field is required.
63    pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
64        self.environment_id = ::std::option::Option::Some(input.into());
65        self
66    }
67    /// <p>The ID of the environment that you want to delete.</p>
68    pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
69        self.environment_id = input;
70        self
71    }
72    /// <p>The ID of the environment that you want to delete.</p>
73    pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
74        &self.environment_id
75    }
76    /// <p>The application ID that includes the environment that you want to delete.</p>
77    /// This field is required.
78    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
79        self.application_id = ::std::option::Option::Some(input.into());
80        self
81    }
82    /// <p>The application ID that includes the environment that you want to delete.</p>
83    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84        self.application_id = input;
85        self
86    }
87    /// <p>The application ID that includes the environment that you want to delete.</p>
88    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
89        &self.application_id
90    }
91    /// <p>A parameter to configure deletion protection. Deletion protection prevents a user from deleting an environment if your application called either <a href="https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/API_appconfigdata_GetLatestConfiguration.html">GetLatestConfiguration</a> or in the environment during the specified interval.</p>
92    /// <p>This parameter supports the following values:</p>
93    /// <ul>
94    /// <li>
95    /// <p><code>BYPASS</code>: Instructs AppConfig to bypass the deletion protection check and delete a configuration profile even if deletion protection would have otherwise prevented it.</p></li>
96    /// <li>
97    /// <p><code>APPLY</code>: Instructs the deletion protection check to run, even if deletion protection is disabled at the account level. <code>APPLY</code> also forces the deletion protection check to run against resources created in the past hour, which are normally excluded from deletion protection checks.</p></li>
98    /// <li>
99    /// <p><code>ACCOUNT_DEFAULT</code>: The default setting, which instructs AppConfig to implement the deletion protection value specified in the <code>UpdateAccountSettings</code> API.</p></li>
100    /// </ul>
101    pub fn deletion_protection_check(mut self, input: crate::types::DeletionProtectionCheck) -> Self {
102        self.deletion_protection_check = ::std::option::Option::Some(input);
103        self
104    }
105    /// <p>A parameter to configure deletion protection. Deletion protection prevents a user from deleting an environment if your application called either <a href="https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/API_appconfigdata_GetLatestConfiguration.html">GetLatestConfiguration</a> or in the environment during the specified interval.</p>
106    /// <p>This parameter supports the following values:</p>
107    /// <ul>
108    /// <li>
109    /// <p><code>BYPASS</code>: Instructs AppConfig to bypass the deletion protection check and delete a configuration profile even if deletion protection would have otherwise prevented it.</p></li>
110    /// <li>
111    /// <p><code>APPLY</code>: Instructs the deletion protection check to run, even if deletion protection is disabled at the account level. <code>APPLY</code> also forces the deletion protection check to run against resources created in the past hour, which are normally excluded from deletion protection checks.</p></li>
112    /// <li>
113    /// <p><code>ACCOUNT_DEFAULT</code>: The default setting, which instructs AppConfig to implement the deletion protection value specified in the <code>UpdateAccountSettings</code> API.</p></li>
114    /// </ul>
115    pub fn set_deletion_protection_check(mut self, input: ::std::option::Option<crate::types::DeletionProtectionCheck>) -> Self {
116        self.deletion_protection_check = input;
117        self
118    }
119    /// <p>A parameter to configure deletion protection. Deletion protection prevents a user from deleting an environment if your application called either <a href="https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/API_appconfigdata_GetLatestConfiguration.html">GetLatestConfiguration</a> or in the environment during the specified interval.</p>
120    /// <p>This parameter supports the following values:</p>
121    /// <ul>
122    /// <li>
123    /// <p><code>BYPASS</code>: Instructs AppConfig to bypass the deletion protection check and delete a configuration profile even if deletion protection would have otherwise prevented it.</p></li>
124    /// <li>
125    /// <p><code>APPLY</code>: Instructs the deletion protection check to run, even if deletion protection is disabled at the account level. <code>APPLY</code> also forces the deletion protection check to run against resources created in the past hour, which are normally excluded from deletion protection checks.</p></li>
126    /// <li>
127    /// <p><code>ACCOUNT_DEFAULT</code>: The default setting, which instructs AppConfig to implement the deletion protection value specified in the <code>UpdateAccountSettings</code> API.</p></li>
128    /// </ul>
129    pub fn get_deletion_protection_check(&self) -> &::std::option::Option<crate::types::DeletionProtectionCheck> {
130        &self.deletion_protection_check
131    }
132    /// Consumes the builder and constructs a [`DeleteEnvironmentInput`](crate::operation::delete_environment::DeleteEnvironmentInput).
133    pub fn build(
134        self,
135    ) -> ::std::result::Result<crate::operation::delete_environment::DeleteEnvironmentInput, ::aws_smithy_types::error::operation::BuildError> {
136        ::std::result::Result::Ok(crate::operation::delete_environment::DeleteEnvironmentInput {
137            environment_id: self.environment_id,
138            application_id: self.application_id,
139            deletion_protection_check: self.deletion_protection_check,
140        })
141    }
142}