/** * 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 Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace CodePipeline { namespace Model { /** *

Represents information about the key used to encrypt data in the artifact * store, such as an Amazon Web Services Key Management Service (Key Management * Service) key.

See Also:

AWS * API Reference

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

The ID used to identify the key. For an Amazon Web Services KMS key, you can * use the key ID, the key ARN, or the alias ARN.

Aliases are * recognized only in the account that created the KMS key. For cross-account * actions, you can only use the key ID or key ARN to identify the key. * Cross-account actions involve using the role from the other account (AccountB), * so specifying the key ID will use the key from the other account (AccountB).

* */ inline const Aws::String& GetId() const{ return m_id; } /** *

The ID used to identify the key. For an Amazon Web Services KMS key, you can * use the key ID, the key ARN, or the alias ARN.

Aliases are * recognized only in the account that created the KMS key. For cross-account * actions, you can only use the key ID or key ARN to identify the key. * Cross-account actions involve using the role from the other account (AccountB), * so specifying the key ID will use the key from the other account (AccountB).

* */ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The ID used to identify the key. For an Amazon Web Services KMS key, you can * use the key ID, the key ARN, or the alias ARN.

Aliases are * recognized only in the account that created the KMS key. For cross-account * actions, you can only use the key ID or key ARN to identify the key. * Cross-account actions involve using the role from the other account (AccountB), * so specifying the key ID will use the key from the other account (AccountB).

* */ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The ID used to identify the key. For an Amazon Web Services KMS key, you can * use the key ID, the key ARN, or the alias ARN.

Aliases are * recognized only in the account that created the KMS key. For cross-account * actions, you can only use the key ID or key ARN to identify the key. * Cross-account actions involve using the role from the other account (AccountB), * so specifying the key ID will use the key from the other account (AccountB).

* */ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The ID used to identify the key. For an Amazon Web Services KMS key, you can * use the key ID, the key ARN, or the alias ARN.

Aliases are * recognized only in the account that created the KMS key. For cross-account * actions, you can only use the key ID or key ARN to identify the key. * Cross-account actions involve using the role from the other account (AccountB), * so specifying the key ID will use the key from the other account (AccountB).

* */ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The ID used to identify the key. For an Amazon Web Services KMS key, you can * use the key ID, the key ARN, or the alias ARN.

Aliases are * recognized only in the account that created the KMS key. For cross-account * actions, you can only use the key ID or key ARN to identify the key. * Cross-account actions involve using the role from the other account (AccountB), * so specifying the key ID will use the key from the other account (AccountB).

* */ inline EncryptionKey& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The ID used to identify the key. For an Amazon Web Services KMS key, you can * use the key ID, the key ARN, or the alias ARN.

Aliases are * recognized only in the account that created the KMS key. For cross-account * actions, you can only use the key ID or key ARN to identify the key. * Cross-account actions involve using the role from the other account (AccountB), * so specifying the key ID will use the key from the other account (AccountB).

* */ inline EncryptionKey& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The ID used to identify the key. For an Amazon Web Services KMS key, you can * use the key ID, the key ARN, or the alias ARN.

Aliases are * recognized only in the account that created the KMS key. For cross-account * actions, you can only use the key ID or key ARN to identify the key. * Cross-account actions involve using the role from the other account (AccountB), * so specifying the key ID will use the key from the other account (AccountB).

* */ inline EncryptionKey& WithId(const char* value) { SetId(value); return *this;} /** *

The type of encryption key, such as an Amazon Web Services KMS key. When * creating or updating a pipeline, the value must be set to 'KMS'.

*/ inline const EncryptionKeyType& GetType() const{ return m_type; } /** *

The type of encryption key, such as an Amazon Web Services KMS key. When * creating or updating a pipeline, the value must be set to 'KMS'.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of encryption key, such as an Amazon Web Services KMS key. When * creating or updating a pipeline, the value must be set to 'KMS'.

*/ inline void SetType(const EncryptionKeyType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of encryption key, such as an Amazon Web Services KMS key. When * creating or updating a pipeline, the value must be set to 'KMS'.

*/ inline void SetType(EncryptionKeyType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of encryption key, such as an Amazon Web Services KMS key. When * creating or updating a pipeline, the value must be set to 'KMS'.

*/ inline EncryptionKey& WithType(const EncryptionKeyType& value) { SetType(value); return *this;} /** *

The type of encryption key, such as an Amazon Web Services KMS key. When * creating or updating a pipeline, the value must be set to 'KMS'.

*/ inline EncryptionKey& WithType(EncryptionKeyType&& value) { SetType(std::move(value)); return *this;} private: Aws::String m_id; bool m_idHasBeenSet = false; EncryptionKeyType m_type; bool m_typeHasBeenSet = false; }; } // namespace Model } // namespace CodePipeline } // namespace Aws