调用GetControlPolicy查询管控策略的详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
resourcemanager:GetControlPolicy |
get |
*ControlPolicy
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| PolicyId |
string |
是 |
管控策略 ID。 |
cp-SImPt8GCEwiq**** |
| Language |
string |
否 |
指定返回结果中管控策略描述的语言。取值:
说明
该参数仅在系统管控策略时有效。 |
zh-CN |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回结果。 |
||
| ControlPolicy |
object |
管控策略详情。 |
|
| PolicyDocument |
string |
管控策略内容。 |
{\"Version\":\"1\",\"Statement\":[{\"Effect\":\"Deny\",\"Action\":[\"ram:UpdateRole\",\"ram:DeleteRole\",\"ram:AttachPolicyToRole\",\"ram:DetachPolicyFromRole\"],\"Resource\":\"acs:ram:*:*:role/ResourceDirectoryAccountAccessRole\"}]} |
| UpdateDate |
string |
管控策略更新时间。 |
2021-03-18T08:51:33Z |
| Description |
string |
管控策略描述。 |
ExampleControlPolicy |
| EffectScope |
string |
管控策略生效范围。取值:
|
RAM |
| AttachmentCount |
string |
管控策略被引用的次数。 |
0 |
| PolicyName |
string |
管控策略名称。 |
test |
| PolicyId |
string |
管控策略 ID。 |
cp-SImPt8GCEwiq**** |
| CreateDate |
string |
管控策略创建时间。 |
2021-03-18T08:51:33Z |
| PolicyType |
string |
管控策略类型。取值:
|
Custom |
| ControlPolicyType |
string |
RESOURCE_CONTROL_POLICY |
|
| RequestId |
string |
请求 ID。 |
AB769936-CDFA-4D52-8CE2-A3581800044A |
示例
正常返回示例
JSON格式
{
"ControlPolicy": {
"PolicyDocument": "{\\\"Version\\\":\\\"1\\\",\\\"Statement\\\":[{\\\"Effect\\\":\\\"Deny\\\",\\\"Action\\\":[\\\"ram:UpdateRole\\\",\\\"ram:DeleteRole\\\",\\\"ram:AttachPolicyToRole\\\",\\\"ram:DetachPolicyFromRole\\\"],\\\"Resource\\\":\\\"acs:ram:*:*:role/ResourceDirectoryAccountAccessRole\\\"}]}",
"UpdateDate": "2021-03-18T08:51:33Z",
"Description": "ExampleControlPolicy",
"EffectScope": "RAM",
"AttachmentCount": "0",
"PolicyName": "test",
"PolicyId": "cp-SImPt8GCEwiq****",
"CreateDate": "2021-03-18T08:51:33Z",
"PolicyType": "Custom",
"ControlPolicyType": "RESOURCE_CONTROL_POLICY"
},
"RequestId": "AB769936-CDFA-4D52-8CE2-A3581800044A"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 404 | EntityNotExists.ResourceControlPolicy | The specified resource control policy does not exist. | 资源管控策略不存在。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。