startProtectedJob method
Creates a protected job 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 jobParameters :
The job parameters.
Parameter membershipIdentifier :
A unique identifier for the membership to run this job against. Currently
accepts a membership ID.
Parameter type :
The type of protected job to start.
Parameter computeConfiguration :
The compute configuration for the protected job.
Parameter jobComputePayerAccountId :
The account ID of the member that pays for the job compute costs.
Parameter resultConfiguration :
The details needed to write the job results.
Implementation
Future<StartProtectedJobOutput> startProtectedJob({
required ProtectedJobParameters jobParameters,
required String membershipIdentifier,
required ProtectedJobType type,
ProtectedJobComputeConfiguration? computeConfiguration,
String? jobComputePayerAccountId,
ProtectedJobResultConfigurationInput? resultConfiguration,
}) async {
final $payload = <String, dynamic>{
'jobParameters': jobParameters,
'type': type.value,
if (computeConfiguration != null)
'computeConfiguration': computeConfiguration,
if (jobComputePayerAccountId != null)
'jobComputePayerAccountId': jobComputePayerAccountId,
if (resultConfiguration != null)
'resultConfiguration': resultConfiguration,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/memberships/${Uri.encodeComponent(membershipIdentifier)}/protectedJobs',
exceptionFnMap: _exceptionFns,
);
return StartProtectedJobOutput.fromJson(response);
}