/** * 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 AWS_KMS_API CreateAliasRequest : public KMSRequest { public: 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::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

Specifies the alias name. This value must begin with alias/ * followed by a name, such as alias/ExampleAlias. The alias name * cannot begin with alias/aws/. The alias/aws/ prefix is * reserved for AWS managed CMKs.

*/ 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. The alias name * cannot begin with alias/aws/. The alias/aws/ prefix is * reserved for AWS managed CMKs.

*/ 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. The alias name * cannot begin with alias/aws/. The alias/aws/ prefix is * reserved for AWS managed CMKs.

*/ 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. The alias name * cannot begin with alias/aws/. The alias/aws/ prefix is * reserved for AWS managed CMKs.

*/ 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. The alias name * cannot begin with alias/aws/. The alias/aws/ prefix is * reserved for AWS managed CMKs.

*/ 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. The alias name * cannot begin with alias/aws/. The alias/aws/ prefix is * reserved for AWS managed CMKs.

*/ 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. The alias name * cannot begin with alias/aws/. The alias/aws/ prefix is * reserved for AWS managed CMKs.

*/ 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. The alias name * cannot begin with alias/aws/. The alias/aws/ prefix is * reserved for AWS managed CMKs.

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

Identifies the CMK to which the alias refers. Specify the key ID or the * Amazon Resource Name (ARN) of the CMK. You cannot specify another alias. For * help finding the key ID and ARN, see Finding * the Key ID and ARN in the AWS Key Management Service Developer * Guide.

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

Identifies the CMK to which the alias refers. Specify the key ID or the * Amazon Resource Name (ARN) of the CMK. You cannot specify another alias. For * help finding the key ID and ARN, see Finding * the Key ID and ARN in the AWS Key Management Service Developer * Guide.

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

Identifies the CMK to which the alias refers. Specify the key ID or the * Amazon Resource Name (ARN) of the CMK. You cannot specify another alias. For * help finding the key ID and ARN, see Finding * the Key ID and ARN in the AWS Key Management Service Developer * Guide.

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

Identifies the CMK to which the alias refers. Specify the key ID or the * Amazon Resource Name (ARN) of the CMK. You cannot specify another alias. For * help finding the key ID and ARN, see Finding * the Key ID and ARN in the AWS Key Management Service Developer * Guide.

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

Identifies the CMK to which the alias refers. Specify the key ID or the * Amazon Resource Name (ARN) of the CMK. You cannot specify another alias. For * help finding the key ID and ARN, see Finding * the Key ID and ARN in the AWS Key Management Service Developer * Guide.

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

Identifies the CMK to which the alias refers. Specify the key ID or the * Amazon Resource Name (ARN) of the CMK. You cannot specify another alias. For * help finding the key ID and ARN, see Finding * the Key ID and ARN in the AWS Key Management Service Developer * Guide.

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

Identifies the CMK to which the alias refers. Specify the key ID or the * Amazon Resource Name (ARN) of the CMK. You cannot specify another alias. For * help finding the key ID and ARN, see Finding * the Key ID and ARN in the AWS Key Management Service Developer * Guide.

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

Identifies the CMK to which the alias refers. Specify the key ID or the * Amazon Resource Name (ARN) of the CMK. You cannot specify another alias. For * help finding the key ID and ARN, see Finding * the Key ID and ARN in the AWS Key Management Service Developer * Guide.

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