Get Group Policy
POST /iam?Action=GetGroupPolicy
Retrieves the specified inline policy document of the specified IAM Group.
Query Parameters
GroupName | Name of the group to retrieve the inline policy. |
PolicyName | Name of the policy whose Policy Document needs to be retrieved. |
Required Roles
This call has no restrictions.
Request Payload
No Request Payload
Response Body
Field |
Description |
Type |
Notes |
GetGroupPolicyResponse |
|
|
|
GetGroupPolicyResult |
|
|
|
GroupName |
Friendly name of the group. |
String |
|
PolicyName |
Simple name identifying the policy. |
String |
|
PolicyDocument |
The policy Document. |
String |
|
ResponseMetadata |
|
|
|
RequestId |
|
String |
|
Examples
Request
POST https://192.168.0.0:4443/iam?GroupName=TestGroup&PolicyName=InlinePolicy&Action=GetGroupPolicy
Accept: application/xml
X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
x-emc-namespace: <namespace>
Response
HTTP/1.1 200 OK
<ns2:GetGroupPolicyResponse xmlns:ns2="none">
<ResponseMetadata>
<RequestId>0af9f5b8:17178fe9282:1f40d:b</RequestId>
</ResponseMetadata>
<GetGroupPolicyResult>
<PolicyDocument>{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"iam:ListAttachedGroupPolicies",
"iam:ListUsers",
"iam:ListPolicies",
"iam:ListUserPolicies"
],
"Resource": "*"
}
]
}</PolicyDocument>
<PolicyName>InlinePolicy</PolicyName>
<GroupName>TestGroup</GroupName>
</GetGroupPolicyResult>
</ns2:GetGroupPolicyResponse>
Request
POST https://192.168.0.0:4443/iam?GroupName=TestGroup&PolicyName=InlinePolicy&Action=GetGroupPolicy
Accept: application/json
X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
x-emc-namespace: <namespace>
Response
HTTP/1.1 200 OK
{
"ResponseMetadata": {
"RequestId": "0af9f5b8:17178fe9282:1f275:30"
},
"GetGroupPolicyResult": {
"PolicyName": "InlinePolicy",
"PolicyDocument": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"VisualEditor0\",\n \"Effect\": \"Allow\",\n \"Action\": [\n \"iam:ListAttachedGroupPolicies\",\n \"iam:ListUsers\",\n \"iam:ListPolicies\",\n \"iam:ListUserPolicies\"\n ],\n \"Resource\": \"*\"\n }\n ]\n}",
"GroupName": "TestGroup"
}
}
Request
curl -H $token -H "Content-Type: application/xml" -H "x-emc-namespace: <namespace>" -X POST https://$nodeIp:4443/iam?GroupName=TestGroup&PolicyName=InlinePolicy&Action=GetGroupPolicy
Response
HTTP/1.1 200 OK
<ns2:GetGroupPolicyResponse xmlns:ns2="none">
<ResponseMetadata>
<RequestId>0af9f5b8:17178fe9282:1f40d:b</RequestId>
</ResponseMetadata>
<GetGroupPolicyResult>
<PolicyDocument>{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"iam:ListAttachedGroupPolicies",
"iam:ListUsers",
"iam:ListPolicies",
"iam:ListUserPolicies"
],
"Resource": "*"
}
]
}</PolicyDocument>
<PolicyName>InlinePolicy</PolicyName>
<GroupName>TestGroup</GroupName>
</GetGroupPolicyResult>
</ns2:GetGroupPolicyResponse>