rules
Creates, updates, deletes, gets or lists a rules resource.
Overview
| Name | rules |
| Type | Resource |
| Id | aws.datazone.rules |
Fields
The following fields are returned by SELECT queries:
- list_rules
- get_rule
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the rule. (pattern: <code>[\w -]+</code>) |
action | string | The action of the rule. (CREATE_LISTING_CHANGE_SET, CREATE_SUBSCRIPTION_REQUEST) |
identifier | string | The ID of the rule. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
last_updated_by | string | The timestamp at which the rule was last updated. |
revision | string | The revision of the rule. |
rule_type | string | The type of the rule. (METADATA_FORM_ENFORCEMENT, GLOSSARY_TERM_ENFORCEMENT) |
scope | object | The scope of a rule. |
target | object | The target of the rule. |
target_type | string | The target type of the rule. (DOMAIN_UNIT) |
updated_at | string (date-time) | The timestamp at which the rule was last updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the rule. (pattern: <code>[\w -]+</code>) |
action | string | The action of the rule. (CREATE_LISTING_CHANGE_SET, CREATE_SUBSCRIPTION_REQUEST) |
created_at | string (date-time) | The timestamp at which the rule was created. |
created_by | string | The user who created the rule. |
description | string | The description of the rule. |
detail | object | The details of a rule. |
identifier | string | The ID of the rule. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
last_updated_by | string | The timestamp at which the rule was last updated. |
revision | string | The revision of the rule. |
rule_type | string | The type of the rule. (METADATA_FORM_ENFORCEMENT, GLOSSARY_TERM_ENFORCEMENT) |
scope | object | The scope of a rule. |
target | object | The target of the rule. |
target_type | string | The target type of the rule. (DOMAIN_UNIT) |
updated_at | string (date-time) | The timestamp at which the rule was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_rules | select | domain_identifier, target_type, target_identifier, region | ruleType, ruleAction, projectIds, assetTypes, dataProduct, includeCascaded, maxResults, nextToken | Lists existing rules. In Amazon DataZone, a rule is a formal agreement that enforces specific requirements across user workflows (e.g., publishing assets to the catalog, requesting subscriptions, creating projects) within the Amazon DataZone data portal. These rules help maintain consistency, ensure compliance, and uphold governance standards in data management processes. For instance, a metadata enforcement rule can specify the required information for creating a subscription request or publishing a data asset to the catalog, ensuring alignment with organizational standards. |
get_rule | select | domain_identifier, identifier, region | revision | Gets the details of a rule in Amazon DataZone. A rule is a formal agreement that enforces specific requirements across user workflows (e.g., publishing assets to the catalog, requesting subscriptions, creating projects) within the Amazon DataZone data portal. These rules help maintain consistency, ensure compliance, and uphold governance standards in data management processes. For instance, a metadata enforcement rule can specify the required information for creating a subscription request or publishing a data asset to the catalog, ensuring alignment with organizational standards. |
create_rule | insert | domain_identifier, region, name, target, action, scope, detail | Creates a rule in Amazon DataZone. A rule is a formal agreement that enforces specific requirements across user workflows (e.g., publishing assets to the catalog, requesting subscriptions, creating projects) within the Amazon DataZone data portal. These rules help maintain consistency, ensure compliance, and uphold governance standards in data management processes. For instance, a metadata enforcement rule can specify the required information for creating a subscription request or publishing a data asset to the catalog, ensuring alignment with organizational standards. | |
update_rule | update | domain_identifier, identifier, region | Updates a rule. In Amazon DataZone, a rule is a formal agreement that enforces specific requirements across user workflows (e.g., publishing assets to the catalog, requesting subscriptions, creating projects) within the Amazon DataZone data portal. These rules help maintain consistency, ensure compliance, and uphold governance standards in data management processes. For instance, a metadata enforcement rule can specify the required information for creating a subscription request or publishing a data asset to the catalog, ensuring alignment with organizational standards. | |
delete_rule | delete | domain_identifier, identifier, region | Deletes a rule in Amazon DataZone. A rule is a formal agreement that enforces specific requirements across user workflows (e.g., publishing assets to the catalog, requesting subscriptions, creating projects) within the Amazon DataZone data portal. These rules help maintain consistency, ensure compliance, and uphold governance standards in data management processes. For instance, a metadata enforcement rule can specify the required information for creating a subscription request or publishing a data asset to the catalog, ensuring alignment with organizational standards. |
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 |
|---|---|---|
domain_identifier | string | The ID of the domain that where the rule is to be deleted. |
identifier | string | The ID of the rule that is to be deleted. |
region | string | AWS region (default: us-east-1) |
target_identifier | string | The target ID of the rule. |
target_type | string | The target type of the rule. |
assetTypes | array | The asset types of the rule. |
dataProduct | boolean | The data product of the rule. |
includeCascaded | boolean | Specifies whether to include cascading rules in the results. |
maxResults | integer | The maximum number of rules to return in a single call to ListRules. When the number of rules 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 ListRules to list the next set of rules. |
nextToken | string | When the number of rules 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 rules, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListRules to list the next set of rules. |
projectIds | array | The IDs of projects in which rules are to be listed. |
revision | string | The revision of the rule. |
ruleAction | string | The action of the rule. |
ruleType | string | The type of the rule. |
SELECT examples
- list_rules
- get_rule
Lists existing rules. In Amazon DataZone, a rule is a formal agreement that enforces specific requirements across user workflows (e.g., publishing assets to the catalog, requesting subscriptions, creating projects) within the Amazon DataZone data portal. These rules help maintain consistency, ensure compliance, and uphold governance standards in data management processes. For instance, a metadata enforcement rule can specify the required information for creating a subscription request or publishing a data asset to the catalog, ensuring alignment with organizational standards.
SELECT
name,
action,
identifier,
last_updated_by,
revision,
rule_type,
scope,
target,
target_type,
updated_at
FROM aws.datazone.rules
WHERE domain_identifier = '{{ domain_identifier }}' -- required
AND target_type = '{{ target_type }}' -- required
AND target_identifier = '{{ target_identifier }}' -- required
AND region = '{{ region }}' -- required
AND ruleType = '{{ ruleType }}'
AND ruleAction = '{{ ruleAction }}'
AND projectIds = '{{ projectIds }}'
AND assetTypes = '{{ assetTypes }}'
AND dataProduct = '{{ dataProduct }}'
AND includeCascaded = '{{ includeCascaded }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
Gets the details of a rule in Amazon DataZone. A rule is a formal agreement that enforces specific requirements across user workflows (e.g., publishing assets to the catalog, requesting subscriptions, creating projects) within the Amazon DataZone data portal. These rules help maintain consistency, ensure compliance, and uphold governance standards in data management processes. For instance, a metadata enforcement rule can specify the required information for creating a subscription request or publishing a data asset to the catalog, ensuring alignment with organizational standards.
SELECT
name,
action,
created_at,
created_by,
description,
detail,
identifier,
last_updated_by,
revision,
rule_type,
scope,
target,
target_type,
updated_at
FROM aws.datazone.rules
WHERE domain_identifier = '{{ domain_identifier }}' -- required
AND identifier = '{{ identifier }}' -- required
AND region = '{{ region }}' -- required
AND revision = '{{ revision }}'
;
INSERT examples
- create_rule
- Manifest
Creates a rule in Amazon DataZone. A rule is a formal agreement that enforces specific requirements across user workflows (e.g., publishing assets to the catalog, requesting subscriptions, creating projects) within the Amazon DataZone data portal. These rules help maintain consistency, ensure compliance, and uphold governance standards in data management processes. For instance, a metadata enforcement rule can specify the required information for creating a subscription request or publishing a data asset to the catalog, ensuring alignment with organizational standards.
INSERT INTO aws.datazone.rules (
name,
target,
action,
scope,
detail,
description,
clientToken,
domain_identifier,
region
)
SELECT
'{{ name }}' /* required */,
'{{ target }}' /* required */,
'{{ action }}' /* required */,
'{{ scope }}' /* required */,
'{{ detail }}' /* required */,
'{{ description }}',
'{{ clientToken }}',
'{{ domain_identifier }}',
'{{ region }}'
RETURNING
name,
action,
created_at,
created_by,
description,
detail,
identifier,
rule_type,
scope,
target,
target_type
;
# Description fields are for documentation purposes
- name: rules
props:
- name: domain_identifier
value: "{{ domain_identifier }}"
description: Required parameter for the rules resource.
- name: region
value: "{{ region }}"
description: Required parameter for the rules resource.
- name: name
value: "{{ name }}"
- name: target
description: |
The target of the rule.
value:
domainUnitTarget:
domainUnitId: "{{ domainUnitId }}"
includeChildDomainUnits: {{ includeChildDomainUnits }}
- name: action
value: "{{ action }}"
valid_values: ['CREATE_LISTING_CHANGE_SET', 'CREATE_SUBSCRIPTION_REQUEST']
- name: scope
description: |
The scope of a rule.
value:
assetType:
selectionMode: "{{ selectionMode }}"
specificAssetTypes:
- "{{ specificAssetTypes }}"
dataProduct: {{ dataProduct }}
project:
selectionMode: "{{ selectionMode }}"
specificProjects:
- "{{ specificProjects }}"
- name: detail
description: |
The details of a rule.
value:
metadataFormEnforcementDetail:
requiredMetadataForms:
- typeIdentifier: "{{ typeIdentifier }}"
typeRevision: "{{ typeRevision }}"
glossaryTermEnforcementDetail:
requiredGlossaryTermIds:
- "{{ requiredGlossaryTermIds }}"
- name: description
value: "{{ description }}"
- name: clientToken
value: "{{ clientToken }}"
UPDATE examples
- update_rule
Updates a rule. In Amazon DataZone, a rule is a formal agreement that enforces specific requirements across user workflows (e.g., publishing assets to the catalog, requesting subscriptions, creating projects) within the Amazon DataZone data portal. These rules help maintain consistency, ensure compliance, and uphold governance standards in data management processes. For instance, a metadata enforcement rule can specify the required information for creating a subscription request or publishing a data asset to the catalog, ensuring alignment with organizational standards.
UPDATE aws.datazone.rules
SET
name = '{{ name }}',
description = '{{ description }}',
scope = '{{ scope }}',
detail = '{{ detail }}',
includeChildDomainUnits = {{ includeChildDomainUnits }}
WHERE
domain_identifier = '{{ domain_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
RETURNING
name,
action,
created_at,
created_by,
description,
detail,
identifier,
last_updated_by,
revision,
rule_type,
scope,
target,
updated_at;
DELETE examples
- delete_rule
Deletes a rule in Amazon DataZone. A rule is a formal agreement that enforces specific requirements across user workflows (e.g., publishing assets to the catalog, requesting subscriptions, creating projects) within the Amazon DataZone data portal. These rules help maintain consistency, ensure compliance, and uphold governance standards in data management processes. For instance, a metadata enforcement rule can specify the required information for creating a subscription request or publishing a data asset to the catalog, ensuring alignment with organizational standards.
DELETE FROM aws.datazone.rules
WHERE domain_identifier = '{{ domain_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
;