aws_sdk_neptune/operation/modify_global_cluster/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::modify_global_cluster::_modify_global_cluster_output::ModifyGlobalClusterOutputBuilder;
3
4pub use crate::operation::modify_global_cluster::_modify_global_cluster_input::ModifyGlobalClusterInputBuilder;
5
6impl crate::operation::modify_global_cluster::builders::ModifyGlobalClusterInputBuilder {
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::modify_global_cluster::ModifyGlobalClusterOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::modify_global_cluster::ModifyGlobalClusterError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.modify_global_cluster();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `ModifyGlobalCluster`.
24///
25/// <p>Modify a setting for an Amazon Neptune global cluster. You can change one or more database configuration parameters by specifying these parameters and their new values in the request.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct ModifyGlobalClusterFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::modify_global_cluster::builders::ModifyGlobalClusterInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::modify_global_cluster::ModifyGlobalClusterOutput,
35 crate::operation::modify_global_cluster::ModifyGlobalClusterError,
36 > for ModifyGlobalClusterFluentBuilder
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::modify_global_cluster::ModifyGlobalClusterOutput,
44 crate::operation::modify_global_cluster::ModifyGlobalClusterError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl ModifyGlobalClusterFluentBuilder {
51 /// Creates a new `ModifyGlobalClusterFluentBuilder`.
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 ModifyGlobalCluster as a reference.
60 pub fn as_input(&self) -> &crate::operation::modify_global_cluster::builders::ModifyGlobalClusterInputBuilder {
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::modify_global_cluster::ModifyGlobalClusterOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::modify_global_cluster::ModifyGlobalClusterError,
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::modify_global_cluster::ModifyGlobalCluster::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::modify_global_cluster::ModifyGlobalCluster::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::modify_global_cluster::ModifyGlobalClusterOutput,
97 crate::operation::modify_global_cluster::ModifyGlobalClusterError,
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 DB cluster identifier for the global cluster being modified. This parameter is not case-sensitive.</p>
112 /// <p>Constraints: Must match the identifier of an existing global database cluster.</p>
113 pub fn global_cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.inner = self.inner.global_cluster_identifier(input.into());
115 self
116 }
117 /// <p>The DB cluster identifier for the global cluster being modified. This parameter is not case-sensitive.</p>
118 /// <p>Constraints: Must match the identifier of an existing global database cluster.</p>
119 pub fn set_global_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120 self.inner = self.inner.set_global_cluster_identifier(input);
121 self
122 }
123 /// <p>The DB cluster identifier for the global cluster being modified. This parameter is not case-sensitive.</p>
124 /// <p>Constraints: Must match the identifier of an existing global database cluster.</p>
125 pub fn get_global_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
126 self.inner.get_global_cluster_identifier()
127 }
128 /// <p>A new cluster identifier to assign to the global database. This value is stored as a lowercase string.</p>
129 /// <p>Constraints:</p>
130 /// <ul>
131 /// <li>
132 /// <p>Must contain from 1 to 63 letters, numbers, or hyphens.</p></li>
133 /// <li>
134 /// <p>The first character must be a letter.</p></li>
135 /// <li>
136 /// <p>Can't end with a hyphen or contain two consecutive hyphens</p></li>
137 /// </ul>
138 /// <p>Example: <code>my-cluster2</code></p>
139 pub fn new_global_cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140 self.inner = self.inner.new_global_cluster_identifier(input.into());
141 self
142 }
143 /// <p>A new cluster identifier to assign to the global database. This value is stored as a lowercase string.</p>
144 /// <p>Constraints:</p>
145 /// <ul>
146 /// <li>
147 /// <p>Must contain from 1 to 63 letters, numbers, or hyphens.</p></li>
148 /// <li>
149 /// <p>The first character must be a letter.</p></li>
150 /// <li>
151 /// <p>Can't end with a hyphen or contain two consecutive hyphens</p></li>
152 /// </ul>
153 /// <p>Example: <code>my-cluster2</code></p>
154 pub fn set_new_global_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155 self.inner = self.inner.set_new_global_cluster_identifier(input);
156 self
157 }
158 /// <p>A new cluster identifier to assign to the global database. This value is stored as a lowercase string.</p>
159 /// <p>Constraints:</p>
160 /// <ul>
161 /// <li>
162 /// <p>Must contain from 1 to 63 letters, numbers, or hyphens.</p></li>
163 /// <li>
164 /// <p>The first character must be a letter.</p></li>
165 /// <li>
166 /// <p>Can't end with a hyphen or contain two consecutive hyphens</p></li>
167 /// </ul>
168 /// <p>Example: <code>my-cluster2</code></p>
169 pub fn get_new_global_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
170 self.inner.get_new_global_cluster_identifier()
171 }
172 /// <p>Indicates whether the global database has deletion protection enabled. The global database cannot be deleted when deletion protection is enabled.</p>
173 pub fn deletion_protection(mut self, input: bool) -> Self {
174 self.inner = self.inner.deletion_protection(input);
175 self
176 }
177 /// <p>Indicates whether the global database has deletion protection enabled. The global database cannot be deleted when deletion protection is enabled.</p>
178 pub fn set_deletion_protection(mut self, input: ::std::option::Option<bool>) -> Self {
179 self.inner = self.inner.set_deletion_protection(input);
180 self
181 }
182 /// <p>Indicates whether the global database has deletion protection enabled. The global database cannot be deleted when deletion protection is enabled.</p>
183 pub fn get_deletion_protection(&self) -> &::std::option::Option<bool> {
184 self.inner.get_deletion_protection()
185 }
186 /// <p>The version number of the database engine to which you want to upgrade. Changing this parameter will result in an outage. The change is applied during the next maintenance window unless <code>ApplyImmediately</code> is enabled.</p>
187 /// <p>To list all of the available Neptune engine versions, use the following command:</p>
188 pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
189 self.inner = self.inner.engine_version(input.into());
190 self
191 }
192 /// <p>The version number of the database engine to which you want to upgrade. Changing this parameter will result in an outage. The change is applied during the next maintenance window unless <code>ApplyImmediately</code> is enabled.</p>
193 /// <p>To list all of the available Neptune engine versions, use the following command:</p>
194 pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
195 self.inner = self.inner.set_engine_version(input);
196 self
197 }
198 /// <p>The version number of the database engine to which you want to upgrade. Changing this parameter will result in an outage. The change is applied during the next maintenance window unless <code>ApplyImmediately</code> is enabled.</p>
199 /// <p>To list all of the available Neptune engine versions, use the following command:</p>
200 pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
201 self.inner.get_engine_version()
202 }
203 /// <p>A value that indicates whether major version upgrades are allowed.</p>
204 /// <p>Constraints: You must allow major version upgrades if you specify a value for the <code>EngineVersion</code> parameter that is a different major version than the DB cluster's current version.</p>
205 /// <p>If you upgrade the major version of a global database, the cluster and DB instance parameter groups are set to the default parameter groups for the new version, so you will need to apply any custom parameter groups after completing the upgrade.</p>
206 pub fn allow_major_version_upgrade(mut self, input: bool) -> Self {
207 self.inner = self.inner.allow_major_version_upgrade(input);
208 self
209 }
210 /// <p>A value that indicates whether major version upgrades are allowed.</p>
211 /// <p>Constraints: You must allow major version upgrades if you specify a value for the <code>EngineVersion</code> parameter that is a different major version than the DB cluster's current version.</p>
212 /// <p>If you upgrade the major version of a global database, the cluster and DB instance parameter groups are set to the default parameter groups for the new version, so you will need to apply any custom parameter groups after completing the upgrade.</p>
213 pub fn set_allow_major_version_upgrade(mut self, input: ::std::option::Option<bool>) -> Self {
214 self.inner = self.inner.set_allow_major_version_upgrade(input);
215 self
216 }
217 /// <p>A value that indicates whether major version upgrades are allowed.</p>
218 /// <p>Constraints: You must allow major version upgrades if you specify a value for the <code>EngineVersion</code> parameter that is a different major version than the DB cluster's current version.</p>
219 /// <p>If you upgrade the major version of a global database, the cluster and DB instance parameter groups are set to the default parameter groups for the new version, so you will need to apply any custom parameter groups after completing the upgrade.</p>
220 pub fn get_allow_major_version_upgrade(&self) -> &::std::option::Option<bool> {
221 self.inner.get_allow_major_version_upgrade()
222 }
223}