TranscribeService / Client / update_language_model
update_language_model¶
- TranscribeService.Client.update_language_model(**kwargs)¶
Updates the encryption configuration for an existing custom language model. You can use this operation to change the 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_PROGRESSstate when you call this operation. You cannot submit another update while a previous update is in progress. Use to check the current state of your model.Your custom language model remains available for transcription jobs while the update is being processed.
See also: AWS API Documentation
Request Syntax
response = client.update_language_model( ModelName='string', DataAccessRoleArn='string', EncryptionConfiguration={ 'KMSEncryptionContext': { 'string': 'string' }, 'KMSKey': 'string' } )
- Parameters:
ModelName (string) –
[REQUIRED]
The name of the custom language model you want to update. Model names are case sensitive.
DataAccessRoleArn (string) –
The Amazon Resource Name (ARN) of an IAM role. If you include
EncryptionConfigurationin your request, this role must have permissions to access the specified 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.
EncryptionConfiguration (dict) –
Specifies the new encryption configuration for your custom language model. The model artifacts are re-encrypted in place using the specified KMS key or with an AWS-owned key if a key is not supplied.
KMSEncryptionContext (dict) –
A map of plain text, non-secret key:value pairs, known as encryption context pairs, that provide an added layer of security for your data. For more information, see KMS encryption context.
(string) –
(string) –
KMSKey (string) – [REQUIRED]
The Amazon Resource Name (ARN) of the KMS key you want to use to encrypt your resource artifacts. Only full KMS key ARN format is supported.
KMS key ARNs have the format
arn:partition:kms:region:account:key/key-id. For example:arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.For more information, see KMS key ARNs.
- Return type:
dict
- Returns:
Response Syntax
{ 'ModelName': 'string', 'ModelStatus': 'IN_PROGRESS'|'FAILED'|'COMPLETED', 'LastModifiedTime': datetime(2015, 1, 1) }
Response Structure
(dict) –
ModelName (string) –
The name of the custom language model that was updated.
ModelStatus (string) –
The status of the specified custom language model.
LastModifiedTime (datetime) –
The date and time the specified custom language model was last modified.
Exceptions