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'
)
[REQUIRED]
The token issued by the CreateToken
API call. For more information, see CreateToken in the IAM Identity Center OIDC API Reference Guide .
[REQUIRED]
The identifier for the AWS account that is assigned to the user.
dict
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
SSO.Client.exceptions.InvalidRequestException
SSO.Client.exceptions.UnauthorizedException
SSO.Client.exceptions.TooManyRequestsException
SSO.Client.exceptions.ResourceNotFoundException