/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace SecretsManager { namespace Model { /** */ class RotateSecretRequest : public SecretsManagerRequest { public: AWS_SECRETSMANAGER_API RotateSecretRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "RotateSecret"; } AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override; AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The ARN or name of the secret to rotate.

For an ARN, we recommend that * you specify a complete ARN rather than a partial ARN. See Finding * a secret from a partial ARN.

*/ inline const Aws::String& GetSecretId() const{ return m_secretId; } /** *

The ARN or name of the secret to rotate.

For an ARN, we recommend that * you specify a complete ARN rather than a partial ARN. See Finding * a secret from a partial ARN.

*/ inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; } /** *

The ARN or name of the secret to rotate.

For an ARN, we recommend that * you specify a complete ARN rather than a partial ARN. See Finding * a secret from a partial ARN.

*/ inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; } /** *

The ARN or name of the secret to rotate.

For an ARN, we recommend that * you specify a complete ARN rather than a partial ARN. See Finding * a secret from a partial ARN.

*/ inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); } /** *

The ARN or name of the secret to rotate.

For an ARN, we recommend that * you specify a complete ARN rather than a partial ARN. See Finding * a secret from a partial ARN.

*/ inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); } /** *

The ARN or name of the secret to rotate.

For an ARN, we recommend that * you specify a complete ARN rather than a partial ARN. See Finding * a secret from a partial ARN.

*/ inline RotateSecretRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;} /** *

The ARN or name of the secret to rotate.

For an ARN, we recommend that * you specify a complete ARN rather than a partial ARN. See Finding * a secret from a partial ARN.

*/ inline RotateSecretRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;} /** *

The ARN or name of the secret to rotate.

For an ARN, we recommend that * you specify a complete ARN rather than a partial ARN. See Finding * a secret from a partial ARN.

*/ inline RotateSecretRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;} /** *

A unique identifier for the new version of the secret that helps ensure * idempotency. Secrets Manager uses this value to prevent the accidental creation * of duplicate versions if there are failures and retries during rotation. This * value becomes the VersionId of the new version.

If you use * the Amazon Web Services CLI or one of the Amazon Web Services SDK to call this * operation, then you can leave this parameter empty. The CLI or SDK generates a * random UUID for you and includes that in the request for this parameter. If you * don't use the SDK and instead generate a raw HTTP request to the Secrets Manager * service endpoint, then you must generate a ClientRequestToken * yourself for new versions and include that value in the request.

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. We * recommend that you generate a UUID-type * value to ensure uniqueness within the specified secret.

*/ inline const Aws::String& GetClientRequestToken() const{ return m_clientRequestToken; } /** *

A unique identifier for the new version of the secret that helps ensure * idempotency. Secrets Manager uses this value to prevent the accidental creation * of duplicate versions if there are failures and retries during rotation. This * value becomes the VersionId of the new version.

If you use * the Amazon Web Services CLI or one of the Amazon Web Services SDK to call this * operation, then you can leave this parameter empty. The CLI or SDK generates a * random UUID for you and includes that in the request for this parameter. If you * don't use the SDK and instead generate a raw HTTP request to the Secrets Manager * service endpoint, then you must generate a ClientRequestToken * yourself for new versions and include that value in the request.

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. We * recommend that you generate a UUID-type * value to ensure uniqueness within the specified secret.

*/ inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; } /** *

A unique identifier for the new version of the secret that helps ensure * idempotency. Secrets Manager uses this value to prevent the accidental creation * of duplicate versions if there are failures and retries during rotation. This * value becomes the VersionId of the new version.

If you use * the Amazon Web Services CLI or one of the Amazon Web Services SDK to call this * operation, then you can leave this parameter empty. The CLI or SDK generates a * random UUID for you and includes that in the request for this parameter. If you * don't use the SDK and instead generate a raw HTTP request to the Secrets Manager * service endpoint, then you must generate a ClientRequestToken * yourself for new versions and include that value in the request.

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. We * recommend that you generate a UUID-type * value to ensure uniqueness within the specified secret.

*/ inline void SetClientRequestToken(const Aws::String& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = value; } /** *

A unique identifier for the new version of the secret that helps ensure * idempotency. Secrets Manager uses this value to prevent the accidental creation * of duplicate versions if there are failures and retries during rotation. This * value becomes the VersionId of the new version.

If you use * the Amazon Web Services CLI or one of the Amazon Web Services SDK to call this * operation, then you can leave this parameter empty. The CLI or SDK generates a * random UUID for you and includes that in the request for this parameter. If you * don't use the SDK and instead generate a raw HTTP request to the Secrets Manager * service endpoint, then you must generate a ClientRequestToken * yourself for new versions and include that value in the request.

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. We * recommend that you generate a UUID-type * value to ensure uniqueness within the specified secret.

*/ inline void SetClientRequestToken(Aws::String&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::move(value); } /** *

A unique identifier for the new version of the secret that helps ensure * idempotency. Secrets Manager uses this value to prevent the accidental creation * of duplicate versions if there are failures and retries during rotation. This * value becomes the VersionId of the new version.

If you use * the Amazon Web Services CLI or one of the Amazon Web Services SDK to call this * operation, then you can leave this parameter empty. The CLI or SDK generates a * random UUID for you and includes that in the request for this parameter. If you * don't use the SDK and instead generate a raw HTTP request to the Secrets Manager * service endpoint, then you must generate a ClientRequestToken * yourself for new versions and include that value in the request.

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. We * recommend that you generate a UUID-type * value to ensure uniqueness within the specified secret.

*/ inline void SetClientRequestToken(const char* value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken.assign(value); } /** *

A unique identifier for the new version of the secret that helps ensure * idempotency. Secrets Manager uses this value to prevent the accidental creation * of duplicate versions if there are failures and retries during rotation. This * value becomes the VersionId of the new version.

If you use * the Amazon Web Services CLI or one of the Amazon Web Services SDK to call this * operation, then you can leave this parameter empty. The CLI or SDK generates a * random UUID for you and includes that in the request for this parameter. If you * don't use the SDK and instead generate a raw HTTP request to the Secrets Manager * service endpoint, then you must generate a ClientRequestToken * yourself for new versions and include that value in the request.

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. We * recommend that you generate a UUID-type * value to ensure uniqueness within the specified secret.

*/ inline RotateSecretRequest& WithClientRequestToken(const Aws::String& value) { SetClientRequestToken(value); return *this;} /** *

A unique identifier for the new version of the secret that helps ensure * idempotency. Secrets Manager uses this value to prevent the accidental creation * of duplicate versions if there are failures and retries during rotation. This * value becomes the VersionId of the new version.

If you use * the Amazon Web Services CLI or one of the Amazon Web Services SDK to call this * operation, then you can leave this parameter empty. The CLI or SDK generates a * random UUID for you and includes that in the request for this parameter. If you * don't use the SDK and instead generate a raw HTTP request to the Secrets Manager * service endpoint, then you must generate a ClientRequestToken * yourself for new versions and include that value in the request.

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. We * recommend that you generate a UUID-type * value to ensure uniqueness within the specified secret.

*/ inline RotateSecretRequest& WithClientRequestToken(Aws::String&& value) { SetClientRequestToken(std::move(value)); return *this;} /** *

A unique identifier for the new version of the secret that helps ensure * idempotency. Secrets Manager uses this value to prevent the accidental creation * of duplicate versions if there are failures and retries during rotation. This * value becomes the VersionId of the new version.

If you use * the Amazon Web Services CLI or one of the Amazon Web Services SDK to call this * operation, then you can leave this parameter empty. The CLI or SDK generates a * random UUID for you and includes that in the request for this parameter. If you * don't use the SDK and instead generate a raw HTTP request to the Secrets Manager * service endpoint, then you must generate a ClientRequestToken * yourself for new versions and include that value in the request.

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. We * recommend that you generate a UUID-type * value to ensure uniqueness within the specified secret.

*/ inline RotateSecretRequest& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;} /** *

For secrets that use a Lambda rotation function to rotate, the ARN of the * Lambda rotation function.

For secrets that use managed rotation, * omit this field. For more information, see Managed * rotation in the Secrets Manager User Guide.

*/ inline const Aws::String& GetRotationLambdaARN() const{ return m_rotationLambdaARN; } /** *

For secrets that use a Lambda rotation function to rotate, the ARN of the * Lambda rotation function.

For secrets that use managed rotation, * omit this field. For more information, see Managed * rotation in the Secrets Manager User Guide.

*/ inline bool RotationLambdaARNHasBeenSet() const { return m_rotationLambdaARNHasBeenSet; } /** *

For secrets that use a Lambda rotation function to rotate, the ARN of the * Lambda rotation function.

For secrets that use managed rotation, * omit this field. For more information, see Managed * rotation in the Secrets Manager User Guide.

*/ inline void SetRotationLambdaARN(const Aws::String& value) { m_rotationLambdaARNHasBeenSet = true; m_rotationLambdaARN = value; } /** *

For secrets that use a Lambda rotation function to rotate, the ARN of the * Lambda rotation function.

For secrets that use managed rotation, * omit this field. For more information, see Managed * rotation in the Secrets Manager User Guide.

*/ inline void SetRotationLambdaARN(Aws::String&& value) { m_rotationLambdaARNHasBeenSet = true; m_rotationLambdaARN = std::move(value); } /** *

For secrets that use a Lambda rotation function to rotate, the ARN of the * Lambda rotation function.

For secrets that use managed rotation, * omit this field. For more information, see Managed * rotation in the Secrets Manager User Guide.

*/ inline void SetRotationLambdaARN(const char* value) { m_rotationLambdaARNHasBeenSet = true; m_rotationLambdaARN.assign(value); } /** *

For secrets that use a Lambda rotation function to rotate, the ARN of the * Lambda rotation function.

For secrets that use managed rotation, * omit this field. For more information, see Managed * rotation in the Secrets Manager User Guide.

*/ inline RotateSecretRequest& WithRotationLambdaARN(const Aws::String& value) { SetRotationLambdaARN(value); return *this;} /** *

For secrets that use a Lambda rotation function to rotate, the ARN of the * Lambda rotation function.

For secrets that use managed rotation, * omit this field. For more information, see Managed * rotation in the Secrets Manager User Guide.

*/ inline RotateSecretRequest& WithRotationLambdaARN(Aws::String&& value) { SetRotationLambdaARN(std::move(value)); return *this;} /** *

For secrets that use a Lambda rotation function to rotate, the ARN of the * Lambda rotation function.

For secrets that use managed rotation, * omit this field. For more information, see Managed * rotation in the Secrets Manager User Guide.

*/ inline RotateSecretRequest& WithRotationLambdaARN(const char* value) { SetRotationLambdaARN(value); return *this;} /** *

A structure that defines the rotation configuration for this secret.

*/ inline const RotationRulesType& GetRotationRules() const{ return m_rotationRules; } /** *

A structure that defines the rotation configuration for this secret.

*/ inline bool RotationRulesHasBeenSet() const { return m_rotationRulesHasBeenSet; } /** *

A structure that defines the rotation configuration for this secret.

*/ inline void SetRotationRules(const RotationRulesType& value) { m_rotationRulesHasBeenSet = true; m_rotationRules = value; } /** *

A structure that defines the rotation configuration for this secret.

*/ inline void SetRotationRules(RotationRulesType&& value) { m_rotationRulesHasBeenSet = true; m_rotationRules = std::move(value); } /** *

A structure that defines the rotation configuration for this secret.

*/ inline RotateSecretRequest& WithRotationRules(const RotationRulesType& value) { SetRotationRules(value); return *this;} /** *

A structure that defines the rotation configuration for this secret.

*/ inline RotateSecretRequest& WithRotationRules(RotationRulesType&& value) { SetRotationRules(std::move(value)); return *this;} /** *

Specifies whether to rotate the secret immediately or wait until the next * scheduled rotation window. The rotation schedule is defined in * RotateSecretRequest$RotationRules.

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 * testSecret step of the Lambda rotation function. The test * creates an AWSPENDING version of the secret and then removes * it.

By default, Secrets Manager rotates the secret immediately.

*/ inline bool GetRotateImmediately() const{ return m_rotateImmediately; } /** *

Specifies whether to rotate the secret immediately or wait until the next * scheduled rotation window. The rotation schedule is defined in * RotateSecretRequest$RotationRules.

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 * testSecret step of the Lambda rotation function. The test * creates an AWSPENDING version of the secret and then removes * it.

By default, Secrets Manager rotates the secret immediately.

*/ inline bool RotateImmediatelyHasBeenSet() const { return m_rotateImmediatelyHasBeenSet; } /** *

Specifies whether to rotate the secret immediately or wait until the next * scheduled rotation window. The rotation schedule is defined in * RotateSecretRequest$RotationRules.

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 * testSecret step of the Lambda rotation function. The test * creates an AWSPENDING version of the secret and then removes * it.

By default, Secrets Manager rotates the secret immediately.

*/ inline void SetRotateImmediately(bool value) { m_rotateImmediatelyHasBeenSet = true; m_rotateImmediately = value; } /** *

Specifies whether to rotate the secret immediately or wait until the next * scheduled rotation window. The rotation schedule is defined in * RotateSecretRequest$RotationRules.

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 * testSecret step of the Lambda rotation function. The test * creates an AWSPENDING version of the secret and then removes * it.

By default, Secrets Manager rotates the secret immediately.

*/ inline RotateSecretRequest& WithRotateImmediately(bool value) { SetRotateImmediately(value); return *this;} private: Aws::String m_secretId; bool m_secretIdHasBeenSet = false; Aws::String m_clientRequestToken; bool m_clientRequestTokenHasBeenSet = false; Aws::String m_rotationLambdaARN; bool m_rotationLambdaARNHasBeenSet = false; RotationRulesType m_rotationRules; bool m_rotationRulesHasBeenSet = false; bool m_rotateImmediately; bool m_rotateImmediatelyHasBeenSet = false; }; } // namespace Model } // namespace SecretsManager } // namespace Aws