Skip to main content

allow_lists

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

Overview

Nameallow_lists
TypeResource
Idaws.macie2.allow_lists

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique identifier for the allow list. (pattern: <code>^[a-z0-9]{22}$</code>)
namestringThe custom name of the allow list. (pattern: <code>^.+$</code>)
arnstringThe Amazon Resource Name (ARN) of the allow list. (pattern: <code>^arn:(aws|aws-cn|aws-us-gov):macie2:[a-z1-9-]{9,20}:\d{12}:allow-list/[a-z0-9]{22}$</code>)
created_atstring (date-time)The date and time, in UTC and extended ISO 8601 format, when the allow list was created in Amazon Macie.
criteriaobjectSpecifies the criteria for an allow list. The criteria must specify a regular expression (regex) or an S3 object (s3WordsList). It can't specify both.
descriptionstringThe custom description of the allow list. (pattern: <code>^[\s\S]+$</code>)
statusobjectThe current status of the allow list, which indicates whether Amazon Macie can access and use the list's criteria.
tagsobjectA map of key-value pairs that specifies which tags (keys and values) are associated with the allow list.
updated_atstring (date-time)The date and time, in UTC and extended ISO 8601 format, when the allow list's settings were most recently changed in Amazon Macie.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_allow_listselectid, regionRetrieves the settings and status of an allow list.
list_allow_listsselectregionmaxResults, nextTokenRetrieves a subset of information about all the allow lists for an account.
create_allow_listinsertregion, clientToken, criteria, nameCreates and defines the settings for an allow list.
update_allow_listupdateid, region, criteria, nameUpdates the settings for an allow list.
delete_allow_listdeleteid, regionignoreJobChecksDeletes an allow list.

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
idstringThe unique identifier for the Amazon Macie resource that the request applies to.
regionstringAWS region (default: us-east-1)
ignoreJobChecksstringSpecifies whether to force deletion of the allow list, even if active classification jobs are configured to use the list. When you try to delete an allow list, Amazon Macie checks for classification jobs that use the list and have a status other than COMPLETE or CANCELLED. By default, Macie rejects your request if any jobs meet these criteria. To skip these checks and delete the list, set this value to true. To delete the list only if no active jobs are configured to use it, set this value to false.
maxResultsintegerThe maximum number of items to include in each page of a paginated response.
nextTokenstringThe nextToken string that specifies which page of results to return in a paginated response.

SELECT examples

Retrieves the settings and status of an allow list.

SELECT
id,
name,
arn,
created_at,
criteria,
description,
status,
tags,
updated_at
FROM aws.macie2.allow_lists
WHERE id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates and defines the settings for an allow list.

INSERT INTO aws.macie2.allow_lists (
clientToken,
criteria,
description,
name,
tags,
region
)
SELECT
'{{ clientToken }}' /* required */,
'{{ criteria }}' /* required */,
'{{ description }}',
'{{ name }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
id,
arn
;

UPDATE examples

Updates the settings for an allow list.

UPDATE aws.macie2.allow_lists
SET
criteria = '{{ criteria }}',
description = '{{ description }}',
name = '{{ name }}'
WHERE
id = '{{ id }}' --required
AND region = '{{ region }}' --required
AND criteria = '{{ criteria }}' --required
AND name = '{{ name }}' --required
RETURNING
id,
arn;

DELETE examples

Deletes an allow list.

DELETE FROM aws.macie2.allow_lists
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required
AND ignoreJobChecks = '{{ ignoreJobChecks }}'
;