pub struct Client { /* private fields */ }
Expand description
Client for Amazon Voice ID
Client for invoking operations on Amazon Voice ID. Each operation on Amazon Voice ID is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config
is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env()
, since this will resolve an SdkConfig
which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env()
instead, which returns a ConfigLoader
that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_voiceid::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Builder
struct implements From<&SdkConfig>
, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_voiceid::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();
See the aws-config
docs and Config
for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the AssociateFraudster
operation has
a Client::associate_fraudster
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.associate_fraudster()
.domain_id("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
Implementations§
Source§impl Client
impl Client
Sourcepub fn associate_fraudster(&self) -> AssociateFraudsterFluentBuilder
pub fn associate_fraudster(&self) -> AssociateFraudsterFluentBuilder
Constructs a fluent builder for the AssociateFraudster
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain that contains the fraudster.
watchlist_id(impl Into<String>)
/set_watchlist_id(Option<String>)
:
required: trueThe identifier of the watchlist you want to associate with the fraudster.
fraudster_id(impl Into<String>)
/set_fraudster_id(Option<String>)
:
required: trueThe identifier of the fraudster to be associated with the watchlist.
- On success, responds with
AssociateFraudsterOutput
with field(s):fraudster(Option<Fraudster>)
:Contains all the information about a fraudster.
- On failure, responds with
SdkError<AssociateFraudsterError>
Source§impl Client
impl Client
Sourcepub fn create_domain(&self) -> CreateDomainFluentBuilder
pub fn create_domain(&self) -> CreateDomainFluentBuilder
Constructs a fluent builder for the CreateDomain
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the domain.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA brief description of this domain.
server_side_encryption_configuration(ServerSideEncryptionConfiguration)
/set_server_side_encryption_configuration(Option<ServerSideEncryptionConfiguration>)
:
required: trueThe configuration, containing the KMS key identifier, to be used by Voice ID for the server-side encryption of your data. Refer to Amazon Connect Voice ID encryption at rest for more details on how the KMS key is used.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA 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.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseA list of tags you want added to the domain.
- On success, responds with
CreateDomainOutput
with field(s):domain(Option<Domain>)
:Information about the newly created domain.
- On failure, responds with
SdkError<CreateDomainError>
Source§impl Client
impl Client
Sourcepub fn create_watchlist(&self) -> CreateWatchlistFluentBuilder
pub fn create_watchlist(&self) -> CreateWatchlistFluentBuilder
Constructs a fluent builder for the CreateWatchlist
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain that contains the watchlist.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the watchlist.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA brief description of this watchlist.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA 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.
- On success, responds with
CreateWatchlistOutput
with field(s):watchlist(Option<Watchlist>)
:Information about the newly created watchlist.
- On failure, responds with
SdkError<CreateWatchlistError>
Source§impl Client
impl Client
Sourcepub fn delete_domain(&self) -> DeleteDomainFluentBuilder
pub fn delete_domain(&self) -> DeleteDomainFluentBuilder
Constructs a fluent builder for the DeleteDomain
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain you want to delete.
- On success, responds with
DeleteDomainOutput
- On failure, responds with
SdkError<DeleteDomainError>
Source§impl Client
impl Client
Sourcepub fn delete_fraudster(&self) -> DeleteFraudsterFluentBuilder
pub fn delete_fraudster(&self) -> DeleteFraudsterFluentBuilder
Constructs a fluent builder for the DeleteFraudster
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain that contains the fraudster.
fraudster_id(impl Into<String>)
/set_fraudster_id(Option<String>)
:
required: trueThe identifier of the fraudster you want to delete.
- On success, responds with
DeleteFraudsterOutput
- On failure, responds with
SdkError<DeleteFraudsterError>
Source§impl Client
impl Client
Sourcepub fn delete_speaker(&self) -> DeleteSpeakerFluentBuilder
pub fn delete_speaker(&self) -> DeleteSpeakerFluentBuilder
Constructs a fluent builder for the DeleteSpeaker
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain that contains the speaker.
speaker_id(impl Into<String>)
/set_speaker_id(Option<String>)
:
required: trueThe identifier of the speaker you want to delete.
- On success, responds with
DeleteSpeakerOutput
- On failure, responds with
SdkError<DeleteSpeakerError>
Source§impl Client
impl Client
Sourcepub fn delete_watchlist(&self) -> DeleteWatchlistFluentBuilder
pub fn delete_watchlist(&self) -> DeleteWatchlistFluentBuilder
Constructs a fluent builder for the DeleteWatchlist
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain that contains the watchlist.
watchlist_id(impl Into<String>)
/set_watchlist_id(Option<String>)
:
required: trueThe identifier of the watchlist to be deleted.
- On success, responds with
DeleteWatchlistOutput
- On failure, responds with
SdkError<DeleteWatchlistError>
Source§impl Client
impl Client
Sourcepub fn describe_domain(&self) -> DescribeDomainFluentBuilder
pub fn describe_domain(&self) -> DescribeDomainFluentBuilder
Constructs a fluent builder for the DescribeDomain
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain that you are describing.
- On success, responds with
DescribeDomainOutput
with field(s):domain(Option<Domain>)
:Information about the specified domain.
- On failure, responds with
SdkError<DescribeDomainError>
Source§impl Client
impl Client
Sourcepub fn describe_fraudster(&self) -> DescribeFraudsterFluentBuilder
pub fn describe_fraudster(&self) -> DescribeFraudsterFluentBuilder
Constructs a fluent builder for the DescribeFraudster
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain that contains the fraudster.
fraudster_id(impl Into<String>)
/set_fraudster_id(Option<String>)
:
required: trueThe identifier of the fraudster you are describing.
- On success, responds with
DescribeFraudsterOutput
with field(s):fraudster(Option<Fraudster>)
:Information about the specified fraudster.
- On failure, responds with
SdkError<DescribeFraudsterError>
Source§impl Client
impl Client
Sourcepub fn describe_fraudster_registration_job(
&self,
) -> DescribeFraudsterRegistrationJobFluentBuilder
pub fn describe_fraudster_registration_job( &self, ) -> DescribeFraudsterRegistrationJobFluentBuilder
Constructs a fluent builder for the DescribeFraudsterRegistrationJob
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain that contains the fraudster registration job.
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe identifier of the fraudster registration job you are describing.
- On success, responds with
DescribeFraudsterRegistrationJobOutput
with field(s):job(Option<FraudsterRegistrationJob>)
:Contains details about the specified fraudster registration job.
- On failure, responds with
SdkError<DescribeFraudsterRegistrationJobError>
Source§impl Client
impl Client
Sourcepub fn describe_speaker(&self) -> DescribeSpeakerFluentBuilder
pub fn describe_speaker(&self) -> DescribeSpeakerFluentBuilder
Constructs a fluent builder for the DescribeSpeaker
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain that contains the speaker.
speaker_id(impl Into<String>)
/set_speaker_id(Option<String>)
:
required: trueThe identifier of the speaker you are describing.
- On success, responds with
DescribeSpeakerOutput
with field(s):speaker(Option<Speaker>)
:Information about the specified speaker.
- On failure, responds with
SdkError<DescribeSpeakerError>
Source§impl Client
impl Client
Sourcepub fn describe_speaker_enrollment_job(
&self,
) -> DescribeSpeakerEnrollmentJobFluentBuilder
pub fn describe_speaker_enrollment_job( &self, ) -> DescribeSpeakerEnrollmentJobFluentBuilder
Constructs a fluent builder for the DescribeSpeakerEnrollmentJob
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain that contains the speaker enrollment job.
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe identifier of the speaker enrollment job you are describing.
- On success, responds with
DescribeSpeakerEnrollmentJobOutput
with field(s):job(Option<SpeakerEnrollmentJob>)
:Contains details about the specified speaker enrollment job.
- On failure, responds with
SdkError<DescribeSpeakerEnrollmentJobError>
Source§impl Client
impl Client
Sourcepub fn describe_watchlist(&self) -> DescribeWatchlistFluentBuilder
pub fn describe_watchlist(&self) -> DescribeWatchlistFluentBuilder
Constructs a fluent builder for the DescribeWatchlist
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain that contains the watchlist.
watchlist_id(impl Into<String>)
/set_watchlist_id(Option<String>)
:
required: trueThe identifier of the watchlist that you are describing.
- On success, responds with
DescribeWatchlistOutput
with field(s):watchlist(Option<Watchlist>)
:Information about the specified watchlist.
- On failure, responds with
SdkError<DescribeWatchlistError>
Source§impl Client
impl Client
Sourcepub fn disassociate_fraudster(&self) -> DisassociateFraudsterFluentBuilder
pub fn disassociate_fraudster(&self) -> DisassociateFraudsterFluentBuilder
Constructs a fluent builder for the DisassociateFraudster
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain that contains the fraudster.
watchlist_id(impl Into<String>)
/set_watchlist_id(Option<String>)
:
required: trueThe identifier of the watchlist that you want to disassociate from the fraudster.
fraudster_id(impl Into<String>)
/set_fraudster_id(Option<String>)
:
required: trueThe identifier of the fraudster to be disassociated from the watchlist.
- On success, responds with
DisassociateFraudsterOutput
with field(s):fraudster(Option<Fraudster>)
:Contains all the information about a fraudster.
- On failure, responds with
SdkError<DisassociateFraudsterError>
Source§impl Client
impl Client
Sourcepub fn evaluate_session(&self) -> EvaluateSessionFluentBuilder
pub fn evaluate_session(&self) -> EvaluateSessionFluentBuilder
Constructs a fluent builder for the EvaluateSession
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain where the session started.
session_name_or_id(impl Into<String>)
/set_session_name_or_id(Option<String>)
:
required: trueThe session identifier, or name of the session, that you want to evaluate. In Voice ID integration, this is the Contact-Id.
- On success, responds with
EvaluateSessionOutput
with field(s):domain_id(Option<String>)
:The identifier of the domain that contains the session.
session_id(Option<String>)
:The service-generated identifier of the session.
session_name(Option<String>)
:The client-provided name of the session.
streaming_status(Option<StreamingStatus>)
:The current status of audio streaming for this session. This field is useful to infer next steps when the Authentication or Fraud Detection results are empty or the decision is
NOT_ENOUGH_SPEECH
. In this situation, if theStreamingStatus
isONGOING/PENDING_CONFIGURATION
, it can mean that the client should call the API again later, after Voice ID has enough audio to produce a result. If the decision remainsNOT_ENOUGH_SPEECH
even afterStreamingStatus
isENDED
, it means that the previously streamed session did not have enough speech to perform evaluation, and a new streaming session is needed to try again.authentication_result(Option<AuthenticationResult>)
:Details resulting from the authentication process, such as authentication decision and authentication score.
fraud_detection_result(Option<FraudDetectionResult>)
:Details resulting from the fraud detection process, such as fraud detection decision and risk score.
- On failure, responds with
SdkError<EvaluateSessionError>
Source§impl Client
impl Client
Sourcepub fn list_domains(&self) -> ListDomainsFluentBuilder
pub fn list_domains(&self) -> ListDomainsFluentBuilder
Constructs a fluent builder for the ListDomains
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe 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(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf
NextToken
is returned, there are more results available. The value ofNextToken
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.
- On success, responds with
ListDomainsOutput
with field(s):domain_summaries(Option<Vec::<DomainSummary>>)
:A list containing details about each domain in the Amazon Web Services account.
next_token(Option<String>)
:If
NextToken
is returned, there are more results available. The value ofNextToken
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.
- On failure, responds with
SdkError<ListDomainsError>
Source§impl Client
impl Client
Sourcepub fn list_fraudster_registration_jobs(
&self,
) -> ListFraudsterRegistrationJobsFluentBuilder
pub fn list_fraudster_registration_jobs( &self, ) -> ListFraudsterRegistrationJobsFluentBuilder
Constructs a fluent builder for the ListFraudsterRegistrationJobs
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain that contains the fraudster registration Jobs.
job_status(FraudsterRegistrationJobStatus)
/set_job_status(Option<FraudsterRegistrationJobStatus>)
:
required: falseProvides the status of your fraudster registration job.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe 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(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf
NextToken
is returned, there are more results available. The value ofNextToken
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.
- On success, responds with
ListFraudsterRegistrationJobsOutput
with field(s):job_summaries(Option<Vec::<FraudsterRegistrationJobSummary>>)
:A list containing details about each specified fraudster registration job.
next_token(Option<String>)
:If
NextToken
is returned, there are more results available. The value ofNextToken
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.
- On failure, responds with
SdkError<ListFraudsterRegistrationJobsError>
Source§impl Client
impl Client
Sourcepub fn list_fraudsters(&self) -> ListFraudstersFluentBuilder
pub fn list_fraudsters(&self) -> ListFraudstersFluentBuilder
Constructs a fluent builder for the ListFraudsters
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain.
watchlist_id(impl Into<String>)
/set_watchlist_id(Option<String>)
:
required: falseThe identifier of the watchlist. If provided, all fraudsters in the watchlist are listed. If not provided, all fraudsters in the domain are listed.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe 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(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf
NextToken
is returned, there are more results available. The value ofNextToken
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.
- On success, responds with
ListFraudstersOutput
with field(s):fraudster_summaries(Option<Vec::<FraudsterSummary>>)
:A list that contains details about each fraudster in the Amazon Web Services account.
next_token(Option<String>)
:If
NextToken
is returned, there are more results available. The value ofNextToken
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.
- On failure, responds with
SdkError<ListFraudstersError>
Source§impl Client
impl Client
Sourcepub fn list_speaker_enrollment_jobs(
&self,
) -> ListSpeakerEnrollmentJobsFluentBuilder
pub fn list_speaker_enrollment_jobs( &self, ) -> ListSpeakerEnrollmentJobsFluentBuilder
Constructs a fluent builder for the ListSpeakerEnrollmentJobs
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain that contains the speaker enrollment jobs.
job_status(SpeakerEnrollmentJobStatus)
/set_job_status(Option<SpeakerEnrollmentJobStatus>)
:
required: falseProvides the status of your speaker enrollment Job.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe 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(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf
NextToken
is returned, there are more results available. The value ofNextToken
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.
- On success, responds with
ListSpeakerEnrollmentJobsOutput
with field(s):job_summaries(Option<Vec::<SpeakerEnrollmentJobSummary>>)
:A list containing details about each specified speaker enrollment job.
next_token(Option<String>)
:If
NextToken
is returned, there are more results available. The value ofNextToken
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.
- On failure, responds with
SdkError<ListSpeakerEnrollmentJobsError>
Source§impl Client
impl Client
Sourcepub fn list_speakers(&self) -> ListSpeakersFluentBuilder
pub fn list_speakers(&self) -> ListSpeakersFluentBuilder
Constructs a fluent builder for the ListSpeakers
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe 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(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf
NextToken
is returned, there are more results available. The value ofNextToken
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.
- On success, responds with
ListSpeakersOutput
with field(s):speaker_summaries(Option<Vec::<SpeakerSummary>>)
:A list containing details about each speaker in the Amazon Web Services account.
next_token(Option<String>)
:If
NextToken
is returned, there are more results available. The value ofNextToken
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.
- On failure, responds with
SdkError<ListSpeakersError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the Voice ID resource for which you want to list the tags.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<Vec::<Tag>>)
:The list of tags associated with the specified resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn list_watchlists(&self) -> ListWatchlistsFluentBuilder
pub fn list_watchlists(&self) -> ListWatchlistsFluentBuilder
Constructs a fluent builder for the ListWatchlists
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe 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(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf
NextToken
is returned, there are more results available. The value ofNextToken
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.
- On success, responds with
ListWatchlistsOutput
with field(s):watchlist_summaries(Option<Vec::<WatchlistSummary>>)
:A list that contains details about each watchlist in the Amazon Web Services account.
next_token(Option<String>)
:If
NextToken
is returned, there are more results available. The value ofNextToken
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.
- On failure, responds with
SdkError<ListWatchlistsError>
Source§impl Client
impl Client
Sourcepub fn opt_out_speaker(&self) -> OptOutSpeakerFluentBuilder
pub fn opt_out_speaker(&self) -> OptOutSpeakerFluentBuilder
Constructs a fluent builder for the OptOutSpeaker
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain that contains the speaker.
speaker_id(impl Into<String>)
/set_speaker_id(Option<String>)
:
required: trueThe identifier of the speaker you want opted-out.
- On success, responds with
OptOutSpeakerOutput
with field(s):speaker(Option<Speaker>)
:Details about the opted-out speaker.
- On failure, responds with
SdkError<OptOutSpeakerError>
Source§impl Client
impl Client
Sourcepub fn start_fraudster_registration_job(
&self,
) -> StartFraudsterRegistrationJobFluentBuilder
pub fn start_fraudster_registration_job( &self, ) -> StartFraudsterRegistrationJobFluentBuilder
Constructs a fluent builder for the StartFraudsterRegistrationJob
operation.
- The fluent builder is configurable:
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA 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(impl Into<String>)
/set_job_name(Option<String>)
:
required: falseThe name of the new fraudster registration job.
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain that contains the fraudster registration job and in which the fraudsters are registered.
data_access_role_arn(impl Into<String>)
/set_data_access_role_arn(Option<String>)
:
required: trueThe 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(RegistrationConfig)
/set_registration_config(Option<RegistrationConfig>)
:
required: falseThe 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)
/set_input_data_config(Option<InputDataConfig>)
:
required: trueThe input data config containing an S3 URI for the input manifest file that contains the list of fraudster registration requests.
output_data_config(OutputDataConfig)
/set_output_data_config(Option<OutputDataConfig>)
:
required: trueThe 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.
- On success, responds with
StartFraudsterRegistrationJobOutput
with field(s):job(Option<FraudsterRegistrationJob>)
:Details about the started fraudster registration job.
- On failure, responds with
SdkError<StartFraudsterRegistrationJobError>
Source§impl Client
impl Client
Sourcepub fn start_speaker_enrollment_job(
&self,
) -> StartSpeakerEnrollmentJobFluentBuilder
pub fn start_speaker_enrollment_job( &self, ) -> StartSpeakerEnrollmentJobFluentBuilder
Constructs a fluent builder for the StartSpeakerEnrollmentJob
operation.
- The fluent builder is configurable:
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA 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(impl Into<String>)
/set_job_name(Option<String>)
:
required: falseA name for your speaker enrollment job.
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain that contains the speaker enrollment job and in which the speakers are enrolled.
data_access_role_arn(impl Into<String>)
/set_data_access_role_arn(Option<String>)
:
required: trueThe 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 Batch enrollment using audio data from prior calls for the permissions needed in this role.
enrollment_config(EnrollmentConfig)
/set_enrollment_config(Option<EnrollmentConfig>)
:
required: falseThe enrollment config that contains details such as the action to take when a speaker is already enrolled in Voice ID or when a speaker is identified as a fraudster.
input_data_config(InputDataConfig)
/set_input_data_config(Option<InputDataConfig>)
:
required: trueThe input data config containing the S3 location for the input manifest file that contains the list of speaker enrollment requests.
output_data_config(OutputDataConfig)
/set_output_data_config(Option<OutputDataConfig>)
:
required: trueThe 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.
- On success, responds with
StartSpeakerEnrollmentJobOutput
with field(s):job(Option<SpeakerEnrollmentJob>)
:Details about the started speaker enrollment job.
- On failure, responds with
SdkError<StartSpeakerEnrollmentJobError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the Voice ID resource you want to tag.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: trueThe list of tags to assign to the specified resource.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the Voice ID resource you want to remove tags from.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe list of tag keys you want to remove from the specified resource.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_domain(&self) -> UpdateDomainFluentBuilder
pub fn update_domain(&self) -> UpdateDomainFluentBuilder
Constructs a fluent builder for the UpdateDomain
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain to be updated.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the domain.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA brief description about this domain.
server_side_encryption_configuration(ServerSideEncryptionConfiguration)
/set_server_side_encryption_configuration(Option<ServerSideEncryptionConfiguration>)
:
required: trueThe configuration, containing the KMS key identifier, to be used by Voice ID for the server-side encryption of your data. Changing the domain’s associated KMS key immediately triggers an asynchronous process to remove dependency on the old KMS key, such that the domain’s data can only be accessed using the new KMS key. The domain’s
ServerSideEncryptionUpdateDetails
contains the details for this process.
- On success, responds with
UpdateDomainOutput
with field(s):domain(Option<Domain>)
:Details about the updated domain
- On failure, responds with
SdkError<UpdateDomainError>
Source§impl Client
impl Client
Sourcepub fn update_watchlist(&self) -> UpdateWatchlistFluentBuilder
pub fn update_watchlist(&self) -> UpdateWatchlistFluentBuilder
Constructs a fluent builder for the UpdateWatchlist
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe identifier of the domain that contains the watchlist.
watchlist_id(impl Into<String>)
/set_watchlist_id(Option<String>)
:
required: trueThe identifier of the watchlist to be updated.
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseThe name of the watchlist.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA brief description about this watchlist.
- On success, responds with
UpdateWatchlistOutput
with field(s):watchlist(Option<Watchlist>)
:Details about the updated watchlist.
- On failure, responds with
SdkError<UpdateWatchlistError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.bright_black());
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.bright_green());
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.bright_yellow());
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.bright_magenta());
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.bright_white());
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.on_bright_black());
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.on_bright_green());
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.on_bright_yellow());
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlue
.
§Example
println!("{}", value.on_bright_blue());
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.on_bright_magenta());
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightCyan
.
§Example
println!("{}", value.on_bright_cyan());
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.on_bright_white());
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn underline(&self) -> Painted<&T>
fn underline(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::Underline
.
§Example
println!("{}", value.underline());
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::RapidBlink
.
§Example
println!("{}", value.rapid_blink());
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);