/* * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.comprehend.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** *
* Creates an entity recognizer using submitted files. After your
* CreateEntityRecognizer
request is submitted, you can check job
* status using the DescribeEntityRecognizer
API.
*
* The name given to the newly created recognizer. Recognizer names can be a * maximum of 256 characters. Alphanumeric characters, hyphens (-) and * underscores (_) are allowed. The name must be unique in the * account/Region. *
*
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*$
*/
private String recognizerName;
/**
*
* The version name given to the newly created recognizer. Version names can * be a maximum of 256 characters. Alphanumeric characters, hyphens (-) and * underscores (_) are allowed. The version name must be unique among all * models with the same recognizer name in the account/Region. *
*
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*$
*/
private String versionName;
/**
*
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon * Comprehend read access to your input data. *
*
* Constraints:
* Length: 20 - 2048
* Pattern: arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+
*/
private String dataAccessRoleArn;
/**
*
* Tags to associate with the entity recognizer. 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. *
*/ private java.util.List* Specifies the format and location of the input data. The S3 bucket * containing the input data must be located in the same Region as the * entity recognizer being created. *
*/ private EntityRecognizerInputDataConfig inputDataConfig; /** ** A unique identifier for the request. If you don't set the client request * token, Amazon Comprehend generates one. *
*
* Constraints:
* Length: 1 - 64
* Pattern: ^[a-zA-Z0-9-]+$
*/
private String clientRequestToken;
/**
*
* You can specify any of the following languages: English ("en"), Spanish * ("es"), French ("fr"), Italian ("it"), German ("de"), or Portuguese * ("pt"). If you plan to use this entity recognizer with PDF, Word, or * image input files, you must specify English as the language. All training * documents must be in the same language. *
*
* Constraints:
* Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
*/
private String languageCode;
/**
*
* ID for the Amazon Web Services Key Management Service (KMS) key that * Amazon Comprehend uses to encrypt data on the storage volume attached to * the ML compute instance(s) that process the analysis job. The * VolumeKmsKeyId 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"
*
* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
*/
private String volumeKmsKeyId;
/**
*
* Configuration parameters for an optional private Virtual Private Cloud * (VPC) containing the resources you are using for your custom entity * recognizer. For more information, see Amazon VPC. *
*/ private VpcConfig vpcConfig; /** ** ID for the 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"
*
* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
*/
private String modelKmsKeyId;
/**
*
* The JSON resource-based policy to attach to your custom entity recognizer * model. You can use this policy to allow another Amazon Web Services * account to import your custom model. *
** Provide your JSON as a UTF-8 encoded string without line breaks. To * provide valid JSON for your policy, enclose the attribute names and * values in double quotes. If the JSON body is also enclosed in double * quotes, then you must escape the double quotes that are inside the * policy: *
*
* "{\"attribute\": \"value\", \"attribute\": [\"value\"]}"
*
* To avoid escaping quotes, you can use single quotes to enclose the policy * and double quotes to enclose the JSON names and values: *
*
* '{"attribute": "value", "attribute": ["value"]}'
*
* Constraints:
* Length: 1 - 20000
* Pattern: [ -\u00FF]+
*/
private String modelPolicy;
/**
*
* The name given to the newly created recognizer. Recognizer names can be a * maximum of 256 characters. Alphanumeric characters, hyphens (-) and * underscores (_) are allowed. The name must be unique in the * account/Region. *
*
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*$
*
* @return
* The name given to the newly created recognizer. Recognizer names * can be a maximum of 256 characters. Alphanumeric characters, * hyphens (-) and underscores (_) are allowed. The name must be * unique in the account/Region. *
*/ public String getRecognizerName() { return recognizerName; } /** ** The name given to the newly created recognizer. Recognizer names can be a * maximum of 256 characters. Alphanumeric characters, hyphens (-) and * underscores (_) are allowed. The name must be unique in the * account/Region. *
*
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*$
*
* @param recognizerName
* The name given to the newly created recognizer. Recognizer * names can be a maximum of 256 characters. Alphanumeric * characters, hyphens (-) and underscores (_) are allowed. The * name must be unique in the account/Region. *
*/ public void setRecognizerName(String recognizerName) { this.recognizerName = recognizerName; } /** ** The name given to the newly created recognizer. Recognizer names can be a * maximum of 256 characters. Alphanumeric characters, hyphens (-) and * underscores (_) are allowed. The name must be unique in the * account/Region. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*$
*
* @param recognizerName
* The name given to the newly created recognizer. Recognizer * names can be a maximum of 256 characters. Alphanumeric * characters, hyphens (-) and underscores (_) are allowed. The * name must be unique in the account/Region. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CreateEntityRecognizerRequest withRecognizerName(String recognizerName) { this.recognizerName = recognizerName; return this; } /** ** The version name given to the newly created recognizer. Version names can * be a maximum of 256 characters. Alphanumeric characters, hyphens (-) and * underscores (_) are allowed. The version name must be unique among all * models with the same recognizer name in the account/Region. *
*
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*$
*
* @return
* The version name given to the newly created recognizer. Version * names can be a maximum of 256 characters. Alphanumeric * characters, hyphens (-) and underscores (_) are allowed. The * version name must be unique among all models with the same * recognizer name in the account/Region. *
*/ public String getVersionName() { return versionName; } /** ** The version name given to the newly created recognizer. Version names can * be a maximum of 256 characters. Alphanumeric characters, hyphens (-) and * underscores (_) are allowed. The version name must be unique among all * models with the same recognizer name in the account/Region. *
*
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*$
*
* @param versionName
* The version name given to the newly created recognizer. * Version names can be a maximum of 256 characters. Alphanumeric * characters, hyphens (-) and underscores (_) are allowed. The * version name must be unique among all models with the same * recognizer name in the account/Region. *
*/ public void setVersionName(String versionName) { this.versionName = versionName; } /** ** The version name given to the newly created recognizer. Version names can * be a maximum of 256 characters. Alphanumeric characters, hyphens (-) and * underscores (_) are allowed. The version name must be unique among all * models with the same recognizer name in the account/Region. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 63
* Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9])*$
*
* @param versionName
* The version name given to the newly created recognizer. * Version names can be a maximum of 256 characters. Alphanumeric * characters, hyphens (-) and underscores (_) are allowed. The * version name must be unique among all models with the same * recognizer name in the account/Region. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CreateEntityRecognizerRequest withVersionName(String versionName) { this.versionName = versionName; return this; } /** ** The Amazon Resource Name (ARN) of the IAM role that grants Amazon * Comprehend read access to your input data. *
*
* Constraints:
* Length: 20 - 2048
* Pattern: arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+
*
* @return
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon * Comprehend read access to your input data. *
*/ public String getDataAccessRoleArn() { return dataAccessRoleArn; } /** ** The Amazon Resource Name (ARN) of the IAM role that grants Amazon * Comprehend read access to your input data. *
*
* Constraints:
* Length: 20 - 2048
* Pattern: arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+
*
* @param dataAccessRoleArn
* The Amazon Resource Name (ARN) of the IAM role that grants * Amazon Comprehend read access to your input data. *
*/ public void setDataAccessRoleArn(String dataAccessRoleArn) { this.dataAccessRoleArn = dataAccessRoleArn; } /** ** The Amazon Resource Name (ARN) of the IAM role that grants Amazon * Comprehend read access to your input data. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 20 - 2048
* Pattern: arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+
*
* @param dataAccessRoleArn
* The Amazon Resource Name (ARN) of the IAM role that grants * Amazon Comprehend read access to your input data. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CreateEntityRecognizerRequest withDataAccessRoleArn(String dataAccessRoleArn) { this.dataAccessRoleArn = dataAccessRoleArn; return this; } /** ** Tags to associate with the entity recognizer. 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. *
* * @return* Tags to associate with the entity recognizer. 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. *
*/ public java.util.List* Tags to associate with the entity recognizer. 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. *
* * @param tags* Tags to associate with the entity recognizer. 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. *
*/ public void setTags(java.util.Collection* Tags to associate with the entity recognizer. 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. *
** Returns a reference to this object so that method calls can be chained * together. * * @param tags
* Tags to associate with the entity recognizer. 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. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CreateEntityRecognizerRequest withTags(Tag... tags) { if (getTags() == null) { this.tags = new java.util.ArrayList* Tags to associate with the entity recognizer. 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. *
** Returns a reference to this object so that method calls can be chained * together. * * @param tags
* Tags to associate with the entity recognizer. 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. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CreateEntityRecognizerRequest withTags(java.util.Collection* Specifies the format and location of the input data. The S3 bucket * containing the input data must be located in the same Region as the * entity recognizer being created. *
* * @return* Specifies the format and location of the input data. The S3 * bucket containing the input data must be located in the same * Region as the entity recognizer being created. *
*/ public EntityRecognizerInputDataConfig getInputDataConfig() { return inputDataConfig; } /** ** Specifies the format and location of the input data. The S3 bucket * containing the input data must be located in the same Region as the * entity recognizer being created. *
* * @param inputDataConfig* Specifies the format and location of the input data. The S3 * bucket containing the input data must be located in the same * Region as the entity recognizer being created. *
*/ public void setInputDataConfig(EntityRecognizerInputDataConfig inputDataConfig) { this.inputDataConfig = inputDataConfig; } /** ** Specifies the format and location of the input data. The S3 bucket * containing the input data must be located in the same Region as the * entity recognizer being created. *
** Returns a reference to this object so that method calls can be chained * together. * * @param inputDataConfig
* Specifies the format and location of the input data. The S3 * bucket containing the input data must be located in the same * Region as the entity recognizer being created. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CreateEntityRecognizerRequest withInputDataConfig( EntityRecognizerInputDataConfig inputDataConfig) { this.inputDataConfig = inputDataConfig; return this; } /** ** A unique identifier for the request. If you don't set the client request * token, Amazon Comprehend generates one. *
*
* Constraints:
* Length: 1 - 64
* Pattern: ^[a-zA-Z0-9-]+$
*
* @return
* A unique identifier for the request. If you don't set the client * request token, Amazon Comprehend generates one. *
*/ public String getClientRequestToken() { return clientRequestToken; } /** ** A unique identifier for the request. If you don't set the client request * token, Amazon Comprehend generates one. *
*
* Constraints:
* Length: 1 - 64
* Pattern: ^[a-zA-Z0-9-]+$
*
* @param clientRequestToken
* A unique identifier for the request. If you don't set the * client request token, Amazon Comprehend generates one. *
*/ public void setClientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; } /** ** A unique identifier for the request. If you don't set the client request * token, Amazon Comprehend generates one. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 64
* Pattern: ^[a-zA-Z0-9-]+$
*
* @param clientRequestToken
* A unique identifier for the request. If you don't set the * client request token, Amazon Comprehend generates one. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CreateEntityRecognizerRequest withClientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; return this; } /** ** You can specify any of the following languages: English ("en"), Spanish * ("es"), French ("fr"), Italian ("it"), German ("de"), or Portuguese * ("pt"). If you plan to use this entity recognizer with PDF, Word, or * image input files, you must specify English as the language. All training * documents must be in the same language. *
*
* Constraints:
* Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
*
* @return
* You can specify any of the following languages: English ("en"), * Spanish ("es"), French ("fr"), Italian ("it"), German ("de"), or * Portuguese ("pt"). If you plan to use this entity recognizer with * PDF, Word, or image input files, you must specify English as the * language. All training documents must be in the same language. *
* @see LanguageCode */ public String getLanguageCode() { return languageCode; } /** ** You can specify any of the following languages: English ("en"), Spanish * ("es"), French ("fr"), Italian ("it"), German ("de"), or Portuguese * ("pt"). If you plan to use this entity recognizer with PDF, Word, or * image input files, you must specify English as the language. All training * documents must be in the same language. *
*
* Constraints:
* Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
*
* @param languageCode
* You can specify any of the following languages: English * ("en"), Spanish ("es"), French ("fr"), Italian ("it"), German * ("de"), or Portuguese ("pt"). If you plan to use this entity * recognizer with PDF, Word, or image input files, you must * specify English as the language. All training documents must * be in the same language. *
* @see LanguageCode */ public void setLanguageCode(String languageCode) { this.languageCode = languageCode; } /** ** You can specify any of the following languages: English ("en"), Spanish * ("es"), French ("fr"), Italian ("it"), German ("de"), or Portuguese * ("pt"). If you plan to use this entity recognizer with PDF, Word, or * image input files, you must specify English as the language. All training * documents must be in the same language. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
*
* @param languageCode
* You can specify any of the following languages: English * ("en"), Spanish ("es"), French ("fr"), Italian ("it"), German * ("de"), or Portuguese ("pt"). If you plan to use this entity * recognizer with PDF, Word, or image input files, you must * specify English as the language. All training documents must * be in the same language. *
* @return A reference to this updated object so that method calls can be * chained together. * @see LanguageCode */ public CreateEntityRecognizerRequest withLanguageCode(String languageCode) { this.languageCode = languageCode; return this; } /** ** You can specify any of the following languages: English ("en"), Spanish * ("es"), French ("fr"), Italian ("it"), German ("de"), or Portuguese * ("pt"). If you plan to use this entity recognizer with PDF, Word, or * image input files, you must specify English as the language. All training * documents must be in the same language. *
*
* Constraints:
* Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
*
* @param languageCode
* You can specify any of the following languages: English * ("en"), Spanish ("es"), French ("fr"), Italian ("it"), German * ("de"), or Portuguese ("pt"). If you plan to use this entity * recognizer with PDF, Word, or image input files, you must * specify English as the language. All training documents must * be in the same language. *
* @see LanguageCode */ public void setLanguageCode(LanguageCode languageCode) { this.languageCode = languageCode.toString(); } /** ** You can specify any of the following languages: English ("en"), Spanish * ("es"), French ("fr"), Italian ("it"), German ("de"), or Portuguese * ("pt"). If you plan to use this entity recognizer with PDF, Word, or * image input files, you must specify English as the language. All training * documents must be in the same language. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
*
* @param languageCode
* You can specify any of the following languages: English * ("en"), Spanish ("es"), French ("fr"), Italian ("it"), German * ("de"), or Portuguese ("pt"). If you plan to use this entity * recognizer with PDF, Word, or image input files, you must * specify English as the language. All training documents must * be in the same language. *
* @return A reference to this updated object so that method calls can be * chained together. * @see LanguageCode */ public CreateEntityRecognizerRequest withLanguageCode(LanguageCode languageCode) { this.languageCode = languageCode.toString(); return this; } /** ** ID for the Amazon Web Services Key Management Service (KMS) key that * Amazon Comprehend uses to encrypt data on the storage volume attached to * the ML compute instance(s) that process the analysis job. The * VolumeKmsKeyId 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"
*
* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
*
* @return
* ID for the Amazon Web Services Key Management Service (KMS) key * that Amazon Comprehend uses to encrypt data on the storage volume * attached to the ML compute instance(s) that process the analysis * job. The VolumeKmsKeyId 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"
*
* ID for the Amazon Web Services Key Management Service (KMS) key that * Amazon Comprehend uses to encrypt data on the storage volume attached to * the ML compute instance(s) that process the analysis job. The * VolumeKmsKeyId 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"
*
* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
*
* @param volumeKmsKeyId
* ID for the Amazon Web Services Key Management Service (KMS) * key that Amazon Comprehend uses to encrypt data on the storage * volume attached to the ML compute instance(s) that process the * analysis job. The VolumeKmsKeyId 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"
*
* ID for the Amazon Web Services Key Management Service (KMS) key that * Amazon Comprehend uses to encrypt data on the storage volume attached to * the ML compute instance(s) that process the analysis job. The * VolumeKmsKeyId 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"
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
*
* @param volumeKmsKeyId
* ID for the Amazon Web Services Key Management Service (KMS) * key that Amazon Comprehend uses to encrypt data on the storage * volume attached to the ML compute instance(s) that process the * analysis job. The VolumeKmsKeyId 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"
*
* Configuration parameters for an optional private Virtual Private Cloud * (VPC) containing the resources you are using for your custom entity * recognizer. For more information, see Amazon VPC. *
* * @return* Configuration parameters for an optional private Virtual Private * Cloud (VPC) containing the resources you are using for your * custom entity recognizer. For more information, see Amazon VPC. *
*/ public VpcConfig getVpcConfig() { return vpcConfig; } /** ** Configuration parameters for an optional private Virtual Private Cloud * (VPC) containing the resources you are using for your custom entity * recognizer. For more information, see Amazon VPC. *
* * @param vpcConfig* Configuration parameters for an optional private Virtual * Private Cloud (VPC) containing the resources you are using for * your custom entity recognizer. For more information, see Amazon VPC. *
*/ public void setVpcConfig(VpcConfig vpcConfig) { this.vpcConfig = vpcConfig; } /** ** Configuration parameters for an optional private Virtual Private Cloud * (VPC) containing the resources you are using for your custom entity * recognizer. For more information, see Amazon VPC. *
** Returns a reference to this object so that method calls can be chained * together. * * @param vpcConfig
* Configuration parameters for an optional private Virtual * Private Cloud (VPC) containing the resources you are using for * your custom entity recognizer. For more information, see Amazon VPC. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CreateEntityRecognizerRequest withVpcConfig(VpcConfig vpcConfig) { this.vpcConfig = vpcConfig; return this; } /** ** ID for the 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"
*
* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
*
* @return
* ID for the 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"
*
* ID for the 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"
*
* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
*
* @param modelKmsKeyId
* ID for the 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"
*
* ID for the 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"
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
*
* @param modelKmsKeyId
* ID for the 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"
*
* The JSON resource-based policy to attach to your custom entity recognizer * model. You can use this policy to allow another Amazon Web Services * account to import your custom model. *
** Provide your JSON as a UTF-8 encoded string without line breaks. To * provide valid JSON for your policy, enclose the attribute names and * values in double quotes. If the JSON body is also enclosed in double * quotes, then you must escape the double quotes that are inside the * policy: *
*
* "{\"attribute\": \"value\", \"attribute\": [\"value\"]}"
*
* To avoid escaping quotes, you can use single quotes to enclose the policy * and double quotes to enclose the JSON names and values: *
*
* '{"attribute": "value", "attribute": ["value"]}'
*
* Constraints:
* Length: 1 - 20000
* Pattern: [ -\u00FF]+
*
* @return
* The JSON resource-based policy to attach to your custom entity * recognizer model. You can use this policy to allow another Amazon * Web Services account to import your custom model. *
** Provide your JSON as a UTF-8 encoded string without line breaks. * To provide valid JSON for your policy, enclose the attribute * names and values in double quotes. If the JSON body is also * enclosed in double quotes, then you must escape the double quotes * that are inside the policy: *
*
* "{\"attribute\": \"value\", \"attribute\": [\"value\"]}"
*
* To avoid escaping quotes, you can use single quotes to enclose * the policy and double quotes to enclose the JSON names and * values: *
*
* '{"attribute": "value", "attribute": ["value"]}'
*
* The JSON resource-based policy to attach to your custom entity recognizer * model. You can use this policy to allow another Amazon Web Services * account to import your custom model. *
** Provide your JSON as a UTF-8 encoded string without line breaks. To * provide valid JSON for your policy, enclose the attribute names and * values in double quotes. If the JSON body is also enclosed in double * quotes, then you must escape the double quotes that are inside the * policy: *
*
* "{\"attribute\": \"value\", \"attribute\": [\"value\"]}"
*
* To avoid escaping quotes, you can use single quotes to enclose the policy * and double quotes to enclose the JSON names and values: *
*
* '{"attribute": "value", "attribute": ["value"]}'
*
* Constraints:
* Length: 1 - 20000
* Pattern: [ -\u00FF]+
*
* @param modelPolicy
* The JSON resource-based policy to attach to your custom entity * recognizer model. You can use this policy to allow another * Amazon Web Services account to import your custom model. *
** Provide your JSON as a UTF-8 encoded string without line * breaks. To provide valid JSON for your policy, enclose the * attribute names and values in double quotes. If the JSON body * is also enclosed in double quotes, then you must escape the * double quotes that are inside the policy: *
*
* "{\"attribute\": \"value\", \"attribute\": [\"value\"]}"
*
* To avoid escaping quotes, you can use single quotes to enclose * the policy and double quotes to enclose the JSON names and * values: *
*
* '{"attribute": "value", "attribute": ["value"]}'
*
* The JSON resource-based policy to attach to your custom entity recognizer * model. You can use this policy to allow another Amazon Web Services * account to import your custom model. *
** Provide your JSON as a UTF-8 encoded string without line breaks. To * provide valid JSON for your policy, enclose the attribute names and * values in double quotes. If the JSON body is also enclosed in double * quotes, then you must escape the double quotes that are inside the * policy: *
*
* "{\"attribute\": \"value\", \"attribute\": [\"value\"]}"
*
* To avoid escaping quotes, you can use single quotes to enclose the policy * and double quotes to enclose the JSON names and values: *
*
* '{"attribute": "value", "attribute": ["value"]}'
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 20000
* Pattern: [ -\u00FF]+
*
* @param modelPolicy
* The JSON resource-based policy to attach to your custom entity * recognizer model. You can use this policy to allow another * Amazon Web Services account to import your custom model. *
** Provide your JSON as a UTF-8 encoded string without line * breaks. To provide valid JSON for your policy, enclose the * attribute names and values in double quotes. If the JSON body * is also enclosed in double quotes, then you must escape the * double quotes that are inside the policy: *
*
* "{\"attribute\": \"value\", \"attribute\": [\"value\"]}"
*
* To avoid escaping quotes, you can use single quotes to enclose * the policy and double quotes to enclose the JSON names and * values: *
*
* '{"attribute": "value", "attribute": ["value"]}'
*