aws_sdk_secretsmanager/operation/put_secret_value/
_put_secret_value_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct PutSecretValueInput {
6    /// <p>The ARN or name of the secret to add a new version to.</p>
7    /// <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>
8    /// <p>If the secret doesn't already exist, use <code>CreateSecret</code> instead.</p>
9    pub secret_id: ::std::option::Option<::std::string::String>,
10    /// <p>A unique identifier for the new version of the secret.</p><note>
11    /// <p>If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs to call this operation, then you can leave this parameter empty. The CLI or SDK generates a random UUID for you and includes it as the value for this parameter in the request.</p>
12    /// </note>
13    /// <p>If you generate a raw HTTP request to the Secrets Manager service endpoint, then you must generate a <code>ClientRequestToken</code> and include it in the request.</p>
14    /// <p>This value helps ensure idempotency. Secrets Manager uses this value to prevent the accidental creation of duplicate versions if there are failures and retries during a rotation. We recommend that you generate a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID-type</a> value to ensure uniqueness of your versions within the specified secret.</p>
15    /// <ul>
16    /// <li>
17    /// <p>If the <code>ClientRequestToken</code> value isn't already associated with a version of the secret then a new version of the secret is created.</p></li>
18    /// <li>
19    /// <p>If a version with this value already exists and that version's <code>SecretString</code> or <code>SecretBinary</code> values are the same as those in the request then the request is ignored. The operation is idempotent.</p></li>
20    /// <li>
21    /// <p>If a version with this value already exists and the version of the <code>SecretString</code> and <code>SecretBinary</code> values are different from those in the request, then the request fails because you can't modify a secret version. You can only create new versions to store new secret values.</p></li>
22    /// </ul>
23    /// <p>This value becomes the <code>VersionId</code> of the new version.</p>
24    pub client_request_token: ::std::option::Option<::std::string::String>,
25    /// <p>The binary data to encrypt and store in the new version of the secret. To use this parameter in the command-line tools, we recommend that you store your binary data in a file and then pass the contents of the file as a parameter.</p>
26    /// <p>You must include <code>SecretBinary</code> or <code>SecretString</code>, but not both.</p>
27    /// <p>You can't access this value from the Secrets Manager console.</p>
28    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
29    pub secret_binary: ::std::option::Option<::aws_smithy_types::Blob>,
30    /// <p>The text to encrypt and store in the new version of the secret.</p>
31    /// <p>You must include <code>SecretBinary</code> or <code>SecretString</code>, but not both.</p>
32    /// <p>We recommend you create the secret string as JSON key/value pairs, as shown in the example.</p>
33    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
34    pub secret_string: ::std::option::Option<::std::string::String>,
35    /// <p>A list of staging labels to attach to this version of the secret. Secrets Manager uses staging labels to track versions of a secret through the rotation process.</p>
36    /// <p>If you specify a staging label that's already associated with a different version of the same secret, then Secrets Manager removes the label from the other version and attaches it to this version. If you specify <code>AWSCURRENT</code>, and it is already attached to another version, then Secrets Manager also moves the staging label <code>AWSPREVIOUS</code> to the version that <code>AWSCURRENT</code> was removed from.</p>
37    /// <p>If you don't include <code>VersionStages</code>, then Secrets Manager automatically moves the staging label <code>AWSCURRENT</code> to this version.</p>
38    pub version_stages: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
39    /// <p>A unique identifier that indicates the source of the request. For cross-account rotation (when you rotate a secret in one account by using a Lambda rotation function in another account) and the Lambda rotation function assumes an IAM role to call Secrets Manager, Secrets Manager validates the identity with the rotation token. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html">How rotation works</a>.</p>
40    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
41    pub rotation_token: ::std::option::Option<::std::string::String>,
42}
43impl PutSecretValueInput {
44    /// <p>The ARN or name of the secret to add a new version to.</p>
45    /// <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>
46    /// <p>If the secret doesn't already exist, use <code>CreateSecret</code> instead.</p>
47    pub fn secret_id(&self) -> ::std::option::Option<&str> {
48        self.secret_id.as_deref()
49    }
50    /// <p>A unique identifier for the new version of the secret.</p><note>
51    /// <p>If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs to call this operation, then you can leave this parameter empty. The CLI or SDK generates a random UUID for you and includes it as the value for this parameter in the request.</p>
52    /// </note>
53    /// <p>If you generate a raw HTTP request to the Secrets Manager service endpoint, then you must generate a <code>ClientRequestToken</code> and include it in the request.</p>
54    /// <p>This value helps ensure idempotency. Secrets Manager uses this value to prevent the accidental creation of duplicate versions if there are failures and retries during a rotation. We recommend that you generate a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID-type</a> value to ensure uniqueness of your versions within the specified secret.</p>
55    /// <ul>
56    /// <li>
57    /// <p>If the <code>ClientRequestToken</code> value isn't already associated with a version of the secret then a new version of the secret is created.</p></li>
58    /// <li>
59    /// <p>If a version with this value already exists and that version's <code>SecretString</code> or <code>SecretBinary</code> values are the same as those in the request then the request is ignored. The operation is idempotent.</p></li>
60    /// <li>
61    /// <p>If a version with this value already exists and the version of the <code>SecretString</code> and <code>SecretBinary</code> values are different from those in the request, then the request fails because you can't modify a secret version. You can only create new versions to store new secret values.</p></li>
62    /// </ul>
63    /// <p>This value becomes the <code>VersionId</code> of the new version.</p>
64    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
65        self.client_request_token.as_deref()
66    }
67    /// <p>The binary data to encrypt and store in the new version of the secret. To use this parameter in the command-line tools, we recommend that you store your binary data in a file and then pass the contents of the file as a parameter.</p>
68    /// <p>You must include <code>SecretBinary</code> or <code>SecretString</code>, but not both.</p>
69    /// <p>You can't access this value from the Secrets Manager console.</p>
70    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
71    pub fn secret_binary(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
72        self.secret_binary.as_ref()
73    }
74    /// <p>The text to encrypt and store in the new version of the secret.</p>
75    /// <p>You must include <code>SecretBinary</code> or <code>SecretString</code>, but not both.</p>
76    /// <p>We recommend you create the secret string as JSON key/value pairs, as shown in the example.</p>
77    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
78    pub fn secret_string(&self) -> ::std::option::Option<&str> {
79        self.secret_string.as_deref()
80    }
81    /// <p>A list of staging labels to attach to this version of the secret. Secrets Manager uses staging labels to track versions of a secret through the rotation process.</p>
82    /// <p>If you specify a staging label that's already associated with a different version of the same secret, then Secrets Manager removes the label from the other version and attaches it to this version. If you specify <code>AWSCURRENT</code>, and it is already attached to another version, then Secrets Manager also moves the staging label <code>AWSPREVIOUS</code> to the version that <code>AWSCURRENT</code> was removed from.</p>
83    /// <p>If you don't include <code>VersionStages</code>, then Secrets Manager automatically moves the staging label <code>AWSCURRENT</code> to this version.</p>
84    ///
85    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.version_stages.is_none()`.
86    pub fn version_stages(&self) -> &[::std::string::String] {
87        self.version_stages.as_deref().unwrap_or_default()
88    }
89    /// <p>A unique identifier that indicates the source of the request. For cross-account rotation (when you rotate a secret in one account by using a Lambda rotation function in another account) and the Lambda rotation function assumes an IAM role to call Secrets Manager, Secrets Manager validates the identity with the rotation token. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html">How rotation works</a>.</p>
90    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
91    pub fn rotation_token(&self) -> ::std::option::Option<&str> {
92        self.rotation_token.as_deref()
93    }
94}
95impl ::std::fmt::Debug for PutSecretValueInput {
96    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
97        let mut formatter = f.debug_struct("PutSecretValueInput");
98        formatter.field("secret_id", &self.secret_id);
99        formatter.field("client_request_token", &self.client_request_token);
100        formatter.field("secret_binary", &"*** Sensitive Data Redacted ***");
101        formatter.field("secret_string", &"*** Sensitive Data Redacted ***");
102        formatter.field("version_stages", &self.version_stages);
103        formatter.field("rotation_token", &"*** Sensitive Data Redacted ***");
104        formatter.finish()
105    }
106}
107impl PutSecretValueInput {
108    /// Creates a new builder-style object to manufacture [`PutSecretValueInput`](crate::operation::put_secret_value::PutSecretValueInput).
109    pub fn builder() -> crate::operation::put_secret_value::builders::PutSecretValueInputBuilder {
110        crate::operation::put_secret_value::builders::PutSecretValueInputBuilder::default()
111    }
112}
113
114/// A builder for [`PutSecretValueInput`](crate::operation::put_secret_value::PutSecretValueInput).
115#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
116#[non_exhaustive]
117pub struct PutSecretValueInputBuilder {
118    pub(crate) secret_id: ::std::option::Option<::std::string::String>,
119    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
120    pub(crate) secret_binary: ::std::option::Option<::aws_smithy_types::Blob>,
121    pub(crate) secret_string: ::std::option::Option<::std::string::String>,
122    pub(crate) version_stages: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
123    pub(crate) rotation_token: ::std::option::Option<::std::string::String>,
124}
125impl PutSecretValueInputBuilder {
126    /// <p>The ARN or name of the secret to add a new version to.</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    /// <p>If the secret doesn't already exist, use <code>CreateSecret</code> instead.</p>
129    /// This field is required.
130    pub fn secret_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.secret_id = ::std::option::Option::Some(input.into());
132        self
133    }
134    /// <p>The ARN or name of the secret to add a new version to.</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    /// <p>If the secret doesn't already exist, use <code>CreateSecret</code> instead.</p>
137    pub fn set_secret_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138        self.secret_id = input;
139        self
140    }
141    /// <p>The ARN or name of the secret to add a new version to.</p>
142    /// <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>
143    /// <p>If the secret doesn't already exist, use <code>CreateSecret</code> instead.</p>
144    pub fn get_secret_id(&self) -> &::std::option::Option<::std::string::String> {
145        &self.secret_id
146    }
147    /// <p>A unique identifier for the new version of the secret.</p><note>
148    /// <p>If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs to call this operation, then you can leave this parameter empty. The CLI or SDK generates a random UUID for you and includes it as the value for this parameter in the request.</p>
149    /// </note>
150    /// <p>If you generate a raw HTTP request to the Secrets Manager service endpoint, then you must generate a <code>ClientRequestToken</code> and include it in the request.</p>
151    /// <p>This value helps ensure idempotency. Secrets Manager uses this value to prevent the accidental creation of duplicate versions if there are failures and retries during a rotation. We recommend that you generate a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID-type</a> value to ensure uniqueness of your versions within the specified secret.</p>
152    /// <ul>
153    /// <li>
154    /// <p>If the <code>ClientRequestToken</code> value isn't already associated with a version of the secret then a new version of the secret is created.</p></li>
155    /// <li>
156    /// <p>If a version with this value already exists and that version's <code>SecretString</code> or <code>SecretBinary</code> values are the same as those in the request then the request is ignored. The operation is idempotent.</p></li>
157    /// <li>
158    /// <p>If a version with this value already exists and the version of the <code>SecretString</code> and <code>SecretBinary</code> values are different from those in the request, then the request fails because you can't modify a secret version. You can only create new versions to store new secret values.</p></li>
159    /// </ul>
160    /// <p>This value becomes the <code>VersionId</code> of the new version.</p>
161    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
162        self.client_request_token = ::std::option::Option::Some(input.into());
163        self
164    }
165    /// <p>A unique identifier for the new version of the secret.</p><note>
166    /// <p>If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs to call this operation, then you can leave this parameter empty. The CLI or SDK generates a random UUID for you and includes it as the value for this parameter in the request.</p>
167    /// </note>
168    /// <p>If you generate a raw HTTP request to the Secrets Manager service endpoint, then you must generate a <code>ClientRequestToken</code> and include it in the request.</p>
169    /// <p>This value helps ensure idempotency. Secrets Manager uses this value to prevent the accidental creation of duplicate versions if there are failures and retries during a rotation. We recommend that you generate a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID-type</a> value to ensure uniqueness of your versions within the specified secret.</p>
170    /// <ul>
171    /// <li>
172    /// <p>If the <code>ClientRequestToken</code> value isn't already associated with a version of the secret then a new version of the secret is created.</p></li>
173    /// <li>
174    /// <p>If a version with this value already exists and that version's <code>SecretString</code> or <code>SecretBinary</code> values are the same as those in the request then the request is ignored. The operation is idempotent.</p></li>
175    /// <li>
176    /// <p>If a version with this value already exists and the version of the <code>SecretString</code> and <code>SecretBinary</code> values are different from those in the request, then the request fails because you can't modify a secret version. You can only create new versions to store new secret values.</p></li>
177    /// </ul>
178    /// <p>This value becomes the <code>VersionId</code> of the new version.</p>
179    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
180        self.client_request_token = input;
181        self
182    }
183    /// <p>A unique identifier for the new version of the secret.</p><note>
184    /// <p>If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs to call this operation, then you can leave this parameter empty. The CLI or SDK generates a random UUID for you and includes it as the value for this parameter in the request.</p>
185    /// </note>
186    /// <p>If you generate a raw HTTP request to the Secrets Manager service endpoint, then you must generate a <code>ClientRequestToken</code> and include it in the request.</p>
187    /// <p>This value helps ensure idempotency. Secrets Manager uses this value to prevent the accidental creation of duplicate versions if there are failures and retries during a rotation. We recommend that you generate a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID-type</a> value to ensure uniqueness of your versions within the specified secret.</p>
188    /// <ul>
189    /// <li>
190    /// <p>If the <code>ClientRequestToken</code> value isn't already associated with a version of the secret then a new version of the secret is created.</p></li>
191    /// <li>
192    /// <p>If a version with this value already exists and that version's <code>SecretString</code> or <code>SecretBinary</code> values are the same as those in the request then the request is ignored. The operation is idempotent.</p></li>
193    /// <li>
194    /// <p>If a version with this value already exists and the version of the <code>SecretString</code> and <code>SecretBinary</code> values are different from those in the request, then the request fails because you can't modify a secret version. You can only create new versions to store new secret values.</p></li>
195    /// </ul>
196    /// <p>This value becomes the <code>VersionId</code> of the new version.</p>
197    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
198        &self.client_request_token
199    }
200    /// <p>The binary data to encrypt and store in the new version of the secret. To use this parameter in the command-line tools, we recommend that you store your binary data in a file and then pass the contents of the file as a parameter.</p>
201    /// <p>You must include <code>SecretBinary</code> or <code>SecretString</code>, but not both.</p>
202    /// <p>You can't access this value from the Secrets Manager console.</p>
203    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
204    pub fn secret_binary(mut self, input: ::aws_smithy_types::Blob) -> Self {
205        self.secret_binary = ::std::option::Option::Some(input);
206        self
207    }
208    /// <p>The binary data to encrypt and store in the new version of the secret. To use this parameter in the command-line tools, we recommend that you store your binary data in a file and then pass the contents of the file as a parameter.</p>
209    /// <p>You must include <code>SecretBinary</code> or <code>SecretString</code>, but not both.</p>
210    /// <p>You can't access this value from the Secrets Manager console.</p>
211    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
212    pub fn set_secret_binary(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
213        self.secret_binary = input;
214        self
215    }
216    /// <p>The binary data to encrypt and store in the new version of the secret. To use this parameter in the command-line tools, we recommend that you store your binary data in a file and then pass the contents of the file as a parameter.</p>
217    /// <p>You must include <code>SecretBinary</code> or <code>SecretString</code>, but not both.</p>
218    /// <p>You can't access this value from the Secrets Manager console.</p>
219    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
220    pub fn get_secret_binary(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
221        &self.secret_binary
222    }
223    /// <p>The text to encrypt and store in the new version of the secret.</p>
224    /// <p>You must include <code>SecretBinary</code> or <code>SecretString</code>, but not both.</p>
225    /// <p>We recommend you create the secret string as JSON key/value pairs, as shown in the example.</p>
226    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
227    pub fn secret_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
228        self.secret_string = ::std::option::Option::Some(input.into());
229        self
230    }
231    /// <p>The text to encrypt and store in the new version of the secret.</p>
232    /// <p>You must include <code>SecretBinary</code> or <code>SecretString</code>, but not both.</p>
233    /// <p>We recommend you create the secret string as JSON key/value pairs, as shown in the example.</p>
234    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
235    pub fn set_secret_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
236        self.secret_string = input;
237        self
238    }
239    /// <p>The text to encrypt and store in the new version of the secret.</p>
240    /// <p>You must include <code>SecretBinary</code> or <code>SecretString</code>, but not both.</p>
241    /// <p>We recommend you create the secret string as JSON key/value pairs, as shown in the example.</p>
242    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
243    pub fn get_secret_string(&self) -> &::std::option::Option<::std::string::String> {
244        &self.secret_string
245    }
246    /// Appends an item to `version_stages`.
247    ///
248    /// To override the contents of this collection use [`set_version_stages`](Self::set_version_stages).
249    ///
250    /// <p>A list of staging labels to attach to this version of the secret. Secrets Manager uses staging labels to track versions of a secret through the rotation process.</p>
251    /// <p>If you specify a staging label that's already associated with a different version of the same secret, then Secrets Manager removes the label from the other version and attaches it to this version. If you specify <code>AWSCURRENT</code>, and it is already attached to another version, then Secrets Manager also moves the staging label <code>AWSPREVIOUS</code> to the version that <code>AWSCURRENT</code> was removed from.</p>
252    /// <p>If you don't include <code>VersionStages</code>, then Secrets Manager automatically moves the staging label <code>AWSCURRENT</code> to this version.</p>
253    pub fn version_stages(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
254        let mut v = self.version_stages.unwrap_or_default();
255        v.push(input.into());
256        self.version_stages = ::std::option::Option::Some(v);
257        self
258    }
259    /// <p>A list of staging labels to attach to this version of the secret. Secrets Manager uses staging labels to track versions of a secret through the rotation process.</p>
260    /// <p>If you specify a staging label that's already associated with a different version of the same secret, then Secrets Manager removes the label from the other version and attaches it to this version. If you specify <code>AWSCURRENT</code>, and it is already attached to another version, then Secrets Manager also moves the staging label <code>AWSPREVIOUS</code> to the version that <code>AWSCURRENT</code> was removed from.</p>
261    /// <p>If you don't include <code>VersionStages</code>, then Secrets Manager automatically moves the staging label <code>AWSCURRENT</code> to this version.</p>
262    pub fn set_version_stages(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
263        self.version_stages = input;
264        self
265    }
266    /// <p>A list of staging labels to attach to this version of the secret. Secrets Manager uses staging labels to track versions of a secret through the rotation process.</p>
267    /// <p>If you specify a staging label that's already associated with a different version of the same secret, then Secrets Manager removes the label from the other version and attaches it to this version. If you specify <code>AWSCURRENT</code>, and it is already attached to another version, then Secrets Manager also moves the staging label <code>AWSPREVIOUS</code> to the version that <code>AWSCURRENT</code> was removed from.</p>
268    /// <p>If you don't include <code>VersionStages</code>, then Secrets Manager automatically moves the staging label <code>AWSCURRENT</code> to this version.</p>
269    pub fn get_version_stages(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
270        &self.version_stages
271    }
272    /// <p>A unique identifier that indicates the source of the request. For cross-account rotation (when you rotate a secret in one account by using a Lambda rotation function in another account) and the Lambda rotation function assumes an IAM role to call Secrets Manager, Secrets Manager validates the identity with the rotation token. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html">How rotation works</a>.</p>
273    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
274    pub fn rotation_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
275        self.rotation_token = ::std::option::Option::Some(input.into());
276        self
277    }
278    /// <p>A unique identifier that indicates the source of the request. For cross-account rotation (when you rotate a secret in one account by using a Lambda rotation function in another account) and the Lambda rotation function assumes an IAM role to call Secrets Manager, Secrets Manager validates the identity with the rotation token. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html">How rotation works</a>.</p>
279    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
280    pub fn set_rotation_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
281        self.rotation_token = input;
282        self
283    }
284    /// <p>A unique identifier that indicates the source of the request. For cross-account rotation (when you rotate a secret in one account by using a Lambda rotation function in another account) and the Lambda rotation function assumes an IAM role to call Secrets Manager, Secrets Manager validates the identity with the rotation token. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html">How rotation works</a>.</p>
285    /// <p>Sensitive: This field contains sensitive information, so the service does not include it in CloudTrail log entries. If you create your own log entries, you must also avoid logging the information in this field.</p>
286    pub fn get_rotation_token(&self) -> &::std::option::Option<::std::string::String> {
287        &self.rotation_token
288    }
289    /// Consumes the builder and constructs a [`PutSecretValueInput`](crate::operation::put_secret_value::PutSecretValueInput).
290    pub fn build(
291        self,
292    ) -> ::std::result::Result<crate::operation::put_secret_value::PutSecretValueInput, ::aws_smithy_types::error::operation::BuildError> {
293        ::std::result::Result::Ok(crate::operation::put_secret_value::PutSecretValueInput {
294            secret_id: self.secret_id,
295            client_request_token: self.client_request_token,
296            secret_binary: self.secret_binary,
297            secret_string: self.secret_string,
298            version_stages: self.version_stages,
299            rotation_token: self.rotation_token,
300        })
301    }
302}
303impl ::std::fmt::Debug for PutSecretValueInputBuilder {
304    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
305        let mut formatter = f.debug_struct("PutSecretValueInputBuilder");
306        formatter.field("secret_id", &self.secret_id);
307        formatter.field("client_request_token", &self.client_request_token);
308        formatter.field("secret_binary", &"*** Sensitive Data Redacted ***");
309        formatter.field("secret_string", &"*** Sensitive Data Redacted ***");
310        formatter.field("version_stages", &self.version_stages);
311        formatter.field("rotation_token", &"*** Sensitive Data Redacted ***");
312        formatter.finish()
313    }
314}