account_pools
Creates, updates, deletes, gets or lists an account_pools resource.
Overview
| Name | account_pools |
| Type | Resource |
| Id | aws.datazone.account_pools |
Fields
The following fields are returned by SELECT queries:
- get_account_pool
- list_account_pools
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the account pool. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
name | string | The name of the account pool. (pattern: <code>[\w -]+</code>) |
account_source | object | The source of accounts for the account pool. In the current release, it's either a static list of accounts provided by the customer or a custom Amazon Web Services Lambda handler. |
created_at | string (date-time) | The timestamp at which the account pool was created. |
created_by | string | The user who created the account pool. |
description | string | The description of the account pool. |
domain_id | string | The ID of the domain in which the account pool lives whose details are to be displayed. (pattern: <code>dzd[-][a-zA-Z0-9-]{1,36}</code>) |
domain_unit_id | string | The domain unit ID of the account pool. (pattern: <code>[a-z0-9_-]+</code>) |
last_updated_at | string (date-time) | The timestamp at which the account pool was last updated. |
resolution_strategy | string | The mechanism used to resolve the account selection from the account pool. (MANUAL) |
updated_by | string | The user who last updated the account pool. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the account pool. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
name | string | The name of the account pool. (pattern: <code>[\w -]+</code>) |
created_by | string | The user who created the account pool. |
domain_id | string | The ID of the domain. (pattern: <code>dzd[-][a-zA-Z0-9-]{1,36}</code>) |
domain_unit_id | string | The ID of the domain unit. (pattern: <code>[a-z0-9_-]+</code>) |
resolution_strategy | string | The mechanism used to resolve the account selection from the account pool. (MANUAL) |
updated_by | string | The user who updated the account pool. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_account_pool | select | domain_identifier, identifier, region | Gets the details of the account pool. | |
list_account_pools | select | domain_identifier, region | name, sortBy, sortOrder, nextToken, maxResults | Lists existing account pools. |
create_account_pool | insert | domain_identifier, region, name, resolutionStrategy, accountSource | Creates an account pool. | |
update_account_pool | update | domain_identifier, identifier, region | Updates the account pool. | |
delete_account_pool | delete | domain_identifier, identifier, region | Deletes an account pool. |
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 |
|---|---|---|
domain_identifier | string | The ID of the domain where the account pool is deleted. |
identifier | string | The ID of the account pool to be deleted. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of account pools to return in a single call to ListAccountPools. When the number of account pools to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListAccountPools to list the next set of account pools. |
name | string | The name of the account pool to be listed. |
nextToken | string | When the number of account pools is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of account pools, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListAccountPools to list the next set of account pools. |
sortBy | string | The sort by mechanism in which the existing account pools are to be listed. |
sortOrder | string | The sort order in which the existing account pools are to be listed. |
SELECT examples
- get_account_pool
- list_account_pools
Gets the details of the account pool.
SELECT
id,
name,
account_source,
created_at,
created_by,
description,
domain_id,
domain_unit_id,
last_updated_at,
resolution_strategy,
updated_by
FROM aws.datazone.account_pools
WHERE domain_identifier = '{{ domain_identifier }}' -- required
AND identifier = '{{ identifier }}' -- required
AND region = '{{ region }}' -- required
;
Lists existing account pools.
SELECT
id,
name,
created_by,
domain_id,
domain_unit_id,
resolution_strategy,
updated_by
FROM aws.datazone.account_pools
WHERE domain_identifier = '{{ domain_identifier }}' -- required
AND region = '{{ region }}' -- required
AND name = '{{ name }}'
AND sortBy = '{{ sortBy }}'
AND sortOrder = '{{ sortOrder }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_account_pool
- Manifest
Creates an account pool.
INSERT INTO aws.datazone.account_pools (
name,
description,
resolutionStrategy,
accountSource,
domain_identifier,
region
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ resolutionStrategy }}' /* required */,
'{{ accountSource }}' /* required */,
'{{ domain_identifier }}',
'{{ region }}'
RETURNING
id,
name,
account_source,
created_at,
created_by,
description,
domain_id,
domain_unit_id,
last_updated_at,
resolution_strategy,
updated_by
;
# Description fields are for documentation purposes
- name: account_pools
props:
- name: domain_identifier
value: "{{ domain_identifier }}"
description: Required parameter for the account_pools resource.
- name: region
value: "{{ region }}"
description: Required parameter for the account_pools resource.
- name: name
value: "{{ name }}"
- name: description
value: "{{ description }}"
- name: resolutionStrategy
value: "{{ resolutionStrategy }}"
valid_values: ['MANUAL']
- name: accountSource
description: |
The source of accounts for the account pool. In the current release, it's either a static list of accounts provided by the customer or a custom Amazon Web Services Lambda handler.
value:
accounts:
- awsAccountId: "{{ awsAccountId }}"
supportedRegions: "{{ supportedRegions }}"
awsAccountName: "{{ awsAccountName }}"
customAccountPoolHandler:
lambdaFunctionArn: "{{ lambdaFunctionArn }}"
lambdaExecutionRoleArn: "{{ lambdaExecutionRoleArn }}"
UPDATE examples
- update_account_pool
Updates the account pool.
UPDATE aws.datazone.account_pools
SET
name = '{{ name }}',
description = '{{ description }}',
resolutionStrategy = '{{ resolutionStrategy }}',
accountSource = '{{ accountSource }}'
WHERE
domain_identifier = '{{ domain_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
RETURNING
id,
name,
account_source,
created_at,
created_by,
description,
domain_id,
domain_unit_id,
last_updated_at,
resolution_strategy,
updated_by;
DELETE examples
- delete_account_pool
Deletes an account pool.
DELETE FROM aws.datazone.account_pools
WHERE domain_identifier = '{{ domain_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
;