Skip to content

update_workflow_step

update_workflow_step(
    id: StepId,
    step_group_id: StepGroupId,
    workflow_id: MigrationWorkflowId,
    *,
    config_overrides: Optional[MigrationHubOrchestratorClientConfig] = None,
    name: Optional[StepName] = None,
    description: Optional[StepDescription] = None,
    step_action_type: Optional[StepActionType] = 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,
    status: Optional[StepStatus] = None,
) -> UpdateWorkflowStepResponse

Update a step in a migration workflow.

Parameters:

Raises:

Source code in docs_src/capo_migrationhuborchestrator/_services/migration_hub_orchestrator.py
def update_workflow_step(
    self,
    id: "capo_migrationhuborchestrator.types.step_id.StepId",
    step_group_id: "capo_migrationhuborchestrator.types.step_group_id.StepGroupId",
    workflow_id: "capo_migrationhuborchestrator.types.migration_workflow_id.MigrationWorkflowId",
    *,
    config_overrides: Optional[MigrationHubOrchestratorClientConfig] = None,
    name: Optional["capo_migrationhuborchestrator.types.step_name.StepName"] = None,
    description: Optional[
        "capo_migrationhuborchestrator.types.step_description.StepDescription"
    ] = None,
    step_action_type: Optional[
        "capo_migrationhuborchestrator.types.step_action_type.StepActionType"
    ] = 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,
    status: Optional[
        "capo_migrationhuborchestrator.types.step_status.StepStatus"
    ] = None,
) -> "capo_migrationhuborchestrator.types.update_workflow_step_response.UpdateWorkflowStepResponse":
    """<p>Update a step in a migration workflow.</p>

    Args:
        id: <p>The ID 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>
        name: <p>The name of the step.</p>
        description: <p>The description of the step.</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>
        workflow_step_automation_configuration: <p>The custom script to run tests on the source and target environments.</p>
        step_target: <p>The servers on which a step will be run.</p>
        outputs: <p>The outputs of a step.</p>
        previous: <p>The previous step.</p>
        next: <p>The next step.</p>
        status: <p>The status of the 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.
    """

    def _handler(
        req: "OperationRequest[capo_migrationhuborchestrator.types.update_workflow_step_request.UpdateWorkflowStepRequest]",
    ) -> OperationResponse[
        "capo_migrationhuborchestrator.types.update_workflow_step_response.UpdateWorkflowStepResponse"
    ]:
        import capo_migrationhuborchestrator._operations.aws_migration_hub_orchestrator.update_workflow_step

        output, http_response = (
            capo_migrationhuborchestrator._operations.aws_migration_hub_orchestrator.update_workflow_step.update_workflow_step(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateWorkflowStep")
    )
    input_: capo_migrationhuborchestrator.types.update_workflow_step_request.UpdateWorkflowStepRequest = {
        "id": id,
        "step_group_id": step_group_id,
        "workflow_id": workflow_id,
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if step_action_type is not None:
        input_["step_action_type"] = step_action_type
    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
    if status is not None:
        input_["status"] = status

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output