aws_sdk_cloud9/operation/create_environment_ec2/
_create_environment_ec2_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreateEnvironmentEc2Input {
6    /// <p>The name of the environment to create.</p>
7    /// <p>This name is visible to other IAM users in the same Amazon Web Services account.</p>
8    pub name: ::std::option::Option<::std::string::String>,
9    /// <p>The description of the environment to create.</p>
10    pub description: ::std::option::Option<::std::string::String>,
11    /// <p>A unique, case-sensitive string that helps Cloud9 to ensure this operation completes no more than one time.</p>
12    /// <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>
13    pub client_request_token: ::std::option::Option<::std::string::String>,
14    /// <p>The type of instance to connect to the environment (for example, <code>t2.micro</code>).</p>
15    pub instance_type: ::std::option::Option<::std::string::String>,
16    /// <p>The ID of the subnet in Amazon VPC that Cloud9 will use to communicate with the Amazon EC2 instance.</p>
17    pub subnet_id: ::std::option::Option<::std::string::String>,
18    /// <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>
19    /// <p></p>
20    /// <p>We recommend using Amazon Linux 2023 as the AMI to create your environment as it is fully supported.</p>
21    /// <p>From December 16, 2024, Ubuntu 18.04 will be removed from the list of available <code>imageIds</code> for Cloud9. This change is necessary as Ubuntu 18.04 has ended standard support on May 31, 2023. This change will only affect direct API consumers, and not Cloud9 console users.</p>
22    /// <p>Since Ubuntu 18.04 has ended standard support as of May 31, 2023, we recommend you choose Ubuntu 22.04.</p>
23    /// <p><b>AMI aliases </b></p>
24    /// <ul>
25    /// <li>
26    /// <p>Amazon Linux 2: <code>amazonlinux-2-x86_64</code></p></li>
27    /// <li>
28    /// <p>Amazon Linux 2023 (recommended): <code>amazonlinux-2023-x86_64</code></p></li>
29    /// <li>
30    /// <p>Ubuntu 18.04: <code>ubuntu-18.04-x86_64</code></p></li>
31    /// <li>
32    /// <p>Ubuntu 22.04: <code>ubuntu-22.04-x86_64</code></p></li>
33    /// </ul>
34    /// <p><b>SSM paths</b></p>
35    /// <ul>
36    /// <li>
37    /// <p>Amazon Linux 2: <code>resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64</code></p></li>
38    /// <li>
39    /// <p>Amazon Linux 2023 (recommended): <code>resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64</code></p></li>
40    /// <li>
41    /// <p>Ubuntu 18.04: <code>resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64</code></p></li>
42    /// <li>
43    /// <p>Ubuntu 22.04: <code>resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64</code></p></li>
44    /// </ul>
45    pub image_id: ::std::option::Option<::std::string::String>,
46    /// <p>The number of minutes until the running instance is shut down after the environment has last been used.</p>
47    pub automatic_stop_time_minutes: ::std::option::Option<i32>,
48    /// <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>
49    pub owner_arn: ::std::option::Option<::std::string::String>,
50    /// <p>An array of key-value pairs that will be associated with the new Cloud9 development environment.</p>
51    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
52    /// <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>
53    /// <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>
54    pub connection_type: ::std::option::Option<crate::types::ConnectionType>,
55    /// <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>
56    pub dry_run: ::std::option::Option<bool>,
57}
58impl CreateEnvironmentEc2Input {
59    /// <p>The name of the environment to create.</p>
60    /// <p>This name is visible to other IAM users in the same Amazon Web Services account.</p>
61    pub fn name(&self) -> ::std::option::Option<&str> {
62        self.name.as_deref()
63    }
64    /// <p>The description of the environment to create.</p>
65    pub fn description(&self) -> ::std::option::Option<&str> {
66        self.description.as_deref()
67    }
68    /// <p>A unique, case-sensitive string that helps Cloud9 to ensure this operation completes no more than one time.</p>
69    /// <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>
70    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
71        self.client_request_token.as_deref()
72    }
73    /// <p>The type of instance to connect to the environment (for example, <code>t2.micro</code>).</p>
74    pub fn instance_type(&self) -> ::std::option::Option<&str> {
75        self.instance_type.as_deref()
76    }
77    /// <p>The ID of the subnet in Amazon VPC that Cloud9 will use to communicate with the Amazon EC2 instance.</p>
78    pub fn subnet_id(&self) -> ::std::option::Option<&str> {
79        self.subnet_id.as_deref()
80    }
81    /// <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>
82    /// <p></p>
83    /// <p>We recommend using Amazon Linux 2023 as the AMI to create your environment as it is fully supported.</p>
84    /// <p>From December 16, 2024, Ubuntu 18.04 will be removed from the list of available <code>imageIds</code> for Cloud9. This change is necessary as Ubuntu 18.04 has ended standard support on May 31, 2023. This change will only affect direct API consumers, and not Cloud9 console users.</p>
85    /// <p>Since Ubuntu 18.04 has ended standard support as of May 31, 2023, we recommend you choose Ubuntu 22.04.</p>
86    /// <p><b>AMI aliases </b></p>
87    /// <ul>
88    /// <li>
89    /// <p>Amazon Linux 2: <code>amazonlinux-2-x86_64</code></p></li>
90    /// <li>
91    /// <p>Amazon Linux 2023 (recommended): <code>amazonlinux-2023-x86_64</code></p></li>
92    /// <li>
93    /// <p>Ubuntu 18.04: <code>ubuntu-18.04-x86_64</code></p></li>
94    /// <li>
95    /// <p>Ubuntu 22.04: <code>ubuntu-22.04-x86_64</code></p></li>
96    /// </ul>
97    /// <p><b>SSM paths</b></p>
98    /// <ul>
99    /// <li>
100    /// <p>Amazon Linux 2: <code>resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64</code></p></li>
101    /// <li>
102    /// <p>Amazon Linux 2023 (recommended): <code>resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64</code></p></li>
103    /// <li>
104    /// <p>Ubuntu 18.04: <code>resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64</code></p></li>
105    /// <li>
106    /// <p>Ubuntu 22.04: <code>resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64</code></p></li>
107    /// </ul>
108    pub fn image_id(&self) -> ::std::option::Option<&str> {
109        self.image_id.as_deref()
110    }
111    /// <p>The number of minutes until the running instance is shut down after the environment has last been used.</p>
112    pub fn automatic_stop_time_minutes(&self) -> ::std::option::Option<i32> {
113        self.automatic_stop_time_minutes
114    }
115    /// <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>
116    pub fn owner_arn(&self) -> ::std::option::Option<&str> {
117        self.owner_arn.as_deref()
118    }
119    /// <p>An array of key-value pairs that will be associated with the new Cloud9 development environment.</p>
120    ///
121    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
122    pub fn tags(&self) -> &[crate::types::Tag] {
123        self.tags.as_deref().unwrap_or_default()
124    }
125    /// <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>
126    /// <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>
127    pub fn connection_type(&self) -> ::std::option::Option<&crate::types::ConnectionType> {
128        self.connection_type.as_ref()
129    }
130    /// <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>
131    pub fn dry_run(&self) -> ::std::option::Option<bool> {
132        self.dry_run
133    }
134}
135impl ::std::fmt::Debug for CreateEnvironmentEc2Input {
136    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
137        let mut formatter = f.debug_struct("CreateEnvironmentEc2Input");
138        formatter.field("name", &self.name);
139        formatter.field("description", &"*** Sensitive Data Redacted ***");
140        formatter.field("client_request_token", &self.client_request_token);
141        formatter.field("instance_type", &self.instance_type);
142        formatter.field("subnet_id", &self.subnet_id);
143        formatter.field("image_id", &self.image_id);
144        formatter.field("automatic_stop_time_minutes", &self.automatic_stop_time_minutes);
145        formatter.field("owner_arn", &self.owner_arn);
146        formatter.field("tags", &"*** Sensitive Data Redacted ***");
147        formatter.field("connection_type", &self.connection_type);
148        formatter.field("dry_run", &self.dry_run);
149        formatter.finish()
150    }
151}
152impl CreateEnvironmentEc2Input {
153    /// Creates a new builder-style object to manufacture [`CreateEnvironmentEc2Input`](crate::operation::create_environment_ec2::CreateEnvironmentEc2Input).
154    pub fn builder() -> crate::operation::create_environment_ec2::builders::CreateEnvironmentEc2InputBuilder {
155        crate::operation::create_environment_ec2::builders::CreateEnvironmentEc2InputBuilder::default()
156    }
157}
158
159/// A builder for [`CreateEnvironmentEc2Input`](crate::operation::create_environment_ec2::CreateEnvironmentEc2Input).
160#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
161#[non_exhaustive]
162pub struct CreateEnvironmentEc2InputBuilder {
163    pub(crate) name: ::std::option::Option<::std::string::String>,
164    pub(crate) description: ::std::option::Option<::std::string::String>,
165    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
166    pub(crate) instance_type: ::std::option::Option<::std::string::String>,
167    pub(crate) subnet_id: ::std::option::Option<::std::string::String>,
168    pub(crate) image_id: ::std::option::Option<::std::string::String>,
169    pub(crate) automatic_stop_time_minutes: ::std::option::Option<i32>,
170    pub(crate) owner_arn: ::std::option::Option<::std::string::String>,
171    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
172    pub(crate) connection_type: ::std::option::Option<crate::types::ConnectionType>,
173    pub(crate) dry_run: ::std::option::Option<bool>,
174}
175impl CreateEnvironmentEc2InputBuilder {
176    /// <p>The name of the environment to create.</p>
177    /// <p>This name is visible to other IAM users in the same Amazon Web Services account.</p>
178    /// This field is required.
179    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
180        self.name = ::std::option::Option::Some(input.into());
181        self
182    }
183    /// <p>The name of the environment to create.</p>
184    /// <p>This name is visible to other IAM users in the same Amazon Web Services account.</p>
185    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186        self.name = input;
187        self
188    }
189    /// <p>The name of the environment to create.</p>
190    /// <p>This name is visible to other IAM users in the same Amazon Web Services account.</p>
191    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
192        &self.name
193    }
194    /// <p>The description of the environment to create.</p>
195    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
196        self.description = ::std::option::Option::Some(input.into());
197        self
198    }
199    /// <p>The description of the environment to create.</p>
200    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
201        self.description = input;
202        self
203    }
204    /// <p>The description of the environment to create.</p>
205    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
206        &self.description
207    }
208    /// <p>A unique, case-sensitive string that helps Cloud9 to ensure this operation completes no more than one time.</p>
209    /// <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>
210    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
211        self.client_request_token = ::std::option::Option::Some(input.into());
212        self
213    }
214    /// <p>A unique, case-sensitive string that helps Cloud9 to ensure this operation completes no more than one time.</p>
215    /// <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>
216    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
217        self.client_request_token = input;
218        self
219    }
220    /// <p>A unique, case-sensitive string that helps Cloud9 to ensure this operation completes no more than one time.</p>
221    /// <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>
222    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
223        &self.client_request_token
224    }
225    /// <p>The type of instance to connect to the environment (for example, <code>t2.micro</code>).</p>
226    /// This field is required.
227    pub fn instance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
228        self.instance_type = ::std::option::Option::Some(input.into());
229        self
230    }
231    /// <p>The type of instance to connect to the environment (for example, <code>t2.micro</code>).</p>
232    pub fn set_instance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
233        self.instance_type = input;
234        self
235    }
236    /// <p>The type of instance to connect to the environment (for example, <code>t2.micro</code>).</p>
237    pub fn get_instance_type(&self) -> &::std::option::Option<::std::string::String> {
238        &self.instance_type
239    }
240    /// <p>The ID of the subnet in Amazon VPC that Cloud9 will use to communicate with the Amazon EC2 instance.</p>
241    pub fn subnet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
242        self.subnet_id = ::std::option::Option::Some(input.into());
243        self
244    }
245    /// <p>The ID of the subnet in Amazon VPC that Cloud9 will use to communicate with the Amazon EC2 instance.</p>
246    pub fn set_subnet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
247        self.subnet_id = input;
248        self
249    }
250    /// <p>The ID of the subnet in Amazon VPC that Cloud9 will use to communicate with the Amazon EC2 instance.</p>
251    pub fn get_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
252        &self.subnet_id
253    }
254    /// <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>
255    /// <p></p>
256    /// <p>We recommend using Amazon Linux 2023 as the AMI to create your environment as it is fully supported.</p>
257    /// <p>From December 16, 2024, Ubuntu 18.04 will be removed from the list of available <code>imageIds</code> for Cloud9. This change is necessary as Ubuntu 18.04 has ended standard support on May 31, 2023. This change will only affect direct API consumers, and not Cloud9 console users.</p>
258    /// <p>Since Ubuntu 18.04 has ended standard support as of May 31, 2023, we recommend you choose Ubuntu 22.04.</p>
259    /// <p><b>AMI aliases </b></p>
260    /// <ul>
261    /// <li>
262    /// <p>Amazon Linux 2: <code>amazonlinux-2-x86_64</code></p></li>
263    /// <li>
264    /// <p>Amazon Linux 2023 (recommended): <code>amazonlinux-2023-x86_64</code></p></li>
265    /// <li>
266    /// <p>Ubuntu 18.04: <code>ubuntu-18.04-x86_64</code></p></li>
267    /// <li>
268    /// <p>Ubuntu 22.04: <code>ubuntu-22.04-x86_64</code></p></li>
269    /// </ul>
270    /// <p><b>SSM paths</b></p>
271    /// <ul>
272    /// <li>
273    /// <p>Amazon Linux 2: <code>resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64</code></p></li>
274    /// <li>
275    /// <p>Amazon Linux 2023 (recommended): <code>resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64</code></p></li>
276    /// <li>
277    /// <p>Ubuntu 18.04: <code>resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64</code></p></li>
278    /// <li>
279    /// <p>Ubuntu 22.04: <code>resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64</code></p></li>
280    /// </ul>
281    /// This field is required.
282    pub fn image_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
283        self.image_id = ::std::option::Option::Some(input.into());
284        self
285    }
286    /// <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>
287    /// <p></p>
288    /// <p>We recommend using Amazon Linux 2023 as the AMI to create your environment as it is fully supported.</p>
289    /// <p>From December 16, 2024, Ubuntu 18.04 will be removed from the list of available <code>imageIds</code> for Cloud9. This change is necessary as Ubuntu 18.04 has ended standard support on May 31, 2023. This change will only affect direct API consumers, and not Cloud9 console users.</p>
290    /// <p>Since Ubuntu 18.04 has ended standard support as of May 31, 2023, we recommend you choose Ubuntu 22.04.</p>
291    /// <p><b>AMI aliases </b></p>
292    /// <ul>
293    /// <li>
294    /// <p>Amazon Linux 2: <code>amazonlinux-2-x86_64</code></p></li>
295    /// <li>
296    /// <p>Amazon Linux 2023 (recommended): <code>amazonlinux-2023-x86_64</code></p></li>
297    /// <li>
298    /// <p>Ubuntu 18.04: <code>ubuntu-18.04-x86_64</code></p></li>
299    /// <li>
300    /// <p>Ubuntu 22.04: <code>ubuntu-22.04-x86_64</code></p></li>
301    /// </ul>
302    /// <p><b>SSM paths</b></p>
303    /// <ul>
304    /// <li>
305    /// <p>Amazon Linux 2: <code>resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64</code></p></li>
306    /// <li>
307    /// <p>Amazon Linux 2023 (recommended): <code>resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64</code></p></li>
308    /// <li>
309    /// <p>Ubuntu 18.04: <code>resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64</code></p></li>
310    /// <li>
311    /// <p>Ubuntu 22.04: <code>resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64</code></p></li>
312    /// </ul>
313    pub fn set_image_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
314        self.image_id = input;
315        self
316    }
317    /// <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>
318    /// <p></p>
319    /// <p>We recommend using Amazon Linux 2023 as the AMI to create your environment as it is fully supported.</p>
320    /// <p>From December 16, 2024, Ubuntu 18.04 will be removed from the list of available <code>imageIds</code> for Cloud9. This change is necessary as Ubuntu 18.04 has ended standard support on May 31, 2023. This change will only affect direct API consumers, and not Cloud9 console users.</p>
321    /// <p>Since Ubuntu 18.04 has ended standard support as of May 31, 2023, we recommend you choose Ubuntu 22.04.</p>
322    /// <p><b>AMI aliases </b></p>
323    /// <ul>
324    /// <li>
325    /// <p>Amazon Linux 2: <code>amazonlinux-2-x86_64</code></p></li>
326    /// <li>
327    /// <p>Amazon Linux 2023 (recommended): <code>amazonlinux-2023-x86_64</code></p></li>
328    /// <li>
329    /// <p>Ubuntu 18.04: <code>ubuntu-18.04-x86_64</code></p></li>
330    /// <li>
331    /// <p>Ubuntu 22.04: <code>ubuntu-22.04-x86_64</code></p></li>
332    /// </ul>
333    /// <p><b>SSM paths</b></p>
334    /// <ul>
335    /// <li>
336    /// <p>Amazon Linux 2: <code>resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64</code></p></li>
337    /// <li>
338    /// <p>Amazon Linux 2023 (recommended): <code>resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64</code></p></li>
339    /// <li>
340    /// <p>Ubuntu 18.04: <code>resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64</code></p></li>
341    /// <li>
342    /// <p>Ubuntu 22.04: <code>resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64</code></p></li>
343    /// </ul>
344    pub fn get_image_id(&self) -> &::std::option::Option<::std::string::String> {
345        &self.image_id
346    }
347    /// <p>The number of minutes until the running instance is shut down after the environment has last been used.</p>
348    pub fn automatic_stop_time_minutes(mut self, input: i32) -> Self {
349        self.automatic_stop_time_minutes = ::std::option::Option::Some(input);
350        self
351    }
352    /// <p>The number of minutes until the running instance is shut down after the environment has last been used.</p>
353    pub fn set_automatic_stop_time_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
354        self.automatic_stop_time_minutes = input;
355        self
356    }
357    /// <p>The number of minutes until the running instance is shut down after the environment has last been used.</p>
358    pub fn get_automatic_stop_time_minutes(&self) -> &::std::option::Option<i32> {
359        &self.automatic_stop_time_minutes
360    }
361    /// <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>
362    pub fn owner_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
363        self.owner_arn = ::std::option::Option::Some(input.into());
364        self
365    }
366    /// <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>
367    pub fn set_owner_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
368        self.owner_arn = input;
369        self
370    }
371    /// <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>
372    pub fn get_owner_arn(&self) -> &::std::option::Option<::std::string::String> {
373        &self.owner_arn
374    }
375    /// Appends an item to `tags`.
376    ///
377    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
378    ///
379    /// <p>An array of key-value pairs that will be associated with the new Cloud9 development environment.</p>
380    pub fn tags(mut self, input: crate::types::Tag) -> Self {
381        let mut v = self.tags.unwrap_or_default();
382        v.push(input);
383        self.tags = ::std::option::Option::Some(v);
384        self
385    }
386    /// <p>An array of key-value pairs that will be associated with the new Cloud9 development environment.</p>
387    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
388        self.tags = input;
389        self
390    }
391    /// <p>An array of key-value pairs that will be associated with the new Cloud9 development environment.</p>
392    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
393        &self.tags
394    }
395    /// <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>
396    /// <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>
397    pub fn connection_type(mut self, input: crate::types::ConnectionType) -> Self {
398        self.connection_type = ::std::option::Option::Some(input);
399        self
400    }
401    /// <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>
402    /// <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>
403    pub fn set_connection_type(mut self, input: ::std::option::Option<crate::types::ConnectionType>) -> Self {
404        self.connection_type = input;
405        self
406    }
407    /// <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>
408    /// <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>
409    pub fn get_connection_type(&self) -> &::std::option::Option<crate::types::ConnectionType> {
410        &self.connection_type
411    }
412    /// <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>
413    pub fn dry_run(mut self, input: bool) -> Self {
414        self.dry_run = ::std::option::Option::Some(input);
415        self
416    }
417    /// <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>
418    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
419        self.dry_run = input;
420        self
421    }
422    /// <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>
423    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
424        &self.dry_run
425    }
426    /// Consumes the builder and constructs a [`CreateEnvironmentEc2Input`](crate::operation::create_environment_ec2::CreateEnvironmentEc2Input).
427    pub fn build(
428        self,
429    ) -> ::std::result::Result<crate::operation::create_environment_ec2::CreateEnvironmentEc2Input, ::aws_smithy_types::error::operation::BuildError>
430    {
431        ::std::result::Result::Ok(crate::operation::create_environment_ec2::CreateEnvironmentEc2Input {
432            name: self.name,
433            description: self.description,
434            client_request_token: self.client_request_token,
435            instance_type: self.instance_type,
436            subnet_id: self.subnet_id,
437            image_id: self.image_id,
438            automatic_stop_time_minutes: self.automatic_stop_time_minutes,
439            owner_arn: self.owner_arn,
440            tags: self.tags,
441            connection_type: self.connection_type,
442            dry_run: self.dry_run,
443        })
444    }
445}
446impl ::std::fmt::Debug for CreateEnvironmentEc2InputBuilder {
447    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
448        let mut formatter = f.debug_struct("CreateEnvironmentEc2InputBuilder");
449        formatter.field("name", &self.name);
450        formatter.field("description", &"*** Sensitive Data Redacted ***");
451        formatter.field("client_request_token", &self.client_request_token);
452        formatter.field("instance_type", &self.instance_type);
453        formatter.field("subnet_id", &self.subnet_id);
454        formatter.field("image_id", &self.image_id);
455        formatter.field("automatic_stop_time_minutes", &self.automatic_stop_time_minutes);
456        formatter.field("owner_arn", &self.owner_arn);
457        formatter.field("tags", &"*** Sensitive Data Redacted ***");
458        formatter.field("connection_type", &self.connection_type);
459        formatter.field("dry_run", &self.dry_run);
460        formatter.finish()
461    }
462}