aws_sdk_appconfig/operation/get_configuration/
_get_configuration_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 GetConfigurationInput {
6    /// <p>The application to get. Specify either the application name or the application ID.</p>
7    pub application: ::std::option::Option<::std::string::String>,
8    /// <p>The environment to get. Specify either the environment name or the environment ID.</p>
9    pub environment: ::std::option::Option<::std::string::String>,
10    /// <p>The configuration to get. Specify either the configuration name or the configuration ID.</p>
11    pub configuration: ::std::option::Option<::std::string::String>,
12    /// <p>The clientId parameter in the following command is a unique, user-specified ID to identify the client for the configuration. This ID enables AppConfig to deploy the configuration in intervals, as defined in the deployment strategy.</p>
13    pub client_id: ::std::option::Option<::std::string::String>,
14    /// <p>The configuration version returned in the most recent <code>GetConfiguration</code> response.</p><important>
15    /// <p>AppConfig uses the value of the <code>ClientConfigurationVersion</code> parameter to identify the configuration version on your clients. If you don’t send <code>ClientConfigurationVersion</code> with each call to <code>GetConfiguration</code>, your clients receive the current configuration. You are charged each time your clients receive a configuration.</p>
16    /// <p>To avoid excess charges, we recommend you use the <a href="https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/StartConfigurationSession.html">StartConfigurationSession</a> and <a href="https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/GetLatestConfiguration.html">GetLatestConfiguration</a> APIs, which track the client configuration version on your behalf. If you choose to continue using <code>GetConfiguration</code>, we recommend that you include the <code>ClientConfigurationVersion</code> value with every call to <code>GetConfiguration</code>. The value to use for <code>ClientConfigurationVersion</code> comes from the <code>ConfigurationVersion</code> attribute returned by <code>GetConfiguration</code> when there is new or updated data, and should be saved for subsequent calls to <code>GetConfiguration</code>.</p>
17    /// </important>
18    /// <p>For more information about working with configurations, see <a href="http://docs.aws.amazon.com/appconfig/latest/userguide/retrieving-feature-flags.html">Retrieving feature flags and configuration data in AppConfig</a> in the <i>AppConfig User Guide</i>.</p>
19    pub client_configuration_version: ::std::option::Option<::std::string::String>,
20}
21impl GetConfigurationInput {
22    /// <p>The application to get. Specify either the application name or the application ID.</p>
23    pub fn application(&self) -> ::std::option::Option<&str> {
24        self.application.as_deref()
25    }
26    /// <p>The environment to get. Specify either the environment name or the environment ID.</p>
27    pub fn environment(&self) -> ::std::option::Option<&str> {
28        self.environment.as_deref()
29    }
30    /// <p>The configuration to get. Specify either the configuration name or the configuration ID.</p>
31    pub fn configuration(&self) -> ::std::option::Option<&str> {
32        self.configuration.as_deref()
33    }
34    /// <p>The clientId parameter in the following command is a unique, user-specified ID to identify the client for the configuration. This ID enables AppConfig to deploy the configuration in intervals, as defined in the deployment strategy.</p>
35    pub fn client_id(&self) -> ::std::option::Option<&str> {
36        self.client_id.as_deref()
37    }
38    /// <p>The configuration version returned in the most recent <code>GetConfiguration</code> response.</p><important>
39    /// <p>AppConfig uses the value of the <code>ClientConfigurationVersion</code> parameter to identify the configuration version on your clients. If you don’t send <code>ClientConfigurationVersion</code> with each call to <code>GetConfiguration</code>, your clients receive the current configuration. You are charged each time your clients receive a configuration.</p>
40    /// <p>To avoid excess charges, we recommend you use the <a href="https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/StartConfigurationSession.html">StartConfigurationSession</a> and <a href="https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/GetLatestConfiguration.html">GetLatestConfiguration</a> APIs, which track the client configuration version on your behalf. If you choose to continue using <code>GetConfiguration</code>, we recommend that you include the <code>ClientConfigurationVersion</code> value with every call to <code>GetConfiguration</code>. The value to use for <code>ClientConfigurationVersion</code> comes from the <code>ConfigurationVersion</code> attribute returned by <code>GetConfiguration</code> when there is new or updated data, and should be saved for subsequent calls to <code>GetConfiguration</code>.</p>
41    /// </important>
42    /// <p>For more information about working with configurations, see <a href="http://docs.aws.amazon.com/appconfig/latest/userguide/retrieving-feature-flags.html">Retrieving feature flags and configuration data in AppConfig</a> in the <i>AppConfig User Guide</i>.</p>
43    pub fn client_configuration_version(&self) -> ::std::option::Option<&str> {
44        self.client_configuration_version.as_deref()
45    }
46}
47impl GetConfigurationInput {
48    /// Creates a new builder-style object to manufacture [`GetConfigurationInput`](crate::operation::get_configuration::GetConfigurationInput).
49    pub fn builder() -> crate::operation::get_configuration::builders::GetConfigurationInputBuilder {
50        crate::operation::get_configuration::builders::GetConfigurationInputBuilder::default()
51    }
52}
53
54/// A builder for [`GetConfigurationInput`](crate::operation::get_configuration::GetConfigurationInput).
55#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
56#[non_exhaustive]
57pub struct GetConfigurationInputBuilder {
58    pub(crate) application: ::std::option::Option<::std::string::String>,
59    pub(crate) environment: ::std::option::Option<::std::string::String>,
60    pub(crate) configuration: ::std::option::Option<::std::string::String>,
61    pub(crate) client_id: ::std::option::Option<::std::string::String>,
62    pub(crate) client_configuration_version: ::std::option::Option<::std::string::String>,
63}
64impl GetConfigurationInputBuilder {
65    /// <p>The application to get. Specify either the application name or the application ID.</p>
66    /// This field is required.
67    pub fn application(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.application = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The application to get. Specify either the application name or the application ID.</p>
72    pub fn set_application(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.application = input;
74        self
75    }
76    /// <p>The application to get. Specify either the application name or the application ID.</p>
77    pub fn get_application(&self) -> &::std::option::Option<::std::string::String> {
78        &self.application
79    }
80    /// <p>The environment to get. Specify either the environment name or the environment ID.</p>
81    /// This field is required.
82    pub fn environment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.environment = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The environment to get. Specify either the environment name or the environment ID.</p>
87    pub fn set_environment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.environment = input;
89        self
90    }
91    /// <p>The environment to get. Specify either the environment name or the environment ID.</p>
92    pub fn get_environment(&self) -> &::std::option::Option<::std::string::String> {
93        &self.environment
94    }
95    /// <p>The configuration to get. Specify either the configuration name or the configuration ID.</p>
96    /// This field is required.
97    pub fn configuration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98        self.configuration = ::std::option::Option::Some(input.into());
99        self
100    }
101    /// <p>The configuration to get. Specify either the configuration name or the configuration ID.</p>
102    pub fn set_configuration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103        self.configuration = input;
104        self
105    }
106    /// <p>The configuration to get. Specify either the configuration name or the configuration ID.</p>
107    pub fn get_configuration(&self) -> &::std::option::Option<::std::string::String> {
108        &self.configuration
109    }
110    /// <p>The clientId parameter in the following command is a unique, user-specified ID to identify the client for the configuration. This ID enables AppConfig to deploy the configuration in intervals, as defined in the deployment strategy.</p>
111    /// This field is required.
112    pub fn client_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.client_id = ::std::option::Option::Some(input.into());
114        self
115    }
116    /// <p>The clientId parameter in the following command is a unique, user-specified ID to identify the client for the configuration. This ID enables AppConfig to deploy the configuration in intervals, as defined in the deployment strategy.</p>
117    pub fn set_client_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.client_id = input;
119        self
120    }
121    /// <p>The clientId parameter in the following command is a unique, user-specified ID to identify the client for the configuration. This ID enables AppConfig to deploy the configuration in intervals, as defined in the deployment strategy.</p>
122    pub fn get_client_id(&self) -> &::std::option::Option<::std::string::String> {
123        &self.client_id
124    }
125    /// <p>The configuration version returned in the most recent <code>GetConfiguration</code> response.</p><important>
126    /// <p>AppConfig uses the value of the <code>ClientConfigurationVersion</code> parameter to identify the configuration version on your clients. If you don’t send <code>ClientConfigurationVersion</code> with each call to <code>GetConfiguration</code>, your clients receive the current configuration. You are charged each time your clients receive a configuration.</p>
127    /// <p>To avoid excess charges, we recommend you use the <a href="https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/StartConfigurationSession.html">StartConfigurationSession</a> and <a href="https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/GetLatestConfiguration.html">GetLatestConfiguration</a> APIs, which track the client configuration version on your behalf. If you choose to continue using <code>GetConfiguration</code>, we recommend that you include the <code>ClientConfigurationVersion</code> value with every call to <code>GetConfiguration</code>. The value to use for <code>ClientConfigurationVersion</code> comes from the <code>ConfigurationVersion</code> attribute returned by <code>GetConfiguration</code> when there is new or updated data, and should be saved for subsequent calls to <code>GetConfiguration</code>.</p>
128    /// </important>
129    /// <p>For more information about working with configurations, see <a href="http://docs.aws.amazon.com/appconfig/latest/userguide/retrieving-feature-flags.html">Retrieving feature flags and configuration data in AppConfig</a> in the <i>AppConfig User Guide</i>.</p>
130    pub fn client_configuration_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.client_configuration_version = ::std::option::Option::Some(input.into());
132        self
133    }
134    /// <p>The configuration version returned in the most recent <code>GetConfiguration</code> response.</p><important>
135    /// <p>AppConfig uses the value of the <code>ClientConfigurationVersion</code> parameter to identify the configuration version on your clients. If you don’t send <code>ClientConfigurationVersion</code> with each call to <code>GetConfiguration</code>, your clients receive the current configuration. You are charged each time your clients receive a configuration.</p>
136    /// <p>To avoid excess charges, we recommend you use the <a href="https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/StartConfigurationSession.html">StartConfigurationSession</a> and <a href="https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/GetLatestConfiguration.html">GetLatestConfiguration</a> APIs, which track the client configuration version on your behalf. If you choose to continue using <code>GetConfiguration</code>, we recommend that you include the <code>ClientConfigurationVersion</code> value with every call to <code>GetConfiguration</code>. The value to use for <code>ClientConfigurationVersion</code> comes from the <code>ConfigurationVersion</code> attribute returned by <code>GetConfiguration</code> when there is new or updated data, and should be saved for subsequent calls to <code>GetConfiguration</code>.</p>
137    /// </important>
138    /// <p>For more information about working with configurations, see <a href="http://docs.aws.amazon.com/appconfig/latest/userguide/retrieving-feature-flags.html">Retrieving feature flags and configuration data in AppConfig</a> in the <i>AppConfig User Guide</i>.</p>
139    pub fn set_client_configuration_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140        self.client_configuration_version = input;
141        self
142    }
143    /// <p>The configuration version returned in the most recent <code>GetConfiguration</code> response.</p><important>
144    /// <p>AppConfig uses the value of the <code>ClientConfigurationVersion</code> parameter to identify the configuration version on your clients. If you don’t send <code>ClientConfigurationVersion</code> with each call to <code>GetConfiguration</code>, your clients receive the current configuration. You are charged each time your clients receive a configuration.</p>
145    /// <p>To avoid excess charges, we recommend you use the <a href="https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/StartConfigurationSession.html">StartConfigurationSession</a> and <a href="https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/GetLatestConfiguration.html">GetLatestConfiguration</a> APIs, which track the client configuration version on your behalf. If you choose to continue using <code>GetConfiguration</code>, we recommend that you include the <code>ClientConfigurationVersion</code> value with every call to <code>GetConfiguration</code>. The value to use for <code>ClientConfigurationVersion</code> comes from the <code>ConfigurationVersion</code> attribute returned by <code>GetConfiguration</code> when there is new or updated data, and should be saved for subsequent calls to <code>GetConfiguration</code>.</p>
146    /// </important>
147    /// <p>For more information about working with configurations, see <a href="http://docs.aws.amazon.com/appconfig/latest/userguide/retrieving-feature-flags.html">Retrieving feature flags and configuration data in AppConfig</a> in the <i>AppConfig User Guide</i>.</p>
148    pub fn get_client_configuration_version(&self) -> &::std::option::Option<::std::string::String> {
149        &self.client_configuration_version
150    }
151    /// Consumes the builder and constructs a [`GetConfigurationInput`](crate::operation::get_configuration::GetConfigurationInput).
152    pub fn build(
153        self,
154    ) -> ::std::result::Result<crate::operation::get_configuration::GetConfigurationInput, ::aws_smithy_types::error::operation::BuildError> {
155        ::std::result::Result::Ok(crate::operation::get_configuration::GetConfigurationInput {
156            application: self.application,
157            environment: self.environment,
158            configuration: self.configuration,
159            client_id: self.client_id,
160            client_configuration_version: self.client_configuration_version,
161        })
162    }
163}