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

The configuration for a Secrets Manager secret. For more information, see CreateSecret.

*

You can propose a configuration for a new secret or an existing secret that * you own by specifying the secret policy and optional KMS encryption key. If the * configuration is for an existing secret and you do not specify the secret * policy, the access preview uses the existing policy for the secret. If the * access preview is for a new resource and you do not specify the policy, the * access preview assumes a secret without a policy. To propose deletion of an * existing policy, you can specify an empty string. If the proposed configuration * is for a new secret and you do not specify the KMS key ID, the access preview * uses the Amazon Web Services managed key aws/secretsmanager. If you * specify an empty string for the KMS key ID, the access preview uses the Amazon * Web Services managed key of the Amazon Web Services account. For more * information about secret policy limits, see Quotas * for Secrets Manager..

See Also:

AWS * API Reference

*/ class SecretsManagerSecretConfiguration { public: AWS_ACCESSANALYZER_API SecretsManagerSecretConfiguration(); AWS_ACCESSANALYZER_API SecretsManagerSecretConfiguration(Aws::Utils::Json::JsonView jsonValue); AWS_ACCESSANALYZER_API SecretsManagerSecretConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The proposed ARN, key ID, or alias of the KMS key.

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

The proposed ARN, key ID, or alias of the KMS key.

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

The proposed ARN, key ID, or alias of the KMS key.

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

The proposed ARN, key ID, or alias of the KMS key.

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

The proposed ARN, key ID, or alias of the KMS key.

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

The proposed ARN, key ID, or alias of the KMS key.

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

The proposed ARN, key ID, or alias of the KMS key.

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

The proposed ARN, key ID, or alias of the KMS key.

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

The proposed resource policy defining who can access or manage the * secret.

*/ inline const Aws::String& GetSecretPolicy() const{ return m_secretPolicy; } /** *

The proposed resource policy defining who can access or manage the * secret.

*/ inline bool SecretPolicyHasBeenSet() const { return m_secretPolicyHasBeenSet; } /** *

The proposed resource policy defining who can access or manage the * secret.

*/ inline void SetSecretPolicy(const Aws::String& value) { m_secretPolicyHasBeenSet = true; m_secretPolicy = value; } /** *

The proposed resource policy defining who can access or manage the * secret.

*/ inline void SetSecretPolicy(Aws::String&& value) { m_secretPolicyHasBeenSet = true; m_secretPolicy = std::move(value); } /** *

The proposed resource policy defining who can access or manage the * secret.

*/ inline void SetSecretPolicy(const char* value) { m_secretPolicyHasBeenSet = true; m_secretPolicy.assign(value); } /** *

The proposed resource policy defining who can access or manage the * secret.

*/ inline SecretsManagerSecretConfiguration& WithSecretPolicy(const Aws::String& value) { SetSecretPolicy(value); return *this;} /** *

The proposed resource policy defining who can access or manage the * secret.

*/ inline SecretsManagerSecretConfiguration& WithSecretPolicy(Aws::String&& value) { SetSecretPolicy(std::move(value)); return *this;} /** *

The proposed resource policy defining who can access or manage the * secret.

*/ inline SecretsManagerSecretConfiguration& WithSecretPolicy(const char* value) { SetSecretPolicy(value); return *this;} private: Aws::String m_kmsKeyId; bool m_kmsKeyIdHasBeenSet = false; Aws::String m_secretPolicy; bool m_secretPolicyHasBeenSet = false; }; } // namespace Model } // namespace AccessAnalyzer } // namespace Aws