1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RotateSecretInput {
/// <p>The ARN or name of the secret to rotate.</p>
/// <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>
pub secret_id: ::std::option::Option<::std::string::String>,
/// <p>A unique identifier for the new version of the secret. You only need to specify this value if you implement your own retry logic and you want to ensure that Secrets Manager doesn't attempt to create a secret version twice.</p><note>
/// <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>
/// </note>
/// <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>
/// <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>
pub client_request_token: ::std::option::Option<::std::string::String>,
/// <p>For secrets that use a Lambda rotation function to rotate, the ARN of the Lambda rotation function.</p>
/// <p>For secrets that use <i>managed rotation</i>, omit this field. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_managed.html">Managed rotation</a> in the <i>Secrets Manager User Guide</i>.</p>
pub rotation_lambda_arn: ::std::option::Option<::std::string::String>,
/// <p>A structure that defines the rotation configuration for this secret.</p><important>
/// <p>When changing an existing rotation schedule and setting <code>RotateImmediately</code> to <code>false</code>:</p>
/// <ul>
/// <li>
/// <p>If using <code>AutomaticallyAfterDays</code> or a <code>ScheduleExpression</code> with <code>rate()</code>, the previously scheduled rotation might still occur.</p></li>
/// <li>
/// <p>To prevent unintended rotations, use a <code>ScheduleExpression</code> with <code>cron()</code> for granular control over rotation windows.</p></li>
/// </ul>
/// </important>
pub rotation_rules: ::std::option::Option<crate::types::RotationRulesType>,
/// <p>The metadata needed to successfully rotate a managed external secret. A list of key value pairs in JSON format specified by the partner. For more information about the required information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/managed-external-secrets.html">Using Secrets Manager managed external secrets</a></p>
pub external_secret_rotation_metadata: ::std::option::Option<::std::vec::Vec<crate::types::ExternalSecretRotationMetadataItem>>,
/// <p>The Amazon Resource Name (ARN) of the role that allows Secrets Manager to rotate a secret held by a third-party partner. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-security.html">Security and permissions</a>.</p>
pub external_secret_rotation_role_arn: ::std::option::Option<::std::string::String>,
/// <p>Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in <code>RotateSecretRequest$RotationRules</code>.</p>
/// <p>The default for <code>RotateImmediately</code> is <code>true</code>. If you don't specify this value, Secrets Manager rotates the secret immediately.</p>
/// <p>If you set <code>RotateImmediately</code> to <code>false</code>, Secrets Manager tests the rotation configuration by running the <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html"> <code>testSecret</code> step</a> of the Lambda rotation function. This test creates an <code>AWSPENDING</code> version of the secret and then removes it.</p>
/// <p>When changing an existing rotation schedule and setting <code>RotateImmediately</code> to <code>false</code>:</p>
/// <ul>
/// <li>
/// <p>If using <code>AutomaticallyAfterDays</code> or a <code>ScheduleExpression</code> with <code>rate()</code>, the previously scheduled rotation might still occur.</p></li>
/// <li>
/// <p>To prevent unintended rotations, use a <code>ScheduleExpression</code> with <code>cron()</code> for granular control over rotation windows.</p></li>
/// </ul>
/// <p>Rotation is an asynchronous process. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html">How rotation works</a>.</p>
pub rotate_immediately: ::std::option::Option<bool>,
}
impl RotateSecretInput {
/// <p>The ARN or name of the secret to rotate.</p>
/// <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>
pub fn secret_id(&self) -> ::std::option::Option<&str> {
self.secret_id.as_deref()
}
/// <p>A unique identifier for the new version of the secret. You only need to specify this value if you implement your own retry logic and you want to ensure that Secrets Manager doesn't attempt to create a secret version twice.</p><note>
/// <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>
/// </note>
/// <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>
/// <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>
pub fn client_request_token(&self) -> ::std::option::Option<&str> {
self.client_request_token.as_deref()
}
/// <p>For secrets that use a Lambda rotation function to rotate, the ARN of the Lambda rotation function.</p>
/// <p>For secrets that use <i>managed rotation</i>, omit this field. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_managed.html">Managed rotation</a> in the <i>Secrets Manager User Guide</i>.</p>
pub fn rotation_lambda_arn(&self) -> ::std::option::Option<&str> {
self.rotation_lambda_arn.as_deref()
}
/// <p>A structure that defines the rotation configuration for this secret.</p><important>
/// <p>When changing an existing rotation schedule and setting <code>RotateImmediately</code> to <code>false</code>:</p>
/// <ul>
/// <li>
/// <p>If using <code>AutomaticallyAfterDays</code> or a <code>ScheduleExpression</code> with <code>rate()</code>, the previously scheduled rotation might still occur.</p></li>
/// <li>
/// <p>To prevent unintended rotations, use a <code>ScheduleExpression</code> with <code>cron()</code> for granular control over rotation windows.</p></li>
/// </ul>
/// </important>
pub fn rotation_rules(&self) -> ::std::option::Option<&crate::types::RotationRulesType> {
self.rotation_rules.as_ref()
}
/// <p>The metadata needed to successfully rotate a managed external secret. A list of key value pairs in JSON format specified by the partner. For more information about the required information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/managed-external-secrets.html">Using Secrets Manager managed external secrets</a></p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.external_secret_rotation_metadata.is_none()`.
pub fn external_secret_rotation_metadata(&self) -> &[crate::types::ExternalSecretRotationMetadataItem] {
self.external_secret_rotation_metadata.as_deref().unwrap_or_default()
}
/// <p>The Amazon Resource Name (ARN) of the role that allows Secrets Manager to rotate a secret held by a third-party partner. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-security.html">Security and permissions</a>.</p>
pub fn external_secret_rotation_role_arn(&self) -> ::std::option::Option<&str> {
self.external_secret_rotation_role_arn.as_deref()
}
/// <p>Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in <code>RotateSecretRequest$RotationRules</code>.</p>
/// <p>The default for <code>RotateImmediately</code> is <code>true</code>. If you don't specify this value, Secrets Manager rotates the secret immediately.</p>
/// <p>If you set <code>RotateImmediately</code> to <code>false</code>, Secrets Manager tests the rotation configuration by running the <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html"> <code>testSecret</code> step</a> of the Lambda rotation function. This test creates an <code>AWSPENDING</code> version of the secret and then removes it.</p>
/// <p>When changing an existing rotation schedule and setting <code>RotateImmediately</code> to <code>false</code>:</p>
/// <ul>
/// <li>
/// <p>If using <code>AutomaticallyAfterDays</code> or a <code>ScheduleExpression</code> with <code>rate()</code>, the previously scheduled rotation might still occur.</p></li>
/// <li>
/// <p>To prevent unintended rotations, use a <code>ScheduleExpression</code> with <code>cron()</code> for granular control over rotation windows.</p></li>
/// </ul>
/// <p>Rotation is an asynchronous process. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html">How rotation works</a>.</p>
pub fn rotate_immediately(&self) -> ::std::option::Option<bool> {
self.rotate_immediately
}
}
impl RotateSecretInput {
/// Creates a new builder-style object to manufacture [`RotateSecretInput`](crate::operation::rotate_secret::RotateSecretInput).
pub fn builder() -> crate::operation::rotate_secret::builders::RotateSecretInputBuilder {
crate::operation::rotate_secret::builders::RotateSecretInputBuilder::default()
}
}
/// A builder for [`RotateSecretInput`](crate::operation::rotate_secret::RotateSecretInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RotateSecretInputBuilder {
pub(crate) secret_id: ::std::option::Option<::std::string::String>,
pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
pub(crate) rotation_lambda_arn: ::std::option::Option<::std::string::String>,
pub(crate) rotation_rules: ::std::option::Option<crate::types::RotationRulesType>,
pub(crate) external_secret_rotation_metadata: ::std::option::Option<::std::vec::Vec<crate::types::ExternalSecretRotationMetadataItem>>,
pub(crate) external_secret_rotation_role_arn: ::std::option::Option<::std::string::String>,
pub(crate) rotate_immediately: ::std::option::Option<bool>,
}
impl RotateSecretInputBuilder {
/// <p>The ARN or name of the secret to rotate.</p>
/// <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>
/// This field is required.
pub fn secret_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.secret_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN or name of the secret to rotate.</p>
/// <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>
pub fn set_secret_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.secret_id = input;
self
}
/// <p>The ARN or name of the secret to rotate.</p>
/// <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>
pub fn get_secret_id(&self) -> &::std::option::Option<::std::string::String> {
&self.secret_id
}
/// <p>A unique identifier for the new version of the secret. You only need to specify this value if you implement your own retry logic and you want to ensure that Secrets Manager doesn't attempt to create a secret version twice.</p><note>
/// <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>
/// </note>
/// <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>
/// <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>
pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_request_token = ::std::option::Option::Some(input.into());
self
}
/// <p>A unique identifier for the new version of the secret. You only need to specify this value if you implement your own retry logic and you want to ensure that Secrets Manager doesn't attempt to create a secret version twice.</p><note>
/// <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>
/// </note>
/// <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>
/// <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>
pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_request_token = input;
self
}
/// <p>A unique identifier for the new version of the secret. You only need to specify this value if you implement your own retry logic and you want to ensure that Secrets Manager doesn't attempt to create a secret version twice.</p><note>
/// <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>
/// </note>
/// <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>
/// <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>
pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_request_token
}
/// <p>For secrets that use a Lambda rotation function to rotate, the ARN of the Lambda rotation function.</p>
/// <p>For secrets that use <i>managed rotation</i>, omit this field. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_managed.html">Managed rotation</a> in the <i>Secrets Manager User Guide</i>.</p>
pub fn rotation_lambda_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.rotation_lambda_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>For secrets that use a Lambda rotation function to rotate, the ARN of the Lambda rotation function.</p>
/// <p>For secrets that use <i>managed rotation</i>, omit this field. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_managed.html">Managed rotation</a> in the <i>Secrets Manager User Guide</i>.</p>
pub fn set_rotation_lambda_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.rotation_lambda_arn = input;
self
}
/// <p>For secrets that use a Lambda rotation function to rotate, the ARN of the Lambda rotation function.</p>
/// <p>For secrets that use <i>managed rotation</i>, omit this field. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_managed.html">Managed rotation</a> in the <i>Secrets Manager User Guide</i>.</p>
pub fn get_rotation_lambda_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.rotation_lambda_arn
}
/// <p>A structure that defines the rotation configuration for this secret.</p><important>
/// <p>When changing an existing rotation schedule and setting <code>RotateImmediately</code> to <code>false</code>:</p>
/// <ul>
/// <li>
/// <p>If using <code>AutomaticallyAfterDays</code> or a <code>ScheduleExpression</code> with <code>rate()</code>, the previously scheduled rotation might still occur.</p></li>
/// <li>
/// <p>To prevent unintended rotations, use a <code>ScheduleExpression</code> with <code>cron()</code> for granular control over rotation windows.</p></li>
/// </ul>
/// </important>
pub fn rotation_rules(mut self, input: crate::types::RotationRulesType) -> Self {
self.rotation_rules = ::std::option::Option::Some(input);
self
}
/// <p>A structure that defines the rotation configuration for this secret.</p><important>
/// <p>When changing an existing rotation schedule and setting <code>RotateImmediately</code> to <code>false</code>:</p>
/// <ul>
/// <li>
/// <p>If using <code>AutomaticallyAfterDays</code> or a <code>ScheduleExpression</code> with <code>rate()</code>, the previously scheduled rotation might still occur.</p></li>
/// <li>
/// <p>To prevent unintended rotations, use a <code>ScheduleExpression</code> with <code>cron()</code> for granular control over rotation windows.</p></li>
/// </ul>
/// </important>
pub fn set_rotation_rules(mut self, input: ::std::option::Option<crate::types::RotationRulesType>) -> Self {
self.rotation_rules = input;
self
}
/// <p>A structure that defines the rotation configuration for this secret.</p><important>
/// <p>When changing an existing rotation schedule and setting <code>RotateImmediately</code> to <code>false</code>:</p>
/// <ul>
/// <li>
/// <p>If using <code>AutomaticallyAfterDays</code> or a <code>ScheduleExpression</code> with <code>rate()</code>, the previously scheduled rotation might still occur.</p></li>
/// <li>
/// <p>To prevent unintended rotations, use a <code>ScheduleExpression</code> with <code>cron()</code> for granular control over rotation windows.</p></li>
/// </ul>
/// </important>
pub fn get_rotation_rules(&self) -> &::std::option::Option<crate::types::RotationRulesType> {
&self.rotation_rules
}
/// Appends an item to `external_secret_rotation_metadata`.
///
/// To override the contents of this collection use [`set_external_secret_rotation_metadata`](Self::set_external_secret_rotation_metadata).
///
/// <p>The metadata needed to successfully rotate a managed external secret. A list of key value pairs in JSON format specified by the partner. For more information about the required information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/managed-external-secrets.html">Using Secrets Manager managed external secrets</a></p>
pub fn external_secret_rotation_metadata(mut self, input: crate::types::ExternalSecretRotationMetadataItem) -> Self {
let mut v = self.external_secret_rotation_metadata.unwrap_or_default();
v.push(input);
self.external_secret_rotation_metadata = ::std::option::Option::Some(v);
self
}
/// <p>The metadata needed to successfully rotate a managed external secret. A list of key value pairs in JSON format specified by the partner. For more information about the required information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/managed-external-secrets.html">Using Secrets Manager managed external secrets</a></p>
pub fn set_external_secret_rotation_metadata(
mut self,
input: ::std::option::Option<::std::vec::Vec<crate::types::ExternalSecretRotationMetadataItem>>,
) -> Self {
self.external_secret_rotation_metadata = input;
self
}
/// <p>The metadata needed to successfully rotate a managed external secret. A list of key value pairs in JSON format specified by the partner. For more information about the required information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/managed-external-secrets.html">Using Secrets Manager managed external secrets</a></p>
pub fn get_external_secret_rotation_metadata(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ExternalSecretRotationMetadataItem>> {
&self.external_secret_rotation_metadata
}
/// <p>The Amazon Resource Name (ARN) of the role that allows Secrets Manager to rotate a secret held by a third-party partner. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-security.html">Security and permissions</a>.</p>
pub fn external_secret_rotation_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.external_secret_rotation_role_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the role that allows Secrets Manager to rotate a secret held by a third-party partner. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-security.html">Security and permissions</a>.</p>
pub fn set_external_secret_rotation_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.external_secret_rotation_role_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the role that allows Secrets Manager to rotate a secret held by a third-party partner. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/mes-security.html">Security and permissions</a>.</p>
pub fn get_external_secret_rotation_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.external_secret_rotation_role_arn
}
/// <p>Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in <code>RotateSecretRequest$RotationRules</code>.</p>
/// <p>The default for <code>RotateImmediately</code> is <code>true</code>. If you don't specify this value, Secrets Manager rotates the secret immediately.</p>
/// <p>If you set <code>RotateImmediately</code> to <code>false</code>, Secrets Manager tests the rotation configuration by running the <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html"> <code>testSecret</code> step</a> of the Lambda rotation function. This test creates an <code>AWSPENDING</code> version of the secret and then removes it.</p>
/// <p>When changing an existing rotation schedule and setting <code>RotateImmediately</code> to <code>false</code>:</p>
/// <ul>
/// <li>
/// <p>If using <code>AutomaticallyAfterDays</code> or a <code>ScheduleExpression</code> with <code>rate()</code>, the previously scheduled rotation might still occur.</p></li>
/// <li>
/// <p>To prevent unintended rotations, use a <code>ScheduleExpression</code> with <code>cron()</code> for granular control over rotation windows.</p></li>
/// </ul>
/// <p>Rotation is an asynchronous process. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html">How rotation works</a>.</p>
pub fn rotate_immediately(mut self, input: bool) -> Self {
self.rotate_immediately = ::std::option::Option::Some(input);
self
}
/// <p>Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in <code>RotateSecretRequest$RotationRules</code>.</p>
/// <p>The default for <code>RotateImmediately</code> is <code>true</code>. If you don't specify this value, Secrets Manager rotates the secret immediately.</p>
/// <p>If you set <code>RotateImmediately</code> to <code>false</code>, Secrets Manager tests the rotation configuration by running the <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html"> <code>testSecret</code> step</a> of the Lambda rotation function. This test creates an <code>AWSPENDING</code> version of the secret and then removes it.</p>
/// <p>When changing an existing rotation schedule and setting <code>RotateImmediately</code> to <code>false</code>:</p>
/// <ul>
/// <li>
/// <p>If using <code>AutomaticallyAfterDays</code> or a <code>ScheduleExpression</code> with <code>rate()</code>, the previously scheduled rotation might still occur.</p></li>
/// <li>
/// <p>To prevent unintended rotations, use a <code>ScheduleExpression</code> with <code>cron()</code> for granular control over rotation windows.</p></li>
/// </ul>
/// <p>Rotation is an asynchronous process. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html">How rotation works</a>.</p>
pub fn set_rotate_immediately(mut self, input: ::std::option::Option<bool>) -> Self {
self.rotate_immediately = input;
self
}
/// <p>Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. The rotation schedule is defined in <code>RotateSecretRequest$RotationRules</code>.</p>
/// <p>The default for <code>RotateImmediately</code> is <code>true</code>. If you don't specify this value, Secrets Manager rotates the secret immediately.</p>
/// <p>If you set <code>RotateImmediately</code> to <code>false</code>, Secrets Manager tests the rotation configuration by running the <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html"> <code>testSecret</code> step</a> of the Lambda rotation function. This test creates an <code>AWSPENDING</code> version of the secret and then removes it.</p>
/// <p>When changing an existing rotation schedule and setting <code>RotateImmediately</code> to <code>false</code>:</p>
/// <ul>
/// <li>
/// <p>If using <code>AutomaticallyAfterDays</code> or a <code>ScheduleExpression</code> with <code>rate()</code>, the previously scheduled rotation might still occur.</p></li>
/// <li>
/// <p>To prevent unintended rotations, use a <code>ScheduleExpression</code> with <code>cron()</code> for granular control over rotation windows.</p></li>
/// </ul>
/// <p>Rotation is an asynchronous process. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html">How rotation works</a>.</p>
pub fn get_rotate_immediately(&self) -> &::std::option::Option<bool> {
&self.rotate_immediately
}
/// Consumes the builder and constructs a [`RotateSecretInput`](crate::operation::rotate_secret::RotateSecretInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::rotate_secret::RotateSecretInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::rotate_secret::RotateSecretInput {
secret_id: self.secret_id,
client_request_token: self.client_request_token,
rotation_lambda_arn: self.rotation_lambda_arn,
rotation_rules: self.rotation_rules,
external_secret_rotation_metadata: self.external_secret_rotation_metadata,
external_secret_rotation_role_arn: self.external_secret_rotation_role_arn,
rotate_immediately: self.rotate_immediately,
})
}
}