aws_sdk_appconfig/client/
get_configuration.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`GetConfiguration`](crate::operation::get_configuration::builders::GetConfigurationFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`application(impl Into<String>)`](crate::operation::get_configuration::builders::GetConfigurationFluentBuilder::application) / [`set_application(Option<String>)`](crate::operation::get_configuration::builders::GetConfigurationFluentBuilder::set_application):<br>required: **true**<br><p>The application to get. Specify either the application name or the application ID.</p><br>
7    ///   - [`environment(impl Into<String>)`](crate::operation::get_configuration::builders::GetConfigurationFluentBuilder::environment) / [`set_environment(Option<String>)`](crate::operation::get_configuration::builders::GetConfigurationFluentBuilder::set_environment):<br>required: **true**<br><p>The environment to get. Specify either the environment name or the environment ID.</p><br>
8    ///   - [`configuration(impl Into<String>)`](crate::operation::get_configuration::builders::GetConfigurationFluentBuilder::configuration) / [`set_configuration(Option<String>)`](crate::operation::get_configuration::builders::GetConfigurationFluentBuilder::set_configuration):<br>required: **true**<br><p>The configuration to get. Specify either the configuration name or the configuration ID.</p><br>
9    ///   - [`client_id(impl Into<String>)`](crate::operation::get_configuration::builders::GetConfigurationFluentBuilder::client_id) / [`set_client_id(Option<String>)`](crate::operation::get_configuration::builders::GetConfigurationFluentBuilder::set_client_id):<br>required: **true**<br><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><br>
10    ///   - [`client_configuration_version(impl Into<String>)`](crate::operation::get_configuration::builders::GetConfigurationFluentBuilder::client_configuration_version) / [`set_client_configuration_version(Option<String>)`](crate::operation::get_configuration::builders::GetConfigurationFluentBuilder::set_client_configuration_version):<br>required: **false**<br><p>The configuration version returned in the most recent <code>GetConfiguration</code> response.</p><important>  <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>  <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> </important> <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><br>
11    /// - On success, responds with [`GetConfigurationOutput`](crate::operation::get_configuration::GetConfigurationOutput) with field(s):
12    ///   - [`content(Option<Blob>)`](crate::operation::get_configuration::GetConfigurationOutput::content): <p>The content of the configuration or the configuration data.</p><important>  <p>The <code>Content</code> attribute only contains data if the system finds new or updated configuration data. If there is no new or updated data and <code>ClientConfigurationVersion</code> matches the version of the current configuration, AppConfig returns a <code>204 No Content</code> HTTP response code and the <code>Content</code> value will be empty.</p> </important>
13    ///   - [`configuration_version(Option<String>)`](crate::operation::get_configuration::GetConfigurationOutput::configuration_version): <p>The configuration version.</p>
14    ///   - [`content_type(Option<String>)`](crate::operation::get_configuration::GetConfigurationOutput::content_type): <p>A standard MIME type describing the format of the configuration content. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a>.</p>
15    /// - On failure, responds with [`SdkError<GetConfigurationError>`](crate::operation::get_configuration::GetConfigurationError)
16    #[deprecated(
17        note = "This API has been deprecated in favor of the GetLatestConfiguration API used in conjunction with StartConfigurationSession."
18    )]
19    pub fn get_configuration(&self) -> crate::operation::get_configuration::builders::GetConfigurationFluentBuilder {
20        crate::operation::get_configuration::builders::GetConfigurationFluentBuilder::new(self.handle.clone())
21    }
22}