Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PolicyDocument in ram.GetPolicyResponse is empty #498

Open
LicaSterian opened this issue Jun 16, 2021 · 0 comments
Open

PolicyDocument in ram.GetPolicyResponse is empty #498

LicaSterian opened this issue Jun 16, 2021 · 0 comments

Comments

@LicaSterian
Copy link

I made a ram.GetPolicy request but the PolicyDocument field of the response returned empty.

PolicyName:AdministratorAccess
PolicyType:System
Description:管理所有阿里云资源的权限
DefaultVersion:v1
PolicyDocument: 
CreateDate:2015-04-28T16:15:44Z
UpdateDate:2017-04-27T16:48:07Z
AttachmentCount:1

After calling GetHttpContentString on the GetPolicyResponse instance i noticed that the PolicyDocument is present:

{ "Policy":{ "UpdateDate":"2017-04-27T16:48:07Z", "PolicyType":"System", "Description":"管理所有阿里云资源的权限", "AttachmentCount":1, "DefaultVersion":"v1", "PolicyName":"AdministratorAccess", "CreateDate":"2015-04-28T16:15:44Z" }, "RequestId":"9C41103A-150E-4062-A22E-F8E6F9AE9FB5", "DefaultPolicyVersion":{ "VersionId":"v1", "IsDefaultVersion":true, "PolicyDocument":"\n{\n \"Statement\": [\n {\n \"Action\": \"*\",\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ],\n \"Version\": \"1\"\n}\n ", "CreateDate":"2015-04-28T16:15:44Z" } }

It's under the DefaultPolicyVersion key (DefaultPolicyVersion.PolicyDocument).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant