aws_sdk_rds/operation/delete_db_cluster/_delete_db_cluster_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p></p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteDbClusterInput {
7 /// <p>The DB cluster identifier for the DB cluster to be deleted. This parameter isn't case-sensitive.</p>
8 /// <p>Constraints:</p>
9 /// <ul>
10 /// <li>
11 /// <p>Must match an existing DBClusterIdentifier.</p></li>
12 /// </ul>
13 pub db_cluster_identifier: ::std::option::Option<::std::string::String>,
14 /// <p>Specifies whether to skip the creation of a final DB cluster snapshot before RDS deletes the DB cluster. If you set this value to <code>true</code>, RDS doesn't create a final DB cluster snapshot. If you set this value to <code>false</code> or don't specify it, RDS creates a DB cluster snapshot before it deletes the DB cluster. By default, this parameter is disabled, so RDS creates a final DB cluster snapshot.</p><note>
15 /// <p>If <code>SkipFinalSnapshot</code> is disabled, you must specify a value for the <code>FinalDBSnapshotIdentifier</code> parameter.</p>
16 /// </note>
17 pub skip_final_snapshot: ::std::option::Option<bool>,
18 /// <p>The DB cluster snapshot identifier of the new DB cluster snapshot created when <code>SkipFinalSnapshot</code> is disabled.</p><note>
19 /// <p>If you specify this parameter and also skip the creation of a final DB cluster snapshot with the <code>SkipFinalShapshot</code> parameter, the request results in an error.</p>
20 /// </note>
21 /// <p>Constraints:</p>
22 /// <ul>
23 /// <li>
24 /// <p>Must be 1 to 255 letters, numbers, or hyphens.</p></li>
25 /// <li>
26 /// <p>First character must be a letter</p></li>
27 /// <li>
28 /// <p>Can't end with a hyphen or contain two consecutive hyphens</p></li>
29 /// </ul>
30 pub final_db_snapshot_identifier: ::std::option::Option<::std::string::String>,
31 /// <p>Specifies whether to remove automated backups immediately after the DB cluster is deleted. This parameter isn't case-sensitive. The default is to remove automated backups immediately after the DB cluster is deleted, unless the Amazon Web Services Backup policy specifies a point-in-time restore rule.</p>
32 pub delete_automated_backups: ::std::option::Option<bool>,
33}
34impl DeleteDbClusterInput {
35 /// <p>The DB cluster identifier for the DB cluster to be deleted. This parameter isn't case-sensitive.</p>
36 /// <p>Constraints:</p>
37 /// <ul>
38 /// <li>
39 /// <p>Must match an existing DBClusterIdentifier.</p></li>
40 /// </ul>
41 pub fn db_cluster_identifier(&self) -> ::std::option::Option<&str> {
42 self.db_cluster_identifier.as_deref()
43 }
44 /// <p>Specifies whether to skip the creation of a final DB cluster snapshot before RDS deletes the DB cluster. If you set this value to <code>true</code>, RDS doesn't create a final DB cluster snapshot. If you set this value to <code>false</code> or don't specify it, RDS creates a DB cluster snapshot before it deletes the DB cluster. By default, this parameter is disabled, so RDS creates a final DB cluster snapshot.</p><note>
45 /// <p>If <code>SkipFinalSnapshot</code> is disabled, you must specify a value for the <code>FinalDBSnapshotIdentifier</code> parameter.</p>
46 /// </note>
47 pub fn skip_final_snapshot(&self) -> ::std::option::Option<bool> {
48 self.skip_final_snapshot
49 }
50 /// <p>The DB cluster snapshot identifier of the new DB cluster snapshot created when <code>SkipFinalSnapshot</code> is disabled.</p><note>
51 /// <p>If you specify this parameter and also skip the creation of a final DB cluster snapshot with the <code>SkipFinalShapshot</code> parameter, the request results in an error.</p>
52 /// </note>
53 /// <p>Constraints:</p>
54 /// <ul>
55 /// <li>
56 /// <p>Must be 1 to 255 letters, numbers, or hyphens.</p></li>
57 /// <li>
58 /// <p>First character must be a letter</p></li>
59 /// <li>
60 /// <p>Can't end with a hyphen or contain two consecutive hyphens</p></li>
61 /// </ul>
62 pub fn final_db_snapshot_identifier(&self) -> ::std::option::Option<&str> {
63 self.final_db_snapshot_identifier.as_deref()
64 }
65 /// <p>Specifies whether to remove automated backups immediately after the DB cluster is deleted. This parameter isn't case-sensitive. The default is to remove automated backups immediately after the DB cluster is deleted, unless the Amazon Web Services Backup policy specifies a point-in-time restore rule.</p>
66 pub fn delete_automated_backups(&self) -> ::std::option::Option<bool> {
67 self.delete_automated_backups
68 }
69}
70impl DeleteDbClusterInput {
71 /// Creates a new builder-style object to manufacture [`DeleteDbClusterInput`](crate::operation::delete_db_cluster::DeleteDbClusterInput).
72 pub fn builder() -> crate::operation::delete_db_cluster::builders::DeleteDbClusterInputBuilder {
73 crate::operation::delete_db_cluster::builders::DeleteDbClusterInputBuilder::default()
74 }
75}
76
77/// A builder for [`DeleteDbClusterInput`](crate::operation::delete_db_cluster::DeleteDbClusterInput).
78#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
79#[non_exhaustive]
80pub struct DeleteDbClusterInputBuilder {
81 pub(crate) db_cluster_identifier: ::std::option::Option<::std::string::String>,
82 pub(crate) skip_final_snapshot: ::std::option::Option<bool>,
83 pub(crate) final_db_snapshot_identifier: ::std::option::Option<::std::string::String>,
84 pub(crate) delete_automated_backups: ::std::option::Option<bool>,
85}
86impl DeleteDbClusterInputBuilder {
87 /// <p>The DB cluster identifier for the DB cluster to be deleted. This parameter isn't case-sensitive.</p>
88 /// <p>Constraints:</p>
89 /// <ul>
90 /// <li>
91 /// <p>Must match an existing DBClusterIdentifier.</p></li>
92 /// </ul>
93 /// This field is required.
94 pub fn db_cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95 self.db_cluster_identifier = ::std::option::Option::Some(input.into());
96 self
97 }
98 /// <p>The DB cluster identifier for the DB cluster to be deleted. This parameter isn't case-sensitive.</p>
99 /// <p>Constraints:</p>
100 /// <ul>
101 /// <li>
102 /// <p>Must match an existing DBClusterIdentifier.</p></li>
103 /// </ul>
104 pub fn set_db_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105 self.db_cluster_identifier = input;
106 self
107 }
108 /// <p>The DB cluster identifier for the DB cluster to be deleted. This parameter isn't case-sensitive.</p>
109 /// <p>Constraints:</p>
110 /// <ul>
111 /// <li>
112 /// <p>Must match an existing DBClusterIdentifier.</p></li>
113 /// </ul>
114 pub fn get_db_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
115 &self.db_cluster_identifier
116 }
117 /// <p>Specifies whether to skip the creation of a final DB cluster snapshot before RDS deletes the DB cluster. If you set this value to <code>true</code>, RDS doesn't create a final DB cluster snapshot. If you set this value to <code>false</code> or don't specify it, RDS creates a DB cluster snapshot before it deletes the DB cluster. By default, this parameter is disabled, so RDS creates a final DB cluster snapshot.</p><note>
118 /// <p>If <code>SkipFinalSnapshot</code> is disabled, you must specify a value for the <code>FinalDBSnapshotIdentifier</code> parameter.</p>
119 /// </note>
120 pub fn skip_final_snapshot(mut self, input: bool) -> Self {
121 self.skip_final_snapshot = ::std::option::Option::Some(input);
122 self
123 }
124 /// <p>Specifies whether to skip the creation of a final DB cluster snapshot before RDS deletes the DB cluster. If you set this value to <code>true</code>, RDS doesn't create a final DB cluster snapshot. If you set this value to <code>false</code> or don't specify it, RDS creates a DB cluster snapshot before it deletes the DB cluster. By default, this parameter is disabled, so RDS creates a final DB cluster snapshot.</p><note>
125 /// <p>If <code>SkipFinalSnapshot</code> is disabled, you must specify a value for the <code>FinalDBSnapshotIdentifier</code> parameter.</p>
126 /// </note>
127 pub fn set_skip_final_snapshot(mut self, input: ::std::option::Option<bool>) -> Self {
128 self.skip_final_snapshot = input;
129 self
130 }
131 /// <p>Specifies whether to skip the creation of a final DB cluster snapshot before RDS deletes the DB cluster. If you set this value to <code>true</code>, RDS doesn't create a final DB cluster snapshot. If you set this value to <code>false</code> or don't specify it, RDS creates a DB cluster snapshot before it deletes the DB cluster. By default, this parameter is disabled, so RDS creates a final DB cluster snapshot.</p><note>
132 /// <p>If <code>SkipFinalSnapshot</code> is disabled, you must specify a value for the <code>FinalDBSnapshotIdentifier</code> parameter.</p>
133 /// </note>
134 pub fn get_skip_final_snapshot(&self) -> &::std::option::Option<bool> {
135 &self.skip_final_snapshot
136 }
137 /// <p>The DB cluster snapshot identifier of the new DB cluster snapshot created when <code>SkipFinalSnapshot</code> is disabled.</p><note>
138 /// <p>If you specify this parameter and also skip the creation of a final DB cluster snapshot with the <code>SkipFinalShapshot</code> parameter, the request results in an error.</p>
139 /// </note>
140 /// <p>Constraints:</p>
141 /// <ul>
142 /// <li>
143 /// <p>Must be 1 to 255 letters, numbers, or hyphens.</p></li>
144 /// <li>
145 /// <p>First character must be a letter</p></li>
146 /// <li>
147 /// <p>Can't end with a hyphen or contain two consecutive hyphens</p></li>
148 /// </ul>
149 pub fn final_db_snapshot_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.final_db_snapshot_identifier = ::std::option::Option::Some(input.into());
151 self
152 }
153 /// <p>The DB cluster snapshot identifier of the new DB cluster snapshot created when <code>SkipFinalSnapshot</code> is disabled.</p><note>
154 /// <p>If you specify this parameter and also skip the creation of a final DB cluster snapshot with the <code>SkipFinalShapshot</code> parameter, the request results in an error.</p>
155 /// </note>
156 /// <p>Constraints:</p>
157 /// <ul>
158 /// <li>
159 /// <p>Must be 1 to 255 letters, numbers, or hyphens.</p></li>
160 /// <li>
161 /// <p>First character must be a letter</p></li>
162 /// <li>
163 /// <p>Can't end with a hyphen or contain two consecutive hyphens</p></li>
164 /// </ul>
165 pub fn set_final_db_snapshot_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166 self.final_db_snapshot_identifier = input;
167 self
168 }
169 /// <p>The DB cluster snapshot identifier of the new DB cluster snapshot created when <code>SkipFinalSnapshot</code> is disabled.</p><note>
170 /// <p>If you specify this parameter and also skip the creation of a final DB cluster snapshot with the <code>SkipFinalShapshot</code> parameter, the request results in an error.</p>
171 /// </note>
172 /// <p>Constraints:</p>
173 /// <ul>
174 /// <li>
175 /// <p>Must be 1 to 255 letters, numbers, or hyphens.</p></li>
176 /// <li>
177 /// <p>First character must be a letter</p></li>
178 /// <li>
179 /// <p>Can't end with a hyphen or contain two consecutive hyphens</p></li>
180 /// </ul>
181 pub fn get_final_db_snapshot_identifier(&self) -> &::std::option::Option<::std::string::String> {
182 &self.final_db_snapshot_identifier
183 }
184 /// <p>Specifies whether to remove automated backups immediately after the DB cluster is deleted. This parameter isn't case-sensitive. The default is to remove automated backups immediately after the DB cluster is deleted, unless the Amazon Web Services Backup policy specifies a point-in-time restore rule.</p>
185 pub fn delete_automated_backups(mut self, input: bool) -> Self {
186 self.delete_automated_backups = ::std::option::Option::Some(input);
187 self
188 }
189 /// <p>Specifies whether to remove automated backups immediately after the DB cluster is deleted. This parameter isn't case-sensitive. The default is to remove automated backups immediately after the DB cluster is deleted, unless the Amazon Web Services Backup policy specifies a point-in-time restore rule.</p>
190 pub fn set_delete_automated_backups(mut self, input: ::std::option::Option<bool>) -> Self {
191 self.delete_automated_backups = input;
192 self
193 }
194 /// <p>Specifies whether to remove automated backups immediately after the DB cluster is deleted. This parameter isn't case-sensitive. The default is to remove automated backups immediately after the DB cluster is deleted, unless the Amazon Web Services Backup policy specifies a point-in-time restore rule.</p>
195 pub fn get_delete_automated_backups(&self) -> &::std::option::Option<bool> {
196 &self.delete_automated_backups
197 }
198 /// Consumes the builder and constructs a [`DeleteDbClusterInput`](crate::operation::delete_db_cluster::DeleteDbClusterInput).
199 pub fn build(
200 self,
201 ) -> ::std::result::Result<crate::operation::delete_db_cluster::DeleteDbClusterInput, ::aws_smithy_types::error::operation::BuildError> {
202 ::std::result::Result::Ok(crate::operation::delete_db_cluster::DeleteDbClusterInput {
203 db_cluster_identifier: self.db_cluster_identifier,
204 skip_final_snapshot: self.skip_final_snapshot,
205 final_db_snapshot_identifier: self.final_db_snapshot_identifier,
206 delete_automated_backups: self.delete_automated_backups,
207 })
208 }
209}