Skip to main content

asset_filters

Creates, updates, deletes, gets or lists an asset_filters resource.

Overview

Nameasset_filters
TypeResource
Idaws.datazone.asset_filters

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the asset filter. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>)
namestringThe name of the asset filter. (pattern: <code>[\w -]+</code>)
asset_idstringThe ID of the data asset. (pattern: <code>[a-zA-Z0-9_-]{1,36}</code>)
configurationobjectThe configuration of the asset filter.
created_atstring (date-time)The timestamp at which the asset filter was created.
descriptionstringThe description of the asset filter.
domain_idstringThe ID of the domain where you want to get an asset filter. (pattern: <code>dzd[-][a-zA-Z0-9-]{1,36}</code>)
effective_column_namesarrayThe column names of the asset filter.
effective_row_filterstringThe row filter of the asset filter.
error_messagestringThe error message that is displayed if the action does not complete successfully.
statusstringThe status of the asset filter. (VALID, INVALID)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_asset_filterselectdomain_identifier, asset_identifier, identifier, regionGets 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_filtersselectdomain_identifier, asset_identifier, regionstatus, nextToken, maxResultsLists asset filters. Prerequisites: A valid domain and asset must exist. The asset must have at least one filter created to return results.
create_asset_filterinsertdomain_identifier, asset_identifier, region, name, configurationCreates 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_filterupdatedomain_identifier, asset_identifier, identifier, regionUpdates 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_filterdeletedomain_identifier, asset_identifier, identifier, regionDeletes 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.

NameDatatypeDescription
asset_identifierstringThe ID of the data asset.
domain_identifierstringThe ID of the domain where you want to delete an asset filter.
identifierstringThe ID of the asset filter that you want to delete.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe 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.
nextTokenstringWhen 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.
statusstringThe status of the asset filter.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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
;