protected_queries
Creates, updates, deletes, gets or lists a protected_queries resource.
Overview
| Name | protected_queries |
| Type | Resource |
| Id | aws.cleanrooms.protected_queries |
Fields
The following fields are returned by SELECT queries:
- get_protected_query
- list_protected_queries
| Name | Datatype | Description |
|---|---|---|
id | string | The 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_configuration | object | The compute configuration for the protected query. |
create_time | string (date-time) | The time at which the protected query was created. |
differential_privacy | object | The sensitivity parameters of the differential privacy results of the protected query. |
error | object | An error thrown by the protected query. |
membership_arn | string | The ARN of the membership. (pattern: <code>arn:aws:[\w]+:[\w]{2}-[\w]{4,9}-[\d]:[\d]{12}:membership/[\d\w-]+</code>) |
membership_id | string | The 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_id | string | The account ID of the member that pays for the query compute costs. (pattern: <code>\d+</code>) |
result | object | The result of the protected query. |
result_configuration | object | Contains any details needed to write the query results. |
sql_parameters | object | The protected query SQL parameters. |
statistics | object | Statistics about protected query execution. |
status | string | The status of the query. (SUBMITTED, STARTED, CANCELLED, CANCELLING, FAILED, SUCCESS, TIMED_OUT) |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the protected query. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>) |
create_time | string (date-time) | The time the protected query was created. |
intermediate_table_configuration | object | The intermediate table configuration, present when the protected query was triggered by a populate operation. |
membership_arn | string | The unique ARN for the membership that initiated the protected query. (pattern: <code>arn:aws:[\w]+:[\w]{2}-[\w]{4,9}-[\d]:[\d]{12}:membership/[\d\w-]+</code>) |
membership_id | string | The unique ID for the membership that initiated the protected query. (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_id | string | The account ID of the member that pays for the query compute costs. (pattern: <code>\d+</code>) |
receiver_configurations | array | The receiver configuration. |
status | string | The status of the protected query. (SUBMITTED, STARTED, CANCELLED, CANCELLING, FAILED, SUCCESS, TIMED_OUT) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_protected_query | select | membership_identifier, protected_query_identifier, region | Returns query processing metadata. | |
list_protected_queries | select | membership_identifier, region | status, nextToken, maxResults | Lists protected queries, sorted by the most recent query. |
update_protected_query | update | membership_identifier, protected_query_identifier, region, targetStatus | Updates 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.
| Name | Datatype | Description |
|---|---|---|
membership_identifier | string | The identifier for a member of a protected query instance. |
protected_query_identifier | string | The identifier for a protected query instance. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The 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. |
nextToken | string | The pagination token that's used to fetch the next set of results. |
status | string | A filter on the status of the protected query. |
SELECT examples
- get_protected_query
- list_protected_queries
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
;
Lists protected queries, sorted by the most recent query.
SELECT
id,
create_time,
intermediate_table_configuration,
membership_arn,
membership_id,
query_compute_payer_account_id,
receiver_configurations,
status
FROM aws.cleanrooms.protected_queries
WHERE membership_identifier = '{{ membership_identifier }}' -- required
AND region = '{{ region }}' -- required
AND status = '{{ status }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
UPDATE examples
- update_protected_query
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;