链接复制成功!
查询授权详情
功能介绍
查询授权详情
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v2/servicerequest/authorizations/{authorization_id}
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
authorization_id |
是 |
String |
授权id 最小长度:1 最大长度:32 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
group_id |
否 |
String |
华为云IAM组id,涉及同组其他工单的操作时,该id必传 最小长度:1 最大长度:64 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Auth-Token |
是 |
String |
用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:1 最大长度:5000 |
X-Language |
否 |
String |
语言环境,值为通用的语言描述字符串,比如zh-cn等,默认为zh-cn。 会根据语言环境对应展示一些国际化的信息,比如工单类型名称等。 最小长度:1 最大长度:32 |
X-Time-Zone |
否 |
String |
环境时区,值为通用的时区描述字符串,比如GMT+8等,默认为GMT+8。 涉及时间的数据会根据环境时区处理。 最小长度:1 最大长度:32 |
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
id |
String |
授权id 最小长度:1 最大长度:32 |
status |
Integer |
授权状态,0:待授权 1:已授权 2:已拒绝 3:已过期 4:已撤回 5:已取消 最小值:0 最大值:10 |
incident_id |
String |
工单id 最小长度:1 最大长度:64 |
simple_description |
String |
工单简要描述 最小长度:0 最大长度:2000 |
resource_type_id |
String |
授权资源类型id 最小长度:0 最大长度:32 |
resource_type_name |
String |
授权资源类型名称 最小长度:0 最大长度:64 |
visit_type_id |
String |
授权访问类型id 最小长度:0 最大长度:32 |
visit_type_name |
String |
授权访问类型名称 最小长度:0 最大长度:64 |
auth_effective_time |
String |
授权生效时间 |
auth_expire_time |
String |
授权到期时间 |
reject_reason |
String |
拒绝原因 最小长度:0 最大长度:300 |
incident_auth_detail_list |
Array of IncidentOrderAuthDetailInfoV2 objects |
授权详情列表 数组长度:1 - 5 |
xcustomer_name |
String |
子账号名称 最小长度:0 最大长度:256 |
auth_handler_name |
String |
授权处理人名称 最小长度:1 最大长度:64 |
agency_name |
String |
委托名称 最小长度:0 最大长度:128 |
auth_describe |
String |
授权描述 最小长度:0 最大长度:256 |
content_type_id |
String |
授权内容Id 最小长度:0 最大长度:64 |
content_type_name |
String |
授权内容名称 最小长度:0 最大长度:64 |
参数 |
参数类型 |
描述 |
---|---|---|
id |
Long |
授权详情id 最小值:0 最大值:9223372036854775807 |
port |
Integer |
端口 最小值:0 最大值:65535 |
account |
String |
账户 最小长度:0 最大长度:64 |
type |
Integer |
授权详情类型,0控制台 1主机资源 最小值:0 最大值:1 |
instance_id |
String |
实例id 最小长度:0 最大长度:64 |
instance_name |
String |
实例名称 最小长度:0 最大长度:64 |
region_id |
String |
区域id 最小长度:0 最大长度:64 |
请求示例
GET https://{endpoint}/v2/servicerequest/authorizations/Auth-123456?group_id=123 null
响应示例
状态码: 200
成功返回200
{
"id" : "123",
"status" : 0,
"incident_id" : "test-123",
"simple_description" : "test",
"resource_type_id" : "2",
"resource_type_name" : "华为云账号",
"visit_type_id" : "4",
"visit_type_name" : "控制台登录",
"auth_effective_time" : "2020-07-07T09:33:43.000Z",
"auth_expire_time" : "2020-07-07T09:33:43.000Z",
"reject_reason" : null,
"incident_auth_detail_list" : [ {
"id" : 123,
"port" : 22,
"account" : "test",
"type" : 0,
"instance_id" : "",
"instance_name" : "",
"region_id" : ""
} ],
"xcustomer_name" : "test",
"auth_handler_name" : "test",
"agency_name" : null,
"auth_describe" : "test",
"content_type_id" : "123",
"content_type_name" : "密钥"
}
状态码
状态码 |
描述 |
---|---|
200 |
成功返回200 |
错误码
请参见错误码。