Skip to main content

aws_sdk_appconfigcloudextension/client/
get_flag.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 [`GetFlag`](crate::operation::get_flag::builders::GetFlagFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`application(impl Into<String>)`](crate::operation::get_flag::builders::GetFlagFluentBuilder::application) / [`set_application(Option<String>)`](crate::operation::get_flag::builders::GetFlagFluentBuilder::set_application):<br>required: **true**<br>The name or ID of the AWS AppConfig application.<br>
7    ///   - [`environment(impl Into<String>)`](crate::operation::get_flag::builders::GetFlagFluentBuilder::environment) / [`set_environment(Option<String>)`](crate::operation::get_flag::builders::GetFlagFluentBuilder::set_environment):<br>required: **true**<br>The name or ID of the AWS AppConfig environment the configuration is deployed to.<br>
8    ///   - [`configuration(impl Into<String>)`](crate::operation::get_flag::builders::GetFlagFluentBuilder::configuration) / [`set_configuration(Option<String>)`](crate::operation::get_flag::builders::GetFlagFluentBuilder::set_configuration):<br>required: **true**<br>The name or ID of the feature flag configuration profile.<br>
9    ///   - [`flag(impl Into<String>)`](crate::operation::get_flag::builders::GetFlagFluentBuilder::flag) / [`set_flag(Option<String>)`](crate::operation::get_flag::builders::GetFlagFluentBuilder::set_flag):<br>required: **true**<br>The key of the flag to return.<br>
10    ///   - [`context(impl Into<String>, impl Into<String>)`](crate::operation::get_flag::builders::GetFlagFluentBuilder::context) / [`set_context(Option<HashMap::<String, String>>)`](crate::operation::get_flag::builders::GetFlagFluentBuilder::set_context):<br>required: **false**<br>The request context that the flag's variant rules are evaluated against.<br>
11    /// - On success, responds with [`GetFlagOutput`](crate::operation::get_flag::GetFlagOutput) with field(s):
12    ///   - [`enabled(bool)`](crate::operation::get_flag::GetFlagOutput::enabled): Whether the flag is enabled.
13    ///   - [`variant(Option<String>)`](crate::operation::get_flag::GetFlagOutput::variant): The name of the variant the request context matched, absent when the flag has no variants.
14    ///   - [`attributes(Option<HashMap::<String, FlagAttributeValue>>)`](crate::operation::get_flag::GetFlagOutput::attributes): The flag's attribute values, by attribute key, absent when the flag has none.
15    /// - On failure, responds with [`SdkError<GetFlagError>`](crate::operation::get_flag::GetFlagError)
16    pub fn get_flag(&self) -> crate::operation::get_flag::builders::GetFlagFluentBuilder {
17        crate::operation::get_flag::builders::GetFlagFluentBuilder::new(self.handle.clone())
18    }
19}