aws_sdk_opsworks/client/
create_app.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 [`CreateApp`](crate::operation::create_app::builders::CreateAppFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`stack_id(impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::stack_id) / [`set_stack_id(Option<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_stack_id):<br>required: **true**<br><p>The stack ID.</p><br>
7    ///   - [`shortname(impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::shortname) / [`set_shortname(Option<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_shortname):<br>required: **false**<br><p>The app's short name.</p><br>
8    ///   - [`name(impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_name):<br>required: **true**<br><p>The app name.</p><br>
9    ///   - [`description(impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_description):<br>required: **false**<br><p>A description of the app.</p><br>
10    ///   - [`data_sources(DataSource)`](crate::operation::create_app::builders::CreateAppFluentBuilder::data_sources) / [`set_data_sources(Option<Vec::<DataSource>>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_data_sources):<br>required: **false**<br><p>The app's data source.</p><br>
11    ///   - [`r#type(AppType)`](crate::operation::create_app::builders::CreateAppFluentBuilder::type) / [`set_type(Option<AppType>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_type):<br>required: **true**<br><p>The app type. Each supported type is associated with a particular layer. For example, PHP applications are associated with a PHP layer. OpsWorks Stacks deploys an application to those instances that are members of the corresponding layer. If your app isn't one of the standard types, or you prefer to implement your own Deploy recipes, specify <code>other</code>.</p><br>
12    ///   - [`app_source(Source)`](crate::operation::create_app::builders::CreateAppFluentBuilder::app_source) / [`set_app_source(Option<Source>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_app_source):<br>required: **false**<br><p>A <code>Source</code> object that specifies the app repository.</p><br>
13    ///   - [`domains(impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::domains) / [`set_domains(Option<Vec::<String>>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_domains):<br>required: **false**<br><p>The app virtual host settings, with multiple domains separated by commas. For example: <code>'www.example.com, example.com'</code></p><br>
14    ///   - [`enable_ssl(bool)`](crate::operation::create_app::builders::CreateAppFluentBuilder::enable_ssl) / [`set_enable_ssl(Option<bool>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_enable_ssl):<br>required: **false**<br><p>Whether to enable SSL for the app.</p><br>
15    ///   - [`ssl_configuration(SslConfiguration)`](crate::operation::create_app::builders::CreateAppFluentBuilder::ssl_configuration) / [`set_ssl_configuration(Option<SslConfiguration>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_ssl_configuration):<br>required: **false**<br><p>An <code>SslConfiguration</code> object with the SSL configuration.</p><br>
16    ///   - [`attributes(AppAttributesKeys, impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::attributes) / [`set_attributes(Option<HashMap::<AppAttributesKeys, String>>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_attributes):<br>required: **false**<br><p>One or more user-defined key/value pairs to be added to the stack attributes.</p><br>
17    ///   - [`environment(EnvironmentVariable)`](crate::operation::create_app::builders::CreateAppFluentBuilder::environment) / [`set_environment(Option<Vec::<EnvironmentVariable>>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_environment):<br>required: **false**<br><p>An array of <code>EnvironmentVariable</code> objects that specify environment variables to be associated with the app. After you deploy the app, these variables are defined on the associated app server instance. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html#workingapps-creating-environment"> Environment Variables</a>.</p> <p>There is no specific limit on the number of environment variables. However, the size of the associated data structure - which includes the variables' names, values, and protected flag values - cannot exceed 20 KB. This limit should accommodate most if not all use cases. Exceeding it will cause an exception with the message, "Environment: is too large (maximum is 20KB)."</p><note>  <p>If you have specified one or more environment variables, you cannot modify the stack's Chef version.</p> </note><br>
18    /// - On success, responds with [`CreateAppOutput`](crate::operation::create_app::CreateAppOutput) with field(s):
19    ///   - [`app_id(Option<String>)`](crate::operation::create_app::CreateAppOutput::app_id): <p>The app ID.</p>
20    /// - On failure, responds with [`SdkError<CreateAppError>`](crate::operation::create_app::CreateAppError)
21    pub fn create_app(&self) -> crate::operation::create_app::builders::CreateAppFluentBuilder {
22        crate::operation::create_app::builders::CreateAppFluentBuilder::new(self.handle.clone())
23    }
24}