Appelle l'opération PublishVpnRouteEntry pour publier des routes de destination ou des routes stratégiques dans la table de routage système d'un VPC, ou pour retirer des routes de destination ou des routes stratégiques publiées de la table de routage système du VPC.
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:PublishVpnRouteEntry |
update |
*VpnGateway
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| RegionId |
string |
Oui |
L'identifiant de la région de l'instance de passerelle VPN. Vous pouvez appeler l'opération DescribeRegions pour interroger les identifiants de région. |
cn-hangzhou |
| ClientToken |
string |
Non |
Le jeton client utilisé pour garantir l'idempotence de la requête. La valeur de ce paramètre est générée par le client. Assurez-vous que la valeur est unique pour chaque requête. La longueur maximale est de 64 caractères ASCII. Remarque
Si vous ne spécifiez pas ce paramètre, le système utilise le RequestId de la requête API comme ClientToken. Le RequestId de chaque requête API est différent. |
d7d24a21-f4ba-4454-9173-b382**** |
| VpnGatewayId |
string |
Oui |
L'identifiant de l'instance de passerelle VPN. |
vpn-bp1a3kqjiiq9legfx**** |
| RouteDest |
string |
Oui |
Le bloc CIDR de destination de l'entrée de route de la passerelle VPN. |
10.0.0.0/24 |
| NextHop |
string |
Oui |
Le saut suivant de l'entrée de route de la passerelle VPN. |
vco-bp15oes1py4i66rmd**** |
| RouteType |
string |
Oui |
Le type de l'entrée de route de la passerelle VPN. Valeurs valides :
|
pbr |
| PublishVpc |
boolean |
Oui |
Indique si la route doit être publiée ou retirée. Valeurs valides :
Remarque
Si la table de routage stratégique et la table de routage de destination contiennent des entrées de route avec le même bloc CIDR de destination, et que les deux entrées de route sont publiées dans le même VPC, lorsque vous retirez l'entrée de route de la table de routage stratégique, l'entrée de route dans la table de routage de destination est également retirée. Lorsque vous retirez l'entrée de route de la table de routage de destination, l'entrée de route dans la table de routage stratégique est également retirée. |
true |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
Les paramètres de réponse. |
||
| RequestId |
string |
L'identifiant de la requête. |
5BE01CD7-5A50-472D-AC14-CA181C5C03BE |
Exemples
JSON format
{
"RequestId": "5BE01CD7-5A50-472D-AC14-CA181C5C03BE\t"
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
Description |
|---|---|---|---|
| 400 | Resource.QuotaFull | The quota of resource is full | |
| 400 | VpnGateway.Configuring | The specified service is configuring. | |
| 400 | VpnGateway.FinancialLocked | The specified service is financial locked. | |
| 400 | VpnRouteEntry.AlreadyExists | The specified route entry is already exist. | |
| 400 | VpnRouteEntry.Conflict | The specified route entry has conflict. | |
| 400 | InvalidVpnRouteEntry.NotFound | The specified route entry does not exist. | |
| 400 | OperationFailed.InvalidStatus | Route entry is not allowed to operate in current status. | |
| 400 | OperationFailed.RouteConflict | Operation failed because there is already a route in VPC route table to another VPN on the same network block. | |
| 400 | OperationFailed.InvalidCidrBlock | Operation failed because the specified network block is invalid. | |
| 400 | QuotaExceeded.VpnRouteEntry | The number of route entries to the VPN gateway in the VPC routing table has reached the quota limit. | |
| 400 | TaskConflict | The operation is too frequent, please wait a moment and try again. | |
| 400 | IllegalParam.CidrBlock | The specified CidrBlock is illegal. | |
| 400 | QuotaExceeded | Route entry quota exceeded in this route table. | |
| 400 | MissingParameter | Miss mandatory parameter. | |
| 400 | InvalidCidrBlock.Malformed | Specified CIDR block is not valid. | |
| 400 | InvalidCIDRBlock.Duplicate | Specified CIDR block is already exists. | |
| 400 | IncorrectVpcStatus | Current VPC status does not support this operation. | |
| 400 | IncorrectInstanceStatus | Current instance status does not support this operation. | |
| 400 | IncorrectRouteEntryStatus | Some route entry status blocked this operation. | |
| 400 | IncorrectVSwitchStatus | The current virtual switch status does not support this operation. | |
| 400 | InvalidCidrBlock | Specified CIDR block is not valid. | |
| 400 | InvalidNextHopType | Specified parameter "NextHopType" is not valid | |
| 400 | InvalidNextHop.NotFound | Specified next hop does not exist. | |
| 400 | InvalidVRouter.NotFound | vRouter not exists. | |
| 400 | InvalidVPC.NotFound | vpc not exists. | |
| 400 | InvalidNexthopTypeAndList.BothNull | both nexthopType and nextHopList are null. | |
| 400 | InvalidNexthopTypeAndList.BothNotNull | both nexthopType and nextHopList are not null. | |
| 400 | InvalidRouterInterface | invalid router interface. | |
| 400 | InvalidOppositeRouterType | nexthop list cannot only contain router interface whose opposite router interface is on vbr. | |
| 400 | InvalidNexthopListSize | nexthop size is illegal. Must be between 2 and 4. | |
| 400 | InvalidEntryRuleQuota.NotFound | Route entry quota rule not exists. | |
| 400 | Forbidden.CheckEntryRuleQuota | Route entry quota rule check error. | |
| 400 | InvalidVBRStatus | invalid virtual border router status. | |
| 400 | InvalidPhysicalConnectionBusinessStatus | invalid physical connection business status. | |
| 400 | IncorrectHaVipStatus | This operation is denied because satus of the specified HaVip is neither Available nor InUse. | |
| 400 | CountLimitExceed.HaVipRouteEntry | There can be 5 route entry to HaVip at most in one route table. | |
| 400 | InvalidRouteEntry.Duplicate | The route entry already exist. | |
| 400 | INVALID_WEIGHT_PARAM | Specified value of weight invalid | |
| 400 | FORBIDDEN_USE_VPC_AS_INTERNET_GATEWAY | The Specified CIDR must be in vpc CIDR. | |
| 400 | INVALID_VPC_ID | The Specified VpcId not match. | |
| 400 | InvalidRouteEntrySize | The Specified routerEntry size not legal. | |
| 400 | RouteConflict.AlreadyExist | Route conflict exists in routing table. | |
| 400 | InvalidRouteEntryName.Malformed | Specified RouteEntry name is not valid. | |
| 400 | Duplicated.VpcNextHop | Route entry nexthop duplicate. | |
| 400 | InvalidNexthop.DirectEni | The direct Eni cannot be nexthop. | |
| 400 | InvalidAttachment.NotFound | The attachment is not found. | |
| 400 | OperationFailed.ActiveNetworkInterfaceNotFound | No active network interface is found on the attachment. | |
| 400 | InvalidNetworkInterface.NotFound | The network interface is not found on the attachment. | |
| 400 | OperationFailed.QueryAttachmentInfo | Failed to query attachment information. | |
| 400 | IllegalParam.AttachmentId | The attachment is invalid. | |
| 400 | OperationFailed.NotSupportIPV6 | The specified next hop does not support IPv6. | |
| 400 | IncorrectStatus.Ipv6Address | The IPv6 address of the specified next hop is being assigned or deleted. | |
| 400 | OperationUnsupported.Ipv6EntryOnPrimaryNetworkInterface | You cannot create IPv6 route entries on a primary network interface. | |
| 400 | OperationUnsupported.SpecifyIpOnIpv6Entry | You cannot specify the private IP address when you create IPv6 route entries. | |
| 400 | OperationUnsupported.MutipleIpv6Address | You cannot specify a next hop that has bound multiple IPv6 addresses. | |
| 400 | OperationDenied.Ipv6EntryOnCustomTable | You cannot create any IPv6 route entry on a custom route table. | |
| 403 | Forbbiden.SubUser | User not authorized to operate on the specified resource as your account is created by another user. | |
| 403 | Forbidden | User not authorized to operate on the specified resource. | |
| 404 | InvalidVpnGatewayInstanceId.NotFound | The specified vpn gateway instance id does not exist. |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.