aws_sdk_appconfig/operation/update_configuration_profile/
_update_configuration_profile_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 UpdateConfigurationProfileInput {
6    /// <p>The application ID.</p>
7    pub application_id: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the configuration profile.</p>
9    pub configuration_profile_id: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the configuration profile.</p>
11    pub name: ::std::option::Option<::std::string::String>,
12    /// <p>A description of the configuration profile.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>The ARN of an IAM role with permission to access the configuration at the specified <code>LocationUri</code>.</p><important>
15    /// <p>A retrieval role ARN is not required for configurations stored in CodePipeline or the AppConfig hosted configuration store. It is required for all other sources that store your configuration.</p>
16    /// </important>
17    pub retrieval_role_arn: ::std::option::Option<::std::string::String>,
18    /// <p>A list of methods for validating the configuration.</p>
19    pub validators: ::std::option::Option<::std::vec::Vec<crate::types::Validator>>,
20    /// <p>The identifier for a Key Management Service key to encrypt new configuration data versions in the AppConfig hosted configuration store. This attribute is only used for <code>hosted</code> configuration types. The identifier can be an KMS key ID, alias, or the Amazon Resource Name (ARN) of the key ID or alias. To encrypt data managed in other configuration stores, see the documentation for how to specify an KMS key for that particular service.</p>
21    pub kms_key_identifier: ::std::option::Option<::std::string::String>,
22}
23impl UpdateConfigurationProfileInput {
24    /// <p>The application ID.</p>
25    pub fn application_id(&self) -> ::std::option::Option<&str> {
26        self.application_id.as_deref()
27    }
28    /// <p>The ID of the configuration profile.</p>
29    pub fn configuration_profile_id(&self) -> ::std::option::Option<&str> {
30        self.configuration_profile_id.as_deref()
31    }
32    /// <p>The name of the configuration profile.</p>
33    pub fn name(&self) -> ::std::option::Option<&str> {
34        self.name.as_deref()
35    }
36    /// <p>A description of the configuration profile.</p>
37    pub fn description(&self) -> ::std::option::Option<&str> {
38        self.description.as_deref()
39    }
40    /// <p>The ARN of an IAM role with permission to access the configuration at the specified <code>LocationUri</code>.</p><important>
41    /// <p>A retrieval role ARN is not required for configurations stored in CodePipeline or the AppConfig hosted configuration store. It is required for all other sources that store your configuration.</p>
42    /// </important>
43    pub fn retrieval_role_arn(&self) -> ::std::option::Option<&str> {
44        self.retrieval_role_arn.as_deref()
45    }
46    /// <p>A list of methods for validating the configuration.</p>
47    ///
48    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.validators.is_none()`.
49    pub fn validators(&self) -> &[crate::types::Validator] {
50        self.validators.as_deref().unwrap_or_default()
51    }
52    /// <p>The identifier for a Key Management Service key to encrypt new configuration data versions in the AppConfig hosted configuration store. This attribute is only used for <code>hosted</code> configuration types. The identifier can be an KMS key ID, alias, or the Amazon Resource Name (ARN) of the key ID or alias. To encrypt data managed in other configuration stores, see the documentation for how to specify an KMS key for that particular service.</p>
53    pub fn kms_key_identifier(&self) -> ::std::option::Option<&str> {
54        self.kms_key_identifier.as_deref()
55    }
56}
57impl UpdateConfigurationProfileInput {
58    /// Creates a new builder-style object to manufacture [`UpdateConfigurationProfileInput`](crate::operation::update_configuration_profile::UpdateConfigurationProfileInput).
59    pub fn builder() -> crate::operation::update_configuration_profile::builders::UpdateConfigurationProfileInputBuilder {
60        crate::operation::update_configuration_profile::builders::UpdateConfigurationProfileInputBuilder::default()
61    }
62}
63
64/// A builder for [`UpdateConfigurationProfileInput`](crate::operation::update_configuration_profile::UpdateConfigurationProfileInput).
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
66#[non_exhaustive]
67pub struct UpdateConfigurationProfileInputBuilder {
68    pub(crate) application_id: ::std::option::Option<::std::string::String>,
69    pub(crate) configuration_profile_id: ::std::option::Option<::std::string::String>,
70    pub(crate) name: ::std::option::Option<::std::string::String>,
71    pub(crate) description: ::std::option::Option<::std::string::String>,
72    pub(crate) retrieval_role_arn: ::std::option::Option<::std::string::String>,
73    pub(crate) validators: ::std::option::Option<::std::vec::Vec<crate::types::Validator>>,
74    pub(crate) kms_key_identifier: ::std::option::Option<::std::string::String>,
75}
76impl UpdateConfigurationProfileInputBuilder {
77    /// <p>The application ID.</p>
78    /// This field is required.
79    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        self.application_id = ::std::option::Option::Some(input.into());
81        self
82    }
83    /// <p>The application ID.</p>
84    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.application_id = input;
86        self
87    }
88    /// <p>The application ID.</p>
89    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
90        &self.application_id
91    }
92    /// <p>The ID of the configuration profile.</p>
93    /// This field is required.
94    pub fn configuration_profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95        self.configuration_profile_id = ::std::option::Option::Some(input.into());
96        self
97    }
98    /// <p>The ID of the configuration profile.</p>
99    pub fn set_configuration_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.configuration_profile_id = input;
101        self
102    }
103    /// <p>The ID of the configuration profile.</p>
104    pub fn get_configuration_profile_id(&self) -> &::std::option::Option<::std::string::String> {
105        &self.configuration_profile_id
106    }
107    /// <p>The name of the configuration profile.</p>
108    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109        self.name = ::std::option::Option::Some(input.into());
110        self
111    }
112    /// <p>The name of the configuration profile.</p>
113    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114        self.name = input;
115        self
116    }
117    /// <p>The name of the configuration profile.</p>
118    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
119        &self.name
120    }
121    /// <p>A description of the configuration profile.</p>
122    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.description = ::std::option::Option::Some(input.into());
124        self
125    }
126    /// <p>A description of the configuration profile.</p>
127    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.description = input;
129        self
130    }
131    /// <p>A description of the configuration profile.</p>
132    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
133        &self.description
134    }
135    /// <p>The ARN of an IAM role with permission to access the configuration at the specified <code>LocationUri</code>.</p><important>
136    /// <p>A retrieval role ARN is not required for configurations stored in CodePipeline or the AppConfig hosted configuration store. It is required for all other sources that store your configuration.</p>
137    /// </important>
138    pub fn retrieval_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
139        self.retrieval_role_arn = ::std::option::Option::Some(input.into());
140        self
141    }
142    /// <p>The ARN of an IAM role with permission to access the configuration at the specified <code>LocationUri</code>.</p><important>
143    /// <p>A retrieval role ARN is not required for configurations stored in CodePipeline or the AppConfig hosted configuration store. It is required for all other sources that store your configuration.</p>
144    /// </important>
145    pub fn set_retrieval_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.retrieval_role_arn = input;
147        self
148    }
149    /// <p>The ARN of an IAM role with permission to access the configuration at the specified <code>LocationUri</code>.</p><important>
150    /// <p>A retrieval role ARN is not required for configurations stored in CodePipeline or the AppConfig hosted configuration store. It is required for all other sources that store your configuration.</p>
151    /// </important>
152    pub fn get_retrieval_role_arn(&self) -> &::std::option::Option<::std::string::String> {
153        &self.retrieval_role_arn
154    }
155    /// Appends an item to `validators`.
156    ///
157    /// To override the contents of this collection use [`set_validators`](Self::set_validators).
158    ///
159    /// <p>A list of methods for validating the configuration.</p>
160    pub fn validators(mut self, input: crate::types::Validator) -> Self {
161        let mut v = self.validators.unwrap_or_default();
162        v.push(input);
163        self.validators = ::std::option::Option::Some(v);
164        self
165    }
166    /// <p>A list of methods for validating the configuration.</p>
167    pub fn set_validators(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Validator>>) -> Self {
168        self.validators = input;
169        self
170    }
171    /// <p>A list of methods for validating the configuration.</p>
172    pub fn get_validators(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Validator>> {
173        &self.validators
174    }
175    /// <p>The identifier for a Key Management Service key to encrypt new configuration data versions in the AppConfig hosted configuration store. This attribute is only used for <code>hosted</code> configuration types. The identifier can be an KMS key ID, alias, or the Amazon Resource Name (ARN) of the key ID or alias. To encrypt data managed in other configuration stores, see the documentation for how to specify an KMS key for that particular service.</p>
176    pub fn kms_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
177        self.kms_key_identifier = ::std::option::Option::Some(input.into());
178        self
179    }
180    /// <p>The identifier for a Key Management Service key to encrypt new configuration data versions in the AppConfig hosted configuration store. This attribute is only used for <code>hosted</code> configuration types. The identifier can be an KMS key ID, alias, or the Amazon Resource Name (ARN) of the key ID or alias. To encrypt data managed in other configuration stores, see the documentation for how to specify an KMS key for that particular service.</p>
181    pub fn set_kms_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
182        self.kms_key_identifier = input;
183        self
184    }
185    /// <p>The identifier for a Key Management Service key to encrypt new configuration data versions in the AppConfig hosted configuration store. This attribute is only used for <code>hosted</code> configuration types. The identifier can be an KMS key ID, alias, or the Amazon Resource Name (ARN) of the key ID or alias. To encrypt data managed in other configuration stores, see the documentation for how to specify an KMS key for that particular service.</p>
186    pub fn get_kms_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
187        &self.kms_key_identifier
188    }
189    /// Consumes the builder and constructs a [`UpdateConfigurationProfileInput`](crate::operation::update_configuration_profile::UpdateConfigurationProfileInput).
190    pub fn build(
191        self,
192    ) -> ::std::result::Result<
193        crate::operation::update_configuration_profile::UpdateConfigurationProfileInput,
194        ::aws_smithy_types::error::operation::BuildError,
195    > {
196        ::std::result::Result::Ok(crate::operation::update_configuration_profile::UpdateConfigurationProfileInput {
197            application_id: self.application_id,
198            configuration_profile_id: self.configuration_profile_id,
199            name: self.name,
200            description: self.description,
201            retrieval_role_arn: self.retrieval_role_arn,
202            validators: self.validators,
203            kms_key_identifier: self.kms_key_identifier,
204        })
205    }
206}