View a markdown version of this page

UpdateLanguageModel - Amazon Transcribe

UpdateLanguageModel

Updates the encryption configuration for an existing custom language model. You can use this operation to change the AWS KMS key used to encrypt your model artifacts. The model artifacts are re-encrypted in place. No model training is required.

Your custom language model must not be in the IN_PROGRESS state when you call this operation. You cannot submit another update while a previous update is in progress. Use DescribeLanguageModel to check the current state of your model.

Your custom language model remains available for transcription jobs while the update is being processed.

Request Syntax

{ "DataAccessRoleArn": "string", "EncryptionConfiguration": { "KMSEncryptionContext": { "string" : "string" }, "KMSKey": "string" }, "ModelName": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

DataAccessRoleArn

The Amazon Resource Name (ARN) of an IAM role. If you include EncryptionConfiguration in your request, this role must have permissions to access the specified AWS KMS key. If the role that you specify doesn't have the appropriate permissions, your request fails.

IAM role ARNs have the format arn:partition:iam::account:role/role-name-with-path. For example: arn:aws:iam::111122223333:role/Admin.

For more information, see IAM ARNs.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Pattern: ^arn:(aws|aws-cn|aws-us-gov|aws-iso-{0,1}[a-z]{0,1}):iam::[0-9]{0,63}:role/[A-Za-z0-9:_/+=,@.-]{0,1024}$

Required: No

EncryptionConfiguration

Specifies the new encryption configuration for your custom language model. The model artifacts are re-encrypted in place using the specified AWS KMS key or with an AWS owned key if a key is not supplied.

Type: EncryptionConfiguration object

Required: No

ModelName

The name of the custom language model you want to update. Model names are case sensitive.

Type: String

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

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

Required: Yes

Response Syntax

{ "LastModifiedTime": number, "ModelName": "string", "ModelStatus": "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.

LastModifiedTime

The date and time the specified custom language model was last modified.

Type: Timestamp

ModelName

The name of the custom language model that was updated.

Type: String

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

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

ModelStatus

The status of the specified custom language model.

Type: String

Valid Values: IN_PROGRESS | FAILED | COMPLETED

Errors

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

BadRequestException

Your request didn't pass one or more validation tests. This can occur when the entity you're trying to delete doesn't exist or if it's in a non-terminal state (such as IN PROGRESS). See the exception message field for more information.

HTTP Status Code: 400

ConflictException

A resource already exists with this name. Resource names must be unique within an AWS account.

HTTP Status Code: 400

InternalFailureException

There was an internal error. Check the error message, correct the issue, and try your request again.

HTTP Status Code: 500

LimitExceededException

You've either sent too many requests or your input file is too long. Wait before retrying your request, or use a smaller file and try your request again.

HTTP Status Code: 400

NotFoundException

We can't find the requested resource. Check that the specified name is correct and try your request again.

HTTP Status Code: 400

See Also

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