Skip to content

list_import_jobs async

list_import_jobs(
    *,
    config_overrides: Optional[AsyncSESv2ClientConfig] = None,
    import_destination_type: Optional[ImportDestinationType] = None,
    next_token: Optional[NextToken] = None,
    page_size: Optional[MaxItems] = None,
) -> ListImportJobsResponse

Lists all of the import jobs.

Parameters:

  • import_destination_type (Optional[ImportDestinationType], default: None ) –

    The destination of the import job, which can be used to list import jobs that have a certain ImportDestinationType.

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

    A string token indicating that there might be additional import jobs available to be listed. Copy this token to a subsequent call to ListImportJobs with the same parameters to retrieve the next page of import jobs.

  • page_size (Optional[MaxItems], default: None ) –

    Maximum number of import jobs to return at once. Use this parameter to paginate results. If additional import jobs exist beyond the specified limit, the NextToken element is sent in the response. Use the NextToken value in subsequent requests to retrieve additional addresses.

Raises:

Source code in docs_src/capo_sesv2/_services/async_se_sv2.py
async def list_import_jobs(
    self,
    *,
    config_overrides: Optional[AsyncSESv2ClientConfig] = None,
    import_destination_type: Optional[
        "capo_sesv2.types.import_destination_type.ImportDestinationType"
    ] = None,
    next_token: Optional["capo_sesv2.types.next_token.NextToken"] = None,
    page_size: Optional["capo_sesv2.types.max_items.MaxItems"] = None,
) -> "capo_sesv2.types.list_import_jobs_response.ListImportJobsResponse":
    """<p>Lists all of the import jobs.</p>

    Args:
        import_destination_type: <p>The destination of the import job, which can be used to list import jobs that have a certain <code>ImportDestinationType</code>.</p>
        next_token: <p>A string token indicating that there might be additional import jobs available to be listed. Copy this token to a subsequent call to <code>ListImportJobs</code> with the same parameters to retrieve the next page of import jobs.</p>
        page_size: <p>Maximum number of import jobs to return at once. Use this parameter to paginate results. If additional import jobs exist beyond the specified limit, the <code>NextToken</code> element is sent in the response. Use the <code>NextToken</code> value in subsequent requests to retrieve additional addresses.</p>

    Raises:
        capo_sesv2.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</p>
        capo_sesv2.errors.too_many_requests_exception.TooManyRequestsException: <p>Too many requests have been made to the operation.</p>
        capo_sesv2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sesv2.types.list_import_jobs_request.ListImportJobsRequest]",
    ) -> AsyncOperationResponse[
        "capo_sesv2.types.list_import_jobs_response.ListImportJobsResponse"
    ]:
        import capo_sesv2._operations.simple_email_service_v2.list_import_jobs

        (
            output,
            http_response,
        ) = await capo_sesv2._operations.simple_email_service_v2.list_import_jobs.async_list_import_jobs(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListImportJobs")
    )
    input_: capo_sesv2.types.list_import_jobs_request.ListImportJobsRequest = {}
    if import_destination_type is not None:
        input_["import_destination_type"] = import_destination_type
    if next_token is not None:
        input_["next_token"] = next_token
    if page_size is not None:
        input_["page_size"] = page_size

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