Skip to main content

protected_queries

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

Overview

Nameprotected_queries
TypeResource
Idaws.cleanrooms.protected_queries

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe identifier for a protected query instance. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>)
compute_configurationobjectThe compute configuration for the protected query.
create_timestring (date-time)The time at which the protected query was created.
differential_privacyobjectThe sensitivity parameters of the differential privacy results of the protected query.
errorobjectAn error thrown by the protected query.
membership_arnstringThe ARN of the membership. (pattern: <code>arn:aws:[\w]+:[\w]{2}-[\w]{4,9}-[\d]:[\d]{12}:membership/[\d\w-]+</code>)
membership_idstringThe identifier for the membership. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>)
query_compute_payer_account_idstringThe account ID of the member that pays for the query compute costs. (pattern: <code>\d+</code>)
resultobjectThe result of the protected query.
result_configurationobjectContains any details needed to write the query results.
sql_parametersobjectThe protected query SQL parameters.
statisticsobjectStatistics about protected query execution.
statusstringThe status of the query. (SUBMITTED, STARTED, CANCELLED, CANCELLING, FAILED, SUCCESS, TIMED_OUT)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_protected_queryselectmembership_identifier, protected_query_identifier, regionReturns query processing metadata.
list_protected_queriesselectmembership_identifier, regionstatus, nextToken, maxResultsLists protected queries, sorted by the most recent query.
update_protected_queryupdatemembership_identifier, protected_query_identifier, region, targetStatusUpdates the processing of a currently running query.

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
membership_identifierstringThe identifier for a member of a protected query instance.
protected_query_identifierstringThe identifier for a protected query instance.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a nextToken even if the maxResults value has not been met.
nextTokenstringThe pagination token that's used to fetch the next set of results.
statusstringA filter on the status of the protected query.

SELECT examples

Returns query processing metadata.

SELECT
id,
compute_configuration,
create_time,
differential_privacy,
error,
membership_arn,
membership_id,
query_compute_payer_account_id,
result,
result_configuration,
sql_parameters,
statistics,
status
FROM aws.cleanrooms.protected_queries
WHERE membership_identifier = '{{ membership_identifier }}' -- required
AND protected_query_identifier = '{{ protected_query_identifier }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples

Updates the processing of a currently running query.

UPDATE aws.cleanrooms.protected_queries
SET
targetStatus = '{{ targetStatus }}'
WHERE
membership_identifier = '{{ membership_identifier }}' --required
AND protected_query_identifier = '{{ protected_query_identifier }}' --required
AND region = '{{ region }}' --required
AND targetStatus = '{{ targetStatus }}' --required
RETURNING
protected_query;