Skip to content

Commit 7bd32c7

Browse files
author
awstools
committed
feat(client-voice-id): VoiceID will now automatically expire Speakers 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.
1 parent 37c451f commit 7bd32c7

File tree

3 files changed

+82
-51
lines changed

3 files changed

+82
-51
lines changed

clients/client-voice-id/src/models/models_0.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export enum AuthenticationDecision {
4848
ACCEPT = "ACCEPT",
4949
NOT_ENOUGH_SPEECH = "NOT_ENOUGH_SPEECH",
5050
REJECT = "REJECT",
51+
SPEAKER_EXPIRED = "SPEAKER_EXPIRED",
5152
SPEAKER_ID_NOT_PROVIDED = "SPEAKER_ID_NOT_PROVIDED",
5253
SPEAKER_NOT_ENROLLED = "SPEAKER_NOT_ENROLLED",
5354
SPEAKER_OPTED_OUT = "SPEAKER_OPTED_OUT",
@@ -952,6 +953,11 @@ export interface Speaker {
952953
* <p>A timestamp showing the speaker's last update.</p>
953954
*/
954955
UpdatedAt?: Date;
956+
957+
/**
958+
* <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>
959+
*/
960+
LastAccessedAt?: Date;
955961
}
956962

957963
export namespace Speaker {
@@ -1803,6 +1809,11 @@ export interface SpeakerSummary {
18031809
* <p>A timestamp showing the speaker's last update.</p>
18041810
*/
18051811
UpdatedAt?: Date;
1812+
1813+
/**
1814+
* <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>
1815+
*/
1816+
LastAccessedAt?: Date;
18061817
}
18071818

18081819
export namespace SpeakerSummary {

clients/client-voice-id/src/protocols/Aws_json1_0.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2499,6 +2499,10 @@ const deserializeAws_json1_0Speaker = (output: any, context: __SerdeContext): Sp
24992499
CustomerSpeakerId: __expectString(output.CustomerSpeakerId),
25002500
DomainId: __expectString(output.DomainId),
25012501
GeneratedSpeakerId: __expectString(output.GeneratedSpeakerId),
2502+
LastAccessedAt:
2503+
output.LastAccessedAt !== undefined && output.LastAccessedAt !== null
2504+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAccessedAt)))
2505+
: undefined,
25022506
Status: __expectString(output.Status),
25032507
UpdatedAt:
25042508
output.UpdatedAt !== undefined && output.UpdatedAt !== null
@@ -2609,6 +2613,10 @@ const deserializeAws_json1_0SpeakerSummary = (output: any, context: __SerdeConte
26092613
CustomerSpeakerId: __expectString(output.CustomerSpeakerId),
26102614
DomainId: __expectString(output.DomainId),
26112615
GeneratedSpeakerId: __expectString(output.GeneratedSpeakerId),
2616+
LastAccessedAt:
2617+
output.LastAccessedAt !== undefined && output.LastAccessedAt !== null
2618+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAccessedAt)))
2619+
: undefined,
26122620
Status: __expectString(output.Status),
26132621
UpdatedAt:
26142622
output.UpdatedAt !== undefined && output.UpdatedAt !== null

codegen/sdk-codegen/aws-models/voice-id.json

Lines changed: 63 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@
7272
{
7373
"value": "SPEAKER_ID_NOT_PROVIDED",
7474
"name": "SPEAKER_ID_NOT_PROVIDED"
75+
},
76+
{
77+
"value": "SPEAKER_EXPIRED",
78+
"name": "SPEAKER_EXPIRED"
7579
}
7680
]
7781
}
@@ -231,8 +235,7 @@
231235
"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>",
232236
"smithy.api#http": {
233237
"method": "POST",
234-
"uri": "/domains",
235-
"code": 200
238+
"uri": "/domains"
236239
},
237240
"smithy.api#idempotent": {}
238241
}
@@ -302,6 +305,9 @@
302305
"input": {
303306
"target": "com.amazonaws.voiceid#DeleteDomainRequest"
304307
},
308+
"output": {
309+
"target": "smithy.api#Unit"
310+
},
305311
"errors": [
306312
{
307313
"target": "com.amazonaws.voiceid#AccessDeniedException"
@@ -349,6 +355,9 @@
349355
"input": {
350356
"target": "com.amazonaws.voiceid#DeleteFraudsterRequest"
351357
},
358+
"output": {
359+
"target": "smithy.api#Unit"
360+
},
352361
"errors": [
353362
{
354363
"target": "com.amazonaws.voiceid#AccessDeniedException"
@@ -401,6 +410,9 @@
401410
"input": {
402411
"target": "com.amazonaws.voiceid#DeleteSpeakerRequest"
403412
},
413+
"output": {
414+
"target": "smithy.api#Unit"
415+
},
404416
"errors": [
405417
{
406418
"target": "com.amazonaws.voiceid#AccessDeniedException"
@@ -480,8 +492,7 @@
480492
"smithy.api#documentation": "<p>Describes the specified domain.</p>",
481493
"smithy.api#http": {
482494
"method": "GET",
483-
"uri": "/domains/{DomainId}",
484-
"code": 200
495+
"uri": "/domains/{DomainId}"
485496
}
486497
}
487498
},
@@ -538,8 +549,7 @@
538549
"smithy.api#documentation": "<p>Describes the specified fraudster.</p>",
539550
"smithy.api#http": {
540551
"method": "GET",
541-
"uri": "/domains/{DomainId}/fraudsters/{FraudsterId}",
542-
"code": 200
552+
"uri": "/domains/{DomainId}/fraudsters/{FraudsterId}"
543553
}
544554
}
545555
},
@@ -572,8 +582,7 @@
572582
"smithy.api#documentation": "<p>Describes the specified fraudster registration job.</p>",
573583
"smithy.api#http": {
574584
"method": "GET",
575-
"uri": "/domains/{DomainId}/fraudster-registration-jobs/{JobId}",
576-
"code": 200
585+
"uri": "/domains/{DomainId}/fraudster-registration-jobs/{JobId}"
577586
}
578587
}
579588
},
@@ -670,8 +679,7 @@
670679
"smithy.api#documentation": "<p>Describes the specified speaker.</p>",
671680
"smithy.api#http": {
672681
"method": "GET",
673-
"uri": "/domains/{DomainId}/speakers/{SpeakerId}",
674-
"code": 200
682+
"uri": "/domains/{DomainId}/speakers/{SpeakerId}"
675683
}
676684
}
677685
},
@@ -704,8 +712,7 @@
704712
"smithy.api#documentation": "<p>Describes the specified speaker enrollment job.</p>",
705713
"smithy.api#http": {
706714
"method": "GET",
707-
"uri": "/domains/{DomainId}/speaker-enrollment-jobs/{JobId}",
708-
"code": 200
715+
"uri": "/domains/{DomainId}/speaker-enrollment-jobs/{JobId}"
709716
}
710717
}
711718
},
@@ -1026,8 +1033,7 @@
10261033
"smithy.api#documentation": "<p>Evaluates a specified session based on audio data accumulated during a streaming Amazon Connect Voice \n ID call.</p>",
10271034
"smithy.api#http": {
10281035
"method": "PUT",
1029-
"uri": "/sessions/{SessionNameOrId}/evaluate",
1030-
"code": 200
1036+
"uri": "/sessions/{SessionNameOrId}/evaluate"
10311037
}
10321038
}
10331039
},
@@ -1626,12 +1632,12 @@
16261632
"smithy.api#documentation": "<p>Lists all the domains in the Amazon Web Services account.\n </p>",
16271633
"smithy.api#http": {
16281634
"method": "GET",
1629-
"uri": "/domains",
1630-
"code": 200
1635+
"uri": "/domains"
16311636
},
16321637
"smithy.api#paginated": {
16331638
"inputToken": "NextToken",
16341639
"outputToken": "NextToken",
1640+
"items": "DomainSummaries",
16351641
"pageSize": "MaxResults"
16361642
}
16371643
}
@@ -1701,12 +1707,12 @@
17011707
"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>",
17021708
"smithy.api#http": {
17031709
"method": "GET",
1704-
"uri": "/domains/{DomainId}/fraudster-registration-jobs",
1705-
"code": 200
1710+
"uri": "/domains/{DomainId}/fraudster-registration-jobs"
17061711
},
17071712
"smithy.api#paginated": {
17081713
"inputToken": "NextToken",
17091714
"outputToken": "NextToken",
1715+
"items": "JobSummaries",
17101716
"pageSize": "MaxResults"
17111717
}
17121718
}
@@ -1791,12 +1797,12 @@
17911797
"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>",
17921798
"smithy.api#http": {
17931799
"method": "GET",
1794-
"uri": "/domains/{DomainId}/speaker-enrollment-jobs",
1795-
"code": 200
1800+
"uri": "/domains/{DomainId}/speaker-enrollment-jobs"
17961801
},
17971802
"smithy.api#paginated": {
17981803
"inputToken": "NextToken",
17991804
"outputToken": "NextToken",
1805+
"items": "JobSummaries",
18001806
"pageSize": "MaxResults"
18011807
}
18021808
}
@@ -1881,12 +1887,12 @@
18811887
"smithy.api#documentation": "<p>Lists all speakers in a specified domain.</p>",
18821888
"smithy.api#http": {
18831889
"method": "GET",
1884-
"uri": "/domains/{DomainId}/speakers",
1885-
"code": 200
1890+
"uri": "/domains/{DomainId}/speakers"
18861891
},
18871892
"smithy.api#paginated": {
18881893
"inputToken": "NextToken",
18891894
"outputToken": "NextToken",
1895+
"items": "SpeakerSummaries",
18901896
"pageSize": "MaxResults"
18911897
}
18921898
}
@@ -1963,9 +1969,8 @@
19631969
"traits": {
19641970
"smithy.api#documentation": "<p>Lists all tags associated with a specified Voice ID resource.</p>",
19651971
"smithy.api#http": {
1966-
"method": "GET",
19671972
"uri": "/tags/{ResourceArn}",
1968-
"code": 200
1973+
"method": "GET"
19691974
}
19701975
}
19711976
},
@@ -2055,8 +2060,7 @@
20552060
"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>",
20562061
"smithy.api#http": {
20572062
"method": "PUT",
2058-
"uri": "/domains/{DomainId}/speakers/{SpeakerId}/optout",
2059-
"code": 200
2063+
"uri": "/domains/{DomainId}/speakers/{SpeakerId}/optout"
20602064
}
20612065
}
20622066
},
@@ -2299,6 +2303,12 @@
22992303
"traits": {
23002304
"smithy.api#documentation": "<p>A timestamp showing the speaker's last update.</p>"
23012305
}
2306+
},
2307+
"LastAccessedAt": {
2308+
"target": "com.amazonaws.voiceid#Timestamp",
2309+
"traits": {
2310+
"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>"
2311+
}
23022312
}
23032313
},
23042314
"traits": {
@@ -2552,6 +2562,12 @@
25522562
"traits": {
25532563
"smithy.api#documentation": "<p>A timestamp showing the speaker's last update.</p>"
25542564
}
2565+
},
2566+
"LastAccessedAt": {
2567+
"target": "com.amazonaws.voiceid#Timestamp",
2568+
"traits": {
2569+
"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>"
2570+
}
25552571
}
25562572
},
25572573
"traits": {
@@ -2593,8 +2609,7 @@
25932609
"smithy.api#documentation": "<p>Starts a new batch fraudster registration job using provided details.</p>",
25942610
"smithy.api#http": {
25952611
"method": "POST",
2596-
"uri": "/domains/{DomainId}/fraudster-registration-jobs",
2597-
"code": 200
2612+
"uri": "/domains/{DomainId}/fraudster-registration-jobs"
25982613
},
25992614
"smithy.api#idempotent": {}
26002615
}
@@ -2698,8 +2713,7 @@
26982713
"smithy.api#documentation": "<p>Starts a new batch speaker enrollment job using specified details.</p>",
26992714
"smithy.api#http": {
27002715
"method": "POST",
2701-
"uri": "/domains/{DomainId}/speaker-enrollment-jobs",
2702-
"code": 200
2716+
"uri": "/domains/{DomainId}/speaker-enrollment-jobs"
27032717
},
27042718
"smithy.api#idempotent": {}
27052719
}
@@ -2883,9 +2897,8 @@
28832897
"traits": {
28842898
"smithy.api#documentation": "<p>Tags an Amazon Connect Voice ID resource with the provided list of tags.</p>",
28852899
"smithy.api#http": {
2886-
"method": "POST",
28872900
"uri": "/tags/{ResourceArn}",
2888-
"code": 200
2901+
"method": "POST"
28892902
}
28902903
}
28912904
},
@@ -2981,8 +2994,8 @@
29812994
"traits": {
29822995
"smithy.api#documentation": "<p>Removes specified tags from a specified Amazon Connect Voice ID resource.</p>",
29832996
"smithy.api#http": {
2984-
"method": "DELETE",
29852997
"uri": "/tags/{ResourceArn}",
2998+
"method": "DELETE",
29862999
"code": 204
29873000
}
29883001
}
@@ -3044,8 +3057,7 @@
30443057
"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>",
30453058
"smithy.api#http": {
30463059
"method": "PUT",
3047-
"uri": "/domains/{DomainId}",
3048-
"code": 200
3060+
"uri": "/domains/{DomainId}"
30493061
}
30503062
}
30513063
},
@@ -3108,6 +3120,21 @@
31083120
},
31093121
"com.amazonaws.voiceid#VoiceID": {
31103122
"type": "service",
3123+
"traits": {
3124+
"aws.api#service": {
3125+
"sdkId": "Voice ID",
3126+
"arnNamespace": "voiceid",
3127+
"cloudFormationName": "VoiceID",
3128+
"cloudTrailEventSource": "voiceid.amazonaws.com",
3129+
"endpointPrefix": "voiceid"
3130+
},
3131+
"aws.auth#sigv4": {
3132+
"name": "voiceid"
3133+
},
3134+
"aws.protocols#awsJson1_0": {},
3135+
"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>",
3136+
"smithy.api#title": "Amazon Voice ID"
3137+
},
31113138
"version": "2021-09-27",
31123139
"operations": [
31133140
{
@@ -3173,22 +3200,7 @@
31733200
{
31743201
"target": "com.amazonaws.voiceid#UpdateDomain"
31753202
}
3176-
],
3177-
"traits": {
3178-
"aws.api#service": {
3179-
"sdkId": "Voice ID",
3180-
"arnNamespace": "voiceid",
3181-
"cloudFormationName": "VoiceID",
3182-
"cloudTrailEventSource": "voiceid.amazonaws.com",
3183-
"endpointPrefix": "voiceid"
3184-
},
3185-
"aws.auth#sigv4": {
3186-
"name": "voiceid"
3187-
},
3188-
"aws.protocols#awsJson1_0": {},
3189-
"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>",
3190-
"smithy.api#title": "Amazon Voice ID"
3191-
}
3203+
]
31923204
}
31933205
}
31943206
}

0 commit comments

Comments
 (0)