/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace RDS { namespace Model { /** *

Contains the secret managed by RDS in Amazon Web Services Secrets Manager for * the master user password.

For more information, see Password * management with Amazon Web Services Secrets Manager in the Amazon RDS * User Guide and Password * management with Amazon Web Services Secrets Manager in the Amazon Aurora * User Guide.

See Also:

AWS * API Reference

*/ class MasterUserSecret { public: AWS_RDS_API MasterUserSecret(); AWS_RDS_API MasterUserSecret(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_RDS_API MasterUserSecret& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_RDS_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_RDS_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The Amazon Resource Name (ARN) of the secret.

*/ inline const Aws::String& GetSecretArn() const{ return m_secretArn; } /** *

The Amazon Resource Name (ARN) of the secret.

*/ inline bool SecretArnHasBeenSet() const { return m_secretArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the secret.

*/ inline void SetSecretArn(const Aws::String& value) { m_secretArnHasBeenSet = true; m_secretArn = value; } /** *

The Amazon Resource Name (ARN) of the secret.

*/ inline void SetSecretArn(Aws::String&& value) { m_secretArnHasBeenSet = true; m_secretArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the secret.

*/ inline void SetSecretArn(const char* value) { m_secretArnHasBeenSet = true; m_secretArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the secret.

*/ inline MasterUserSecret& WithSecretArn(const Aws::String& value) { SetSecretArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the secret.

*/ inline MasterUserSecret& WithSecretArn(Aws::String&& value) { SetSecretArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the secret.

*/ inline MasterUserSecret& WithSecretArn(const char* value) { SetSecretArn(value); return *this;} /** *

The status of the secret.

The possible status values include the * following:

  • creating - The secret is being * created.

  • active - The secret is available for * normal use and rotation.

  • rotating - The secret * is being rotated.

  • impaired - The secret can be * used to access database credentials, but it can't be rotated. A secret might * have this status if, for example, permissions are changed so that RDS can no * longer access either the secret or the KMS key for the secret.

    When a * secret has this status, you can correct the condition that caused the status. * Alternatively, modify the DB instance to turn off automatic management of * database credentials, and then modify the DB instance again to turn on automatic * management of database credentials.

*/ inline const Aws::String& GetSecretStatus() const{ return m_secretStatus; } /** *

The status of the secret.

The possible status values include the * following:

  • creating - The secret is being * created.

  • active - The secret is available for * normal use and rotation.

  • rotating - The secret * is being rotated.

  • impaired - The secret can be * used to access database credentials, but it can't be rotated. A secret might * have this status if, for example, permissions are changed so that RDS can no * longer access either the secret or the KMS key for the secret.

    When a * secret has this status, you can correct the condition that caused the status. * Alternatively, modify the DB instance to turn off automatic management of * database credentials, and then modify the DB instance again to turn on automatic * management of database credentials.

*/ inline bool SecretStatusHasBeenSet() const { return m_secretStatusHasBeenSet; } /** *

The status of the secret.

The possible status values include the * following:

  • creating - The secret is being * created.

  • active - The secret is available for * normal use and rotation.

  • rotating - The secret * is being rotated.

  • impaired - The secret can be * used to access database credentials, but it can't be rotated. A secret might * have this status if, for example, permissions are changed so that RDS can no * longer access either the secret or the KMS key for the secret.

    When a * secret has this status, you can correct the condition that caused the status. * Alternatively, modify the DB instance to turn off automatic management of * database credentials, and then modify the DB instance again to turn on automatic * management of database credentials.

*/ inline void SetSecretStatus(const Aws::String& value) { m_secretStatusHasBeenSet = true; m_secretStatus = value; } /** *

The status of the secret.

The possible status values include the * following:

  • creating - The secret is being * created.

  • active - The secret is available for * normal use and rotation.

  • rotating - The secret * is being rotated.

  • impaired - The secret can be * used to access database credentials, but it can't be rotated. A secret might * have this status if, for example, permissions are changed so that RDS can no * longer access either the secret or the KMS key for the secret.

    When a * secret has this status, you can correct the condition that caused the status. * Alternatively, modify the DB instance to turn off automatic management of * database credentials, and then modify the DB instance again to turn on automatic * management of database credentials.

*/ inline void SetSecretStatus(Aws::String&& value) { m_secretStatusHasBeenSet = true; m_secretStatus = std::move(value); } /** *

The status of the secret.

The possible status values include the * following:

  • creating - The secret is being * created.

  • active - The secret is available for * normal use and rotation.

  • rotating - The secret * is being rotated.

  • impaired - The secret can be * used to access database credentials, but it can't be rotated. A secret might * have this status if, for example, permissions are changed so that RDS can no * longer access either the secret or the KMS key for the secret.

    When a * secret has this status, you can correct the condition that caused the status. * Alternatively, modify the DB instance to turn off automatic management of * database credentials, and then modify the DB instance again to turn on automatic * management of database credentials.

*/ inline void SetSecretStatus(const char* value) { m_secretStatusHasBeenSet = true; m_secretStatus.assign(value); } /** *

The status of the secret.

The possible status values include the * following:

  • creating - The secret is being * created.

  • active - The secret is available for * normal use and rotation.

  • rotating - The secret * is being rotated.

  • impaired - The secret can be * used to access database credentials, but it can't be rotated. A secret might * have this status if, for example, permissions are changed so that RDS can no * longer access either the secret or the KMS key for the secret.

    When a * secret has this status, you can correct the condition that caused the status. * Alternatively, modify the DB instance to turn off automatic management of * database credentials, and then modify the DB instance again to turn on automatic * management of database credentials.

*/ inline MasterUserSecret& WithSecretStatus(const Aws::String& value) { SetSecretStatus(value); return *this;} /** *

The status of the secret.

The possible status values include the * following:

  • creating - The secret is being * created.

  • active - The secret is available for * normal use and rotation.

  • rotating - The secret * is being rotated.

  • impaired - The secret can be * used to access database credentials, but it can't be rotated. A secret might * have this status if, for example, permissions are changed so that RDS can no * longer access either the secret or the KMS key for the secret.

    When a * secret has this status, you can correct the condition that caused the status. * Alternatively, modify the DB instance to turn off automatic management of * database credentials, and then modify the DB instance again to turn on automatic * management of database credentials.

*/ inline MasterUserSecret& WithSecretStatus(Aws::String&& value) { SetSecretStatus(std::move(value)); return *this;} /** *

The status of the secret.

The possible status values include the * following:

  • creating - The secret is being * created.

  • active - The secret is available for * normal use and rotation.

  • rotating - The secret * is being rotated.

  • impaired - The secret can be * used to access database credentials, but it can't be rotated. A secret might * have this status if, for example, permissions are changed so that RDS can no * longer access either the secret or the KMS key for the secret.

    When a * secret has this status, you can correct the condition that caused the status. * Alternatively, modify the DB instance to turn off automatic management of * database credentials, and then modify the DB instance again to turn on automatic * management of database credentials.

*/ inline MasterUserSecret& WithSecretStatus(const char* value) { SetSecretStatus(value); return *this;} /** *

The Amazon Web Services KMS key identifier that is used to encrypt the * secret.

*/ inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; } /** *

The Amazon Web Services KMS key identifier that is used to encrypt the * secret.

*/ inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; } /** *

The Amazon Web Services KMS key identifier that is used to encrypt the * secret.

*/ inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; } /** *

The Amazon Web Services KMS key identifier that is used to encrypt the * secret.

*/ inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); } /** *

The Amazon Web Services KMS key identifier that is used to encrypt the * secret.

*/ inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); } /** *

The Amazon Web Services KMS key identifier that is used to encrypt the * secret.

*/ inline MasterUserSecret& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;} /** *

The Amazon Web Services KMS key identifier that is used to encrypt the * secret.

*/ inline MasterUserSecret& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;} /** *

The Amazon Web Services KMS key identifier that is used to encrypt the * secret.

*/ inline MasterUserSecret& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;} private: Aws::String m_secretArn; bool m_secretArnHasBeenSet = false; Aws::String m_secretStatus; bool m_secretStatusHasBeenSet = false; Aws::String m_kmsKeyId; bool m_kmsKeyIdHasBeenSet = false; }; } // namespace Model } // namespace RDS } // namespace Aws