createWorkflow method

Future<CreateMigrationWorkflowResponse> createWorkflow({
  1. required Map<String, StepInput> inputParameters,
  2. required String name,
  3. required String templateId,
  4. String? applicationConfigurationId,
  5. String? description,
  6. List<String>? stepTargets,
  7. Map<String, String>? tags,
})

Create a workflow to orchestrate your migrations.

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

Parameter inputParameters : The input parameters required to create a migration workflow.

Parameter name : The name of the migration workflow.

Parameter templateId : The ID of the template.

Parameter applicationConfigurationId : The configuration ID of the application configured in Application Discovery Service.

Parameter description : The description of the migration workflow.

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

Parameter tags : The tags to add on a migration workflow.

Implementation

Future<CreateMigrationWorkflowResponse> createWorkflow({
  required Map<String, StepInput> inputParameters,
  required String name,
  required String templateId,
  String? applicationConfigurationId,
  String? description,
  List<String>? stepTargets,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'inputParameters': inputParameters,
    'name': name,
    'templateId': templateId,
    if (applicationConfigurationId != null)
      'applicationConfigurationId': applicationConfigurationId,
    if (description != null) 'description': description,
    if (stepTargets != null) 'stepTargets': stepTargets,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/migrationworkflow/',
    exceptionFnMap: _exceptionFns,
  );
  return CreateMigrationWorkflowResponse.fromJson(response);
}