aws_sdk_rds/operation/describe_db_snapshot_tenant_databases/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_db_snapshot_tenant_databases::_describe_db_snapshot_tenant_databases_output::DescribeDbSnapshotTenantDatabasesOutputBuilder;
3
4pub use crate::operation::describe_db_snapshot_tenant_databases::_describe_db_snapshot_tenant_databases_input::DescribeDbSnapshotTenantDatabasesInputBuilder;
5
6impl crate::operation::describe_db_snapshot_tenant_databases::builders::DescribeDbSnapshotTenantDatabasesInputBuilder {
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::describe_db_snapshot_tenant_databases::DescribeDbSnapshotTenantDatabasesOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::describe_db_snapshot_tenant_databases::DescribeDBSnapshotTenantDatabasesError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.describe_db_snapshot_tenant_databases();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `DescribeDBSnapshotTenantDatabases`.
24///
25/// <p>Describes the tenant databases that exist in a DB snapshot. This command only applies to RDS for Oracle DB instances in the multi-tenant configuration.</p>
26/// <p>You can use this command to inspect the tenant databases within a snapshot before restoring it. You can't directly interact with the tenant databases in a DB snapshot. If you restore a snapshot that was taken from DB instance using the multi-tenant configuration, you restore all its tenant databases.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct DescribeDBSnapshotTenantDatabasesFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::describe_db_snapshot_tenant_databases::builders::DescribeDbSnapshotTenantDatabasesInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::describe_db_snapshot_tenant_databases::DescribeDbSnapshotTenantDatabasesOutput,
36 crate::operation::describe_db_snapshot_tenant_databases::DescribeDBSnapshotTenantDatabasesError,
37 > for DescribeDBSnapshotTenantDatabasesFluentBuilder
38{
39 fn send(
40 self,
41 config_override: crate::config::Builder,
42 ) -> crate::client::customize::internal::BoxFuture<
43 crate::client::customize::internal::SendResult<
44 crate::operation::describe_db_snapshot_tenant_databases::DescribeDbSnapshotTenantDatabasesOutput,
45 crate::operation::describe_db_snapshot_tenant_databases::DescribeDBSnapshotTenantDatabasesError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl DescribeDBSnapshotTenantDatabasesFluentBuilder {
52 /// Creates a new `DescribeDBSnapshotTenantDatabasesFluentBuilder`.
53 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54 Self {
55 handle,
56 inner: ::std::default::Default::default(),
57 config_override: ::std::option::Option::None,
58 }
59 }
60 /// Access the DescribeDBSnapshotTenantDatabases as a reference.
61 pub fn as_input(&self) -> &crate::operation::describe_db_snapshot_tenant_databases::builders::DescribeDbSnapshotTenantDatabasesInputBuilder {
62 &self.inner
63 }
64 /// Sends the request and returns the response.
65 ///
66 /// If an error occurs, an `SdkError` will be returned with additional details that
67 /// can be matched against.
68 ///
69 /// By default, any retryable failures will be retried twice. Retry behavior
70 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71 /// set when configuring the client.
72 pub async fn send(
73 self,
74 ) -> ::std::result::Result<
75 crate::operation::describe_db_snapshot_tenant_databases::DescribeDbSnapshotTenantDatabasesOutput,
76 ::aws_smithy_runtime_api::client::result::SdkError<
77 crate::operation::describe_db_snapshot_tenant_databases::DescribeDBSnapshotTenantDatabasesError,
78 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79 >,
80 > {
81 let input = self
82 .inner
83 .build()
84 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85 let runtime_plugins = crate::operation::describe_db_snapshot_tenant_databases::DescribeDBSnapshotTenantDatabases::operation_runtime_plugins(
86 self.handle.runtime_plugins.clone(),
87 &self.handle.conf,
88 self.config_override,
89 );
90 crate::operation::describe_db_snapshot_tenant_databases::DescribeDBSnapshotTenantDatabases::orchestrate(&runtime_plugins, input).await
91 }
92
93 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94 pub fn customize(
95 self,
96 ) -> crate::client::customize::CustomizableOperation<
97 crate::operation::describe_db_snapshot_tenant_databases::DescribeDbSnapshotTenantDatabasesOutput,
98 crate::operation::describe_db_snapshot_tenant_databases::DescribeDBSnapshotTenantDatabasesError,
99 Self,
100 > {
101 crate::client::customize::CustomizableOperation::new(self)
102 }
103 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104 self.set_config_override(::std::option::Option::Some(config_override.into()));
105 self
106 }
107
108 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109 self.config_override = config_override;
110 self
111 }
112 /// Create a paginator for this request
113 ///
114 /// Paginators are used by calling [`send().await`](crate::operation::describe_db_snapshot_tenant_databases::paginator::DescribeDbSnapshotTenantDatabasesPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
115 pub fn into_paginator(self) -> crate::operation::describe_db_snapshot_tenant_databases::paginator::DescribeDbSnapshotTenantDatabasesPaginator {
116 crate::operation::describe_db_snapshot_tenant_databases::paginator::DescribeDbSnapshotTenantDatabasesPaginator::new(self.handle, self.inner)
117 }
118 /// <p>The ID of the DB instance used to create the DB snapshots. This parameter isn't case-sensitive.</p>
119 /// <p>Constraints:</p>
120 /// <ul>
121 /// <li>
122 /// <p>If supplied, must match the identifier of an existing <code>DBInstance</code>.</p></li>
123 /// </ul>
124 pub fn db_instance_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125 self.inner = self.inner.db_instance_identifier(input.into());
126 self
127 }
128 /// <p>The ID of the DB instance used to create the DB snapshots. This parameter isn't case-sensitive.</p>
129 /// <p>Constraints:</p>
130 /// <ul>
131 /// <li>
132 /// <p>If supplied, must match the identifier of an existing <code>DBInstance</code>.</p></li>
133 /// </ul>
134 pub fn set_db_instance_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135 self.inner = self.inner.set_db_instance_identifier(input);
136 self
137 }
138 /// <p>The ID of the DB instance used to create the DB snapshots. This parameter isn't case-sensitive.</p>
139 /// <p>Constraints:</p>
140 /// <ul>
141 /// <li>
142 /// <p>If supplied, must match the identifier of an existing <code>DBInstance</code>.</p></li>
143 /// </ul>
144 pub fn get_db_instance_identifier(&self) -> &::std::option::Option<::std::string::String> {
145 self.inner.get_db_instance_identifier()
146 }
147 /// <p>The ID of a DB snapshot that contains the tenant databases to describe. This value is stored as a lowercase string.</p>
148 /// <p>Constraints:</p>
149 /// <ul>
150 /// <li>
151 /// <p>If you specify this parameter, the value must match the ID of an existing DB snapshot.</p></li>
152 /// <li>
153 /// <p>If you specify an automatic snapshot, you must also specify <code>SnapshotType</code>.</p></li>
154 /// </ul>
155 pub fn db_snapshot_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156 self.inner = self.inner.db_snapshot_identifier(input.into());
157 self
158 }
159 /// <p>The ID of a DB snapshot that contains the tenant databases to describe. This value is stored as a lowercase string.</p>
160 /// <p>Constraints:</p>
161 /// <ul>
162 /// <li>
163 /// <p>If you specify this parameter, the value must match the ID of an existing DB snapshot.</p></li>
164 /// <li>
165 /// <p>If you specify an automatic snapshot, you must also specify <code>SnapshotType</code>.</p></li>
166 /// </ul>
167 pub fn set_db_snapshot_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
168 self.inner = self.inner.set_db_snapshot_identifier(input);
169 self
170 }
171 /// <p>The ID of a DB snapshot that contains the tenant databases to describe. This value is stored as a lowercase string.</p>
172 /// <p>Constraints:</p>
173 /// <ul>
174 /// <li>
175 /// <p>If you specify this parameter, the value must match the ID of an existing DB snapshot.</p></li>
176 /// <li>
177 /// <p>If you specify an automatic snapshot, you must also specify <code>SnapshotType</code>.</p></li>
178 /// </ul>
179 pub fn get_db_snapshot_identifier(&self) -> &::std::option::Option<::std::string::String> {
180 self.inner.get_db_snapshot_identifier()
181 }
182 /// <p>The type of DB snapshots to be returned. You can specify one of the following values:</p>
183 /// <ul>
184 /// <li>
185 /// <p><code>automated</code> – All DB snapshots that have been automatically taken by Amazon RDS for my Amazon Web Services account.</p></li>
186 /// <li>
187 /// <p><code>manual</code> – All DB snapshots that have been taken by my Amazon Web Services account.</p></li>
188 /// <li>
189 /// <p><code>shared</code> – All manual DB snapshots that have been shared to my Amazon Web Services account.</p></li>
190 /// <li>
191 /// <p><code>public</code> – All DB snapshots that have been marked as public.</p></li>
192 /// <li>
193 /// <p><code>awsbackup</code> – All DB snapshots managed by the Amazon Web Services Backup service.</p></li>
194 /// </ul>
195 pub fn snapshot_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
196 self.inner = self.inner.snapshot_type(input.into());
197 self
198 }
199 /// <p>The type of DB snapshots to be returned. You can specify one of the following values:</p>
200 /// <ul>
201 /// <li>
202 /// <p><code>automated</code> – All DB snapshots that have been automatically taken by Amazon RDS for my Amazon Web Services account.</p></li>
203 /// <li>
204 /// <p><code>manual</code> – All DB snapshots that have been taken by my Amazon Web Services account.</p></li>
205 /// <li>
206 /// <p><code>shared</code> – All manual DB snapshots that have been shared to my Amazon Web Services account.</p></li>
207 /// <li>
208 /// <p><code>public</code> – All DB snapshots that have been marked as public.</p></li>
209 /// <li>
210 /// <p><code>awsbackup</code> – All DB snapshots managed by the Amazon Web Services Backup service.</p></li>
211 /// </ul>
212 pub fn set_snapshot_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
213 self.inner = self.inner.set_snapshot_type(input);
214 self
215 }
216 /// <p>The type of DB snapshots to be returned. You can specify one of the following values:</p>
217 /// <ul>
218 /// <li>
219 /// <p><code>automated</code> – All DB snapshots that have been automatically taken by Amazon RDS for my Amazon Web Services account.</p></li>
220 /// <li>
221 /// <p><code>manual</code> – All DB snapshots that have been taken by my Amazon Web Services account.</p></li>
222 /// <li>
223 /// <p><code>shared</code> – All manual DB snapshots that have been shared to my Amazon Web Services account.</p></li>
224 /// <li>
225 /// <p><code>public</code> – All DB snapshots that have been marked as public.</p></li>
226 /// <li>
227 /// <p><code>awsbackup</code> – All DB snapshots managed by the Amazon Web Services Backup service.</p></li>
228 /// </ul>
229 pub fn get_snapshot_type(&self) -> &::std::option::Option<::std::string::String> {
230 self.inner.get_snapshot_type()
231 }
232 ///
233 /// Appends an item to `Filters`.
234 ///
235 /// To override the contents of this collection use [`set_filters`](Self::set_filters).
236 ///
237 /// <p>A filter that specifies one or more tenant databases to describe.</p>
238 /// <p>Supported filters:</p>
239 /// <ul>
240 /// <li>
241 /// <p><code>tenant-db-name</code> - Tenant database names. The results list only includes information about the tenant databases that match these tenant DB names.</p></li>
242 /// <li>
243 /// <p><code>tenant-database-resource-id</code> - Tenant database resource identifiers. The results list only includes information about the tenant databases contained within the DB snapshots.</p></li>
244 /// <li>
245 /// <p><code>dbi-resource-id</code> - DB instance resource identifiers. The results list only includes information about snapshots containing tenant databases contained within the DB instances identified by these resource identifiers.</p></li>
246 /// <li>
247 /// <p><code>db-instance-id</code> - Accepts DB instance identifiers and DB instance Amazon Resource Names (ARNs).</p></li>
248 /// <li>
249 /// <p><code>db-snapshot-id</code> - Accepts DB snapshot identifiers.</p></li>
250 /// <li>
251 /// <p><code>snapshot-type</code> - Accepts types of DB snapshots.</p></li>
252 /// </ul>
253 pub fn filters(mut self, input: crate::types::Filter) -> Self {
254 self.inner = self.inner.filters(input);
255 self
256 }
257 /// <p>A filter that specifies one or more tenant databases to describe.</p>
258 /// <p>Supported filters:</p>
259 /// <ul>
260 /// <li>
261 /// <p><code>tenant-db-name</code> - Tenant database names. The results list only includes information about the tenant databases that match these tenant DB names.</p></li>
262 /// <li>
263 /// <p><code>tenant-database-resource-id</code> - Tenant database resource identifiers. The results list only includes information about the tenant databases contained within the DB snapshots.</p></li>
264 /// <li>
265 /// <p><code>dbi-resource-id</code> - DB instance resource identifiers. The results list only includes information about snapshots containing tenant databases contained within the DB instances identified by these resource identifiers.</p></li>
266 /// <li>
267 /// <p><code>db-instance-id</code> - Accepts DB instance identifiers and DB instance Amazon Resource Names (ARNs).</p></li>
268 /// <li>
269 /// <p><code>db-snapshot-id</code> - Accepts DB snapshot identifiers.</p></li>
270 /// <li>
271 /// <p><code>snapshot-type</code> - Accepts types of DB snapshots.</p></li>
272 /// </ul>
273 pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
274 self.inner = self.inner.set_filters(input);
275 self
276 }
277 /// <p>A filter that specifies one or more tenant databases to describe.</p>
278 /// <p>Supported filters:</p>
279 /// <ul>
280 /// <li>
281 /// <p><code>tenant-db-name</code> - Tenant database names. The results list only includes information about the tenant databases that match these tenant DB names.</p></li>
282 /// <li>
283 /// <p><code>tenant-database-resource-id</code> - Tenant database resource identifiers. The results list only includes information about the tenant databases contained within the DB snapshots.</p></li>
284 /// <li>
285 /// <p><code>dbi-resource-id</code> - DB instance resource identifiers. The results list only includes information about snapshots containing tenant databases contained within the DB instances identified by these resource identifiers.</p></li>
286 /// <li>
287 /// <p><code>db-instance-id</code> - Accepts DB instance identifiers and DB instance Amazon Resource Names (ARNs).</p></li>
288 /// <li>
289 /// <p><code>db-snapshot-id</code> - Accepts DB snapshot identifiers.</p></li>
290 /// <li>
291 /// <p><code>snapshot-type</code> - Accepts types of DB snapshots.</p></li>
292 /// </ul>
293 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
294 self.inner.get_filters()
295 }
296 /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.</p>
297 pub fn max_records(mut self, input: i32) -> Self {
298 self.inner = self.inner.max_records(input);
299 self
300 }
301 /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.</p>
302 pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
303 self.inner = self.inner.set_max_records(input);
304 self
305 }
306 /// <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.</p>
307 pub fn get_max_records(&self) -> &::std::option::Option<i32> {
308 self.inner.get_max_records()
309 }
310 /// <p>An optional pagination token provided by a previous <code>DescribeDBSnapshotTenantDatabases</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
311 pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
312 self.inner = self.inner.marker(input.into());
313 self
314 }
315 /// <p>An optional pagination token provided by a previous <code>DescribeDBSnapshotTenantDatabases</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
316 pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
317 self.inner = self.inner.set_marker(input);
318 self
319 }
320 /// <p>An optional pagination token provided by a previous <code>DescribeDBSnapshotTenantDatabases</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
321 pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
322 self.inner.get_marker()
323 }
324 /// <p>A specific DB resource identifier to describe.</p>
325 pub fn dbi_resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
326 self.inner = self.inner.dbi_resource_id(input.into());
327 self
328 }
329 /// <p>A specific DB resource identifier to describe.</p>
330 pub fn set_dbi_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
331 self.inner = self.inner.set_dbi_resource_id(input);
332 self
333 }
334 /// <p>A specific DB resource identifier to describe.</p>
335 pub fn get_dbi_resource_id(&self) -> &::std::option::Option<::std::string::String> {
336 self.inner.get_dbi_resource_id()
337 }
338}