Skip to content

create_workflow_step async

create_workflow_step(
    name: MigrationWorkflowName,
    step_group_id: StepGroupId,
    workflow_id: MigrationWorkflowId,
    step_action_type: StepActionType,
    *,
    config_overrides: Optional[AsyncMigrationHubOrchestratorClientConfig] = None,
    description: Optional[MigrationWorkflowDescription] = None,
    workflow_step_automation_configuration: Optional[
        WorkflowStepAutomationConfiguration
    ] = None,
    step_target: Optional[StringList] = None,
    outputs: Optional[WorkflowStepOutputList] = None,
    previous: Optional[StringList] = None,
    next: Optional[StringList] = None,
) -> CreateWorkflowStepResponse

Create a step in the migration workflow.

Parameters:

Raises:

Source code in docs_src/capo_migrationhuborchestrator/_services/async_migration_hub_orchestrator.py
async def create_workflow_step(
    self,
    name: "capo_migrationhuborchestrator.types.migration_workflow_name.MigrationWorkflowName",
    step_group_id: "capo_migrationhuborchestrator.types.step_group_id.StepGroupId",
    workflow_id: "capo_migrationhuborchestrator.types.migration_workflow_id.MigrationWorkflowId",
    step_action_type: "capo_migrationhuborchestrator.types.step_action_type.StepActionType",
    *,
    config_overrides: Optional[AsyncMigrationHubOrchestratorClientConfig] = None,
    description: Optional[
        "capo_migrationhuborchestrator.types.migration_workflow_description.MigrationWorkflowDescription"
    ] = None,
    workflow_step_automation_configuration: Optional[
        "capo_migrationhuborchestrator.types.workflow_step_automation_configuration.WorkflowStepAutomationConfiguration"
    ] = None,
    step_target: Optional[
        "capo_migrationhuborchestrator.types.string_list.StringList"
    ] = None,
    outputs: Optional[
        "capo_migrationhuborchestrator.types.workflow_step_output_list.WorkflowStepOutputList"
    ] = None,
    previous: Optional[
        "capo_migrationhuborchestrator.types.string_list.StringList"
    ] = None,
    next: Optional[
        "capo_migrationhuborchestrator.types.string_list.StringList"
    ] = None,
) -> "capo_migrationhuborchestrator.types.create_workflow_step_response.CreateWorkflowStepResponse":
    """<p>Create a step in the migration workflow.</p>

    Args:
        name: <p>The name of the step.</p>
        step_group_id: <p>The ID of the step group.</p>
        workflow_id: <p>The ID of the migration workflow.</p>
        step_action_type: <p>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.</p>
        description: <p>The description of the step.</p>
        workflow_step_automation_configuration: <p>The custom script to run tests on source or target environments.</p>
        step_target: <p>The servers on which a step will be run.</p>
        outputs: <p>The key value pairs added for the expected output.</p>
        previous: <p>The previous step.</p>
        next: <p>The next step.</p>

    Raises:
        capo_migrationhuborchestrator.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_migrationhuborchestrator.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred.</p>
        capo_migrationhuborchestrator.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_migrationhuborchestrator.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service.</p>
        capo_migrationhuborchestrator.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_migrationhuborchestrator.types.create_workflow_step_request.CreateWorkflowStepRequest]",
    ) -> AsyncOperationResponse[
        "capo_migrationhuborchestrator.types.create_workflow_step_response.CreateWorkflowStepResponse"
    ]:
        import capo_migrationhuborchestrator._operations.aws_migration_hub_orchestrator.create_workflow_step

        (
            output,
            http_response,
        ) = await capo_migrationhuborchestrator._operations.aws_migration_hub_orchestrator.create_workflow_step.async_create_workflow_step(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateWorkflowStep")
    )
    input_: capo_migrationhuborchestrator.types.create_workflow_step_request.CreateWorkflowStepRequest = {
        "name": name,
        "step_group_id": step_group_id,
        "workflow_id": workflow_id,
        "step_action_type": step_action_type,
    }
    if description is not None:
        input_["description"] = description
    if workflow_step_automation_configuration is not None:
        input_["workflow_step_automation_configuration"] = (
            workflow_step_automation_configuration
        )
    if step_target is not None:
        input_["step_target"] = step_target
    if outputs is not None:
        input_["outputs"] = outputs
    if previous is not None:
        input_["previous"] = previous
    if next is not None:
        input_["next"] = next

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output