All Products
Search
Document Center

ApsaraDB for MyBase:CreateDedicatedHost

Last Updated:Jun 19, 2024

Creates hosts in 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
DedicatedHostGroupIdstringYes

The dedicated cluster ID. You can log on to the ApsaraDB for MyBase console and go to the Dedicated Clusters page to view the dedicated cluster ID.

Note The database engine of the host is the same as the database engine of the cluster.
dhg-6w7q18iwt5jo****
HostClassstringYes

The instance type of the host. For information about the host instance types supported by different database engines, see Instance types of hosts.

rds.g6.4xlarge
PayTypestringYes

The billing method of the host. Set the value to prepaid.

prepaid
PeriodstringNo

The unit of the subscription duration. Valid values:

  • Year
  • Month
Month
UsedTimestringNo

The subscription duration of the host.

  • Valid values when Period is set to Year: 1 to 5.****
  • Valid values when Period is set to Month: 1 to 9.
1
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.

ETnLKlblzczshOTUbOCzSBZH8****
AutoRenewstringNo

Specifies whether to enable the auto-renewal feature. Valid values:

  • true
  • false
Note If you do not specify this parameter, the default value false is used.
false
ImageCategorystringNo

The image of the host. Valid values:

  • WindowsWithMssqlEntAlwaysonLicense: SQL Server Cluster Edition.
  • WindowsWithMssqlStdLicense: SQL Server Standard Edition.
  • WindowsWithMssqlEntLicense: SQL Server Enterprise Edition.
  • WindowsWithMssqlWebLicense: SQL Server Web Edition.
  • AliLinux: other images.
Note When you create a host that runs SQL Server, you must specify a host image.
AliLinux
OsPasswordstringNo

The password of the host. You can specify a password only when you create a host in a Proprietary MyBase dedicated cluster.

  • The password must be 8 to 30 characters in length.
  • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.
  • The password can contain the following special characters: () \ ` ~ ! @ # $ % ^ & * - _ + = | { } [ ] : ; ' < > , . ? /
Test123456
HostStorageTypestringNo

The disk type of the host. This parameter takes effect only for dedicated clusters that run Tair. Valid values:

  • cloud_essd: PL1 enhanced SSD (ESSD).
  • cloud_essd0: PL0 ESSD.
cloud_essd0
HostStoragestringNo

The disk storage of the host. This parameter takes effect only for dedicated clusters that run Tair. Unit: GB. Valid values:

  • 512
  • 1024
  • 1536
  • 2048
  • 2560
  • 3072
  • 3584
  • 4096
512
RegionIdstringYes

The region ID of the dedicated cluster.

cn-hangzhou
ZoneIdstringYes

The zone ID. You can call the DescribeRegions operation to query the most recent zone list.

cn-hangzhou-i
VSwitchIdstringYes

The vSwitch ID. You can view the vSwitch ID in the Virtual Private Cloud (VPC) console.

vsw-bp133c8ifzxd3iv6q****
ClusterTypestringNo

The deployment type of the Self-managed MyBase cluster. Valid values: onACK and onECS.

onACK
ClusterAliasstringNo

The alias of the Self-managed MyBase cluster.

test-on-ack-cluster
VpcIDstringNo

The VPC ID of the Self-managed MyBase cluster.

vpc-xxxxxx
ClusterServicesarrayNo

The services associated with the instances in the Self-managed MyBase on Elastic Compute Service (ECS) cluster.

stringNo

The services associated with the instances in the Self-managed MyBase on Elastic Compute Service (ECS) cluster.

"Orchestrator3.2.6,Promethus2.49.1,Grafana10.2.3"
MyBaseEcsClassobjectNo

The parameters of the instances in the Self-managed MyBase on Elastic Compute Service (ECS) cluster.

ChargeTypestringNo

The billing method. Valid values:

  • PrePaid: subscription.
  • PostPaid: pay-as-you-go.
PrePaid
EcsClassCodestringNo

The instance type.

ecs.g7.large
AmountlongNo

The number of hosts that you want to create.

1
PeriodlongNo

The subscription duration of the host. The Period parameter must be specified when ChargeType is set to PrePaid.

1
PeriodTypestringNo

The unit of the subscription duration. Default value: Month.

Month
SystemDiskSizelongNo

The size of the system disk. Unit: GB.

40
SystemDiskCategorystringNo

The type of the system disk.

cloud_essd
DataDiskSizelongNo

The size of the data disk. Unit: GB.

40
DataDiskCategorystringNo

The type of the data disk.

cloud_essd
DataDiskCountlongNo

The number of data disks.

2
AutoRenewbooleanNo

Specifies whether to enable auto-renewal for the host. Default value: false.

false
PasswordstringNo

The password of the host.

***********
KeyPairNamestringNo

The name of the key pair.

test****
SecurityGroupIdsarrayNo

The IDs of the security groups to which the instance belongs.

stringNo

The IDs of the security groups to which the instance belongs.

sg-uf64zn0tc9qakm2j****
TagsarrayNo

The tags that you want to add to the host.

stringNo

The tags that you want to add to the host.

{\"key1\":\"value1\"}
InternetMaxBandwidthOutlongNo

The maximum outbound public bandwidth. Unit: Mbit/s.

Default value: 0. If you specify the parameter to a value greater than 0, a public IP address is automatically created.

100
InternetChargeTypestringNo

The metering method for network usage. Valid values:

  • PayByBandwidth
  • PayByTraffic
PayByTraffic
DepolymentSetIdstringNo

The deployment set ID.

****

Response parameters

ParameterTypeDescriptionExample
object
OrderIdlong

The order ID.

102565235
RequestIdstring

The request ID.

C860658E-68A6-46C1-AF6E-3AE7C4D32375
ClusterNamestring

The name of the cluster.

ca-2ze0x527ovq3y****
DedicateHostListobject []

The created hosts.

DedicatedHostIdstring

The ID of the created host.

ch-bp108dki3wdl6****

Examples

Sample success responses

JSONformat

{
  "OrderId": 102565235,
  "RequestId": "C860658E-68A6-46C1-AF6E-3AE7C4D32375",
  "ClusterName": "ca-2ze0x527ovq3y****",
  "DedicateHostList": {
    "DedicateHostList": [
      {
        "DedicatedHostId": " ch-bp108dki3wdl6****"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterThe parameter is invalid.The parameter is invalid.
400COMMODITY.INVALID_COMPONENTInvalid component.-
400InvalidAccountPassword.FormatThe account password format is invalid.The account password format is invalid.
400InsufficientResourceCapacityNo host is available for the requested instance.No host is available for the requested instance.

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