# 查询指定服务授权概要 - GetAuthorizationSchemaV5
#### 功能介绍
该接口可以用于查询指定云服务的授权概要。
#### 调试
您可以在[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/IAM/doc?api=GetAuthorizationSchemaV5&version=v5)中调试该接口，支持自动认证鉴权。API Explorer可以自动生成SDK代码示例，并提供SDK代码示例调试功能。
#### 授权信息
当前API调用无需身份策略权限。
#### URI
GET /v5/authorization-schemas/services/{service_code}
表1路径参数 
| 参数           | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                        |
|:---|:---|:---|:---|
| service_code | 是    | String | **参数解释**： 服务名称缩写。 **约束限制**： 不涉及 **取值范围**： 长度为1到56个字符，只包含字母、数字和"-"的字符串。 **默认取值**： 不涉及。 |
   
#### 请求参数
无
#### 响应参数
**状态码：200**
表2响应Body参数 
| 参数         | 参数类型                                                                          | 描述                                                                                                                                                                        |
|:---|:---|:---|
| version    | String                                                                        | **参数解释**： 服务授权概要的版本号。 **取值范围**： 不涉及。  |
| actions    | Array of [actions] objects       | **参数解释**： 云服务支持的授权项列表。 **取值范围**： 不涉及。 |
| resources  | Array of [Resource] objects     | **参数解释**： 云服务支持的资源列表。 **取值范围**： 不涉及。  |
| conditions | Array of [conditions] objects | **参数解释**： 云服务支持的条件键列表。 **取值范围**： 不涉及。 |
| operations | Array of [operations] objects | **参数解释**： 云服务支持的操作列表。 **取值范围**： 不涉及。  |
   
 表3actions 
| 参数              | 参数类型                                                                        | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|:---|:---|:---|
| name            | String                                                                      | **参数解释**： 授权项名称。 **取值范围**： 长度范围为\[1,128\]。 三段式格式，例如"iam:policies:createV5"。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| access_level    | String                                                                      | **参数解释**： 在策略中使用此授权项时授予的访问级别。 **取值范围**： 取值范围为\[list,read,write,permission_management,tagging\]。 - list：列表权限   - read：读取权限   - write：写入权限   - permission_management：权限管理权限   - tagging：标签管理权限    |
| permission_only | Boolean                                                                     | **参数解释**： 该授权项是否仅作为权限点，不对应任何操作。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| description     | [description] object       | **参数解释**： 描述信息。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| aliases         | Array of strings                                                            | **参数解释**： 授权项别名列表，用以兼容授权项改名或者拆分新授权项的场景。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| resources       | Array of [resources] objects | **参数解释**： 与该授权项关联的资源列表，用于定义授权项的资源级权限。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| condition_keys  | Array of strings                                                            | **参数解释**： 该授权项支持的，且与资源无关的服务自定义条件属性以及部分全局属性。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
   
 表4description 
| 参数    | 参数类型   | 描述                                                                                                                                                                             |
|:---|:---|:---|
| en_US | String | **参数解释**： 英文描述。 **取值范围**： 长度范围为\[0,1500\]。 |
| zh_CN | String | **参数解释**： 中文描述。 **取值范围**： 长度范围为\[0,1500\]。 |
   
 表5resources 
| 参数             | 参数类型             | 描述                                                                                                                                                                                                                                                                                                                           |
|:---|:---|:---|
| urn_template   | String           | **参数解释**： 统一资源名称模板，表示可以通过这类资源的统一资源名称对该授权项进行资源粒度的授权。 **取值范围**： 长度范围为\[1,1500\]。                                                                                                           |
| required       | Boolean          | **参数解释**： 标识该资源类型是否是这个授权项必选的，即授权项一定涉及对这类资源的操作；例如subnet是vpc:subnets:get的必选资源类型；而ou是organizations::tagResource的可选资源类型，因为organizations::tagResource操作的资源还可能是account或者policy。 **取值范围**： 不涉及。 |
| condition_keys | Array of strings | **参数解释**： 针对该授权项和资源的服务自定义条件属性以及部分全局属性，只有授权项和资源同时匹配时才会生效。 **取值范围**： 不涉及。                                                                                                                  |
   
 表6Resource 
| 参数           | 参数类型   | 描述                                                                                                                                                                                                                 |
|:---|:---|:---|
| type_name    | String | **参数解释**： 云服务资源类型名称。 **取值范围**： 长度范围为\[1,32\]。                                  |
| urn_template | String | **参数解释**： 统一资源名称模板，表示可以通过这类资源的统一资源名称对该授权项进行资源粒度的授权。 **取值范围**： 长度范围为\[1,1500\]。 |
   
 表7conditions 
| 参数           | 参数类型                                                                    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|:---|:---|:---|
| key          | String                                                                  | **参数解释**： 条件键的名称。 **取值范围**： 长度范围为\[1,128\]。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| value_type   | String                                                                  | **参数解释**： 条件值的数据类型。 **取值范围**： 取值范围为\[string,numeric,date,boolean,ip_address\]。 - string：字符串类型   - numeric：数值类型   - date：日期类型   - boolean：布尔类型   - ip_address：IP地址类型    |
| multi_valued | Boolean                                                                 | **参数解释**： 条件值是否为多值。 **取值范围**： 取值范围为\[true,false\]。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| description  | [description] object | **参数解释**： 描述信息。 **取值范围**： 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
   
 表8description 
| 参数    | 参数类型   | 描述                                                                                                                                                                             |
|:---|:---|:---|
| en_US | String | **参数解释**： 英文描述。 **取值范围**： 长度范围为\[0,1500\]。 |
| zh_CN | String | **参数解释**： 中文描述。 **取值范围**： 长度范围为\[0,1500\]。 |
   
 表9operations 
| 参数                | 参数类型             | 描述                                                                                                                                                                                                              |
|:---|:---|:---|
| operation_id      | String           | **参数解释**： OpenAPI的操作标识符。 **取值范围**： 长度范围为\[1,64\]。                           |
| operation_action  | String           | **参数解释**： 授权项名称。 **取值范围**： 长度范围为\[1,128\]。 三段式格式，例如"iam:policies:createV5"。 |
| dependent_actions | Array of strings | **参数解释**： 该操作可能需要的其他授权项授权。 **取值范围**： 不涉及。                                   |
   
**状态码：404**
表10响应Body参数 
| 参数         | 参数类型   | 描述                                                                                                                                                                                                                                                        |
|:---|:---|:---|
| error_code | String | **参数解释**： 错误码，请参见[错误码](https://support.huaweicloud.com/api-iam5/ErrorCode.html)。 **取值范围**： 格式为PAP5.XXXX，例如 PAP5.0012。 |
| error_msg  | String | **参数解释**： 错误信息，请参见[错误信息](https://support.huaweicloud.com/api-iam5/ErrorCode.html)。 **取值范围**： 不涉及。                     |
| request_id | String | **参数解释**： API 请求的唯一标识，用于排查接口调用异常。 **取值范围**： 不涉及。                                                                      |
   
#### 请求示例
查询指定云服务的授权概要。
```
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 | 未找到相应的资源。 |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-iam5/ErrorCode.html)。
