aws_sdk_opsworkscm/operation/create_server/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_server::_create_server_output::CreateServerOutputBuilder;
3
4pub use crate::operation::create_server::_create_server_input::CreateServerInputBuilder;
5
6impl crate::operation::create_server::builders::CreateServerInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::create_server::CreateServerOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_server::CreateServerError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_server();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateServer`.
24///
25/// <p>Creates and immedately starts a new server. The server is ready to use when it is in the <code>HEALTHY</code> state. By default, you can create a maximum of 10 servers.</p>
26/// <p>This operation is asynchronous.</p>
27/// <p>A <code>LimitExceededException</code> is thrown when you have created the maximum number of servers (10). A <code>ResourceAlreadyExistsException</code> is thrown when a server with the same name already exists in the account. A <code>ResourceNotFoundException</code> is thrown when you specify a backup ID that is not valid or is for a backup that does not exist. A <code>ValidationException</code> is thrown when parameters of the request are not valid.</p>
28/// <p>If you do not specify a security group by adding the <code>SecurityGroupIds</code> parameter, OpsWorks creates a new security group.</p>
29/// <p><i>Chef Automate:</i> The default security group opens the Chef server to the world on TCP port 443. If a KeyName is present, OpsWorks enables SSH access. SSH is also open to the world on TCP port 22.</p>
30/// <p><i>Puppet Enterprise:</i> The default security group opens TCP ports 22, 443, 4433, 8140, 8142, 8143, and 8170. If a KeyName is present, OpsWorks enables SSH access. SSH is also open to the world on TCP port 22.</p>
31/// <p>By default, your server is accessible from any IP address. We recommend that you update your security group rules to allow access from known IP addresses and address ranges only. To edit security group rules, open Security Groups in the navigation pane of the EC2 management console.</p>
32/// <p>To specify your own domain for a server, and provide your own self-signed or CA-signed certificate and private key, specify values for <code>CustomDomain</code>, <code>CustomCertificate</code>, and <code>CustomPrivateKey</code>.</p>
33#[derive(::std::clone::Clone, ::std::fmt::Debug)]
34pub struct CreateServerFluentBuilder {
35 handle: ::std::sync::Arc<crate::client::Handle>,
36 inner: crate::operation::create_server::builders::CreateServerInputBuilder,
37 config_override: ::std::option::Option<crate::config::Builder>,
38}
39impl
40 crate::client::customize::internal::CustomizableSend<
41 crate::operation::create_server::CreateServerOutput,
42 crate::operation::create_server::CreateServerError,
43 > for CreateServerFluentBuilder
44{
45 fn send(
46 self,
47 config_override: crate::config::Builder,
48 ) -> crate::client::customize::internal::BoxFuture<
49 crate::client::customize::internal::SendResult<
50 crate::operation::create_server::CreateServerOutput,
51 crate::operation::create_server::CreateServerError,
52 >,
53 > {
54 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
55 }
56}
57impl CreateServerFluentBuilder {
58 /// Creates a new `CreateServerFluentBuilder`.
59 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
60 Self {
61 handle,
62 inner: ::std::default::Default::default(),
63 config_override: ::std::option::Option::None,
64 }
65 }
66 /// Access the CreateServer as a reference.
67 pub fn as_input(&self) -> &crate::operation::create_server::builders::CreateServerInputBuilder {
68 &self.inner
69 }
70 /// Sends the request and returns the response.
71 ///
72 /// If an error occurs, an `SdkError` will be returned with additional details that
73 /// can be matched against.
74 ///
75 /// By default, any retryable failures will be retried twice. Retry behavior
76 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
77 /// set when configuring the client.
78 pub async fn send(
79 self,
80 ) -> ::std::result::Result<
81 crate::operation::create_server::CreateServerOutput,
82 ::aws_smithy_runtime_api::client::result::SdkError<
83 crate::operation::create_server::CreateServerError,
84 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
85 >,
86 > {
87 let input = self
88 .inner
89 .build()
90 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
91 let runtime_plugins = crate::operation::create_server::CreateServer::operation_runtime_plugins(
92 self.handle.runtime_plugins.clone(),
93 &self.handle.conf,
94 self.config_override,
95 );
96 crate::operation::create_server::CreateServer::orchestrate(&runtime_plugins, input).await
97 }
98
99 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
100 pub fn customize(
101 self,
102 ) -> crate::client::customize::CustomizableOperation<
103 crate::operation::create_server::CreateServerOutput,
104 crate::operation::create_server::CreateServerError,
105 Self,
106 > {
107 crate::client::customize::CustomizableOperation::new(self)
108 }
109 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
110 self.set_config_override(::std::option::Option::Some(config_override.into()));
111 self
112 }
113
114 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
115 self.config_override = config_override;
116 self
117 }
118 /// <p>Associate a public IP address with a server that you are launching. Valid values are <code>true</code> or <code>false</code>. The default value is <code>true</code>.</p>
119 pub fn associate_public_ip_address(mut self, input: bool) -> Self {
120 self.inner = self.inner.associate_public_ip_address(input);
121 self
122 }
123 /// <p>Associate a public IP address with a server that you are launching. Valid values are <code>true</code> or <code>false</code>. The default value is <code>true</code>.</p>
124 pub fn set_associate_public_ip_address(mut self, input: ::std::option::Option<bool>) -> Self {
125 self.inner = self.inner.set_associate_public_ip_address(input);
126 self
127 }
128 /// <p>Associate a public IP address with a server that you are launching. Valid values are <code>true</code> or <code>false</code>. The default value is <code>true</code>.</p>
129 pub fn get_associate_public_ip_address(&self) -> &::std::option::Option<bool> {
130 self.inner.get_associate_public_ip_address()
131 }
132 /// <p>An optional public endpoint of a server, such as <code>https://aws.my-company.com</code>. To access the server, create a CNAME DNS record in your preferred DNS service that points the custom domain to the endpoint that is generated when the server is created (the value of the CreateServer Endpoint attribute). You cannot access the server by using the generated <code>Endpoint</code> value if the server is using a custom domain. If you specify a custom domain, you must also specify values for <code>CustomCertificate</code> and <code>CustomPrivateKey</code>.</p>
133 pub fn custom_domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134 self.inner = self.inner.custom_domain(input.into());
135 self
136 }
137 /// <p>An optional public endpoint of a server, such as <code>https://aws.my-company.com</code>. To access the server, create a CNAME DNS record in your preferred DNS service that points the custom domain to the endpoint that is generated when the server is created (the value of the CreateServer Endpoint attribute). You cannot access the server by using the generated <code>Endpoint</code> value if the server is using a custom domain. If you specify a custom domain, you must also specify values for <code>CustomCertificate</code> and <code>CustomPrivateKey</code>.</p>
138 pub fn set_custom_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139 self.inner = self.inner.set_custom_domain(input);
140 self
141 }
142 /// <p>An optional public endpoint of a server, such as <code>https://aws.my-company.com</code>. To access the server, create a CNAME DNS record in your preferred DNS service that points the custom domain to the endpoint that is generated when the server is created (the value of the CreateServer Endpoint attribute). You cannot access the server by using the generated <code>Endpoint</code> value if the server is using a custom domain. If you specify a custom domain, you must also specify values for <code>CustomCertificate</code> and <code>CustomPrivateKey</code>.</p>
143 pub fn get_custom_domain(&self) -> &::std::option::Option<::std::string::String> {
144 self.inner.get_custom_domain()
145 }
146 /// <p>A PEM-formatted HTTPS certificate. The value can be be a single, self-signed certificate, or a certificate chain. If you specify a custom certificate, you must also specify values for <code>CustomDomain</code> and <code>CustomPrivateKey</code>. The following are requirements for the <code>CustomCertificate</code> value:</p>
147 /// <ul>
148 /// <li>
149 /// <p>You can provide either a self-signed, custom certificate, or the full certificate chain.</p></li>
150 /// <li>
151 /// <p>The certificate must be a valid X509 certificate, or a certificate chain in PEM format.</p></li>
152 /// <li>
153 /// <p>The certificate must be valid at the time of upload. A certificate can't be used before its validity period begins (the certificate's <code>NotBefore</code> date), or after it expires (the certificate's <code>NotAfter</code> date).</p></li>
154 /// <li>
155 /// <p>The certificate’s common name or subject alternative names (SANs), if present, must match the value of <code>CustomDomain</code>.</p></li>
156 /// <li>
157 /// <p>The certificate must match the value of <code>CustomPrivateKey</code>.</p></li>
158 /// </ul>
159 pub fn custom_certificate(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160 self.inner = self.inner.custom_certificate(input.into());
161 self
162 }
163 /// <p>A PEM-formatted HTTPS certificate. The value can be be a single, self-signed certificate, or a certificate chain. If you specify a custom certificate, you must also specify values for <code>CustomDomain</code> and <code>CustomPrivateKey</code>. The following are requirements for the <code>CustomCertificate</code> value:</p>
164 /// <ul>
165 /// <li>
166 /// <p>You can provide either a self-signed, custom certificate, or the full certificate chain.</p></li>
167 /// <li>
168 /// <p>The certificate must be a valid X509 certificate, or a certificate chain in PEM format.</p></li>
169 /// <li>
170 /// <p>The certificate must be valid at the time of upload. A certificate can't be used before its validity period begins (the certificate's <code>NotBefore</code> date), or after it expires (the certificate's <code>NotAfter</code> date).</p></li>
171 /// <li>
172 /// <p>The certificate’s common name or subject alternative names (SANs), if present, must match the value of <code>CustomDomain</code>.</p></li>
173 /// <li>
174 /// <p>The certificate must match the value of <code>CustomPrivateKey</code>.</p></li>
175 /// </ul>
176 pub fn set_custom_certificate(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177 self.inner = self.inner.set_custom_certificate(input);
178 self
179 }
180 /// <p>A PEM-formatted HTTPS certificate. The value can be be a single, self-signed certificate, or a certificate chain. If you specify a custom certificate, you must also specify values for <code>CustomDomain</code> and <code>CustomPrivateKey</code>. The following are requirements for the <code>CustomCertificate</code> value:</p>
181 /// <ul>
182 /// <li>
183 /// <p>You can provide either a self-signed, custom certificate, or the full certificate chain.</p></li>
184 /// <li>
185 /// <p>The certificate must be a valid X509 certificate, or a certificate chain in PEM format.</p></li>
186 /// <li>
187 /// <p>The certificate must be valid at the time of upload. A certificate can't be used before its validity period begins (the certificate's <code>NotBefore</code> date), or after it expires (the certificate's <code>NotAfter</code> date).</p></li>
188 /// <li>
189 /// <p>The certificate’s common name or subject alternative names (SANs), if present, must match the value of <code>CustomDomain</code>.</p></li>
190 /// <li>
191 /// <p>The certificate must match the value of <code>CustomPrivateKey</code>.</p></li>
192 /// </ul>
193 pub fn get_custom_certificate(&self) -> &::std::option::Option<::std::string::String> {
194 self.inner.get_custom_certificate()
195 }
196 /// <p>A private key in PEM format for connecting to the server by using HTTPS. The private key must not be encrypted; it cannot be protected by a password or passphrase. If you specify a custom private key, you must also specify values for <code>CustomDomain</code> and <code>CustomCertificate</code>.</p>
197 pub fn custom_private_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
198 self.inner = self.inner.custom_private_key(input.into());
199 self
200 }
201 /// <p>A private key in PEM format for connecting to the server by using HTTPS. The private key must not be encrypted; it cannot be protected by a password or passphrase. If you specify a custom private key, you must also specify values for <code>CustomDomain</code> and <code>CustomCertificate</code>.</p>
202 pub fn set_custom_private_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
203 self.inner = self.inner.set_custom_private_key(input);
204 self
205 }
206 /// <p>A private key in PEM format for connecting to the server by using HTTPS. The private key must not be encrypted; it cannot be protected by a password or passphrase. If you specify a custom private key, you must also specify values for <code>CustomDomain</code> and <code>CustomCertificate</code>.</p>
207 pub fn get_custom_private_key(&self) -> &::std::option::Option<::std::string::String> {
208 self.inner.get_custom_private_key()
209 }
210 /// <p>Enable or disable scheduled backups. Valid values are <code>true</code> or <code>false</code>. The default value is <code>true</code>.</p>
211 pub fn disable_automated_backup(mut self, input: bool) -> Self {
212 self.inner = self.inner.disable_automated_backup(input);
213 self
214 }
215 /// <p>Enable or disable scheduled backups. Valid values are <code>true</code> or <code>false</code>. The default value is <code>true</code>.</p>
216 pub fn set_disable_automated_backup(mut self, input: ::std::option::Option<bool>) -> Self {
217 self.inner = self.inner.set_disable_automated_backup(input);
218 self
219 }
220 /// <p>Enable or disable scheduled backups. Valid values are <code>true</code> or <code>false</code>. The default value is <code>true</code>.</p>
221 pub fn get_disable_automated_backup(&self) -> &::std::option::Option<bool> {
222 self.inner.get_disable_automated_backup()
223 }
224 /// <p>The configuration management engine to use. Valid values include <code>ChefAutomate</code> and <code>Puppet</code>.</p>
225 pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
226 self.inner = self.inner.engine(input.into());
227 self
228 }
229 /// <p>The configuration management engine to use. Valid values include <code>ChefAutomate</code> and <code>Puppet</code>.</p>
230 pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
231 self.inner = self.inner.set_engine(input);
232 self
233 }
234 /// <p>The configuration management engine to use. Valid values include <code>ChefAutomate</code> and <code>Puppet</code>.</p>
235 pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
236 self.inner.get_engine()
237 }
238 /// <p>The engine model of the server. Valid values in this release include <code>Monolithic</code> for Puppet and <code>Single</code> for Chef.</p>
239 pub fn engine_model(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
240 self.inner = self.inner.engine_model(input.into());
241 self
242 }
243 /// <p>The engine model of the server. Valid values in this release include <code>Monolithic</code> for Puppet and <code>Single</code> for Chef.</p>
244 pub fn set_engine_model(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
245 self.inner = self.inner.set_engine_model(input);
246 self
247 }
248 /// <p>The engine model of the server. Valid values in this release include <code>Monolithic</code> for Puppet and <code>Single</code> for Chef.</p>
249 pub fn get_engine_model(&self) -> &::std::option::Option<::std::string::String> {
250 self.inner.get_engine_model()
251 }
252 /// <p>The major release version of the engine that you want to use. For a Chef server, the valid value for EngineVersion is currently <code>2</code>. For a Puppet server, valid values are <code>2019</code> or <code>2017</code>.</p>
253 pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
254 self.inner = self.inner.engine_version(input.into());
255 self
256 }
257 /// <p>The major release version of the engine that you want to use. For a Chef server, the valid value for EngineVersion is currently <code>2</code>. For a Puppet server, valid values are <code>2019</code> or <code>2017</code>.</p>
258 pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
259 self.inner = self.inner.set_engine_version(input);
260 self
261 }
262 /// <p>The major release version of the engine that you want to use. For a Chef server, the valid value for EngineVersion is currently <code>2</code>. For a Puppet server, valid values are <code>2019</code> or <code>2017</code>.</p>
263 pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
264 self.inner.get_engine_version()
265 }
266 ///
267 /// Appends an item to `EngineAttributes`.
268 ///
269 /// To override the contents of this collection use [`set_engine_attributes`](Self::set_engine_attributes).
270 ///
271 /// <p>Optional engine attributes on a specified server.</p>
272 /// <p class="title"><b>Attributes accepted in a Chef createServer request:</b></p>
273 /// <ul>
274 /// <li>
275 /// <p><code>CHEF_AUTOMATE_PIVOTAL_KEY</code>: A base64-encoded RSA public key. The corresponding private key is required to access the Chef API. When no CHEF_AUTOMATE_PIVOTAL_KEY is set, a private key is generated and returned in the response.</p></li>
276 /// <li>
277 /// <p><code>CHEF_AUTOMATE_ADMIN_PASSWORD</code>: The password for the administrative user in the Chef Automate web-based dashboard. The password length is a minimum of eight characters, and a maximum of 32. The password can contain letters, numbers, and special characters (!/@#$%^&+=_). The password must contain at least one lower case letter, one upper case letter, one number, and one special character. When no CHEF_AUTOMATE_ADMIN_PASSWORD is set, one is generated and returned in the response.</p></li>
278 /// </ul>
279 /// <p class="title"><b>Attributes accepted in a Puppet createServer request:</b></p>
280 /// <ul>
281 /// <li>
282 /// <p><code>PUPPET_ADMIN_PASSWORD</code>: To work with the Puppet Enterprise console, a password must use ASCII characters.</p></li>
283 /// <li>
284 /// <p><code>PUPPET_R10K_REMOTE</code>: The r10k remote is the URL of your control repository (for example, ssh://git@your.git-repo.com:user/control-repo.git). Specifying an r10k remote opens TCP port 8170.</p></li>
285 /// <li>
286 /// <p><code>PUPPET_R10K_PRIVATE_KEY</code>: If you are using a private Git repository, add PUPPET_R10K_PRIVATE_KEY to specify a PEM-encoded private SSH key.</p></li>
287 /// </ul>
288 pub fn engine_attributes(mut self, input: crate::types::EngineAttribute) -> Self {
289 self.inner = self.inner.engine_attributes(input);
290 self
291 }
292 /// <p>Optional engine attributes on a specified server.</p>
293 /// <p class="title"><b>Attributes accepted in a Chef createServer request:</b></p>
294 /// <ul>
295 /// <li>
296 /// <p><code>CHEF_AUTOMATE_PIVOTAL_KEY</code>: A base64-encoded RSA public key. The corresponding private key is required to access the Chef API. When no CHEF_AUTOMATE_PIVOTAL_KEY is set, a private key is generated and returned in the response.</p></li>
297 /// <li>
298 /// <p><code>CHEF_AUTOMATE_ADMIN_PASSWORD</code>: The password for the administrative user in the Chef Automate web-based dashboard. The password length is a minimum of eight characters, and a maximum of 32. The password can contain letters, numbers, and special characters (!/@#$%^&+=_). The password must contain at least one lower case letter, one upper case letter, one number, and one special character. When no CHEF_AUTOMATE_ADMIN_PASSWORD is set, one is generated and returned in the response.</p></li>
299 /// </ul>
300 /// <p class="title"><b>Attributes accepted in a Puppet createServer request:</b></p>
301 /// <ul>
302 /// <li>
303 /// <p><code>PUPPET_ADMIN_PASSWORD</code>: To work with the Puppet Enterprise console, a password must use ASCII characters.</p></li>
304 /// <li>
305 /// <p><code>PUPPET_R10K_REMOTE</code>: The r10k remote is the URL of your control repository (for example, ssh://git@your.git-repo.com:user/control-repo.git). Specifying an r10k remote opens TCP port 8170.</p></li>
306 /// <li>
307 /// <p><code>PUPPET_R10K_PRIVATE_KEY</code>: If you are using a private Git repository, add PUPPET_R10K_PRIVATE_KEY to specify a PEM-encoded private SSH key.</p></li>
308 /// </ul>
309 pub fn set_engine_attributes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EngineAttribute>>) -> Self {
310 self.inner = self.inner.set_engine_attributes(input);
311 self
312 }
313 /// <p>Optional engine attributes on a specified server.</p>
314 /// <p class="title"><b>Attributes accepted in a Chef createServer request:</b></p>
315 /// <ul>
316 /// <li>
317 /// <p><code>CHEF_AUTOMATE_PIVOTAL_KEY</code>: A base64-encoded RSA public key. The corresponding private key is required to access the Chef API. When no CHEF_AUTOMATE_PIVOTAL_KEY is set, a private key is generated and returned in the response.</p></li>
318 /// <li>
319 /// <p><code>CHEF_AUTOMATE_ADMIN_PASSWORD</code>: The password for the administrative user in the Chef Automate web-based dashboard. The password length is a minimum of eight characters, and a maximum of 32. The password can contain letters, numbers, and special characters (!/@#$%^&+=_). The password must contain at least one lower case letter, one upper case letter, one number, and one special character. When no CHEF_AUTOMATE_ADMIN_PASSWORD is set, one is generated and returned in the response.</p></li>
320 /// </ul>
321 /// <p class="title"><b>Attributes accepted in a Puppet createServer request:</b></p>
322 /// <ul>
323 /// <li>
324 /// <p><code>PUPPET_ADMIN_PASSWORD</code>: To work with the Puppet Enterprise console, a password must use ASCII characters.</p></li>
325 /// <li>
326 /// <p><code>PUPPET_R10K_REMOTE</code>: The r10k remote is the URL of your control repository (for example, ssh://git@your.git-repo.com:user/control-repo.git). Specifying an r10k remote opens TCP port 8170.</p></li>
327 /// <li>
328 /// <p><code>PUPPET_R10K_PRIVATE_KEY</code>: If you are using a private Git repository, add PUPPET_R10K_PRIVATE_KEY to specify a PEM-encoded private SSH key.</p></li>
329 /// </ul>
330 pub fn get_engine_attributes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EngineAttribute>> {
331 self.inner.get_engine_attributes()
332 }
333 /// <p>The number of automated backups that you want to keep. Whenever a new backup is created, OpsWorks CM deletes the oldest backups if this number is exceeded. The default value is <code>1</code>.</p>
334 pub fn backup_retention_count(mut self, input: i32) -> Self {
335 self.inner = self.inner.backup_retention_count(input);
336 self
337 }
338 /// <p>The number of automated backups that you want to keep. Whenever a new backup is created, OpsWorks CM deletes the oldest backups if this number is exceeded. The default value is <code>1</code>.</p>
339 pub fn set_backup_retention_count(mut self, input: ::std::option::Option<i32>) -> Self {
340 self.inner = self.inner.set_backup_retention_count(input);
341 self
342 }
343 /// <p>The number of automated backups that you want to keep. Whenever a new backup is created, OpsWorks CM deletes the oldest backups if this number is exceeded. The default value is <code>1</code>.</p>
344 pub fn get_backup_retention_count(&self) -> &::std::option::Option<i32> {
345 self.inner.get_backup_retention_count()
346 }
347 /// <p>The name of the server. The server name must be unique within your Amazon Web Services account, within each region. Server names must start with a letter; then letters, numbers, or hyphens (-) are allowed, up to a maximum of 40 characters.</p>
348 pub fn server_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
349 self.inner = self.inner.server_name(input.into());
350 self
351 }
352 /// <p>The name of the server. The server name must be unique within your Amazon Web Services account, within each region. Server names must start with a letter; then letters, numbers, or hyphens (-) are allowed, up to a maximum of 40 characters.</p>
353 pub fn set_server_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
354 self.inner = self.inner.set_server_name(input);
355 self
356 }
357 /// <p>The name of the server. The server name must be unique within your Amazon Web Services account, within each region. Server names must start with a letter; then letters, numbers, or hyphens (-) are allowed, up to a maximum of 40 characters.</p>
358 pub fn get_server_name(&self) -> &::std::option::Option<::std::string::String> {
359 self.inner.get_server_name()
360 }
361 /// <p>The ARN of the instance profile that your Amazon EC2 instances use. The OpsWorks console typically creates the instance profile for you</p>
362 pub fn instance_profile_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
363 self.inner = self.inner.instance_profile_arn(input.into());
364 self
365 }
366 /// <p>The ARN of the instance profile that your Amazon EC2 instances use. The OpsWorks console typically creates the instance profile for you</p>
367 pub fn set_instance_profile_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
368 self.inner = self.inner.set_instance_profile_arn(input);
369 self
370 }
371 /// <p>The ARN of the instance profile that your Amazon EC2 instances use. The OpsWorks console typically creates the instance profile for you</p>
372 pub fn get_instance_profile_arn(&self) -> &::std::option::Option<::std::string::String> {
373 self.inner.get_instance_profile_arn()
374 }
375 /// <p>The Amazon EC2 instance type to use. For example, <code>m5.large</code>.</p>
376 pub fn instance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
377 self.inner = self.inner.instance_type(input.into());
378 self
379 }
380 /// <p>The Amazon EC2 instance type to use. For example, <code>m5.large</code>.</p>
381 pub fn set_instance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
382 self.inner = self.inner.set_instance_type(input);
383 self
384 }
385 /// <p>The Amazon EC2 instance type to use. For example, <code>m5.large</code>.</p>
386 pub fn get_instance_type(&self) -> &::std::option::Option<::std::string::String> {
387 self.inner.get_instance_type()
388 }
389 /// <p>The Amazon EC2 key pair to set for the instance. This parameter is optional; if desired, you may specify this parameter to connect to your instances by using SSH.</p>
390 pub fn key_pair(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
391 self.inner = self.inner.key_pair(input.into());
392 self
393 }
394 /// <p>The Amazon EC2 key pair to set for the instance. This parameter is optional; if desired, you may specify this parameter to connect to your instances by using SSH.</p>
395 pub fn set_key_pair(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
396 self.inner = self.inner.set_key_pair(input);
397 self
398 }
399 /// <p>The Amazon EC2 key pair to set for the instance. This parameter is optional; if desired, you may specify this parameter to connect to your instances by using SSH.</p>
400 pub fn get_key_pair(&self) -> &::std::option::Option<::std::string::String> {
401 self.inner.get_key_pair()
402 }
403 /// <p>The start time for a one-hour period each week during which OpsWorks CM performs maintenance on the instance. Valid values must be specified in the following format: <code>DDD:HH:MM</code>. <code>MM</code> must be specified as <code>00</code>. The specified time is in coordinated universal time (UTC). The default value is a random one-hour period on Tuesday, Wednesday, or Friday. See <code>TimeWindowDefinition</code> for more information.</p>
404 /// <p><b>Example:</b> <code>Mon:08:00</code>, which represents a start time of every Monday at 08:00 UTC. (8:00 a.m.)</p>
405 pub fn preferred_maintenance_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
406 self.inner = self.inner.preferred_maintenance_window(input.into());
407 self
408 }
409 /// <p>The start time for a one-hour period each week during which OpsWorks CM performs maintenance on the instance. Valid values must be specified in the following format: <code>DDD:HH:MM</code>. <code>MM</code> must be specified as <code>00</code>. The specified time is in coordinated universal time (UTC). The default value is a random one-hour period on Tuesday, Wednesday, or Friday. See <code>TimeWindowDefinition</code> for more information.</p>
410 /// <p><b>Example:</b> <code>Mon:08:00</code>, which represents a start time of every Monday at 08:00 UTC. (8:00 a.m.)</p>
411 pub fn set_preferred_maintenance_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
412 self.inner = self.inner.set_preferred_maintenance_window(input);
413 self
414 }
415 /// <p>The start time for a one-hour period each week during which OpsWorks CM performs maintenance on the instance. Valid values must be specified in the following format: <code>DDD:HH:MM</code>. <code>MM</code> must be specified as <code>00</code>. The specified time is in coordinated universal time (UTC). The default value is a random one-hour period on Tuesday, Wednesday, or Friday. See <code>TimeWindowDefinition</code> for more information.</p>
416 /// <p><b>Example:</b> <code>Mon:08:00</code>, which represents a start time of every Monday at 08:00 UTC. (8:00 a.m.)</p>
417 pub fn get_preferred_maintenance_window(&self) -> &::std::option::Option<::std::string::String> {
418 self.inner.get_preferred_maintenance_window()
419 }
420 /// <p>The start time for a one-hour period during which OpsWorks CM backs up application-level data on your server if automated backups are enabled. Valid values must be specified in one of the following formats:</p>
421 /// <ul>
422 /// <li>
423 /// <p><code>HH:MM</code> for daily backups</p></li>
424 /// <li>
425 /// <p><code>DDD:HH:MM</code> for weekly backups</p></li>
426 /// </ul>
427 /// <p><code>MM</code> must be specified as <code>00</code>. The specified time is in coordinated universal time (UTC). The default value is a random, daily start time.</p>
428 /// <p><b>Example:</b> <code>08:00</code>, which represents a daily start time of 08:00 UTC.</p>
429 /// <p><b>Example:</b> <code>Mon:08:00</code>, which represents a start time of every Monday at 08:00 UTC. (8:00 a.m.)</p>
430 pub fn preferred_backup_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
431 self.inner = self.inner.preferred_backup_window(input.into());
432 self
433 }
434 /// <p>The start time for a one-hour period during which OpsWorks CM backs up application-level data on your server if automated backups are enabled. Valid values must be specified in one of the following formats:</p>
435 /// <ul>
436 /// <li>
437 /// <p><code>HH:MM</code> for daily backups</p></li>
438 /// <li>
439 /// <p><code>DDD:HH:MM</code> for weekly backups</p></li>
440 /// </ul>
441 /// <p><code>MM</code> must be specified as <code>00</code>. The specified time is in coordinated universal time (UTC). The default value is a random, daily start time.</p>
442 /// <p><b>Example:</b> <code>08:00</code>, which represents a daily start time of 08:00 UTC.</p>
443 /// <p><b>Example:</b> <code>Mon:08:00</code>, which represents a start time of every Monday at 08:00 UTC. (8:00 a.m.)</p>
444 pub fn set_preferred_backup_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
445 self.inner = self.inner.set_preferred_backup_window(input);
446 self
447 }
448 /// <p>The start time for a one-hour period during which OpsWorks CM backs up application-level data on your server if automated backups are enabled. Valid values must be specified in one of the following formats:</p>
449 /// <ul>
450 /// <li>
451 /// <p><code>HH:MM</code> for daily backups</p></li>
452 /// <li>
453 /// <p><code>DDD:HH:MM</code> for weekly backups</p></li>
454 /// </ul>
455 /// <p><code>MM</code> must be specified as <code>00</code>. The specified time is in coordinated universal time (UTC). The default value is a random, daily start time.</p>
456 /// <p><b>Example:</b> <code>08:00</code>, which represents a daily start time of 08:00 UTC.</p>
457 /// <p><b>Example:</b> <code>Mon:08:00</code>, which represents a start time of every Monday at 08:00 UTC. (8:00 a.m.)</p>
458 pub fn get_preferred_backup_window(&self) -> &::std::option::Option<::std::string::String> {
459 self.inner.get_preferred_backup_window()
460 }
461 ///
462 /// Appends an item to `SecurityGroupIds`.
463 ///
464 /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
465 ///
466 /// <p>A list of security group IDs to attach to the Amazon EC2 instance. If you add this parameter, the specified security groups must be within the VPC that is specified by <code>SubnetIds</code>.</p>
467 /// <p>If you do not specify this parameter, OpsWorks CM creates one new security group that uses TCP ports 22 and 443, open to 0.0.0.0/0 (everyone).</p>
468 pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
469 self.inner = self.inner.security_group_ids(input.into());
470 self
471 }
472 /// <p>A list of security group IDs to attach to the Amazon EC2 instance. If you add this parameter, the specified security groups must be within the VPC that is specified by <code>SubnetIds</code>.</p>
473 /// <p>If you do not specify this parameter, OpsWorks CM creates one new security group that uses TCP ports 22 and 443, open to 0.0.0.0/0 (everyone).</p>
474 pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
475 self.inner = self.inner.set_security_group_ids(input);
476 self
477 }
478 /// <p>A list of security group IDs to attach to the Amazon EC2 instance. If you add this parameter, the specified security groups must be within the VPC that is specified by <code>SubnetIds</code>.</p>
479 /// <p>If you do not specify this parameter, OpsWorks CM creates one new security group that uses TCP ports 22 and 443, open to 0.0.0.0/0 (everyone).</p>
480 pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
481 self.inner.get_security_group_ids()
482 }
483 /// <p>The service role that the OpsWorks CM service backend uses to work with your account.</p>
484 pub fn service_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
485 self.inner = self.inner.service_role_arn(input.into());
486 self
487 }
488 /// <p>The service role that the OpsWorks CM service backend uses to work with your account.</p>
489 pub fn set_service_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
490 self.inner = self.inner.set_service_role_arn(input);
491 self
492 }
493 /// <p>The service role that the OpsWorks CM service backend uses to work with your account.</p>
494 pub fn get_service_role_arn(&self) -> &::std::option::Option<::std::string::String> {
495 self.inner.get_service_role_arn()
496 }
497 ///
498 /// Appends an item to `SubnetIds`.
499 ///
500 /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
501 ///
502 /// <p>The IDs of subnets in which to launch the server EC2 instance.</p>
503 /// <p>Amazon EC2-Classic customers: This field is required. All servers must run within a VPC. The VPC must have "Auto Assign Public IP" enabled.</p>
504 /// <p>EC2-VPC customers: This field is optional. If you do not specify subnet IDs, your EC2 instances are created in a default subnet that is selected by Amazon EC2. If you specify subnet IDs, the VPC must have "Auto Assign Public IP" enabled.</p>
505 /// <p>For more information about supported Amazon EC2 platforms, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html">Supported Platforms</a>.</p>
506 pub fn subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
507 self.inner = self.inner.subnet_ids(input.into());
508 self
509 }
510 /// <p>The IDs of subnets in which to launch the server EC2 instance.</p>
511 /// <p>Amazon EC2-Classic customers: This field is required. All servers must run within a VPC. The VPC must have "Auto Assign Public IP" enabled.</p>
512 /// <p>EC2-VPC customers: This field is optional. If you do not specify subnet IDs, your EC2 instances are created in a default subnet that is selected by Amazon EC2. If you specify subnet IDs, the VPC must have "Auto Assign Public IP" enabled.</p>
513 /// <p>For more information about supported Amazon EC2 platforms, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html">Supported Platforms</a>.</p>
514 pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
515 self.inner = self.inner.set_subnet_ids(input);
516 self
517 }
518 /// <p>The IDs of subnets in which to launch the server EC2 instance.</p>
519 /// <p>Amazon EC2-Classic customers: This field is required. All servers must run within a VPC. The VPC must have "Auto Assign Public IP" enabled.</p>
520 /// <p>EC2-VPC customers: This field is optional. If you do not specify subnet IDs, your EC2 instances are created in a default subnet that is selected by Amazon EC2. If you specify subnet IDs, the VPC must have "Auto Assign Public IP" enabled.</p>
521 /// <p>For more information about supported Amazon EC2 platforms, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html">Supported Platforms</a>.</p>
522 pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
523 self.inner.get_subnet_ids()
524 }
525 ///
526 /// Appends an item to `Tags`.
527 ///
528 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
529 ///
530 /// <p>A map that contains tag keys and tag values to attach to an OpsWorks for Chef Automate or OpsWorks for Puppet Enterprise server.</p>
531 /// <ul>
532 /// <li>
533 /// <p>The key cannot be empty.</p></li>
534 /// <li>
535 /// <p>The key can be a maximum of 127 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters: <code>+ - = . _ : / @</code></p></li>
536 /// <li>
537 /// <p>The value can be a maximum 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters: <code>+ - = . _ : / @</code></p></li>
538 /// <li>
539 /// <p>Leading and trailing spaces are trimmed from both the key and value.</p></li>
540 /// <li>
541 /// <p>A maximum of 50 user-applied tags is allowed for any OpsWorks CM server.</p></li>
542 /// </ul>
543 pub fn tags(mut self, input: crate::types::Tag) -> Self {
544 self.inner = self.inner.tags(input);
545 self
546 }
547 /// <p>A map that contains tag keys and tag values to attach to an OpsWorks for Chef Automate or OpsWorks for Puppet Enterprise server.</p>
548 /// <ul>
549 /// <li>
550 /// <p>The key cannot be empty.</p></li>
551 /// <li>
552 /// <p>The key can be a maximum of 127 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters: <code>+ - = . _ : / @</code></p></li>
553 /// <li>
554 /// <p>The value can be a maximum 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters: <code>+ - = . _ : / @</code></p></li>
555 /// <li>
556 /// <p>Leading and trailing spaces are trimmed from both the key and value.</p></li>
557 /// <li>
558 /// <p>A maximum of 50 user-applied tags is allowed for any OpsWorks CM server.</p></li>
559 /// </ul>
560 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
561 self.inner = self.inner.set_tags(input);
562 self
563 }
564 /// <p>A map that contains tag keys and tag values to attach to an OpsWorks for Chef Automate or OpsWorks for Puppet Enterprise server.</p>
565 /// <ul>
566 /// <li>
567 /// <p>The key cannot be empty.</p></li>
568 /// <li>
569 /// <p>The key can be a maximum of 127 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters: <code>+ - = . _ : / @</code></p></li>
570 /// <li>
571 /// <p>The value can be a maximum 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters: <code>+ - = . _ : / @</code></p></li>
572 /// <li>
573 /// <p>Leading and trailing spaces are trimmed from both the key and value.</p></li>
574 /// <li>
575 /// <p>A maximum of 50 user-applied tags is allowed for any OpsWorks CM server.</p></li>
576 /// </ul>
577 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
578 self.inner.get_tags()
579 }
580 /// <p>If you specify this field, OpsWorks CM creates the server by using the backup represented by BackupId.</p>
581 pub fn backup_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
582 self.inner = self.inner.backup_id(input.into());
583 self
584 }
585 /// <p>If you specify this field, OpsWorks CM creates the server by using the backup represented by BackupId.</p>
586 pub fn set_backup_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
587 self.inner = self.inner.set_backup_id(input);
588 self
589 }
590 /// <p>If you specify this field, OpsWorks CM creates the server by using the backup represented by BackupId.</p>
591 pub fn get_backup_id(&self) -> &::std::option::Option<::std::string::String> {
592 self.inner.get_backup_id()
593 }
594}