Skip to content

disassociate_fraudster async

disassociate_fraudster(
    domain_id: DomainId,
    watchlist_id: WatchlistId,
    fraudster_id: FraudsterId,
    *,
    config_overrides: Optional[AsyncVoiceIDClientConfig] = None,
) -> DisassociateFraudsterResponse

Disassociates the fraudsters from the watchlist specified. Voice ID always expects a fraudster to be a part of at least one watchlist. If you try to disassociate a fraudster from its only watchlist, a ValidationException is thrown.

Parameters:

  • domain_id (DomainId) –

    The identifier of the domain that contains the fraudster.

  • watchlist_id (WatchlistId) –

    The identifier of the watchlist that you want to disassociate from the fraudster.

  • fraudster_id (FraudsterId) –

    The identifier of the fraudster to be disassociated from the watchlist.

Raises:

Source code in docs_src/capo_voice_id/_services/async_voice_id.py
async def disassociate_fraudster(
    self,
    domain_id: "capo_voice_id.types.domain_id.DomainId",
    watchlist_id: "capo_voice_id.types.watchlist_id.WatchlistId",
    fraudster_id: "capo_voice_id.types.fraudster_id.FraudsterId",
    *,
    config_overrides: Optional[AsyncVoiceIDClientConfig] = None,
) -> "capo_voice_id.types.disassociate_fraudster_response.DisassociateFraudsterResponse":
    """<p>Disassociates the fraudsters from the watchlist specified. Voice ID always expects a fraudster to be a part of at least one watchlist. If you try to disassociate a fraudster from its only watchlist, a <code>ValidationException</code> is thrown. </p>

    Args:
        domain_id: <p>The identifier of the domain that contains the fraudster.</p>
        watchlist_id: <p>The identifier of the watchlist that you want to disassociate from the fraudster.</p>
        fraudster_id: <p>The identifier of the fraudster to be disassociated from the watchlist.</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.conflict_exception.ConflictException: <p>The request failed due to a conflict. Check the <code>ConflictType</code> and error message for more details.</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.disassociate_fraudster_request.DisassociateFraudsterRequest]",
    ) -> AsyncOperationResponse[
        "capo_voice_id.types.disassociate_fraudster_response.DisassociateFraudsterResponse"
    ]:
        import capo_voice_id._operations.voice_id.disassociate_fraudster

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

    def _redact_input(
        input_: "capo_voice_id.types.disassociate_fraudster_request.DisassociateFraudsterRequest",
    ) -> dict[str, Any]:
        import capo_voice_id.types.disassociate_fraudster_request

        return capo_voice_id.types.disassociate_fraudster_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DisassociateFraudster", redact_input=_redact_input),
    )
    input_: capo_voice_id.types.disassociate_fraudster_request.DisassociateFraudsterRequest = {
        "domain_id": domain_id,
        "watchlist_id": watchlist_id,
        "fraudster_id": fraudster_id,
    }

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