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_input::ListSecretVersionIdsInputBuilder;
3
4pub use crate::operation::list_secret_version_ids::_list_secret_version_ids_output::ListSecretVersionIdsOutputBuilder;
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><note>
27/// <p><code>ListSecretVersionIds</code> only returns versions that contain a secret value. To see all version IDs that have staging labels attached, including ones without a secret value, call <code>DescribeSecret</code> and check <code>VersionIdsToStages</code>.</p>
28/// </note>
29/// <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>
30/// <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>
31#[derive(::std::clone::Clone, ::std::fmt::Debug)]
32pub struct ListSecretVersionIdsFluentBuilder {
33 handle: ::std::sync::Arc<crate::client::Handle>,
34 inner: crate::operation::list_secret_version_ids::builders::ListSecretVersionIdsInputBuilder,
35 config_override: ::std::option::Option<crate::config::Builder>,
36}
37impl
38 crate::client::customize::internal::CustomizableSend<
39 crate::operation::list_secret_version_ids::ListSecretVersionIdsOutput,
40 crate::operation::list_secret_version_ids::ListSecretVersionIdsError,
41 > for ListSecretVersionIdsFluentBuilder
42{
43 fn send(
44 self,
45 config_override: crate::config::Builder,
46 ) -> crate::client::customize::internal::BoxFuture<
47 crate::client::customize::internal::SendResult<
48 crate::operation::list_secret_version_ids::ListSecretVersionIdsOutput,
49 crate::operation::list_secret_version_ids::ListSecretVersionIdsError,
50 >,
51 > {
52 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
53 }
54}
55impl ListSecretVersionIdsFluentBuilder {
56 /// Creates a new `ListSecretVersionIdsFluentBuilder`.
57 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
58 Self {
59 handle,
60 inner: ::std::default::Default::default(),
61 config_override: ::std::option::Option::None,
62 }
63 }
64 /// Access the ListSecretVersionIds as a reference.
65 pub fn as_input(&self) -> &crate::operation::list_secret_version_ids::builders::ListSecretVersionIdsInputBuilder {
66 &self.inner
67 }
68 /// Sends the request and returns the response.
69 ///
70 /// If an error occurs, an `SdkError` will be returned with additional details that
71 /// can be matched against.
72 ///
73 /// By default, any retryable failures will be retried twice. Retry behavior
74 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
75 /// set when configuring the client.
76 pub async fn send(
77 self,
78 ) -> ::std::result::Result<
79 crate::operation::list_secret_version_ids::ListSecretVersionIdsOutput,
80 ::aws_smithy_runtime_api::client::result::SdkError<
81 crate::operation::list_secret_version_ids::ListSecretVersionIdsError,
82 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
83 >,
84 > {
85 let input = self
86 .inner
87 .build()
88 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
89 let runtime_plugins = crate::operation::list_secret_version_ids::ListSecretVersionIds::operation_runtime_plugins(
90 self.handle.runtime_plugins.clone(),
91 &self.handle.conf,
92 self.config_override,
93 );
94 crate::operation::list_secret_version_ids::ListSecretVersionIds::orchestrate(&runtime_plugins, input).await
95 }
96
97 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
98 pub fn customize(
99 self,
100 ) -> crate::client::customize::CustomizableOperation<
101 crate::operation::list_secret_version_ids::ListSecretVersionIdsOutput,
102 crate::operation::list_secret_version_ids::ListSecretVersionIdsError,
103 Self,
104 > {
105 crate::client::customize::CustomizableOperation::new(self)
106 }
107 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
108 self.set_config_override(::std::option::Option::Some(config_override.into()));
109 self
110 }
111
112 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
113 self.config_override = config_override;
114 self
115 }
116 /// Create a paginator for this request
117 ///
118 /// 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).
119 pub fn into_paginator(self) -> crate::operation::list_secret_version_ids::paginator::ListSecretVersionIdsPaginator {
120 crate::operation::list_secret_version_ids::paginator::ListSecretVersionIdsPaginator::new(self.handle, self.inner)
121 }
122 /// <p>The ARN or name of the secret whose versions you want to list.</p>
123 /// <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>
124 pub fn secret_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125 self.inner = self.inner.secret_id(input.into());
126 self
127 }
128 /// <p>The ARN or name of the secret whose versions you want to list.</p>
129 /// <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>
130 pub fn set_secret_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131 self.inner = self.inner.set_secret_id(input);
132 self
133 }
134 /// <p>The ARN or name of the secret whose versions you want to list.</p>
135 /// <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>
136 pub fn get_secret_id(&self) -> &::std::option::Option<::std::string::String> {
137 self.inner.get_secret_id()
138 }
139 /// <p>The number of results to include in the response.</p>
140 /// <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>
141 pub fn max_results(mut self, input: i32) -> Self {
142 self.inner = self.inner.max_results(input);
143 self
144 }
145 /// <p>The number of results to include in the response.</p>
146 /// <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>
147 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
148 self.inner = self.inner.set_max_results(input);
149 self
150 }
151 /// <p>The number of results to include in the response.</p>
152 /// <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>
153 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
154 self.inner.get_max_results()
155 }
156 /// <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>
157 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158 self.inner = self.inner.next_token(input.into());
159 self
160 }
161 /// <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>
162 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163 self.inner = self.inner.set_next_token(input);
164 self
165 }
166 /// <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>
167 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
168 self.inner.get_next_token()
169 }
170 /// <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>
171 pub fn include_deprecated(mut self, input: bool) -> Self {
172 self.inner = self.inner.include_deprecated(input);
173 self
174 }
175 /// <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>
176 pub fn set_include_deprecated(mut self, input: ::std::option::Option<bool>) -> Self {
177 self.inner = self.inner.set_include_deprecated(input);
178 self
179 }
180 /// <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>
181 pub fn get_include_deprecated(&self) -> &::std::option::Option<bool> {
182 self.inner.get_include_deprecated()
183 }
184}