aws-sdk-pi 1.101.0

AWS SDK for AWS Performance Insights
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::list_available_resource_dimensions::_list_available_resource_dimensions_input::ListAvailableResourceDimensionsInputBuilder;

pub use crate::operation::list_available_resource_dimensions::_list_available_resource_dimensions_output::ListAvailableResourceDimensionsOutputBuilder;

impl crate::operation::list_available_resource_dimensions::builders::ListAvailableResourceDimensionsInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.list_available_resource_dimensions();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `ListAvailableResourceDimensions`.
///
/// <p>Retrieve the dimensions that can be queried for each specified metric type on a specified DB instance.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct ListAvailableResourceDimensionsFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::list_available_resource_dimensions::builders::ListAvailableResourceDimensionsInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsOutput,
        crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError,
    > for ListAvailableResourceDimensionsFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsOutput,
            crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl ListAvailableResourceDimensionsFluentBuilder {
    /// Creates a new `ListAvailableResourceDimensionsFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the ListAvailableResourceDimensions as a reference.
    pub fn as_input(&self) -> &crate::operation::list_available_resource_dimensions::builders::ListAvailableResourceDimensionsInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensions::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensions::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsOutput,
        crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// Create a paginator for this request
    ///
    /// Paginators are used by calling [`send().await`](crate::operation::list_available_resource_dimensions::paginator::ListAvailableResourceDimensionsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
    pub fn into_paginator(self) -> crate::operation::list_available_resource_dimensions::paginator::ListAvailableResourceDimensionsPaginator {
        crate::operation::list_available_resource_dimensions::paginator::ListAvailableResourceDimensionsPaginator::new(self.handle, self.inner)
    }
    /// <p>The Amazon Web Services service for which Performance Insights returns metrics.</p>
    pub fn service_type(mut self, input: crate::types::ServiceType) -> Self {
        self.inner = self.inner.service_type(input);
        self
    }
    /// <p>The Amazon Web Services service for which Performance Insights returns metrics.</p>
    pub fn set_service_type(mut self, input: ::std::option::Option<crate::types::ServiceType>) -> Self {
        self.inner = self.inner.set_service_type(input);
        self
    }
    /// <p>The Amazon Web Services service for which Performance Insights returns metrics.</p>
    pub fn get_service_type(&self) -> &::std::option::Option<crate::types::ServiceType> {
        self.inner.get_service_type()
    }
    /// <p>An immutable identifier for a data source that is unique within an Amazon Web Services Region. Performance Insights gathers metrics from this data source. To use an Amazon RDS DB instance as a data source, specify its <code>DbiResourceId</code> value. For example, specify <code>db-ABCDEFGHIJKLMNOPQRSTU1VWZ</code>.</p>
    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.identifier(input.into());
        self
    }
    /// <p>An immutable identifier for a data source that is unique within an Amazon Web Services Region. Performance Insights gathers metrics from this data source. To use an Amazon RDS DB instance as a data source, specify its <code>DbiResourceId</code> value. For example, specify <code>db-ABCDEFGHIJKLMNOPQRSTU1VWZ</code>.</p>
    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_identifier(input);
        self
    }
    /// <p>An immutable identifier for a data source that is unique within an Amazon Web Services Region. Performance Insights gathers metrics from this data source. To use an Amazon RDS DB instance as a data source, specify its <code>DbiResourceId</code> value. For example, specify <code>db-ABCDEFGHIJKLMNOPQRSTU1VWZ</code>.</p>
    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_identifier()
    }
    ///
    /// Appends an item to `Metrics`.
    ///
    /// To override the contents of this collection use [`set_metrics`](Self::set_metrics).
    ///
    /// <p>The types of metrics for which to retrieve dimensions. Valid values include <code>db.load</code>.</p>
    pub fn metrics(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.metrics(input.into());
        self
    }
    /// <p>The types of metrics for which to retrieve dimensions. Valid values include <code>db.load</code>.</p>
    pub fn set_metrics(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.inner = self.inner.set_metrics(input);
        self
    }
    /// <p>The types of metrics for which to retrieve dimensions. Valid values include <code>db.load</code>.</p>
    pub fn get_metrics(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        self.inner.get_metrics()
    }
    /// <p>The maximum number of items to return in the response. If more items exist than the specified <code>MaxRecords</code> value, a pagination token is included in the response so that the remaining results can be retrieved.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.inner = self.inner.max_results(input);
        self
    }
    /// <p>The maximum number of items to return in the response. If more items exist than the specified <code>MaxRecords</code> value, a pagination token is included in the response so that the remaining results can be retrieved.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_max_results(input);
        self
    }
    /// <p>The maximum number of items to return in the response. If more items exist than the specified <code>MaxRecords</code> value, a pagination token is included in the response so that the remaining results can be retrieved.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        self.inner.get_max_results()
    }
    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by <code>MaxRecords</code>.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.next_token(input.into());
        self
    }
    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by <code>MaxRecords</code>.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_next_token(input);
        self
    }
    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by <code>MaxRecords</code>.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_next_token()
    }
    ///
    /// Appends an item to `AuthorizedActions`.
    ///
    /// To override the contents of this collection use [`set_authorized_actions`](Self::set_authorized_actions).
    ///
    /// <p>The actions to discover the dimensions you are authorized to access. If you specify multiple actions, then the response will contain the dimensions common for all the actions.</p>
    /// <p>When you don't specify this request parameter or provide an empty list, the response contains all the available dimensions for the target database engine whether or not you are authorized to access them.</p>
    pub fn authorized_actions(mut self, input: crate::types::FineGrainedAction) -> Self {
        self.inner = self.inner.authorized_actions(input);
        self
    }
    /// <p>The actions to discover the dimensions you are authorized to access. If you specify multiple actions, then the response will contain the dimensions common for all the actions.</p>
    /// <p>When you don't specify this request parameter or provide an empty list, the response contains all the available dimensions for the target database engine whether or not you are authorized to access them.</p>
    pub fn set_authorized_actions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FineGrainedAction>>) -> Self {
        self.inner = self.inner.set_authorized_actions(input);
        self
    }
    /// <p>The actions to discover the dimensions you are authorized to access. If you specify multiple actions, then the response will contain the dimensions common for all the actions.</p>
    /// <p>When you don't specify this request parameter or provide an empty list, the response contains all the available dimensions for the target database engine whether or not you are authorized to access them.</p>
    pub fn get_authorized_actions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FineGrainedAction>> {
        self.inner.get_authorized_actions()
    }
}