1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateEnvironmentEC2`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`name(impl Into<String>)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::set_name): <p>The name of the environment to create.</p>  <p>This name is visible to other IAM users in the same Amazon Web Services account.</p>
    ///   - [`description(impl Into<String>)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::set_description): <p>The description of the environment to create.</p>
    ///   - [`client_request_token(impl Into<String>)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::client_request_token) / [`set_client_request_token(Option<String>)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::set_client_request_token): <p>A unique, case-sensitive string that helps Cloud9 to ensure this operation completes no more than one time.</p>  <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Client Tokens</a> in the <i>Amazon EC2 API Reference</i>.</p>
    ///   - [`instance_type(impl Into<String>)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::instance_type) / [`set_instance_type(Option<String>)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::set_instance_type): <p>The type of instance to connect to the environment (for example, <code>t2.micro</code>).</p>
    ///   - [`subnet_id(impl Into<String>)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::subnet_id) / [`set_subnet_id(Option<String>)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::set_subnet_id): <p>The ID of the subnet in Amazon VPC that Cloud9 will use to communicate with the Amazon EC2 instance.</p>
    ///   - [`image_id(impl Into<String>)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::image_id) / [`set_image_id(Option<String>)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::set_image_id): <p>The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance. To choose an AMI for the instance, you must specify a valid AMI alias or a valid Amazon EC2 Systems Manager (SSM) path.</p>  <p>The default Amazon Linux AMI is currently used if the parameter isn't explicitly assigned a value in the request. Because Amazon Linux AMI has ended standard support as of December 31, 2020, we recommend you choose Amazon Linux 2, which includes long term support through 2023.</p>  <p>From December 31, 2023, the parameter for Amazon Linux will no longer be available when you specify an AMI for your instance. Amazon Linux 2 will then become the default AMI, which is used to launch your instance if no parameter is explicitly defined.</p>  <p>Since Ubuntu 18.04 has ended standard support as of May 31, 2023, we recommend you choose Ubuntu 22.04.</p>  <p> <b>AMI aliases </b> </p>  <ul>   <li> <p> <b>Amazon Linux (default): <code>amazonlinux-1-x86_64</code> </b> </p> </li>   <li> <p>Amazon Linux 2: <code>amazonlinux-2-x86_64</code> </p> </li>   <li> <p>Ubuntu 18.04: <code>ubuntu-18.04-x86_64</code> </p> </li>   <li> <p>Ubuntu 22.04: <code>ubuntu-22.04-x86_64</code> </p> </li>  </ul>  <p> <b>SSM paths</b> </p>  <ul>   <li> <p> <b>Amazon Linux (default): <code>resolve:ssm:/aws/service/cloud9/amis/amazonlinux-1-x86_64</code> </b> </p> </li>   <li> <p>Amazon Linux 2: <code>resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64</code> </p> </li>   <li> <p>Ubuntu 18.04: <code>resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64</code> </p> </li>   <li> <p>Ubuntu 22.04: <code>resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64</code> </p> </li>  </ul>
    ///   - [`automatic_stop_time_minutes(i32)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::automatic_stop_time_minutes) / [`set_automatic_stop_time_minutes(Option<i32>)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::set_automatic_stop_time_minutes): <p>The number of minutes until the running instance is shut down after the environment has last been used.</p>
    ///   - [`owner_arn(impl Into<String>)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::owner_arn) / [`set_owner_arn(Option<String>)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::set_owner_arn): <p>The Amazon Resource Name (ARN) of the environment owner. This ARN can be the ARN of any IAM principal. If this value is not specified, the ARN defaults to this environment's creator.</p>
    ///   - [`tags(Tag)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::tags) / [`set_tags(Option<Vec<Tag>>)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::set_tags): <p>An array of key-value pairs that will be associated with the new Cloud9 development environment.</p>
    ///   - [`connection_type(ConnectionType)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::connection_type) / [`set_connection_type(Option<ConnectionType>)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::set_connection_type): <p>The connection type used for connecting to an Amazon EC2 environment. Valid values are <code>CONNECT_SSH</code> (default) and <code>CONNECT_SSM</code> (connected through Amazon EC2 Systems Manager).</p>  <p>For more information, see <a href="https://docs.aws.amazon.com/cloud9/latest/user-guide/ec2-ssm.html">Accessing no-ingress EC2 instances with Amazon EC2 Systems Manager</a> in the <i>Cloud9 User Guide</i>.</p>
    ///   - [`dry_run(bool)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::set_dry_run): <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    /// - On success, responds with [`CreateEnvironmentEc2Output`](crate::operation::create_environment_ec2::CreateEnvironmentEc2Output) with field(s):
    ///   - [`environment_id(Option<String>)`](crate::operation::create_environment_ec2::CreateEnvironmentEc2Output::environment_id): <p>The ID of the environment that was created.</p>
    /// - On failure, responds with [`SdkError<CreateEnvironmentEC2Error>`](crate::operation::create_environment_ec2::CreateEnvironmentEC2Error)
    pub fn create_environment_ec2(&self) -> crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder {
        crate::operation::create_environment_ec2::builders::CreateEnvironmentEC2FluentBuilder::new(self.handle.clone())
    }
}