Associe une table de routage personnalisée à un vSwitch dans le même VPC.
Description de l'opération
AssociateRouteTable est une opération asynchrone. Après l'envoi d'une requête, le système renvoie un identifiant de requête et exécute la tâche en arrière-plan. Vous pouvez appeler l'opération DescribeVSwitchAttributes pour interroger l'état de la tâche :
Si le vSwitch est dans l'état Pending, la table de routage est en cours d'association avec le vSwitch.
Si le vSwitch est dans l'état Available, la table de routage est associée au vSwitch.
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
vpc:AssociateRouteTable |
update |
*VSwitch
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| RegionId |
string |
Oui |
L'identifiant de la région du VPC auquel appartient la table de routage. Vous pouvez appeler l'opération DescribeRegions pour obtenir la liste des régions la plus récente. |
cn-hangzhou |
| RouteTableId |
string |
Oui |
L'identifiant de la table de routage. |
vtb-bp145q7glnuzdvzu2**** |
| VSwitchId |
string |
Oui |
L'identifiant du vSwitch. |
vsw-25ncdvfaue4**** |
| ClientToken |
string |
Non |
Le jeton client utilisé pour garantir l'idempotence de la requête. Vous pouvez utiliser le client pour générer le jeton, mais vous devez vous assurer qu'il est unique pour chaque requête. Le jeton ne peut contenir que des caractères ASCII. Remarque
Si vous ne spécifiez pas ce paramètre, le système utilise automatiquement l'identifiant de requête comme jeton client. L'identifiant de requête peut être différent pour chaque requête. |
02fb3da4-130e-11e9-8e44-0016e04115b |
| RegionId |
string |
Oui |
L'identifiant de la région du VPC auquel appartient la table de routage. Vous pouvez appeler l'opération DescribeRegions pour obtenir la liste des régions la plus récente. |
cn-hangzhou |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
|||
| RequestId |
string |
L'identifiant de la requête. |
DC668356-BCB4-42FD-9BC3-FA2B2E04B634 |
Exemples
JSON format
{
"RequestId": "DC668356-BCB4-42FD-9BC3-FA2B2E04B634"
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
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. | The operation is not allowed because the route table contains route entries with the next hop pointing to a CloudBox 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. | The specified operation is not allowed because the route table contains a route entry whose next hop points to a VBR that is not in the current CloudBox. |
| 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. | The vSwitch cannot be associated with a gateway route table. |
| 400 | OperationDenied.SwitchToSystemRouteTable | The associated route tables cannot be directly changed to system route tables. | Failed to switch from the associated route table to the system route table. |
| 400 | ResourceNotFound.VSwitch | The specified resource of VSwitch is not found. | The specified vSwitch does not exist. |
| 400 | InvalidRouteTableId.NotFound | Specified route table does not exist. | |
| 400 | OperationDenied.LocalRouteEntryModified | The next hop of a local route is modified. | The next hop of the local type route has been modified. |
| 400 | MissingParam.VSwitchId | The parameter VSwitchId is missing. | 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. |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.