Skip to main content

account_pools

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

Overview

Nameaccount_pools
TypeResource
Idaws.datazone.account_pools

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the account pool. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>)
namestringThe name of the account pool. (pattern: <code>[\w -]+</code>)
account_sourceobjectThe 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_atstring (date-time)The timestamp at which the account pool was created.
created_bystringThe user who created the account pool.
descriptionstringThe description of the account pool.
domain_idstringThe 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_idstringThe domain unit ID of the account pool. (pattern: <code>[a-z0-9_-]+</code>)
last_updated_atstring (date-time)The timestamp at which the account pool was last updated.
resolution_strategystringThe mechanism used to resolve the account selection from the account pool. (MANUAL)
updated_bystringThe user who last updated the account pool.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_account_poolselectdomain_identifier, identifier, regionGets the details of the account pool.
list_account_poolsselectdomain_identifier, regionname, sortBy, sortOrder, nextToken, maxResultsLists existing account pools.
create_account_poolinsertdomain_identifier, region, name, resolutionStrategy, accountSourceCreates an account pool.
update_account_poolupdatedomain_identifier, identifier, regionUpdates the account pool.
delete_account_pooldeletedomain_identifier, identifier, regionDeletes 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.

NameDatatypeDescription
domain_identifierstringThe ID of the domain where the account pool is deleted.
identifierstringThe ID of the account pool to be deleted.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe 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.
namestringThe name of the account pool to be listed.
nextTokenstringWhen 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.
sortBystringThe sort by mechanism in which the existing account pools are to be listed.
sortOrderstringThe sort order in which the existing account pools are to be listed.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

Deletes an account pool.

DELETE FROM aws.datazone.account_pools
WHERE domain_identifier = '{{ domain_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
;