list_roles
async
¶
list_roles(
tenant_id: TenantId,
*,
config_overrides: Optional[AsyncAccountAccessRuntimeClientConfig] = None,
max_results: Optional[int] = None,
next_token: Optional[Token] = None,
) -> ListRolesResponse
Returns the roles that you are entitled to access within a tenant. The results are paginated. Use a returned role with GetRoleCredentials to obtain temporary credentials.
Parameters:
-
tenant_id(TenantId) –The identifier of the tenant whose roles you want to list. A tenant ID begins with
aa-and is 3 to 24 characters long. It can contain lowercase letters, numbers, and hyphens. -
max_results(Optional[int], default:None) –The maximum number of roles to return in a single response. If more roles are available than the specified value, the response includes a
nextTokenvalue that you can use to retrieve the next page of results. If you don't specify a value, the service uses a default page size. -
next_token(Optional[Token], default:None) –The pagination token from a previous
ListRolesresponse. Use it to retrieve the next page of results. Omit this parameter on the first call.
Raises:
-
InternalServerException–An internal server error occurred. Retry the request. If the problem persists, contact Amazon Web Services Support. This error returns an HTTP 500 status code.
-
ThrottlingException–The request rate exceeded the allowed limit. Reduce your request rate, and then retry the request. This error returns an HTTP 429 status code.
-
UnauthorizedException–The bearer token is missing, invalid, or expired. Obtain a new token, and then retry the request. This error returns an HTTP 401 status code.
-
ValidationException–The request is missing a required parameter, or a parameter value doesn't satisfy its constraints, such as its length or pattern. Correct the input, and then retry the request. This error returns an HTTP 400 status code.
-
UnknownServiceError–The service returned an error code this client does not model.