-
-
Notifications
You must be signed in to change notification settings - Fork 591
/
Copy pathopenapi.yaml
1386 lines (1386 loc) · 61.8 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
info:
version: '2020-08-07'
x-release: v4
title: Amazon Lex Runtime V2
description: This section contains documentation for the Amazon Lex V2 Runtime V2 API operations.
x-logo:
url: 'https://twitter.com/awscloud/profile_image?size=original'
backgroundColor: '#FFFFFF'
termsOfService: 'https://aws.amazon.com/service-terms/'
contact:
name: Mike Ralphson
email: [email protected]
url: 'https://github.com/mermade/aws2openapi'
x-twitter: PermittedSoc
license:
name: Apache 2.0 License
url: 'http://www.apache.org/licenses/'
x-providerName: amazonaws.com
x-serviceName: runtime.lex.v2
x-aws-signingName: lex
x-origin:
- contentType: application/json
url: 'https://raw.githubusercontent.com/aws/aws-sdk-js/master/apis/runtime.lex.v2-2020-08-07.normal.json'
converter:
url: 'https://github.com/mermade/aws2openapi'
version: 1.0.0
x-apisguru-driver: external
x-apiClientRegistration:
url: 'https://portal.aws.amazon.com/gp/aws/developer/registration/index.html?nc2=h_ct'
x-apisguru-categories:
- cloud
x-preferred: true
externalDocs:
description: Amazon Web Services documentation
url: 'https://docs.aws.amazon.com/runtime-v2-lex/'
servers:
- url: 'http://runtime-v2-lex.{region}.amazonaws.com'
variables:
region:
description: The AWS region
enum:
- us-east-1
- us-east-2
- us-west-1
- us-west-2
- us-gov-west-1
- us-gov-east-1
- ca-central-1
- eu-north-1
- eu-west-1
- eu-west-2
- eu-west-3
- eu-central-1
- eu-south-1
- af-south-1
- ap-northeast-1
- ap-northeast-2
- ap-northeast-3
- ap-southeast-1
- ap-southeast-2
- ap-east-1
- ap-south-1
- sa-east-1
- me-south-1
default: us-east-1
description: The Lex Runtime V2 multi-region endpoint
- url: 'https://runtime-v2-lex.{region}.amazonaws.com'
variables:
region:
description: The AWS region
enum:
- us-east-1
- us-east-2
- us-west-1
- us-west-2
- us-gov-west-1
- us-gov-east-1
- ca-central-1
- eu-north-1
- eu-west-1
- eu-west-2
- eu-west-3
- eu-central-1
- eu-south-1
- af-south-1
- ap-northeast-1
- ap-northeast-2
- ap-northeast-3
- ap-southeast-1
- ap-southeast-2
- ap-east-1
- ap-south-1
- sa-east-1
- me-south-1
default: us-east-1
description: The Lex Runtime V2 multi-region endpoint
- url: 'http://runtime-v2-lex.{region}.amazonaws.com.cn'
variables:
region:
description: The AWS region
enum:
- cn-north-1
- cn-northwest-1
default: cn-north-1
description: The Lex Runtime V2 endpoint for China (Beijing) and China (Ningxia)
- url: 'https://runtime-v2-lex.{region}.amazonaws.com.cn'
variables:
region:
description: The AWS region
enum:
- cn-north-1
- cn-northwest-1
default: cn-north-1
description: The Lex Runtime V2 endpoint for China (Beijing) and China (Ningxia)
paths:
'/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}':
delete:
operationId: DeleteSession
description: '<p>Removes session information for a specified bot, alias, and user ID. </p> <p>You can use this operation to restart a conversation with a bot. When you remove a session, the entire history of the session is removed so that you can start again.</p> <p>You don''t need to delete a session. Sessions have a time limit and will expire. Set the session time limit when you create the bot. The default is 5 minutes, but you can specify anything between 1 minute and 24 hours.</p> <p>If you specify a bot or alias ID that doesn''t exist, you receive a <code>BadRequestException.</code> </p> <p>If the locale doesn''t exist in the bot, or if the locale hasn''t been enables for the alias, you receive a <code>BadRequestException</code>.</p>'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteSessionResponse'
'480':
description: AccessDeniedException
content:
application/json:
schema:
$ref: '#/components/schemas/AccessDeniedException'
'481':
description: ResourceNotFoundException
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceNotFoundException'
'482':
description: ValidationException
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationException'
'483':
description: ThrottlingException
content:
application/json:
schema:
$ref: '#/components/schemas/ThrottlingException'
'484':
description: InternalServerException
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerException'
'485':
description: ConflictException
content:
application/json:
schema:
$ref: '#/components/schemas/ConflictException'
parameters:
- name: botId
in: path
required: true
description: The identifier of the bot that contains the session data.
schema:
type: string
pattern: '^[0-9a-zA-Z]+$'
minLength: 10
maxLength: 10
- name: botAliasId
in: path
required: true
description: The alias identifier in use for the bot that contains the session data.
schema:
type: string
- name: localeId
in: path
required: true
description: The locale where the session is in use.
schema:
type: string
minLength: 1
- name: sessionId
in: path
required: true
description: The identifier of the session to delete.
schema:
type: string
pattern: '[0-9a-zA-Z._:-]+'
minLength: 2
maxLength: 100
parameters:
- $ref: '#/components/parameters/X-Amz-Content-Sha256'
- $ref: '#/components/parameters/X-Amz-Date'
- $ref: '#/components/parameters/X-Amz-Algorithm'
- $ref: '#/components/parameters/X-Amz-Credential'
- $ref: '#/components/parameters/X-Amz-Security-Token'
- $ref: '#/components/parameters/X-Amz-Signature'
- $ref: '#/components/parameters/X-Amz-SignedHeaders'
get:
operationId: GetSession
description: '<p>Returns session information for a specified bot, alias, and user.</p> <p>For example, you can use this operation to retrieve session information for a user that has left a long-running session in use.</p> <p>If the bot, alias, or session identifier doesn''t exist, Amazon Lex V2 returns a <code>BadRequestException</code>. If the locale doesn''t exist or is not enabled for the alias, you receive a <code>BadRequestException</code>.</p>'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/GetSessionResponse'
'480':
description: AccessDeniedException
content:
application/json:
schema:
$ref: '#/components/schemas/AccessDeniedException'
'481':
description: ResourceNotFoundException
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceNotFoundException'
'482':
description: ValidationException
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationException'
'483':
description: ThrottlingException
content:
application/json:
schema:
$ref: '#/components/schemas/ThrottlingException'
'484':
description: InternalServerException
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerException'
parameters:
- name: botId
in: path
required: true
description: The identifier of the bot that contains the session data.
schema:
type: string
pattern: '^[0-9a-zA-Z]+$'
minLength: 10
maxLength: 10
- name: botAliasId
in: path
required: true
description: The alias identifier in use for the bot that contains the session data.
schema:
type: string
- name: localeId
in: path
required: true
description: The locale where the session is in use.
schema:
type: string
minLength: 1
- name: sessionId
in: path
required: true
description: The identifier of the session to return.
schema:
type: string
pattern: '[0-9a-zA-Z._:-]+'
minLength: 2
maxLength: 100
post:
operationId: PutSession
description: Creates a new session or modifies an existing session with an Amazon Lex V2 bot. Use this operation to enable your application to set the state of the bot.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/PutSessionResponse'
'480':
description: AccessDeniedException
content:
application/json:
schema:
$ref: '#/components/schemas/AccessDeniedException'
'481':
description: ResourceNotFoundException
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceNotFoundException'
'482':
description: ValidationException
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationException'
'483':
description: ThrottlingException
content:
application/json:
schema:
$ref: '#/components/schemas/ThrottlingException'
'484':
description: InternalServerException
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerException'
'485':
description: ConflictException
content:
application/json:
schema:
$ref: '#/components/schemas/ConflictException'
'486':
description: DependencyFailedException
content:
application/json:
schema:
$ref: '#/components/schemas/DependencyFailedException'
'487':
description: BadGatewayException
content:
application/json:
schema:
$ref: '#/components/schemas/BadGatewayException'
parameters:
- name: botId
in: path
required: true
description: The identifier of the bot that receives the session data.
schema:
type: string
pattern: '^[0-9a-zA-Z]+$'
minLength: 10
maxLength: 10
- name: botAliasId
in: path
required: true
description: The alias identifier of the bot that receives the session data.
schema:
type: string
- name: localeId
in: path
required: true
description: The locale where the session is in use.
schema:
type: string
minLength: 1
- name: sessionId
in: path
required: true
description: The identifier of the session that receives the session data.
schema:
type: string
pattern: '[0-9a-zA-Z._:-]+'
minLength: 2
maxLength: 100
- name: ResponseContentType
in: header
required: false
description: '<p>The message that Amazon Lex V2 returns in the response can be either text or speech depending on the value of this parameter. </p> <ul> <li> <p>If the value is <code>text/plain; charset=utf-8</code>, Amazon Lex V2 returns text in the response.</p> </li> </ul>'
schema:
type: string
minLength: 1
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- sessionState
properties:
messages:
description: A list of messages to send to the user. Messages are sent in the order that they are defined in the list.
type: array
items:
$ref: '#/components/schemas/Message'
maxItems: 10
sessionState:
description: The state of the user's session with Amazon Lex V2.
type: object
properties:
dialogAction:
allOf:
- $ref: '#/components/schemas/DialogAction'
- description: The next step that Amazon Lex V2 should take in the conversation with a user.
intent:
allOf:
- $ref: '#/components/schemas/Intent'
- description: The active intent that Amazon Lex V2 is processing.
activeContexts:
allOf:
- $ref: '#/components/schemas/ActiveContextsList'
- description: 'One or more contexts that indicate to Amazon Lex V2 the context of a request. When a context is active, Amazon Lex V2 considers intents with the matching context as a trigger as the next intent in a session.'
sessionAttributes:
allOf:
- $ref: '#/components/schemas/StringMap'
- description: Map of key/value pairs representing session-specific context information. It contains application information passed between Amazon Lex V2 and a client application.
originatingRequestId:
allOf:
- $ref: '#/components/schemas/NonEmptyString'
- description: A unique identifier for a specific request.
runtimeHints:
allOf:
- $ref: '#/components/schemas/RuntimeHints'
- description: Hints for phrases that a customer is likely to use for a slot. Amazon Lex V2 uses the hints to help determine the correct value of a slot.
requestAttributes:
description: '<p>Request-specific information passed between Amazon Lex V2 and the client application.</p> <p>The namespace <code>x-amz-lex:</code> is reserved for special attributes. Don''t create any request attributes with the prefix <code>x-amz-lex:</code>.</p>'
type: object
additionalProperties:
$ref: '#/components/schemas/String'
'/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/text':
post:
operationId: RecognizeText
description: '<p>Sends user input to Amazon Lex V2. Client applications use this API to send requests to Amazon Lex V2 at runtime. Amazon Lex V2 then interprets the user input using the machine learning model that it build for the bot.</p> <p>In response, Amazon Lex V2 returns the next message to convey to the user and an optional response card to display.</p> <p>If the optional post-fulfillment response is specified, the messages are returned as follows. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/API_PostFulfillmentStatusSpecification.html">PostFulfillmentStatusSpecification</a>.</p> <ul> <li> <p> <b>Success message</b> - Returned if the Lambda function completes successfully and the intent state is fulfilled or ready fulfillment if the message is present.</p> </li> <li> <p> <b>Failed message</b> - The failed message is returned if the Lambda function throws an exception or if the Lambda function returns a failed intent state without a message.</p> </li> <li> <p> <b>Timeout message</b> - If you don''t configure a timeout message and a timeout, and the Lambda function doesn''t return within 30 seconds, the timeout message is returned. If you configure a timeout, the timeout message is returned when the period times out. </p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/streaming-progress.html#progress-complete.html">Completion message</a>.</p>'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/RecognizeTextResponse'
'480':
description: AccessDeniedException
content:
application/json:
schema:
$ref: '#/components/schemas/AccessDeniedException'
'481':
description: ResourceNotFoundException
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceNotFoundException'
'482':
description: ValidationException
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationException'
'483':
description: ThrottlingException
content:
application/json:
schema:
$ref: '#/components/schemas/ThrottlingException'
'484':
description: InternalServerException
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerException'
'485':
description: ConflictException
content:
application/json:
schema:
$ref: '#/components/schemas/ConflictException'
'486':
description: DependencyFailedException
content:
application/json:
schema:
$ref: '#/components/schemas/DependencyFailedException'
'487':
description: BadGatewayException
content:
application/json:
schema:
$ref: '#/components/schemas/BadGatewayException'
parameters:
- name: botId
in: path
required: true
description: The identifier of the bot that processes the request.
schema:
type: string
pattern: '^[0-9a-zA-Z]+$'
minLength: 10
maxLength: 10
- name: botAliasId
in: path
required: true
description: The alias identifier in use for the bot that processes the request.
schema:
type: string
- name: localeId
in: path
required: true
description: The locale where the session is in use.
schema:
type: string
minLength: 1
- name: sessionId
in: path
required: true
description: The identifier of the user session that is having the conversation.
schema:
type: string
pattern: '[0-9a-zA-Z._:-]+'
minLength: 2
maxLength: 100
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- text
properties:
text:
description: The text that the user entered. Amazon Lex V2 interprets this text.
type: string
minLength: 1
maxLength: 1024
format: password
sessionState:
description: The state of the user's session with Amazon Lex V2.
type: object
properties:
dialogAction:
allOf:
- $ref: '#/components/schemas/DialogAction'
- description: The next step that Amazon Lex V2 should take in the conversation with a user.
intent:
allOf:
- $ref: '#/components/schemas/Intent'
- description: The active intent that Amazon Lex V2 is processing.
activeContexts:
allOf:
- $ref: '#/components/schemas/ActiveContextsList'
- description: 'One or more contexts that indicate to Amazon Lex V2 the context of a request. When a context is active, Amazon Lex V2 considers intents with the matching context as a trigger as the next intent in a session.'
sessionAttributes:
allOf:
- $ref: '#/components/schemas/StringMap'
- description: Map of key/value pairs representing session-specific context information. It contains application information passed between Amazon Lex V2 and a client application.
originatingRequestId:
allOf:
- $ref: '#/components/schemas/NonEmptyString'
- description: A unique identifier for a specific request.
runtimeHints:
allOf:
- $ref: '#/components/schemas/RuntimeHints'
- description: Hints for phrases that a customer is likely to use for a slot. Amazon Lex V2 uses the hints to help determine the correct value of a slot.
requestAttributes:
description: '<p>Request-specific information passed between the client application and Amazon Lex V2 </p> <p>The namespace <code>x-amz-lex:</code> is reserved for special attributes. Don''t create any request attributes with the prefix <code>x-amz-lex:</code>.</p>'
type: object
additionalProperties:
$ref: '#/components/schemas/String'
parameters:
- $ref: '#/components/parameters/X-Amz-Content-Sha256'
- $ref: '#/components/parameters/X-Amz-Date'
- $ref: '#/components/parameters/X-Amz-Algorithm'
- $ref: '#/components/parameters/X-Amz-Credential'
- $ref: '#/components/parameters/X-Amz-Security-Token'
- $ref: '#/components/parameters/X-Amz-Signature'
- $ref: '#/components/parameters/X-Amz-SignedHeaders'
'/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/utterance#Content-Type':
post:
operationId: RecognizeUtterance
description: '<p>Sends user input to Amazon Lex V2. You can send text or speech. Clients use this API to send text and audio requests to Amazon Lex V2 at runtime. Amazon Lex V2 interprets the user input using the machine learning model built for the bot.</p> <p>The following request fields must be compressed with gzip and then base64 encoded before you send them to Amazon Lex V2. </p> <ul> <li> <p>requestAttributes</p> </li> <li> <p>sessionState</p> </li> </ul> <p>The following response fields are compressed using gzip and then base64 encoded by Amazon Lex V2. Before you can use these fields, you must decode and decompress them. </p> <ul> <li> <p>inputTranscript</p> </li> <li> <p>interpretations</p> </li> <li> <p>messages</p> </li> <li> <p>requestAttributes</p> </li> <li> <p>sessionState</p> </li> </ul> <p>The example contains a Java application that compresses and encodes a Java object to send to Amazon Lex V2, and a second that decodes and decompresses a response from Amazon Lex V2.</p> <p>If the optional post-fulfillment response is specified, the messages are returned as follows. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/API_PostFulfillmentStatusSpecification.html">PostFulfillmentStatusSpecification</a>.</p> <ul> <li> <p> <b>Success message</b> - Returned if the Lambda function completes successfully and the intent state is fulfilled or ready fulfillment if the message is present.</p> </li> <li> <p> <b>Failed message</b> - The failed message is returned if the Lambda function throws an exception or if the Lambda function returns a failed intent state without a message.</p> </li> <li> <p> <b>Timeout message</b> - If you don''t configure a timeout message and a timeout, and the Lambda function doesn''t return within 30 seconds, the timeout message is returned. If you configure a timeout, the timeout message is returned when the period times out. </p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/streaming-progress.html#progress-complete.html">Completion message</a>.</p>'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/RecognizeUtteranceResponse'
'480':
description: AccessDeniedException
content:
application/json:
schema:
$ref: '#/components/schemas/AccessDeniedException'
'481':
description: ResourceNotFoundException
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceNotFoundException'
'482':
description: ValidationException
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationException'
'483':
description: ThrottlingException
content:
application/json:
schema:
$ref: '#/components/schemas/ThrottlingException'
'484':
description: InternalServerException
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerException'
'485':
description: ConflictException
content:
application/json:
schema:
$ref: '#/components/schemas/ConflictException'
'486':
description: DependencyFailedException
content:
application/json:
schema:
$ref: '#/components/schemas/DependencyFailedException'
'487':
description: BadGatewayException
content:
application/json:
schema:
$ref: '#/components/schemas/BadGatewayException'
parameters:
- name: botId
in: path
required: true
description: The identifier of the bot that should receive the request.
schema:
type: string
pattern: '^[0-9a-zA-Z]+$'
minLength: 10
maxLength: 10
- name: botAliasId
in: path
required: true
description: The alias identifier in use for the bot that should receive the request.
schema:
type: string
- name: localeId
in: path
required: true
description: The locale where the session is in use.
schema:
type: string
minLength: 1
- name: sessionId
in: path
required: true
description: The identifier of the session in use.
schema:
type: string
pattern: '[0-9a-zA-Z._:-]+'
minLength: 2
maxLength: 100
- name: x-amz-lex-session-state
in: header
required: false
description: '<p>Sets the state of the session with the user. You can use this to set the current intent, attributes, context, and dialog action. Use the dialog action to determine the next step that Amazon Lex V2 should use in the conversation with the user.</p> <p>The <code>sessionState</code> field must be compressed using gzip and then base64 encoded before sending to Amazon Lex V2.</p>'
schema:
type: string
format: password
- name: x-amz-lex-request-attributes
in: header
required: false
description: '<p>Request-specific information passed between the client application and Amazon Lex V2 </p> <p>The namespace <code>x-amz-lex:</code> is reserved for special attributes. Don''t create any request attributes for prefix <code>x-amz-lex:</code>.</p> <p>The <code>requestAttributes</code> field must be compressed using gzip and then base64 encoded before sending to Amazon Lex V2.</p>'
schema:
type: string
format: password
- name: Content-Type
in: header
required: true
description: '<p>Indicates the format for audio input or that the content is text. The header must start with one of the following prefixes:</p> <ul> <li> <p>PCM format, audio data must be in little-endian byte order.</p> <ul> <li> <p>audio/l16; rate=16000; channels=1</p> </li> <li> <p>audio/x-l16; sample-rate=16000; channel-count=1</p> </li> <li> <p>audio/lpcm; sample-rate=8000; sample-size-bits=16; channel-count=1; is-big-endian=false</p> </li> </ul> </li> <li> <p>Opus format</p> <ul> <li> <p>audio/x-cbr-opus-with-preamble;preamble-size=0;bit-rate=256000;frame-size-milliseconds=4</p> </li> </ul> </li> <li> <p>Text format</p> <ul> <li> <p>text/plain; charset=utf-8</p> </li> </ul> </li> </ul>'
schema:
type: string
minLength: 1
- name: Response-Content-Type
in: header
required: false
description: '<p>The message that Amazon Lex V2 returns in the response can be either text or speech based on the <code>responseContentType</code> value.</p> <ul> <li> <p>If the value is <code>text/plain;charset=utf-8</code>, Amazon Lex V2 returns text in the response.</p> </li> <li> <p>If the value begins with <code>audio/</code>, Amazon Lex V2 returns speech in the response. Amazon Lex V2 uses Amazon Polly to generate the speech using the configuration that you specified in the <code>responseContentType</code> parameter. For example, if you specify <code>audio/mpeg</code> as the value, Amazon Lex V2 returns speech in the MPEG format.</p> </li> <li> <p>If the value is <code>audio/pcm</code>, the speech returned is <code>audio/pcm</code> at 16 KHz in 16-bit, little-endian format.</p> </li> <li> <p>The following are the accepted values:</p> <ul> <li> <p>audio/mpeg</p> </li> <li> <p>audio/ogg</p> </li> <li> <p>audio/pcm (16 KHz)</p> </li> <li> <p>audio/* (defaults to mpeg)</p> </li> <li> <p>text/plain; charset=utf-8</p> </li> </ul> </li> </ul>'
schema:
type: string
minLength: 1
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
inputStream:
description: User input in PCM or Opus audio format or text format as described in the <code>requestContentType</code> parameter.
type: string
parameters:
- $ref: '#/components/parameters/X-Amz-Content-Sha256'
- $ref: '#/components/parameters/X-Amz-Date'
- $ref: '#/components/parameters/X-Amz-Algorithm'
- $ref: '#/components/parameters/X-Amz-Credential'
- $ref: '#/components/parameters/X-Amz-Security-Token'
- $ref: '#/components/parameters/X-Amz-Signature'
- $ref: '#/components/parameters/X-Amz-SignedHeaders'
components:
parameters:
X-Amz-Content-Sha256:
name: X-Amz-Content-Sha256
in: header
schema:
type: string
required: false
X-Amz-Date:
name: X-Amz-Date
in: header
schema:
type: string
required: false
X-Amz-Algorithm:
name: X-Amz-Algorithm
in: header
schema:
type: string
required: false
X-Amz-Credential:
name: X-Amz-Credential
in: header
schema:
type: string
required: false
X-Amz-Security-Token:
name: X-Amz-Security-Token
in: header
schema:
type: string
required: false
X-Amz-Signature:
name: X-Amz-Signature
in: header
schema:
type: string
required: false
X-Amz-SignedHeaders:
name: X-Amz-SignedHeaders
in: header
schema:
type: string
required: false
securitySchemes:
hmac:
type: apiKey
name: Authorization
in: header
description: Amazon Signature authorization v4
x-amazon-apigateway-authtype: awsSigv4
schemas:
DeleteSessionResponse:
type: object
properties:
botId:
allOf:
- $ref: '#/components/schemas/BotIdentifier'
- description: The identifier of the bot that contained the session data.
botAliasId:
allOf:
- $ref: '#/components/schemas/BotAliasIdentifier'
- description: The alias identifier in use for the bot that contained the session data.
localeId:
allOf:
- $ref: '#/components/schemas/LocaleId'
- description: The locale where the session was used.
sessionId:
allOf:
- $ref: '#/components/schemas/SessionId'
- description: The identifier of the deleted session.
AccessDeniedException: {}
ResourceNotFoundException: {}
ValidationException: {}
ThrottlingException: {}
InternalServerException: {}
ConflictException: {}
GetSessionResponse:
type: object
properties:
sessionId:
allOf:
- $ref: '#/components/schemas/NonEmptyString'
- description: The identifier of the returned session.
messages:
allOf:
- $ref: '#/components/schemas/Messages'
- description: 'A list of messages that were last sent to the user. The messages are ordered based on the order that your returned the messages from your Lambda function or the order that messages are defined in the bot. '
interpretations:
allOf:
- $ref: '#/components/schemas/Interpretations'
- description: '<p>A list of intents that Amazon Lex V2 determined might satisfy the user''s utterance. </p> <p>Each interpretation includes the intent, a score that indicates how confident Amazon Lex V2 is that the interpretation is the correct one, and an optional sentiment response that indicates the sentiment expressed in the utterance.</p>'
sessionState:
allOf:
- $ref: '#/components/schemas/SessionState'
- description: <p>Represents the current state of the dialog between the user and the bot.</p> <p>You can use this to determine the progress of the conversation and what the next action might be.</p>
PutSessionResponse:
type: object
properties:
audioStream:
allOf:
- $ref: '#/components/schemas/BlobStream'
- description: 'If the requested content type was audio, the audio version of the message to convey to the user.'
Message:
type: object
required:
- contentType
properties:
content:
allOf:
- $ref: '#/components/schemas/Text'
- description: The text of the message.
contentType:
allOf:
- $ref: '#/components/schemas/MessageContentType'
- description: Indicates the type of response.
imageResponseCard:
$ref: '#/components/schemas/ImageResponseCard'
description: Container for text that is returned to the customer..
DialogAction:
type: object
required:
- type
properties:
type:
allOf:
- $ref: '#/components/schemas/DialogActionType'
- description: '<p>The next action that the bot should take in its interaction with the user. The possible values are:</p> <ul> <li> <p> <code>Close</code> - Indicates that there will not be a response from the user. For example, the statement "Your order has been placed" does not require a response.</p> </li> <li> <p> <code>ConfirmIntent</code> - The next action is asking the user if the intent is complete and ready to be fulfilled. This is a yes/no question such as "Place the order?"</p> </li> <li> <p> <code>Delegate</code> - The next action is determined by Amazon Lex V2.</p> </li> <li> <p> <code>ElicitIntent</code> - The next action is to elicit an intent from the user.</p> </li> <li> <p> <code>ElicitSlot</code> - The next action is to elicit a slot value from the user.</p> </li> </ul>'
slotToElicit:
allOf:
- $ref: '#/components/schemas/NonEmptyString'
- description: The name of the slot that should be elicited from the user.
slotElicitationStyle:
allOf:
- $ref: '#/components/schemas/StyleType'
- description: '<p>Configures the slot to use spell-by-letter or spell-by-word style. When you use a style on a slot, users can spell out their input to make it clear to your bot.</p> <ul> <li> <p>Spell by letter - "b" "o" "b"</p> </li> <li> <p>Spell by word - "b as in boy" "o as in oscar" "b as in boy"</p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/using-spelling.html"> Using spelling to enter slot values </a>.</p>'
subSlotToElicit:
allOf:
- $ref: '#/components/schemas/ElicitSubSlot'
- description: The name of the constituent sub slot of the composite slot specified in slotToElicit that should be elicited from the user.
description: The next action that Amazon Lex V2 should take.
Intent:
type: object
required:
- name
properties:
name:
allOf:
- $ref: '#/components/schemas/NonEmptyString'
- description: The name of the intent.
slots:
allOf:
- $ref: '#/components/schemas/Slots'
- description: 'A map of all of the slots for the intent. The name of the slot maps to the value of the slot. If a slot has not been filled, the value is null.'
state:
allOf:
- $ref: '#/components/schemas/IntentState'
- description: 'Contains fulfillment information for the intent. '
confirmationState:
allOf:
- $ref: '#/components/schemas/ConfirmationState'
- description: Contains information about whether fulfillment of the intent has been confirmed.
description: The current intent that Amazon Lex V2 is attempting to fulfill.
ActiveContextsList:
type: array
items:
$ref: '#/components/schemas/ActiveContext'
minItems: 0
maxItems: 20
StringMap:
type: object
additionalProperties:
$ref: '#/components/schemas/String'
NonEmptyString:
type: string
minLength: 1
RuntimeHints:
type: object
properties:
slotHints:
allOf:
- $ref: '#/components/schemas/SlotHintsIntentMap'
- description: '<p>A list of the slots in the intent that should have runtime hints added, and the phrases that should be added for each slot.</p> <p>The first level of the <code>slotHints</code> map is the name of the intent. The second level is the name of the slot within the intent. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/using-hints.html">Using hints to improve accuracy</a>.</p> <p>The intent name and slot name must exist.</p>'
description: '<p>You can provide Amazon Lex V2 with hints to the phrases that a customer is likely to use for a slot. When a slot with hints is resolved, the phrases in the runtime hints are preferred in the resolution. You can provide hints for a maximum of 100 intents. You can provide a maximum of 100 slots.</p> <p>Before you can use runtime hints with an existing bot, you must first rebuild the bot.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/using-hints.html">Using runtime hints to improve recognition of slot values</a>.</p>'
String:
type: string
DependencyFailedException: {}
BadGatewayException: {}
RecognizeTextResponse:
type: object
properties:
messages:
allOf:
- $ref: '#/components/schemas/Messages'
- description: A list of messages last sent to the user. The messages are ordered based on the order that you returned the messages from your Lambda function or the order that the messages are defined in the bot.
sessionState:
allOf:
- $ref: '#/components/schemas/SessionState'
- description: <p>Represents the current state of the dialog between the user and the bot. </p> <p>Use this to determine the progress of the conversation and what the next action may be.</p>
interpretations:
allOf:
- $ref: '#/components/schemas/Interpretations'
- description: '<p>A list of intents that Amazon Lex V2 determined might satisfy the user''s utterance. </p> <p>Each interpretation includes the intent, a score that indicates now confident Amazon Lex V2 is that the interpretation is the correct one, and an optional sentiment response that indicates the sentiment expressed in the utterance.</p>'
requestAttributes:
allOf:
- $ref: '#/components/schemas/StringMap'
- description: The attributes sent in the request.
sessionId:
allOf:
- $ref: '#/components/schemas/SessionId'
- description: The identifier of the session in use.
recognizedBotMember:
allOf:
- $ref: '#/components/schemas/RecognizedBotMember'
- description: The bot member that recognized the text.
RecognizeUtteranceResponse:
type: object
properties:
audioStream:
allOf:
- $ref: '#/components/schemas/BlobStream'
- description: 'The prompt or statement to send to the user. This is based on the bot configuration and context. For example, if Amazon Lex V2 did not understand the user intent, it sends the <code>clarificationPrompt</code> configured for the bot. If the intent requires confirmation before taking the fulfillment action, it sends the <code>confirmationPrompt</code>. Another example: Suppose that the Lambda function successfully fulfilled the intent, and sent a message to convey to the user. Then Amazon Lex V2 sends that message in the response.'
ActiveContextName:
type: string
pattern: '^([A-Za-z]_?)+$'
minLength: 1
maxLength: 100
ActiveContextTimeToLive:
type: object
required:
- timeToLiveInSeconds
- turnsToLive
properties:
timeToLiveInSeconds:
allOf:
- $ref: '#/components/schemas/ActiveContextTimeToLiveInSeconds'
- description: The number of seconds that the context is active. You can specify between 5 and 86400 seconds (24 hours).
turnsToLive:
allOf:
- $ref: '#/components/schemas/ActiveContextTurnsToLive'
- description: The number of turns that the context is active. You can specify up to 20 turns. Each request and response from the bot is a turn.
description: The time that a context is active. You can specify the time to live in seconds or in conversation turns.
ActiveContextParametersMap:
type: object
minProperties: 0
maxProperties: 10
additionalProperties:
$ref: '#/components/schemas/Text'
ActiveContext:
type: object
required:
- name
- timeToLive
- contextAttributes
properties:
name:
allOf:
- $ref: '#/components/schemas/ActiveContextName'
- description: The name of the context.
timeToLive:
allOf:
- $ref: '#/components/schemas/ActiveContextTimeToLive'
- description: 'Indicates the number of turns or seconds that the context is active. Once the time to live expires, the context is no longer returned in a response.'
contextAttributes:
allOf:
- $ref: '#/components/schemas/ActiveContextParametersMap'
- description: '<p>A list of contexts active for the request. A context can be activated when a previous intent is fulfilled, or by including the context in the request.</p> <p>If you don''t specify a list of contexts, Amazon Lex V2 will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared. </p>'
description: '<p>Contains information about the contexts that a user is using in a session. You can configure Amazon Lex V2 to set a context when an intent is fulfilled, or you can set a context using the , , or operations.</p> <p>Use a context to indicate to Amazon Lex V2 intents that should be used as follow-up intents. For example, if the active context is <code>order-fulfilled</code>, only intents that have <code>order-fulfilled</code> configured as a trigger are considered for follow up.</p>'
Text:
type: string
minLength: 1
maxLength: 1024
format: password
ActiveContextTimeToLiveInSeconds:
type: integer
minimum: 5
maximum: 86400
ActiveContextTurnsToLive:
type: integer
minimum: 1
maximum: 20
AttachmentTitle:
type: string
minLength: 1
maxLength: 250
AttachmentUrl:
type: string
minLength: 1
maxLength: 250
BlobStream:
type: string
BotAliasIdentifier:
type: string
BotIdentifier:
type: string
pattern: '^[0-9a-zA-Z]+$'