aws_sdk_secretsmanager/operation/list_secret_version_ids/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_secret_version_ids::_list_secret_version_ids_output::ListSecretVersionIdsOutputBuilder;
3
4pub use crate::operation::list_secret_version_ids::_list_secret_version_ids_input::ListSecretVersionIdsInputBuilder;
5
6impl crate::operation::list_secret_version_ids::builders::ListSecretVersionIdsInputBuilder {
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::list_secret_version_ids::ListSecretVersionIdsOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::list_secret_version_ids::ListSecretVersionIdsError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.list_secret_version_ids();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `ListSecretVersionIds`.
24///
25/// <p>Lists the versions of a secret. Secrets Manager uses staging labels to indicate the different versions of a secret. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/getting-started.html#term_version"> Secrets Manager concepts: Versions</a>.</p>
26/// <p>To list the secrets in the account, use <code>ListSecrets</code>.</p>
27/// <p>Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html">Logging Secrets Manager events with CloudTrail</a>.</p>
28/// <p><b>Required permissions: </b> <code>secretsmanager:ListSecretVersionIds</code>. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions"> IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication and access control in Secrets Manager</a>.</p>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct ListSecretVersionIdsFluentBuilder {
31 handle: ::std::sync::Arc<crate::client::Handle>,
32 inner: crate::operation::list_secret_version_ids::builders::ListSecretVersionIdsInputBuilder,
33 config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36 crate::client::customize::internal::CustomizableSend<
37 crate::operation::list_secret_version_ids::ListSecretVersionIdsOutput,
38 crate::operation::list_secret_version_ids::ListSecretVersionIdsError,
39 > for ListSecretVersionIdsFluentBuilder
40{
41 fn send(
42 self,
43 config_override: crate::config::Builder,
44 ) -> crate::client::customize::internal::BoxFuture<
45 crate::client::customize::internal::SendResult<
46 crate::operation::list_secret_version_ids::ListSecretVersionIdsOutput,
47 crate::operation::list_secret_version_ids::ListSecretVersionIdsError,
48 >,
49 > {
50 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51 }
52}
53impl ListSecretVersionIdsFluentBuilder {
54 /// Creates a new `ListSecretVersionIdsFluentBuilder`.
55 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56 Self {
57 handle,
58 inner: ::std::default::Default::default(),
59 config_override: ::std::option::Option::None,
60 }
61 }
62 /// Access the ListSecretVersionIds as a reference.
63 pub fn as_input(&self) -> &crate::operation::list_secret_version_ids::builders::ListSecretVersionIdsInputBuilder {
64 &self.inner
65 }
66 /// Sends the request and returns the response.
67 ///
68 /// If an error occurs, an `SdkError` will be returned with additional details that
69 /// can be matched against.
70 ///
71 /// By default, any retryable failures will be retried twice. Retry behavior
72 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73 /// set when configuring the client.
74 pub async fn send(
75 self,
76 ) -> ::std::result::Result<
77 crate::operation::list_secret_version_ids::ListSecretVersionIdsOutput,
78 ::aws_smithy_runtime_api::client::result::SdkError<
79 crate::operation::list_secret_version_ids::ListSecretVersionIdsError,
80 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81 >,
82 > {
83 let input = self
84 .inner
85 .build()
86 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87 let runtime_plugins = crate::operation::list_secret_version_ids::ListSecretVersionIds::operation_runtime_plugins(
88 self.handle.runtime_plugins.clone(),
89 &self.handle.conf,
90 self.config_override,
91 );
92 crate::operation::list_secret_version_ids::ListSecretVersionIds::orchestrate(&runtime_plugins, input).await
93 }
94
95 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
96 pub fn customize(
97 self,
98 ) -> crate::client::customize::CustomizableOperation<
99 crate::operation::list_secret_version_ids::ListSecretVersionIdsOutput,
100 crate::operation::list_secret_version_ids::ListSecretVersionIdsError,
101 Self,
102 > {
103 crate::client::customize::CustomizableOperation::new(self)
104 }
105 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
106 self.set_config_override(::std::option::Option::Some(config_override.into()));
107 self
108 }
109
110 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
111 self.config_override = config_override;
112 self
113 }
114 /// Create a paginator for this request
115 ///
116 /// Paginators are used by calling [`send().await`](crate::operation::list_secret_version_ids::paginator::ListSecretVersionIdsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
117 pub fn into_paginator(self) -> crate::operation::list_secret_version_ids::paginator::ListSecretVersionIdsPaginator {
118 crate::operation::list_secret_version_ids::paginator::ListSecretVersionIdsPaginator::new(self.handle, self.inner)
119 }
120 /// <p>The ARN or name of the secret whose versions you want to list.</p>
121 /// <p>For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding a secret from a partial ARN</a>.</p>
122 pub fn secret_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.inner = self.inner.secret_id(input.into());
124 self
125 }
126 /// <p>The ARN or name of the secret whose versions you want to list.</p>
127 /// <p>For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding a secret from a partial ARN</a>.</p>
128 pub fn set_secret_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129 self.inner = self.inner.set_secret_id(input);
130 self
131 }
132 /// <p>The ARN or name of the secret whose versions you want to list.</p>
133 /// <p>For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding a secret from a partial ARN</a>.</p>
134 pub fn get_secret_id(&self) -> &::std::option::Option<::std::string::String> {
135 self.inner.get_secret_id()
136 }
137 /// <p>The number of results to include in the response.</p>
138 /// <p>If there are more results available, in the response, Secrets Manager includes <code>NextToken</code>. To get the next results, call <code>ListSecretVersionIds</code> again with the value from <code>NextToken</code>.</p>
139 pub fn max_results(mut self, input: i32) -> Self {
140 self.inner = self.inner.max_results(input);
141 self
142 }
143 /// <p>The number of results to include in the response.</p>
144 /// <p>If there are more results available, in the response, Secrets Manager includes <code>NextToken</code>. To get the next results, call <code>ListSecretVersionIds</code> again with the value from <code>NextToken</code>.</p>
145 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
146 self.inner = self.inner.set_max_results(input);
147 self
148 }
149 /// <p>The number of results to include in the response.</p>
150 /// <p>If there are more results available, in the response, Secrets Manager includes <code>NextToken</code>. To get the next results, call <code>ListSecretVersionIds</code> again with the value from <code>NextToken</code>.</p>
151 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
152 self.inner.get_max_results()
153 }
154 /// <p>A token that indicates where the output should continue from, if a previous call did not show all results. To get the next results, call <code>ListSecretVersionIds</code> again with this value.</p>
155 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156 self.inner = self.inner.next_token(input.into());
157 self
158 }
159 /// <p>A token that indicates where the output should continue from, if a previous call did not show all results. To get the next results, call <code>ListSecretVersionIds</code> again with this value.</p>
160 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
161 self.inner = self.inner.set_next_token(input);
162 self
163 }
164 /// <p>A token that indicates where the output should continue from, if a previous call did not show all results. To get the next results, call <code>ListSecretVersionIds</code> again with this value.</p>
165 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
166 self.inner.get_next_token()
167 }
168 /// <p>Specifies whether to include versions of secrets that don't have any staging labels attached to them. Versions without staging labels are considered deprecated and are subject to deletion by Secrets Manager. By default, versions without staging labels aren't included.</p>
169 pub fn include_deprecated(mut self, input: bool) -> Self {
170 self.inner = self.inner.include_deprecated(input);
171 self
172 }
173 /// <p>Specifies whether to include versions of secrets that don't have any staging labels attached to them. Versions without staging labels are considered deprecated and are subject to deletion by Secrets Manager. By default, versions without staging labels aren't included.</p>
174 pub fn set_include_deprecated(mut self, input: ::std::option::Option<bool>) -> Self {
175 self.inner = self.inner.set_include_deprecated(input);
176 self
177 }
178 /// <p>Specifies whether to include versions of secrets that don't have any staging labels attached to them. Versions without staging labels are considered deprecated and are subject to deletion by Secrets Manager. By default, versions without staging labels aren't included.</p>
179 pub fn get_include_deprecated(&self) -> &::std::option::Option<bool> {
180 self.inner.get_include_deprecated()
181 }
182}