listRoles

inline suspend fun IamClient.listRoles(crossinline block: ListRolesRequest.Builder.() -> Unit): ListRolesResponse

Lists the IAM roles that have the specified path prefix. If there are none, the operation returns an empty list. For more information about roles, see IAM roles in the IAM User Guide.

IAM resource-listing operations return a subset of the available attributes for the resource. This operation does not return the following attributes, even though they are an attribute of the returned object:

  • PermissionsBoundary

  • RoleLastUsed

  • Tags To view all of the information for a role, see GetRole.

You can paginate the results using the MaxItems and Marker parameters.