Skip to main content

rules

Creates, updates, deletes, gets or lists a rules resource.

Overview

Namerules
TypeResource
Idaws.datazone.rules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the rule. (pattern: <code>[\w -]+</code>)
actionstringThe action of the rule. (CREATE_LISTING_CHANGE_SET, CREATE_SUBSCRIPTION_REQUEST)
identifierstringThe ID of the rule. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>)
last_updated_bystringThe timestamp at which the rule was last updated.
revisionstringThe revision of the rule.
rule_typestringThe type of the rule. (METADATA_FORM_ENFORCEMENT, GLOSSARY_TERM_ENFORCEMENT)
scopeobjectThe scope of a rule.
targetobjectThe target of the rule.
target_typestringThe target type of the rule. (DOMAIN_UNIT)
updated_atstring (date-time)The timestamp at which the rule was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_rulesselectdomain_identifier, target_type, target_identifier, regionruleType, ruleAction, projectIds, assetTypes, dataProduct, includeCascaded, maxResults, nextTokenLists 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_ruleselectdomain_identifier, identifier, regionrevisionGets 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_ruleinsertdomain_identifier, region, name, target, action, scope, detailCreates 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_ruleupdatedomain_identifier, identifier, regionUpdates 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_ruledeletedomain_identifier, identifier, regionDeletes 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.

NameDatatypeDescription
domain_identifierstringThe ID of the domain that where the rule is to be deleted.
identifierstringThe ID of the rule that is to be deleted.
regionstringAWS region (default: us-east-1)
target_identifierstringThe target ID of the rule.
target_typestringThe target type of the rule.
assetTypesarrayThe asset types of the rule.
dataProductbooleanThe data product of the rule.
includeCascadedbooleanSpecifies whether to include cascading rules in the results.
maxResultsintegerThe 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.
nextTokenstringWhen 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.
projectIdsarrayThe IDs of projects in which rules are to be listed.
revisionstringThe revision of the rule.
ruleActionstringThe action of the rule.
ruleTypestringThe type of the rule.

SELECT examples

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 }}'
;

INSERT examples

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
;

UPDATE examples

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

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
;