获取自定义策略版本列表

Note

仅对用户自定义策略有效

所属服务

sam

接口方法

GET

请求url

/sam?Action=ListPolicyVersions&Version=2018-03-22&PolicyName=

url 参数

参数名称说明参数类型是否必填备注
ActionListPolicyVersionsstring
Version2018-03-22string
PolicyName策略名称(1-32位小写字母、数字、中划线组成,以字母开头,字母或数字结尾)string

返回参数

无返回参数

状态码

无状态码

请求示例

https://open.cn-east-1.163yun.com/sam?Action=ListPolicyVersions&Version=2018-03-22&PolicyName=Policytest2

返回示例

{
	"Message": "调用成功",
	"RequestId": "16cede6b-c8f3-438a-a73c-c58cd4991c2b",
	"PolicyVersions": [{
		"VersionId": 1.0,
		"IsCurrentVersion": false,
		"PolicyDocument": "{\"version\": 1, \"statement\": [{\"action\": [\"comb:nvm:*\"], \"effect\": \"allow\", \"resource\": [\"comb:nvm:*:*:*\"]}]}",
		"CreateTime": "2020-01-20T02:24:27Z"
	}, {
		"VersionId": 2.0,
		"IsCurrentVersion": false,
		"PolicyDocument": "{\"version\": 1, \"statement\": [{\"action\": [\"comb:nvm:*\"], \"effect\": \"allow\", \"resource\": [\"comb:nvm:*:*:*\"]}]}",
		"CreateTime": "2020-01-20T02:26:03Z"
	}, {
		"VersionId": 3.0,
		"IsCurrentVersion": true,
		"PolicyDocument": "{\"version\": 1, \"statement\": [{\"action\": [\"comb:nvm:*\"], \"effect\": \"allow\", \"resource\": [\"comb:nvm:*:*:*\"]}]}",
		"CreateTime": "2020-01-20T02:26:24Z"
	}],
	"Code": "Success"
}