Mengaitkan tabel rute kustom yang Anda buat dengan vSwitch di VPC yang sama.
Deskripsi operasi
AssociateRouteTable adalah operasi asinkron. Setelah sistem mengembalikan ID permintaan, asosiasi antara tabel rute dan vSwitch belum selesai dan tugas asosiasi masih berjalan di latar belakang. Anda dapat memanggil operasi DescribeVSwitchAttributes untuk mengkueri status asosiasi tabel rute:
Jika vSwitch berada dalam status Pending, tabel rute sedang dikaitkan.
Jika vSwitch berada dalam status Available, tabel rute telah dikaitkan.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah tempat VPC yang memiliki tabel rute yang akan dikaitkan dengan vSwitch berada. Anda dapat memanggil operasi DescribeRegions untuk mengkueri ID wilayah. |
cn-hangzhou |
| RouteTableId |
string |
Yes |
ID tabel rute yang akan dikaitkan dengan vSwitch. |
vtb-bp145q7glnuzdvzu2**** |
| VSwitchId |
string |
Yes |
ID vSwitch yang akan dikaitkan dengan tabel rute. |
vsw-25ncdvfaue4**** |
| ClientToken |
string |
No |
Token klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan klien untuk menghasilkan nilai ini, tetapi Anda harus memastikan bahwa nilai tersebut unik di antara permintaan yang berbeda. Token hanya dapat berisi karakter ASCII. Catatan
Jika Anda tidak menentukan parameter ini, sistem secara otomatis menggunakan RequestId dari permintaan API sebagai ClientToken. RequestId dari setiap permintaan API mungkin berbeda. |
02fb3da4-130e-11e9-8e44-0016e04115b |
| RegionId |
string |
Yes |
The ID of the region to which the VPC that owns the route table to be associated with the vSwitch belongs. You can call the DescribeRegions operation to query the region ID. |
cn-hangzhou |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
DC668356-BCB4-42FD-9BC3-FA2B2E04B634 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "DC668356-BCB4-42FD-9BC3-FA2B2E04B634"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | OperationDenied.CloudBoxVbrEntryExist | The operation is not allowed because the routing table has a route entry for the next hop to the cloud box VBR. | |
| 400 | OperationDenied.OtherCloudBoxVbrEntryExist | The operation is not allowed because the routing table has a route entry for the next hop that points to a VBR other than this cloud box. | |
| 400 | ResourceAlreadyAssociated.RouteTable | The resource has already associated with a routetable. | |
| 400 | OperationDenied.AssociateGatewayRouteTable | The operation is not allowed because gateway route tables cannot be bound to a vSwitch. | |
| 400 | OperationDenied.SwitchToSystemRouteTable | The associated route tables cannot be directly changed to system route tables. | |
| 400 | ResourceNotFound.VSwitch | The specified resource of VSwitch is not found. | |
| 400 | InvalidRouteTableId.NotFound | Specified route table does not exist. | |
| 400 | OperationDenied.LocalRouteEntryModified | The next hop of a local route is modified. | |
| 400 | MissingParam.VSwitchId | The parameter VSwitchId is missing. | |
| 400 | InvalidRegionId.NotFound | Specified value of RegionId is not supported. | |
| 400 | InvalidParameter.Action | This vpc feature is not supported in this region | |
| 400 | IncorrectVSwitchStatus | The current status of the virtual switch does not support this operation. | |
| 400 | Forbidden.VSwitchAlreadyAssociatedRouteTable | The specified virtual switch already associates route table. | |
| 400 | Forbidden.NotInSameVpc | The specified virtual switch and route table are not in the same VPC. | |
| 400 | IncorrectStatus.RouteTable | The status of the specified route table is incorrect. | |
| 404 | InvalidRouteTableId.NotFound | Specified route table does not exist. | |
| 404 | InvalidVSwitchId.NotFound | Specified VSwitch does not exist. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.