Lists the roles that have the specified path prefix. If there are none, the action returns an empty list. For more information about roles, go to Working with Roles.
You can paginate the results using the MaxItems
and Marker
parameters.
The returned policy is URL-encoded according to RFC 3986. For more information about RFC 3986, go to http://www.faqs.org/rfcs/rfc3986.html.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
Test the preparation of instance profiles and roles.
// Instantiate the client $iam = new AmazonIAM(); // List instance profiles $response = $iam->list_instance_profiles(); var_dump($response->isOK()); // List roles $response = $iam->list_roles(); var_dump($response->isOK()); // List instance profiles for role $response = $iam->list_instance_profiles_for_role('example-role'); var_dump($response->isOK()); // List role policies $response = $iam->list_role_policies('example-role'); var_dump($response->isOK());Result:
bool(true) bool(true) bool(true) bool(true)
Source
Method defined in services/iam.class.php | Toggle source view (6 lines) | View on GitHub