1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`ImportModel`](crate::operation::import_model::builders::ImportModelFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`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>
    ///   - [`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>
    ///   - [`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>
    ///   - [`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>
    ///   - [`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>
    ///   - [`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>
    /// - On success, responds with [`ImportModelOutput`](crate::operation::import_model::ImportModelOutput) with field(s):
    ///   - [`model_arn(Option<String>)`](crate::operation::import_model::ImportModelOutput::model_arn): <p>The Amazon Resource Name (ARN) of the custom model being imported.</p>
    /// - On failure, responds with [`SdkError<ImportModelError>`](crate::operation::import_model::ImportModelError)
    pub fn import_model(&self) -> crate::operation::import_model::builders::ImportModelFluentBuilder {
        crate::operation::import_model::builders::ImportModelFluentBuilder::new(self.handle.clone())
    }
}