Skip to content

create_workflow_step_group async

create_workflow_step_group(
    workflow_id: MigrationWorkflowId,
    name: StepGroupName,
    *,
    config_overrides: Optional[AsyncMigrationHubOrchestratorClientConfig] = None,
    description: Optional[StepGroupDescription] = None,
    next: Optional[StringList] = None,
    previous: Optional[StringList] = None,
) -> CreateWorkflowStepGroupResponse

Create a step group in a migration workflow.

Parameters:

Raises:

Source code in docs_src/capo_migrationhuborchestrator/_services/async_migration_hub_orchestrator.py
async def create_workflow_step_group(
    self,
    workflow_id: "capo_migrationhuborchestrator.types.migration_workflow_id.MigrationWorkflowId",
    name: "capo_migrationhuborchestrator.types.step_group_name.StepGroupName",
    *,
    config_overrides: Optional[AsyncMigrationHubOrchestratorClientConfig] = None,
    description: Optional[
        "capo_migrationhuborchestrator.types.step_group_description.StepGroupDescription"
    ] = None,
    next: Optional[
        "capo_migrationhuborchestrator.types.string_list.StringList"
    ] = None,
    previous: Optional[
        "capo_migrationhuborchestrator.types.string_list.StringList"
    ] = None,
) -> "capo_migrationhuborchestrator.types.create_workflow_step_group_response.CreateWorkflowStepGroupResponse":
    """<p>Create a step group in a migration workflow.</p>

    Args:
        workflow_id: <p>The ID of the migration workflow that will contain the step group.</p>
        name: <p>The name of the step group.</p>
        description: <p>The description of the step group.</p>
        next: <p>The next step group.</p>
        previous: <p>The previous step group.</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_group_request.CreateWorkflowStepGroupRequest]",
    ) -> AsyncOperationResponse[
        "capo_migrationhuborchestrator.types.create_workflow_step_group_response.CreateWorkflowStepGroupResponse"
    ]:
        import capo_migrationhuborchestrator._operations.aws_migration_hub_orchestrator.create_workflow_step_group

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateWorkflowStepGroup")
    )
    input_: capo_migrationhuborchestrator.types.create_workflow_step_group_request.CreateWorkflowStepGroupRequest = {
        "workflow_id": workflow_id,
        "name": name,
    }
    if description is not None:
        input_["description"] = description
    if next is not None:
        input_["next"] = next
    if previous is not None:
        input_["previous"] = previous

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