查询指定服务授权概要
功能介绍
该接口可以用于查询指定云服务的授权概要。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v5/authorization-schemas/services/{service_code}
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
service_code |
是 |
String |
服务名称缩写,长度为1到56个字符,只包含字母、数字和"-"的字符串。 |
请求参数
无
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
version |
String |
服务授权概要的版本号。 |
|
actions |
Array of Action objects |
云服务支持的授权项列表。 |
|
resources |
Array of Resource objects |
云服务支持的资源列表。 |
|
conditions |
Array of Condition objects |
云服务支持的条件键列表。 |
|
operations |
Array of Operation objects |
云服务支持的操作列表。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
name |
String |
三段式的授权项名称,例如"iam:policies:createV5"。 |
|
access_level |
String |
在策略中使用此授权项时授予的访问级别。 |
|
permission_only |
Boolean |
该授权项是否仅作为权限点,不对应任何操作。 |
|
description |
Description object |
描述信息。 |
|
aliases |
Array of strings |
授权项别名列表,用以兼容授权项改名或者拆分新授权项的场景。 |
|
resources |
Array of ActionAssociatedResource objects |
与该授权项关联的资源列表,用于定义授权项的资源级权限。 |
|
condition_keys |
Array of strings |
该授权项支持的,且与资源无关的服务自定义条件属性以及部分全局属性。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
urn_template |
String |
统一资源名称模板,表示可以通过这类资源的统一资源名称对该授权项进行资源粒度的授权。 |
|
required |
Boolean |
标识该资源类型是否是这个授权项必选的,即授权项一定涉及对这类资源的操作;例如subnet是vpc:subnets:get的必选资源类型;而ou是organizations::tagResource的可选资源类型,因为organizations::tagResource操作的资源还可能是account或者policy。 |
|
condition_keys |
Array of strings |
针对该授权项和资源的服务自定义条件属性以及部分全局属性,只有授权项和资源同时匹配时才会生效。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
type_name |
String |
云服务资源类型名称。 |
|
urn_template |
String |
统一资源名称模板,表示可以通过这类资源的统一资源名称对该授权项进行资源粒度的授权。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
key |
String |
条件键的名称。 |
|
value_type |
String |
条件值的数据类型。 |
|
multi_valued |
Boolean |
条件值是否为多值。 |
|
description |
Description object |
描述信息。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
operation_id |
String |
OpenAPI的操作标识符。 最小长度:1 最大长度:64 |
|
operation_action |
String |
三段式的授权项名称,例如"iam:policies:createV5"。 |
|
dependent_actions |
Array of strings |
该操作可能需要的其他授权项授权。 |
状态码:404
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码。 |
|
error_msg |
String |
错误信息。 |
|
request_id |
String |
请求ID。 |
请求示例
查询指定云服务的授权概要。
GET https://{endpoint}/v5/authorization-schemas/services/{service_code}
响应示例
状态码:200
请求成功。
{
"version" : "v1",
"actions" : [ {
"name" : "sts:agencies:assume",
"access_level" : "write",
"permission_only" : false,
"description" : {
"en_US" : "Grants permission to obtain a set of temporary credentials that you can use to access resources that you might not normally have access to.",
"zh_CN" : "..."
},
"resources" : [ {
"urn_template" : "iam::<account-id>:agency:<agency-name-with-path>",
"required" : true
} ],
"condition_keys" : [ "sts:ExternalId", "sts:SourceIdentity", "sts:TransitiveTagKeys", "sts:AgencySessionName" ]
}, {
"name" : "sts::getCallerIdentity",
"access_level" : "read",
"permission_only" : false,
"description" : {
"en_US" : "Grants permission to obtain details about the IAM identity whose credentials are used to call the API.",
"zh_CN" : "..."
}
}, {
"name" : "sts::decodeAuthorizationMessage",
"access_level" : "write",
"permission_only" : false,
"description" : {
"en_US" : "Grants permission to decode additional information about the authorization status of a request from an encoded message returned in response to a request.",
"zh_CN" : "..."
}
}, {
"name" : "sts::setSourceIdentity",
"access_level" : "write",
"permission_only" : true,
"description" : {
"en_US" : "Grants permission to set a source identity on a STS session.",
"zh_CN" : "..."
},
"resources" : [ {
"urn_template" : "iam::<account-id>:agency:<agency-name-with-path>",
"required" : true
} ],
"condition_keys" : [ "sts:SourceIdentity" ]
}, {
"name" : "sts::tagSession",
"access_level" : "tagging",
"permission_only" : true,
"description" : {
"en_US" : "Grants permission to add tags to a STS session.",
"zh_CN" : "..."
},
"resources" : [ {
"urn_template" : "iam::<account-id>:agency:<agency-name-with-path>",
"required" : true
} ],
"condition_keys" : [ "sts:TransitiveTagKeys" ]
} ],
"resources" : [ {
"type_name" : "assumed-agency",
"urn_template" : "sts::<account-id>:assumed-agency:<agency-name>/<session-name>"
} ],
"conditions" : [ {
"key" : "sts:ExternalId",
"value_type" : "string",
"multi_valued" : false,
"description" : {
"en_US" : "Filters access by the external ID that is passed in the request.",
"zh_CN" : "..."
}
}, {
"key" : "sts:SourceIdentity",
"value_type" : "string",
"multi_valued" : false,
"description" : {
"en_US" : "Filters access by the source identity that is passed in the request.",
"zh_CN" : "..."
}
}, {
"key" : "sts:TransitiveTagKeys",
"value_type" : "string",
"multi_valued" : true,
"description" : {
"en_US" : "Filters access by the transitive tag keys that are passed in the request.",
"zh_CN" : "..."
}
}, {
"key" : "sts:AgencySessionName",
"value_type" : "string",
"multi_valued" : false,
"description" : {
"en_US" : "Filters access by the agency session name required when you assume an agency.",
"zh_CN" : "..."
}
} ],
"operations" : [ {
"operation_id" : "AssumeAgency",
"operation_action" : "sts:agencies:assume",
"dependent_actions" : [ "sts::tagSession", "sts::setSourceIdentity" ]
}, {
"operation_id" : "GetCallerIdentity",
"operation_action" : "sts::getCallerIdentity"
}, {
"operation_id" : "DecodeAuthorizationMessage",
"operation_action" : "sts::decodeAuthorizationMessage"
} ]
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
请求成功。 |
|
404 |
未找到相应的资源。 |
错误码
请参见错误码。