/** * 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 KMS { namespace Model { /** */ class CreateAliasRequest : public KMSRequest { public: AWS_KMS_API CreateAliasRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateAlias"; } AWS_KMS_API Aws::String SerializePayload() const override; AWS_KMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

Specifies the alias name. This value must begin with alias/ * followed by a name, such as alias/ExampleAlias.

*

Do not include confidential or sensitive information in this field. This * field may be displayed in plaintext in CloudTrail logs and other output.

*

The AliasName value must be string of 1-256 * characters. It can contain only alphanumeric characters, forward slashes (/), * underscores (_), and dashes (-). The alias name cannot begin with * alias/aws/. The alias/aws/ prefix is reserved for Amazon * Web Services managed keys.

*/ inline const Aws::String& GetAliasName() const{ return m_aliasName; } /** *

Specifies the alias name. This value must begin with alias/ * followed by a name, such as alias/ExampleAlias.

*

Do not include confidential or sensitive information in this field. This * field may be displayed in plaintext in CloudTrail logs and other output.

*

The AliasName value must be string of 1-256 * characters. It can contain only alphanumeric characters, forward slashes (/), * underscores (_), and dashes (-). The alias name cannot begin with * alias/aws/. The alias/aws/ prefix is reserved for Amazon * Web Services managed keys.

*/ inline bool AliasNameHasBeenSet() const { return m_aliasNameHasBeenSet; } /** *

Specifies the alias name. This value must begin with alias/ * followed by a name, such as alias/ExampleAlias.

*

Do not include confidential or sensitive information in this field. This * field may be displayed in plaintext in CloudTrail logs and other output.

*

The AliasName value must be string of 1-256 * characters. It can contain only alphanumeric characters, forward slashes (/), * underscores (_), and dashes (-). The alias name cannot begin with * alias/aws/. The alias/aws/ prefix is reserved for Amazon * Web Services managed keys.

*/ inline void SetAliasName(const Aws::String& value) { m_aliasNameHasBeenSet = true; m_aliasName = value; } /** *

Specifies the alias name. This value must begin with alias/ * followed by a name, such as alias/ExampleAlias.

*

Do not include confidential or sensitive information in this field. This * field may be displayed in plaintext in CloudTrail logs and other output.

*

The AliasName value must be string of 1-256 * characters. It can contain only alphanumeric characters, forward slashes (/), * underscores (_), and dashes (-). The alias name cannot begin with * alias/aws/. The alias/aws/ prefix is reserved for Amazon * Web Services managed keys.

*/ inline void SetAliasName(Aws::String&& value) { m_aliasNameHasBeenSet = true; m_aliasName = std::move(value); } /** *

Specifies the alias name. This value must begin with alias/ * followed by a name, such as alias/ExampleAlias.

*

Do not include confidential or sensitive information in this field. This * field may be displayed in plaintext in CloudTrail logs and other output.

*

The AliasName value must be string of 1-256 * characters. It can contain only alphanumeric characters, forward slashes (/), * underscores (_), and dashes (-). The alias name cannot begin with * alias/aws/. The alias/aws/ prefix is reserved for Amazon * Web Services managed keys.

*/ inline void SetAliasName(const char* value) { m_aliasNameHasBeenSet = true; m_aliasName.assign(value); } /** *

Specifies the alias name. This value must begin with alias/ * followed by a name, such as alias/ExampleAlias.

*

Do not include confidential or sensitive information in this field. This * field may be displayed in plaintext in CloudTrail logs and other output.

*

The AliasName value must be string of 1-256 * characters. It can contain only alphanumeric characters, forward slashes (/), * underscores (_), and dashes (-). The alias name cannot begin with * alias/aws/. The alias/aws/ prefix is reserved for Amazon * Web Services managed keys.

*/ inline CreateAliasRequest& WithAliasName(const Aws::String& value) { SetAliasName(value); return *this;} /** *

Specifies the alias name. This value must begin with alias/ * followed by a name, such as alias/ExampleAlias.

*

Do not include confidential or sensitive information in this field. This * field may be displayed in plaintext in CloudTrail logs and other output.

*

The AliasName value must be string of 1-256 * characters. It can contain only alphanumeric characters, forward slashes (/), * underscores (_), and dashes (-). The alias name cannot begin with * alias/aws/. The alias/aws/ prefix is reserved for Amazon * Web Services managed keys.

*/ inline CreateAliasRequest& WithAliasName(Aws::String&& value) { SetAliasName(std::move(value)); return *this;} /** *

Specifies the alias name. This value must begin with alias/ * followed by a name, such as alias/ExampleAlias.

*

Do not include confidential or sensitive information in this field. This * field may be displayed in plaintext in CloudTrail logs and other output.

*

The AliasName value must be string of 1-256 * characters. It can contain only alphanumeric characters, forward slashes (/), * underscores (_), and dashes (-). The alias name cannot begin with * alias/aws/. The alias/aws/ prefix is reserved for Amazon * Web Services managed keys.

*/ inline CreateAliasRequest& WithAliasName(const char* value) { SetAliasName(value); return *this;} /** *

Associates the alias with the specified customer * managed key. The KMS key must be in the same Amazon Web Services Region. *

A valid key ID is required. If you supply a null or empty string value, * this operation returns an error.

For help finding the key ID and ARN, see * Finding * the Key ID and ARN in the Key Management Service Developer Guide * .

Specify the key ID or key ARN of the KMS key.

For * example:

  • Key ID: * 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

To get the key ID and key ARN for a KMS key, use * ListKeys or DescribeKey.

*/ inline const Aws::String& GetTargetKeyId() const{ return m_targetKeyId; } /** *

Associates the alias with the specified customer * managed key. The KMS key must be in the same Amazon Web Services Region. *

A valid key ID is required. If you supply a null or empty string value, * this operation returns an error.

For help finding the key ID and ARN, see * Finding * the Key ID and ARN in the Key Management Service Developer Guide * .

Specify the key ID or key ARN of the KMS key.

For * example:

  • Key ID: * 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

To get the key ID and key ARN for a KMS key, use * ListKeys or DescribeKey.

*/ inline bool TargetKeyIdHasBeenSet() const { return m_targetKeyIdHasBeenSet; } /** *

Associates the alias with the specified customer * managed key. The KMS key must be in the same Amazon Web Services Region. *

A valid key ID is required. If you supply a null or empty string value, * this operation returns an error.

For help finding the key ID and ARN, see * Finding * the Key ID and ARN in the Key Management Service Developer Guide * .

Specify the key ID or key ARN of the KMS key.

For * example:

  • Key ID: * 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

To get the key ID and key ARN for a KMS key, use * ListKeys or DescribeKey.

*/ inline void SetTargetKeyId(const Aws::String& value) { m_targetKeyIdHasBeenSet = true; m_targetKeyId = value; } /** *

Associates the alias with the specified customer * managed key. The KMS key must be in the same Amazon Web Services Region. *

A valid key ID is required. If you supply a null or empty string value, * this operation returns an error.

For help finding the key ID and ARN, see * Finding * the Key ID and ARN in the Key Management Service Developer Guide * .

Specify the key ID or key ARN of the KMS key.

For * example:

  • Key ID: * 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

To get the key ID and key ARN for a KMS key, use * ListKeys or DescribeKey.

*/ inline void SetTargetKeyId(Aws::String&& value) { m_targetKeyIdHasBeenSet = true; m_targetKeyId = std::move(value); } /** *

Associates the alias with the specified customer * managed key. The KMS key must be in the same Amazon Web Services Region. *

A valid key ID is required. If you supply a null or empty string value, * this operation returns an error.

For help finding the key ID and ARN, see * Finding * the Key ID and ARN in the Key Management Service Developer Guide * .

Specify the key ID or key ARN of the KMS key.

For * example:

  • Key ID: * 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

To get the key ID and key ARN for a KMS key, use * ListKeys or DescribeKey.

*/ inline void SetTargetKeyId(const char* value) { m_targetKeyIdHasBeenSet = true; m_targetKeyId.assign(value); } /** *

Associates the alias with the specified customer * managed key. The KMS key must be in the same Amazon Web Services Region. *

A valid key ID is required. If you supply a null or empty string value, * this operation returns an error.

For help finding the key ID and ARN, see * Finding * the Key ID and ARN in the Key Management Service Developer Guide * .

Specify the key ID or key ARN of the KMS key.

For * example:

  • Key ID: * 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

To get the key ID and key ARN for a KMS key, use * ListKeys or DescribeKey.

*/ inline CreateAliasRequest& WithTargetKeyId(const Aws::String& value) { SetTargetKeyId(value); return *this;} /** *

Associates the alias with the specified customer * managed key. The KMS key must be in the same Amazon Web Services Region. *

A valid key ID is required. If you supply a null or empty string value, * this operation returns an error.

For help finding the key ID and ARN, see * Finding * the Key ID and ARN in the Key Management Service Developer Guide * .

Specify the key ID or key ARN of the KMS key.

For * example:

  • Key ID: * 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

To get the key ID and key ARN for a KMS key, use * ListKeys or DescribeKey.

*/ inline CreateAliasRequest& WithTargetKeyId(Aws::String&& value) { SetTargetKeyId(std::move(value)); return *this;} /** *

Associates the alias with the specified customer * managed key. The KMS key must be in the same Amazon Web Services Region. *

A valid key ID is required. If you supply a null or empty string value, * this operation returns an error.

For help finding the key ID and ARN, see * Finding * the Key ID and ARN in the Key Management Service Developer Guide * .

Specify the key ID or key ARN of the KMS key.

For * example:

  • Key ID: * 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: * arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab *

To get the key ID and key ARN for a KMS key, use * ListKeys or DescribeKey.

*/ inline CreateAliasRequest& WithTargetKeyId(const char* value) { SetTargetKeyId(value); return *this;} private: Aws::String m_aliasName; bool m_aliasNameHasBeenSet = false; Aws::String m_targetKeyId; bool m_targetKeyIdHasBeenSet = false; }; } // namespace Model } // namespace KMS } // namespace Aws