Membuat IPv4 Gateway dengan memanggil operasi CreateIpv4Gateway.
Deskripsi operasi
- Operasi CreateIpv4Gateway adalah operasi asinkron. Setelah sistem mengembalikan ID instance, IPv4 gateway belum dibuat, dan sistem akan terus membuat IPv4 gateway di latar belakang. Anda dapat memanggil operasi GetIpv4GatewayAttribute untuk meminta status pembuatan IPv4 gateway:
Jika IPv4 gateway dalam status Creating, IPv4 gateway sedang dibuat.
Jika IPv4 gateway dalam status Created, IPv4 gateway sudah dibuat.
Operasi CreateIpv4Gateway tidak mengizinkan Anda membuat IPv4 gateway secara bersamaan di VPC yang sama.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| Ipv4GatewayName |
string |
No |
Nama IPv4 gateway yang akan dibuat. Nama harus terdiri dari 1 hingga 128 karakter dan tidak boleh diawali dengan |
ipv4 |
| Ipv4GatewayDescription |
string |
No |
Deskripsi IPv4 gateway yang akan dibuat. Deskripsi harus terdiri dari 1 hingga 256 karakter dan tidak boleh diawali dengan |
test |
| VpcId |
string |
Yes |
ID VPC tempat IPv4 gateway yang akan dibuat tersebut berada. Hanya satu IPv4 gateway yang dapat dibuat untuk satu VPC. |
vpc-5tss06uvoyps5xoya**** |
| DryRun |
boolean |
No |
Menentukan apakah hanya akan melakukan precheck terhadap permintaan. Nilai yang valid:
|
false |
| ClientToken |
string |
No |
Client token yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan klien untuk menghasilkan nilainya, tetapi Anda harus memastikan bahwa nilai tersebut unik di antara permintaan yang berbeda. Nilai ClientToken hanya boleh berisi karakter ASCII. Catatan
Jika Anda tidak menentukan parameter ini, sistem secara otomatis menggunakan RequestId dari permintaan API sebagai ClientToken. RequestId berbeda untuk setiap permintaan API. |
123e4567-e89b-12d3-a456-426655440000 |
| RegionId |
string |
Yes |
ID region tempat IPv4 gateway akan dibuat. Anda dapat memanggil operasi DescribeRegions untuk meminta ID region. |
ap-southeast-6 |
| ResourceGroupId |
string |
No |
ID grup sumber daya. |
rg-acfmxazb4ph6aiy**** |
| Tag |
array<object> |
No |
Tag sumber daya. |
|
|
object |
No |
Tag. |
||
| Key |
string |
No |
Kunci tag sumber daya. Anda dapat menentukan hingga 20 kunci tag. Kunci tag tidak boleh berupa string kosong. Kunci tag dapat memiliki panjang hingga 128 karakter dan tidak boleh diawali dengan |
FinanceDept |
| Value |
string |
No |
Nilai tag sumber daya. Anda dapat menentukan hingga 20 nilai tag. Nilai tag dapat berupa string kosong. Nilai tag dapat memiliki panjang hingga 128 karakter dan tidak boleh diawali dengan |
FinanceJoshua |
| RegionId |
string |
Yes |
ID region tempat IPv4 gateway akan dibuat. Anda dapat memanggil operasi DescribeRegions untuk meminta ID region. |
ap-southeast-6 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
ID IPv4 gateway yang dibuat. |
||
| Ipv4GatewayId |
string |
ID IPv4 gateway yang dibuat. |
ipv4gw-5tsnc6s4ogsedtp3k**** |
| ResourceGroupId |
string |
ID grup sumber daya. |
rg-acfmxazb4ph6aiy**** |
| RequestId |
string |
ID permintaan. |
F282742B-1BBB-5F63-A3AF-E92EC575A1A6 |
Contoh
Respons sukses
JSONformat
{
"Ipv4GatewayId": "ipv4gw-5tsnc6s4ogsedtp3k****",
"ResourceGroupId": "rg-acfmxazb4ph6aiy****",
"RequestId": "F282742B-1BBB-5F63-A3AF-E92EC575A1A6"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | OperationDenied.ExistDirectEip | The operation is not allowed because of existing direct eip. | You are not allowed to create an IPv4 gateway because an EIP in cut-through mode exists. |
| 400 | UnsupportedRegion | The feature of ipv4Gateway is not supported in the region. | IPv4 gateways are not supported in this region. |
| 400 | Forbidden.OperateShareResource | You cannot operate shared resources. | Shared resources do not support this operation. |
| 400 | OperationDenied.SubnetRouteV1Exist | The operation is not allowed because of existing subnetRouteV1. | The subnet routes in the VPC do not meet the requirements. |
| 400 | OperationDenied.NormalNatExist | The operation is not allowed because of existing normalNat. | Standard NAT gateways are deployed in the specified VPC. |
| 400 | OperationDenied.VpcExistIpv4Gateway | An IPv4 gateway already exists in the VPC. | You are not allowed to create an IPv4 gateway in the VPC because an IPv4 gateway already exists in the VPC. |
| 400 | UnsupportedFeature.Ipv4Gateway | The feature of ipv4Gateway is not supported for [%s]. | The system failed to create the IPv4 gateway because IPv4 gateways are not supported. |
| 400 | OperationDenied.VpnExist | The operation is not allowed because of existing vpn. | You are not allowed to create an IPv4 gateway because a VPN gateway already exists in the VPC. |
| 400 | OperationDenied.DirectEipExist | The operation is not allowed because of existing directEip. | EIPs are associated with the VPC in cut-through mode or enhanced NAT gateways are deployed in the VPC. |
| 400 | OperationFailed.GetNfvServiceList | The operation is failed because of get nfv serviceList failed. | Failed to obtain the nfc service list. |
| 400 | IncorrectStatus.Vpc | The status of %s [%s] is incorrect. | The instance is in an invalid state. |
| 400 | OperationFailed.VpcNotExist | The operation is failed because of vpc is not found. | The operation failed because the VPC is not found. |
| 400 | IllegalParam.ResourceGroupId | Invalid ResourceGroupld value. | The specified resource group is invalid or does not exist. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.