调用DescribeSagPortList接口查询物理端口信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeSagPortList

要执行的操作。

取值:DescribeSagPortList

RegionId String cn-shanghai

智能接入网关实例地域ID。

SmartAGId String sag-whfn****

智能接入网关实例ID。

SmartAGSn String sag32a30****

绑定的智能接入网关设备序列号。

返回数据

名称 类型 示例值 描述
Ports Array

端口信息列表。

Mac String c4:00:ad:a2:f5:****

端口Mac地址。

PortName String 5

端口名称。

Role String NONE

端口角色:

  • NONE:表示未分配端口角色。
  • WAN:端口角色为WAN口,WAN口用于接入Internet,支持DHCP client、PPPoE、静态IP接入方式。
  • LAN:端口角色为LAN口,LAN口用于接入本地客户端或交换机,支持DHCP server、静态IP接入方式。
  • ECC:端口角色为专线,用于对接专线。
  • MGT:端口角色为管理口。
Status String Down

端口状态:

  • Up:端口开启。
  • Down:端口关闭。
  • Unavailable:设备不在线。
RequestId String CE6642D4-21EB-4168-9BF9-F217953F9892

请求ID。

TaskStates Array

查询任务信息状态。

CreateTime String 1586762479000

查询任务创建时间。

ErrorCode String 200

错误码。200标识查询任务成功。

ErrorMessage String Successful

错误信息。Successful标识查询任务成功。

State String Succeed

异步任务状态:

  • Initialized:查询任务初始化。
  • Offline:智能接入网关设备离线未下发查询任务,智能接入网关设备上线后会继续下发。
  • Succeed:查询任务下发成功。
  • Processing:查询任务下发中。
  • VersionNotSupport:智能接入网关设备当前版本不支持。
  • BuildRequestError:管控不支持。
  • HardwareError:由于设备原因查询任务下发失败。
  • TaskNotExist:查询任务不存在。
  • OfflineNotConfiged:智能接入网关设备离线未下发查询任务,智能接入网关设备上线后也不会下发。

示例

请求示例

http(s)://smartag.cn-shanghai.aliyuncs.com/?Action=DescribeSagPortList
&RegionId=cn-shanghai
&SmartAGId=sag-whfn****
&SmartAGSn=sag32a30****
&<公共请求参数>

正常返回示例

XML 格式

<DescribeSagPortListResponse>
  <RequestId>4363065D-5F04-49D4-A994-C1DF39C7E241</RequestId>
  <Ports>
        <Role>LAN</Role>
        <Status>Down</Status>
        <PortName>0</PortName>
        <Mac>cc:d3:9d:9e:2d:****</Mac>
  </Ports>
  <Ports>
        <Role>NONE</Role>
        <Status>Down</Status>
        <PortName>1</PortName>
        <Mac>cc:d3:9d:9e:2d:****</Mac>
  </Ports>
  <Ports>
        <Role>MGT</Role>
        <Status>Up</Status>
        <PortName>2</PortName>
        <Mac>cc:d3:9d:9e:2d:****</Mac>
  </Ports>
  <Ports>
        <Role>ECC</Role>
        <Status>Down</Status>
        <PortName>3</PortName>
        <Mac>cc:d3:9d:9e:2d:****</Mac>
  </Ports>
  <Ports>
        <Role>LAN</Role>
        <Status>Up</Status>
        <PortName>4</PortName>
        <Mac>cc:d3:9d:9e:2d:****</Mac>
  </Ports>
  <Ports>
        <Role>WAN</Role>
        <Status>Up</Status>
        <PortName>5</PortName>
        <Mac>cc:d3:9d:9e:2d:****</Mac>
  </Ports>
  <TaskStates>
        <State>Succeed</State>
        <CreateTime>1586762479000</CreateTime>
        <ErrorCode>200</ErrorCode>
        <ErrorMessage>Successful</ErrorMessage>
  </TaskStates>
</DescribeSagPortListResponse>

JSON 格式

{
	"RequestId": "4363065D-5F04-49D4-A994-C1DF39C7E241",
	"Ports": [
		{
			"Role": "LAN",
			"Status": "Down",
			"PortName": "0",
			"Mac": "cc:d3:9d:9e:2d:****"
		},
		{
			"Role": "NONE",
			"Status": "Down",
			"PortName": "1",
			"Mac": "cc:d3:9d:9e:2d:****"
		},
		{
			"Role": "MGT",
			"Status": "Up",
			"PortName": "2",
			"Mac": "cc:d3:9d:9e:2d:****"
		},
		{
			"Role": "ECC",
			"Status": "Down",
			"PortName": "3",
			"Mac": "cc:d3:9d:9e:2d:****"
		},
		{
			"Role": "LAN",
			"Status": "Up",
			"PortName": "4",
			"Mac": "cc:d3:9d:9e:2d:****"
		},
		{
			"Role": "WAN",
			"Status": "Up",
			"PortName": "5",
			"Mac": "cc:d3:9d:9e:2d:****"
		}
	],
	"TaskStates": [
		{
			"State": "Succeed",
			"CreateTime": 1586762479000,
			"ErrorCode": "200",
			"ErrorMessage": "Successful"
		}
	]
}

错误码

HttpCode 错误码 错误信息 描述
400 SAG.InstanceNoFound The specified SAG instance does not exist. 智能网关实例不存在。
400 SAG.SoftwareNotSupport The specified SAG software edition instance does not support ACL. 智能接入网关软件版实例不支持ACL。
500 SmartAccessGatewayInArrears The specified Smart Access Gateway has expired. 该智能接入网关已经到期停服,请续费。
500 SmartAccessGatewayNotActivated The specified Smart Access Gateway has not been activated. 该智能接入网关尚未激活,请先激活该实例。
403 SmartAccessGatewayNotOnline The specified smart access gateway is not online. 该智能接入网关当前不是在线状态,无法完成操作。
500 SmartAccessGatewayOffline The request cannot be completed. The Smart Access Gateway is offline. 智能接入网关离线,请求无法完成。
400 InstanceNotExit The specified instance does not exist. 指定的实例不存在
400 ConfigUnsynchronized The network configuration is not synchronized. 网络配置未同步
403 FeatureNotSupport The current edition of the smart access gateway does not support this feature. 智能接入网关当前版本不支持该功能特性
403 FeatureNotSupportForActiveSmartAG The current edition of the active smart access gateway does not support this feature. 主智能接入网关的当前版本不支持该功能特性
403 FeatureNotSupportForStandBySmartAG The current edition of the standby smart access gateway does not support this feature. 备智能接入网关的当前版本不支持该功能特性

访问错误中心查看更多错误码。