Skip to content

get_segment_import_jobs async

get_segment_import_jobs(
    application_id: __string,
    segment_id: __string,
    *,
    config_overrides: Optional[AsyncPinpointClientConfig] = None,
    page_size: Optional[__string] = None,
    token: Optional[__string] = None,
) -> GetSegmentImportJobsResponse

Retrieves information about the status and settings of the import jobs for a segment.

Parameters:

  • application_id (__string) –

    The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console.

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

    The maximum number of items to include in each page of a paginated response. This parameter is not supported for application, campaign, and journey metrics.

  • segment_id (__string) –

    The unique identifier for the segment.

  • token (Optional[__string], default: None ) –

    The NextToken string that specifies which page of results to return in a paginated response.

Raises:

Source code in docs_src/capo_pinpoint/_services/async_pinpoint.py
async def get_segment_import_jobs(
    self,
    application_id: "capo_pinpoint.types.__string.__string",
    segment_id: "capo_pinpoint.types.__string.__string",
    *,
    config_overrides: Optional[AsyncPinpointClientConfig] = None,
    page_size: Optional["capo_pinpoint.types.__string.__string"] = None,
    token: Optional["capo_pinpoint.types.__string.__string"] = None,
) -> "capo_pinpoint.types.get_segment_import_jobs_response.GetSegmentImportJobsResponse":
    """<p>Retrieves information about the status and settings of the import jobs for a segment.</p>

    Args:
        application_id: <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
        page_size: <p>The maximum number of items to include in each page of a paginated response. This parameter is not supported for application, campaign, and journey metrics.</p>
        segment_id: <p>The unique identifier for the segment.</p>
        token: <p>The NextToken string that specifies which page of results to return in a paginated response.</p>

    Raises:
        capo_pinpoint.errors.bad_request_exception.BadRequestException: <p>Provides information about an API request or response.</p>
        capo_pinpoint.errors.forbidden_exception.ForbiddenException: <p>Provides information about an API request or response.</p>
        capo_pinpoint.errors.internal_server_error_exception.InternalServerErrorException: <p>Provides information about an API request or response.</p>
        capo_pinpoint.errors.method_not_allowed_exception.MethodNotAllowedException: <p>Provides information about an API request or response.</p>
        capo_pinpoint.errors.not_found_exception.NotFoundException: <p>Provides information about an API request or response.</p>
        capo_pinpoint.errors.payload_too_large_exception.PayloadTooLargeException: <p>Provides information about an API request or response.</p>
        capo_pinpoint.errors.too_many_requests_exception.TooManyRequestsException: <p>Provides information about an API request or response.</p>
        capo_pinpoint.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_pinpoint.types.get_segment_import_jobs_request.GetSegmentImportJobsRequest]",
    ) -> AsyncOperationResponse[
        "capo_pinpoint.types.get_segment_import_jobs_response.GetSegmentImportJobsResponse"
    ]:
        import capo_pinpoint._operations.pinpoint.get_segment_import_jobs

        (
            output,
            http_response,
        ) = await capo_pinpoint._operations.pinpoint.get_segment_import_jobs.async_get_segment_import_jobs(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetSegmentImportJobs")
    )
    input_: capo_pinpoint.types.get_segment_import_jobs_request.GetSegmentImportJobsRequest = {
        "application_id": application_id,
        "segment_id": segment_id,
    }
    if page_size is not None:
        input_["page_size"] = page_size
    if token is not None:
        input_["token"] = token

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