Skip to content

Commit

Permalink
feat(client-voice-id): VoiceID will now automatically expire Speakers…
Browse files Browse the repository at this point in the history
… if they haven't been accessed for Enrollment, Re-enrollment or Successful Auth for three years. The Speaker APIs now return a "LastAccessedAt" time for Speakers, and the EvaluateSession API returns "SPEAKER_EXPIRED" Auth Decision for EXPIRED Speakers.
  • Loading branch information
awstools committed May 25, 2022
1 parent 37c451f commit 7bd32c7
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 51 deletions.
11 changes: 11 additions & 0 deletions clients/client-voice-id/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export enum AuthenticationDecision {
ACCEPT = "ACCEPT",
NOT_ENOUGH_SPEECH = "NOT_ENOUGH_SPEECH",
REJECT = "REJECT",
SPEAKER_EXPIRED = "SPEAKER_EXPIRED",
SPEAKER_ID_NOT_PROVIDED = "SPEAKER_ID_NOT_PROVIDED",
SPEAKER_NOT_ENROLLED = "SPEAKER_NOT_ENROLLED",
SPEAKER_OPTED_OUT = "SPEAKER_OPTED_OUT",
Expand Down Expand Up @@ -952,6 +953,11 @@ export interface Speaker {
* <p>A timestamp showing the speaker's last update.</p>
*/
UpdatedAt?: Date;

/**
* <p>The timestamp when the speaker was last accessed for enrollment, re-enrollment or a successful authentication. This timestamp is accurate to one hour.</p>
*/
LastAccessedAt?: Date;
}

export namespace Speaker {
Expand Down Expand Up @@ -1803,6 +1809,11 @@ export interface SpeakerSummary {
* <p>A timestamp showing the speaker's last update.</p>
*/
UpdatedAt?: Date;

/**
* <p>The timestamp when the speaker was last accessed for enrollment, re-enrollment or a successful authentication. This timestamp is accurate to one hour.</p>
*/
LastAccessedAt?: Date;
}

export namespace SpeakerSummary {
Expand Down
8 changes: 8 additions & 0 deletions clients/client-voice-id/src/protocols/Aws_json1_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2499,6 +2499,10 @@ const deserializeAws_json1_0Speaker = (output: any, context: __SerdeContext): Sp
CustomerSpeakerId: __expectString(output.CustomerSpeakerId),
DomainId: __expectString(output.DomainId),
GeneratedSpeakerId: __expectString(output.GeneratedSpeakerId),
LastAccessedAt:
output.LastAccessedAt !== undefined && output.LastAccessedAt !== null
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAccessedAt)))
: undefined,
Status: __expectString(output.Status),
UpdatedAt:
output.UpdatedAt !== undefined && output.UpdatedAt !== null
Expand Down Expand Up @@ -2609,6 +2613,10 @@ const deserializeAws_json1_0SpeakerSummary = (output: any, context: __SerdeConte
CustomerSpeakerId: __expectString(output.CustomerSpeakerId),
DomainId: __expectString(output.DomainId),
GeneratedSpeakerId: __expectString(output.GeneratedSpeakerId),
LastAccessedAt:
output.LastAccessedAt !== undefined && output.LastAccessedAt !== null
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAccessedAt)))
: undefined,
Status: __expectString(output.Status),
UpdatedAt:
output.UpdatedAt !== undefined && output.UpdatedAt !== null
Expand Down
114 changes: 63 additions & 51 deletions codegen/sdk-codegen/aws-models/voice-id.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
{
"value": "SPEAKER_ID_NOT_PROVIDED",
"name": "SPEAKER_ID_NOT_PROVIDED"
},
{
"value": "SPEAKER_EXPIRED",
"name": "SPEAKER_EXPIRED"
}
]
}
Expand Down Expand Up @@ -231,8 +235,7 @@
"smithy.api#documentation": "<p>Creates a domain that contains all Amazon Connect Voice ID data, such as speakers, fraudsters, customer \n audio, and voiceprints.\n </p>",
"smithy.api#http": {
"method": "POST",
"uri": "/domains",
"code": 200
"uri": "/domains"
},
"smithy.api#idempotent": {}
}
Expand Down Expand Up @@ -302,6 +305,9 @@
"input": {
"target": "com.amazonaws.voiceid#DeleteDomainRequest"
},
"output": {
"target": "smithy.api#Unit"
},
"errors": [
{
"target": "com.amazonaws.voiceid#AccessDeniedException"
Expand Down Expand Up @@ -349,6 +355,9 @@
"input": {
"target": "com.amazonaws.voiceid#DeleteFraudsterRequest"
},
"output": {
"target": "smithy.api#Unit"
},
"errors": [
{
"target": "com.amazonaws.voiceid#AccessDeniedException"
Expand Down Expand Up @@ -401,6 +410,9 @@
"input": {
"target": "com.amazonaws.voiceid#DeleteSpeakerRequest"
},
"output": {
"target": "smithy.api#Unit"
},
"errors": [
{
"target": "com.amazonaws.voiceid#AccessDeniedException"
Expand Down Expand Up @@ -480,8 +492,7 @@
"smithy.api#documentation": "<p>Describes the specified domain.</p>",
"smithy.api#http": {
"method": "GET",
"uri": "/domains/{DomainId}",
"code": 200
"uri": "/domains/{DomainId}"
}
}
},
Expand Down Expand Up @@ -538,8 +549,7 @@
"smithy.api#documentation": "<p>Describes the specified fraudster.</p>",
"smithy.api#http": {
"method": "GET",
"uri": "/domains/{DomainId}/fraudsters/{FraudsterId}",
"code": 200
"uri": "/domains/{DomainId}/fraudsters/{FraudsterId}"
}
}
},
Expand Down Expand Up @@ -572,8 +582,7 @@
"smithy.api#documentation": "<p>Describes the specified fraudster registration job.</p>",
"smithy.api#http": {
"method": "GET",
"uri": "/domains/{DomainId}/fraudster-registration-jobs/{JobId}",
"code": 200
"uri": "/domains/{DomainId}/fraudster-registration-jobs/{JobId}"
}
}
},
Expand Down Expand Up @@ -670,8 +679,7 @@
"smithy.api#documentation": "<p>Describes the specified speaker.</p>",
"smithy.api#http": {
"method": "GET",
"uri": "/domains/{DomainId}/speakers/{SpeakerId}",
"code": 200
"uri": "/domains/{DomainId}/speakers/{SpeakerId}"
}
}
},
Expand Down Expand Up @@ -704,8 +712,7 @@
"smithy.api#documentation": "<p>Describes the specified speaker enrollment job.</p>",
"smithy.api#http": {
"method": "GET",
"uri": "/domains/{DomainId}/speaker-enrollment-jobs/{JobId}",
"code": 200
"uri": "/domains/{DomainId}/speaker-enrollment-jobs/{JobId}"
}
}
},
Expand Down Expand Up @@ -1026,8 +1033,7 @@
"smithy.api#documentation": "<p>Evaluates a specified session based on audio data accumulated during a streaming Amazon Connect Voice \n ID call.</p>",
"smithy.api#http": {
"method": "PUT",
"uri": "/sessions/{SessionNameOrId}/evaluate",
"code": 200
"uri": "/sessions/{SessionNameOrId}/evaluate"
}
}
},
Expand Down Expand Up @@ -1626,12 +1632,12 @@
"smithy.api#documentation": "<p>Lists all the domains in the Amazon Web Services account.\n </p>",
"smithy.api#http": {
"method": "GET",
"uri": "/domains",
"code": 200
"uri": "/domains"
},
"smithy.api#paginated": {
"inputToken": "NextToken",
"outputToken": "NextToken",
"items": "DomainSummaries",
"pageSize": "MaxResults"
}
}
Expand Down Expand Up @@ -1701,12 +1707,12 @@
"smithy.api#documentation": "<p>Lists all the fraudster registration jobs in the domain with the given <code>JobStatus</code>.\n If <code>JobStatus</code> is not provided, this lists all fraudster registration jobs in the given\n domain.\n </p>",
"smithy.api#http": {
"method": "GET",
"uri": "/domains/{DomainId}/fraudster-registration-jobs",
"code": 200
"uri": "/domains/{DomainId}/fraudster-registration-jobs"
},
"smithy.api#paginated": {
"inputToken": "NextToken",
"outputToken": "NextToken",
"items": "JobSummaries",
"pageSize": "MaxResults"
}
}
Expand Down Expand Up @@ -1791,12 +1797,12 @@
"smithy.api#documentation": "<p>Lists all the speaker enrollment jobs in the domain with the specified <code>JobStatus</code>. If\n <code>JobStatus</code> is not provided, this lists all jobs with all possible speaker enrollment job\n statuses.</p>",
"smithy.api#http": {
"method": "GET",
"uri": "/domains/{DomainId}/speaker-enrollment-jobs",
"code": 200
"uri": "/domains/{DomainId}/speaker-enrollment-jobs"
},
"smithy.api#paginated": {
"inputToken": "NextToken",
"outputToken": "NextToken",
"items": "JobSummaries",
"pageSize": "MaxResults"
}
}
Expand Down Expand Up @@ -1881,12 +1887,12 @@
"smithy.api#documentation": "<p>Lists all speakers in a specified domain.</p>",
"smithy.api#http": {
"method": "GET",
"uri": "/domains/{DomainId}/speakers",
"code": 200
"uri": "/domains/{DomainId}/speakers"
},
"smithy.api#paginated": {
"inputToken": "NextToken",
"outputToken": "NextToken",
"items": "SpeakerSummaries",
"pageSize": "MaxResults"
}
}
Expand Down Expand Up @@ -1963,9 +1969,8 @@
"traits": {
"smithy.api#documentation": "<p>Lists all tags associated with a specified Voice ID resource.</p>",
"smithy.api#http": {
"method": "GET",
"uri": "/tags/{ResourceArn}",
"code": 200
"method": "GET"
}
}
},
Expand Down Expand Up @@ -2055,8 +2060,7 @@
"smithy.api#documentation": "<p>Opts out a speaker from Voice ID system. A speaker can be opted out regardless of whether or not they\n already exist in the system. If they don't yet exist, a new speaker is created in an opted out state.\n If they already exist, their existing status is overridden and they are opted out. Enrollment and\n evaluation authentication requests are rejected for opted out speakers, and opted out speakers have\n no voice embeddings stored in the system.</p>",
"smithy.api#http": {
"method": "PUT",
"uri": "/domains/{DomainId}/speakers/{SpeakerId}/optout",
"code": 200
"uri": "/domains/{DomainId}/speakers/{SpeakerId}/optout"
}
}
},
Expand Down Expand Up @@ -2299,6 +2303,12 @@
"traits": {
"smithy.api#documentation": "<p>A timestamp showing the speaker's last update.</p>"
}
},
"LastAccessedAt": {
"target": "com.amazonaws.voiceid#Timestamp",
"traits": {
"smithy.api#documentation": "<p>The timestamp when the speaker was last accessed for enrollment, re-enrollment or a successful authentication. This timestamp is accurate to one hour.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -2552,6 +2562,12 @@
"traits": {
"smithy.api#documentation": "<p>A timestamp showing the speaker's last update.</p>"
}
},
"LastAccessedAt": {
"target": "com.amazonaws.voiceid#Timestamp",
"traits": {
"smithy.api#documentation": "<p>The timestamp when the speaker was last accessed for enrollment, re-enrollment or a successful authentication. This timestamp is accurate to one hour.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -2593,8 +2609,7 @@
"smithy.api#documentation": "<p>Starts a new batch fraudster registration job using provided details.</p>",
"smithy.api#http": {
"method": "POST",
"uri": "/domains/{DomainId}/fraudster-registration-jobs",
"code": 200
"uri": "/domains/{DomainId}/fraudster-registration-jobs"
},
"smithy.api#idempotent": {}
}
Expand Down Expand Up @@ -2698,8 +2713,7 @@
"smithy.api#documentation": "<p>Starts a new batch speaker enrollment job using specified details.</p>",
"smithy.api#http": {
"method": "POST",
"uri": "/domains/{DomainId}/speaker-enrollment-jobs",
"code": 200
"uri": "/domains/{DomainId}/speaker-enrollment-jobs"
},
"smithy.api#idempotent": {}
}
Expand Down Expand Up @@ -2883,9 +2897,8 @@
"traits": {
"smithy.api#documentation": "<p>Tags an Amazon Connect Voice ID resource with the provided list of tags.</p>",
"smithy.api#http": {
"method": "POST",
"uri": "/tags/{ResourceArn}",
"code": 200
"method": "POST"
}
}
},
Expand Down Expand Up @@ -2981,8 +2994,8 @@
"traits": {
"smithy.api#documentation": "<p>Removes specified tags from a specified Amazon Connect Voice ID resource.</p>",
"smithy.api#http": {
"method": "DELETE",
"uri": "/tags/{ResourceArn}",
"method": "DELETE",
"code": 204
}
}
Expand Down Expand Up @@ -3044,8 +3057,7 @@
"smithy.api#documentation": "<p>Updates the specified domain. This API has clobber behavior, and clears and replaces all attributes.\n If an optional field, such as 'Description' is not provided, it is removed from the domain.</p>",
"smithy.api#http": {
"method": "PUT",
"uri": "/domains/{DomainId}",
"code": 200
"uri": "/domains/{DomainId}"
}
}
},
Expand Down Expand Up @@ -3108,6 +3120,21 @@
},
"com.amazonaws.voiceid#VoiceID": {
"type": "service",
"traits": {
"aws.api#service": {
"sdkId": "Voice ID",
"arnNamespace": "voiceid",
"cloudFormationName": "VoiceID",
"cloudTrailEventSource": "voiceid.amazonaws.com",
"endpointPrefix": "voiceid"
},
"aws.auth#sigv4": {
"name": "voiceid"
},
"aws.protocols#awsJson1_0": {},
"smithy.api#documentation": "<p>Amazon Connect Voice ID provides real-time caller authentication and fraud screening. This guide\n describes the APIs used for this service.\n </p>",
"smithy.api#title": "Amazon Voice ID"
},
"version": "2021-09-27",
"operations": [
{
Expand Down Expand Up @@ -3173,22 +3200,7 @@
{
"target": "com.amazonaws.voiceid#UpdateDomain"
}
],
"traits": {
"aws.api#service": {
"sdkId": "Voice ID",
"arnNamespace": "voiceid",
"cloudFormationName": "VoiceID",
"cloudTrailEventSource": "voiceid.amazonaws.com",
"endpointPrefix": "voiceid"
},
"aws.auth#sigv4": {
"name": "voiceid"
},
"aws.protocols#awsJson1_0": {},
"smithy.api#documentation": "<p>Amazon Connect Voice ID provides real-time caller authentication and fraud screening. This guide\n describes the APIs used for this service.\n </p>",
"smithy.api#title": "Amazon Voice ID"
}
]
}
}
}

0 comments on commit 7bd32c7

Please sign in to comment.