Queries route advertisement policies.

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 DescribeRouteDistributionStrategies

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

RegionId String Yes cn-shanghai

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

SmartAGId String Yes sag-erx3qta5xg5zyq****

The ID of the SAG instance.

SourceType String Yes cloud

The type of route. Valid values:

  • cloud: Alibaba Cloud-facing routes. These routes allow SAG instances to access resources deployed on Alibaba Cloud.
  • local: on-premises network-facing routes. These routes allow SAG instances to communicate with on-premises terminals.
PageNumber Integer No 1

The number of the page to return. Default value: 1.

PageSize Integer No 10

The number of entries to return on each page. Default value: 10.

Response parameters

Parameter Type Example Description
TotalCount Integer 5

The total number of routes.

PageSize Integer 10

The number of entries returned per page.

RequestId String 944C2533-1BB7-4578-B6EB-DA05BB61C02A

The ID of the request.

PageNumber Integer 1

The page number of the returned page.

Strategies Array of Strategy

A list of route advertisement policies.

Strategy
Status String normal

The route status. Valid values:

  • normal: The route is working as expected.
  • revoked: The route has been withdrawn.
StrategyPublishStatus String publish

The route advertisement status. Valid values:

  • publish: The route has been advertised.
  • not_publish: The route has not been advertised.
RouteDistribution String 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.

CreateTime Long 1622617250000

The timestamp that indicates when the health check instance was created. Unit: milliseconds.

SmartAGId String sag-erx3qta5xg5zyq****

The ID of the SAG instance.

SourceType String cloud

The type of the route. Valid values:

  • cloud: Alibaba Cloud-facing routes.
  • local: on-premises network-facing routes.
IsConflict Boolean false

Indicates whether routes are overlapped. Valid values:

  • true: yes
  • false: no
DestCidrBlock String 192.168.3.0/24

The destination CIDR block.

ConflictInfo String "10.90.6.0/24":"vbr-wz900pom71qyr6x67qz65,vbr-wz9f8icxnlcom7riz0gfx"

The information about overlapped routes.

HcInstanceId String hc-sztovuprqzgm50****

The ID of the health check instance.

RouteSource String STATIC

The source of routes. Valid values:

  • Alibaba Cloud-facing routes
    • Virtual private clouds (VPCs) IDs: Routes that are learned from the VPCs.
    • Virtual border routers (VBRs): Routes that are learned from VBRs.
    • SAG instance IDs: Routes that are learned from SAG instances.
  • On-premises network-facing routes
    • STATIC: Static routes that are specified in the SAG console.
    • OSPF: Routes that are learned through the Open Shortest Path First (OSPF) protocol.
    • BGP: Routes that are learned through Border Gateway Protocol (BGP).

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeRouteDistributionStrategies
&RegionId=cn-shanghai
&SmartAGId=sag-erx3qta5xg5zyq****
&SourceType=cloud
&<Common request parameters>

Sample success responses

XML format

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

<DescribeRouteDistributionStrategiesResponse>
    <TotalCount>5</TotalCount>
    <PageSize>10</PageSize>
    <RequestId>944C2533-1BB7-4578-B6EB-DA05BB61C02A</RequestId>
    <PageNumber>1</PageNumber>
    <Strategies>
        <Status>normal</Status>
        <StrategyPublishStatus>publish</StrategyPublishStatus>
        <RouteDistribution>publish</RouteDistribution>
        <CreateTime>1622617250000</CreateTime>
        <SmartAGId>sag-erx3qta5xg5zyq****</SmartAGId>
        <SourceType>cloud</SourceType>
        <IsConflict>false</IsConflict>
        <InstanceId>snat-djngdheb*******</InstanceId>
        <DestCidrBlock>192.168.3.0/24</DestCidrBlock>
        <ConflictInfo>"10.90.6.0/24":"vbr-wz900pom71qyr6x67qz65,vbr-wz9f8icxnlcom7riz0gfx"</ConflictInfo>
        <HcInstanceId>hc-sztovuprqzgm50****</HcInstanceId>
        <RouteSource>STATIC</RouteSource>
    </Strategies>
</DescribeRouteDistributionStrategiesResponse>

JSON format

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

{
  "TotalCount" : 5,
  "PageSize" : 10,
  "RequestId" : "944C2533-1BB7-4578-B6EB-DA05BB61C02A",
  "PageNumber" : 1,
  "Strategies" : {
    "Status" : "normal",
    "StrategyPublishStatus" : "publish",
    "RouteDistribution" : "publish",
    "CreateTime" : 1622617250000,
    "SmartAGId" : "sag-erx3qta5xg5zyq****",
    "SourceType" : "cloud",
    "IsConflict" : false,
    "InstanceId" : "snat-djngdheb*******",
    "DestCidrBlock" : "192.168.3.0/24",
    "ConflictInfo" : "\"10.90.6.0/24\":\"vbr-wz900pom71qyr6x67qz65,vbr-wz9f8icxnlcom7riz0gfx\"",
    "HcInstanceId" : "hc-sztovuprqzgm50****",
    "RouteSource" : "STATIC"
  }
}

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 not set.
400 SAG.InstanceNoFound The specified SAG instance does not exist. The error message returned because the specified SAG instance does not exist.
400 RD.InvalidSourceType The specified route source type is invalid. The error message returned because the type of the specified route source is invalid.

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