aws_sdk_comprehend/client/
import_model.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`ImportModel`](crate::operation::import_model::builders::ImportModelFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`source_model_arn(impl Into<String>)`](crate::operation::import_model::builders::ImportModelFluentBuilder::source_model_arn) / [`set_source_model_arn(Option<String>)`](crate::operation::import_model::builders::ImportModelFluentBuilder::set_source_model_arn):<br>required: **true**<br><p>The Amazon Resource Name (ARN) of the custom model to import.</p><br>
7    ///   - [`model_name(impl Into<String>)`](crate::operation::import_model::builders::ImportModelFluentBuilder::model_name) / [`set_model_name(Option<String>)`](crate::operation::import_model::builders::ImportModelFluentBuilder::set_model_name):<br>required: **false**<br><p>The name to assign to the custom model that is created in Amazon Comprehend by this import.</p><br>
8    ///   - [`version_name(impl Into<String>)`](crate::operation::import_model::builders::ImportModelFluentBuilder::version_name) / [`set_version_name(Option<String>)`](crate::operation::import_model::builders::ImportModelFluentBuilder::set_version_name):<br>required: **false**<br><p>The version name given to the custom model that is created by this import. Version names can have a maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The version name must be unique among all models with the same classifier name in the account/Region.</p><br>
9    ///   - [`model_kms_key_id(impl Into<String>)`](crate::operation::import_model::builders::ImportModelFluentBuilder::model_kms_key_id) / [`set_model_kms_key_id(Option<String>)`](crate::operation::import_model::builders::ImportModelFluentBuilder::set_model_kms_key_id):<br>required: **false**<br><p>ID for the KMS key that Amazon Comprehend uses to encrypt trained custom models. The ModelKmsKeyId can be either of the following formats:</p> <ul>  <li>   <p>KMS Key ID: <code>"1234abcd-12ab-34cd-56ef-1234567890ab"</code></p></li>  <li>   <p>Amazon Resource Name (ARN) of a KMS Key: <code>"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"</code></p></li> </ul><br>
10    ///   - [`data_access_role_arn(impl Into<String>)`](crate::operation::import_model::builders::ImportModelFluentBuilder::data_access_role_arn) / [`set_data_access_role_arn(Option<String>)`](crate::operation::import_model::builders::ImportModelFluentBuilder::set_data_access_role_arn):<br>required: **false**<br><p>The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to use Amazon Key Management Service (KMS) to encrypt or decrypt the custom model.</p><br>
11    ///   - [`tags(Tag)`](crate::operation::import_model::builders::ImportModelFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::import_model::builders::ImportModelFluentBuilder::set_tags):<br>required: **false**<br><p>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.</p><br>
12    /// - On success, responds with [`ImportModelOutput`](crate::operation::import_model::ImportModelOutput) with field(s):
13    ///   - [`model_arn(Option<String>)`](crate::operation::import_model::ImportModelOutput::model_arn): <p>The Amazon Resource Name (ARN) of the custom model being imported.</p>
14    /// - On failure, responds with [`SdkError<ImportModelError>`](crate::operation::import_model::ImportModelError)
15    pub fn import_model(&self) -> crate::operation::import_model::builders::ImportModelFluentBuilder {
16        crate::operation::import_model::builders::ImportModelFluentBuilder::new(self.handle.clone())
17    }
18}