Skip to content

list_workflows

list_workflows(
    *,
    config_overrides: Optional[MigrationHubOrchestratorClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
    template_id: Optional[TemplateId] = None,
    ads_application_configuration_name: Optional[ApplicationConfigurationName] = None,
    status: Optional[MigrationWorkflowStatusEnum] = None,
    name: Optional[str] = None,
) -> ListMigrationWorkflowsResponse

List the migration workflows.

Parameters:

Raises:

Source code in docs_src/capo_migrationhuborchestrator/_services/migration_hub_orchestrator.py
def list_workflows(
    self,
    *,
    config_overrides: Optional[MigrationHubOrchestratorClientConfig] = None,
    max_results: Optional[
        "capo_migrationhuborchestrator.types.max_results.MaxResults"
    ] = None,
    next_token: Optional[
        "capo_migrationhuborchestrator.types.next_token.NextToken"
    ] = None,
    template_id: Optional[
        "capo_migrationhuborchestrator.types.template_id.TemplateId"
    ] = None,
    ads_application_configuration_name: Optional[
        "capo_migrationhuborchestrator.types.application_configuration_name.ApplicationConfigurationName"
    ] = None,
    status: Optional[
        "capo_migrationhuborchestrator.types.migration_workflow_status_enum.MigrationWorkflowStatusEnum"
    ] = None,
    name: Optional[str] = None,
) -> "capo_migrationhuborchestrator.types.list_migration_workflows_response.ListMigrationWorkflowsResponse":
    """<p>List the migration workflows.</p>

    Args:
        max_results: <p>The maximum number of results that can be returned.</p>
        next_token: <p>The pagination token.</p>
        template_id: <p>The ID of the template.</p>
        ads_application_configuration_name: <p>The name of the application configured in Application Discovery Service.</p>
        status: <p>The status of the migration workflow.</p>
        name: <p>The name of the migration workflow.</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.resource_not_found_exception.ResourceNotFoundException: <p>The resource is not available.</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.list_migration_workflows_request.ListMigrationWorkflowsRequest]",
    ) -> OperationResponse[
        "capo_migrationhuborchestrator.types.list_migration_workflows_response.ListMigrationWorkflowsResponse"
    ]:
        import capo_migrationhuborchestrator._operations.aws_migration_hub_orchestrator.list_workflows

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListWorkflows")
    )
    input_: capo_migrationhuborchestrator.types.list_migration_workflows_request.ListMigrationWorkflowsRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if template_id is not None:
        input_["template_id"] = template_id
    if ads_application_configuration_name is not None:
        input_["ads_application_configuration_name"] = (
            ads_application_configuration_name
        )
    if status is not None:
        input_["status"] = status
    if name is not None:
        input_["name"] = name

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