amazonka-comprehend-2.0: Amazon Comprehend SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Comprehend.ImportModel

Description

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.

Synopsis

Creating a Request

data ImportModel Source #

See: newImportModel smart constructor.

Constructors

ImportModel' 

Fields

  • dataAccessRoleArn :: Maybe Text

    The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role that allows Amazon Comprehend to use Amazon Key Management Service (KMS) to encrypt or decrypt the custom model.

  • modelKmsKeyId :: Maybe Text

    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:

    • KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
    • Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
  • modelName :: Maybe Text

    The name to assign to the custom model that is created in Amazon Comprehend by this import.

  • tags :: Maybe [Tag]

    Tags to be associated 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.

  • versionName :: Maybe Text

    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/AWS Region.

  • sourceModelArn :: Text

    The Amazon Resource Name (ARN) of the custom model to import.

Instances

Instances details
ToJSON ImportModel Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

ToHeaders ImportModel Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

Methods

toHeaders :: ImportModel -> [Header] #

ToPath ImportModel Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

ToQuery ImportModel Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

AWSRequest ImportModel Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

Associated Types

type AWSResponse ImportModel #

Generic ImportModel Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

Associated Types

type Rep ImportModel :: Type -> Type #

Read ImportModel Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

Show ImportModel Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

NFData ImportModel Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

Methods

rnf :: ImportModel -> () #

Eq ImportModel Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

Hashable ImportModel Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

type AWSResponse ImportModel Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

type Rep ImportModel Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

type Rep ImportModel = D1 ('MetaData "ImportModel" "Amazonka.Comprehend.ImportModel" "amazonka-comprehend-2.0-Ko6GCjAQF2RARapSdPn69F" 'False) (C1 ('MetaCons "ImportModel'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dataAccessRoleArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "modelKmsKeyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "modelName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag])) :*: (S1 ('MetaSel ('Just "versionName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "sourceModelArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newImportModel Source #

Create a value of ImportModel with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

ImportModel, importModel_dataAccessRoleArn - The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role that allows Amazon Comprehend to use Amazon Key Management Service (KMS) to encrypt or decrypt the custom model.

ImportModel, importModel_modelKmsKeyId - 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:

  • KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
  • Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"

$sel:modelName:ImportModel', importModel_modelName - The name to assign to the custom model that is created in Amazon Comprehend by this import.

$sel:tags:ImportModel', importModel_tags - Tags to be associated 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.

ImportModel, importModel_versionName - 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/AWS Region.

ImportModel, importModel_sourceModelArn - The Amazon Resource Name (ARN) of the custom model to import.

Request Lenses

importModel_dataAccessRoleArn :: Lens' ImportModel (Maybe Text) Source #

The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role that allows Amazon Comprehend to use Amazon Key Management Service (KMS) to encrypt or decrypt the custom model.

importModel_modelKmsKeyId :: Lens' ImportModel (Maybe Text) Source #

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:

  • KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
  • Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"

importModel_modelName :: Lens' ImportModel (Maybe Text) Source #

The name to assign to the custom model that is created in Amazon Comprehend by this import.

importModel_tags :: Lens' ImportModel (Maybe [Tag]) Source #

Tags to be associated 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.

importModel_versionName :: Lens' ImportModel (Maybe Text) Source #

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/AWS Region.

importModel_sourceModelArn :: Lens' ImportModel Text Source #

The Amazon Resource Name (ARN) of the custom model to import.

Destructuring the Response

data ImportModelResponse Source #

See: newImportModelResponse smart constructor.

Constructors

ImportModelResponse' 

Fields

Instances

Instances details
Generic ImportModelResponse Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

Associated Types

type Rep ImportModelResponse :: Type -> Type #

Read ImportModelResponse Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

Show ImportModelResponse Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

NFData ImportModelResponse Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

Methods

rnf :: ImportModelResponse -> () #

Eq ImportModelResponse Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

type Rep ImportModelResponse Source # 
Instance details

Defined in Amazonka.Comprehend.ImportModel

type Rep ImportModelResponse = D1 ('MetaData "ImportModelResponse" "Amazonka.Comprehend.ImportModel" "amazonka-comprehend-2.0-Ko6GCjAQF2RARapSdPn69F" 'False) (C1 ('MetaCons "ImportModelResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "modelArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newImportModelResponse Source #

Create a value of ImportModelResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

ImportModelResponse, importModelResponse_modelArn - The Amazon Resource Name (ARN) of the custom model being imported.

$sel:httpStatus:ImportModelResponse', importModelResponse_httpStatus - The response's http status code.

Response Lenses

importModelResponse_modelArn :: Lens' ImportModelResponse (Maybe Text) Source #

The Amazon Resource Name (ARN) of the custom model being imported.