Modifies the route advertisement policy for a CIDR block.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyRouteDistributionStrategy

The operation that you want to perform. Set the value to ModifyRouteDistributionStrategy.

RegionId String Yes cn-shanghai

The region ID of the Smart Access Gateway (SAG) instance.

SmartAGId String Yes sag-erx3qta5xg5zyq****

The ID of the SAG instance.

HcInstanceId String Yes hc-sztovuprqzgm50****

The ID of the health check instance.

SourceType String Yes local

The type of the route source. Valid values:

  • cloud: Alibaba Cloud-facing routes.
  • local: private network-facing routes.
DestCidrBlock String Yes 172.XX.XX.0/24

The destination CIDR block.

RouteSource String Yes OSPF

The source of routes. Valid values:

  • Alibaba Cloud-facing routes
    • The ID of the Virtual Private Cloud (VPC): learns routes from the VPC network.
    • The ID of the virtual border router (VBR): learns routes from the VBR.
    • The ID of the SAG instance: learns routes from the SAG instance.
  • Private network-facing routes
    • STATIC: static routes specified in the SAG console.
    • OSPF: learns routes through the Open Shortest Path First (OSPF) protocol.
    • BGP: learns routes through Border Gateway Protocol (BGP).
RouteDistribution String Yes publish

The route advertisement policy. Valid values:

  • publish: advertises routes.
  • no_publish: does not advertise routes.
  • no_publish_and_publish_on_health_success: routes are advertised only when they pass the health check.
  • no_publish_and_publish_on_health_fail: routes are advertised only when they fail the health check.
  • publish_and_revoke_on_health_success: advertised routes are withdrawn only when they pass the health check.
  • publish_and_revoke_on_health_fail: advertised routes are withdrawn only when they fail the health check.

For more information, see Configure health checks and Advertise routes.

Response parameters

Parameter Type Example Description
RequestId String 24C58BD0-1679-4942-9D42-00B635DAAADB

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=ModifyRouteDistributionStrategy
&DestCidrBlock=172.XX.XX.0/24
&HcInstanceId=hc-sztovuprqzgm50****
&RegionId=cn-shanghai
&RouteDistribution=publish
&RouteSource=OSPF
&SmartAGId=sag-erx3qta5xg5zyq****
&SourceType=local
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ModifyRouteDistributionStrategyResponse>
<RequestId>24C58BD0-1679-4942-9D42-00B635DAAADB</RequestId>
</ModifyRouteDistributionStrategyResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "24C58BD0-1679-4942-9D42-00B635DAAADB"
}

Error codes

HttpCode Error code Error message Description
400 SAG.InstanceIdEmpty You must specify the SAG instance ID. The error message returned because the ID of the SAG app instance is empty.
400 SAG.InstanceNoFound The specified SAG instance does not exist. The error message returned because the specified SAG instance does not exist.
400 RD.InvalidDestCidrBlock The specified destination CIDR block is invalid. The error message returned because the specified destination CIDR block is invalid.
400 RD.InvalidHcInstanceId The specified network health check instance ID is invalid. The error message returned because the specified health check instance is invalid.
400 RD.InvalidRouteDistribution The specified route distribution policy is invalid. The error message returned because the specified route advertisement policy is invalid.
400 RD.InvalidRouteSource The specified route source is invalid. The error message returned because the specified route source is invalid.
400 RD.InvalidSourceType The specified route source type is invalid. The error message returned because the type of the specified route source is invalid.
400 HC.InstanceNoFound The specified network health check instance does not exist. The error message returned because the specified health check instance does not exist.
400 SAG.Arrearage The specified SAG instance has overdue payments. Renew the instance first. The error message returned because the specified SAG instance has an overdue payment. Complete the payment first.
400 SAG.NoActive The specified SAG instance has not been activated. The error message returned because the specified SAG instance has not been activated. Activate the SAG instance first.
400 SAG.SoftwareNotSupportFeature The specified SAG Software instance does not support this feature. The error message returned because the SAG instance does not support this feature.
500 InternalError An error occurred while processing your request. The error message returned because an unknown error occurred.
403 FeatureNotSupport The current edition of the smart access gateway does not support this feature. The error message returned because the current version of the specified SAG device does not support this feature.

For a list of error codes, visit the API Error Center.