rulesets
Creates, updates, deletes, gets or lists a rulesets resource.
Overview
| Name | rulesets |
| Type | Resource |
| Id | aws.databrew.rulesets |
Fields
The following fields are returned by SELECT queries:
- describe_ruleset
- list_rulesets
| Name | Datatype | Description |
|---|---|---|
create_date | string (date-time) | The date and time that the ruleset was created. |
created_by | string | The Amazon Resource Name (ARN) of the user who created the ruleset. |
description | string | The description of the ruleset. |
last_modified_by | string | The Amazon Resource Name (ARN) of the user who last modified the ruleset. |
last_modified_date | string (date-time) | The modification date and time of the ruleset. |
name | string | The name of the ruleset. |
resource_arn | string | The Amazon Resource Name (ARN) for the ruleset. |
rules | array | A list of rules that are defined with the ruleset. A rule includes one or more checks to be validated on a DataBrew dataset. |
tags | object | Metadata tags that have been applied to the ruleset. |
target_arn | string | The Amazon Resource Name (ARN) of a resource (dataset) that the ruleset is associated with. |
| Name | Datatype | Description |
|---|---|---|
account_id | string | The ID of the Amazon Web Services account that owns the ruleset. |
create_date | string (date-time) | The date and time that the ruleset was created. |
created_by | string | The Amazon Resource Name (ARN) of the user who created the ruleset. |
description | string | The description of the ruleset. |
last_modified_by | string | The Amazon Resource Name (ARN) of the user who last modified the ruleset. |
last_modified_date | string (date-time) | The modification date and time of the ruleset. |
name | string | The name of the ruleset. |
resource_arn | string | The Amazon Resource Name (ARN) for the ruleset. |
rule_count | integer | The number of rules that are defined in the ruleset. |
tags | object | Metadata tags that have been applied to the ruleset. |
target_arn | string | The Amazon Resource Name (ARN) of a resource (dataset) that the ruleset is associated with. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_ruleset | select | name, region | Retrieves detailed information about the ruleset. | |
list_rulesets | select | region | targetArn, maxResults, nextToken | List all rulesets available in the current account or rulesets associated with a specific resource (dataset). |
create_ruleset | insert | region, TargetArn | Creates a new ruleset that can be used in a profile job to validate the data quality of a dataset. | |
update_ruleset | update | name, region | Updates specified ruleset. | |
delete_ruleset | delete | name, region | Deletes a ruleset. |
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 |
|---|---|---|
name | string | The name of the ruleset to be deleted. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of results to return in this request. |
nextToken | string | A token generated by DataBrew that specifies where to continue pagination if a previous request was truncated. To get the next set of pages, pass in the NextToken value from the response object of the previous page call. |
targetArn | string | The Amazon Resource Name (ARN) of a resource (dataset). Using this parameter indicates to return only those rulesets that are associated with the specified resource. |
SELECT examples
- describe_ruleset
- list_rulesets
Retrieves detailed information about the ruleset.
SELECT
create_date,
created_by,
description,
last_modified_by,
last_modified_date,
name,
resource_arn,
rules,
tags,
target_arn
FROM aws.databrew.rulesets
WHERE name = '{{ name }}' -- required
AND region = '{{ region }}' -- required
;
List all rulesets available in the current account or rulesets associated with a specific resource (dataset).
SELECT
account_id,
create_date,
created_by,
description,
last_modified_by,
last_modified_date,
name,
resource_arn,
rule_count,
tags,
target_arn
FROM aws.databrew.rulesets
WHERE region = '{{ region }}' -- required
AND targetArn = '{{ targetArn }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_ruleset
- Manifest
Creates a new ruleset that can be used in a profile job to validate the data quality of a dataset.
INSERT INTO aws.databrew.rulesets (
Name,
Description,
TargetArn,
Rules,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ TargetArn }}' /* required */,
'{{ Rules }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
name
;
# Description fields are for documentation purposes
- name: rulesets
props:
- name: region
value: "{{ region }}"
description: Required parameter for the rulesets resource.
- name: Name
value: "{{ Name }}"
- name: Description
value: "{{ Description }}"
- name: TargetArn
value: "{{ TargetArn }}"
- name: Rules
value:
- Name: "{{ Name }}"
Disabled: {{ Disabled }}
CheckExpression: "{{ CheckExpression }}"
SubstitutionMap: "{{ SubstitutionMap }}"
Threshold:
Value: {{ Value }}
Type: "{{ Type }}"
Unit: "{{ Unit }}"
ColumnSelectors: "{{ ColumnSelectors }}"
- name: Tags
value: "{{ Tags }}"
UPDATE examples
- update_ruleset
Updates specified ruleset.
UPDATE aws.databrew.rulesets
SET
Description = '{{ Description }}',
Rules = '{{ Rules }}'
WHERE
name = '{{ name }}' --required
AND region = '{{ region }}' --required
RETURNING
name;
DELETE examples
- delete_ruleset
Deletes a ruleset.
DELETE FROM aws.databrew.rulesets
WHERE name = '{{ name }}' --required
AND region = '{{ region }}' --required
;