/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace CloudHSMV2 { namespace Model { /** */ class CreateClusterRequest : public CloudHSMV2Request { public: AWS_CLOUDHSMV2_API CreateClusterRequest(); // 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 "CreateCluster"; } AWS_CLOUDHSMV2_API Aws::String SerializePayload() const override; AWS_CLOUDHSMV2_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

A policy that defines how the service retains backups.

*/ inline const BackupRetentionPolicy& GetBackupRetentionPolicy() const{ return m_backupRetentionPolicy; } /** *

A policy that defines how the service retains backups.

*/ inline bool BackupRetentionPolicyHasBeenSet() const { return m_backupRetentionPolicyHasBeenSet; } /** *

A policy that defines how the service retains backups.

*/ inline void SetBackupRetentionPolicy(const BackupRetentionPolicy& value) { m_backupRetentionPolicyHasBeenSet = true; m_backupRetentionPolicy = value; } /** *

A policy that defines how the service retains backups.

*/ inline void SetBackupRetentionPolicy(BackupRetentionPolicy&& value) { m_backupRetentionPolicyHasBeenSet = true; m_backupRetentionPolicy = std::move(value); } /** *

A policy that defines how the service retains backups.

*/ inline CreateClusterRequest& WithBackupRetentionPolicy(const BackupRetentionPolicy& value) { SetBackupRetentionPolicy(value); return *this;} /** *

A policy that defines how the service retains backups.

*/ inline CreateClusterRequest& WithBackupRetentionPolicy(BackupRetentionPolicy&& value) { SetBackupRetentionPolicy(std::move(value)); return *this;} /** *

The type of HSM to use in the cluster. Currently the only allowed value is * hsm1.medium.

*/ inline const Aws::String& GetHsmType() const{ return m_hsmType; } /** *

The type of HSM to use in the cluster. Currently the only allowed value is * hsm1.medium.

*/ inline bool HsmTypeHasBeenSet() const { return m_hsmTypeHasBeenSet; } /** *

The type of HSM to use in the cluster. Currently the only allowed value is * hsm1.medium.

*/ inline void SetHsmType(const Aws::String& value) { m_hsmTypeHasBeenSet = true; m_hsmType = value; } /** *

The type of HSM to use in the cluster. Currently the only allowed value is * hsm1.medium.

*/ inline void SetHsmType(Aws::String&& value) { m_hsmTypeHasBeenSet = true; m_hsmType = std::move(value); } /** *

The type of HSM to use in the cluster. Currently the only allowed value is * hsm1.medium.

*/ inline void SetHsmType(const char* value) { m_hsmTypeHasBeenSet = true; m_hsmType.assign(value); } /** *

The type of HSM to use in the cluster. Currently the only allowed value is * hsm1.medium.

*/ inline CreateClusterRequest& WithHsmType(const Aws::String& value) { SetHsmType(value); return *this;} /** *

The type of HSM to use in the cluster. Currently the only allowed value is * hsm1.medium.

*/ inline CreateClusterRequest& WithHsmType(Aws::String&& value) { SetHsmType(std::move(value)); return *this;} /** *

The type of HSM to use in the cluster. Currently the only allowed value is * hsm1.medium.

*/ inline CreateClusterRequest& WithHsmType(const char* value) { SetHsmType(value); return *this;} /** *

The identifier (ID) of the cluster backup to restore. Use this value to * restore the cluster from a backup instead of creating a new cluster. To find the * backup ID, use DescribeBackups.

*/ inline const Aws::String& GetSourceBackupId() const{ return m_sourceBackupId; } /** *

The identifier (ID) of the cluster backup to restore. Use this value to * restore the cluster from a backup instead of creating a new cluster. To find the * backup ID, use DescribeBackups.

*/ inline bool SourceBackupIdHasBeenSet() const { return m_sourceBackupIdHasBeenSet; } /** *

The identifier (ID) of the cluster backup to restore. Use this value to * restore the cluster from a backup instead of creating a new cluster. To find the * backup ID, use DescribeBackups.

*/ inline void SetSourceBackupId(const Aws::String& value) { m_sourceBackupIdHasBeenSet = true; m_sourceBackupId = value; } /** *

The identifier (ID) of the cluster backup to restore. Use this value to * restore the cluster from a backup instead of creating a new cluster. To find the * backup ID, use DescribeBackups.

*/ inline void SetSourceBackupId(Aws::String&& value) { m_sourceBackupIdHasBeenSet = true; m_sourceBackupId = std::move(value); } /** *

The identifier (ID) of the cluster backup to restore. Use this value to * restore the cluster from a backup instead of creating a new cluster. To find the * backup ID, use DescribeBackups.

*/ inline void SetSourceBackupId(const char* value) { m_sourceBackupIdHasBeenSet = true; m_sourceBackupId.assign(value); } /** *

The identifier (ID) of the cluster backup to restore. Use this value to * restore the cluster from a backup instead of creating a new cluster. To find the * backup ID, use DescribeBackups.

*/ inline CreateClusterRequest& WithSourceBackupId(const Aws::String& value) { SetSourceBackupId(value); return *this;} /** *

The identifier (ID) of the cluster backup to restore. Use this value to * restore the cluster from a backup instead of creating a new cluster. To find the * backup ID, use DescribeBackups.

*/ inline CreateClusterRequest& WithSourceBackupId(Aws::String&& value) { SetSourceBackupId(std::move(value)); return *this;} /** *

The identifier (ID) of the cluster backup to restore. Use this value to * restore the cluster from a backup instead of creating a new cluster. To find the * backup ID, use DescribeBackups.

*/ inline CreateClusterRequest& WithSourceBackupId(const char* value) { SetSourceBackupId(value); return *this;} /** *

The identifiers (IDs) of the subnets where you are creating the cluster. You * must specify at least one subnet. If you specify multiple subnets, they must * meet the following criteria:

  • All subnets must be in the same * virtual private cloud (VPC).

  • You can specify only one subnet * per Availability Zone.

*/ inline const Aws::Vector& GetSubnetIds() const{ return m_subnetIds; } /** *

The identifiers (IDs) of the subnets where you are creating the cluster. You * must specify at least one subnet. If you specify multiple subnets, they must * meet the following criteria:

  • All subnets must be in the same * virtual private cloud (VPC).

  • You can specify only one subnet * per Availability Zone.

*/ inline bool SubnetIdsHasBeenSet() const { return m_subnetIdsHasBeenSet; } /** *

The identifiers (IDs) of the subnets where you are creating the cluster. You * must specify at least one subnet. If you specify multiple subnets, they must * meet the following criteria:

  • All subnets must be in the same * virtual private cloud (VPC).

  • You can specify only one subnet * per Availability Zone.

*/ inline void SetSubnetIds(const Aws::Vector& value) { m_subnetIdsHasBeenSet = true; m_subnetIds = value; } /** *

The identifiers (IDs) of the subnets where you are creating the cluster. You * must specify at least one subnet. If you specify multiple subnets, they must * meet the following criteria:

  • All subnets must be in the same * virtual private cloud (VPC).

  • You can specify only one subnet * per Availability Zone.

*/ inline void SetSubnetIds(Aws::Vector&& value) { m_subnetIdsHasBeenSet = true; m_subnetIds = std::move(value); } /** *

The identifiers (IDs) of the subnets where you are creating the cluster. You * must specify at least one subnet. If you specify multiple subnets, they must * meet the following criteria:

  • All subnets must be in the same * virtual private cloud (VPC).

  • You can specify only one subnet * per Availability Zone.

*/ inline CreateClusterRequest& WithSubnetIds(const Aws::Vector& value) { SetSubnetIds(value); return *this;} /** *

The identifiers (IDs) of the subnets where you are creating the cluster. You * must specify at least one subnet. If you specify multiple subnets, they must * meet the following criteria:

  • All subnets must be in the same * virtual private cloud (VPC).

  • You can specify only one subnet * per Availability Zone.

*/ inline CreateClusterRequest& WithSubnetIds(Aws::Vector&& value) { SetSubnetIds(std::move(value)); return *this;} /** *

The identifiers (IDs) of the subnets where you are creating the cluster. You * must specify at least one subnet. If you specify multiple subnets, they must * meet the following criteria:

  • All subnets must be in the same * virtual private cloud (VPC).

  • You can specify only one subnet * per Availability Zone.

*/ inline CreateClusterRequest& AddSubnetIds(const Aws::String& value) { m_subnetIdsHasBeenSet = true; m_subnetIds.push_back(value); return *this; } /** *

The identifiers (IDs) of the subnets where you are creating the cluster. You * must specify at least one subnet. If you specify multiple subnets, they must * meet the following criteria:

  • All subnets must be in the same * virtual private cloud (VPC).

  • You can specify only one subnet * per Availability Zone.

*/ inline CreateClusterRequest& AddSubnetIds(Aws::String&& value) { m_subnetIdsHasBeenSet = true; m_subnetIds.push_back(std::move(value)); return *this; } /** *

The identifiers (IDs) of the subnets where you are creating the cluster. You * must specify at least one subnet. If you specify multiple subnets, they must * meet the following criteria:

  • All subnets must be in the same * virtual private cloud (VPC).

  • You can specify only one subnet * per Availability Zone.

*/ inline CreateClusterRequest& AddSubnetIds(const char* value) { m_subnetIdsHasBeenSet = true; m_subnetIds.push_back(value); return *this; } /** *

Tags to apply to the CloudHSM cluster during creation.

*/ inline const Aws::Vector& GetTagList() const{ return m_tagList; } /** *

Tags to apply to the CloudHSM cluster during creation.

*/ inline bool TagListHasBeenSet() const { return m_tagListHasBeenSet; } /** *

Tags to apply to the CloudHSM cluster during creation.

*/ inline void SetTagList(const Aws::Vector& value) { m_tagListHasBeenSet = true; m_tagList = value; } /** *

Tags to apply to the CloudHSM cluster during creation.

*/ inline void SetTagList(Aws::Vector&& value) { m_tagListHasBeenSet = true; m_tagList = std::move(value); } /** *

Tags to apply to the CloudHSM cluster during creation.

*/ inline CreateClusterRequest& WithTagList(const Aws::Vector& value) { SetTagList(value); return *this;} /** *

Tags to apply to the CloudHSM cluster during creation.

*/ inline CreateClusterRequest& WithTagList(Aws::Vector&& value) { SetTagList(std::move(value)); return *this;} /** *

Tags to apply to the CloudHSM cluster during creation.

*/ inline CreateClusterRequest& AddTagList(const Tag& value) { m_tagListHasBeenSet = true; m_tagList.push_back(value); return *this; } /** *

Tags to apply to the CloudHSM cluster during creation.

*/ inline CreateClusterRequest& AddTagList(Tag&& value) { m_tagListHasBeenSet = true; m_tagList.push_back(std::move(value)); return *this; } private: BackupRetentionPolicy m_backupRetentionPolicy; bool m_backupRetentionPolicyHasBeenSet = false; Aws::String m_hsmType; bool m_hsmTypeHasBeenSet = false; Aws::String m_sourceBackupId; bool m_sourceBackupIdHasBeenSet = false; Aws::Vector m_subnetIds; bool m_subnetIdsHasBeenSet = false; Aws::Vector m_tagList; bool m_tagListHasBeenSet = false; }; } // namespace Model } // namespace CloudHSMV2 } // namespace Aws