All Products
Search
Document Center

Elastic Compute Service:ModifyRouterInterfaceSpec

Last Updated:Apr 16, 2026

Modifies the spec of a router interface.

Note

This API has been deprecated. We recommend migrating to Vpc(2016-04-28) - ModifyRouterInterfaceSpec for enhanced functionality and continued support. While the deprecated API remains temporarily accessible, no further updates or bug fixes will be provided.

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

vpc:ModifyRouterInterfaceSpec

update

*RouterInterface

acs:vpc:{#regionId}:{#accountId}:routerinterface/{#RouterInterfaceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The ID of the region where the router interface is deployed. You can call the DescribeRegions operation to get the latest list of regions.

RouterInterfaceId

string

Yes

The ID of the router interface.

Spec

string

Yes

The new spec for the router interface. Valid values: Mini.2, Small.1, Middle.1, Middle.2, Large.1, Large.2, Xlarge.1, and Negative.

ClientToken

string

No

A client-generated token that you can use to ensure request idempotency. The token must be unique across requests, can contain only ASCII characters, and must be no more than 64 characters long.

UserCidr

string

No

The client-side CIDR block of the router interface. This parameter is required when the role of the router interface is InitiatingSide and the router interface is in the Idle or Active state. The CIDR block must be a /30 block in the 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16 address range. The client-side CIDR block cannot overlap with the CIDR block of the VPC where the router interface is located.

Response elements

Element

Type

Description

Example

object

The response data.

Spec

string

The new spec of the router interface.

RequestId

string

The request ID.

Examples

Success response

JSON format

{
  "Spec": "",
  "RequestId": ""
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidSpec.ValudNotSupported The specified Spec is not supported. The specified Spec parameter is invalid.
400 Forbidden.FinancialLocked RouterInterface can not be operated by this action when it??s FinancialLocked.
400 InvalidParam.NotFound Parameter must not be null,uid, bid,regionNo, remoteRegionNo or routerId
400 InvalidOppositeRegionId.NotFound The OppositeRegionId provided does not exist in our records.
400 InvalidInstanceOwner.Error The router instance owener error. The state of the instance is invalid.
400 InvalidInstance.StatusError The router instance owener error. The state of the instance is invalid.
400 InvalidOpposite.NotFound The opposite not exit.
400 InvalidRouterInterfaceSpec.Malformed Specified RouterInterface spec is not valid.
400 IllegalParam.chargeType RouterInterface chargeType different.
404 InvalidRouterInterfaceId.NotFound The specified RouterInterfaceId does not exist in our record. The specified router interface does not exist. Check whether the router interface ID is valid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.