openapi: 3.2.0 info: title: Amazon Lex Model Building V2 Testsets API description: Amazon Lex V2 Model Building operations let you build and manage conversational bots — bots, aliases, locales, intents, slots, slot types, custom vocabularies, imports/exports, test sets and analytics. Derived mechanically from the AWS-published Smithy 2.0 service model (aws/api-models-aws, models/lex-models-v2/service/2020-08-07). Requests are signed with AWS Signature Version 4 using service name lex. version: '2020-08-07' contact: name: AWS Support url: https://aws.amazon.com/premiumsupport/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html x-generated-from: AWS Smithy 2.0 service model (https://github.com/aws/api-models-aws) — mechanical transform, no hand-authored operations servers: - url: https://models-v2-lex.us-east-1.amazonaws.com description: Amazon Lex V2 Model Building endpoint (us-east-1; one regional endpoint per AWS Region — see https://docs.aws.amazon.com/general/latest/gr/lex.html) security: - sigv4: [] tags: - name: testsets paths: /testsets: post: operationId: ListTestSets summary: The list of the test sets tags: - testsets requestBody: required: false content: application/json: schema: type: object properties: sortBy: $ref: '#/components/schemas/TestSetSortBy' maxResults: type: integer minimum: 1 maximum: 1000 description: The maximum number of test sets to return in each page. If there are fewer results than the max page size, only the actual number of results are returned. nextToken: type: string description: If the response from the ListTestSets operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results. responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/ListTestSetsResponse' '400': description: ValidationException content: application/json: schema: $ref: '#/components/schemas/ValidationException' '402': description: ServiceQuotaExceededException content: application/json: schema: $ref: '#/components/schemas/ServiceQuotaExceededException' '429': description: ThrottlingException content: application/json: schema: $ref: '#/components/schemas/ThrottlingException' '500': description: InternalServerException content: application/json: schema: $ref: '#/components/schemas/InternalServerException' /testsets/{testSetId}: delete: operationId: DeleteTestSet summary: The action to delete the selected test set description: The action to delete the selected test set. tags: - testsets parameters: - name: testSetId in: path required: true description: The test set Id of the test set to be deleted. schema: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ responses: '204': description: Success '400': description: ValidationException content: application/json: schema: $ref: '#/components/schemas/ValidationException' '402': description: ServiceQuotaExceededException content: application/json: schema: $ref: '#/components/schemas/ServiceQuotaExceededException' '409': description: ConflictException content: application/json: schema: $ref: '#/components/schemas/ConflictException' '412': description: PreconditionFailedException content: application/json: schema: $ref: '#/components/schemas/PreconditionFailedException' '429': description: ThrottlingException content: application/json: schema: $ref: '#/components/schemas/ThrottlingException' '500': description: InternalServerException content: application/json: schema: $ref: '#/components/schemas/InternalServerException' get: operationId: DescribeTestSet summary: Gets metadata information about the test set description: Gets metadata information about the test set. tags: - testsets parameters: - name: testSetId in: path required: true description: The test set Id for the test set request. schema: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/DescribeTestSetResponse' '400': description: ValidationException content: application/json: schema: $ref: '#/components/schemas/ValidationException' '402': description: ServiceQuotaExceededException content: application/json: schema: $ref: '#/components/schemas/ServiceQuotaExceededException' '404': description: ResourceNotFoundException content: application/json: schema: $ref: '#/components/schemas/ResourceNotFoundException' '429': description: ThrottlingException content: application/json: schema: $ref: '#/components/schemas/ThrottlingException' '500': description: InternalServerException content: application/json: schema: $ref: '#/components/schemas/InternalServerException' put: operationId: UpdateTestSet summary: The action to update the test set description: The action to update the test set. tags: - testsets parameters: - name: testSetId in: path required: true description: The test set Id for which update test operation to be performed. schema: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ requestBody: required: true content: application/json: schema: type: object properties: testSetName: type: string minLength: 1 maxLength: 100 pattern: ^([0-9a-zA-Z][_-]?){1,100}$ description: The new test set name. description: type: string minLength: 0 maxLength: 2000 description: The new test set description. required: - testSetName responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/UpdateTestSetResponse' '400': description: ValidationException content: application/json: schema: $ref: '#/components/schemas/ValidationException' '402': description: ServiceQuotaExceededException content: application/json: schema: $ref: '#/components/schemas/ServiceQuotaExceededException' '409': description: ConflictException content: application/json: schema: $ref: '#/components/schemas/ConflictException' '412': description: PreconditionFailedException content: application/json: schema: $ref: '#/components/schemas/PreconditionFailedException' '429': description: ThrottlingException content: application/json: schema: $ref: '#/components/schemas/ThrottlingException' '500': description: InternalServerException content: application/json: schema: $ref: '#/components/schemas/InternalServerException' /testsets/{testSetId}/records: post: operationId: ListTestSetRecords summary: The list of test set records description: The list of test set records. tags: - testsets parameters: - name: testSetId in: path required: true description: The identifier of the test set to list its test set records. schema: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ requestBody: required: false content: application/json: schema: type: object properties: maxResults: type: integer minimum: 1 maximum: 1000 description: The maximum number of test set records to return in each page. If there are fewer records than the max page size, only the actual number of records are returned. nextToken: type: string description: If the response from the ListTestSetRecords operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results. responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/ListTestSetRecordsResponse' '400': description: ValidationException content: application/json: schema: $ref: '#/components/schemas/ValidationException' '402': description: ServiceQuotaExceededException content: application/json: schema: $ref: '#/components/schemas/ServiceQuotaExceededException' '404': description: ResourceNotFoundException content: application/json: schema: $ref: '#/components/schemas/ResourceNotFoundException' '429': description: ThrottlingException content: application/json: schema: $ref: '#/components/schemas/ThrottlingException' '500': description: InternalServerException content: application/json: schema: $ref: '#/components/schemas/InternalServerException' /testsets/{testSetId}/testexecutions: post: operationId: StartTestExecution summary: The action to start test set execution description: The action to start test set execution. tags: - testsets parameters: - name: testSetId in: path required: true description: The test set Id for the test set execution. schema: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ requestBody: required: true content: application/json: schema: type: object properties: target: $ref: '#/components/schemas/TestExecutionTarget' apiMode: type: string enum: - Streaming - NonStreaming description: Indicates whether we use streaming or non-streaming APIs for the test set execution. For streaming, StartConversation Runtime API is used. Whereas, for non-streaming, RecognizeUtterance and RecognizeText Amazon Lex Runtime API are used. testExecutionModality: type: string enum: - Text - Audio description: Indicates whether audio or text is used. required: - target - apiMode responses: '202': description: Success content: application/json: schema: $ref: '#/components/schemas/StartTestExecutionResponse' '400': description: ValidationException content: application/json: schema: $ref: '#/components/schemas/ValidationException' '402': description: ServiceQuotaExceededException content: application/json: schema: $ref: '#/components/schemas/ServiceQuotaExceededException' '404': description: ResourceNotFoundException content: application/json: schema: $ref: '#/components/schemas/ResourceNotFoundException' '409': description: ConflictException content: application/json: schema: $ref: '#/components/schemas/ConflictException' '429': description: ThrottlingException content: application/json: schema: $ref: '#/components/schemas/ThrottlingException' '500': description: InternalServerException content: application/json: schema: $ref: '#/components/schemas/InternalServerException' /testsets/{testSetId}/testsetdiscrepancy: post: operationId: CreateTestSetDiscrepancyReport summary: Create a report that describes the differences between the bot and the test set description: Create a report that describes the differences between the bot and the test set. tags: - testsets parameters: - name: testSetId in: path required: true description: The test set Id for the test set discrepancy report. schema: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ requestBody: required: true content: application/json: schema: type: object properties: target: $ref: '#/components/schemas/TestSetDiscrepancyReportResourceTarget' required: - target responses: '202': description: Success content: application/json: schema: $ref: '#/components/schemas/CreateTestSetDiscrepancyReportResponse' '400': description: ValidationException content: application/json: schema: $ref: '#/components/schemas/ValidationException' '402': description: ServiceQuotaExceededException content: application/json: schema: $ref: '#/components/schemas/ServiceQuotaExceededException' '404': description: ResourceNotFoundException content: application/json: schema: $ref: '#/components/schemas/ResourceNotFoundException' '409': description: ConflictException content: application/json: schema: $ref: '#/components/schemas/ConflictException' '429': description: ThrottlingException content: application/json: schema: $ref: '#/components/schemas/ThrottlingException' '500': description: InternalServerException content: application/json: schema: $ref: '#/components/schemas/InternalServerException' components: schemas: InternalServerException: type: object description: The service encountered an unexpected condition. Try your request again. properties: message: type: string TestSetTurnRecord: type: object description: Contains information about a turn in a test set. properties: recordNumber: type: integer format: int64 minimum: 1 maximum: 200000 description: The record number associated with the turn. conversationId: type: string minLength: 1 maxLength: 50 pattern: ^([0-9a-zA-Z][_-]?)+$ description: The unique identifier for the conversation associated with the turn. turnNumber: type: integer minimum: 0 maximum: 30 description: The number of turns that has elapsed up to that turn. turnSpecification: $ref: '#/components/schemas/TurnSpecification' required: - recordNumber - turnSpecification UserTurnSlotOutput: type: object description: Contains information about a slot output by the test set execution. properties: value: type: string minLength: 1 description: The value output by the slot recognition. values: type: array items: $ref: '#/components/schemas/UserTurnSlotOutput' subSlots: type: object additionalProperties: $ref: '#/components/schemas/UserTurnSlotOutput' ListTestSetRecordsResponse: type: object properties: testSetRecords: type: array items: $ref: '#/components/schemas/TestSetTurnRecord' nextToken: type: string description: A token that indicates whether there are more records to return in a response to the ListTestSetRecords operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListTestSetRecords operation request to get the next page of records. PreconditionFailedException: type: object description: Your request couldn't be completed because one or more request fields aren't valid. Check the fields in your request and try again. properties: message: type: string TestSetSortBy: type: object description: Contains information about the methods by which to sort the test set. properties: attribute: type: string enum: - TestSetName - LastUpdatedDateTime description: Specifies whether to sort the test sets by name or by the time they were last updated. order: type: string enum: - Ascending - Descending description: Specifies whether to sort in ascending or descending order. required: - attribute - order TestSetSummary: type: object description: Contains summary information about the test set. properties: testSetId: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ description: The unique identifier of the test set. testSetName: type: string minLength: 1 maxLength: 100 pattern: ^([0-9a-zA-Z][_-]?){1,100}$ description: The name of the test set. description: type: string minLength: 0 maxLength: 2000 description: The description of the test set. modality: type: string enum: - Text - Audio description: Specifies whether the test set contains written or spoken data. status: type: string enum: - Importing - PendingAnnotation - Deleting - ValidationError - Ready description: The status of the test set. roleArn: type: string minLength: 32 maxLength: 2048 pattern: ^arn:aws:iam::[0-9]{12}:role/.*$ description: The Amazon Resource Name (ARN) of an IAM role that has permission to access the test set. numTurns: type: integer description: The number of turns in the test set. storageLocation: $ref: '#/components/schemas/TestSetStorageLocation' creationDateTime: type: string format: date-time description: The date and time at which the test set was created. lastUpdatedDateTime: type: string format: date-time description: The date and time at which the test set was last updated. UserTurnInputSpecification: type: object description: Contains information about the user messages in the turn in the input. properties: utteranceInput: $ref: '#/components/schemas/UtteranceInputSpecification' requestAttributes: type: object additionalProperties: type: string sessionState: $ref: '#/components/schemas/InputSessionStateSpecification' required: - utteranceInput DescribeTestSetResponse: type: object properties: testSetId: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ description: The test set Id for the test set response. testSetName: type: string minLength: 1 maxLength: 100 pattern: ^([0-9a-zA-Z][_-]?){1,100}$ description: The test set name of the test set. description: type: string minLength: 0 maxLength: 2000 description: The description of the test set. modality: type: string enum: - Text - Audio description: Indicates whether the test set is audio or text data. status: type: string enum: - Importing - PendingAnnotation - Deleting - ValidationError - Ready description: The status of the test set. roleArn: type: string minLength: 32 maxLength: 2048 pattern: ^arn:aws:iam::[0-9]{12}:role/.*$ description: The roleARN used for any operation in the test set to access resources in the Amazon Web Services account. numTurns: type: integer description: The total number of agent and user turn in the test set. storageLocation: $ref: '#/components/schemas/TestSetStorageLocation' creationDateTime: type: string format: date-time description: The creation date and time for the test set data. lastUpdatedDateTime: type: string format: date-time description: The date and time for the last update of the test set data. ValidationException: type: object description: One of the input parameters in your request isn't valid. Check the parameters and try your request again. properties: message: type: string ResourceNotFoundException: type: object description: You asked to describe a resource that doesn't exist. Check the resource that you are requesting and try again. properties: message: type: string AgentTurnSpecification: type: object description: The specification of an agent turn. properties: agentPrompt: type: string minLength: 1 maxLength: 1024 description: The agent prompt for the agent turn in a test set. required: - agentPrompt UpdateTestSetResponse: type: object properties: testSetId: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ description: The test set Id for which update test operation to be performed. testSetName: type: string minLength: 1 maxLength: 100 pattern: ^([0-9a-zA-Z][_-]?){1,100}$ description: The test set name for the updated test set. description: type: string minLength: 0 maxLength: 2000 description: The test set description for the updated test set. modality: type: string enum: - Text - Audio description: Indicates whether audio or text is used for the updated test set. status: type: string enum: - Importing - PendingAnnotation - Deleting - ValidationError - Ready description: The status for the updated test set. roleArn: type: string minLength: 32 maxLength: 2048 pattern: ^arn:aws:iam::[0-9]{12}:role/.*$ description: The roleARN used for any operation in the test set to access resources in the Amazon Web Services account. numTurns: type: integer description: The number of conversation turns from the updated test set. storageLocation: $ref: '#/components/schemas/TestSetStorageLocation' creationDateTime: type: string format: date-time description: The creation date and time for the updated test set. lastUpdatedDateTime: type: string format: date-time description: The date and time of the last update for the updated test set. UtteranceAudioInputSpecification: type: object description: Contains information about the audio for an utterance. properties: audioFileS3Location: type: string minLength: 1 maxLength: 1024 pattern: ^s3://([a-z0-9\\.-]+)/(.+)$ description: Amazon S3 file pointing to the audio. required: - audioFileS3Location ThrottlingException: type: object description: Your request rate is too high. Reduce the frequency of requests. properties: retryAfterSeconds: type: integer description: The number of seconds after which the user can invoke the API again. message: type: string TestSetDiscrepancyReportResourceTarget: type: object description: Contains information about the resource used for the test set discrepancy report. properties: botAliasTarget: $ref: '#/components/schemas/TestSetDiscrepancyReportBotAliasTarget' RuntimeHintDetails: type: object description: Provides an array of phrases that should be given preference when resolving values for a slot. properties: runtimeHintValues: type: array items: $ref: '#/components/schemas/RuntimeHintValue' subSlotHints: type: object additionalProperties: $ref: '#/components/schemas/RuntimeHintDetails' UtteranceInputSpecification: type: object description: Contains information about input of an utterance. properties: textInput: type: string minLength: 1 maxLength: 1024 description: A text input transcription of the utterance. It is only applicable for test-sets containing text data. audioInput: $ref: '#/components/schemas/UtteranceAudioInputSpecification' ListTestSetsResponse: type: object properties: testSets: type: array items: $ref: '#/components/schemas/TestSetSummary' nextToken: type: string description: A token that indicates whether there are more results to return in a response to the ListTestSets operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListTestSets operation request to get the next page of results. StartTestExecutionResponse: type: object properties: testExecutionId: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ description: The unique identifier of the test set execution. creationDateTime: type: string format: date-time description: The creation date and time for the test set execution. testSetId: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ description: The test set Id for the test set execution. target: $ref: '#/components/schemas/TestExecutionTarget' apiMode: type: string enum: - Streaming - NonStreaming description: Indicates whether we use streaming or non-streaming APIs for the test set execution. For streaming, StartConversation Amazon Lex Runtime API is used. Whereas for non-streaming, RecognizeUtterance and RecognizeText Amazon Lex Runtime API are used. testExecutionModality: type: string enum: - Text - Audio description: Indicates whether audio or text is used. ConflictException: type: object description: The action that you tried to perform couldn't be completed because the resource is in a conflicting state. For example, deleting a bot that is in the CREATING state. Try your request again. properties: message: type: string UserTurnOutputSpecification: type: object description: Contains results that are output for the user turn by the test execution. properties: intent: $ref: '#/components/schemas/UserTurnIntentOutput' activeContexts: type: array items: $ref: '#/components/schemas/ActiveContext' transcript: type: string minLength: 1 maxLength: 1024 description: The transcript that is output for the user turn by the test execution. required: - intent TestSetStorageLocation: type: object description: Contains information about the location in which the test set is stored. properties: s3BucketName: type: string minLength: 3 maxLength: 63 pattern: ^[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9]$ description: The name of the Amazon S3 bucket in which the test set is stored. s3Path: type: string minLength: 1 maxLength: 1024 pattern: ^[\.\-\!\*\_\'\(\)a-zA-Z0-9][\.\-\!\*\_\'\(\)\/a-zA-Z0-9]*$ description: The path inside the Amazon S3 bucket where the test set is stored. kmsKeyArn: type: string minLength: 20 maxLength: 2048 pattern: ^arn:[\w\-]+:kms:[\w\-]+:[\d]{12}:(?:key\/[\w\-]+|alias\/[a-zA-Z0-9:\/_\-]{1,256})$ description: The Amazon Resource Name (ARN) of an Amazon Web Services Key Management Service (KMS) key for encrypting the test set. required: - s3BucketName - s3Path UserTurnSpecification: type: object description: Contains information about the expected and input values for the user turn. properties: input: $ref: '#/components/schemas/UserTurnInputSpecification' expected: $ref: '#/components/schemas/UserTurnOutputSpecification' required: - input - expected TestSetDiscrepancyReportBotAliasTarget: type: object description: Contains information about the bot alias used for the test set discrepancy report. properties: botId: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ description: The unique identifier for the bot alias. botAliasId: type: string minLength: 10 maxLength: 10 pattern: ^(\bTSTALIASID\b|[0-9a-zA-Z]+)$ description: The unique identifier for the bot associated with the bot alias. localeId: type: string description: The unique identifier of the locale associated with the bot alias. required: - botId - botAliasId - localeId UserTurnIntentOutput: type: object description: Contains information about the intent that is output for the turn by the test execution. properties: name: type: string minLength: 1 maxLength: 100 pattern: ^([0-9a-zA-Z][_-]?){1,100}$ description: The name of the intent. slots: type: object additionalProperties: $ref: '#/components/schemas/UserTurnSlotOutput' required: - name RuntimeHints: type: object description: You can provide Amazon Lex 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. Before you can use runtime hints with an existing bot, you must first rebuild the bot. For more information, see Using runtime hints to improve recognition of slot values. properties: slotHints: type: object additionalProperties: type: object additionalProperties: $ref: '#/components/schemas/RuntimeHintDetails' TurnSpecification: type: object description: Contains information about the messages in the turn. properties: agentTurn: $ref: '#/components/schemas/AgentTurnSpecification' userTurn: $ref: '#/components/schemas/UserTurnSpecification' BotAliasTestExecutionTarget: type: object description: The target Amazon S3 location for the test set execution using a bot alias. properties: botId: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ description: The bot Id of the bot alias used in the test set execution. botAliasId: type: string minLength: 10 maxLength: 10 pattern: ^(\bTSTALIASID\b|[0-9a-zA-Z]+)$ description: The bot alias Id of the bot alias used in the test set execution. localeId: type: string description: The locale Id of the bot alias used in the test set execution. required: - botId - botAliasId - localeId RuntimeHintValue: type: object description: Provides the phrase that Amazon Lex should look for in the user's input to the bot. properties: phrase: type: string minLength: 1 maxLength: 140 description: The phrase that Amazon Lex should look for in the user's input to the bot. required: - phrase InputSessionStateSpecification: type: object description: Specifications for the current state of the dialog between the user and the bot in the test set. properties: sessionAttributes: type: object additionalProperties: type: string activeContexts: type: array items: $ref: '#/components/schemas/ActiveContext' runtimeHints: $ref: '#/components/schemas/RuntimeHints' ActiveContext: type: object description: The active context used in the test execution. properties: name: type: string minLength: 1 maxLength: 100 pattern: ^([A-Za-z]_?)+$ description: The name of active context. required: - name CreateTestSetDiscrepancyReportResponse: type: object properties: testSetDiscrepancyReportId: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ description: The unique identifier of the test set discrepancy report to describe. creationDateTime: type: string format: date-time description: The creation date and time for the test set discrepancy report. testSetId: type: string minLength: 10 maxLength: 10 pattern: ^[0-9a-zA-Z]+$ description: The test set Id for the test set discrepancy report. target: $ref: '#/components/schemas/TestSetDiscrepancyReportResourceTarget' TestExecutionTarget: type: object description: Contains information about the bot used for the test execution. properties: botAliasTarget: $ref: '#/components/schemas/BotAliasTestExecutionTarget' ServiceQuotaExceededException: type: object description: You have reached a quota for your bot. properties: message: type: string securitySchemes: sigv4: type: apiKey name: Authorization in: header x-amazon-apigateway-authtype: awsSigv4 description: AWS Signature Version 4. Sign requests with SigV4 using service name `lex` and the calling region.