aws_sdk_pi/operation/get_dimension_key_details/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_dimension_key_details::_get_dimension_key_details_output::GetDimensionKeyDetailsOutputBuilder;
3
4pub use crate::operation::get_dimension_key_details::_get_dimension_key_details_input::GetDimensionKeyDetailsInputBuilder;
5
6impl crate::operation::get_dimension_key_details::builders::GetDimensionKeyDetailsInputBuilder {
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::get_dimension_key_details::GetDimensionKeyDetailsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_dimension_key_details();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetDimensionKeyDetails`.
24///
25/// <p>Get the attributes of the specified dimension group for a DB instance or data source. For example, if you specify a SQL ID, <code>GetDimensionKeyDetails</code> retrieves the full text of the dimension <code>db.sql.statement</code> associated with this ID. This operation is useful because <code>GetResourceMetrics</code> and <code>DescribeDimensionKeys</code> don't support retrieval of large SQL statement text, lock snapshots, and execution plans.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct GetDimensionKeyDetailsFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::get_dimension_key_details::builders::GetDimensionKeyDetailsInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::get_dimension_key_details::GetDimensionKeyDetailsOutput,
35        crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError,
36    > for GetDimensionKeyDetailsFluentBuilder
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::get_dimension_key_details::GetDimensionKeyDetailsOutput,
44            crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl GetDimensionKeyDetailsFluentBuilder {
51    /// Creates a new `GetDimensionKeyDetailsFluentBuilder`.
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 GetDimensionKeyDetails as a reference.
60    pub fn as_input(&self) -> &crate::operation::get_dimension_key_details::builders::GetDimensionKeyDetailsInputBuilder {
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::get_dimension_key_details::GetDimensionKeyDetailsOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError,
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::get_dimension_key_details::GetDimensionKeyDetails::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::get_dimension_key_details::GetDimensionKeyDetails::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::get_dimension_key_details::GetDimensionKeyDetailsOutput,
97        crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError,
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 Amazon Web Services service for which Performance Insights returns data. The only valid value is <code>RDS</code>.</p>
112    pub fn service_type(mut self, input: crate::types::ServiceType) -> Self {
113        self.inner = self.inner.service_type(input);
114        self
115    }
116    /// <p>The Amazon Web Services service for which Performance Insights returns data. The only valid value is <code>RDS</code>.</p>
117    pub fn set_service_type(mut self, input: ::std::option::Option<crate::types::ServiceType>) -> Self {
118        self.inner = self.inner.set_service_type(input);
119        self
120    }
121    /// <p>The Amazon Web Services service for which Performance Insights returns data. The only valid value is <code>RDS</code>.</p>
122    pub fn get_service_type(&self) -> &::std::option::Option<crate::types::ServiceType> {
123        self.inner.get_service_type()
124    }
125    /// <p>The ID for a data source from which to gather dimension data. This ID must be immutable and unique within an Amazon Web Services Region. When a DB instance is the data source, specify its <code>DbiResourceId</code> value. For example, specify <code>db-ABCDEFGHIJKLMNOPQRSTU1VW2X</code>.</p>
126    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.identifier(input.into());
128        self
129    }
130    /// <p>The ID for a data source from which to gather dimension data. This ID must be immutable and unique within an Amazon Web Services Region. When a DB instance is the data source, specify its <code>DbiResourceId</code> value. For example, specify <code>db-ABCDEFGHIJKLMNOPQRSTU1VW2X</code>.</p>
131    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_identifier(input);
133        self
134    }
135    /// <p>The ID for a data source from which to gather dimension data. This ID must be immutable and unique within an Amazon Web Services Region. When a DB instance is the data source, specify its <code>DbiResourceId</code> value. For example, specify <code>db-ABCDEFGHIJKLMNOPQRSTU1VW2X</code>.</p>
136    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_identifier()
138    }
139    /// <p>The name of the dimension group. Performance Insights searches the specified group for the dimension group ID. The following group name values are valid:</p>
140    /// <ul>
141    /// <li>
142    /// <p><code>db.execution_plan</code> (Amazon RDS and Aurora only)</p></li>
143    /// <li>
144    /// <p><code>db.lock_snapshot</code> (Aurora only)</p></li>
145    /// <li>
146    /// <p><code>db.query</code> (Amazon DocumentDB only)</p></li>
147    /// <li>
148    /// <p><code>db.sql</code> (Amazon RDS and Aurora only)</p></li>
149    /// </ul>
150    pub fn group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151        self.inner = self.inner.group(input.into());
152        self
153    }
154    /// <p>The name of the dimension group. Performance Insights searches the specified group for the dimension group ID. The following group name values are valid:</p>
155    /// <ul>
156    /// <li>
157    /// <p><code>db.execution_plan</code> (Amazon RDS and Aurora only)</p></li>
158    /// <li>
159    /// <p><code>db.lock_snapshot</code> (Aurora only)</p></li>
160    /// <li>
161    /// <p><code>db.query</code> (Amazon DocumentDB only)</p></li>
162    /// <li>
163    /// <p><code>db.sql</code> (Amazon RDS and Aurora only)</p></li>
164    /// </ul>
165    pub fn set_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166        self.inner = self.inner.set_group(input);
167        self
168    }
169    /// <p>The name of the dimension group. Performance Insights searches the specified group for the dimension group ID. The following group name values are valid:</p>
170    /// <ul>
171    /// <li>
172    /// <p><code>db.execution_plan</code> (Amazon RDS and Aurora only)</p></li>
173    /// <li>
174    /// <p><code>db.lock_snapshot</code> (Aurora only)</p></li>
175    /// <li>
176    /// <p><code>db.query</code> (Amazon DocumentDB only)</p></li>
177    /// <li>
178    /// <p><code>db.sql</code> (Amazon RDS and Aurora only)</p></li>
179    /// </ul>
180    pub fn get_group(&self) -> &::std::option::Option<::std::string::String> {
181        self.inner.get_group()
182    }
183    /// <p>The ID of the dimension group from which to retrieve dimension details. For dimension group <code>db.sql</code>, the group ID is <code>db.sql.id</code>. The following group ID values are valid:</p>
184    /// <ul>
185    /// <li>
186    /// <p><code>db.execution_plan.id</code> for dimension group <code>db.execution_plan</code> (Aurora and RDS only)</p></li>
187    /// <li>
188    /// <p><code>db.sql.id</code> for dimension group <code>db.sql</code> (Aurora and RDS only)</p></li>
189    /// <li>
190    /// <p><code>db.query.id</code> for dimension group <code>db.query</code> (DocumentDB only)</p></li>
191    /// <li>
192    /// <p>For the dimension group <code>db.lock_snapshot</code>, the <code>GroupIdentifier</code> is the epoch timestamp when Performance Insights captured the snapshot, in seconds. You can retrieve this value with the <code>GetResourceMetrics</code> operation for a 1 second period.</p></li>
193    /// </ul>
194    pub fn group_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195        self.inner = self.inner.group_identifier(input.into());
196        self
197    }
198    /// <p>The ID of the dimension group from which to retrieve dimension details. For dimension group <code>db.sql</code>, the group ID is <code>db.sql.id</code>. The following group ID values are valid:</p>
199    /// <ul>
200    /// <li>
201    /// <p><code>db.execution_plan.id</code> for dimension group <code>db.execution_plan</code> (Aurora and RDS only)</p></li>
202    /// <li>
203    /// <p><code>db.sql.id</code> for dimension group <code>db.sql</code> (Aurora and RDS only)</p></li>
204    /// <li>
205    /// <p><code>db.query.id</code> for dimension group <code>db.query</code> (DocumentDB only)</p></li>
206    /// <li>
207    /// <p>For the dimension group <code>db.lock_snapshot</code>, the <code>GroupIdentifier</code> is the epoch timestamp when Performance Insights captured the snapshot, in seconds. You can retrieve this value with the <code>GetResourceMetrics</code> operation for a 1 second period.</p></li>
208    /// </ul>
209    pub fn set_group_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
210        self.inner = self.inner.set_group_identifier(input);
211        self
212    }
213    /// <p>The ID of the dimension group from which to retrieve dimension details. For dimension group <code>db.sql</code>, the group ID is <code>db.sql.id</code>. The following group ID values are valid:</p>
214    /// <ul>
215    /// <li>
216    /// <p><code>db.execution_plan.id</code> for dimension group <code>db.execution_plan</code> (Aurora and RDS only)</p></li>
217    /// <li>
218    /// <p><code>db.sql.id</code> for dimension group <code>db.sql</code> (Aurora and RDS only)</p></li>
219    /// <li>
220    /// <p><code>db.query.id</code> for dimension group <code>db.query</code> (DocumentDB only)</p></li>
221    /// <li>
222    /// <p>For the dimension group <code>db.lock_snapshot</code>, the <code>GroupIdentifier</code> is the epoch timestamp when Performance Insights captured the snapshot, in seconds. You can retrieve this value with the <code>GetResourceMetrics</code> operation for a 1 second period.</p></li>
223    /// </ul>
224    pub fn get_group_identifier(&self) -> &::std::option::Option<::std::string::String> {
225        self.inner.get_group_identifier()
226    }
227    ///
228    /// Appends an item to `RequestedDimensions`.
229    ///
230    /// To override the contents of this collection use [`set_requested_dimensions`](Self::set_requested_dimensions).
231    ///
232    /// <p>A list of dimensions to retrieve the detail data for within the given dimension group. If you don't specify this parameter, Performance Insights returns all dimension data within the specified dimension group. Specify dimension names for the following dimension groups:</p>
233    /// <ul>
234    /// <li>
235    /// <p><code>db.execution_plan</code> - Specify the dimension name <code>db.execution_plan.raw_plan</code> or the short dimension name <code>raw_plan</code> (Amazon RDS and Aurora only)</p></li>
236    /// <li>
237    /// <p><code>db.lock_snapshot</code> - Specify the dimension name <code>db.lock_snapshot.lock_trees</code> or the short dimension name <code>lock_trees</code>. (Aurora only)</p></li>
238    /// <li>
239    /// <p><code>db.sql</code> - Specify either the full dimension name <code>db.sql.statement</code> or the short dimension name <code>statement</code> (Aurora and RDS only).</p></li>
240    /// <li>
241    /// <p><code>db.query</code> - Specify either the full dimension name <code>db.query.statement</code> or the short dimension name <code>statement</code> (DocumentDB only).</p></li>
242    /// </ul>
243    pub fn requested_dimensions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
244        self.inner = self.inner.requested_dimensions(input.into());
245        self
246    }
247    /// <p>A list of dimensions to retrieve the detail data for within the given dimension group. If you don't specify this parameter, Performance Insights returns all dimension data within the specified dimension group. Specify dimension names for the following dimension groups:</p>
248    /// <ul>
249    /// <li>
250    /// <p><code>db.execution_plan</code> - Specify the dimension name <code>db.execution_plan.raw_plan</code> or the short dimension name <code>raw_plan</code> (Amazon RDS and Aurora only)</p></li>
251    /// <li>
252    /// <p><code>db.lock_snapshot</code> - Specify the dimension name <code>db.lock_snapshot.lock_trees</code> or the short dimension name <code>lock_trees</code>. (Aurora only)</p></li>
253    /// <li>
254    /// <p><code>db.sql</code> - Specify either the full dimension name <code>db.sql.statement</code> or the short dimension name <code>statement</code> (Aurora and RDS only).</p></li>
255    /// <li>
256    /// <p><code>db.query</code> - Specify either the full dimension name <code>db.query.statement</code> or the short dimension name <code>statement</code> (DocumentDB only).</p></li>
257    /// </ul>
258    pub fn set_requested_dimensions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
259        self.inner = self.inner.set_requested_dimensions(input);
260        self
261    }
262    /// <p>A list of dimensions to retrieve the detail data for within the given dimension group. If you don't specify this parameter, Performance Insights returns all dimension data within the specified dimension group. Specify dimension names for the following dimension groups:</p>
263    /// <ul>
264    /// <li>
265    /// <p><code>db.execution_plan</code> - Specify the dimension name <code>db.execution_plan.raw_plan</code> or the short dimension name <code>raw_plan</code> (Amazon RDS and Aurora only)</p></li>
266    /// <li>
267    /// <p><code>db.lock_snapshot</code> - Specify the dimension name <code>db.lock_snapshot.lock_trees</code> or the short dimension name <code>lock_trees</code>. (Aurora only)</p></li>
268    /// <li>
269    /// <p><code>db.sql</code> - Specify either the full dimension name <code>db.sql.statement</code> or the short dimension name <code>statement</code> (Aurora and RDS only).</p></li>
270    /// <li>
271    /// <p><code>db.query</code> - Specify either the full dimension name <code>db.query.statement</code> or the short dimension name <code>statement</code> (DocumentDB only).</p></li>
272    /// </ul>
273    pub fn get_requested_dimensions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
274        self.inner.get_requested_dimensions()
275    }
276}