startExperiment method
Starts running an experiment from the specified experiment template.
May throw ConflictException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ValidationException.
Parameter experimentTemplateId :
The ID of the experiment template.
Parameter clientToken :
Unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
Parameter experimentOptions :
The experiment options for running the experiment.
Parameter tags :
The tags to apply to the experiment.
Implementation
Future<StartExperimentResponse> startExperiment({
required String experimentTemplateId,
String? clientToken,
StartExperimentExperimentOptionsInput? experimentOptions,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'experimentTemplateId': experimentTemplateId,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (experimentOptions != null) 'experimentOptions': experimentOptions,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/experiments',
exceptionFnMap: _exceptionFns,
);
return StartExperimentResponse.fromJson(response);
}