aws_sdk_ssm/operation/describe_parameters/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_parameters::_describe_parameters_output::DescribeParametersOutputBuilder;
3
4pub use crate::operation::describe_parameters::_describe_parameters_input::DescribeParametersInputBuilder;
5
6impl crate::operation::describe_parameters::builders::DescribeParametersInputBuilder {
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_parameters::DescribeParametersOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_parameters::DescribeParametersError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_parameters();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeParameters`.
24///
25/// <p>Lists the parameters in your Amazon Web Services account or the parameters shared with you when you enable the <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_DescribeParameters.html#systemsmanager-DescribeParameters-request-Shared">Shared</a> option.</p>
26/// <p>Request results are returned on a best-effort basis. If you specify <code>MaxResults</code> in the request, the response includes information up to the limit specified. The number of items returned, however, can be between zero and the value of <code>MaxResults</code>. If the service reaches an internal limit while processing the results, it stops the operation and returns the matching values up to that point and a <code>NextToken</code>. You can specify the <code>NextToken</code> in a subsequent call to get the next set of results.</p>
27/// <p>Parameter names can't contain spaces. The service removes any spaces specified for the beginning or end of a parameter name. If the specified name for a parameter contains spaces between characters, the request fails with a <code>ValidationException</code> error.</p><important>
28/// <p>If you change the KMS key alias for the KMS key used to encrypt a parameter, then you must also update the key alias the parameter uses to reference KMS. Otherwise, <code>DescribeParameters</code> retrieves whatever the original key alias was referencing.</p>
29/// </important>
30#[derive(::std::clone::Clone, ::std::fmt::Debug)]
31pub struct DescribeParametersFluentBuilder {
32    handle: ::std::sync::Arc<crate::client::Handle>,
33    inner: crate::operation::describe_parameters::builders::DescribeParametersInputBuilder,
34    config_override: ::std::option::Option<crate::config::Builder>,
35}
36impl
37    crate::client::customize::internal::CustomizableSend<
38        crate::operation::describe_parameters::DescribeParametersOutput,
39        crate::operation::describe_parameters::DescribeParametersError,
40    > for DescribeParametersFluentBuilder
41{
42    fn send(
43        self,
44        config_override: crate::config::Builder,
45    ) -> crate::client::customize::internal::BoxFuture<
46        crate::client::customize::internal::SendResult<
47            crate::operation::describe_parameters::DescribeParametersOutput,
48            crate::operation::describe_parameters::DescribeParametersError,
49        >,
50    > {
51        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
52    }
53}
54impl DescribeParametersFluentBuilder {
55    /// Creates a new `DescribeParametersFluentBuilder`.
56    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
57        Self {
58            handle,
59            inner: ::std::default::Default::default(),
60            config_override: ::std::option::Option::None,
61        }
62    }
63    /// Access the DescribeParameters as a reference.
64    pub fn as_input(&self) -> &crate::operation::describe_parameters::builders::DescribeParametersInputBuilder {
65        &self.inner
66    }
67    /// Sends the request and returns the response.
68    ///
69    /// If an error occurs, an `SdkError` will be returned with additional details that
70    /// can be matched against.
71    ///
72    /// By default, any retryable failures will be retried twice. Retry behavior
73    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
74    /// set when configuring the client.
75    pub async fn send(
76        self,
77    ) -> ::std::result::Result<
78        crate::operation::describe_parameters::DescribeParametersOutput,
79        ::aws_smithy_runtime_api::client::result::SdkError<
80            crate::operation::describe_parameters::DescribeParametersError,
81            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
82        >,
83    > {
84        let input = self
85            .inner
86            .build()
87            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
88        let runtime_plugins = crate::operation::describe_parameters::DescribeParameters::operation_runtime_plugins(
89            self.handle.runtime_plugins.clone(),
90            &self.handle.conf,
91            self.config_override,
92        );
93        crate::operation::describe_parameters::DescribeParameters::orchestrate(&runtime_plugins, input).await
94    }
95
96    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
97    pub fn customize(
98        self,
99    ) -> crate::client::customize::CustomizableOperation<
100        crate::operation::describe_parameters::DescribeParametersOutput,
101        crate::operation::describe_parameters::DescribeParametersError,
102        Self,
103    > {
104        crate::client::customize::CustomizableOperation::new(self)
105    }
106    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
107        self.set_config_override(::std::option::Option::Some(config_override.into()));
108        self
109    }
110
111    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
112        self.config_override = config_override;
113        self
114    }
115    /// Create a paginator for this request
116    ///
117    /// Paginators are used by calling [`send().await`](crate::operation::describe_parameters::paginator::DescribeParametersPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
118    pub fn into_paginator(self) -> crate::operation::describe_parameters::paginator::DescribeParametersPaginator {
119        crate::operation::describe_parameters::paginator::DescribeParametersPaginator::new(self.handle, self.inner)
120    }
121    ///
122    /// Appends an item to `Filters`.
123    ///
124    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
125    ///
126    /// <p>This data type is deprecated. Instead, use <code>ParameterFilters</code>.</p>
127    pub fn filters(mut self, input: crate::types::ParametersFilter) -> Self {
128        self.inner = self.inner.filters(input);
129        self
130    }
131    /// <p>This data type is deprecated. Instead, use <code>ParameterFilters</code>.</p>
132    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParametersFilter>>) -> Self {
133        self.inner = self.inner.set_filters(input);
134        self
135    }
136    /// <p>This data type is deprecated. Instead, use <code>ParameterFilters</code>.</p>
137    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParametersFilter>> {
138        self.inner.get_filters()
139    }
140    ///
141    /// Appends an item to `ParameterFilters`.
142    ///
143    /// To override the contents of this collection use [`set_parameter_filters`](Self::set_parameter_filters).
144    ///
145    /// <p>Filters to limit the request results.</p>
146    pub fn parameter_filters(mut self, input: crate::types::ParameterStringFilter) -> Self {
147        self.inner = self.inner.parameter_filters(input);
148        self
149    }
150    /// <p>Filters to limit the request results.</p>
151    pub fn set_parameter_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ParameterStringFilter>>) -> Self {
152        self.inner = self.inner.set_parameter_filters(input);
153        self
154    }
155    /// <p>Filters to limit the request results.</p>
156    pub fn get_parameter_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ParameterStringFilter>> {
157        self.inner.get_parameter_filters()
158    }
159    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
160    pub fn max_results(mut self, input: i32) -> Self {
161        self.inner = self.inner.max_results(input);
162        self
163    }
164    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
165    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
166        self.inner = self.inner.set_max_results(input);
167        self
168    }
169    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
170    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
171        self.inner.get_max_results()
172    }
173    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
174    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
175        self.inner = self.inner.next_token(input.into());
176        self
177    }
178    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
179    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
180        self.inner = self.inner.set_next_token(input);
181        self
182    }
183    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
184    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
185        self.inner.get_next_token()
186    }
187    /// <p>Lists parameters that are shared with you.</p><note>
188    /// <p>By default when using this option, the command returns parameters that have been shared using a standard Resource Access Manager Resource Share. In order for a parameter that was shared using the <code>PutResourcePolicy</code> command to be returned, the associated <code>RAM Resource Share Created From Policy</code> must have been promoted to a standard Resource Share using the RAM <a href="https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html">PromoteResourceShareCreatedFromPolicy</a> API operation.</p>
189    /// <p>For more information about sharing parameters, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html">Working with shared parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
190    /// </note>
191    pub fn shared(mut self, input: bool) -> Self {
192        self.inner = self.inner.shared(input);
193        self
194    }
195    /// <p>Lists parameters that are shared with you.</p><note>
196    /// <p>By default when using this option, the command returns parameters that have been shared using a standard Resource Access Manager Resource Share. In order for a parameter that was shared using the <code>PutResourcePolicy</code> command to be returned, the associated <code>RAM Resource Share Created From Policy</code> must have been promoted to a standard Resource Share using the RAM <a href="https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html">PromoteResourceShareCreatedFromPolicy</a> API operation.</p>
197    /// <p>For more information about sharing parameters, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html">Working with shared parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
198    /// </note>
199    pub fn set_shared(mut self, input: ::std::option::Option<bool>) -> Self {
200        self.inner = self.inner.set_shared(input);
201        self
202    }
203    /// <p>Lists parameters that are shared with you.</p><note>
204    /// <p>By default when using this option, the command returns parameters that have been shared using a standard Resource Access Manager Resource Share. In order for a parameter that was shared using the <code>PutResourcePolicy</code> command to be returned, the associated <code>RAM Resource Share Created From Policy</code> must have been promoted to a standard Resource Share using the RAM <a href="https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html">PromoteResourceShareCreatedFromPolicy</a> API operation.</p>
205    /// <p>For more information about sharing parameters, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html">Working with shared parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
206    /// </note>
207    pub fn get_shared(&self) -> &::std::option::Option<bool> {
208        self.inner.get_shared()
209    }
210}