查询指定服务授权概要 -j9九游会登录
功能介绍
该接口可以用于查询指定云服务的授权概要。
调试
您可以在中调试该接口,支持自动认证鉴权。api explorer可以自动生成sdk代码示例,并提供sdk代码示例调试功能。
授权信息
当前api调用无需身份策略权限。
uri
get /v5/authorization-schemas/services/{service_code}
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
service_code |
是 |
string |
服务名称缩写,长度为1到56个字符,只包含字母、数字和"-"的字符串。 |
请求参数
无
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
version |
string |
服务授权概要的版本号。 |
|
actions |
array of action objects |
云j9九游会登录的服务支持的授权项列表。 |
|
resources |
array of resource objects |
云j9九游会登录的服务支持的资源列表。 |
|
conditions |
array of condition objects |
云j9九游会登录的服务支持的条件键列表。 |
|
operations |
array of operation objects |
云j9九游会登录的服务支持的操作列表。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
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 |
描述信息。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
en_us |
string |
英文描述。 最小长度:1 最大长度:1500 |
|
zh_cn |
string |
中文描述。 最小长度:1 最大长度:1500 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
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:::agency:",
"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:::agency:",
"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:::agency:",
"required" : true
} ],
"condition_keys" : [ "sts:transitivetagkeys" ]
} ],
"resources" : [ {
"type_name" : "assumed-agency",
"urn_template" : "sts:::assumed-agency:/"
} ],
"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 |
未找到相应的资源。 |
错误码
请参见错误码。
相关文档
意见反馈
文档内容是否对您有帮助?
如您有其它疑问,您也可以通过华为云社区问答频道来与我们联系探讨