aws_sdk_appsync/client/
put_graphql_api_environment_variables.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 [`PutGraphqlApiEnvironmentVariables`](crate::operation::put_graphql_api_environment_variables::builders::PutGraphqlApiEnvironmentVariablesFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`api_id(impl Into<String>)`](crate::operation::put_graphql_api_environment_variables::builders::PutGraphqlApiEnvironmentVariablesFluentBuilder::api_id) / [`set_api_id(Option<String>)`](crate::operation::put_graphql_api_environment_variables::builders::PutGraphqlApiEnvironmentVariablesFluentBuilder::set_api_id):<br>required: **true**<br><p>The ID of the API to which the environmental variable list will be written.</p><br>
7    ///   - [`environment_variables(impl Into<String>, impl Into<String>)`](crate::operation::put_graphql_api_environment_variables::builders::PutGraphqlApiEnvironmentVariablesFluentBuilder::environment_variables) / [`set_environment_variables(Option<HashMap::<String, String>>)`](crate::operation::put_graphql_api_environment_variables::builders::PutGraphqlApiEnvironmentVariablesFluentBuilder::set_environment_variables):<br>required: **true**<br><p>The list of environmental variables to add to the API.</p> <p>When creating an environmental variable key-value pair, it must follow the additional constraints below:</p> <ul>  <li>   <p>Keys must begin with a letter.</p></li>  <li>   <p>Keys must be at least two characters long.</p></li>  <li>   <p>Keys can only contain letters, numbers, and the underscore character (_).</p></li>  <li>   <p>Values can be up to 512 characters long.</p></li>  <li>   <p>You can configure up to 50 key-value pairs in a GraphQL API.</p></li> </ul> <p>You can create a list of environmental variables by adding it to the <code>environmentVariables</code> payload as a list in the format <code>{"key1":"value1","key2":"value2", …}</code>. Note that each call of the <code>PutGraphqlApiEnvironmentVariables</code> action will result in the overwriting of the existing environmental variable list of that API. This means the existing environmental variables will be lost. To avoid this, you must include all existing and new environmental variables in the list each time you call this action.</p><br>
8    /// - On success, responds with [`PutGraphqlApiEnvironmentVariablesOutput`](crate::operation::put_graphql_api_environment_variables::PutGraphqlApiEnvironmentVariablesOutput) with field(s):
9    ///   - [`environment_variables(Option<HashMap::<String, String>>)`](crate::operation::put_graphql_api_environment_variables::PutGraphqlApiEnvironmentVariablesOutput::environment_variables): <p>The payload containing each environmental variable in the <code>"key" : "value"</code> format.</p>
10    /// - On failure, responds with [`SdkError<PutGraphqlApiEnvironmentVariablesError>`](crate::operation::put_graphql_api_environment_variables::PutGraphqlApiEnvironmentVariablesError)
11    pub fn put_graphql_api_environment_variables(
12        &self,
13    ) -> crate::operation::put_graphql_api_environment_variables::builders::PutGraphqlApiEnvironmentVariablesFluentBuilder {
14        crate::operation::put_graphql_api_environment_variables::builders::PutGraphqlApiEnvironmentVariablesFluentBuilder::new(self.handle.clone())
15    }
16}