// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`RotateSecret`](crate::operation::rotate_secret::builders::RotateSecretFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`secret_id(impl Into<String>)`](crate::operation::rotate_secret::builders::RotateSecretFluentBuilder::secret_id) / [`set_secret_id(Option<String>)`](crate::operation::rotate_secret::builders::RotateSecretFluentBuilder::set_secret_id):<br>required: **true**<br><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><br>
/// - [`client_request_token(impl Into<String>)`](crate::operation::rotate_secret::builders::RotateSecretFluentBuilder::client_request_token) / [`set_client_request_token(Option<String>)`](crate::operation::rotate_secret::builders::RotateSecretFluentBuilder::set_client_request_token):<br>required: **false**<br><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><br>
/// - [`rotation_lambda_arn(impl Into<String>)`](crate::operation::rotate_secret::builders::RotateSecretFluentBuilder::rotation_lambda_arn) / [`set_rotation_lambda_arn(Option<String>)`](crate::operation::rotate_secret::builders::RotateSecretFluentBuilder::set_rotation_lambda_arn):<br>required: **false**<br><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><br>
/// - [`rotation_rules(RotationRulesType)`](crate::operation::rotate_secret::builders::RotateSecretFluentBuilder::rotation_rules) / [`set_rotation_rules(Option<RotationRulesType>)`](crate::operation::rotate_secret::builders::RotateSecretFluentBuilder::set_rotation_rules):<br>required: **false**<br><p>A structure that defines the rotation configuration for this secret.</p><br>
/// - [`rotate_immediately(bool)`](crate::operation::rotate_secret::builders::RotateSecretFluentBuilder::rotate_immediately) / [`set_rotate_immediately(Option<bool>)`](crate::operation::rotate_secret::builders::RotateSecretFluentBuilder::set_rotate_immediately):<br>required: **false**<br><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>For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, 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. The test creates an <code>AWSPENDING</code> version of the secret and then removes it.</p> <p>By default, Secrets Manager rotates the secret immediately.</p><br>
/// - On success, responds with [`RotateSecretOutput`](crate::operation::rotate_secret::RotateSecretOutput) with field(s):
/// - [`arn(Option<String>)`](crate::operation::rotate_secret::RotateSecretOutput::arn): <p>The ARN of the secret.</p>
/// - [`name(Option<String>)`](crate::operation::rotate_secret::RotateSecretOutput::name): <p>The name of the secret.</p>
/// - [`version_id(Option<String>)`](crate::operation::rotate_secret::RotateSecretOutput::version_id): <p>The ID of the new version of the secret.</p>
/// - On failure, responds with [`SdkError<RotateSecretError>`](crate::operation::rotate_secret::RotateSecretError)
pub fn rotate_secret(&self) -> crate::operation::rotate_secret::builders::RotateSecretFluentBuilder {
crate::operation::rotate_secret::builders::RotateSecretFluentBuilder::new(self.handle.clone())
}
}