/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace SecretsManager { namespace Model { class AWS_SECRETSMANAGER_API DescribeSecretResult { public: DescribeSecretResult(); DescribeSecretResult(const Aws::AmazonWebServiceResult& result); DescribeSecretResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

The ARN of the secret.

*/ inline const Aws::String& GetARN() const{ return m_aRN; } /** *

The ARN of the secret.

*/ inline void SetARN(const Aws::String& value) { m_aRN = value; } /** *

The ARN of the secret.

*/ inline void SetARN(Aws::String&& value) { m_aRN = std::move(value); } /** *

The ARN of the secret.

*/ inline void SetARN(const char* value) { m_aRN.assign(value); } /** *

The ARN of the secret.

*/ inline DescribeSecretResult& WithARN(const Aws::String& value) { SetARN(value); return *this;} /** *

The ARN of the secret.

*/ inline DescribeSecretResult& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;} /** *

The ARN of the secret.

*/ inline DescribeSecretResult& WithARN(const char* value) { SetARN(value); return *this;} /** *

The user-provided friendly name of the secret.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The user-provided friendly name of the secret.

*/ inline void SetName(const Aws::String& value) { m_name = value; } /** *

The user-provided friendly name of the secret.

*/ inline void SetName(Aws::String&& value) { m_name = std::move(value); } /** *

The user-provided friendly name of the secret.

*/ inline void SetName(const char* value) { m_name.assign(value); } /** *

The user-provided friendly name of the secret.

*/ inline DescribeSecretResult& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The user-provided friendly name of the secret.

*/ inline DescribeSecretResult& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The user-provided friendly name of the secret.

*/ inline DescribeSecretResult& WithName(const char* value) { SetName(value); return *this;} /** *

The user-provided description of the secret.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The user-provided description of the secret.

*/ inline void SetDescription(const Aws::String& value) { m_description = value; } /** *

The user-provided description of the secret.

*/ inline void SetDescription(Aws::String&& value) { m_description = std::move(value); } /** *

The user-provided description of the secret.

*/ inline void SetDescription(const char* value) { m_description.assign(value); } /** *

The user-provided description of the secret.

*/ inline DescribeSecretResult& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The user-provided description of the secret.

*/ inline DescribeSecretResult& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The user-provided description of the secret.

*/ inline DescribeSecretResult& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The ARN or alias of the AWS KMS customer master key (CMK) that's used to * encrypt the SecretString or SecretBinary fields in * each version of the secret. If you don't provide a key, then Secrets Manager * defaults to encrypting the secret fields with the default AWS KMS CMK (the one * named awssecretsmanager) for this account.

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

The ARN or alias of the AWS KMS customer master key (CMK) that's used to * encrypt the SecretString or SecretBinary fields in * each version of the secret. If you don't provide a key, then Secrets Manager * defaults to encrypting the secret fields with the default AWS KMS CMK (the one * named awssecretsmanager) for this account.

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

The ARN or alias of the AWS KMS customer master key (CMK) that's used to * encrypt the SecretString or SecretBinary fields in * each version of the secret. If you don't provide a key, then Secrets Manager * defaults to encrypting the secret fields with the default AWS KMS CMK (the one * named awssecretsmanager) for this account.

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

The ARN or alias of the AWS KMS customer master key (CMK) that's used to * encrypt the SecretString or SecretBinary fields in * each version of the secret. If you don't provide a key, then Secrets Manager * defaults to encrypting the secret fields with the default AWS KMS CMK (the one * named awssecretsmanager) for this account.

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

The ARN or alias of the AWS KMS customer master key (CMK) that's used to * encrypt the SecretString or SecretBinary fields in * each version of the secret. If you don't provide a key, then Secrets Manager * defaults to encrypting the secret fields with the default AWS KMS CMK (the one * named awssecretsmanager) for this account.

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

The ARN or alias of the AWS KMS customer master key (CMK) that's used to * encrypt the SecretString or SecretBinary fields in * each version of the secret. If you don't provide a key, then Secrets Manager * defaults to encrypting the secret fields with the default AWS KMS CMK (the one * named awssecretsmanager) for this account.

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

The ARN or alias of the AWS KMS customer master key (CMK) that's used to * encrypt the SecretString or SecretBinary fields in * each version of the secret. If you don't provide a key, then Secrets Manager * defaults to encrypting the secret fields with the default AWS KMS CMK (the one * named awssecretsmanager) for this account.

*/ inline DescribeSecretResult& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;} /** *

Specifies whether automatic rotation is enabled for this secret.

To * enable rotation, use RotateSecret with * AutomaticallyRotateAfterDays set to a value greater than 0. To * disable rotation, use CancelRotateSecret.

*/ inline bool GetRotationEnabled() const{ return m_rotationEnabled; } /** *

Specifies whether automatic rotation is enabled for this secret.

To * enable rotation, use RotateSecret with * AutomaticallyRotateAfterDays set to a value greater than 0. To * disable rotation, use CancelRotateSecret.

*/ inline void SetRotationEnabled(bool value) { m_rotationEnabled = value; } /** *

Specifies whether automatic rotation is enabled for this secret.

To * enable rotation, use RotateSecret with * AutomaticallyRotateAfterDays set to a value greater than 0. To * disable rotation, use CancelRotateSecret.

*/ inline DescribeSecretResult& WithRotationEnabled(bool value) { SetRotationEnabled(value); return *this;} /** *

The ARN of a Lambda function that's invoked by Secrets Manager to rotate the * secret either automatically per the schedule or manually by a call to * RotateSecret.

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

The ARN of a Lambda function that's invoked by Secrets Manager to rotate the * secret either automatically per the schedule or manually by a call to * RotateSecret.

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

The ARN of a Lambda function that's invoked by Secrets Manager to rotate the * secret either automatically per the schedule or manually by a call to * RotateSecret.

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

The ARN of a Lambda function that's invoked by Secrets Manager to rotate the * secret either automatically per the schedule or manually by a call to * RotateSecret.

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

The ARN of a Lambda function that's invoked by Secrets Manager to rotate the * secret either automatically per the schedule or manually by a call to * RotateSecret.

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

The ARN of a Lambda function that's invoked by Secrets Manager to rotate the * secret either automatically per the schedule or manually by a call to * RotateSecret.

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

The ARN of a Lambda function that's invoked by Secrets Manager to rotate the * secret either automatically per the schedule or manually by a call to * RotateSecret.

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

A structure that contains the rotation configuration for this secret.

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

A structure that contains the rotation configuration for this secret.

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

A structure that contains the rotation configuration for this secret.

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

A structure that contains the rotation configuration for this secret.

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

A structure that contains the rotation configuration for this secret.

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

The most recent date and time that the Secrets Manager rotation process was * successfully completed. This value is null if the secret has never rotated.

*/ inline const Aws::Utils::DateTime& GetLastRotatedDate() const{ return m_lastRotatedDate; } /** *

The most recent date and time that the Secrets Manager rotation process was * successfully completed. This value is null if the secret has never rotated.

*/ inline void SetLastRotatedDate(const Aws::Utils::DateTime& value) { m_lastRotatedDate = value; } /** *

The most recent date and time that the Secrets Manager rotation process was * successfully completed. This value is null if the secret has never rotated.

*/ inline void SetLastRotatedDate(Aws::Utils::DateTime&& value) { m_lastRotatedDate = std::move(value); } /** *

The most recent date and time that the Secrets Manager rotation process was * successfully completed. This value is null if the secret has never rotated.

*/ inline DescribeSecretResult& WithLastRotatedDate(const Aws::Utils::DateTime& value) { SetLastRotatedDate(value); return *this;} /** *

The most recent date and time that the Secrets Manager rotation process was * successfully completed. This value is null if the secret has never rotated.

*/ inline DescribeSecretResult& WithLastRotatedDate(Aws::Utils::DateTime&& value) { SetLastRotatedDate(std::move(value)); return *this;} /** *

The last date and time that this secret was modified in any way.

*/ inline const Aws::Utils::DateTime& GetLastChangedDate() const{ return m_lastChangedDate; } /** *

The last date and time that this secret was modified in any way.

*/ inline void SetLastChangedDate(const Aws::Utils::DateTime& value) { m_lastChangedDate = value; } /** *

The last date and time that this secret was modified in any way.

*/ inline void SetLastChangedDate(Aws::Utils::DateTime&& value) { m_lastChangedDate = std::move(value); } /** *

The last date and time that this secret was modified in any way.

*/ inline DescribeSecretResult& WithLastChangedDate(const Aws::Utils::DateTime& value) { SetLastChangedDate(value); return *this;} /** *

The last date and time that this secret was modified in any way.

*/ inline DescribeSecretResult& WithLastChangedDate(Aws::Utils::DateTime&& value) { SetLastChangedDate(std::move(value)); return *this;} /** *

The last date that this secret was accessed. This value is truncated to * midnight of the date and therefore shows only the date, not the time.

*/ inline const Aws::Utils::DateTime& GetLastAccessedDate() const{ return m_lastAccessedDate; } /** *

The last date that this secret was accessed. This value is truncated to * midnight of the date and therefore shows only the date, not the time.

*/ inline void SetLastAccessedDate(const Aws::Utils::DateTime& value) { m_lastAccessedDate = value; } /** *

The last date that this secret was accessed. This value is truncated to * midnight of the date and therefore shows only the date, not the time.

*/ inline void SetLastAccessedDate(Aws::Utils::DateTime&& value) { m_lastAccessedDate = std::move(value); } /** *

The last date that this secret was accessed. This value is truncated to * midnight of the date and therefore shows only the date, not the time.

*/ inline DescribeSecretResult& WithLastAccessedDate(const Aws::Utils::DateTime& value) { SetLastAccessedDate(value); return *this;} /** *

The last date that this secret was accessed. This value is truncated to * midnight of the date and therefore shows only the date, not the time.

*/ inline DescribeSecretResult& WithLastAccessedDate(Aws::Utils::DateTime&& value) { SetLastAccessedDate(std::move(value)); return *this;} /** *

This value exists if the secret is scheduled for deletion. Some time after * the specified date and time, Secrets Manager deletes the secret and all of its * versions.

If a secret is scheduled for deletion, then its details, * including the encrypted secret information, is not accessible. To cancel a * scheduled deletion and restore access, use RestoreSecret.

*/ inline const Aws::Utils::DateTime& GetDeletedDate() const{ return m_deletedDate; } /** *

This value exists if the secret is scheduled for deletion. Some time after * the specified date and time, Secrets Manager deletes the secret and all of its * versions.

If a secret is scheduled for deletion, then its details, * including the encrypted secret information, is not accessible. To cancel a * scheduled deletion and restore access, use RestoreSecret.

*/ inline void SetDeletedDate(const Aws::Utils::DateTime& value) { m_deletedDate = value; } /** *

This value exists if the secret is scheduled for deletion. Some time after * the specified date and time, Secrets Manager deletes the secret and all of its * versions.

If a secret is scheduled for deletion, then its details, * including the encrypted secret information, is not accessible. To cancel a * scheduled deletion and restore access, use RestoreSecret.

*/ inline void SetDeletedDate(Aws::Utils::DateTime&& value) { m_deletedDate = std::move(value); } /** *

This value exists if the secret is scheduled for deletion. Some time after * the specified date and time, Secrets Manager deletes the secret and all of its * versions.

If a secret is scheduled for deletion, then its details, * including the encrypted secret information, is not accessible. To cancel a * scheduled deletion and restore access, use RestoreSecret.

*/ inline DescribeSecretResult& WithDeletedDate(const Aws::Utils::DateTime& value) { SetDeletedDate(value); return *this;} /** *

This value exists if the secret is scheduled for deletion. Some time after * the specified date and time, Secrets Manager deletes the secret and all of its * versions.

If a secret is scheduled for deletion, then its details, * including the encrypted secret information, is not accessible. To cancel a * scheduled deletion and restore access, use RestoreSecret.

*/ inline DescribeSecretResult& WithDeletedDate(Aws::Utils::DateTime&& value) { SetDeletedDate(std::move(value)); return *this;} /** *

The list of user-defined tags that are associated with the secret. To add * tags to a secret, use TagResource. To remove tags, use * UntagResource.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

The list of user-defined tags that are associated with the secret. To add * tags to a secret, use TagResource. To remove tags, use * UntagResource.

*/ inline void SetTags(const Aws::Vector& value) { m_tags = value; } /** *

The list of user-defined tags that are associated with the secret. To add * tags to a secret, use TagResource. To remove tags, use * UntagResource.

*/ inline void SetTags(Aws::Vector&& value) { m_tags = std::move(value); } /** *

The list of user-defined tags that are associated with the secret. To add * tags to a secret, use TagResource. To remove tags, use * UntagResource.

*/ inline DescribeSecretResult& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

The list of user-defined tags that are associated with the secret. To add * tags to a secret, use TagResource. To remove tags, use * UntagResource.

*/ inline DescribeSecretResult& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

The list of user-defined tags that are associated with the secret. To add * tags to a secret, use TagResource. To remove tags, use * UntagResource.

*/ inline DescribeSecretResult& AddTags(const Tag& value) { m_tags.push_back(value); return *this; } /** *

The list of user-defined tags that are associated with the secret. To add * tags to a secret, use TagResource. To remove tags, use * UntagResource.

*/ inline DescribeSecretResult& AddTags(Tag&& value) { m_tags.push_back(std::move(value)); return *this; } /** *

A list of all of the currently assigned VersionStage staging * labels and the VersionId that each is attached to. Staging labels * are used to keep track of the different versions during the rotation * process.

A version that does not have any staging labels attached * is considered deprecated and subject to deletion. Such versions are not included * in this list.

*/ inline const Aws::Map>& GetVersionIdsToStages() const{ return m_versionIdsToStages; } /** *

A list of all of the currently assigned VersionStage staging * labels and the VersionId that each is attached to. Staging labels * are used to keep track of the different versions during the rotation * process.

A version that does not have any staging labels attached * is considered deprecated and subject to deletion. Such versions are not included * in this list.

*/ inline void SetVersionIdsToStages(const Aws::Map>& value) { m_versionIdsToStages = value; } /** *

A list of all of the currently assigned VersionStage staging * labels and the VersionId that each is attached to. Staging labels * are used to keep track of the different versions during the rotation * process.

A version that does not have any staging labels attached * is considered deprecated and subject to deletion. Such versions are not included * in this list.

*/ inline void SetVersionIdsToStages(Aws::Map>&& value) { m_versionIdsToStages = std::move(value); } /** *

A list of all of the currently assigned VersionStage staging * labels and the VersionId that each is attached to. Staging labels * are used to keep track of the different versions during the rotation * process.

A version that does not have any staging labels attached * is considered deprecated and subject to deletion. Such versions are not included * in this list.

*/ inline DescribeSecretResult& WithVersionIdsToStages(const Aws::Map>& value) { SetVersionIdsToStages(value); return *this;} /** *

A list of all of the currently assigned VersionStage staging * labels and the VersionId that each is attached to. Staging labels * are used to keep track of the different versions during the rotation * process.

A version that does not have any staging labels attached * is considered deprecated and subject to deletion. Such versions are not included * in this list.

*/ inline DescribeSecretResult& WithVersionIdsToStages(Aws::Map>&& value) { SetVersionIdsToStages(std::move(value)); return *this;} /** *

A list of all of the currently assigned VersionStage staging * labels and the VersionId that each is attached to. Staging labels * are used to keep track of the different versions during the rotation * process.

A version that does not have any staging labels attached * is considered deprecated and subject to deletion. Such versions are not included * in this list.

*/ inline DescribeSecretResult& AddVersionIdsToStages(const Aws::String& key, const Aws::Vector& value) { m_versionIdsToStages.emplace(key, value); return *this; } /** *

A list of all of the currently assigned VersionStage staging * labels and the VersionId that each is attached to. Staging labels * are used to keep track of the different versions during the rotation * process.

A version that does not have any staging labels attached * is considered deprecated and subject to deletion. Such versions are not included * in this list.

*/ inline DescribeSecretResult& AddVersionIdsToStages(Aws::String&& key, const Aws::Vector& value) { m_versionIdsToStages.emplace(std::move(key), value); return *this; } /** *

A list of all of the currently assigned VersionStage staging * labels and the VersionId that each is attached to. Staging labels * are used to keep track of the different versions during the rotation * process.

A version that does not have any staging labels attached * is considered deprecated and subject to deletion. Such versions are not included * in this list.

*/ inline DescribeSecretResult& AddVersionIdsToStages(const Aws::String& key, Aws::Vector&& value) { m_versionIdsToStages.emplace(key, std::move(value)); return *this; } /** *

A list of all of the currently assigned VersionStage staging * labels and the VersionId that each is attached to. Staging labels * are used to keep track of the different versions during the rotation * process.

A version that does not have any staging labels attached * is considered deprecated and subject to deletion. Such versions are not included * in this list.

*/ inline DescribeSecretResult& AddVersionIdsToStages(Aws::String&& key, Aws::Vector&& value) { m_versionIdsToStages.emplace(std::move(key), std::move(value)); return *this; } /** *

A list of all of the currently assigned VersionStage staging * labels and the VersionId that each is attached to. Staging labels * are used to keep track of the different versions during the rotation * process.

A version that does not have any staging labels attached * is considered deprecated and subject to deletion. Such versions are not included * in this list.

*/ inline DescribeSecretResult& AddVersionIdsToStages(const char* key, Aws::Vector&& value) { m_versionIdsToStages.emplace(key, std::move(value)); return *this; } /** *

A list of all of the currently assigned VersionStage staging * labels and the VersionId that each is attached to. Staging labels * are used to keep track of the different versions during the rotation * process.

A version that does not have any staging labels attached * is considered deprecated and subject to deletion. Such versions are not included * in this list.

*/ inline DescribeSecretResult& AddVersionIdsToStages(const char* key, const Aws::Vector& value) { m_versionIdsToStages.emplace(key, value); return *this; } /** *

Returns the name of the service that created this secret.

*/ inline const Aws::String& GetOwningService() const{ return m_owningService; } /** *

Returns the name of the service that created this secret.

*/ inline void SetOwningService(const Aws::String& value) { m_owningService = value; } /** *

Returns the name of the service that created this secret.

*/ inline void SetOwningService(Aws::String&& value) { m_owningService = std::move(value); } /** *

Returns the name of the service that created this secret.

*/ inline void SetOwningService(const char* value) { m_owningService.assign(value); } /** *

Returns the name of the service that created this secret.

*/ inline DescribeSecretResult& WithOwningService(const Aws::String& value) { SetOwningService(value); return *this;} /** *

Returns the name of the service that created this secret.

*/ inline DescribeSecretResult& WithOwningService(Aws::String&& value) { SetOwningService(std::move(value)); return *this;} /** *

Returns the name of the service that created this secret.

*/ inline DescribeSecretResult& WithOwningService(const char* value) { SetOwningService(value); return *this;} /** *

The date that the secret was created.

*/ inline const Aws::Utils::DateTime& GetCreatedDate() const{ return m_createdDate; } /** *

The date that the secret was created.

*/ inline void SetCreatedDate(const Aws::Utils::DateTime& value) { m_createdDate = value; } /** *

The date that the secret was created.

*/ inline void SetCreatedDate(Aws::Utils::DateTime&& value) { m_createdDate = std::move(value); } /** *

The date that the secret was created.

*/ inline DescribeSecretResult& WithCreatedDate(const Aws::Utils::DateTime& value) { SetCreatedDate(value); return *this;} /** *

The date that the secret was created.

*/ inline DescribeSecretResult& WithCreatedDate(Aws::Utils::DateTime&& value) { SetCreatedDate(std::move(value)); return *this;} private: Aws::String m_aRN; Aws::String m_name; Aws::String m_description; Aws::String m_kmsKeyId; bool m_rotationEnabled; Aws::String m_rotationLambdaARN; RotationRulesType m_rotationRules; Aws::Utils::DateTime m_lastRotatedDate; Aws::Utils::DateTime m_lastChangedDate; Aws::Utils::DateTime m_lastAccessedDate; Aws::Utils::DateTime m_deletedDate; Aws::Vector m_tags; Aws::Map> m_versionIdsToStages; Aws::String m_owningService; Aws::Utils::DateTime m_createdDate; }; } // namespace Model } // namespace SecretsManager } // namespace Aws