/** * 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 Glue { namespace Model { /** *

The data structure used by the Data Catalog to encrypt the password as part * of CreateConnection or UpdateConnection and store it * in the ENCRYPTED_PASSWORD field in the connection properties. You * can enable catalog encryption or only password encryption.

When a * CreationConnection request arrives containing a password, the Data * Catalog first encrypts the password using your KMS key. It then encrypts the * whole connection object again if catalog encryption is also enabled.

This * encryption requires that you set KMS key permissions to enable or restrict * access on the password key according to your security requirements. For example, * you might want only administrators to have decrypt permission on the password * key.

See Also:

AWS * API Reference

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

When the ReturnConnectionPasswordEncrypted flag is set to * "true", passwords remain encrypted in the responses of * GetConnection and GetConnections. This encryption * takes effect independently from catalog encryption.

*/ inline bool GetReturnConnectionPasswordEncrypted() const{ return m_returnConnectionPasswordEncrypted; } /** *

When the ReturnConnectionPasswordEncrypted flag is set to * "true", passwords remain encrypted in the responses of * GetConnection and GetConnections. This encryption * takes effect independently from catalog encryption.

*/ inline bool ReturnConnectionPasswordEncryptedHasBeenSet() const { return m_returnConnectionPasswordEncryptedHasBeenSet; } /** *

When the ReturnConnectionPasswordEncrypted flag is set to * "true", passwords remain encrypted in the responses of * GetConnection and GetConnections. This encryption * takes effect independently from catalog encryption.

*/ inline void SetReturnConnectionPasswordEncrypted(bool value) { m_returnConnectionPasswordEncryptedHasBeenSet = true; m_returnConnectionPasswordEncrypted = value; } /** *

When the ReturnConnectionPasswordEncrypted flag is set to * "true", passwords remain encrypted in the responses of * GetConnection and GetConnections. This encryption * takes effect independently from catalog encryption.

*/ inline ConnectionPasswordEncryption& WithReturnConnectionPasswordEncrypted(bool value) { SetReturnConnectionPasswordEncrypted(value); return *this;} /** *

An KMS key that is used to encrypt the connection password.

If * connection password protection is enabled, the caller of * CreateConnection and UpdateConnection needs at least * kms:Encrypt permission on the specified KMS key, to encrypt * passwords before storing them in the Data Catalog.

You can set the * decrypt permission to enable or restrict access on the password key according to * your security requirements.

*/ inline const Aws::String& GetAwsKmsKeyId() const{ return m_awsKmsKeyId; } /** *

An KMS key that is used to encrypt the connection password.

If * connection password protection is enabled, the caller of * CreateConnection and UpdateConnection needs at least * kms:Encrypt permission on the specified KMS key, to encrypt * passwords before storing them in the Data Catalog.

You can set the * decrypt permission to enable or restrict access on the password key according to * your security requirements.

*/ inline bool AwsKmsKeyIdHasBeenSet() const { return m_awsKmsKeyIdHasBeenSet; } /** *

An KMS key that is used to encrypt the connection password.

If * connection password protection is enabled, the caller of * CreateConnection and UpdateConnection needs at least * kms:Encrypt permission on the specified KMS key, to encrypt * passwords before storing them in the Data Catalog.

You can set the * decrypt permission to enable or restrict access on the password key according to * your security requirements.

*/ inline void SetAwsKmsKeyId(const Aws::String& value) { m_awsKmsKeyIdHasBeenSet = true; m_awsKmsKeyId = value; } /** *

An KMS key that is used to encrypt the connection password.

If * connection password protection is enabled, the caller of * CreateConnection and UpdateConnection needs at least * kms:Encrypt permission on the specified KMS key, to encrypt * passwords before storing them in the Data Catalog.

You can set the * decrypt permission to enable or restrict access on the password key according to * your security requirements.

*/ inline void SetAwsKmsKeyId(Aws::String&& value) { m_awsKmsKeyIdHasBeenSet = true; m_awsKmsKeyId = std::move(value); } /** *

An KMS key that is used to encrypt the connection password.

If * connection password protection is enabled, the caller of * CreateConnection and UpdateConnection needs at least * kms:Encrypt permission on the specified KMS key, to encrypt * passwords before storing them in the Data Catalog.

You can set the * decrypt permission to enable or restrict access on the password key according to * your security requirements.

*/ inline void SetAwsKmsKeyId(const char* value) { m_awsKmsKeyIdHasBeenSet = true; m_awsKmsKeyId.assign(value); } /** *

An KMS key that is used to encrypt the connection password.

If * connection password protection is enabled, the caller of * CreateConnection and UpdateConnection needs at least * kms:Encrypt permission on the specified KMS key, to encrypt * passwords before storing them in the Data Catalog.

You can set the * decrypt permission to enable or restrict access on the password key according to * your security requirements.

*/ inline ConnectionPasswordEncryption& WithAwsKmsKeyId(const Aws::String& value) { SetAwsKmsKeyId(value); return *this;} /** *

An KMS key that is used to encrypt the connection password.

If * connection password protection is enabled, the caller of * CreateConnection and UpdateConnection needs at least * kms:Encrypt permission on the specified KMS key, to encrypt * passwords before storing them in the Data Catalog.

You can set the * decrypt permission to enable or restrict access on the password key according to * your security requirements.

*/ inline ConnectionPasswordEncryption& WithAwsKmsKeyId(Aws::String&& value) { SetAwsKmsKeyId(std::move(value)); return *this;} /** *

An KMS key that is used to encrypt the connection password.

If * connection password protection is enabled, the caller of * CreateConnection and UpdateConnection needs at least * kms:Encrypt permission on the specified KMS key, to encrypt * passwords before storing them in the Data Catalog.

You can set the * decrypt permission to enable or restrict access on the password key according to * your security requirements.

*/ inline ConnectionPasswordEncryption& WithAwsKmsKeyId(const char* value) { SetAwsKmsKeyId(value); return *this;} private: bool m_returnConnectionPasswordEncrypted; bool m_returnConnectionPasswordEncryptedHasBeenSet = false; Aws::String m_awsKmsKeyId; bool m_awsKmsKeyIdHasBeenSet = false; }; } // namespace Model } // namespace Glue } // namespace Aws