文档

ListDevices - 分页获取设备列表

更新时间:

分页获取设备列表。

调试

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

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
cmn:ListDevicesLIST
  • Device
    acs:cmn:{#regionId}:{#accountId}:device/*

请求参数

名称类型必填描述示例值
MaxResultsinteger

返回结果的最大个数。

10
NextTokenstring

当总结果个数大于 MaxResults 时,用于翻页的 token。

1
DeviceFormIdstring

设备形态 ID。

form-u4ilnhu64h026lrf
DeviceFormNamestring

设备形态名称。

网络设备
PhysicalSpaceIdstring

物理空间 ID。

space-ez6zd3w68ma4fsd4
HostNamearray

设备主机名列表。

string

设备主机名。

HZYT_****
Iparray

设备 IP 列表。

string

设备 IP。

127.0.**.***
Snarray

设备 SN 列表。

string

设备 SN。

2022*****
Macarray

设备 MAC 列表。

string

设备 MAC。

01:1b***
Vendorarray

设备厂商列表。

string

设备厂商。

Alibaba
Modelarray

设备型号列表。

string

设备型号。

SAG-1000
ServiceStatusarray

设备服务状态列表。

string

设备服务状态。

one
SecurityDomainarray

安全域列表。

string

安全域。

CMN-XA07
ExtAttributesstring

设备额外属性。

{"role":"ASW"}
InstanceIdstring

实例 ID。

cmn-cn-xxx
Keywordstring

模糊查询值。

G1QH55J******
PhysicalSpaceIdsarray

物理空间 ID 列表。

string

物理空间 ID。

space-ez6zd3w68ma4fsd4
DeviceIdsarray

设备 ID 列表。

string

设备 ID。

device-2nq3str0d65rxdp6
CalculateAmountboolean

是否统计。

true

返回参数

名称类型描述示例值
object

Schema of Response

TotalCountinteger

总记录数。

100
NetworkCoefficientinteger

网络设备系数。

1
ServerCoefficientinteger

服务器系数。

1
IotCoefficientinteger

IOT 系数。

1
OtherCoefficientinteger

其他设备系数。

1
NetworkMaintenanceCoefficientinteger

网络设备维保系数。

1
ServerMaintenanceCoefficientinteger

服务器维保系数。

1
AmountDetailstring

设备明细。

{"networkOnlineCount":11,"serverOnlineCount":7,"iotOnlineCount":2,"otherOnlineCount":0,"networkMaintainCount":0,"serverMaintainCount":0,"iotMaintainCount":0,"otherMaintainCount":0,"networkUdfStatusCount":5,"serverUdfStatusCount":0,"iotUdfStatusCount":0,"otherUdfStatusCount":0,"ratioNetworkCount":16,"ratioServerCount":3,"ratioIotCount":0,"ratioOtherCount":0}
RequestIdstring

请求 ID。

fdb2af01-bd56-4034-812b-f257f73b4690
NextTokeninteger

当总结果个数大于 MaxResults 时,用于翻页的 token。

10
Devicesobject []

设备列表。

DeviceIdstring

设备 ID。

device-evve560juend5owh
DeviceFormNamestring

设备形态名称。

网络设备
DeviceFormIdstring

设备形态 ID。

form-u4ilnhu64h026lrf
PhysicalSpaceIdstring

物理空间 ID。

space-ez6zd3w68ma4fsd4
PhysicalSpaceNamestring

物理空间名称。

阿里巴巴西溪园区
HostNamestring

设备名。

HZYT_****
Ipstring

设备 IP。

127.0.**.***
Snstring

设备 SN。

2022*****
Macstring

设备 MAC 地址。

01:1b***
Vendorstring

设备厂商。

Alibaba
Modelstring

设备型号。

SAG-1000
SecurityDomainstring

设备安全域。

IT
ServiceStatusstring

设备状态。

online
LoginTypestring

登录类型。

SSH,TELNET
LoginUsernamestring

登录账号。

admin
LoginPasswordstring

登录密码。

pass****
EnablePasswordstring

Enable 密码。

pass****
SnmpAccountVersionstring

SNMP 版本,支持 v1,v2c,v3。

v3
SnmpCommunitystring

团体字,SNMP v1 和 v2c 需要。

pass****
SnmpAccountTypestring

SNMP 账号类型。

get
SnmpSecurityLevelstring

SNMP 安全级别,SNMP v3 需要。

AUTH_PRIV
SnmpUsernamestring

用户名,SNMP v3 需要。

admin
SnmpAuthPassphrasestring

用户认证密码,SNMP v3 需要。

pass****
SnmpAuthProtocolstring

用户认证协议,SNMP v3 需要。

MD5
SnmpPrivacyPassphrasestring

用户加密密码,SNMP v3 需要。

pass****
SnmpPrivacyProtocolstring

用户加密协议,SNMP v3 需要。

DES
ExtAttributesstring

设备额外属性。

{"role":"ASW"}
GmtCreatestring

创建时间。

2022-11-08 09:00:58
GmtModifiedstring

修改时间。

2023-01-16 09:43:20
MaxResultsinteger

每页数量。

10
AmountUsedinteger

已使用配额。

10

示例

正常返回示例

JSON格式

{
  "TotalCount": 100,
  "NetworkCoefficient": 1,
  "ServerCoefficient": 1,
  "IotCoefficient": 1,
  "OtherCoefficient": 1,
  "NetworkMaintenanceCoefficient": 1,
  "ServerMaintenanceCoefficient": 1,
  "AmountDetail": "{\"networkOnlineCount\":11,\"serverOnlineCount\":7,\"iotOnlineCount\":2,\"otherOnlineCount\":0,\"networkMaintainCount\":0,\"serverMaintainCount\":0,\"iotMaintainCount\":0,\"otherMaintainCount\":0,\"networkUdfStatusCount\":5,\"serverUdfStatusCount\":0,\"iotUdfStatusCount\":0,\"otherUdfStatusCount\":0,\"ratioNetworkCount\":16,\"ratioServerCount\":3,\"ratioIotCount\":0,\"ratioOtherCount\":0}",
  "RequestId": "fdb2af01-bd56-4034-812b-f257f73b4690",
  "NextToken": 10,
  "Devices": [
    {
      "DeviceId": "device-evve560juend5owh",
      "DeviceFormName": "网络设备",
      "DeviceFormId": "form-u4ilnhu64h026lrf",
      "PhysicalSpaceId": "space-ez6zd3w68ma4fsd4",
      "PhysicalSpaceName": "阿里巴巴西溪园区",
      "HostName": "HZYT_****\n",
      "Ip": "127.0.**.***\n",
      "Sn": "2022*****\n",
      "Mac": "01:1b***",
      "Vendor": "Alibaba",
      "Model": "SAG-1000\n",
      "SecurityDomain": "IT",
      "ServiceStatus": "online",
      "LoginType": "SSH,TELNET",
      "LoginUsername": "admin",
      "LoginPassword": "pass****\n",
      "EnablePassword": "pass****",
      "SnmpAccountVersion": "v3",
      "SnmpCommunity": "pass****\n",
      "SnmpAccountType": "get",
      "SnmpSecurityLevel": "AUTH_PRIV",
      "SnmpUsername": "admin",
      "SnmpAuthPassphrase": "pass****\n",
      "SnmpAuthProtocol": "MD5",
      "SnmpPrivacyPassphrase": "pass****\n",
      "SnmpPrivacyProtocol": "DES",
      "ExtAttributes": "{\"role\":\"ASW\"}",
      "GmtCreate": "2022-11-08 09:00:58",
      "GmtModified": "2023-01-16 09:43:20"
    }
  ],
  "MaxResults": 10,
  "AmountUsed": 10
}

错误码

HTTP status code错误码错误信息描述
400Missing%sYou must specify the parameter %s.必填参数没有填。请检查调用时是否填写了此参数,并重试请求。
400SignatureDoesNotMatch签名不通过-
403NoPermission没有权限-
404Invalid%s.NotFoundThe specified resource %s does not exist.找不到对应资源
404ServiceNotFound后端服务未找到-
500InternalError服务器内部错误-
503ServiceUnavailable服务不可用-

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

变更历史

变更时间变更内容概要操作
2022-01-07OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    删除错误码:400
    删除错误码:404
  • 本页导读 (0)
文档反馈