全部文档
当前文档

暂无内容

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

文档中心

查询策略版本内容

请求参数

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

待查询的策略的唯一标识
格式:krn:ksc:iam::account-id:policy/policy-name

VersionId String

待查询的策略版本Id

返回参数

参数名称
类型
描述
GetPolicyVersionResult Object
PolicyVersion Object
IsDefaultVersion String
示例值:true
VersionId String
示例值:v1
Document String
示例值:{ "Version": "2015-11-01", "Statement": [ { "Effect": "Allow", "Action": [ "iam:TestResourceAttributeAuth" ], "Resource": [ "*" ] } ] }
PolicyStruct String[]
CreateDate String
示例值:2021-11-29T06:20:54Z
RequestId String
示例值:48ed74d7-2e9b-434c-9708-cee710f49ffc

请求示例

curl -X GET|POST
'http://iam.api.ksyun.com/?Action=GetPolicyVersion&Version=2015-11-01'
-H 'authorization: xxx, SignedHeaders=content-type;host;x-amz-date, Signature=xxx'
-H 'cache-control: no-cache'
-H 'content-type: application/x-www-form-urlencoded'
-H 'host: iam.api.ksyun.com'
-H 'x-amz-date: 20170720T022802Z'
-d 'PolicyKrn=xxx&VersionId=xxx'

返回示例

JSON格式

{
"GetPolicyVersionResult":{
"PolicyVersion":{
"IsDefaultVersion":"true",
"VersionId":"v1",
"Document":"{ "Version": "2015-11-01", "Statement": [ { "Effect": "Allow", "Action": [ "iam:TestResourceAttributeAuth" ], "Resource": [ "*" ] } ] }",
"PolicyStruct":[
],
"CreateDate":"2021-11-29T06:20:54Z"
}
},
"RequestId":"48ed74d7-2e9b-434c-9708-cee710f49ffc"
}

错误码

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

错误码
错误信息
Http状态码
描述
InvalidParameterValueAn value must be supplied for the input parameter %s.400输入参数%s的值不能为空,具体参数名在%s说明
InvalidParameterValueAn invalid or out-of-range value was supplied for the input parameter %s.400输入参数 %s的值无效、不合法或者超出范围,具体参数名在%s说明
PolicyNoSuchEntityThe request was rejected because it referenced ‘Policy’ that does not exist.404请求被拒绝,因其引用的“策略”不存在
纯净模式常规模式

纯净模式

点击可全屏预览文档内容
文档反馈