All Products
Search
Document Center

Smart Access Gateway:ModifySagPortRole

Last Updated:Mar 03, 2024

Modifies the role of a port.

Operation description

Note If you modify the role of a port, the current role configurations of the port are deleted.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
smartag:ModifySagPortRoleWrite
  • SmartAccessGateway
    acs:smartag:{#regionId}:{#accountId}:smartag/{#SmartAGId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

You can call the DescribeRegions operation to query the most recent region list.

cn-shanghai
SmartAGIdstringYes

The ID of the SAG instance.

sag-whfn****
SmartAGSnstringYes

The serial number of the SAG device associated with the SAG instance.

sag32a30****
PortNamestringYes

The name of the port.

0
RolestringYes

The role of the port. Valid values:

  • NONE: No role is assigned to the port.
  • WAN: The port is used as a WAN port. By default, port 5 of an SAG device is used as a WAN port and supports access to the Internet by using a Dynamic Host Configuration Protocol (DHCP) client, PPPoE, or a static IP address.
  • LAN: The port is used as a LAN port. The LAN port allows a DHCP server or a static IP address to connect to an on-premises terminal or switch.
  • ECC: The port is used as a port to connect to an Express Connect circuit.
  • MGT: The port is used as the management port. By default, port 2 of an SAG device is used as the management port.
Note
  • In exclusive mode, the management traffic is separated from the workload traffic. The management port is only used to access the SAG web console and cannot be used to transfer your workload data. You can access the SAG web console only through the management port.
  • A WAN port can be used when it is connected. If a port is the first one that obtains an IP address over DHCP and can access the Internet, it is set as a WAN port. In the SAG web console, you can set another port as a WAN port.
NONE

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

3200E8A3-563F-4FFC-8BDB-0F1263FA69E8

Examples

Sample success responses

JSONformat

{
  "RequestId": "3200E8A3-563F-4FFC-8BDB-0F1263FA69E8"
}

Error codes

HTTP status codeError codeError messageDescription
400Sag.PortNotExistThe specified port does not exist.The specified port does not exist.
400Sag.HaPortExistThe specified port is used by the HA configuration.The specified port is used as an HA port.
400Sag.PortRoleLimitThe maximum number of ports with the specified role is exceeded.-
400Sag.PortMgtErrorThe role of a management port cannot be changed.-
400Sag.PortRoleInvalidThe port role is invalid.The specified device port role is invalid.
400ConfigUnsynchronizedThe network configuration is not synchronized.Network settings are not synchronized.
400IrRuleOutboundPortInUse.%sThe specified port %s is in use as a outbound port of intelligent routing rule, please free it first.-

For a list of error codes, visit the Service error codes.