aws_sdk_timestreaminfluxdb/operation/create_db_instance/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_db_instance::_create_db_instance_output::CreateDbInstanceOutputBuilder;
3
4pub use crate::operation::create_db_instance::_create_db_instance_input::CreateDbInstanceInputBuilder;
5
6impl crate::operation::create_db_instance::builders::CreateDbInstanceInputBuilder {
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_db_instance::CreateDbInstanceOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_db_instance::CreateDbInstanceError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_db_instance();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateDbInstance`.
24///
25/// <p>Creates a new Timestream for InfluxDB DB instance.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateDbInstanceFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_db_instance::builders::CreateDbInstanceInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::create_db_instance::CreateDbInstanceOutput,
35        crate::operation::create_db_instance::CreateDbInstanceError,
36    > for CreateDbInstanceFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::create_db_instance::CreateDbInstanceOutput,
44            crate::operation::create_db_instance::CreateDbInstanceError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CreateDbInstanceFluentBuilder {
51    /// Creates a new `CreateDbInstanceFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the CreateDbInstance as a reference.
60    pub fn as_input(&self) -> &crate::operation::create_db_instance::builders::CreateDbInstanceInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::create_db_instance::CreateDbInstanceOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::create_db_instance::CreateDbInstanceError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::create_db_instance::CreateDbInstance::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::create_db_instance::CreateDbInstance::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::create_db_instance::CreateDbInstanceOutput,
97        crate::operation::create_db_instance::CreateDbInstanceError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// <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>
112    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.name(input.into());
114        self
115    }
116    /// <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>
117    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_name(input);
119        self
120    }
121    /// <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>
122    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_name()
124    }
125    /// <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>
126    pub fn username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.username(input.into());
128        self
129    }
130    /// <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>
131    pub fn set_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_username(input);
133        self
134    }
135    /// <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>
136    pub fn get_username(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_username()
138    }
139    /// <p>The password of the initial admin user created in InfluxDB v2. 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 Secrets Manager in your account.</p>
140    pub fn password(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.password(input.into());
142        self
143    }
144    /// <p>The password of the initial admin user created in InfluxDB v2. 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 Secrets Manager in your account.</p>
145    pub fn set_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_password(input);
147        self
148    }
149    /// <p>The password of the initial admin user created in InfluxDB v2. 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 Secrets Manager in your account.</p>
150    pub fn get_password(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_password()
152    }
153    /// <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>
154    pub fn organization(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.inner = self.inner.organization(input.into());
156        self
157    }
158    /// <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>
159    pub fn set_organization(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160        self.inner = self.inner.set_organization(input);
161        self
162    }
163    /// <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>
164    pub fn get_organization(&self) -> &::std::option::Option<::std::string::String> {
165        self.inner.get_organization()
166    }
167    /// <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>
168    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
169        self.inner = self.inner.bucket(input.into());
170        self
171    }
172    /// <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>
173    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
174        self.inner = self.inner.set_bucket(input);
175        self
176    }
177    /// <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>
178    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
179        self.inner.get_bucket()
180    }
181    /// <p>The Timestream for InfluxDB DB instance type to run InfluxDB on.</p>
182    pub fn db_instance_type(mut self, input: crate::types::DbInstanceType) -> Self {
183        self.inner = self.inner.db_instance_type(input);
184        self
185    }
186    /// <p>The Timestream for InfluxDB DB instance type to run InfluxDB on.</p>
187    pub fn set_db_instance_type(mut self, input: ::std::option::Option<crate::types::DbInstanceType>) -> Self {
188        self.inner = self.inner.set_db_instance_type(input);
189        self
190    }
191    /// <p>The Timestream for InfluxDB DB instance type to run InfluxDB on.</p>
192    pub fn get_db_instance_type(&self) -> &::std::option::Option<crate::types::DbInstanceType> {
193        self.inner.get_db_instance_type()
194    }
195    ///
196    /// Appends an item to `vpcSubnetIds`.
197    ///
198    /// To override the contents of this collection use [`set_vpc_subnet_ids`](Self::set_vpc_subnet_ids).
199    ///
200    /// <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>
201    pub fn vpc_subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
202        self.inner = self.inner.vpc_subnet_ids(input.into());
203        self
204    }
205    /// <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>
206    pub fn set_vpc_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
207        self.inner = self.inner.set_vpc_subnet_ids(input);
208        self
209    }
210    /// <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>
211    pub fn get_vpc_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
212        self.inner.get_vpc_subnet_ids()
213    }
214    ///
215    /// Appends an item to `vpcSecurityGroupIds`.
216    ///
217    /// To override the contents of this collection use [`set_vpc_security_group_ids`](Self::set_vpc_security_group_ids).
218    ///
219    /// <p>A list of VPC security group IDs to associate with the DB instance.</p>
220    pub fn vpc_security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
221        self.inner = self.inner.vpc_security_group_ids(input.into());
222        self
223    }
224    /// <p>A list of VPC security group IDs to associate with the DB instance.</p>
225    pub fn set_vpc_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
226        self.inner = self.inner.set_vpc_security_group_ids(input);
227        self
228    }
229    /// <p>A list of VPC security group IDs to associate with the DB instance.</p>
230    pub fn get_vpc_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
231        self.inner.get_vpc_security_group_ids()
232    }
233    /// <p>Configures the DB instance with a public IP to facilitate access.</p>
234    pub fn publicly_accessible(mut self, input: bool) -> Self {
235        self.inner = self.inner.publicly_accessible(input);
236        self
237    }
238    /// <p>Configures the DB instance with a public IP to facilitate access.</p>
239    pub fn set_publicly_accessible(mut self, input: ::std::option::Option<bool>) -> Self {
240        self.inner = self.inner.set_publicly_accessible(input);
241        self
242    }
243    /// <p>Configures the DB instance with a public IP to facilitate access.</p>
244    pub fn get_publicly_accessible(&self) -> &::std::option::Option<bool> {
245        self.inner.get_publicly_accessible()
246    }
247    /// <p>The Timestream for InfluxDB DB storage type to read and write InfluxDB data.</p>
248    /// <p>You can choose between 3 different types of provisioned Influx IOPS included storage according to your workloads requirements:</p>
249    /// <ul>
250    /// <li>
251    /// <p>Influx IO Included 3000 IOPS</p></li>
252    /// <li>
253    /// <p>Influx IO Included 12000 IOPS</p></li>
254    /// <li>
255    /// <p>Influx IO Included 16000 IOPS</p></li>
256    /// </ul>
257    pub fn db_storage_type(mut self, input: crate::types::DbStorageType) -> Self {
258        self.inner = self.inner.db_storage_type(input);
259        self
260    }
261    /// <p>The Timestream for InfluxDB DB storage type to read and write InfluxDB data.</p>
262    /// <p>You can choose between 3 different types of provisioned Influx IOPS included storage according to your workloads requirements:</p>
263    /// <ul>
264    /// <li>
265    /// <p>Influx IO Included 3000 IOPS</p></li>
266    /// <li>
267    /// <p>Influx IO Included 12000 IOPS</p></li>
268    /// <li>
269    /// <p>Influx IO Included 16000 IOPS</p></li>
270    /// </ul>
271    pub fn set_db_storage_type(mut self, input: ::std::option::Option<crate::types::DbStorageType>) -> Self {
272        self.inner = self.inner.set_db_storage_type(input);
273        self
274    }
275    /// <p>The Timestream for InfluxDB DB storage type to read and write InfluxDB data.</p>
276    /// <p>You can choose between 3 different types of provisioned Influx IOPS included storage according to your workloads requirements:</p>
277    /// <ul>
278    /// <li>
279    /// <p>Influx IO Included 3000 IOPS</p></li>
280    /// <li>
281    /// <p>Influx IO Included 12000 IOPS</p></li>
282    /// <li>
283    /// <p>Influx IO Included 16000 IOPS</p></li>
284    /// </ul>
285    pub fn get_db_storage_type(&self) -> &::std::option::Option<crate::types::DbStorageType> {
286        self.inner.get_db_storage_type()
287    }
288    /// <p>The amount of storage to allocate for your DB storage type in GiB (gibibytes).</p>
289    pub fn allocated_storage(mut self, input: i32) -> Self {
290        self.inner = self.inner.allocated_storage(input);
291        self
292    }
293    /// <p>The amount of storage to allocate for your DB storage type in GiB (gibibytes).</p>
294    pub fn set_allocated_storage(mut self, input: ::std::option::Option<i32>) -> Self {
295        self.inner = self.inner.set_allocated_storage(input);
296        self
297    }
298    /// <p>The amount of storage to allocate for your DB storage type in GiB (gibibytes).</p>
299    pub fn get_allocated_storage(&self) -> &::std::option::Option<i32> {
300        self.inner.get_allocated_storage()
301    }
302    /// <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>
303    pub fn db_parameter_group_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
304        self.inner = self.inner.db_parameter_group_identifier(input.into());
305        self
306    }
307    /// <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>
308    pub fn set_db_parameter_group_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
309        self.inner = self.inner.set_db_parameter_group_identifier(input);
310        self
311    }
312    /// <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>
313    pub fn get_db_parameter_group_identifier(&self) -> &::std::option::Option<::std::string::String> {
314        self.inner.get_db_parameter_group_identifier()
315    }
316    /// <p>Specifies whether the DB instance will be deployed as a standalone instance or with a Multi-AZ standby for high availability.</p>
317    pub fn deployment_type(mut self, input: crate::types::DeploymentType) -> Self {
318        self.inner = self.inner.deployment_type(input);
319        self
320    }
321    /// <p>Specifies whether the DB instance will be deployed as a standalone instance or with a Multi-AZ standby for high availability.</p>
322    pub fn set_deployment_type(mut self, input: ::std::option::Option<crate::types::DeploymentType>) -> Self {
323        self.inner = self.inner.set_deployment_type(input);
324        self
325    }
326    /// <p>Specifies whether the DB instance will be deployed as a standalone instance or with a Multi-AZ standby for high availability.</p>
327    pub fn get_deployment_type(&self) -> &::std::option::Option<crate::types::DeploymentType> {
328        self.inner.get_deployment_type()
329    }
330    /// <p>Configuration for sending InfluxDB engine logs to a specified S3 bucket.</p>
331    pub fn log_delivery_configuration(mut self, input: crate::types::LogDeliveryConfiguration) -> Self {
332        self.inner = self.inner.log_delivery_configuration(input);
333        self
334    }
335    /// <p>Configuration for sending InfluxDB engine logs to a specified S3 bucket.</p>
336    pub fn set_log_delivery_configuration(mut self, input: ::std::option::Option<crate::types::LogDeliveryConfiguration>) -> Self {
337        self.inner = self.inner.set_log_delivery_configuration(input);
338        self
339    }
340    /// <p>Configuration for sending InfluxDB engine logs to a specified S3 bucket.</p>
341    pub fn get_log_delivery_configuration(&self) -> &::std::option::Option<crate::types::LogDeliveryConfiguration> {
342        self.inner.get_log_delivery_configuration()
343    }
344    ///
345    /// Adds a key-value pair to `tags`.
346    ///
347    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
348    ///
349    /// <p>A list of key-value pairs to associate with the DB instance.</p>
350    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
351        self.inner = self.inner.tags(k.into(), v.into());
352        self
353    }
354    /// <p>A list of key-value pairs to associate with the DB instance.</p>
355    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
356        self.inner = self.inner.set_tags(input);
357        self
358    }
359    /// <p>A list of key-value pairs to associate with the DB instance.</p>
360    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
361        self.inner.get_tags()
362    }
363    /// <p>The port number on which InfluxDB accepts connections.</p>
364    /// <p>Valid Values: 1024-65535</p>
365    /// <p>Default: 8086</p>
366    /// <p>Constraints: The value can't be 2375-2376, 7788-7799, 8090, or 51678-51680</p>
367    pub fn port(mut self, input: i32) -> Self {
368        self.inner = self.inner.port(input);
369        self
370    }
371    /// <p>The port number on which InfluxDB accepts connections.</p>
372    /// <p>Valid Values: 1024-65535</p>
373    /// <p>Default: 8086</p>
374    /// <p>Constraints: The value can't be 2375-2376, 7788-7799, 8090, or 51678-51680</p>
375    pub fn set_port(mut self, input: ::std::option::Option<i32>) -> Self {
376        self.inner = self.inner.set_port(input);
377        self
378    }
379    /// <p>The port number on which InfluxDB accepts connections.</p>
380    /// <p>Valid Values: 1024-65535</p>
381    /// <p>Default: 8086</p>
382    /// <p>Constraints: The value can't be 2375-2376, 7788-7799, 8090, or 51678-51680</p>
383    pub fn get_port(&self) -> &::std::option::Option<i32> {
384        self.inner.get_port()
385    }
386    /// <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>
387    pub fn network_type(mut self, input: crate::types::NetworkType) -> Self {
388        self.inner = self.inner.network_type(input);
389        self
390    }
391    /// <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>
392    pub fn set_network_type(mut self, input: ::std::option::Option<crate::types::NetworkType>) -> Self {
393        self.inner = self.inner.set_network_type(input);
394        self
395    }
396    /// <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>
397    pub fn get_network_type(&self) -> &::std::option::Option<crate::types::NetworkType> {
398        self.inner.get_network_type()
399    }
400}