updateTest method

Future<UpdateTestResponse> updateTest({
  1. required String serviceArn,
  2. required String testId,
  3. LoggingConfiguration? loggingConfiguration,
  4. Map<String, List<String>>? parameters,
  5. String? roleName,
  6. List<StopCondition>? stopConditions,
})

Updates the configuration of an existing test.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter serviceArn : The ARN of the service the test belongs to.

Parameter testId : The identifier of the test to update.

Parameter loggingConfiguration : The updated logging configuration for the test.

Parameter parameters : The updated parameter values for the test.

Parameter roleName : The updated IAM execution role name.

Parameter stopConditions : The updated stop conditions for the test.

Implementation

Future<UpdateTestResponse> updateTest({
  required String serviceArn,
  required String testId,
  LoggingConfiguration? loggingConfiguration,
  Map<String, List<String>>? parameters,
  String? roleName,
  List<StopCondition>? stopConditions,
}) async {
  final $payload = <String, dynamic>{
    'serviceArn': serviceArn,
    'testId': testId,
    if (loggingConfiguration != null)
      'loggingConfiguration': loggingConfiguration,
    if (parameters != null) 'parameters': parameters,
    if (roleName != null) 'roleName': roleName,
    if (stopConditions != null) 'stopConditions': stopConditions,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v2/update-test',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateTestResponse.fromJson(response);
}