CleanRoomsService / Client / start_protected_query
start_protected_query#
- CleanRoomsService.Client.start_protected_query(**kwargs)#
Creates a protected query that is started by Clean Rooms .
See also: AWS API Documentation
Request Syntax
response = client.start_protected_query( type='SQL', membershipIdentifier='string', sqlParameters={ 'queryString': 'string' }, resultConfiguration={ 'outputConfiguration': { 's3': { 'resultFormat': 'CSV'|'PARQUET', 'bucket': 'string', 'keyPrefix': 'string' } } } )
- Parameters:
type (string) –
[REQUIRED]
The type of the protected query to be started.
membershipIdentifier (string) –
[REQUIRED]
A unique identifier for the membership to run this query against. Currently accepts a membership ID.
sqlParameters (dict) –
[REQUIRED]
The protected SQL query parameters.
queryString (string) –
The query string to be submitted.
resultConfiguration (dict) –
[REQUIRED]
The details needed to write the query results.
outputConfiguration (dict) – [REQUIRED]
Configuration for protected query results.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
s3
.s3 (dict) –
Required configuration for a protected query with an S3 output type.
resultFormat (string) – [REQUIRED]
Intended file format of the result.
bucket (string) – [REQUIRED]
The S3 bucket to unload the protected query results.
keyPrefix (string) –
The S3 prefix to unload the protected query results.
- Return type:
dict
- Returns:
Response Syntax
{ 'protectedQuery': { 'id': 'string', 'membershipId': 'string', 'membershipArn': 'string', 'createTime': datetime(2015, 1, 1), 'sqlParameters': { 'queryString': 'string' }, 'status': 'SUBMITTED'|'STARTED'|'CANCELLED'|'CANCELLING'|'FAILED'|'SUCCESS'|'TIMED_OUT', 'resultConfiguration': { 'outputConfiguration': { 's3': { 'resultFormat': 'CSV'|'PARQUET', 'bucket': 'string', 'keyPrefix': 'string' } } }, 'statistics': { 'totalDurationInMillis': 123 }, 'result': { 'output': { 's3': { 'location': 'string' } } }, 'error': { 'message': 'string', 'code': 'string' } } }
Response Structure
(dict) –
protectedQuery (dict) –
The protected query.
id (string) –
The identifier for a protected query instance.
membershipId (string) –
The identifier for the membership.
membershipArn (string) –
The ARN of the membership.
createTime (datetime) –
The time at which the protected query was created.
sqlParameters (dict) –
The protected query SQL parameters.
queryString (string) –
The query string to be submitted.
status (string) –
The status of the query.
resultConfiguration (dict) –
Contains any details needed to write the query results.
outputConfiguration (dict) –
Configuration for protected query results.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
s3
. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBER
as the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBER
is as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
s3 (dict) –
Required configuration for a protected query with an S3 output type.
resultFormat (string) –
Intended file format of the result.
bucket (string) –
The S3 bucket to unload the protected query results.
keyPrefix (string) –
The S3 prefix to unload the protected query results.
statistics (dict) –
Statistics about protected query execution.
totalDurationInMillis (integer) –
The duration of the Protected Query, from creation until query completion.
result (dict) –
The result of the protected query.
output (dict) –
The output of the protected query.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
s3
. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBER
as the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBER
is as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
s3 (dict) –
If present, the output for a protected query with an S3 output type.
location (string) –
The S3 location of the result.
error (dict) –
An error thrown by the protected query.
message (string) –
A description of why the query failed.
code (string) –
An error code for the error.
Exceptions
CleanRoomsService.Client.exceptions.ServiceQuotaExceededException
CleanRoomsService.Client.exceptions.ResourceNotFoundException
CleanRoomsService.Client.exceptions.InternalServerException
CleanRoomsService.Client.exceptions.ValidationException
CleanRoomsService.Client.exceptions.ThrottlingException
CleanRoomsService.Client.exceptions.AccessDeniedException