aws_sdk_redshift/operation/describe_hsm_client_certificates/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_hsm_client_certificates::_describe_hsm_client_certificates_output::DescribeHsmClientCertificatesOutputBuilder;
3
4pub use crate::operation::describe_hsm_client_certificates::_describe_hsm_client_certificates_input::DescribeHsmClientCertificatesInputBuilder;
5
6impl crate::operation::describe_hsm_client_certificates::builders::DescribeHsmClientCertificatesInputBuilder {
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_hsm_client_certificates::DescribeHsmClientCertificatesOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_hsm_client_certificates::DescribeHsmClientCertificatesError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_hsm_client_certificates();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeHsmClientCertificates`.
24///
25/// <p>Returns information about the specified HSM client certificate. If no certificate ID is specified, returns information about all the HSM certificates owned by your Amazon Web Services account.</p>
26/// <p>If you specify both tag keys and tag values in the same request, Amazon Redshift returns all HSM client certificates that match any combination of the specified keys and values. For example, if you have <code>owner</code> and <code>environment</code> for tag keys, and <code>admin</code> and <code>test</code> for tag values, all HSM client certificates that have any combination of those values are returned.</p>
27/// <p>If both tag keys and values are omitted from the request, HSM client certificates are returned regardless of whether they have tag keys or values associated with them.</p>
28#[derive(::std::clone::Clone, ::std::fmt::Debug)]
29pub struct DescribeHsmClientCertificatesFluentBuilder {
30    handle: ::std::sync::Arc<crate::client::Handle>,
31    inner: crate::operation::describe_hsm_client_certificates::builders::DescribeHsmClientCertificatesInputBuilder,
32    config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35    crate::client::customize::internal::CustomizableSend<
36        crate::operation::describe_hsm_client_certificates::DescribeHsmClientCertificatesOutput,
37        crate::operation::describe_hsm_client_certificates::DescribeHsmClientCertificatesError,
38    > for DescribeHsmClientCertificatesFluentBuilder
39{
40    fn send(
41        self,
42        config_override: crate::config::Builder,
43    ) -> crate::client::customize::internal::BoxFuture<
44        crate::client::customize::internal::SendResult<
45            crate::operation::describe_hsm_client_certificates::DescribeHsmClientCertificatesOutput,
46            crate::operation::describe_hsm_client_certificates::DescribeHsmClientCertificatesError,
47        >,
48    > {
49        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50    }
51}
52impl DescribeHsmClientCertificatesFluentBuilder {
53    /// Creates a new `DescribeHsmClientCertificatesFluentBuilder`.
54    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
55        Self {
56            handle,
57            inner: ::std::default::Default::default(),
58            config_override: ::std::option::Option::None,
59        }
60    }
61    /// Access the DescribeHsmClientCertificates as a reference.
62    pub fn as_input(&self) -> &crate::operation::describe_hsm_client_certificates::builders::DescribeHsmClientCertificatesInputBuilder {
63        &self.inner
64    }
65    /// Sends the request and returns the response.
66    ///
67    /// If an error occurs, an `SdkError` will be returned with additional details that
68    /// can be matched against.
69    ///
70    /// By default, any retryable failures will be retried twice. Retry behavior
71    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
72    /// set when configuring the client.
73    pub async fn send(
74        self,
75    ) -> ::std::result::Result<
76        crate::operation::describe_hsm_client_certificates::DescribeHsmClientCertificatesOutput,
77        ::aws_smithy_runtime_api::client::result::SdkError<
78            crate::operation::describe_hsm_client_certificates::DescribeHsmClientCertificatesError,
79            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
80        >,
81    > {
82        let input = self
83            .inner
84            .build()
85            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
86        let runtime_plugins = crate::operation::describe_hsm_client_certificates::DescribeHsmClientCertificates::operation_runtime_plugins(
87            self.handle.runtime_plugins.clone(),
88            &self.handle.conf,
89            self.config_override,
90        );
91        crate::operation::describe_hsm_client_certificates::DescribeHsmClientCertificates::orchestrate(&runtime_plugins, input).await
92    }
93
94    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
95    pub fn customize(
96        self,
97    ) -> crate::client::customize::CustomizableOperation<
98        crate::operation::describe_hsm_client_certificates::DescribeHsmClientCertificatesOutput,
99        crate::operation::describe_hsm_client_certificates::DescribeHsmClientCertificatesError,
100        Self,
101    > {
102        crate::client::customize::CustomizableOperation::new(self)
103    }
104    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
105        self.set_config_override(::std::option::Option::Some(config_override.into()));
106        self
107    }
108
109    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
110        self.config_override = config_override;
111        self
112    }
113    /// Create a paginator for this request
114    ///
115    /// Paginators are used by calling [`send().await`](crate::operation::describe_hsm_client_certificates::paginator::DescribeHsmClientCertificatesPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
116    pub fn into_paginator(self) -> crate::operation::describe_hsm_client_certificates::paginator::DescribeHsmClientCertificatesPaginator {
117        crate::operation::describe_hsm_client_certificates::paginator::DescribeHsmClientCertificatesPaginator::new(self.handle, self.inner)
118    }
119    /// <p>The identifier of a specific HSM client certificate for which you want information. If no identifier is specified, information is returned for all HSM client certificates owned by your Amazon Web Services account.</p>
120    pub fn hsm_client_certificate_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121        self.inner = self.inner.hsm_client_certificate_identifier(input.into());
122        self
123    }
124    /// <p>The identifier of a specific HSM client certificate for which you want information. If no identifier is specified, information is returned for all HSM client certificates owned by your Amazon Web Services account.</p>
125    pub fn set_hsm_client_certificate_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126        self.inner = self.inner.set_hsm_client_certificate_identifier(input);
127        self
128    }
129    /// <p>The identifier of a specific HSM client certificate for which you want information. If no identifier is specified, information is returned for all HSM client certificates owned by your Amazon Web Services account.</p>
130    pub fn get_hsm_client_certificate_identifier(&self) -> &::std::option::Option<::std::string::String> {
131        self.inner.get_hsm_client_certificate_identifier()
132    }
133    /// <p>The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified <code>MaxRecords</code> value, a value is returned in a <code>marker</code> field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.</p>
134    /// <p>Default: <code>100</code></p>
135    /// <p>Constraints: minimum 20, maximum 100.</p>
136    pub fn max_records(mut self, input: i32) -> Self {
137        self.inner = self.inner.max_records(input);
138        self
139    }
140    /// <p>The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified <code>MaxRecords</code> value, a value is returned in a <code>marker</code> field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.</p>
141    /// <p>Default: <code>100</code></p>
142    /// <p>Constraints: minimum 20, maximum 100.</p>
143    pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
144        self.inner = self.inner.set_max_records(input);
145        self
146    }
147    /// <p>The maximum number of response records to return in each call. If the number of remaining response records exceeds the specified <code>MaxRecords</code> value, a value is returned in a <code>marker</code> field of the response. You can retrieve the next set of records by retrying the command with the returned marker value.</p>
148    /// <p>Default: <code>100</code></p>
149    /// <p>Constraints: minimum 20, maximum 100.</p>
150    pub fn get_max_records(&self) -> &::std::option::Option<i32> {
151        self.inner.get_max_records()
152    }
153    /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeHsmClientCertificates</code> request exceed the value specified in <code>MaxRecords</code>, Amazon Web Services returns a value in the <code>Marker</code> field of the response. You can retrieve the next set of response records by providing the returned marker value in the <code>Marker</code> parameter and retrying the request.</p>
154    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.inner = self.inner.marker(input.into());
156        self
157    }
158    /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeHsmClientCertificates</code> request exceed the value specified in <code>MaxRecords</code>, Amazon Web Services returns a value in the <code>Marker</code> field of the response. You can retrieve the next set of response records by providing the returned marker value in the <code>Marker</code> parameter and retrying the request.</p>
159    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160        self.inner = self.inner.set_marker(input);
161        self
162    }
163    /// <p>An optional parameter that specifies the starting point to return a set of response records. When the results of a <code>DescribeHsmClientCertificates</code> request exceed the value specified in <code>MaxRecords</code>, Amazon Web Services returns a value in the <code>Marker</code> field of the response. You can retrieve the next set of response records by providing the returned marker value in the <code>Marker</code> parameter and retrying the request.</p>
164    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
165        self.inner.get_marker()
166    }
167    ///
168    /// Appends an item to `TagKeys`.
169    ///
170    /// To override the contents of this collection use [`set_tag_keys`](Self::set_tag_keys).
171    ///
172    /// <p>A tag key or keys for which you want to return all matching HSM client certificates that are associated with the specified key or keys. For example, suppose that you have HSM client certificates that are tagged with keys called <code>owner</code> and <code>environment</code>. If you specify both of these tag keys in the request, Amazon Redshift returns a response with the HSM client certificates that have either or both of these tag keys associated with them.</p>
173    pub fn tag_keys(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
174        self.inner = self.inner.tag_keys(input.into());
175        self
176    }
177    /// <p>A tag key or keys for which you want to return all matching HSM client certificates that are associated with the specified key or keys. For example, suppose that you have HSM client certificates that are tagged with keys called <code>owner</code> and <code>environment</code>. If you specify both of these tag keys in the request, Amazon Redshift returns a response with the HSM client certificates that have either or both of these tag keys associated with them.</p>
178    pub fn set_tag_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
179        self.inner = self.inner.set_tag_keys(input);
180        self
181    }
182    /// <p>A tag key or keys for which you want to return all matching HSM client certificates that are associated with the specified key or keys. For example, suppose that you have HSM client certificates that are tagged with keys called <code>owner</code> and <code>environment</code>. If you specify both of these tag keys in the request, Amazon Redshift returns a response with the HSM client certificates that have either or both of these tag keys associated with them.</p>
183    pub fn get_tag_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
184        self.inner.get_tag_keys()
185    }
186    ///
187    /// Appends an item to `TagValues`.
188    ///
189    /// To override the contents of this collection use [`set_tag_values`](Self::set_tag_values).
190    ///
191    /// <p>A tag value or values for which you want to return all matching HSM client certificates that are associated with the specified tag value or values. For example, suppose that you have HSM client certificates that are tagged with values called <code>admin</code> and <code>test</code>. If you specify both of these tag values in the request, Amazon Redshift returns a response with the HSM client certificates that have either or both of these tag values associated with them.</p>
192    pub fn tag_values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
193        self.inner = self.inner.tag_values(input.into());
194        self
195    }
196    /// <p>A tag value or values for which you want to return all matching HSM client certificates that are associated with the specified tag value or values. For example, suppose that you have HSM client certificates that are tagged with values called <code>admin</code> and <code>test</code>. If you specify both of these tag values in the request, Amazon Redshift returns a response with the HSM client certificates that have either or both of these tag values associated with them.</p>
197    pub fn set_tag_values(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
198        self.inner = self.inner.set_tag_values(input);
199        self
200    }
201    /// <p>A tag value or values for which you want to return all matching HSM client certificates that are associated with the specified tag value or values. For example, suppose that you have HSM client certificates that are tagged with values called <code>admin</code> and <code>test</code>. If you specify both of these tag values in the request, Amazon Redshift returns a response with the HSM client certificates that have either or both of these tag values associated with them.</p>
202    pub fn get_tag_values(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
203        self.inner.get_tag_values()
204    }
205}