Skip to content

update_asset_filter async

update_asset_filter(
    domain_identifier: DomainId,
    asset_identifier: AssetId,
    identifier: FilterId,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    name: Optional[str] = None,
    description: Optional[Description] = None,
    configuration: Optional[AssetFilterConfiguration] = None,
) -> UpdateAssetFilterOutput

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.

Parameters:

  • domain_identifier (DomainId) –

    The ID of the domain where you want to update an asset filter.

  • asset_identifier (AssetId) –

    The ID of the data asset.

  • identifier (FilterId) –

    The ID of the asset filter.

  • name (Optional[str], default: None ) –

    The name of the asset filter.

  • description (Optional[Description], default: None ) –

    The description of the asset filter.

  • configuration (Optional[AssetFilterConfiguration], default: None ) –

    The configuration of the asset filter.

Raises:

Source code in docs_src/capo_datazone/_services/async_data_zone.py
async def update_asset_filter(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    asset_identifier: "capo_datazone.types.asset_id.AssetId",
    identifier: "capo_datazone.types.filter_id.FilterId",
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    name: Optional[str] = None,
    description: Optional["capo_datazone.types.description.Description"] = None,
    configuration: Optional[
        "capo_datazone.types.asset_filter_configuration.AssetFilterConfiguration"
    ] = None,
) -> "capo_datazone.types.update_asset_filter_output.UpdateAssetFilterOutput":
    """<p>Updates an asset filter.</p> <p>Prerequisites:</p> <ul> <li> <p>The domain, asset, and asset filter identifier must all exist. </p> </li> <li> <p>The asset must contain the columns being referenced in the update.</p> </li> <li> <p>If applying a row filter, ensure the column referenced in the expression exists in the asset schema.</p> </li> </ul>

    Args:
        domain_identifier: <p>The ID of the domain where you want to update an asset filter.</p>
        asset_identifier: <p>The ID of the data asset.</p>
        identifier: <p>The ID of the asset filter.</p>
        name: <p>The name of the asset filter.</p>
        description: <p>The description of the asset filter.</p>
        configuration: <p>The configuration of the asset filter.</p>

    Raises:
        capo_datazone.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_datazone.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_datazone.errors.unauthorized_exception.UnauthorizedException: <p>You do not have permission to perform this action.</p>
        capo_datazone.errors.conflict_exception.ConflictException: <p>There is a conflict while performing this action.</p>
        capo_datazone.errors.internal_server_exception.InternalServerException: <p>The request has failed because of an unknown error, exception or failure.</p>
        capo_datazone.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</p>
        capo_datazone.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the Amazon Web Services service.</p>
        capo_datazone.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_datazone.types.update_asset_filter_input.UpdateAssetFilterInput]",
    ) -> AsyncOperationResponse[
        "capo_datazone.types.update_asset_filter_output.UpdateAssetFilterOutput"
    ]:
        import capo_datazone._operations.data_zone.update_asset_filter

        (
            output,
            http_response,
        ) = await capo_datazone._operations.data_zone.update_asset_filter.async_update_asset_filter(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_datazone.types.update_asset_filter_input.UpdateAssetFilterInput",
    ) -> dict[str, Any]:
        import capo_datazone.types.update_asset_filter_input

        return capo_datazone.types.update_asset_filter_input.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_datazone.types.update_asset_filter_output.UpdateAssetFilterOutput",
    ) -> dict[str, Any]:
        import capo_datazone.types.update_asset_filter_output

        return capo_datazone.types.update_asset_filter_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateAssetFilter",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_datazone.types.update_asset_filter_input.UpdateAssetFilterInput = {
        "domain_identifier": domain_identifier,
        "asset_identifier": asset_identifier,
        "identifier": identifier,
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if configuration is not None:
        input_["configuration"] = configuration

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output