custom_data_identifiers
Creates, updates, deletes or gets a custom_data_identifier resource or lists custom_data_identifiers in a region
Overview
| Name | custom_data_identifiers |
| Type | Resource |
| Description | Macie CustomDataIdentifier resource schema |
| Id | awscc.macie.custom_data_identifiers |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
name | string | Name of custom data identifier. |
description | string | Description of custom data identifier. |
regex | string | Regular expression for custom data identifier. |
maximum_match_distance | integer | Maximum match distance. |
keywords | array | Keywords to be matched against. |
ignore_words | array | Words to be ignored. |
id | string | Custom data identifier ID. |
arn | string | Custom data identifier ARN. |
tags | array | A collection of tags associated with a resource |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | Custom data identifier ID. |
region | string | AWS region. |
For more information, see AWS::Macie::CustomDataIdentifier.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | custom_data_identifiers | INSERT | Name, Regex, region |
delete_resource | custom_data_identifiers | DELETE | Identifier, region |
update_resource | custom_data_identifiers | UPDATE | Identifier, PatchDocument, region |
list_resources | custom_data_identifiers_list_only | SELECT | region |
get_resource | custom_data_identifiers | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual custom_data_identifier.
SELECT
region,
name,
description,
regex,
maximum_match_distance,
keywords,
ignore_words,
id,
arn,
tags
FROM awscc.macie.custom_data_identifiers
WHERE
region = 'us-east-1' AND
Identifier = '{{ id }}';
Lists all custom_data_identifiers in a region.
SELECT
region,
id
FROM awscc.macie.custom_data_identifiers_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new custom_data_identifier resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.macie.custom_data_identifiers (
Name,
Regex,
region
)
SELECT
'{{ name }}',
'{{ regex }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.macie.custom_data_identifiers (
Name,
Description,
Regex,
MaximumMatchDistance,
Keywords,
IgnoreWords,
Tags,
region
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ regex }}',
'{{ maximum_match_distance }}',
'{{ keywords }}',
'{{ ignore_words }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: custom_data_identifier
props:
- name: name
value: '{{ name }}'
- name: description
value: '{{ description }}'
- name: regex
value: '{{ regex }}'
- name: maximum_match_distance
value: '{{ maximum_match_distance }}'
- name: keywords
value:
- '{{ keywords[0] }}'
- name: ignore_words
value:
- '{{ ignore_words[0] }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a custom_data_identifier resource, using stack-deploy.
/*+ update */
UPDATE awscc.macie.custom_data_identifiers
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.macie.custom_data_identifiers
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';
Permissions
To operate on the custom_data_identifiers resource, the following permissions are required:
- Create
- Read
- Delete
- List
- Update
macie2:CreateCustomDataIdentifier,
macie2:GetCustomDataIdentifier,
macie2:TagResource
macie2:GetCustomDataIdentifier
macie2:DeleteCustomDataIdentifier
macie2:ListCustomDataIdentifiers
macie2:TagResource,
macie2:UntagResource,
macie2:GetCustomDataIdentifier