Skip to content

list_workflows

list_workflows(
    *,
    config_overrides: Optional[MWAAServerlessClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
) -> ListWorkflowsResponse

Lists all workflows in your account, with optional pagination support. This operation returns summary information for workflows, showing only the most recently created version of each workflow. Amazon Managed Workflows for Apache Airflow Serverless maintains workflow metadata in a highly available, distributed storage system that enables efficient querying and filtering. The service implements proper access controls to ensure you can only view workflows that you have permissions to access, supporting both individual and team-based workflow management scenarios.

Parameters:

  • max_results (Optional[int], default: None ) –

    The maximum number of workflows you want to return in a single response.

  • next_token (Optional[str], default: None ) –

    The pagination token you need to use to retrieve the next set of results. This value is returned from a previous call to ListWorkflows.

Raises:

  • AccessDeniedException –

    You do not have sufficient permission to perform this action.

  • InternalServerException –

    An unexpected server-side error occurred during request processing.

  • OperationTimeoutException –

    The operation timed out.

  • ThrottlingException –

    The request was denied because too many requests were made in a short period, exceeding the service rate limits. Amazon Managed Workflows for Apache Airflow Serverless implements throttling controls to ensure fair resource allocation across all customers in the multi-tenant environment. This helps maintain service stability and performance. If you encounter throttling, implement exponential backoff and retry logic in your applications, or consider distributing your API calls over a longer time period.

  • ValidationException –

    The specified request parameters are invalid, missing, or inconsistent with Amazon Managed Workflows for Apache Airflow Serverless service requirements. This can occur when workflow definitions contain unsupported operators, when required IAM permissions are missing, when S3 locations are inaccessible, or when network configurations are invalid. The service validates workflow definitions, execution roles, and resource configurations to ensure compatibility with the managed Airflow environment and security requirements.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_mwaa_serverless/_services/mwaa_serverless.py
def list_workflows(
    self,
    *,
    config_overrides: Optional[MWAAServerlessClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
) -> "capo_mwaa_serverless.types.list_workflows_response.ListWorkflowsResponse":
    """<p>Lists all workflows in your account, with optional pagination support. This operation returns summary information for workflows, showing only the most recently created version of each workflow. Amazon Managed Workflows for Apache Airflow Serverless maintains workflow metadata in a highly available, distributed storage system that enables efficient querying and filtering. The service implements proper access controls to ensure you can only view workflows that you have permissions to access, supporting both individual and team-based workflow management scenarios.</p>

    Args:
        max_results: <p>The maximum number of workflows you want to return in a single response.</p>
        next_token: <p>The pagination token you need to use to retrieve the next set of results. This value is returned from a previous call to <code>ListWorkflows</code>.</p>

    Raises:
        capo_mwaa_serverless.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permission to perform this action.</p>
        capo_mwaa_serverless.errors.internal_server_exception.InternalServerException: <p>An unexpected server-side error occurred during request processing.</p>
        capo_mwaa_serverless.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_mwaa_serverless.errors.throttling_exception.ThrottlingException: <p>The request was denied because too many requests were made in a short period, exceeding the service rate limits. Amazon Managed Workflows for Apache Airflow Serverless implements throttling controls to ensure fair resource allocation across all customers in the multi-tenant environment. This helps maintain service stability and performance. If you encounter throttling, implement exponential backoff and retry logic in your applications, or consider distributing your API calls over a longer time period.</p>
        capo_mwaa_serverless.errors.validation_exception.ValidationException: <p>The specified request parameters are invalid, missing, or inconsistent with Amazon Managed Workflows for Apache Airflow Serverless service requirements. This can occur when workflow definitions contain unsupported operators, when required IAM permissions are missing, when S3 locations are inaccessible, or when network configurations are invalid. The service validates workflow definitions, execution roles, and resource configurations to ensure compatibility with the managed Airflow environment and security requirements.</p>
        capo_mwaa_serverless.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_mwaa_serverless.types.list_workflows_request.ListWorkflowsRequest]",
    ) -> OperationResponse[
        "capo_mwaa_serverless.types.list_workflows_response.ListWorkflowsResponse"
    ]:
        import capo_mwaa_serverless._operations.amazon_mwaa_serverless.list_workflows

        output, http_response = (
            capo_mwaa_serverless._operations.amazon_mwaa_serverless.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_mwaa_serverless.types.list_workflows_request.ListWorkflowsRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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