Listing the Versions of a Managed Policy
You can list all the existing versions of a managed policy and find out which is the default one that is applied to the EIM identities (users or groups) the policy is attached to.
Listing the Versions of a Managed Policy Using OSC CLI
See the ListPolicyVersions command sample in the documentation of the EIM API. |
Listing the Versions of a Managed Policy Using AWS CLI
To list the versions of a managed policy, use the list-policy-versions command following this syntax:
$ aws iam list-policy-versions \
--profile YOUR_PROFILE \
--policy-arn arn:aws:iam::123456789012:policy/my-policy \
--endpoint https://eim.eu-west-2.outscale.com
This command contains the following attributes that you need to specify:
-
(optional)
profile
: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI. -
policy-arn
: The OUTSCALE Resource Name (ORN) of the policy. -
endpoint
: The endpoint corresponding to the Region you want to send the request to.
The list-policy-versions command returns the following elements:
-
Versions
: Information about one or more policy versions. This element contains the following information:-
CreateDate
: The date and time of creation of the policy version. -
VersionId
: The ID of the policy version. -
IsDefaultVersion
: Iftrue
, the policy version is the default one.
-
{
"Versions": [
{
"CreateDate": "2016-06-24T09:12:44Z",
"VersionId": "v2",
"IsDefaultVersion": true
},
{
"CreateDate": "2016-05-12T18:43:524Z",,
"VersionId": "v1",
"IsDefaultVersion": false
}
]
}
Related Pages
Corresponding API Method
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.