aws_sdk_rds/operation/describe_tenant_databases/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_tenant_databases::_describe_tenant_databases_output::DescribeTenantDatabasesOutputBuilder;
3
4pub use crate::operation::describe_tenant_databases::_describe_tenant_databases_input::DescribeTenantDatabasesInputBuilder;
5
6impl crate::operation::describe_tenant_databases::builders::DescribeTenantDatabasesInputBuilder {
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_tenant_databases::DescribeTenantDatabasesOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::describe_tenant_databases::DescribeTenantDatabasesError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.describe_tenant_databases();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `DescribeTenantDatabases`.
24///
25/// <p>Describes the tenant databases in a DB instance that uses the multi-tenant configuration. Only RDS for Oracle CDB instances are supported.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct DescribeTenantDatabasesFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::describe_tenant_databases::builders::DescribeTenantDatabasesInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::describe_tenant_databases::DescribeTenantDatabasesOutput,
35 crate::operation::describe_tenant_databases::DescribeTenantDatabasesError,
36 > for DescribeTenantDatabasesFluentBuilder
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::describe_tenant_databases::DescribeTenantDatabasesOutput,
44 crate::operation::describe_tenant_databases::DescribeTenantDatabasesError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl DescribeTenantDatabasesFluentBuilder {
51 /// Creates a new `DescribeTenantDatabasesFluentBuilder`.
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 DescribeTenantDatabases as a reference.
60 pub fn as_input(&self) -> &crate::operation::describe_tenant_databases::builders::DescribeTenantDatabasesInputBuilder {
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::describe_tenant_databases::DescribeTenantDatabasesOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::describe_tenant_databases::DescribeTenantDatabasesError,
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::describe_tenant_databases::DescribeTenantDatabases::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::describe_tenant_databases::DescribeTenantDatabases::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::describe_tenant_databases::DescribeTenantDatabasesOutput,
97 crate::operation::describe_tenant_databases::DescribeTenantDatabasesError,
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 /// Create a paginator for this request
112 ///
113 /// Paginators are used by calling [`send().await`](crate::operation::describe_tenant_databases::paginator::DescribeTenantDatabasesPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
114 pub fn into_paginator(self) -> crate::operation::describe_tenant_databases::paginator::DescribeTenantDatabasesPaginator {
115 crate::operation::describe_tenant_databases::paginator::DescribeTenantDatabasesPaginator::new(self.handle, self.inner)
116 }
117 /// <p>The user-supplied DB instance identifier, which must match the identifier of an existing instance owned by the Amazon Web Services account. This parameter isn't case-sensitive.</p>
118 pub fn db_instance_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119 self.inner = self.inner.db_instance_identifier(input.into());
120 self
121 }
122 /// <p>The user-supplied DB instance identifier, which must match the identifier of an existing instance owned by the Amazon Web Services account. This parameter isn't case-sensitive.</p>
123 pub fn set_db_instance_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124 self.inner = self.inner.set_db_instance_identifier(input);
125 self
126 }
127 /// <p>The user-supplied DB instance identifier, which must match the identifier of an existing instance owned by the Amazon Web Services account. This parameter isn't case-sensitive.</p>
128 pub fn get_db_instance_identifier(&self) -> &::std::option::Option<::std::string::String> {
129 self.inner.get_db_instance_identifier()
130 }
131 /// <p>The user-supplied tenant database name, which must match the name of an existing tenant database on the specified DB instance owned by your Amazon Web Services account. This parameter isn’t case-sensitive.</p>
132 pub fn tenant_db_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133 self.inner = self.inner.tenant_db_name(input.into());
134 self
135 }
136 /// <p>The user-supplied tenant database name, which must match the name of an existing tenant database on the specified DB instance owned by your Amazon Web Services account. This parameter isn’t case-sensitive.</p>
137 pub fn set_tenant_db_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138 self.inner = self.inner.set_tenant_db_name(input);
139 self
140 }
141 /// <p>The user-supplied tenant database name, which must match the name of an existing tenant database on the specified DB instance owned by your Amazon Web Services account. This parameter isn’t case-sensitive.</p>
142 pub fn get_tenant_db_name(&self) -> &::std::option::Option<::std::string::String> {
143 self.inner.get_tenant_db_name()
144 }
145 ///
146 /// Appends an item to `Filters`.
147 ///
148 /// To override the contents of this collection use [`set_filters`](Self::set_filters).
149 ///
150 /// <p>A filter that specifies one or more database tenants to describe.</p>
151 /// <p>Supported filters:</p>
152 /// <ul>
153 /// <li>
154 /// <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>
155 /// <li>
156 /// <p><code>tenant-database-resource-id</code> - Tenant database resource identifiers.</p></li>
157 /// <li>
158 /// <p><code>dbi-resource-id</code> - DB instance resource identifiers. The results list only includes information about the tenants contained within the DB instances identified by these resource identifiers.</p></li>
159 /// </ul>
160 pub fn filters(mut self, input: crate::types::Filter) -> Self {
161 self.inner = self.inner.filters(input);
162 self
163 }
164 /// <p>A filter that specifies one or more database tenants to describe.</p>
165 /// <p>Supported filters:</p>
166 /// <ul>
167 /// <li>
168 /// <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>
169 /// <li>
170 /// <p><code>tenant-database-resource-id</code> - Tenant database resource identifiers.</p></li>
171 /// <li>
172 /// <p><code>dbi-resource-id</code> - DB instance resource identifiers. The results list only includes information about the tenants contained within the DB instances identified by these resource identifiers.</p></li>
173 /// </ul>
174 pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
175 self.inner = self.inner.set_filters(input);
176 self
177 }
178 /// <p>A filter that specifies one or more database tenants to describe.</p>
179 /// <p>Supported filters:</p>
180 /// <ul>
181 /// <li>
182 /// <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>
183 /// <li>
184 /// <p><code>tenant-database-resource-id</code> - Tenant database resource identifiers.</p></li>
185 /// <li>
186 /// <p><code>dbi-resource-id</code> - DB instance resource identifiers. The results list only includes information about the tenants contained within the DB instances identified by these resource identifiers.</p></li>
187 /// </ul>
188 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
189 self.inner.get_filters()
190 }
191 /// <p>An optional pagination token provided by a previous <code>DescribeTenantDatabases</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>
192 pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
193 self.inner = self.inner.marker(input.into());
194 self
195 }
196 /// <p>An optional pagination token provided by a previous <code>DescribeTenantDatabases</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>
197 pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
198 self.inner = self.inner.set_marker(input);
199 self
200 }
201 /// <p>An optional pagination token provided by a previous <code>DescribeTenantDatabases</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>
202 pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
203 self.inner.get_marker()
204 }
205 /// <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>
206 pub fn max_records(mut self, input: i32) -> Self {
207 self.inner = self.inner.max_records(input);
208 self
209 }
210 /// <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>
211 pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
212 self.inner = self.inner.set_max_records(input);
213 self
214 }
215 /// <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>
216 pub fn get_max_records(&self) -> &::std::option::Option<i32> {
217 self.inner.get_max_records()
218 }
219}