全部文档
当前文档

暂无内容

如果没有找到您期望的内容,请尝试其他搜索词

文档中心

获取有效的策略信息

请求参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见公共请求参数
参数名称
类型
必填
描述
Action String
公共参数,本接口取值:GetEffectivePolicies。
Version String
公共参数,本接口取值:2015-11-01。
PolicyName String

策略名称

Page Int

页码

示例值:1
默认值:1
MaxItems Int

每页返回条数,最高500条

示例值:10
默认值:10

返回参数

参数名称
类型
描述
ListPoliciesResult Object
Policies Object[]
CreateDate String
示例值:2021-11-09T12:20:32Z
DefaultVersionId String
示例值:v1
Description String
示例值:只读国际云快照权限
Krn String
示例值:krn:ksc:iam::ksc:policy/KCASSReadOnlyAccess
Path String
示例值:/
PolicyId String
示例值:lkFuLJujSQOBdXFu9lj_Jw
PolicyName String
示例值:KCASSReadOnlyAccess
ServiceId Int
示例值:203
ServiceName String
示例值:kcass
ServiceViewName String
示例值:国际云快照
PolicyType Int
示例值:1
CreateMode Int
示例值:1
UpdateDate String
示例值:2021-11-09T12:20:32Z
AttachmentCount Int
示例值:0
PolicyDocument String

策略文档

示例值:{\"Version\":\"2015-11-01\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"iam:CreateUser\",\"iam:ListUsers\",\"iam:DetachUserPolicy\",\"iam:ListAttachedUserPolicies\"],\"Resource\":[\"*\"]},{\"Effect\":\"Allow\",\"Action\":[\"iam:CreateUser\",\"iam:DeleteVirtualMFADevice\",\"iam:CheckUserSessionCode\",\"iam:testCheckUserSessionCode\",\"krds:DeleteDBBinlogs\",\"krds:DescribeDBBackups\"],\"Resource\":[\"*\"]},{\"Effect\":\"Allow\",\"Action\":[\"iam:CreateUser\"],\"Resource\":[\"*\"]},{\"Effect\":\"Allow\",\"Action\":[\"iam:GetUser\"],\"Resource\":[\"*\"]},{\"Effect\":\"Allow\",\"Action\":[\"iam:GetUser\"],\"Resource\":[\"*\"]}]}
RequestId String
示例值:b40a1bd4-ed33-4fec-8e7c-4b4230c03adf

请求示例

curl -X GET
'http://iam.api.ksyun.com/?Action=GetEffectivePolicies&Version=2015-11-01&PolicyName=xxx&Page=1&MaxItems=10'
-H 'authorization: xxx, SignedHeaders=content-type;host;x-amz-date, Signature=xxx'
-H 'cache-control: no-cache'
-H 'content-type: application/json'
-H 'host: iam.api.ksyun.com'
-H 'x-amz-date: 20170720T022802Z'

返回示例

JSON格式

{
"ListPoliciesResult":{
"Policies":[
{
"CreateDate":"2016-03-01T13:01:27Z",
"DefaultVersionId":"v1",
"Description":"提供系统管理员的管理权限(最大权限)",
"Krn":"krn:ksc:iam::ksc:policy/AdministratorAccess",
"Path":"/",
"PolicyId":"PLwWFhbYRGOn_h5kQtnWLQ",
"PolicyName":"AdministratorAccess",
"ServiceId":0,
"ServiceName":null,
"ServiceViewName":null,
"PolicyType":1,
"CreateMode":1,
"UpdateDate":"2016-05-28T08:44:37Z",
"AttachmentCount":4,
"PolicyDocument":"{"Version":"2015-11-01","Statement":[{"Effect":"Allow","Action":["iam:CreateUser","iam:ListUsers","iam:DetachUserPolicy","iam:ListAttachedUserPolicies"],"Resource":["*"]},{"Effect":"Allow","Action":["iam:CreateUser","iam:DeleteVirtualMFADevice","iam:CheckUserSessionCode","iam:testCheckUserSessionCode","krds:DeleteDBBinlogs","krds:DescribeDBBackups"],"Resource":["*"]},{"Effect":"Allow","Action":["iam:CreateUser"],"Resource":["*"]},{"Effect":"Allow","Action":["iam:GetUser"],"Resource":["*"]},{"Effect":"Allow","Action":["iam:GetUser"],"Resource":["*"]}]}"
},
{
"CreateDate":"2025-03-07T03:13:47Z",
"DefaultVersionId":"v2",
"Description":"",
"Krn":"krn:ksc:iam::2000155392:policy/AdministratorAccess",
"Path":"/",
"PolicyId":"TZSz9eINSrSnB8EFnX9x4Q",
"PolicyName":"AdministratorAccess",
"ServiceId":0,
"ServiceName":null,
"ServiceViewName":null,
"PolicyType":2,
"CreateMode":1,
"UpdateDate":"2025-03-07T03:14:07Z",
"AttachmentCount":1,
"PolicyDocument":"{"Version":"2015-11-01","Statement":[{"Effect":"Allow","Action":["iam:CreateUser","iam:ListUsers","iam:DetachUserPolicy","iam:ListAttachedUserPolicies"],"Resource":["*"]},{"Effect":"Allow","Action":["iam:CreateUser","iam:DeleteVirtualMFADevice","iam:CheckUserSessionCode","iam:testCheckUserSessionCode","krds:DeleteDBBinlogs","krds:DescribeDBBackups"],"Resource":["*"]},{"Effect":"Allow","Action":["iam:CreateUser"],"Resource":["*"]},{"Effect":"Allow","Action":["iam:GetUser"],"Resource":["*"]},{"Effect":"Allow","Action":["iam:GetUser"],"Resource":["*"]}]}"
}
],
"Total":2
},
"RequestId":"4f441e06-e973-4db4-bf4a-57316bdba2af"
}

错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见公共错误码

纯净模式常规模式

纯净模式

点击可全屏预览文档内容