查询签名密钥列表 - ListSignatureKeysV2
功能介绍
查询所有签名密钥的信息。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限,具体权限要求请参见权限和授权项。
URI
GET /v2/{project_id}/apic/instances/{instance_id}/signs
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| project_id | 是 | String | 项目ID,获取方式请参见API参考的“附录 > 获取项目ID”章节。 |
| instance_id | 是 | String | 实例ID |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| offset | 否 | Long | 偏移量,表示从此偏移量开始查询,偏移量小于0时,自动转换为0 |
| limit | 否 | Integer | 每页显示的条目数量 |
| id | 否 | String | 签名密钥编号 |
| name | 否 | String | 签名密钥名称 |
| precise_search | 否 | String | 指定需要精确匹配查找的参数名称,多个参数需要支持精确匹配时参数之间使用“,”隔开。 目前仅支持name。 |
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| X-Auth-Token | 是 | String | 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
响应参数
状态码:200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| size | Integer | 本次返回的列表长度 |
| total | Long | 满足条件的记录数 |
| signs | Array of SignatureWithBindNum objects | 本次查询到的签名密钥列表 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| name | String | 签名密钥的名称。支持汉字,英文,数字,下划线,且只能以英文和汉字开头。 说明: 中文字符必须为UTF-8或者unicode编码。 |
| sign_type | String | 签名密钥类型:
basic和aes类型需要实例升级到对应版本,若不存在可联系技术工程师升级。 public_key类型开启实例配置public_key才可使用,实例特性配置详情请参考“附录 > 实例支持的APIC特性”,如确认实例不存在public_key配置可联系技术工程师开启。 |
| sign_key | String | 签名密钥的key。
|
| sign_secret | String | 签名密钥的密钥。
|
| sign_algorithm | String | 签名算法。默认值为空,仅aes类型签名密钥支持选择签名算法,其他类型签名密钥不支持签名算法。 |
| update_time | String | 更新时间 |
| create_time | String | 创建时间 |
| id | String | 签名密钥的编号 |
| bind_num | Integer | 绑定的API数量 |
| ldapi_bind_num | Integer | 绑定的自定义后端数量 |
状态码:400
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码 |
| error_msg | String | 错误描述 |
状态码:401
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码 |
| error_msg | String | 错误描述 |
状态码:403
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码 |
| error_msg | String | 错误描述 |
状态码:404
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码 |
| error_msg | String | 错误描述 |
状态码:500
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 错误码 |
| error_msg | String | 错误描述 |
请求示例
无
响应示例
状态码:200
OK
{
"total" : 2,
"size" : 2,
"signs" : [ {
"sign_secret" : "sig**********ret",
"update_time" : "2018-02-07T02:00:27.964766Z",
"create_time" : "2018-02-06T12:17:36Z",
"name" : "signature_demo",
"id" : "0b0e8f456b8742218af75f945307173c",
"sign_key" : "signkeysignkey",
"sign_type" : "hmac",
"bind_num" : 0,
"ldapi_bind_num" : 0
}, {
"sign_secret" : "9ce**********16a",
"update_time" : "2020-07-30T03:56:58Z",
"create_time" : "2020-07-30T03:56:58Z",
"name" : "Signature_udlu",
"id" : "9dc388382fba485aadd19f932303f4c9",
"sign_key" : "ca50c5b670044c83b5b890a9a68a30d5",
"sign_type" : "hmac",
"bind_num" : 0,
"ldapi_bind_num" : 0
} ]
} 状态码:400
Bad Request
{
"error_code" : "APIG.2012",
"error_msg" : "Invalid parameter value,parameterName:name. Please refer to the support documentation"
} 状态码:401
Unauthorized
{
"error_code" : "APIG.1002",
"error_msg" : "Incorrect token or token resolution failed"
} 状态码:403
Forbidden
{
"error_code" : "APIG.1005",
"error_msg" : "No permissions to request this method"
} 状态码:404
Not Found
{
"error_code" : "APIG.3030",
"error_msg" : "The instance does not exist;id:f0fa1789-3b76-433b-a787-9892951c620ec"
} 状态码:500
Internal Server Error
{
"error_code" : "APIG.9999",
"error_msg" : "System error"
} 状态码
| 状态码 | 描述 |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 500 | Internal Server Error |
错误码
请参见错误码。