DataZone / Client / list_rules
list_rules#
- DataZone.Client.list_rules(**kwargs)#
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.
See also: AWS API Documentation
Request Syntax
response = client.list_rules( action='CREATE_SUBSCRIPTION_REQUEST', assetTypes=[ 'string', ], dataProduct=True|False, domainIdentifier='string', includeCascaded=True|False, maxResults=123, nextToken='string', projectIds=[ 'string', ], ruleType='METADATA_FORM_ENFORCEMENT', targetIdentifier='string', targetType='DOMAIN_UNIT' )
- Parameters:
action (string) – The action of the rule.
assetTypes (list) –
The asset types of the rule.
(string) –
dataProduct (boolean) – The data product of the rule.
domainIdentifier (string) –
[REQUIRED]
The ID of the domain in which the rules are to be listed.
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 ofMaxResults
, the response contains aNextToken
value that you can use in a subsequent call toListRules
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 forMaxResults
that is less than the number of rules, the response includes a pagination token namedNextToken
. You can specify thisNextToken
value in a subsequent call toListRules
to list the next set of rules.projectIds (list) –
The IDs of projects in which rules are to be listed.
(string) –
ruleType (string) – The type of the rule.
targetIdentifier (string) –
[REQUIRED]
The target ID of the rule.
targetType (string) –
[REQUIRED]
The target type of the rule.
- Return type:
dict
- Returns:
Response Syntax
{ 'items': [ { 'action': 'CREATE_SUBSCRIPTION_REQUEST', 'identifier': 'string', 'lastUpdatedBy': 'string', 'name': 'string', 'revision': 'string', 'ruleType': 'METADATA_FORM_ENFORCEMENT', 'scope': { 'assetType': { 'selectionMode': 'ALL'|'SPECIFIC', 'specificAssetTypes': [ 'string', ] }, 'dataProduct': True|False, 'project': { 'selectionMode': 'ALL'|'SPECIFIC', 'specificProjects': [ 'string', ] } }, 'target': { 'domainUnitTarget': { 'domainUnitId': 'string', 'includeChildDomainUnits': True|False } }, 'targetType': 'DOMAIN_UNIT', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) –
items (list) –
The results of the
ListRules
action.(dict) –
The summary of the rule.
action (string) –
The action of the rule.
identifier (string) –
The ID of the rule.
lastUpdatedBy (string) –
The timestamp at which the rule was last updated.
name (string) –
The name of the rule.
revision (string) –
The revision of the rule.
ruleType (string) –
The type of the rule.
scope (dict) –
The scope of the rule.
assetType (dict) –
The asset type included in the rule scope.
selectionMode (string) –
The selection mode for the rule.
specificAssetTypes (list) –
The specific asset types that are included in the rule.
(string) –
dataProduct (boolean) –
The data product included in the rule scope.
project (dict) –
The project included in the rule scope.
selectionMode (string) –
The selection mode of the rule.
specificProjects (list) –
The specific projects in which the rule is created.
(string) –
target (dict) –
The target of the rule.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
domainUnitTarget
. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBER
as the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBER
is as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
domainUnitTarget (dict) –
The ID of the domain unit.
domainUnitId (string) –
The ID of the domain unit.
includeChildDomainUnits (boolean) –
Specifies whether to apply a rule to the child domain units.
targetType (string) –
The target type of the rule.
updatedAt (datetime) –
The timestamp at which the rule was last updated.
nextToken (string) –
When the number of rules is greater than the default value for the
MaxResults
parameter, or if you explicitly specify a value forMaxResults
that is less than the number of rules, the response includes a pagination token namedNextToken
. You can specify thisNextToken
value in a subsequent call toListRules
to list the next set of rules.
Exceptions
DataZone.Client.exceptions.InternalServerException
DataZone.Client.exceptions.ResourceNotFoundException
DataZone.Client.exceptions.AccessDeniedException
DataZone.Client.exceptions.ThrottlingException
DataZone.Client.exceptions.ValidationException
DataZone.Client.exceptions.UnauthorizedException