SSO / Client / list_account_roles

list_account_roles#

SSO.Client.list_account_roles(**kwargs)#

Lists all roles that are assigned to the user for a given AWS account.

See also: AWS API Documentation

Request Syntax

response = client.list_account_roles(
    nextToken='string',
    maxResults=123,
    accessToken='string',
    accountId='string'
)
Parameters:
  • nextToken (string) – The page token from the previous response output when you request subsequent pages.

  • maxResults (integer) – The number of items that clients can request per page.

  • accessToken (string) –

    [REQUIRED]

    The token issued by the CreateToken API call. For more information, see CreateToken in the IAM Identity Center OIDC API Reference Guide.

  • accountId (string) –

    [REQUIRED]

    The identifier for the AWS account that is assigned to the user.

Return type:

dict

Returns:

Response Syntax

{
    'nextToken': 'string',
    'roleList': [
        {
            'roleName': 'string',
            'accountId': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • nextToken (string) –

      The page token client that is used to retrieve the list of accounts.

    • roleList (list) –

      A paginated response with the list of roles and the next token if more results are available.

      • (dict) –

        Provides information about the role that is assigned to the user.

        • roleName (string) –

          The friendly name of the role that is assigned to the user.

        • accountId (string) –

          The identifier of the AWS account assigned to the user.

Exceptions