aws_sdk_timestreaminfluxdb/operation/create_db_instance/
builders.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::create_db_instance::_create_db_instance_output::CreateDbInstanceOutputBuilder;

pub use crate::operation::create_db_instance::_create_db_instance_input::CreateDbInstanceInputBuilder;

impl crate::operation::create_db_instance::builders::CreateDbInstanceInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::create_db_instance::CreateDbInstanceOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_db_instance::CreateDbInstanceError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.create_db_instance();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `CreateDbInstance`.
///
/// <p>Creates a new Timestream for InfluxDB DB instance.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateDbInstanceFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::create_db_instance::builders::CreateDbInstanceInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::create_db_instance::CreateDbInstanceOutput,
        crate::operation::create_db_instance::CreateDbInstanceError,
    > for CreateDbInstanceFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::create_db_instance::CreateDbInstanceOutput,
            crate::operation::create_db_instance::CreateDbInstanceError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl CreateDbInstanceFluentBuilder {
    /// Creates a new `CreateDbInstanceFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the CreateDbInstance as a reference.
    pub fn as_input(&self) -> &crate::operation::create_db_instance::builders::CreateDbInstanceInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_db_instance::CreateDbInstanceOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_db_instance::CreateDbInstanceError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::create_db_instance::CreateDbInstance::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::create_db_instance::CreateDbInstance::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::create_db_instance::CreateDbInstanceOutput,
        crate::operation::create_db_instance::CreateDbInstanceError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>The name that uniquely identifies the DB instance when interacting with the Amazon Timestream for InfluxDB API and CLI commands. This name will also be a prefix included in the endpoint. DB instance names must be unique per customer and per region.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// <p>The name that uniquely identifies the DB instance when interacting with the Amazon Timestream for InfluxDB API and CLI commands. This name will also be a prefix included in the endpoint. DB instance names must be unique per customer and per region.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// <p>The name that uniquely identifies the DB instance when interacting with the Amazon Timestream for InfluxDB API and CLI commands. This name will also be a prefix included in the endpoint. DB instance names must be unique per customer and per region.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    /// <p>The username of the initial admin user created in InfluxDB. Must start with a letter and can't end with a hyphen or contain two consecutive hyphens. For example, my-user1. This username will allow you to access the InfluxDB UI to perform various administrative tasks and also use the InfluxDB CLI to create an operator token. These attributes will be stored in a Secret created in Amazon Secrets Manager in your account.</p>
    pub fn username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.username(input.into());
        self
    }
    /// <p>The username of the initial admin user created in InfluxDB. Must start with a letter and can't end with a hyphen or contain two consecutive hyphens. For example, my-user1. This username will allow you to access the InfluxDB UI to perform various administrative tasks and also use the InfluxDB CLI to create an operator token. These attributes will be stored in a Secret created in Amazon Secrets Manager in your account.</p>
    pub fn set_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_username(input);
        self
    }
    /// <p>The username of the initial admin user created in InfluxDB. Must start with a letter and can't end with a hyphen or contain two consecutive hyphens. For example, my-user1. This username will allow you to access the InfluxDB UI to perform various administrative tasks and also use the InfluxDB CLI to create an operator token. These attributes will be stored in a Secret created in Amazon Secrets Manager in your account.</p>
    pub fn get_username(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_username()
    }
    /// <p>The password of the initial admin user created in InfluxDB. This password will allow you to access the InfluxDB UI to perform various administrative tasks and also use the InfluxDB CLI to create an operator token. These attributes will be stored in a Secret created in Amazon Web Services SecretManager in your account.</p>
    pub fn password(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.password(input.into());
        self
    }
    /// <p>The password of the initial admin user created in InfluxDB. This password will allow you to access the InfluxDB UI to perform various administrative tasks and also use the InfluxDB CLI to create an operator token. These attributes will be stored in a Secret created in Amazon Web Services SecretManager in your account.</p>
    pub fn set_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_password(input);
        self
    }
    /// <p>The password of the initial admin user created in InfluxDB. This password will allow you to access the InfluxDB UI to perform various administrative tasks and also use the InfluxDB CLI to create an operator token. These attributes will be stored in a Secret created in Amazon Web Services SecretManager in your account.</p>
    pub fn get_password(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_password()
    }
    /// <p>The name of the initial organization for the initial admin user in InfluxDB. An InfluxDB organization is a workspace for a group of users.</p>
    pub fn organization(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.organization(input.into());
        self
    }
    /// <p>The name of the initial organization for the initial admin user in InfluxDB. An InfluxDB organization is a workspace for a group of users.</p>
    pub fn set_organization(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_organization(input);
        self
    }
    /// <p>The name of the initial organization for the initial admin user in InfluxDB. An InfluxDB organization is a workspace for a group of users.</p>
    pub fn get_organization(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_organization()
    }
    /// <p>The name of the initial InfluxDB bucket. All InfluxDB data is stored in a bucket. A bucket combines the concept of a database and a retention period (the duration of time that each data point persists). A bucket belongs to an organization.</p>
    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.bucket(input.into());
        self
    }
    /// <p>The name of the initial InfluxDB bucket. All InfluxDB data is stored in a bucket. A bucket combines the concept of a database and a retention period (the duration of time that each data point persists). A bucket belongs to an organization.</p>
    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_bucket(input);
        self
    }
    /// <p>The name of the initial InfluxDB bucket. All InfluxDB data is stored in a bucket. A bucket combines the concept of a database and a retention period (the duration of time that each data point persists). A bucket belongs to an organization.</p>
    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_bucket()
    }
    /// <p>The Timestream for InfluxDB DB instance type to run InfluxDB on.</p>
    pub fn db_instance_type(mut self, input: crate::types::DbInstanceType) -> Self {
        self.inner = self.inner.db_instance_type(input);
        self
    }
    /// <p>The Timestream for InfluxDB DB instance type to run InfluxDB on.</p>
    pub fn set_db_instance_type(mut self, input: ::std::option::Option<crate::types::DbInstanceType>) -> Self {
        self.inner = self.inner.set_db_instance_type(input);
        self
    }
    /// <p>The Timestream for InfluxDB DB instance type to run InfluxDB on.</p>
    pub fn get_db_instance_type(&self) -> &::std::option::Option<crate::types::DbInstanceType> {
        self.inner.get_db_instance_type()
    }
    ///
    /// Appends an item to `vpcSubnetIds`.
    ///
    /// To override the contents of this collection use [`set_vpc_subnet_ids`](Self::set_vpc_subnet_ids).
    ///
    /// <p>A list of VPC subnet IDs to associate with the DB instance. Provide at least two VPC subnet IDs in different availability zones when deploying with a Multi-AZ standby.</p>
    pub fn vpc_subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.vpc_subnet_ids(input.into());
        self
    }
    /// <p>A list of VPC subnet IDs to associate with the DB instance. Provide at least two VPC subnet IDs in different availability zones when deploying with a Multi-AZ standby.</p>
    pub fn set_vpc_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.inner = self.inner.set_vpc_subnet_ids(input);
        self
    }
    /// <p>A list of VPC subnet IDs to associate with the DB instance. Provide at least two VPC subnet IDs in different availability zones when deploying with a Multi-AZ standby.</p>
    pub fn get_vpc_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        self.inner.get_vpc_subnet_ids()
    }
    ///
    /// Appends an item to `vpcSecurityGroupIds`.
    ///
    /// To override the contents of this collection use [`set_vpc_security_group_ids`](Self::set_vpc_security_group_ids).
    ///
    /// <p>A list of VPC security group IDs to associate with the DB instance.</p>
    pub fn vpc_security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.vpc_security_group_ids(input.into());
        self
    }
    /// <p>A list of VPC security group IDs to associate with the DB instance.</p>
    pub fn set_vpc_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.inner = self.inner.set_vpc_security_group_ids(input);
        self
    }
    /// <p>A list of VPC security group IDs to associate with the DB instance.</p>
    pub fn get_vpc_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        self.inner.get_vpc_security_group_ids()
    }
    /// <p>Configures the DB instance with a public IP to facilitate access.</p>
    pub fn publicly_accessible(mut self, input: bool) -> Self {
        self.inner = self.inner.publicly_accessible(input);
        self
    }
    /// <p>Configures the DB instance with a public IP to facilitate access.</p>
    pub fn set_publicly_accessible(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_publicly_accessible(input);
        self
    }
    /// <p>Configures the DB instance with a public IP to facilitate access.</p>
    pub fn get_publicly_accessible(&self) -> &::std::option::Option<bool> {
        self.inner.get_publicly_accessible()
    }
    /// <p>The Timestream for InfluxDB DB storage type to read and write InfluxDB data.</p>
    /// <p>You can choose between 3 different types of provisioned Influx IOPS included storage according to your workloads requirements:</p>
    /// <ul>
    /// <li>
    /// <p>Influx IO Included 3000 IOPS</p></li>
    /// <li>
    /// <p>Influx IO Included 12000 IOPS</p></li>
    /// <li>
    /// <p>Influx IO Included 16000 IOPS</p></li>
    /// </ul>
    pub fn db_storage_type(mut self, input: crate::types::DbStorageType) -> Self {
        self.inner = self.inner.db_storage_type(input);
        self
    }
    /// <p>The Timestream for InfluxDB DB storage type to read and write InfluxDB data.</p>
    /// <p>You can choose between 3 different types of provisioned Influx IOPS included storage according to your workloads requirements:</p>
    /// <ul>
    /// <li>
    /// <p>Influx IO Included 3000 IOPS</p></li>
    /// <li>
    /// <p>Influx IO Included 12000 IOPS</p></li>
    /// <li>
    /// <p>Influx IO Included 16000 IOPS</p></li>
    /// </ul>
    pub fn set_db_storage_type(mut self, input: ::std::option::Option<crate::types::DbStorageType>) -> Self {
        self.inner = self.inner.set_db_storage_type(input);
        self
    }
    /// <p>The Timestream for InfluxDB DB storage type to read and write InfluxDB data.</p>
    /// <p>You can choose between 3 different types of provisioned Influx IOPS included storage according to your workloads requirements:</p>
    /// <ul>
    /// <li>
    /// <p>Influx IO Included 3000 IOPS</p></li>
    /// <li>
    /// <p>Influx IO Included 12000 IOPS</p></li>
    /// <li>
    /// <p>Influx IO Included 16000 IOPS</p></li>
    /// </ul>
    pub fn get_db_storage_type(&self) -> &::std::option::Option<crate::types::DbStorageType> {
        self.inner.get_db_storage_type()
    }
    /// <p>The amount of storage to allocate for your DB storage type in GiB (gibibytes).</p>
    pub fn allocated_storage(mut self, input: i32) -> Self {
        self.inner = self.inner.allocated_storage(input);
        self
    }
    /// <p>The amount of storage to allocate for your DB storage type in GiB (gibibytes).</p>
    pub fn set_allocated_storage(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_allocated_storage(input);
        self
    }
    /// <p>The amount of storage to allocate for your DB storage type in GiB (gibibytes).</p>
    pub fn get_allocated_storage(&self) -> &::std::option::Option<i32> {
        self.inner.get_allocated_storage()
    }
    /// <p>The id of the DB parameter group to assign to your DB instance. DB parameter groups specify how the database is configured. For example, DB parameter groups can specify the limit for query concurrency.</p>
    pub fn db_parameter_group_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.db_parameter_group_identifier(input.into());
        self
    }
    /// <p>The id of the DB parameter group to assign to your DB instance. DB parameter groups specify how the database is configured. For example, DB parameter groups can specify the limit for query concurrency.</p>
    pub fn set_db_parameter_group_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_db_parameter_group_identifier(input);
        self
    }
    /// <p>The id of the DB parameter group to assign to your DB instance. DB parameter groups specify how the database is configured. For example, DB parameter groups can specify the limit for query concurrency.</p>
    pub fn get_db_parameter_group_identifier(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_db_parameter_group_identifier()
    }
    /// <p>Specifies whether the DB instance will be deployed as a standalone instance or with a Multi-AZ standby for high availability.</p>
    pub fn deployment_type(mut self, input: crate::types::DeploymentType) -> Self {
        self.inner = self.inner.deployment_type(input);
        self
    }
    /// <p>Specifies whether the DB instance will be deployed as a standalone instance or with a Multi-AZ standby for high availability.</p>
    pub fn set_deployment_type(mut self, input: ::std::option::Option<crate::types::DeploymentType>) -> Self {
        self.inner = self.inner.set_deployment_type(input);
        self
    }
    /// <p>Specifies whether the DB instance will be deployed as a standalone instance or with a Multi-AZ standby for high availability.</p>
    pub fn get_deployment_type(&self) -> &::std::option::Option<crate::types::DeploymentType> {
        self.inner.get_deployment_type()
    }
    /// <p>Configuration for sending InfluxDB engine logs to a specified S3 bucket.</p>
    pub fn log_delivery_configuration(mut self, input: crate::types::LogDeliveryConfiguration) -> Self {
        self.inner = self.inner.log_delivery_configuration(input);
        self
    }
    /// <p>Configuration for sending InfluxDB engine logs to a specified S3 bucket.</p>
    pub fn set_log_delivery_configuration(mut self, input: ::std::option::Option<crate::types::LogDeliveryConfiguration>) -> Self {
        self.inner = self.inner.set_log_delivery_configuration(input);
        self
    }
    /// <p>Configuration for sending InfluxDB engine logs to a specified S3 bucket.</p>
    pub fn get_log_delivery_configuration(&self) -> &::std::option::Option<crate::types::LogDeliveryConfiguration> {
        self.inner.get_log_delivery_configuration()
    }
    ///
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A list of key-value pairs to associate with the DB instance.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.tags(k.into(), v.into());
        self
    }
    /// <p>A list of key-value pairs to associate with the DB instance.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.inner = self.inner.set_tags(input);
        self
    }
    /// <p>A list of key-value pairs to associate with the DB instance.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.inner.get_tags()
    }
    /// <p>The port number on which InfluxDB accepts connections.</p>
    /// <p>Valid Values: 1024-65535</p>
    /// <p>Default: 8086</p>
    /// <p>Constraints: The value can't be 2375-2376, 7788-7799, 8090, or 51678-51680</p>
    pub fn port(mut self, input: i32) -> Self {
        self.inner = self.inner.port(input);
        self
    }
    /// <p>The port number on which InfluxDB accepts connections.</p>
    /// <p>Valid Values: 1024-65535</p>
    /// <p>Default: 8086</p>
    /// <p>Constraints: The value can't be 2375-2376, 7788-7799, 8090, or 51678-51680</p>
    pub fn set_port(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_port(input);
        self
    }
    /// <p>The port number on which InfluxDB accepts connections.</p>
    /// <p>Valid Values: 1024-65535</p>
    /// <p>Default: 8086</p>
    /// <p>Constraints: The value can't be 2375-2376, 7788-7799, 8090, or 51678-51680</p>
    pub fn get_port(&self) -> &::std::option::Option<i32> {
        self.inner.get_port()
    }
    /// <p>Specifies whether the networkType of the Timestream for InfluxDB instance is IPV4, which can communicate over IPv4 protocol only, or DUAL, which can communicate over both IPv4 and IPv6 protocols.</p>
    pub fn network_type(mut self, input: crate::types::NetworkType) -> Self {
        self.inner = self.inner.network_type(input);
        self
    }
    /// <p>Specifies whether the networkType of the Timestream for InfluxDB instance is IPV4, which can communicate over IPv4 protocol only, or DUAL, which can communicate over both IPv4 and IPv6 protocols.</p>
    pub fn set_network_type(mut self, input: ::std::option::Option<crate::types::NetworkType>) -> Self {
        self.inner = self.inner.set_network_type(input);
        self
    }
    /// <p>Specifies whether the networkType of the Timestream for InfluxDB instance is IPV4, which can communicate over IPv4 protocol only, or DUAL, which can communicate over both IPv4 and IPv6 protocols.</p>
    pub fn get_network_type(&self) -> &::std::option::Option<crate::types::NetworkType> {
        self.inner.get_network_type()
    }
}