accounts
Creates, updates, deletes, gets or lists an accounts resource.
Overview
| Name | accounts |
| Type | Resource |
| Id | aws.sso.accounts |
Fields
The following fields are returned by SELECT queries:
- list_accounts
| Name | Datatype | Description |
|---|---|---|
account_id | string | The identifier of the AWS account that is assigned to the user. |
account_name | string | The display name of the AWS account that is assigned to the user. |
email_address | string | The email address of the AWS account that is assigned to the user. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_accounts | select | x-amz-sso_bearer_token, region | next_token, max_result | Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the administrator of the account. For more information, see Assign User Access in the IAM Identity Center User Guide. This operation returns a paginated response. |
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 |
|---|---|---|
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 | This is the number of items clients can request per page. |
next_token | string | (Optional) When requesting subsequent pages, this is the page token from the previous response output. |
SELECT examples
- list_accounts
Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the administrator of the account. For more information, see Assign User Access in the IAM Identity Center User Guide. This operation returns a paginated response.
SELECT
account_id,
account_name,
email_address
FROM aws.sso.accounts
WHERE `x-amz-sso_bearer_token` = '{{ x-amz-sso_bearer_token }}' -- required
AND region = '{{ region }}' -- required
AND next_token = '{{ next_token }}'
AND max_result = '{{ max_result }}'
;