ModifyFirewallV2RoutePolicySwitch

Updated at:

Modifies the route policy switch.

Operation description

This operation modifies the route policy switch of the virtual private cloud (VPC) firewalls for a transit router (TR).

Before you begin

  • You have created virtual private cloud (VPC) firewalls for a transit router (TR) and obtained the FirewallId by calling CreateTrFirewallV2.

  • You have created a route policy and obtained the TrFirewallRoutePolicyId by calling CreateTrFirewallV2RoutePolicy.

  • You can call DescribeTrFirewallsV2List and DescribeTrFirewallV2RoutePolicyList to query and confirm the preceding resources.

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

yundun-cloudfirewall:ModifyFirewallV2RoutePolicySwitch

update

*VpcCenTrFirewallPolicy

acs:cloudfirewall::{#accountId}:vpccentrfirewall/{#FirewallId}/{#TrFirewallRoutePolicyId}

None None

Request parameters

Parameter

Type

Required

Description

Example

Lang

string

No

The language of the response message. Valid values:

  • zh (default): Chinese

  • en: English

zh

FirewallId

string

No

The instance ID of the virtual private cloud (VPC) firewalls.

Note: This parameter is actually required. If it is not provided, the operation returns ErrorParameters (-360103).

vfw-tr-5b202e7f0be64611****

TrFirewallRoutePolicyId

string

No

The ID of the firewall route policy.

Note: This parameter is actually required. If it is not provided or the policy does not exist, the operation returns ErrorTrFirewallPolicyNotFound (-361043). You can call DescribeTrFirewallV2RoutePolicyList to query valid route policy IDs.

policy-93684cc5caa44b2e****

TrFirewallRoutePolicySwitchStatus

string

No

The status of the policy switch. Valid values:

  • open: Enabled.

  • close: Disabled.

Note: This parameter is actually required. If it is not provided or the value is not within the preceding range, the operation returns ErrorParameters (-360103).

open

ShouldRecover

string

No

Specifies whether to restore the traffic redirection configuration. Valid values:

  • true: Rolls back the route.

  • false: Revokes the route.

false

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

1F6D4A8D-EC01-5996-A61A-AA3B56490C00

Examples

Success response

JSON format

{
  "RequestId": "1F6D4A8D-EC01-5996-A61A-AA3B56490C00"
}

Error codes

HTTP status code

Error code

Error message

Description

400 ErrorAliUid Aliuid invalid. The aliuid is invalid.
400 ErrorParameters Error Parameters The parameter is invalid.
400 ErrorAuthentication authentication error The authentication failed.
400 ErrorDBTxError A database transaction error occurred. The error message returned because an internal error has occurred in the database transaction.
400 ErrorDBSelectError A database select error occurred. The error message returned because an internal error has occurred in querying the database.
400 ErrorIllegalRoutePolicyStatusUpdate Can not update policy status. Unable to update routing template status, please check if routing template status is being updated
400 ErrorFirewallUpdating Can not modify firewall, firewall is updating. Please check if there is a routing policy updating. The firewall cannot be operated. The firewall is in an updated state. Please check whether any drainage templates are being created, deleted, updated, opened or closed.
400 ErrorTrFwBackUpAssocationNotExist Tr firewall back up association not Exist. The routing table configuration before the drainage scenario is enabled cannot be obtained. The routing table before the drainage scenario is enabled may have been deleted.
400 ErrorDBInsertError A database insert error occurred. An error occurred while performing an insert operation in the database.
400 ErrorRecordLog record operation log error. Update operation log error.
400 ErrorTrFirewallPolicyNotFound TR firewall policy does not exist. The traffic diversion scenario for the VPC firewall for a transit router does not exist.
400 ErrorBandwidthPenalty Cloud Firewall bandwidth is being overused. Cloud Firewall bandwidth is being overused.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.