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
// 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 DeleteEnvironmentInput {
/// <p>The ID of the environment that you want to delete.</p>
pub environment_id: ::std::option::Option<::std::string::String>,
/// <p>The application ID that includes the environment that you want to delete.</p>
pub application_id: ::std::option::Option<::std::string::String>,
/// <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>
/// <p>This parameter supports the following values:</p>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
pub deletion_protection_check: ::std::option::Option<crate::types::DeletionProtectionCheck>,
}
impl DeleteEnvironmentInput {
/// <p>The ID of the environment that you want to delete.</p>
pub fn environment_id(&self) -> ::std::option::Option<&str> {
self.environment_id.as_deref()
}
/// <p>The application ID that includes the environment that you want to delete.</p>
pub fn application_id(&self) -> ::std::option::Option<&str> {
self.application_id.as_deref()
}
/// <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>
/// <p>This parameter supports the following values:</p>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
pub fn deletion_protection_check(&self) -> ::std::option::Option<&crate::types::DeletionProtectionCheck> {
self.deletion_protection_check.as_ref()
}
}
impl DeleteEnvironmentInput {
/// Creates a new builder-style object to manufacture [`DeleteEnvironmentInput`](crate::operation::delete_environment::DeleteEnvironmentInput).
pub fn builder() -> crate::operation::delete_environment::builders::DeleteEnvironmentInputBuilder {
crate::operation::delete_environment::builders::DeleteEnvironmentInputBuilder::default()
}
}
/// A builder for [`DeleteEnvironmentInput`](crate::operation::delete_environment::DeleteEnvironmentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteEnvironmentInputBuilder {
pub(crate) environment_id: ::std::option::Option<::std::string::String>,
pub(crate) application_id: ::std::option::Option<::std::string::String>,
pub(crate) deletion_protection_check: ::std::option::Option<crate::types::DeletionProtectionCheck>,
}
impl DeleteEnvironmentInputBuilder {
/// <p>The ID of the environment that you want to delete.</p>
/// This field is required.
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 that you want to delete.</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 that you want to delete.</p>
pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
&self.environment_id
}
/// <p>The application ID that includes the environment that you want to delete.</p>
/// This field is required.
pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.application_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The application ID that includes the environment that you want to delete.</p>
pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.application_id = input;
self
}
/// <p>The application ID that includes the environment that you want to delete.</p>
pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
&self.application_id
}
/// <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>
/// <p>This parameter supports the following values:</p>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
pub fn deletion_protection_check(mut self, input: crate::types::DeletionProtectionCheck) -> Self {
self.deletion_protection_check = ::std::option::Option::Some(input);
self
}
/// <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>
/// <p>This parameter supports the following values:</p>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
pub fn set_deletion_protection_check(mut self, input: ::std::option::Option<crate::types::DeletionProtectionCheck>) -> Self {
self.deletion_protection_check = input;
self
}
/// <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>
/// <p>This parameter supports the following values:</p>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
pub fn get_deletion_protection_check(&self) -> &::std::option::Option<crate::types::DeletionProtectionCheck> {
&self.deletion_protection_check
}
/// Consumes the builder and constructs a [`DeleteEnvironmentInput`](crate::operation::delete_environment::DeleteEnvironmentInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::delete_environment::DeleteEnvironmentInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::delete_environment::DeleteEnvironmentInput {
environment_id: self.environment_id,
application_id: self.application_id,
deletion_protection_check: self.deletion_protection_check,
})
}
}