Memanggil operasi AllocateDedicatedHosts untuk membuat satu atau beberapa host khusus pay-as-you-go atau langganan. Host khusus adalah resource mesin fisik single-tenant. Anda dapat membuat instans ECS dan mendapatkan atribut server fisik pada host khusus.
Deskripsi operasi
Sebelum membuat host khusus, Anda dapat memanggil DescribeAvailableResource untuk Tampilan ketersediaan resource di wilayah atau zona yang ditentukan.
Pembuatan host khusus akan menimbulkan biaya. Kami menyarankan Anda mempelajari metode penagihan resource terlebih dahulu. Untuk informasi lebih lanjut, lihat Ikhtisar penagihan.
Maksimal 100 host khusus langganan atau pay-as-you-go dapat dibuat sekaligus.
Setelah host khusus dibuat, Anda dapat menggunakan daftar ID host khusus yang dikembalikan sebagai parameter permintaan untuk memanggil DescribeDedicatedHosts guna mengkueri status host khusus yang baru dibuat.
Setelah Anda mengirimkan permintaan untuk membuat host khusus, error akan dilaporkan jika nilai parameter yang ditentukan tidak sesuai atau inventaris tidak mencukupi. Untuk alasan error spesifik, lihat kode error.
Setelah host khusus dibuat, Anda dapat memanggil ModifyInstanceDeployment untuk memigrasi instans ECS dari host bersama ke host khusus, atau menyesuaikan deployment instans antara dua host khusus.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:AllocateDedicatedHosts |
create |
*DedicatedHost
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah host khusus. Anda dapat memanggil DescribeRegions untuk mengkueri daftar wilayah terbaru. |
cn-hangzhou |
| Tag |
array<object> |
No |
Daftar tag. |
|
|
object |
No |
Daftar tag. |
||
| Key |
string |
No |
Kunci tag N host khusus. Nilai valid untuk N: 1 hingga 20. Jika parameter ini ditentukan, nilainya tidak boleh berupa string kosong. Panjang nilai dapat mencapai 128 karakter dan tidak boleh diawali dengan aliyun atau acs:. Nilai tidak boleh mengandung |
Environment |
| Value |
string |
No |
Nilai tag N host khusus. Nilai valid untuk N: 1 hingga 20. Jika parameter ini ditentukan, nilainya dapat berupa string kosong. Panjang nilai dapat mencapai 128 karakter dan tidak boleh mengandung |
Production |
| ResourceGroupId |
string |
No |
ID kelompok sumber daya tempat host khusus berada. |
rg-bp67acfmxazb4ph*** |
| ZoneId |
string |
No |
ID zona tempat host khusus berada. Nilai default: kosong, yang menunjukkan bahwa sistem akan memilih zona untuk Anda. |
cn-hangzhou-f |
| DedicatedHostName |
string |
No |
Nama host khusus. Panjang nama harus 2 hingga 128 karakter dan dapat berisi karakter Unicode dalam kategori huruf (termasuk huruf Inggris, karakter Tionghoa, dan digit). Nama juga dapat berisi titik dua (:), garis bawah (_), titik (.), atau tanda hubung (-). |
myDDH |
| DedicatedHostClusterId |
string |
No |
ID kluster host khusus tempat host khusus berada. |
dc-bp12wlf6am0vz9v2**** |
| DedicatedHostType |
string |
Yes |
Tipe instans host khusus. Anda dapat memanggil operasi DescribeDedicatedHostTypes untuk mengkueri daftar tipe host khusus terbaru. |
ddh.c5 |
| ActionOnMaintenance |
string |
No |
Rencana migrasi untuk instans yang dihosting pada host khusus ketika host khusus mengalami kegagalan atau diperbaiki secara online. Nilai valid:
|
Migrate |
| NetworkAttributes.SlbUdpTimeout |
integer |
No |
The timeout period of UDP sessions for load balancing connections. Unit: seconds. Valid values: 15 to 310. |
60 |
| NetworkAttributes.UdpTimeout |
integer |
No |
The timeout period of UDP sessions for user access to cloud services running on the dedicated host. Unit: seconds. Valid values: 15 to 310. |
60 |
| Description |
string |
No |
Deskripsi host khusus. Panjang deskripsi harus 2 hingga 256 karakter dan tidak boleh diawali dengan |
This-is-my-DDH |
| AutoPlacement |
string |
No |
Apakah akan menambahkan host khusus ke resource pool untuk penyebaran otomatis. Jika Anda tidak menentukan DedicatedHostId saat membuat instans pada host khusus, Alibaba Cloud secara otomatis memilih host khusus dari resource pool untuk menghosting instans. Untuk informasi lebih lanjut, lihat Fungsi fitur penyebaran otomatis. Nilai valid:
Nilai default: on. Catatan
Jika Anda tidak ingin menambahkan host khusus ke resource pool untuk penyebaran otomatis, tetapkan parameter ini ke off. |
off |
| CpuOverCommitRatio |
number |
No |
Rasio overcommit CPU. Hanya tipe instans kustom g6s, c6s, dan r6s yang mendukung pengaturan rasio overcommit CPU. Nilai valid: 1 hingga 5. Rasio overcommit CPU memengaruhi jumlah vCPU yang tersedia pada DDH. Jumlah vCPU yang tersedia pada DDH = jumlah inti CPU fisik * 2 * rasio overcommit CPU. Sebagai contoh, jumlah inti CPU fisik g6s adalah 52. Jika Anda menetapkan rasio overcommit CPU ke 4, jumlah total vCPU yang ditampilkan setelah DDH dibuat adalah 416. Dalam skenario yang tidak memerlukan stabilitas CPU ketat atau beban CPU tidak tinggi, seperti lingkungan pengembangan dan pengujian, peningkatan rasio overcommit meningkatkan jumlah vCPU yang tersedia, yang dapat digunakan untuk melakukan deployment lebih banyak instans ECS dengan spesifikasi yang sama, sehingga mengurangi biaya deployment per unit. |
1 |
| MinQuantity |
integer |
No |
Jumlah minimum host khusus yang akan dibuat. Nilai valid: 1 hingga 100. Catatan
Jika jumlah host khusus yang tersedia kurang dari jumlah minimum, host khusus tidak dapat dibuat. |
2 |
| ChargeType |
string |
No |
Metode penagihan host khusus. Nilai valid:
Nilai default: PostPaid. |
PrePaid |
| Quantity |
integer |
No |
Jumlah host khusus yang akan dibuat. Nilai valid: 1 hingga 100. Nilai default: 1. |
2 |
| Period |
integer |
No |
Durasi langganan host khusus. Parameter
. |
6 |
| PeriodUnit |
string |
No |
Unit durasi langganan host khusus. Nilai valid:
Nilai default: Month. |
Month |
| AutoRenew |
boolean |
No |
Apakah akan mengaktifkan perpanjangan otomatis untuk host khusus langganan. Catatan
Parameter AutoRenew hanya berlaku ketika ChargeType ditetapkan ke PrePaid. Nilai default: false. |
false |
| AutoRenewPeriod |
integer |
No |
Periode perpanjangan otomatis. Parameter AutoRenewPeriod berlaku dan wajib diisi hanya ketika AutoRenew ditetapkan ke true. Nilai valid: Nilai valid ketika PeriodUnit ditetapkan ke Month: 1, 2, 3, 6, dan 12.. |
1 |
| AutoReleaseTime |
string |
No |
pengatur waktu pelepasan otomatis host khusus. Tentukan pengatur waktu dalam standar ISO 8601 dengan format Catatan
|
2019-08-21T12:30:24Z |
| ClientToken |
string |
No |
Token klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan klien untuk menghasilkan nilai, tetapi Anda harus memastikan bahwa nilai tersebut unik di antara permintaan yang berbeda. ClientToken hanya dapat berisi karakter ASCII dan panjangnya tidak boleh melebihi 64 karakter. Untuk informasi lebih lanjut, lihat Cara memastikan idempotensi. |
123e4567-e89b-12d3-a456-426655440000 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Daftar informasi yang dikembalikan. |
||
| RequestId |
string |
ID permintaan. |
E2A664A6-2933-4C64-88AE-5033D003**** |
| DedicatedHostIdSets |
object |
||
| DedicatedHostId |
array |
Daftar ID host khusus (DedicatedHostId). |
|
|
string |
ID host khusus (DedicatedHostId). |
dh-bp67acfmxazb4d**** |
|
| OrderId |
string |
ID pesanan. Catatan
Parameter ini hanya mengembalikan nilai ketika host khusus langganan dibuat (ketika parameter permintaan ChargeType ditetapkan ke PrePaid). |
23841229**** |
Contoh
Respons sukses
JSONformat
{
"RequestId": "E2A664A6-2933-4C64-88AE-5033D003****",
"DedicatedHostIdSets": {
"DedicatedHostId": [
"dh-bp67acfmxazb4d****"
]
},
"OrderId": "23841229****"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidInstanceType.ValueUnauthorized | The specified InstanceType is not authorized. | |
| 400 | InvalidDescription.Malformed | The specified parameter "Description" is not valid. | |
| 400 | InvalidParameter.Conflict | The specified region and cluster do not match. | |
| 400 | InvalidAutoRenewPeriod.ValueNotSupported | The specified autoRenewPeriod is not valid. | |
| 400 | InvalidTagKey.Malformed | The specified Tag.n.Key is not valid. | |
| 400 | InvalidDedicatedHostType.ValueNotSupported | %s | |
| 400 | RegionUnauthorized | %s | |
| 400 | Zone.NotOnSale | %s | |
| 400 | OperationDenied | The specified DedicatedHostType or Zone is not available or not authorized. | |
| 400 | InvalidPeriodUnit.ValueNotSupported | The specified parameter PeriodUnit is not valid. | |
| 400 | InvalidTagValue.Malformed | The specified Tag.n.Value is not valid. | |
| 400 | QuotaExceed.AfterpayDedicatedHost | The maximum number of Pay-As-You-Go DedicatedHosts is exceeded: %s | |
| 400 | InvalidChargeType.ValueNotSupported | ChargeType is not valid | |
| 400 | InvalidParameter.SlbUdpTimeout | The specified value is invalid. | |
| 400 | InvalidParameter.UdpTimeout | The specified value is invalid. | |
| 400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | |
| 400 | InvalidParameter.Quantity | The specified Quantity is invalid. | |
| 400 | InvalidDedicatedHostPrice.NotFound | The specified Dedicated price is not found. | |
| 400 | InvalidDedicatedHostType.CpuOverCommitRatioNotSupported | %s | |
| 400 | InvalidCpuOverCommitRatio.ValueNotSupported | %s | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | OperationDenied | The creation of Host to the specified Zone is not allowed. | |
| 403 | OperationDenied.NoStock | The requested resource is sold out in the specified zone; try other types of resources or other regions and zones. | |
| 403 | NodeControllerUnavailable | The Node Controller is temporarily unavailable. | |
| 403 | InvalidParameter.ResourceOwnerAccount | ResourceOwnerAccount is Invalid. | |
| 403 | InvalidUserData.Forbidden | User not authorized to input the parameter "UserData", please apply for permission "UserData" | |
| 403 | Zone.NotOpen | The specified zone is not granted to you to buy resources yet. | |
| 403 | Zone.NotOnSale | The specified zone is not available for purchase. | |
| 403 | InvalidResourceType.NotSupported | %s | |
| 403 | InvalidDedicatedHostType.ValueNotSupported | The specified DedicatedHostType does not exist or beyond the permitted range. | |
| 403 | InvalidDedicatedHostType.ZoneNotSupported | The specified zone does not support this dedicatedHostType. | |
| 403 | InvalidUserData.Base64FormatInvalid | The specified UserData is not valid | |
| 403 | InvalidParameter.NotMatch | %s | |
| 403 | Account.Arrearage | Your account has been in arrears. | |
| 404 | OperationDenied.NoStock | The requested resource is sold out in the specified zone; try other types of resources or other regions and zones. | |
| 404 | InvalidZoneId.NotFound | The ZoneId provided does not exist in our records. | |
| 404 | OperationDenied | Another Host has been creating | |
| 404 | PaymentMethodNotFound | No payment method has been registered on the account. | |
| 404 | InvalidDedicatedHostName.Malformed | The specified parameter DedicatedHostName is not valid. | |
| 404 | InvalidDedicatedHostClusterId.NotFound | The specified DedicatedHostClusterId does not exist. | |
| 404 | InvalidDedicatedHostClusterId.ExceedMaxSize | The specified Dedicated Host Cluster exceeded max capacity. | |
| 404 | InvalidParameter.ActionOnMaintenance | The specified ActionOnMaintenance does not exist. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.