All Products
Search
Document Center

Smart Access Gateway:ModifyRouteDistributionStrategy

Last Updated:Aug 28, 2026

Modifies the route advertisement policy for a CIDR block.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

smartag:ModifyRouteDistributionStrategy

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

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

cn-shanghai

SmartAGId

string

Yes

The ID of the SAG instance.

sag-erx3qta5xg5zyq****

HcInstanceId

string

No

The ID of the health check instance.

hc-sztovuprqzgm50****

SourceType

string

Yes

The type of the route source. Valid values:

  • cloud: Alibaba Cloud-facing routes.

  • local: private network-facing routes.

local

DestCidrBlock

string

Yes

The destination CIDR block.

172.XX.XX.0/24

RouteSource

string

Yes

The route source. 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).

OSPF

RouteDistribution

string

Yes

The route advertisement policy. Valid values:

  • publish: advertises routes.

  • no_publish: does not advertise routes.

  • no_publish_and_publish_on_health_success: advertises routes only when the health check succeeds.

  • no_publish_and_publish_on_health_fail: advertises routes only when the health check fails.

  • publish_and_revoke_on_health_success: withdraws advertised routes only when the health check succeeds.

  • publish_and_revoke_on_health_fail: withdraws advertised routes only when the health check fails.

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

publish

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

24C58BD0-1679-4942-9D42-00B635DAAADB

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

400 SAG.InstanceIdEmpty You must specify the SAG instance ID. You must specify the SAG instance ID.
400 SAG.InstanceNoFound The specified SAG instance does not exist. The specified SAG instance does not exist.
400 RD.InvalidDestCidrBlock The specified destination CIDR block is invalid. The specified destination CIDR block is invalid.
400 RD.InvalidHcInstanceId The specified network health check instance ID is invalid. The specified network health check instance ID is invalid.
400 RD.InvalidRouteDistribution The specified route distribution policy is invalid. The specified route distribution policy is invalid.
400 RD.InvalidRouteSource The specified route source is invalid. The specified route source is invalid.
400 RD.InvalidSourceType The specified route source type is invalid. The specified route source type is invalid.
400 HC.InstanceNoFound The specified network health check instance does not exist. The specified network health check instance does not exist.
400 SAG.Arrearage The specified SAG instance has overdue payments. Renew the instance first. The specified SAG instance has overdue payments. Renew the instance first.
400 SAG.NoActive The specified SAG instance has not been activated. The specified SAG instance has not been activated.
400 SAG.SoftwareNotSupportFeature The specified SAG Software instance does not support this feature. The specified SAG Software instance does not support this feature.
500 InternalError An error occurred while processing your request. An error occurred while processing your request.
403 FeatureNotSupport The current edition of the smart access gateway does not support this feature. The current version of Smart Access Gateway does not support this feature.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.