Get Context Keys For Custom Policy
POST /iam?Action=GetContextKeysForCustomPolicy
Gets a list of all of the context keys in the specified input policies.
Query Parameters
PolicyInputList | A list of policies for which you want the list of context keys referenced in those policies. |
Required Roles
This call has no restrictions.
Request Payload
No Request Payload
Response Body
No Response Body
Examples
Request
NOTE: Policy must be encoded
https://192.168.0.0::4443/iam?Action=GetContextKeysForCustomPolicy
&PolicyInputList.member.1='{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": "s3:*",
"Resource": "*",
"Condition":{"StringEquals":{"s3:x-amz-acl":"public-read"}}
}
}'
Accept: appliction/json
X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
x-emc-namespace: <namespace>
Response
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8" ?>
<GetContextKeysForCustomPolicyResponse>
<ResponseMetadata>
<RequestId>0af9f5b8:17178fe9282:c9e6:68</RequestId>
</ResponseMetadata>
<GetContextKeysForCustomPolicyResult>
<ContextKeyNames>
<member>s3:x-amz-acl</member>
</ContextKeyNames>
</GetContextKeysForCustomPolicyResult>
</GetContextKeysForCustomPolicyResponse>
Request
NOTE: Policy must be encoded
https://192.168.0.0::4443/iam?Action=GetContextKeysForCustomPolicy
&PolicyInputList.member.1='{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": "s3:*",
"Resource": "*",
"Condition":{"StringEquals":{"s3:x-amz-acl":"public-read"}}
}
}'
Accept: appliction/json
X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
x-emc-namespace: <namespace>
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"ResponseMetadata": {
"RequestId": "0af9f5b8:17178fe9282:cbe5:66"
},
"GetContextKeysForCustomPolicyResult": {
"ContextKeyNames": ["s3:x-amz-acl"]
}
}
Request
curl -H $token -H "Content-Type: application/json" -H "x-emc-namespace: <namespace>" -X POST https://$nodeIp:4443/iam?Action=GetContextKeysForCustomPolicy&PolicyInputList.member.1='{"Version": "2012-10-17","Statement": {"Effect": "Allow","Action": "s3:*","Resource": "*","Condition":{"StringEquals":{"s3:x-amz-acl":"public-read"}}}}'
Response
HTTP/1.1 200 OK
Content-Type: application/json
<?xml version="1.0" encoding="UTF-8" ?>
<GetContextKeysForCustomPolicyResponse>
<ResponseMetadata>
<RequestId>0af9f5b8:17178fe9282:c9e6:68</RequestId>
</ResponseMetadata>
<GetContextKeysForCustomPolicyResult>
<ContextKeyNames>
<member>s3:x-amz-acl</member>
</ContextKeyNames>
</GetContextKeysForCustomPolicyResult>
</GetContextKeysForCustomPolicyResponse>