aws_sdk_elasticbeanstalk/client/
create_environment.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 [`CreateEnvironment`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`application_name(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::application_name) / [`set_application_name(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_application_name):<br>required: **true**<br><p>The name of the application that is associated with this environment.</p><br>
7    ///   - [`environment_name(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::environment_name) / [`set_environment_name(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_environment_name):<br>required: **false**<br><p>A unique name for the environment.</p> <p>Constraint: Must be from 4 to 40 characters in length. The name can contain only letters, numbers, and hyphens. It can't start or end with a hyphen. This name must be unique within a region in your account. If the specified name already exists in the region, Elastic Beanstalk returns an <code>InvalidParameterValue</code> error.</p> <p>If you don't specify the <code>CNAMEPrefix</code> parameter, the environment name becomes part of the CNAME, and therefore part of the visible URL for your application.</p><br>
8    ///   - [`group_name(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::group_name) / [`set_group_name(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_group_name):<br>required: **false**<br><p>The name of the group to which the target environment belongs. Specify a group name only if the environment's name is specified in an environment manifest and not with the environment name parameter. See <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html">Environment Manifest (env.yaml)</a> for details.</p><br>
9    ///   - [`description(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_description):<br>required: **false**<br><p>Your description for this environment.</p><br>
10    ///   - [`cname_prefix(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::cname_prefix) / [`set_cname_prefix(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_cname_prefix):<br>required: **false**<br><p>If specified, the environment attempts to use this value as the prefix for the CNAME in your Elastic Beanstalk environment URL. If not specified, the CNAME is generated automatically by appending a random alphanumeric string to the environment name.</p><br>
11    ///   - [`tier(EnvironmentTier)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::tier) / [`set_tier(Option<EnvironmentTier>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_tier):<br>required: **false**<br><p>Specifies the tier to use in creating this environment. The environment tier that you choose determines whether Elastic Beanstalk provisions resources to support a web application that handles HTTP(S) requests or a web application that handles background-processing tasks.</p><br>
12    ///   - [`tags(Tag)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_tags):<br>required: **false**<br><p>Specifies the tags applied to resources in the environment.</p><br>
13    ///   - [`version_label(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::version_label) / [`set_version_label(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_version_label):<br>required: **false**<br><p>The name of the application version to deploy.</p> <p>Default: If not specified, Elastic Beanstalk attempts to deploy the sample application.</p><br>
14    ///   - [`template_name(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::template_name) / [`set_template_name(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_template_name):<br>required: **false**<br><p>The name of the Elastic Beanstalk configuration template to use with the environment.</p><note>  <p>If you specify <code>TemplateName</code>, then don't specify <code>SolutionStackName</code>.</p> </note><br>
15    ///   - [`solution_stack_name(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::solution_stack_name) / [`set_solution_stack_name(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_solution_stack_name):<br>required: **false**<br><p>The name of an Elastic Beanstalk solution stack (platform version) to use with the environment. If specified, Elastic Beanstalk sets the configuration values to the default values associated with the specified solution stack. For a list of current solution stacks, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html">Elastic Beanstalk Supported Platforms</a> in the <i>AWS Elastic Beanstalk Platforms</i> guide.</p><note>  <p>If you specify <code>SolutionStackName</code>, don't specify <code>PlatformArn</code> or <code>TemplateName</code>.</p> </note><br>
16    ///   - [`platform_arn(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::platform_arn) / [`set_platform_arn(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_platform_arn):<br>required: **false**<br><p>The Amazon Resource Name (ARN) of the custom platform to use with the environment. For more information, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/custom-platforms.html">Custom Platforms</a> in the <i>AWS Elastic Beanstalk Developer Guide</i>.</p><note>  <p>If you specify <code>PlatformArn</code>, don't specify <code>SolutionStackName</code>.</p> </note><br>
17    ///   - [`option_settings(ConfigurationOptionSetting)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::option_settings) / [`set_option_settings(Option<Vec::<ConfigurationOptionSetting>>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_option_settings):<br>required: **false**<br><p>If specified, AWS Elastic Beanstalk sets the specified configuration options to the requested value in the configuration set for the new environment. These override the values obtained from the solution stack or the configuration template.</p><br>
18    ///   - [`options_to_remove(OptionSpecification)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::options_to_remove) / [`set_options_to_remove(Option<Vec::<OptionSpecification>>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_options_to_remove):<br>required: **false**<br><p>A list of custom user-defined configuration options to remove from the configuration set for this new environment.</p><br>
19    ///   - [`operations_role(impl Into<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::operations_role) / [`set_operations_role(Option<String>)`](crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::set_operations_role):<br>required: **false**<br><p>The Amazon Resource Name (ARN) of an existing IAM role to be used as the environment's operations role. If specified, Elastic Beanstalk uses the operations role for permissions to downstream services during this call and during subsequent calls acting on this environment. To specify an operations role, you must have the <code>iam:PassRole</code> permission for the role. For more information, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/iam-operationsrole.html">Operations roles</a> in the <i>AWS Elastic Beanstalk Developer Guide</i>.</p><br>
20    /// - On success, responds with [`CreateEnvironmentOutput`](crate::operation::create_environment::CreateEnvironmentOutput) with field(s):
21    ///   - [`environment_name(Option<String>)`](crate::operation::create_environment::CreateEnvironmentOutput::environment_name): <p>The name of this environment.</p>
22    ///   - [`environment_id(Option<String>)`](crate::operation::create_environment::CreateEnvironmentOutput::environment_id): <p>The ID of this environment.</p>
23    ///   - [`application_name(Option<String>)`](crate::operation::create_environment::CreateEnvironmentOutput::application_name): <p>The name of the application associated with this environment.</p>
24    ///   - [`version_label(Option<String>)`](crate::operation::create_environment::CreateEnvironmentOutput::version_label): <p>The application version deployed in this environment.</p>
25    ///   - [`solution_stack_name(Option<String>)`](crate::operation::create_environment::CreateEnvironmentOutput::solution_stack_name): <p>The name of the <code>SolutionStack</code> deployed with this environment.</p>
26    ///   - [`platform_arn(Option<String>)`](crate::operation::create_environment::CreateEnvironmentOutput::platform_arn): <p>The ARN of the platform version.</p>
27    ///   - [`template_name(Option<String>)`](crate::operation::create_environment::CreateEnvironmentOutput::template_name): <p>The name of the configuration template used to originally launch this environment.</p>
28    ///   - [`description(Option<String>)`](crate::operation::create_environment::CreateEnvironmentOutput::description): <p>Describes this environment.</p>
29    ///   - [`endpoint_url(Option<String>)`](crate::operation::create_environment::CreateEnvironmentOutput::endpoint_url): <p>For load-balanced, autoscaling environments, the URL to the LoadBalancer. For single-instance environments, the IP address of the instance.</p>
30    ///   - [`cname(Option<String>)`](crate::operation::create_environment::CreateEnvironmentOutput::cname): <p>The URL to the CNAME for this environment.</p>
31    ///   - [`date_created(Option<DateTime>)`](crate::operation::create_environment::CreateEnvironmentOutput::date_created): <p>The creation date for this environment.</p>
32    ///   - [`date_updated(Option<DateTime>)`](crate::operation::create_environment::CreateEnvironmentOutput::date_updated): <p>The last modified date for this environment.</p>
33    ///   - [`status(Option<EnvironmentStatus>)`](crate::operation::create_environment::CreateEnvironmentOutput::status): <p>The current operational status of the environment:</p> <ul>  <li>   <p><code>Launching</code>: Environment is in the process of initial deployment.</p></li>  <li>   <p><code>Updating</code>: Environment is in the process of updating its configuration settings or application version.</p></li>  <li>   <p><code>Ready</code>: Environment is available to have an action performed on it, such as update or terminate.</p></li>  <li>   <p><code>Terminating</code>: Environment is in the shut-down process.</p></li>  <li>   <p><code>Terminated</code>: Environment is not running.</p></li> </ul>
34    ///   - [`abortable_operation_in_progress(Option<bool>)`](crate::operation::create_environment::CreateEnvironmentOutput::abortable_operation_in_progress): <p>Indicates if there is an in-progress environment configuration update or application version deployment that you can cancel.</p> <p><code>true:</code> There is an update in progress.</p> <p><code>false:</code> There are no updates currently in progress.</p>
35    ///   - [`health(Option<EnvironmentHealth>)`](crate::operation::create_environment::CreateEnvironmentOutput::health): <p>Describes the health status of the environment. AWS Elastic Beanstalk indicates the failure levels for a running environment:</p> <ul>  <li>   <p><code>Red</code>: Indicates the environment is not responsive. Occurs when three or more consecutive failures occur for an environment.</p></li>  <li>   <p><code>Yellow</code>: Indicates that something is wrong. Occurs when two consecutive failures occur for an environment.</p></li>  <li>   <p><code>Green</code>: Indicates the environment is healthy and fully functional.</p></li>  <li>   <p><code>Grey</code>: Default health for a new environment. The environment is not fully launched and health checks have not started or health checks are suspended during an <code>UpdateEnvironment</code> or <code>RestartEnvironment</code> request.</p></li> </ul> <p>Default: <code>Grey</code></p>
36    ///   - [`health_status(Option<EnvironmentHealthStatus>)`](crate::operation::create_environment::CreateEnvironmentOutput::health_status): <p>Returns the health status of the application running in your environment. For more information, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-status.html">Health Colors and Statuses</a>.</p>
37    ///   - [`resources(Option<EnvironmentResourcesDescription>)`](crate::operation::create_environment::CreateEnvironmentOutput::resources): <p>The description of the AWS resources used by this environment.</p>
38    ///   - [`tier(Option<EnvironmentTier>)`](crate::operation::create_environment::CreateEnvironmentOutput::tier): <p>Describes the current tier of this environment.</p>
39    ///   - [`environment_links(Option<Vec::<EnvironmentLink>>)`](crate::operation::create_environment::CreateEnvironmentOutput::environment_links): <p>A list of links to other environments in the same group.</p>
40    ///   - [`environment_arn(Option<String>)`](crate::operation::create_environment::CreateEnvironmentOutput::environment_arn): <p>The environment's Amazon Resource Name (ARN), which can be used in other API requests that require an ARN.</p>
41    ///   - [`operations_role(Option<String>)`](crate::operation::create_environment::CreateEnvironmentOutput::operations_role): <p>The Amazon Resource Name (ARN) of the environment's operations role. For more information, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/iam-operationsrole.html">Operations roles</a> in the <i>AWS Elastic Beanstalk Developer Guide</i>.</p>
42    /// - On failure, responds with [`SdkError<CreateEnvironmentError>`](crate::operation::create_environment::CreateEnvironmentError)
43    pub fn create_environment(&self) -> crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder {
44        crate::operation::create_environment::builders::CreateEnvironmentFluentBuilder::new(self.handle.clone())
45    }
46}