Skip to content

start_fraudster_registration_job

start_fraudster_registration_job(
    domain_id: DomainId,
    data_access_role_arn: IamRoleArn,
    input_data_config: InputDataConfig,
    output_data_config: OutputDataConfig,
    *,
    config_overrides: Optional[VoiceIDClientConfig] = None,
    client_token: Optional[ClientTokenString] = None,
    job_name: Optional[JobName] = None,
    registration_config: Optional[RegistrationConfig] = None,
) -> StartFraudsterRegistrationJobResponse

Starts a new batch fraudster registration job using provided details.

Parameters:

  • client_token (Optional[ClientTokenString], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

  • job_name (Optional[JobName], default: None ) –

    The name of the new fraudster registration job.

  • domain_id (DomainId) –

    The identifier of the domain that contains the fraudster registration job and in which the fraudsters are registered.

  • data_access_role_arn (IamRoleArn) –

    The IAM role Amazon Resource Name (ARN) that grants Voice ID permissions to access customer's buckets to read the input manifest file and write the Job output file. Refer to the Create and edit a fraudster watchlist documentation for the permissions needed in this role.

  • registration_config (Optional[RegistrationConfig], default: None ) –

    The registration config containing details such as the action to take when a duplicate fraudster is detected, and the similarity threshold to use for detecting a duplicate fraudster.

  • input_data_config (InputDataConfig) –

    The input data config containing an S3 URI for the input manifest file that contains the list of fraudster registration requests.

  • output_data_config (OutputDataConfig) –

    The output data config containing the S3 location where Voice ID writes the job output file; you must also include a KMS key ID to encrypt the file.

Raises:

Source code in docs_src/capo_voice_id/_services/voice_id.py
def start_fraudster_registration_job(
    self,
    domain_id: "capo_voice_id.types.domain_id.DomainId",
    data_access_role_arn: "capo_voice_id.types.iam_role_arn.IamRoleArn",
    input_data_config: "capo_voice_id.types.input_data_config.InputDataConfig",
    output_data_config: "capo_voice_id.types.output_data_config.OutputDataConfig",
    *,
    config_overrides: Optional[VoiceIDClientConfig] = None,
    client_token: Optional[
        "capo_voice_id.types.client_token_string.ClientTokenString"
    ] = None,
    job_name: Optional["capo_voice_id.types.job_name.JobName"] = None,
    registration_config: Optional[
        "capo_voice_id.types.registration_config.RegistrationConfig"
    ] = None,
) -> "capo_voice_id.types.start_fraudster_registration_job_response.StartFraudsterRegistrationJobResponse":
    """<p>Starts a new batch fraudster registration job using provided details.</p>

    Args:
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
        job_name: <p>The name of the new fraudster registration job.</p>
        domain_id: <p>The identifier of the domain that contains the fraudster registration job and in which the fraudsters are registered.</p>
        data_access_role_arn: <p>The IAM role Amazon Resource Name (ARN) that grants Voice ID permissions to access customer's buckets to read the input manifest file and write the Job output file. Refer to the <a href="https://docs.aws.amazon.com/connect/latest/adminguide/voiceid-fraudster-watchlist.html">Create and edit a fraudster watchlist</a> documentation for the permissions needed in this role.</p>
        registration_config: <p>The registration config containing details such as the action to take when a duplicate fraudster is detected, and the similarity threshold to use for detecting a duplicate fraudster. </p>
        input_data_config: <p>The input data config containing an S3 URI for the input manifest file that contains the list of fraudster registration requests.</p>
        output_data_config: <p>The output data config containing the S3 location where Voice ID writes the job output file; you must also include a KMS key ID to encrypt the file.</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.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request exceeded the service quota. Refer to <a href="https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html#voiceid-quotas">Voice ID Service Quotas</a> and try your request again.</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.
    """

    def _handler(
        req: "OperationRequest[capo_voice_id.types.start_fraudster_registration_job_request.StartFraudsterRegistrationJobRequest]",
    ) -> OperationResponse[
        "capo_voice_id.types.start_fraudster_registration_job_response.StartFraudsterRegistrationJobResponse"
    ]:
        import capo_voice_id._operations.voice_id.start_fraudster_registration_job

        output, http_response = (
            capo_voice_id._operations.voice_id.start_fraudster_registration_job.start_fraudster_registration_job(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

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

        return capo_voice_id.types.start_fraudster_registration_job_request.redact_sensitive(
            input_
        )

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

        return capo_voice_id.types.start_fraudster_registration_job_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "StartFraudsterRegistrationJob",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_voice_id.types.start_fraudster_registration_job_request.StartFraudsterRegistrationJobRequest = {
        "domain_id": domain_id,
        "data_access_role_arn": data_access_role_arn,
        "input_data_config": input_data_config,
        "output_data_config": output_data_config,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if job_name is not None:
        input_["job_name"] = job_name
    if registration_config is not None:
        input_["registration_config"] = registration_config

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