Lists all the managed policies that are available in your Amazon Web Services account, including
your own customer-defined managed policies and all Amazon Web Services managed policies.
You can filter the list of policies that is returned using the optional
OnlyAttached, Scope, and PathPrefix
parameters. For example, to list only the customer managed policies in your Amazon Web Services
account, set Scope to Local. To list only Amazon Web Services managed
policies, set Scope to AWS.
You can paginate the results using the MaxItems and Marker
parameters.
IAM resource-listing operations return a subset of the available
attributes for the resource. For example, this operation does not return tags, even though they are an attribute of the returned object. To view all of the information for a customer manged policy, see
GetPolicy.
Example
Use a bare-bones client and the command you need to make an API call.
Lists all the managed policies that are available in your Amazon Web Services account, including your own customer-defined managed policies and all Amazon Web Services managed policies.
You can filter the list of policies that is returned using the optional
OnlyAttached
,Scope
, andPathPrefix
parameters. For example, to list only the customer managed policies in your Amazon Web Services account, setScope
toLocal
. To list only Amazon Web Services managed policies, setScope
toAWS
.You can paginate the results using the
MaxItems
andMarker
parameters.For more information about managed policies, see Managed policies and inline policies in the IAM User Guide.
IAM resource-listing operations return a subset of the available attributes for the resource. For example, this operation does not return tags, even though they are an attribute of the returned object. To view all of the information for a customer manged policy, see GetPolicy.
Example
Use a bare-bones client and the command you need to make an API call.
Param
ListPoliciesCommandInput
Returns
ListPoliciesCommandOutput
See
input
shape.response
shape.config
shape.Throws
ServiceFailureException (server fault)
The request processing has failed because of an unknown error, exception or failure.
Throws
IAMServiceException
Base exception class for all service exceptions from IAM service.