aws_sdk_timestreaminfluxdb/operation/update_db_instance/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_db_instance::_update_db_instance_output::UpdateDbInstanceOutputBuilder;
3
4pub use crate::operation::update_db_instance::_update_db_instance_input::UpdateDbInstanceInputBuilder;
5
6impl crate::operation::update_db_instance::builders::UpdateDbInstanceInputBuilder {
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::update_db_instance::UpdateDbInstanceOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_db_instance::UpdateDbInstanceError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_db_instance();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateDbInstance`.
24///
25/// <p>Updates a Timestream for InfluxDB DB instance.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateDbInstanceFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_db_instance::builders::UpdateDbInstanceInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_db_instance::UpdateDbInstanceOutput,
35        crate::operation::update_db_instance::UpdateDbInstanceError,
36    > for UpdateDbInstanceFluentBuilder
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::update_db_instance::UpdateDbInstanceOutput,
44            crate::operation::update_db_instance::UpdateDbInstanceError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateDbInstanceFluentBuilder {
51    /// Creates a new `UpdateDbInstanceFluentBuilder`.
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 UpdateDbInstance as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_db_instance::builders::UpdateDbInstanceInputBuilder {
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::update_db_instance::UpdateDbInstanceOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_db_instance::UpdateDbInstanceError,
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::update_db_instance::UpdateDbInstance::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_db_instance::UpdateDbInstance::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::update_db_instance::UpdateDbInstanceOutput,
97        crate::operation::update_db_instance::UpdateDbInstanceError,
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 id of the DB instance.</p>
112    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.identifier(input.into());
114        self
115    }
116    /// <p>The id of the DB instance.</p>
117    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_identifier(input);
119        self
120    }
121    /// <p>The id of the DB instance.</p>
122    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_identifier()
124    }
125    /// <p>Configuration for sending InfluxDB engine logs to send to specified S3 bucket.</p>
126    pub fn log_delivery_configuration(mut self, input: crate::types::LogDeliveryConfiguration) -> Self {
127        self.inner = self.inner.log_delivery_configuration(input);
128        self
129    }
130    /// <p>Configuration for sending InfluxDB engine logs to send to specified S3 bucket.</p>
131    pub fn set_log_delivery_configuration(mut self, input: ::std::option::Option<crate::types::LogDeliveryConfiguration>) -> Self {
132        self.inner = self.inner.set_log_delivery_configuration(input);
133        self
134    }
135    /// <p>Configuration for sending InfluxDB engine logs to send to specified S3 bucket.</p>
136    pub fn get_log_delivery_configuration(&self) -> &::std::option::Option<crate::types::LogDeliveryConfiguration> {
137        self.inner.get_log_delivery_configuration()
138    }
139    /// <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>
140    pub fn db_parameter_group_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.db_parameter_group_identifier(input.into());
142        self
143    }
144    /// <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>
145    pub fn set_db_parameter_group_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_db_parameter_group_identifier(input);
147        self
148    }
149    /// <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>
150    pub fn get_db_parameter_group_identifier(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_db_parameter_group_identifier()
152    }
153    /// <p>The port number on which InfluxDB accepts connections.</p>
154    /// <p>If you change the Port value, your database restarts immediately.</p>
155    /// <p>Valid Values: 1024-65535</p>
156    /// <p>Default: 8086</p>
157    /// <p>Constraints: The value can't be 2375-2376, 7788-7799, 8090, or 51678-51680</p>
158    pub fn port(mut self, input: i32) -> Self {
159        self.inner = self.inner.port(input);
160        self
161    }
162    /// <p>The port number on which InfluxDB accepts connections.</p>
163    /// <p>If you change the Port value, your database restarts immediately.</p>
164    /// <p>Valid Values: 1024-65535</p>
165    /// <p>Default: 8086</p>
166    /// <p>Constraints: The value can't be 2375-2376, 7788-7799, 8090, or 51678-51680</p>
167    pub fn set_port(mut self, input: ::std::option::Option<i32>) -> Self {
168        self.inner = self.inner.set_port(input);
169        self
170    }
171    /// <p>The port number on which InfluxDB accepts connections.</p>
172    /// <p>If you change the Port value, your database restarts immediately.</p>
173    /// <p>Valid Values: 1024-65535</p>
174    /// <p>Default: 8086</p>
175    /// <p>Constraints: The value can't be 2375-2376, 7788-7799, 8090, or 51678-51680</p>
176    pub fn get_port(&self) -> &::std::option::Option<i32> {
177        self.inner.get_port()
178    }
179    /// <p>The Timestream for InfluxDB DB instance type to run InfluxDB on.</p>
180    pub fn db_instance_type(mut self, input: crate::types::DbInstanceType) -> Self {
181        self.inner = self.inner.db_instance_type(input);
182        self
183    }
184    /// <p>The Timestream for InfluxDB DB instance type to run InfluxDB on.</p>
185    pub fn set_db_instance_type(mut self, input: ::std::option::Option<crate::types::DbInstanceType>) -> Self {
186        self.inner = self.inner.set_db_instance_type(input);
187        self
188    }
189    /// <p>The Timestream for InfluxDB DB instance type to run InfluxDB on.</p>
190    pub fn get_db_instance_type(&self) -> &::std::option::Option<crate::types::DbInstanceType> {
191        self.inner.get_db_instance_type()
192    }
193    /// <p>Specifies whether the DB instance will be deployed as a standalone instance or with a Multi-AZ standby for high availability.</p>
194    pub fn deployment_type(mut self, input: crate::types::DeploymentType) -> Self {
195        self.inner = self.inner.deployment_type(input);
196        self
197    }
198    /// <p>Specifies whether the DB instance will be deployed as a standalone instance or with a Multi-AZ standby for high availability.</p>
199    pub fn set_deployment_type(mut self, input: ::std::option::Option<crate::types::DeploymentType>) -> Self {
200        self.inner = self.inner.set_deployment_type(input);
201        self
202    }
203    /// <p>Specifies whether the DB instance will be deployed as a standalone instance or with a Multi-AZ standby for high availability.</p>
204    pub fn get_deployment_type(&self) -> &::std::option::Option<crate::types::DeploymentType> {
205        self.inner.get_deployment_type()
206    }
207    /// <p>The Timestream for InfluxDB DB storage type that InfluxDB stores data on.</p>
208    pub fn db_storage_type(mut self, input: crate::types::DbStorageType) -> Self {
209        self.inner = self.inner.db_storage_type(input);
210        self
211    }
212    /// <p>The Timestream for InfluxDB DB storage type that InfluxDB stores data on.</p>
213    pub fn set_db_storage_type(mut self, input: ::std::option::Option<crate::types::DbStorageType>) -> Self {
214        self.inner = self.inner.set_db_storage_type(input);
215        self
216    }
217    /// <p>The Timestream for InfluxDB DB storage type that InfluxDB stores data on.</p>
218    pub fn get_db_storage_type(&self) -> &::std::option::Option<crate::types::DbStorageType> {
219        self.inner.get_db_storage_type()
220    }
221    /// <p>The amount of storage to allocate for your DB storage type (in gibibytes).</p>
222    pub fn allocated_storage(mut self, input: i32) -> Self {
223        self.inner = self.inner.allocated_storage(input);
224        self
225    }
226    /// <p>The amount of storage to allocate for your DB storage type (in gibibytes).</p>
227    pub fn set_allocated_storage(mut self, input: ::std::option::Option<i32>) -> Self {
228        self.inner = self.inner.set_allocated_storage(input);
229        self
230    }
231    /// <p>The amount of storage to allocate for your DB storage type (in gibibytes).</p>
232    pub fn get_allocated_storage(&self) -> &::std::option::Option<i32> {
233        self.inner.get_allocated_storage()
234    }
235}