aws iam list-role-policies --role-name xxxx
list-role-policies — AWS CLI 1.27.104 Command Reference (amazon.com)
Lists the names of the inline policies that are embedded in the specified IAM role.
An IAM role can also have managed policies attached to it.
To list the managed policies that are attached to a role, use ListAttachedRolePolicies (aws iam list-attached-role-policies --role-name xxxx) .
For more information about policies, see Managed policies and inline policies in the IAM User Guide .
You can paginate the results using the MaxItems and Marker parameters.
If there are no inline policies embedded with the specified role, the operation returns an empty list.
See also: AWS API Documentation
list-role-policies is a paginated operation.
Multiple API calls may be issued in order to retrieve the entire data set of results. You can disable pagination by providing the --no-paginate argument.
When using --output text and the --query argument on a paginated response
The --query argument must extract data from the results of the following query expressions: PolicyNames
标签:iam,Description,--,AWS,list,role,policies From: https://www.cnblogs.com/5201351/p/17278547.html