updateExperimentTemplate method

Future<UpdateExperimentTemplateResponse> updateExperimentTemplate({
  1. required String id,
  2. Map<String, UpdateExperimentTemplateActionInputItem>? actions,
  3. String? description,
  4. UpdateExperimentTemplateExperimentOptionsInput? experimentOptions,
  5. UpdateExperimentTemplateReportConfigurationInput? experimentReportConfiguration,
  6. UpdateExperimentTemplateLogConfigurationInput? logConfiguration,
  7. String? roleArn,
  8. List<UpdateExperimentTemplateStopConditionInput>? stopConditions,
  9. Map<String, UpdateExperimentTemplateTargetInput>? targets,
})

Updates the specified experiment template.

May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ValidationException.

Parameter id : The ID of the experiment template.

Parameter actions : The actions for the experiment.

Parameter description : A description for the template.

Parameter experimentOptions : The experiment options for the experiment template.

Parameter experimentReportConfiguration : The experiment report configuration for the experiment template.

Parameter logConfiguration : The configuration for experiment logging.

Parameter roleArn : The Amazon Resource Name (ARN) of an IAM role that grants the FIS service permission to perform service actions on your behalf.

Parameter stopConditions : The stop conditions for the experiment.

Parameter targets : The targets for the experiment.

Implementation

Future<UpdateExperimentTemplateResponse> updateExperimentTemplate({
  required String id,
  Map<String, UpdateExperimentTemplateActionInputItem>? actions,
  String? description,
  UpdateExperimentTemplateExperimentOptionsInput? experimentOptions,
  UpdateExperimentTemplateReportConfigurationInput?
      experimentReportConfiguration,
  UpdateExperimentTemplateLogConfigurationInput? logConfiguration,
  String? roleArn,
  List<UpdateExperimentTemplateStopConditionInput>? stopConditions,
  Map<String, UpdateExperimentTemplateTargetInput>? targets,
}) async {
  final $payload = <String, dynamic>{
    if (actions != null) 'actions': actions,
    if (description != null) 'description': description,
    if (experimentOptions != null) 'experimentOptions': experimentOptions,
    if (experimentReportConfiguration != null)
      'experimentReportConfiguration': experimentReportConfiguration,
    if (logConfiguration != null) 'logConfiguration': logConfiguration,
    if (roleArn != null) 'roleArn': roleArn,
    if (stopConditions != null) 'stopConditions': stopConditions,
    if (targets != null) 'targets': targets,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/experimentTemplates/${Uri.encodeComponent(id)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateExperimentTemplateResponse.fromJson(response);
}