aws_sdk_rds/operation/create_db_cluster_parameter_group/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_db_cluster_parameter_group::_create_db_cluster_parameter_group_output::CreateDbClusterParameterGroupOutputBuilder;
3
4pub use crate::operation::create_db_cluster_parameter_group::_create_db_cluster_parameter_group_input::CreateDbClusterParameterGroupInputBuilder;
5
6impl crate::operation::create_db_cluster_parameter_group::builders::CreateDbClusterParameterGroupInputBuilder {
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_parameter_group::CreateDbClusterParameterGroupOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_db_cluster_parameter_group::CreateDBClusterParameterGroupError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_db_cluster_parameter_group();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateDBClusterParameterGroup`.
24///
25/// <p>Creates a new DB cluster parameter group.</p>
26/// <p>Parameters in a DB cluster parameter group apply to all of the instances in a DB cluster.</p>
27/// <p>A DB cluster parameter group is initially created with the default parameters for the database engine used by instances in the DB cluster. To provide custom values for any of the parameters, you must modify the group after creating it using <code>ModifyDBClusterParameterGroup</code>. Once you've created a DB cluster parameter group, you need to associate it with your DB cluster using <code>ModifyDBCluster</code>.</p>
28/// <p>When you associate a new DB cluster parameter group with a running Aurora DB cluster, reboot the DB instances in the DB cluster without failover for the new DB cluster parameter group and associated settings to take effect.</p>
29/// <p>When you associate a new DB cluster parameter group with a running Multi-AZ DB cluster, reboot the DB cluster without failover for the new DB cluster parameter group and associated settings to take effect.</p><important>
30/// <p>After you create a DB cluster parameter group, you should wait at least 5 minutes before creating your first DB cluster that uses that DB cluster parameter group as the default parameter group. This allows Amazon RDS to fully complete the create action before the DB cluster parameter group is used as the default for a new DB cluster. This is especially important for parameters that are critical when creating the default database for a DB cluster, such as the character set for the default database defined by the <code>character_set_database</code> parameter. You can use the <i>Parameter Groups</i> option of the <a href="https://console.aws.amazon.com/rds/">Amazon RDS console</a> or the <code>DescribeDBClusterParameters</code> operation to verify that your DB cluster parameter group has been created or modified.</p>
31/// </important>
32/// <p>For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html"> What is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide</i>.</p>
33/// <p>For more information on Multi-AZ DB clusters, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html"> Multi-AZ DB cluster deployments</a> in the <i>Amazon RDS User Guide</i>.</p>
34#[derive(::std::clone::Clone, ::std::fmt::Debug)]
35pub struct CreateDBClusterParameterGroupFluentBuilder {
36    handle: ::std::sync::Arc<crate::client::Handle>,
37    inner: crate::operation::create_db_cluster_parameter_group::builders::CreateDbClusterParameterGroupInputBuilder,
38    config_override: ::std::option::Option<crate::config::Builder>,
39}
40impl
41    crate::client::customize::internal::CustomizableSend<
42        crate::operation::create_db_cluster_parameter_group::CreateDbClusterParameterGroupOutput,
43        crate::operation::create_db_cluster_parameter_group::CreateDBClusterParameterGroupError,
44    > for CreateDBClusterParameterGroupFluentBuilder
45{
46    fn send(
47        self,
48        config_override: crate::config::Builder,
49    ) -> crate::client::customize::internal::BoxFuture<
50        crate::client::customize::internal::SendResult<
51            crate::operation::create_db_cluster_parameter_group::CreateDbClusterParameterGroupOutput,
52            crate::operation::create_db_cluster_parameter_group::CreateDBClusterParameterGroupError,
53        >,
54    > {
55        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
56    }
57}
58impl CreateDBClusterParameterGroupFluentBuilder {
59    /// Creates a new `CreateDBClusterParameterGroupFluentBuilder`.
60    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
61        Self {
62            handle,
63            inner: ::std::default::Default::default(),
64            config_override: ::std::option::Option::None,
65        }
66    }
67    /// Access the CreateDBClusterParameterGroup as a reference.
68    pub fn as_input(&self) -> &crate::operation::create_db_cluster_parameter_group::builders::CreateDbClusterParameterGroupInputBuilder {
69        &self.inner
70    }
71    /// Sends the request and returns the response.
72    ///
73    /// If an error occurs, an `SdkError` will be returned with additional details that
74    /// can be matched against.
75    ///
76    /// By default, any retryable failures will be retried twice. Retry behavior
77    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
78    /// set when configuring the client.
79    pub async fn send(
80        self,
81    ) -> ::std::result::Result<
82        crate::operation::create_db_cluster_parameter_group::CreateDbClusterParameterGroupOutput,
83        ::aws_smithy_runtime_api::client::result::SdkError<
84            crate::operation::create_db_cluster_parameter_group::CreateDBClusterParameterGroupError,
85            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
86        >,
87    > {
88        let input = self
89            .inner
90            .build()
91            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
92        let runtime_plugins = crate::operation::create_db_cluster_parameter_group::CreateDBClusterParameterGroup::operation_runtime_plugins(
93            self.handle.runtime_plugins.clone(),
94            &self.handle.conf,
95            self.config_override,
96        );
97        crate::operation::create_db_cluster_parameter_group::CreateDBClusterParameterGroup::orchestrate(&runtime_plugins, input).await
98    }
99
100    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
101    pub fn customize(
102        self,
103    ) -> crate::client::customize::CustomizableOperation<
104        crate::operation::create_db_cluster_parameter_group::CreateDbClusterParameterGroupOutput,
105        crate::operation::create_db_cluster_parameter_group::CreateDBClusterParameterGroupError,
106        Self,
107    > {
108        crate::client::customize::CustomizableOperation::new(self)
109    }
110    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
111        self.set_config_override(::std::option::Option::Some(config_override.into()));
112        self
113    }
114
115    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
116        self.config_override = config_override;
117        self
118    }
119    /// <p>The name of the DB cluster parameter group.</p>
120    /// <p>Constraints:</p>
121    /// <ul>
122    /// <li>
123    /// <p>Must not match the name of an existing DB cluster parameter group.</p></li>
124    /// </ul><note>
125    /// <p>This value is stored as a lowercase string.</p>
126    /// </note>
127    pub fn db_cluster_parameter_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128        self.inner = self.inner.db_cluster_parameter_group_name(input.into());
129        self
130    }
131    /// <p>The name of the DB cluster parameter group.</p>
132    /// <p>Constraints:</p>
133    /// <ul>
134    /// <li>
135    /// <p>Must not match the name of an existing DB cluster parameter group.</p></li>
136    /// </ul><note>
137    /// <p>This value is stored as a lowercase string.</p>
138    /// </note>
139    pub fn set_db_cluster_parameter_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140        self.inner = self.inner.set_db_cluster_parameter_group_name(input);
141        self
142    }
143    /// <p>The name of the DB cluster parameter group.</p>
144    /// <p>Constraints:</p>
145    /// <ul>
146    /// <li>
147    /// <p>Must not match the name of an existing DB cluster parameter group.</p></li>
148    /// </ul><note>
149    /// <p>This value is stored as a lowercase string.</p>
150    /// </note>
151    pub fn get_db_cluster_parameter_group_name(&self) -> &::std::option::Option<::std::string::String> {
152        self.inner.get_db_cluster_parameter_group_name()
153    }
154    /// <p>The DB cluster parameter group family name. A DB cluster parameter group can be associated with one and only one DB cluster parameter group family, and can be applied only to a DB cluster running a database engine and engine version compatible with that DB cluster parameter group family.</p>
155    /// <p><b>Aurora MySQL</b></p>
156    /// <p>Example: <code>aurora-mysql5.7</code>, <code>aurora-mysql8.0</code></p>
157    /// <p><b>Aurora PostgreSQL</b></p>
158    /// <p>Example: <code>aurora-postgresql14</code></p>
159    /// <p><b>RDS for MySQL</b></p>
160    /// <p>Example: <code>mysql8.0</code></p>
161    /// <p><b>RDS for PostgreSQL</b></p>
162    /// <p>Example: <code>postgres13</code></p>
163    /// <p>To list all of the available parameter group families for a DB engine, use the following command:</p>
164    /// <p><code>aws rds describe-db-engine-versions --query "DBEngineVersions\[\].DBParameterGroupFamily" --engine</code></p>
165    /// <p>For example, to list all of the available parameter group families for the Aurora PostgreSQL DB engine, use the following command:</p>
166    /// <p><code>aws rds describe-db-engine-versions --query "DBEngineVersions\[\].DBParameterGroupFamily" --engine aurora-postgresql</code></p><note>
167    /// <p>The output contains duplicates.</p>
168    /// </note>
169    /// <p>The following are the valid DB engine values:</p>
170    /// <ul>
171    /// <li>
172    /// <p><code>aurora-mysql</code></p></li>
173    /// <li>
174    /// <p><code>aurora-postgresql</code></p></li>
175    /// <li>
176    /// <p><code>mysql</code></p></li>
177    /// <li>
178    /// <p><code>postgres</code></p></li>
179    /// </ul>
180    pub fn db_parameter_group_family(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
181        self.inner = self.inner.db_parameter_group_family(input.into());
182        self
183    }
184    /// <p>The DB cluster parameter group family name. A DB cluster parameter group can be associated with one and only one DB cluster parameter group family, and can be applied only to a DB cluster running a database engine and engine version compatible with that DB cluster parameter group family.</p>
185    /// <p><b>Aurora MySQL</b></p>
186    /// <p>Example: <code>aurora-mysql5.7</code>, <code>aurora-mysql8.0</code></p>
187    /// <p><b>Aurora PostgreSQL</b></p>
188    /// <p>Example: <code>aurora-postgresql14</code></p>
189    /// <p><b>RDS for MySQL</b></p>
190    /// <p>Example: <code>mysql8.0</code></p>
191    /// <p><b>RDS for PostgreSQL</b></p>
192    /// <p>Example: <code>postgres13</code></p>
193    /// <p>To list all of the available parameter group families for a DB engine, use the following command:</p>
194    /// <p><code>aws rds describe-db-engine-versions --query "DBEngineVersions\[\].DBParameterGroupFamily" --engine</code></p>
195    /// <p>For example, to list all of the available parameter group families for the Aurora PostgreSQL DB engine, use the following command:</p>
196    /// <p><code>aws rds describe-db-engine-versions --query "DBEngineVersions\[\].DBParameterGroupFamily" --engine aurora-postgresql</code></p><note>
197    /// <p>The output contains duplicates.</p>
198    /// </note>
199    /// <p>The following are the valid DB engine values:</p>
200    /// <ul>
201    /// <li>
202    /// <p><code>aurora-mysql</code></p></li>
203    /// <li>
204    /// <p><code>aurora-postgresql</code></p></li>
205    /// <li>
206    /// <p><code>mysql</code></p></li>
207    /// <li>
208    /// <p><code>postgres</code></p></li>
209    /// </ul>
210    pub fn set_db_parameter_group_family(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
211        self.inner = self.inner.set_db_parameter_group_family(input);
212        self
213    }
214    /// <p>The DB cluster parameter group family name. A DB cluster parameter group can be associated with one and only one DB cluster parameter group family, and can be applied only to a DB cluster running a database engine and engine version compatible with that DB cluster parameter group family.</p>
215    /// <p><b>Aurora MySQL</b></p>
216    /// <p>Example: <code>aurora-mysql5.7</code>, <code>aurora-mysql8.0</code></p>
217    /// <p><b>Aurora PostgreSQL</b></p>
218    /// <p>Example: <code>aurora-postgresql14</code></p>
219    /// <p><b>RDS for MySQL</b></p>
220    /// <p>Example: <code>mysql8.0</code></p>
221    /// <p><b>RDS for PostgreSQL</b></p>
222    /// <p>Example: <code>postgres13</code></p>
223    /// <p>To list all of the available parameter group families for a DB engine, use the following command:</p>
224    /// <p><code>aws rds describe-db-engine-versions --query "DBEngineVersions\[\].DBParameterGroupFamily" --engine</code></p>
225    /// <p>For example, to list all of the available parameter group families for the Aurora PostgreSQL DB engine, use the following command:</p>
226    /// <p><code>aws rds describe-db-engine-versions --query "DBEngineVersions\[\].DBParameterGroupFamily" --engine aurora-postgresql</code></p><note>
227    /// <p>The output contains duplicates.</p>
228    /// </note>
229    /// <p>The following are the valid DB engine values:</p>
230    /// <ul>
231    /// <li>
232    /// <p><code>aurora-mysql</code></p></li>
233    /// <li>
234    /// <p><code>aurora-postgresql</code></p></li>
235    /// <li>
236    /// <p><code>mysql</code></p></li>
237    /// <li>
238    /// <p><code>postgres</code></p></li>
239    /// </ul>
240    pub fn get_db_parameter_group_family(&self) -> &::std::option::Option<::std::string::String> {
241        self.inner.get_db_parameter_group_family()
242    }
243    /// <p>The description for the DB cluster parameter group.</p>
244    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
245        self.inner = self.inner.description(input.into());
246        self
247    }
248    /// <p>The description for the DB cluster parameter group.</p>
249    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
250        self.inner = self.inner.set_description(input);
251        self
252    }
253    /// <p>The description for the DB cluster parameter group.</p>
254    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
255        self.inner.get_description()
256    }
257    ///
258    /// Appends an item to `Tags`.
259    ///
260    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
261    ///
262    /// <p>Tags to assign to the DB cluster parameter group.</p>
263    pub fn tags(mut self, input: crate::types::Tag) -> Self {
264        self.inner = self.inner.tags(input);
265        self
266    }
267    /// <p>Tags to assign to the DB cluster parameter group.</p>
268    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
269        self.inner = self.inner.set_tags(input);
270        self
271    }
272    /// <p>Tags to assign to the DB cluster parameter group.</p>
273    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
274        self.inner.get_tags()
275    }
276}