import_model
(**kwargs)¶Creates a new custom model that replicates a source custom model that you import. The source model can be in your AWS account or another one.
If the source model is in another AWS account, then it must have a resource-based policy that authorizes you to import it.
The source model must be in the same AWS region that you're using when you import. You can't import a model that's in a different region.
See also: AWS API Documentation
Request Syntax
response = client.import_model(
SourceModelArn='string',
ModelName='string',
VersionName='string',
ModelKmsKeyId='string',
DataAccessRoleArn='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the custom model to import.
ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt trained custom models. The ModelKmsKeyId can be either of the following formats:
"1234abcd-12ab-34cd-56ef-1234567890ab"
"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
Tags to associate with the custom model that is created by this import. A tag is a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
A key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with the key-value pair ‘Department’:’Sales’ might be added to a resource to indicate its use by a particular department.
The initial part of a key-value pair that forms a tag associated with a given resource. For instance, if you want to show which resources are used by which departments, you might use “Department” as the key portion of the pair, with multiple possible values such as “sales,” “legal,” and “administration.”
The second part of a key-value pair that forms a tag associated with a given resource. For instance, if you want to show which resources are used by which departments, you might use “Department” as the initial (key) portion of the pair, with a value of “sales” to indicate the sales department.
dict
Response Syntax
{
'ModelArn': 'string'
}
Response Structure
(dict) --
ModelArn (string) --
The Amazon Resource Name (ARN) of the custom model being imported.
Exceptions
Comprehend.Client.exceptions.InvalidRequestException
Comprehend.Client.exceptions.ResourceNotFoundException
Comprehend.Client.exceptions.ResourceInUseException
Comprehend.Client.exceptions.ResourceUnavailableException
Comprehend.Client.exceptions.TooManyTagsException
Comprehend.Client.exceptions.TooManyRequestsException
Comprehend.Client.exceptions.ResourceLimitExceededException
Comprehend.Client.exceptions.KmsKeyValidationException
Comprehend.Client.exceptions.InternalServerException