Skip to content

list_speaker_enrollment_jobs async

list_speaker_enrollment_jobs(
    domain_id: DomainId,
    *,
    config_overrides: Optional[AsyncVoiceIDClientConfig] = None,
    job_status: Optional[SpeakerEnrollmentJobStatus] = None,
    max_results: Optional[MaxResultsForList] = None,
    next_token: Optional[NextToken] = None,
) -> ListSpeakerEnrollmentJobsResponse

Lists all the speaker enrollment jobs in the domain with the specified JobStatus. If JobStatus is not provided, this lists all jobs with all possible speaker enrollment job statuses.

Parameters:

  • domain_id (DomainId) –

    The identifier of the domain that contains the speaker enrollment jobs.

  • job_status (Optional[SpeakerEnrollmentJobStatus], default: None ) –

    Provides the status of your speaker enrollment Job.

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

    The maximum number of results that are returned per call. You can use NextToken to obtain more pages of results. The default is 100; the maximum allowed page size is also 100.

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

    If NextToken is returned, there are more results available. The value of NextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours.

Raises:

Source code in docs_src/capo_voice_id/_services/async_voice_id.py
async def list_speaker_enrollment_jobs(
    self,
    domain_id: "capo_voice_id.types.domain_id.DomainId",
    *,
    config_overrides: Optional[AsyncVoiceIDClientConfig] = None,
    job_status: Optional[
        "capo_voice_id.types.speaker_enrollment_job_status.SpeakerEnrollmentJobStatus"
    ] = None,
    max_results: Optional[
        "capo_voice_id.types.max_results_for_list.MaxResultsForList"
    ] = None,
    next_token: Optional["capo_voice_id.types.next_token.NextToken"] = None,
) -> "capo_voice_id.types.list_speaker_enrollment_jobs_response.ListSpeakerEnrollmentJobsResponse":
    """<p>Lists all the speaker enrollment jobs in the domain with the specified <code>JobStatus</code>. If <code>JobStatus</code> is not provided, this lists all jobs with all possible speaker enrollment job statuses.</p>

    Args:
        domain_id: <p>The identifier of the domain that contains the speaker enrollment jobs.</p>
        job_status: <p>Provides the status of your speaker enrollment Job.</p>
        max_results: <p>The maximum number of results that are returned per call. You can use <code>NextToken</code> to obtain more pages of results. The default is 100; the maximum allowed page size is also 100.</p>
        next_token: <p>If <code>NextToken</code> is returned, there are more results available. The value of <code>NextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours.</p>

    Raises:
        capo_voice_id.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action. Check the error message and try again.</p>
        capo_voice_id.errors.internal_server_exception.InternalServerException: <p>The request failed due to an unknown error on the server side.</p>
        capo_voice_id.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found. Check the <code>ResourceType</code> and error message for more details.</p>
        capo_voice_id.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Please slow down your request rate. Refer to <a href="https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html##voiceid-api-quotas"> Amazon Connect Voice ID Service API throttling quotas </a> and try your request again.</p>
        capo_voice_id.errors.validation_exception.ValidationException: <p>The request failed one or more validations; check the error message for more details.</p>
        capo_voice_id.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_voice_id.types.list_speaker_enrollment_jobs_request.ListSpeakerEnrollmentJobsRequest]",
    ) -> AsyncOperationResponse[
        "capo_voice_id.types.list_speaker_enrollment_jobs_response.ListSpeakerEnrollmentJobsResponse"
    ]:
        import capo_voice_id._operations.voice_id.list_speaker_enrollment_jobs

        (
            output,
            http_response,
        ) = await capo_voice_id._operations.voice_id.list_speaker_enrollment_jobs.async_list_speaker_enrollment_jobs(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_voice_id.types.list_speaker_enrollment_jobs_response.ListSpeakerEnrollmentJobsResponse",
    ) -> dict[str, Any]:
        import capo_voice_id.types.list_speaker_enrollment_jobs_response

        return capo_voice_id.types.list_speaker_enrollment_jobs_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListSpeakerEnrollmentJobs", redact_output=_redact_output),
    )
    input_: capo_voice_id.types.list_speaker_enrollment_jobs_request.ListSpeakerEnrollmentJobsRequest = {
        "domain_id": domain_id
    }
    if job_status is not None:
        input_["job_status"] = job_status
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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