aws_sdk_timestreaminfluxdb/operation/create_db_cluster/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_db_cluster::_create_db_cluster_output::CreateDbClusterOutputBuilder;
3
4pub use crate::operation::create_db_cluster::_create_db_cluster_input::CreateDbClusterInputBuilder;
5
6impl crate::operation::create_db_cluster::builders::CreateDbClusterInputBuilder {
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_cluster::CreateDbClusterOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_db_cluster::CreateDbClusterError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_db_cluster();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateDbCluster`.
24///
25/// <p>Creates a new Timestream for InfluxDB cluster.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateDbClusterFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_db_cluster::builders::CreateDbClusterInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::create_db_cluster::CreateDbClusterOutput,
35        crate::operation::create_db_cluster::CreateDbClusterError,
36    > for CreateDbClusterFluentBuilder
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_cluster::CreateDbClusterOutput,
44            crate::operation::create_db_cluster::CreateDbClusterError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CreateDbClusterFluentBuilder {
51    /// Creates a new `CreateDbClusterFluentBuilder`.
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 CreateDbCluster as a reference.
60    pub fn as_input(&self) -> &crate::operation::create_db_cluster::builders::CreateDbClusterInputBuilder {
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_cluster::CreateDbClusterOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::create_db_cluster::CreateDbClusterError,
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_cluster::CreateDbCluster::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::create_db_cluster::CreateDbCluster::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_cluster::CreateDbClusterOutput,
97        crate::operation::create_db_cluster::CreateDbClusterError,
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 cluster when interacting with the Amazon Timestream for InfluxDB API and CLI commands. This name will also be a prefix included in the endpoint. DB cluster 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 cluster when interacting with the Amazon Timestream for InfluxDB API and CLI commands. This name will also be a prefix included in the endpoint. DB cluster 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 cluster when interacting with the Amazon Timestream for InfluxDB API and CLI commands. This name will also be a prefix included in the endpoint. DB cluster 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 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 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 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. 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. 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. 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 port number on which InfluxDB accepts connections.</p>
182    /// <p>Valid Values: 1024-65535</p>
183    /// <p>Default: 8086 for InfluxDB v2, 8181 for InfluxDB v3</p>
184    /// <p>Constraints: The value can't be 2375-2376, 7788-7799, 8090, or 51678-51680</p>
185    pub fn port(mut self, input: i32) -> Self {
186        self.inner = self.inner.port(input);
187        self
188    }
189    /// <p>The port number on which InfluxDB accepts connections.</p>
190    /// <p>Valid Values: 1024-65535</p>
191    /// <p>Default: 8086 for InfluxDB v2, 8181 for InfluxDB v3</p>
192    /// <p>Constraints: The value can't be 2375-2376, 7788-7799, 8090, or 51678-51680</p>
193    pub fn set_port(mut self, input: ::std::option::Option<i32>) -> Self {
194        self.inner = self.inner.set_port(input);
195        self
196    }
197    /// <p>The port number on which InfluxDB accepts connections.</p>
198    /// <p>Valid Values: 1024-65535</p>
199    /// <p>Default: 8086 for InfluxDB v2, 8181 for InfluxDB v3</p>
200    /// <p>Constraints: The value can't be 2375-2376, 7788-7799, 8090, or 51678-51680</p>
201    pub fn get_port(&self) -> &::std::option::Option<i32> {
202        self.inner.get_port()
203    }
204    /// <p>The ID of the DB parameter group to assign to your DB cluster. DB parameter groups specify how the database is configured. For example, DB parameter groups can specify the limit for query concurrency.</p>
205    pub fn db_parameter_group_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
206        self.inner = self.inner.db_parameter_group_identifier(input.into());
207        self
208    }
209    /// <p>The ID of the DB parameter group to assign to your DB cluster. DB parameter groups specify how the database is configured. For example, DB parameter groups can specify the limit for query concurrency.</p>
210    pub fn set_db_parameter_group_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
211        self.inner = self.inner.set_db_parameter_group_identifier(input);
212        self
213    }
214    /// <p>The ID of the DB parameter group to assign to your DB cluster. DB parameter groups specify how the database is configured. For example, DB parameter groups can specify the limit for query concurrency.</p>
215    pub fn get_db_parameter_group_identifier(&self) -> &::std::option::Option<::std::string::String> {
216        self.inner.get_db_parameter_group_identifier()
217    }
218    /// <p>The Timestream for InfluxDB DB instance type to run InfluxDB on.</p>
219    pub fn db_instance_type(mut self, input: crate::types::DbInstanceType) -> Self {
220        self.inner = self.inner.db_instance_type(input);
221        self
222    }
223    /// <p>The Timestream for InfluxDB DB instance type to run InfluxDB on.</p>
224    pub fn set_db_instance_type(mut self, input: ::std::option::Option<crate::types::DbInstanceType>) -> Self {
225        self.inner = self.inner.set_db_instance_type(input);
226        self
227    }
228    /// <p>The Timestream for InfluxDB DB instance type to run InfluxDB on.</p>
229    pub fn get_db_instance_type(&self) -> &::std::option::Option<crate::types::DbInstanceType> {
230        self.inner.get_db_instance_type()
231    }
232    /// <p>The Timestream for InfluxDB DB storage type to read and write InfluxDB data.</p>
233    /// <p>You can choose between three different types of provisioned Influx IOPS Included storage according to your workload requirements:</p>
234    /// <ul>
235    /// <li>
236    /// <p>Influx I/O Included 3000 IOPS</p></li>
237    /// <li>
238    /// <p>Influx I/O Included 12000 IOPS</p></li>
239    /// <li>
240    /// <p>Influx I/O Included 16000 IOPS</p></li>
241    /// </ul>
242    pub fn db_storage_type(mut self, input: crate::types::DbStorageType) -> Self {
243        self.inner = self.inner.db_storage_type(input);
244        self
245    }
246    /// <p>The Timestream for InfluxDB DB storage type to read and write InfluxDB data.</p>
247    /// <p>You can choose between three different types of provisioned Influx IOPS Included storage according to your workload requirements:</p>
248    /// <ul>
249    /// <li>
250    /// <p>Influx I/O Included 3000 IOPS</p></li>
251    /// <li>
252    /// <p>Influx I/O Included 12000 IOPS</p></li>
253    /// <li>
254    /// <p>Influx I/O Included 16000 IOPS</p></li>
255    /// </ul>
256    pub fn set_db_storage_type(mut self, input: ::std::option::Option<crate::types::DbStorageType>) -> Self {
257        self.inner = self.inner.set_db_storage_type(input);
258        self
259    }
260    /// <p>The Timestream for InfluxDB DB storage type to read and write InfluxDB data.</p>
261    /// <p>You can choose between three different types of provisioned Influx IOPS Included storage according to your workload requirements:</p>
262    /// <ul>
263    /// <li>
264    /// <p>Influx I/O Included 3000 IOPS</p></li>
265    /// <li>
266    /// <p>Influx I/O Included 12000 IOPS</p></li>
267    /// <li>
268    /// <p>Influx I/O Included 16000 IOPS</p></li>
269    /// </ul>
270    pub fn get_db_storage_type(&self) -> &::std::option::Option<crate::types::DbStorageType> {
271        self.inner.get_db_storage_type()
272    }
273    /// <p>The amount of storage to allocate for your DB storage type in GiB (gibibytes).</p>
274    pub fn allocated_storage(mut self, input: i32) -> Self {
275        self.inner = self.inner.allocated_storage(input);
276        self
277    }
278    /// <p>The amount of storage to allocate for your DB storage type in GiB (gibibytes).</p>
279    pub fn set_allocated_storage(mut self, input: ::std::option::Option<i32>) -> Self {
280        self.inner = self.inner.set_allocated_storage(input);
281        self
282    }
283    /// <p>The amount of storage to allocate for your DB storage type in GiB (gibibytes).</p>
284    pub fn get_allocated_storage(&self) -> &::std::option::Option<i32> {
285        self.inner.get_allocated_storage()
286    }
287    /// <p>Specifies whether the network type of the Timestream for InfluxDB cluster is IPv4, which can communicate over IPv4 protocol only, or DUAL, which can communicate over both IPv4 and IPv6 protocols.</p>
288    pub fn network_type(mut self, input: crate::types::NetworkType) -> Self {
289        self.inner = self.inner.network_type(input);
290        self
291    }
292    /// <p>Specifies whether the network type of the Timestream for InfluxDB cluster is IPv4, which can communicate over IPv4 protocol only, or DUAL, which can communicate over both IPv4 and IPv6 protocols.</p>
293    pub fn set_network_type(mut self, input: ::std::option::Option<crate::types::NetworkType>) -> Self {
294        self.inner = self.inner.set_network_type(input);
295        self
296    }
297    /// <p>Specifies whether the network type of the Timestream for InfluxDB cluster is IPv4, which can communicate over IPv4 protocol only, or DUAL, which can communicate over both IPv4 and IPv6 protocols.</p>
298    pub fn get_network_type(&self) -> &::std::option::Option<crate::types::NetworkType> {
299        self.inner.get_network_type()
300    }
301    /// <p>Configures the Timestream for InfluxDB cluster with a public IP to facilitate access from outside the VPC.</p>
302    pub fn publicly_accessible(mut self, input: bool) -> Self {
303        self.inner = self.inner.publicly_accessible(input);
304        self
305    }
306    /// <p>Configures the Timestream for InfluxDB cluster with a public IP to facilitate access from outside the VPC.</p>
307    pub fn set_publicly_accessible(mut self, input: ::std::option::Option<bool>) -> Self {
308        self.inner = self.inner.set_publicly_accessible(input);
309        self
310    }
311    /// <p>Configures the Timestream for InfluxDB cluster with a public IP to facilitate access from outside the VPC.</p>
312    pub fn get_publicly_accessible(&self) -> &::std::option::Option<bool> {
313        self.inner.get_publicly_accessible()
314    }
315    ///
316    /// Appends an item to `vpcSubnetIds`.
317    ///
318    /// To override the contents of this collection use [`set_vpc_subnet_ids`](Self::set_vpc_subnet_ids).
319    ///
320    /// <p>A list of VPC subnet IDs to associate with the DB cluster. Provide at least two VPC subnet IDs in different Availability Zones when deploying with a Multi-AZ standby.</p>
321    pub fn vpc_subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
322        self.inner = self.inner.vpc_subnet_ids(input.into());
323        self
324    }
325    /// <p>A list of VPC subnet IDs to associate with the DB cluster. Provide at least two VPC subnet IDs in different Availability Zones when deploying with a Multi-AZ standby.</p>
326    pub fn set_vpc_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
327        self.inner = self.inner.set_vpc_subnet_ids(input);
328        self
329    }
330    /// <p>A list of VPC subnet IDs to associate with the DB cluster. Provide at least two VPC subnet IDs in different Availability Zones when deploying with a Multi-AZ standby.</p>
331    pub fn get_vpc_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
332        self.inner.get_vpc_subnet_ids()
333    }
334    ///
335    /// Appends an item to `vpcSecurityGroupIds`.
336    ///
337    /// To override the contents of this collection use [`set_vpc_security_group_ids`](Self::set_vpc_security_group_ids).
338    ///
339    /// <p>A list of VPC security group IDs to associate with the Timestream for InfluxDB cluster.</p>
340    pub fn vpc_security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
341        self.inner = self.inner.vpc_security_group_ids(input.into());
342        self
343    }
344    /// <p>A list of VPC security group IDs to associate with the Timestream for InfluxDB cluster.</p>
345    pub fn set_vpc_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
346        self.inner = self.inner.set_vpc_security_group_ids(input);
347        self
348    }
349    /// <p>A list of VPC security group IDs to associate with the Timestream for InfluxDB cluster.</p>
350    pub fn get_vpc_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
351        self.inner.get_vpc_security_group_ids()
352    }
353    /// <p>Specifies the type of cluster to create.</p>
354    pub fn deployment_type(mut self, input: crate::types::ClusterDeploymentType) -> Self {
355        self.inner = self.inner.deployment_type(input);
356        self
357    }
358    /// <p>Specifies the type of cluster to create.</p>
359    pub fn set_deployment_type(mut self, input: ::std::option::Option<crate::types::ClusterDeploymentType>) -> Self {
360        self.inner = self.inner.set_deployment_type(input);
361        self
362    }
363    /// <p>Specifies the type of cluster to create.</p>
364    pub fn get_deployment_type(&self) -> &::std::option::Option<crate::types::ClusterDeploymentType> {
365        self.inner.get_deployment_type()
366    }
367    /// <p>Specifies the behavior of failure recovery when the primary node of the cluster fails.</p>
368    pub fn failover_mode(mut self, input: crate::types::FailoverMode) -> Self {
369        self.inner = self.inner.failover_mode(input);
370        self
371    }
372    /// <p>Specifies the behavior of failure recovery when the primary node of the cluster fails.</p>
373    pub fn set_failover_mode(mut self, input: ::std::option::Option<crate::types::FailoverMode>) -> Self {
374        self.inner = self.inner.set_failover_mode(input);
375        self
376    }
377    /// <p>Specifies the behavior of failure recovery when the primary node of the cluster fails.</p>
378    pub fn get_failover_mode(&self) -> &::std::option::Option<crate::types::FailoverMode> {
379        self.inner.get_failover_mode()
380    }
381    /// <p>Configuration for sending InfluxDB engine logs to a specified S3 bucket.</p>
382    pub fn log_delivery_configuration(mut self, input: crate::types::LogDeliveryConfiguration) -> Self {
383        self.inner = self.inner.log_delivery_configuration(input);
384        self
385    }
386    /// <p>Configuration for sending InfluxDB engine logs to a specified S3 bucket.</p>
387    pub fn set_log_delivery_configuration(mut self, input: ::std::option::Option<crate::types::LogDeliveryConfiguration>) -> Self {
388        self.inner = self.inner.set_log_delivery_configuration(input);
389        self
390    }
391    /// <p>Configuration for sending InfluxDB engine logs to a specified S3 bucket.</p>
392    pub fn get_log_delivery_configuration(&self) -> &::std::option::Option<crate::types::LogDeliveryConfiguration> {
393        self.inner.get_log_delivery_configuration()
394    }
395    ///
396    /// Adds a key-value pair to `tags`.
397    ///
398    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
399    ///
400    /// <p>A list of key-value pairs to associate with the DB instance.</p>
401    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
402        self.inner = self.inner.tags(k.into(), v.into());
403        self
404    }
405    /// <p>A list of key-value pairs to associate with the DB instance.</p>
406    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
407        self.inner = self.inner.set_tags(input);
408        self
409    }
410    /// <p>A list of key-value pairs to associate with the DB instance.</p>
411    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
412        self.inner.get_tags()
413    }
414}