Set Default Policy Version
POST /iam?Action=SetDefaultPolicyVersion
Sets the specified version of the specified Managed Policy as the policy's default version.
Query Parameters
PolicyArn | ARN of the IAM Managed policy to set default version. |
VersionId | Policy Version to be set as default. |
Required Roles
This call has no restrictions.
Request Payload
No Request Payload
Response Body
Field |
Description |
Type |
Notes |
SetDefaultPolicyVersionResponse |
|
|
|
ResponseMetadata |
|
|
|
RequestId |
|
String |
|
Examples
Request
POST https://192.168.0.0:4443/iam?PolicyArn=urn:ecs:iam::ns:policy/FinanceTeamPolicy&Action=SetDefaultPolicyVersion&VersionId=v3
Accept: application/xml
X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
x-emc-namespace: <namespace>
Response
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:SetDefaultPolicyVersionResponse xmlns:ns2="none">
<ResponseMetadata>
<RequestId>0af9f5b8:17178fe9282:1086d:0</RequestId>
</ResponseMetadata>
</ns2:SetDefaultPolicyVersionResponse>
Request
POST https://192.168.0.0:4443/iam?PolicyArn=urn:ecs:iam::ns:policy/FinanceTeamPolicy&Action=SetDefaultPolicyVersion&VersionId=v3
Accept: application/json
X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
x-emc-namespace: <namespace>
Response
HTTP/1.1 200 OK
{
"ResponseMetadata": {
"RequestId": "0af9f5b8:17178fe9282:10831:0"
}
}
Request
curl -H $token -H "Content-Type: application/xml" -H "x-emc-namespace: <namespace>" -X POST https://$nodeIp:4443/iam?PolicyArn=urn
Response
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:SetDefaultPolicyVersionResponse xmlns:ns2="none">
<ResponseMetadata>
<RequestId>0af9f5b8:17178fe9282:1086d:0</RequestId>
</ResponseMetadata>
</ns2:SetDefaultPolicyVersionResponse>