Lists the instance profiles that have the specified associated role. If there are none, the action returns an empty list. For more information about instance profiles, go to About Instance Profiles.
You can paginate the results using the MaxItems
and Marker
parameters.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The name of the role to list instance profiles for. [Constraints: The value must be between 1 and 64 characters, and must match the following regular expression pattern: |
|
|
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 (7 lines) | View on GitHub