CreateVocabulary - Amazon Connect

CreateVocabulary

Creates a custom vocabulary associated with your Amazon Connect instance. You can set a custom vocabulary to be your default vocabulary for a given language. Contact Lens for Amazon Connect uses the default vocabulary in post-call and real-time contact analysis sessions for that language.

Request Syntax

POST /vocabulary/InstanceId HTTP/1.1 Content-type: application/json { "ClientToken": "string", "Content": "string", "LanguageCode": "string", "Tags": { "string" : "string" }, "VocabularyName": "string" }

URI Request Parameters

The request uses the following URI parameters.

InstanceId

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

Length Constraints: Minimum length of 1. Maximum length of 100.

Required: Yes

Request Body

The request accepts the following data in JSON format.

ClientToken

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If a create request is received more than once with same client token, subsequent requests return the previous response without creating a vocabulary again.

Type: String

Length Constraints: Maximum length of 500.

Required: No

Content

The content of the custom vocabulary in plain-text format with a table of values. Each row in the table represents a word or a phrase, described with Phrase, IPA, SoundsLike, and DisplayAs fields. Separate the fields with TAB characters. The size limit is 50KB. For more information, see Create a custom vocabulary using a table.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 60000.

Required: Yes

LanguageCode

The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see What is Amazon Transcribe?

Type: String

Valid Values: ar-AE | de-CH | de-DE | en-AB | en-AU | en-GB | en-IE | en-IN | en-US | en-WL | es-ES | es-US | fr-CA | fr-FR | hi-IN | it-IT | ja-JP | ko-KR | pt-BR | pt-PT | zh-CN

Required: Yes

Tags

The tags used to organize, track, or control access for this resource.

Type: String to string map

Map Entries: Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^(?!aws:)[a-zA-Z+-=._:/]+$

Value Length Constraints: Maximum length of 256.

Required: No

VocabularyName

A unique name of the custom vocabulary.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 140.

Pattern: ^[0-9a-zA-Z._-]+

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "State": "string", "VocabularyArn": "string", "VocabularyId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

State

The current state of the custom vocabulary.

Type: String

Valid Values: CREATION_IN_PROGRESS | ACTIVE | CREATION_FAILED | DELETE_IN_PROGRESS

VocabularyArn

The Amazon Resource Name (ARN) of the custom vocabulary.

Type: String

VocabularyId

The identifier of the custom vocabulary.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 500.

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You do not have sufficient permissions to perform this action.

HTTP Status Code: 403

InternalServiceException

Request processing failed because of an error or failure with the service.

HTTP Status Code: 500

InvalidRequestException

The request is not valid.

HTTP Status Code: 400

ResourceConflictException

A resource already has that name.

HTTP Status Code: 409

ResourceNotFoundException

The specified resource was not found.

HTTP Status Code: 404

ServiceQuotaExceededException

The service quota has been exceeded.

HTTP Status Code: 402

ThrottlingException

The throttling limit has been exceeded.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: