startProtectedQuery method
Creates a protected query that is started by Clean Rooms.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter membershipIdentifier :
A unique identifier for the membership to run this query against.
Currently accepts a membership ID.
Parameter sqlParameters :
The protected SQL query parameters.
Parameter type :
The type of the protected query to be started.
Parameter computeConfiguration :
The compute configuration for the protected query.
Parameter queryComputePayerAccountId :
The account ID of the member that pays for the query compute costs.
Parameter resultConfiguration :
The details needed to write the query results.
Implementation
Future<StartProtectedQueryOutput> startProtectedQuery({
required String membershipIdentifier,
required ProtectedQuerySQLParameters sqlParameters,
required ProtectedQueryType type,
ComputeConfiguration? computeConfiguration,
String? queryComputePayerAccountId,
ProtectedQueryResultConfiguration? resultConfiguration,
}) async {
final $payload = <String, dynamic>{
'sqlParameters': sqlParameters,
'type': type.value,
if (computeConfiguration != null)
'computeConfiguration': computeConfiguration,
if (queryComputePayerAccountId != null)
'queryComputePayerAccountId': queryComputePayerAccountId,
if (resultConfiguration != null)
'resultConfiguration': resultConfiguration,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/memberships/${Uri.encodeComponent(membershipIdentifier)}/protectedQueries',
exceptionFnMap: _exceptionFns,
);
return StartProtectedQueryOutput.fromJson(response);
}