All Products
Search
Document Center

ApsaraDB for MyBase:CreateDedicatedHostGroup

Last Updated:Mar 01, 2024

Creates a dedicated cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID. For more information, see Region IDs.

cn-hangzhou
EnginestringYes

The database engine of the dedicated cluster. Valid values:

  • MySQL
  • SQL Server
MySQL
CpuAllocationRatiointegerNo

The CPU overcommit ratio of the dedicated cluster.

Note Unit: %. Valid values: 100 to 300. Default value: 200, which specifies that the total amount of CPU resources allocated to all instances is twice the amount of actual CPU resources. This helps you maximize CPU utilization.
200
MemAllocationRatiointegerNo

The maximum memory usage of each host in the dedicated cluster.

Note Unit: %. Valid values: 0 to 100. Default value: 100.
100
DiskAllocationRatiointegerNo

The storage overcommit ratio of the dedicated cluster.

Note Unit: %. Valid values: 100 to 300. Default value: 200, which specifies that the total amount of storage resources allocated to all instances is twice the amount of actual storage resources. This helps you maximize storage usage. This parameter does not take effect for dedicated clusters that run SQL Server.
200
AllocationPolicystringNo

The policy that is used to allocate resources in the dedicated cluster. Valid values:

  • Evenly (default): The system preferentially deploys database instances on the hosts where no resources or fewer resources are allocated. This maximizes system stability.
  • Intensively: The system preferentially deploys database instances on the hosts that are created earlier and have more allocated resources. This maximizes resource utilization.
Evenly
VPCIdstringYes

The ID of the virtual private cloud (VPC) where you want to create the dedicated cluster. You can log on to the VPC console and click VPCs in the left-side navigation pane to view the VPC ID.

vpc-t4n7v5m6icc0a4314****
HostReplacePolicystringNo

The policy that is used to handle host failures. Valid values:

  • Auto (default): The system automatically replaces faulty hosts.
  • Manual: You must manually replace faulty hosts.
Note When you create a dedicated cluster that runs MySQL, you can select a policy based on your business requirements. For dedicated clusters that run other database engines, the default value Auto is used.
Auto
ClientTokenstringYes

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

ETnLKlblzczshOTUbOCz*******
OpenPermissionintegerNo

Specifies whether to grant the host OS permissions. Valid values:

  • 0: no.
  • 1: yes.
Note When you create a dedicated cluster that runs MySQL or SQL Server, you can grant the host OS permissions based on your business requirements. For dedicated clusters that run other database engines, the default value 0 is used. When you create an ApsaraDB MyBase for SQL Server dedicated cluster, you must set this parameter to 1.
1
DedicatedHostGroupDescstringNo

The name of the dedicated cluster. The name must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

mysqlcluster

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

C6592723-09E1-4248-A78E-12AB00D7A79D
DedicatedHostGroupIdstring

The dedicated cluster ID.

dhg-7a9********

Examples

Sample success responses

JSONformat

{
  "RequestId": "C6592723-09E1-4248-A78E-12AB00D7A79D",
  "DedicatedHostGroupId": "dhg-7a9********"
}

Error codes

HTTP status codeError codeError messageDescription
403Permission.NotSupportYou are not authorized to perform this action.You are not authorized to perform the action.
404ClustersTemplateNotFoundKey account cluster is not supported for the region.Key account cluster is not supported for the region.

For a list of error codes, visit the Service error codes.