account_roles
Creates, updates, deletes, gets or lists an account_roles resource.
Overview
| Name | account_roles |
| Type | Resource |
| Id | aws.sso.account_roles |
Fields
The following fields are returned by SELECT queries:
- list_account_roles
| Name | Datatype | Description |
|---|---|---|
account_id | string | The identifier of the AWS account assigned to the user. |
role_name | string | The friendly name of the role that is assigned to the user. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_account_roles | select | x-amz-sso_bearer_token, account_id, region | next_token, max_result | Lists 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.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The identifier for the AWS account that is assigned to the user. |
region | string | AWS region (default: us-east-1) |
x-amz-sso_bearer_token | string | The token issued by the CreateToken API call. For more information, see CreateToken in the IAM Identity Center OIDC API Reference Guide. |
max_result | integer | The number of items that clients can request per page. |
next_token | string | The page token from the previous response output when you request subsequent pages. |
SELECT examples
- list_account_roles
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 }}'
;