Skip to main content

account_roles

Creates, updates, deletes, gets or lists an account_roles resource.

Overview

Nameaccount_roles
TypeResource
Idaws.sso.account_roles

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstringThe identifier of the AWS account assigned to the user.
role_namestringThe friendly name of the role that is assigned to the user.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_account_rolesselectx-amz-sso_bearer_token, account_id, regionnext_token, max_resultLists all roles that are assigned to the user for a given AWS account.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstringThe identifier for the AWS account that is assigned to the user.
regionstringAWS region (default: us-east-1)
x-amz-sso_bearer_tokenstringThe token issued by the CreateToken API call. For more information, see CreateToken in the IAM Identity Center OIDC API Reference Guide.
max_resultintegerThe number of items that clients can request per page.
next_tokenstringThe page token from the previous response output when you request subsequent pages.

SELECT examples

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

SELECT
account_id,
role_name
FROM aws.sso.account_roles
WHERE `x-amz-sso_bearer_token` = '{{ x-amz-sso_bearer_token }}' -- required
AND account_id = '{{ account_id }}' -- required
AND region = '{{ region }}' -- required
AND next_token = '{{ next_token }}'
AND max_result = '{{ max_result }}'
;