All Products
Search
Document Center

Smart Access Gateway:DescribeSagPortList

Last Updated:Mar 24, 2026

Queries the information about a physical port.

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:DescribeSagPortList

list

*SmartAccessGateway

acs:smartag:{#regionId}:{#accountId}:smartag/{#SmartAGId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

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

cn-shanghai

SmartAGId

string

Yes

The ID of the SAG instance.

sag-whfn****

SmartAGSn

string

Yes

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

sag32a30****

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

CE6642D4-21EB-4168-9BF9-F217953F9892

Ports

array<object>

The list of the port information.

object

Status

string

Port states:

  • Up: The port is enabled.

  • Down: The port is disabled.

  • Unavailable: The SAG device is disconnected from Alibaba Cloud.

Down

PortName

string

The name of the port.

5

Role

string

Port role:

  • NONE: No role is assigned to the port.

  • WAN: The port is used as a WAN port. The WAN port supports a Dynamic Host Configuration Protocol (DHCP) client, PPPoE, or a static IP address to access the Internet.

  • LAN: The port is used as a LAN port. The LAN port supports a DHCP server or a static IP address to connect to a local terminal or switch.

  • ECC: The port is used as a leased line port to connect to a leased line.

  • MGT: The port is used as the management port.

NONE

Mac

string

The Mac address of the port.

c4:00:ad:a2:f5:****

TaskStates

array<object>

The state of the query task.

object

ErrorMessage

string

The error message. Successful indicates that the query task is successful.

Successful

State

string

Asynchronous task states:

  • Initialized: The query task is initialized.

  • Offline: The SAG device is disconnected from Alibaba Cloud and Alibaba Cloud has not assigned the query task to the SAG device. When the SAG device is connected to Alibaba Cloud, Alibaba Cloud continues to assign the query task to the SAG device.

  • Succeed: Alibaba Cloud has assigned the query task to the SAG device.

  • Processing: Alibaba Cloud is assigning the query task to the SAG device.

  • VersionNotSupport: not supported by the current version of the SAG device.

  • BuildRequestError: not supported by the control and management center in the cloud.

  • HardwareError: Alibaba Cloud failed to assign the query task to the SAG device because the SAG device is faulty.

  • TaskNotExist: The query task does not exist.

  • OfflineNotConfiged: The SAG device is disconnected from Alibaba Cloud and Alibaba Cloud has not assigned the query task to the SAG device. When the SAG device is connected to Alibaba Cloud, Alibaba Cloud does not assign the query task to the SAG device.

Succeed

ErrorCode

string

The error code. 200 indicates that the query task is successful.

200

CreateTime

string

The time when the query task was created.

1586762479000

Examples

Success response

JSON format

{
  "RequestId": "CE6642D4-21EB-4168-9BF9-F217953F9892",
  "Ports": [
    {
      "Status": "Down",
      "PortName": "5",
      "Role": "NONE",
      "Mac": "c4:00:ad:a2:f5:****"
    }
  ],
  "TaskStates": [
    {
      "ErrorMessage": "Successful",
      "State": "Succeed",
      "ErrorCode": "200",
      "CreateTime": "1586762479000"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 SAG.InstanceNoFound The specified SAG instance does not exist. The specified SAG instance does not exist.
400 SAG.SoftwareNotSupport The specified SAG software edition instance does not support ACL. The specified SAG software edition instance does not support ACL.
400 InstanceNotExit The specified instance does not exist. The specified instance does not exist.
400 ConfigUnsynchronized The network configuration is not synchronized. Network settings are not synchronized.
400 SmartAccessGatewayInArrears The specified Smart Access Gateway has expired. The specified Smart Access Gateway has expired.
400 SmartAccessGatewayNotActivated The specified Smart Access Gateway has not been activated. The specified SAG instance is inactive. You must activate the instance first.
400 SmartAccessGatewayOffline The request cannot be completed. The Smart Access Gateway is offline. The SAG device is disconnected. The request cannot be processed.
403 SmartAccessGatewayNotOnline The specified smart access gateway is not online. The specified SAG device is disconnected. The operation cannot be processed.
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.
403 FeatureNotSupportForActiveSmartAG The current edition of the active smart access gateway does not support this feature. The current edition of the active SAG instance does not support this feature.
403 FeatureNotSupportForStandBySmartAG The current edition of the standby 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.