asset_filters
Creates, updates, deletes, gets or lists an asset_filters resource.
Overview
| Name | asset_filters |
| Type | Resource |
| Id | aws.datazone.asset_filters |
Fields
The following fields are returned by SELECT queries:
- get_asset_filter
- list_asset_filters
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the asset filter. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
name | string | The name of the asset filter. (pattern: <code>[\w -]+</code>) |
asset_id | string | The ID of the data asset. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
configuration | object | The configuration of the asset filter. |
created_at | string (date-time) | The timestamp at which the asset filter was created. |
description | string | The description of the asset filter. |
domain_id | string | The ID of the domain where you want to get an asset filter. (pattern: <code>dzd[-][a-zA-Z0-9-]{1,36}</code>) |
effective_column_names | array | The column names of the asset filter. |
effective_row_filter | string | The row filter of the asset filter. |
error_message | string | The error message that is displayed if the action does not complete successfully. |
status | string | The status of the asset filter. (VALID, INVALID) |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the asset filter. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
name | string | The name of the asset filter. (pattern: <code>[\w -]+</code>) |
asset_id | string | The ID of the data asset. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>) |
created_at | string (date-time) | The timestamp at which the asset filter was created. |
description | string | The description of the asset filter. |
domain_id | string | The ID of the domain where the asset filter lives. (pattern: <code>dzd[-][a-zA-Z0-9-]{1,36}</code>) |
effective_column_names | array | The effective column names of the asset filter. |
effective_row_filter | string | The effective row filter of the asset filter. |
error_message | string | The error message that is displayed if the action does not succeed. |
status | string | The status of the asset filter. (VALID, INVALID) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_asset_filter | select | domain_identifier, asset_identifier, identifier, region | Gets an asset filter. Prerequisites: Domain (--domain-identifier), asset (--asset-identifier), and filter (--identifier) must all exist. The asset filter should not have been deleted. The asset must still exist (since the filter is linked to it). | |
list_asset_filters | select | domain_identifier, asset_identifier, region | status, nextToken, maxResults | Lists asset filters. Prerequisites: A valid domain and asset must exist. The asset must have at least one filter created to return results. |
create_asset_filter | insert | domain_identifier, asset_identifier, region, name, configuration | Creates a data asset filter. Asset filters provide a sophisticated way to create controlled views of data assets by selecting specific columns or applying row-level filters. This capability is crucial for organizations that need to share data while maintaining security and privacy controls. For example, your database might be filtered to show only non-PII fields to certain users, or sales data might be filtered by region for different regional teams. Asset filters enable fine-grained access control while maintaining a single source of truth. Prerequisites: A valid domain (--domain-identifier) must exist. A data asset (--asset-identifier) must already be created under that domain. The asset must have the referenced columns available in its schema for column-based filtering. You cannot specify both (columnConfiguration, rowConfiguration)at the same time. | |
update_asset_filter | update | domain_identifier, asset_identifier, identifier, region | Updates an asset filter. Prerequisites: The domain, asset, and asset filter identifier must all exist. The asset must contain the columns being referenced in the update. If applying a row filter, ensure the column referenced in the expression exists in the asset schema. | |
delete_asset_filter | delete | domain_identifier, asset_identifier, identifier, region | Deletes an asset filter. Prerequisites: The asset filter must exist. The domain and asset must not have been deleted. Ensure the --identifier refers to a valid filter ID. |
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 |
|---|---|---|
asset_identifier | string | The ID of the data asset. |
domain_identifier | string | The ID of the domain where you want to delete an asset filter. |
identifier | string | The ID of the asset filter that you want to delete. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of asset filters to return in a single call to ListAssetFilters. When the number of asset filters 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 ListAssetFilters to list the next set of asset filters. |
nextToken | string | When the number of asset filters 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 asset filters, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListAssetFilters to list the next set of asset filters. |
status | string | The status of the asset filter. |
SELECT examples
- get_asset_filter
- list_asset_filters
Gets an asset filter. Prerequisites: Domain (--domain-identifier), asset (--asset-identifier), and filter (--identifier) must all exist. The asset filter should not have been deleted. The asset must still exist (since the filter is linked to it).
SELECT
id,
name,
asset_id,
configuration,
created_at,
description,
domain_id,
effective_column_names,
effective_row_filter,
error_message,
status
FROM aws.datazone.asset_filters
WHERE domain_identifier = '{{ domain_identifier }}' -- required
AND asset_identifier = '{{ asset_identifier }}' -- required
AND identifier = '{{ identifier }}' -- required
AND region = '{{ region }}' -- required
;
Lists asset filters. Prerequisites: A valid domain and asset must exist. The asset must have at least one filter created to return results.
SELECT
id,
name,
asset_id,
created_at,
description,
domain_id,
effective_column_names,
effective_row_filter,
error_message,
status
FROM aws.datazone.asset_filters
WHERE domain_identifier = '{{ domain_identifier }}' -- required
AND asset_identifier = '{{ asset_identifier }}' -- required
AND region = '{{ region }}' -- required
AND status = '{{ status }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_asset_filter
- Manifest
Creates a data asset filter. Asset filters provide a sophisticated way to create controlled views of data assets by selecting specific columns or applying row-level filters. This capability is crucial for organizations that need to share data while maintaining security and privacy controls. For example, your database might be filtered to show only non-PII fields to certain users, or sales data might be filtered by region for different regional teams. Asset filters enable fine-grained access control while maintaining a single source of truth. Prerequisites: A valid domain (--domain-identifier) must exist. A data asset (--asset-identifier) must already be created under that domain. The asset must have the referenced columns available in its schema for column-based filtering. You cannot specify both (columnConfiguration, rowConfiguration)at the same time.
INSERT INTO aws.datazone.asset_filters (
name,
description,
configuration,
clientToken,
domain_identifier,
asset_identifier,
region
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ configuration }}' /* required */,
'{{ clientToken }}',
'{{ domain_identifier }}',
'{{ asset_identifier }}',
'{{ region }}'
RETURNING
id,
name,
asset_id,
configuration,
created_at,
description,
domain_id,
effective_column_names,
effective_row_filter,
error_message,
status
;
# Description fields are for documentation purposes
- name: asset_filters
props:
- name: domain_identifier
value: "{{ domain_identifier }}"
description: Required parameter for the asset_filters resource.
- name: asset_identifier
value: "{{ asset_identifier }}"
description: Required parameter for the asset_filters resource.
- name: region
value: "{{ region }}"
description: Required parameter for the asset_filters resource.
- name: name
value: "{{ name }}"
- name: description
value: "{{ description }}"
- name: configuration
description: |
The configuration details of the asset filter.
value:
columnConfiguration:
includedColumnNames:
- "{{ includedColumnNames }}"
rowConfiguration:
rowFilter:
expression:
equalTo:
columnName: "{{ columnName }}"
value: "{{ value }}"
notEqualTo:
columnName: "{{ columnName }}"
value: "{{ value }}"
greaterThan:
columnName: "{{ columnName }}"
value: "{{ value }}"
lessThan:
columnName: "{{ columnName }}"
value: "{{ value }}"
greaterThanOrEqualTo:
columnName: "{{ columnName }}"
value: "{{ value }}"
lessThanOrEqualTo:
columnName: "{{ columnName }}"
value: "{{ value }}"
isNull:
columnName: "{{ columnName }}"
isNotNull:
columnName: "{{ columnName }}"
in:
columnName: "{{ columnName }}"
values: "{{ values }}"
notIn:
columnName: "{{ columnName }}"
values: "{{ values }}"
like:
columnName: "{{ columnName }}"
value: "{{ value }}"
notLike:
columnName: "{{ columnName }}"
value: "{{ value }}"
and:
- expression:
equalTo: "{{ equalTo }}"
notEqualTo: "{{ notEqualTo }}"
greaterThan: "{{ greaterThan }}"
lessThan: "{{ lessThan }}"
greaterThanOrEqualTo: "{{ greaterThanOrEqualTo }}"
lessThanOrEqualTo: "{{ lessThanOrEqualTo }}"
isNull: "{{ isNull }}"
isNotNull: "{{ isNotNull }}"
in: "{{ in }}"
notIn: "{{ notIn }}"
like: "{{ like }}"
notLike: "{{ notLike }}"
and: "{{ and }}"
or: "{{ or }}"
or:
- expression:
equalTo: "{{ equalTo }}"
notEqualTo: "{{ notEqualTo }}"
greaterThan: "{{ greaterThan }}"
lessThan: "{{ lessThan }}"
greaterThanOrEqualTo: "{{ greaterThanOrEqualTo }}"
lessThanOrEqualTo: "{{ lessThanOrEqualTo }}"
isNull: "{{ isNull }}"
isNotNull: "{{ isNotNull }}"
in: "{{ in }}"
notIn: "{{ notIn }}"
like: "{{ like }}"
notLike: "{{ notLike }}"
and: "{{ and }}"
or: "{{ or }}"
sensitive: {{ sensitive }}
- name: clientToken
value: "{{ clientToken }}"
UPDATE examples
- update_asset_filter
Updates an asset filter. Prerequisites: The domain, asset, and asset filter identifier must all exist. The asset must contain the columns being referenced in the update. If applying a row filter, ensure the column referenced in the expression exists in the asset schema.
UPDATE aws.datazone.asset_filters
SET
name = '{{ name }}',
description = '{{ description }}',
configuration = '{{ configuration }}'
WHERE
domain_identifier = '{{ domain_identifier }}' --required
AND asset_identifier = '{{ asset_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
RETURNING
id,
name,
asset_id,
configuration,
created_at,
description,
domain_id,
effective_column_names,
effective_row_filter,
error_message,
status;
DELETE examples
- delete_asset_filter
Deletes an asset filter. Prerequisites: The asset filter must exist. The domain and asset must not have been deleted. Ensure the --identifier refers to a valid filter ID.
DELETE FROM aws.datazone.asset_filters
WHERE domain_identifier = '{{ domain_identifier }}' --required
AND asset_identifier = '{{ asset_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
;