rulesets
Creates, updates, deletes or gets a ruleset
resource or lists rulesets
in a region
Overview
Name | rulesets |
Type | Resource |
Description | Resource schema for AWS::DataBrew::Ruleset. |
Id | aws.databrew.rulesets |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Name of the Ruleset |
description | string | Description of the Ruleset |
target_arn | string | Arn of the target resource (dataset) to apply the ruleset to |
rules | array | List of the data quality rules in the ruleset |
tags | array | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, TargetArn, Rules, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all rulesets
in a region.
SELECT
region,
name,
description,
target_arn,
rules,
tags
FROM aws.databrew.rulesets
WHERE region = 'us-east-1';
Gets all properties from an individual ruleset
.
SELECT
region,
name,
description,
target_arn,
rules,
tags
FROM aws.databrew.rulesets
WHERE region = 'us-east-1' AND data__Identifier = '<Name>';
INSERT
example
Use the following StackQL query and manifest file to create a new ruleset
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.databrew.rulesets (
Name,
TargetArn,
Rules,
region
)
SELECT
'{{ Name }}',
'{{ TargetArn }}',
'{{ Rules }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.databrew.rulesets (
Name,
Description,
TargetArn,
Rules,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ TargetArn }}',
'{{ Rules }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: ruleset
props:
- name: Name
value: '{{ Name }}'
- name: Description
value: '{{ Description }}'
- name: TargetArn
value: '{{ TargetArn }}'
- name: Rules
value:
- Name: '{{ Name }}'
Disabled: '{{ Disabled }}'
CheckExpression: '{{ CheckExpression }}'
SubstitutionMap:
- ValueReference: '{{ ValueReference }}'
Value: '{{ Value }}'
Threshold:
Value: null
Type: '{{ Type }}'
Unit: '{{ Unit }}'
ColumnSelectors:
- Regex: '{{ Regex }}'
Name: '{{ Name }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.databrew.rulesets
WHERE data__Identifier = '<Name>'
AND region = 'us-east-1';
Permissions
To operate on the rulesets
resource, the following permissions are required:
Create
databrew:CreateRuleset,
databrew:TagResource,
databrew:UntagResource,
iam:PassRole
Read
databrew:DescribeRuleset,
databrew:ListTagsForResource,
iam:ListRoles
Update
databrew:UpdateRuleset
Delete
databrew:DeleteRuleset
List
databrew:ListRulesets,
databrew:ListTagsForResource,
iam:ListRoles