Listing Managed Policies
You can get the list of all the managed policies available for your account, or of managed policies attached to a user or a group.
Listing Managed Policies Using Cockpit v2
Listing Managed Policies Attached to a User
-
In the EIM Users dashboard, click the ID of the user you want to list the policies attached to.
The EIM user details panel appears. -
Click on the Attached Policies tab.
-
The list of managed policies attached to the user appears.
Listing Managed Policies Attached to a Group
-
In the EIM Groups dashboard, click the ID of the group for which you want to list the managed policies attached to.
The EIM group details panel appears. -
Click on the Attached Managed Policies tab.
-
The list of managed policies attached to the group appears.
Listing Managed Policies Using OSC CLI
See the ListPolicies command sample in the documentation of the EIM API. |
Listing Managed Policies Using AWS CLI
Listing Your Managed Policies
To list the managed policies available for your account, use the list-policies command following this syntax:
$ aws iam list-policies \
--profile YOUR_PROFILE \
--scope all \
--only-attached \
--path-prefix / \
--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. -
(optional)
scope
: The scope to filter the result (all
|local
).As no 3DS OUTSCALE-managed policies are provided, this action only returns policies you created independently from the scope you choose.
-
(optional)
only-attached | not-only-attached
: Ifonly-attached
is set, only managed policies that are attached to an EIM identity are listed. -
(optional)
path-prefix
: The path prefix of the policies you want to describe (by default, set to a slash /). -
endpoint
: The endpoint corresponding to the Region you want to send the request to.
The list-policies command returns the following elements:
-
Policies
: Information about one or more policies. This element contains the following information:-
PolicyName
: The name of the policy. -
CreateDate
: The date and time of creation of the policy. -
AttachmentCount
: The number of EIM identities (users or groups) the policy is attached to. -
IsAttachable
: Iftrue
, the policy can be attached to an EIM identity. Iffalse
, it cannot. -
PolicyId
: The ID of the policy. -
DefaultVersionId
: The ID of the policy version set as the default one. -
Path
: The path for the policy. -
Arn
: The OUTSCALE Resource Name (ORN) of the policy. -
UpdateDate
: The date and time of the last update of the policy.
-
{
"Policies": [
{
"PolicyName": "AdminAccess",
"CreateDate": "2016-05-12T18:43:524Z",
"AttachmentCount": 5,
"IsAttachable": true,
"PolicyId": "ABCDEFGHIJKLMNO12PQRS",
"DefaultVersionId": "v1",
"Path": "/",
"Arn": "arn:aws:iam::aws:policy/AdminAccess",
"UpdateDate": "2016-05-12T18:43:524Z"
},
]
}
Listing the Managed Policies Attached to a User
To list the managed policies attached to a user, use the list-attached-user-policies command following this syntax:
$ aws iam list-attached-user-policies \
--profile YOUR_PROFILE \
--user-name Jane \
--path-prefix / \
--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. -
user-name
: The name of the user. -
(optional)
path-prefix
: The path prefix of the policies you want to list (by default, set to a slash /). -
endpoint
: The endpoint corresponding to the Region you want to send the request to.
The list-attached-user-policies command returns the following elements:
-
AttachedPolicies
: Information about one or more policies attached to the specified user. This element contains the following information:-
PolicyName
: The name of the policy. -
PolicyArn
: The OUTSCALE Resource Name (ORN) of the policy.
-
{
"AttachedPolicies": [
{
"PolicyName": "AdminAccess",
"PolicyArn": "arn:aws:iam::aws:policy/AdminAccess"
},
{
"PolicyName": "DevAccess",
"PolicyArn": "arn:aws:iam::aws:policy/DevAccess"
}
],
}
Listing the Managed Policies Attached to a Group
To list the policies attached to a group, use the list-attached-group-policies command following this syntax:
$ aws iam list-attached-group-policies \
--profile YOUR_PROFILE \
--group-name Dev \
--path-prefix / \
--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. -
group-name
: The name of the user. -
(optional)
path-prefix
: The path prefix of the policies you want to list (by default, set to a slash /). -
endpoint
: The endpoint corresponding to the Region you want to send the request to.
The list-attached-user-policies command returns the following elements:
-
AttachedPolicies
: Information about one or more policies attached to the specified group. This element contains the following information:-
PolicyName
: The name of the policy. -
PolicyArn
: The OUTSCALE Resource Name (ORN) of the policy.
-
{
"AttachedPolicies": [
{
"PolicyName": "DevAccess",
"PolicyArn": "arn:aws:iam::aws:policy/DevAccess"
}
]
}
Related Pages
Corresponding API Methods
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.