createWorkflowStep method

Future<CreateWorkflowStepResponse> createWorkflowStep({
  1. required String name,
  2. required StepActionType stepActionType,
  3. required String stepGroupId,
  4. required String workflowId,
  5. String? description,
  6. List<String>? next,
  7. List<WorkflowStepOutput>? outputs,
  8. List<String>? previous,
  9. List<String>? stepTarget,
  10. WorkflowStepAutomationConfiguration? workflowStepAutomationConfiguration,
})

Create a step in the migration workflow.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter name : The name of the step.

Parameter stepActionType : The action type of the step. You must run and update the status of a manual step for the workflow to continue after the completion of the step.

Parameter stepGroupId : The ID of the step group.

Parameter workflowId : The ID of the migration workflow.

Parameter description : The description of the step.

Parameter next : The next step.

Parameter outputs : The key value pairs added for the expected output.

Parameter previous : The previous step.

Parameter stepTarget : The servers on which a step will be run.

Parameter workflowStepAutomationConfiguration : The custom script to run tests on source or target environments.

Implementation

Future<CreateWorkflowStepResponse> createWorkflowStep({
  required String name,
  required StepActionType stepActionType,
  required String stepGroupId,
  required String workflowId,
  String? description,
  List<String>? next,
  List<WorkflowStepOutput>? outputs,
  List<String>? previous,
  List<String>? stepTarget,
  WorkflowStepAutomationConfiguration? workflowStepAutomationConfiguration,
}) async {
  final $payload = <String, dynamic>{
    'name': name,
    'stepActionType': stepActionType.value,
    'stepGroupId': stepGroupId,
    'workflowId': workflowId,
    if (description != null) 'description': description,
    if (next != null) 'next': next,
    if (outputs != null) 'outputs': outputs,
    if (previous != null) 'previous': previous,
    if (stepTarget != null) 'stepTarget': stepTarget,
    if (workflowStepAutomationConfiguration != null)
      'workflowStepAutomationConfiguration':
          workflowStepAutomationConfiguration,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/workflowstep',
    exceptionFnMap: _exceptionFns,
  );
  return CreateWorkflowStepResponse.fromJson(response);
}