Struct aws_sdk_comprehend::Client
source · pub struct Client { /* private fields */ }Expand description
Client for Amazon Comprehend
Client for invoking operations on Amazon Comprehend. Each operation on Amazon Comprehend is a method on this
this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.
Constructing a Client
A Config is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env() instead, which returns a ConfigLoader that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_comprehend::Client::new(&config);Occasionally, SDKs may have additional service-specific that can be set on the Config that
is absent from SdkConfig, or slightly different settings for a specific client may be desired.
The Config struct implements From<&SdkConfig>, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_comprehend::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();See the aws-config docs and Config for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
Using the Client
A client has a function for every operation that can be performed by the service.
For example, the BatchDetectEntities operation has
a Client::batch_detect_entities, function which returns a builder for that operation.
The fluent builder ultimately has a send() function that returns an async future that
returns a result, as illustrated below:
let result = client.batch_detect_entities()
.language_code("example")
.send()
.await;The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize module for more
information.
Implementations§
source§impl Client
impl Client
sourcepub fn batch_detect_dominant_language(
&self
) -> BatchDetectDominantLanguageFluentBuilder
pub fn batch_detect_dominant_language( &self ) -> BatchDetectDominantLanguageFluentBuilder
Constructs a fluent builder for the BatchDetectDominantLanguage operation.
- The fluent builder is configurable:
text_list(impl Into<String>)/set_text_list(Option<Vec::<String>>):
required: trueA list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. Each document should contain at least 20 characters. The maximum size of each document is 5 KB.
- On success, responds with
BatchDetectDominantLanguageOutputwith field(s):result_list(Vec::<BatchDetectDominantLanguageItemResult>):A list of objects containing the results of the operation. The results are sorted in ascending order by the
Indexfield and match the order of the documents in the input list. If all of the documents contain an error, theResultListis empty.error_list(Vec::<BatchItemError>):A list containing one object for each document that contained an error. The results are sorted in ascending order by the
Indexfield and match the order of the documents in the input list. If there are no errors in the batch, theErrorListis empty.
- On failure, responds with
SdkError<BatchDetectDominantLanguageError>
source§impl Client
impl Client
sourcepub fn batch_detect_entities(&self) -> BatchDetectEntitiesFluentBuilder
pub fn batch_detect_entities(&self) -> BatchDetectEntitiesFluentBuilder
Constructs a fluent builder for the BatchDetectEntities operation.
- The fluent builder is configurable:
text_list(impl Into<String>)/set_text_list(Option<Vec::<String>>):
required: trueA list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. The maximum size of each document is 5 KB.
language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: trueThe language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
- On success, responds with
BatchDetectEntitiesOutputwith field(s):result_list(Vec::<BatchDetectEntitiesItemResult>):A list of objects containing the results of the operation. The results are sorted in ascending order by the
Indexfield and match the order of the documents in the input list. If all of the documents contain an error, theResultListis empty.error_list(Vec::<BatchItemError>):A list containing one object for each document that contained an error. The results are sorted in ascending order by the
Indexfield and match the order of the documents in the input list. If there are no errors in the batch, theErrorListis empty.
- On failure, responds with
SdkError<BatchDetectEntitiesError>
source§impl Client
impl Client
sourcepub fn batch_detect_key_phrases(&self) -> BatchDetectKeyPhrasesFluentBuilder
pub fn batch_detect_key_phrases(&self) -> BatchDetectKeyPhrasesFluentBuilder
Constructs a fluent builder for the BatchDetectKeyPhrases operation.
- The fluent builder is configurable:
text_list(impl Into<String>)/set_text_list(Option<Vec::<String>>):
required: trueA list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. The maximum size of each document is 5 KB.
language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: trueThe language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
- On success, responds with
BatchDetectKeyPhrasesOutputwith field(s):result_list(Vec::<BatchDetectKeyPhrasesItemResult>):A list of objects containing the results of the operation. The results are sorted in ascending order by the
Indexfield and match the order of the documents in the input list. If all of the documents contain an error, theResultListis empty.error_list(Vec::<BatchItemError>):A list containing one object for each document that contained an error. The results are sorted in ascending order by the
Indexfield and match the order of the documents in the input list. If there are no errors in the batch, theErrorListis empty.
- On failure, responds with
SdkError<BatchDetectKeyPhrasesError>
source§impl Client
impl Client
sourcepub fn batch_detect_sentiment(&self) -> BatchDetectSentimentFluentBuilder
pub fn batch_detect_sentiment(&self) -> BatchDetectSentimentFluentBuilder
Constructs a fluent builder for the BatchDetectSentiment operation.
- The fluent builder is configurable:
text_list(impl Into<String>)/set_text_list(Option<Vec::<String>>):
required: trueA list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. The maximum size of each document is 5 KB.
language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: trueThe language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
- On success, responds with
BatchDetectSentimentOutputwith field(s):result_list(Vec::<BatchDetectSentimentItemResult>):A list of objects containing the results of the operation. The results are sorted in ascending order by the
Indexfield and match the order of the documents in the input list. If all of the documents contain an error, theResultListis empty.error_list(Vec::<BatchItemError>):A list containing one object for each document that contained an error. The results are sorted in ascending order by the
Indexfield and match the order of the documents in the input list. If there are no errors in the batch, theErrorListis empty.
- On failure, responds with
SdkError<BatchDetectSentimentError>
source§impl Client
impl Client
sourcepub fn batch_detect_syntax(&self) -> BatchDetectSyntaxFluentBuilder
pub fn batch_detect_syntax(&self) -> BatchDetectSyntaxFluentBuilder
Constructs a fluent builder for the BatchDetectSyntax operation.
- The fluent builder is configurable:
text_list(impl Into<String>)/set_text_list(Option<Vec::<String>>):
required: trueA list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. The maximum size for each document is 5 KB.
language_code(SyntaxLanguageCode)/set_language_code(Option<SyntaxLanguageCode>):
required: trueThe language of the input documents. You can specify any of the following languages supported by Amazon Comprehend: German (“de”), English (“en”), Spanish (“es”), French (“fr”), Italian (“it”), or Portuguese (“pt”). All documents must be in the same language.
- On success, responds with
BatchDetectSyntaxOutputwith field(s):result_list(Vec::<BatchDetectSyntaxItemResult>):A list of objects containing the results of the operation. The results are sorted in ascending order by the
Indexfield and match the order of the documents in the input list. If all of the documents contain an error, theResultListis empty.error_list(Vec::<BatchItemError>):A list containing one object for each document that contained an error. The results are sorted in ascending order by the
Indexfield and match the order of the documents in the input list. If there are no errors in the batch, theErrorListis empty.
- On failure, responds with
SdkError<BatchDetectSyntaxError>
source§impl Client
impl Client
sourcepub fn batch_detect_targeted_sentiment(
&self
) -> BatchDetectTargetedSentimentFluentBuilder
pub fn batch_detect_targeted_sentiment( &self ) -> BatchDetectTargetedSentimentFluentBuilder
Constructs a fluent builder for the BatchDetectTargetedSentiment operation.
- The fluent builder is configurable:
text_list(impl Into<String>)/set_text_list(Option<Vec::<String>>):
required: trueA list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. The maximum size of each document is 5 KB.
language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: trueThe language of the input documents. Currently, English is the only supported language.
- On success, responds with
BatchDetectTargetedSentimentOutputwith field(s):result_list(Vec::<BatchDetectTargetedSentimentItemResult>):A list of objects containing the results of the operation. The results are sorted in ascending order by the
Indexfield and match the order of the documents in the input list. If all of the documents contain an error, theResultListis empty.error_list(Vec::<BatchItemError>):List of errors that the operation can return.
- On failure, responds with
SdkError<BatchDetectTargetedSentimentError>
source§impl Client
impl Client
sourcepub fn classify_document(&self) -> ClassifyDocumentFluentBuilder
pub fn classify_document(&self) -> ClassifyDocumentFluentBuilder
Constructs a fluent builder for the ClassifyDocument operation.
- The fluent builder is configurable:
text(impl Into<String>)/set_text(Option<String>):
required: falseThe document text to be analyzed. If you enter text using this parameter, do not use the
Bytesparameter.endpoint_arn(impl Into<String>)/set_endpoint_arn(Option<String>):
required: trueThe Amazon Resource Number (ARN) of the endpoint.
For prompt safety classification, Amazon Comprehend provides the endpoint ARN. For more information about prompt safety classifiers, see Prompt safety classification in the Amazon Comprehend Developer Guide
For custom classification, you create an endpoint for your custom model. For more information, see Using Amazon Comprehend endpoints.
bytes(Blob)/set_bytes(Option<Blob>):
required: falseUse the
Bytesparameter to input a text, PDF, Word or image file.When you classify a document using a custom model, you can also use the
Bytesparameter to input an Amazon TextractDetectDocumentTextorAnalyzeDocumentoutput file.To classify a document using the prompt safety classifier, use the
Textparameter for input.Provide the input document as a sequence of base64-encoded bytes. If your code uses an Amazon Web Services SDK to classify documents, the SDK may encode the document file bytes for you.
The maximum length of this field depends on the input document type. For details, see Inputs for real-time custom analysis in the Comprehend Developer Guide.
If you use the
Bytesparameter, do not use theTextparameter.document_reader_config(DocumentReaderConfig)/set_document_reader_config(Option<DocumentReaderConfig>):
required: falseProvides configuration parameters to override the default actions for extracting text from PDF documents and image files.
- On success, responds with
ClassifyDocumentOutputwith field(s):classes(Option<Vec::<DocumentClass>>):The classes used by the document being analyzed. These are used for models trained in multi-class mode. Individual classes are mutually exclusive and each document is expected to have only a single class assigned to it. For example, an animal can be a dog or a cat, but not both at the same time.
For prompt safety classification, the response includes only two classes (SAFE_PROMPT and UNSAFE_PROMPT), along with a confidence score for each class. The value range of the score is zero to one, where one is the highest confidence.
labels(Option<Vec::<DocumentLabel>>):The labels used in the document being analyzed. These are used for multi-label trained models. Individual labels represent different categories that are related in some manner and are not mutually exclusive. For example, a movie can be just an action movie, or it can be an action movie, a science fiction movie, and a comedy, all at the same time.
document_metadata(Option<DocumentMetadata>):Extraction information about the document. This field is present in the response only if your request includes the
Byteparameter.document_type(Option<Vec::<DocumentTypeListItem>>):The document type for each page in the input document. This field is present in the response only if your request includes the
Byteparameter.errors(Option<Vec::<ErrorsListItem>>):Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors.
warnings(Option<Vec::<WarningsListItem>>):Warnings detected while processing the input document. The response includes a warning if there is a mismatch between the input document type and the model type associated with the endpoint that you specified. The response can also include warnings for individual pages that have a mismatch.
The field is empty if the system generated no warnings.
- On failure, responds with
SdkError<ClassifyDocumentError>
source§impl Client
impl Client
sourcepub fn contains_pii_entities(&self) -> ContainsPiiEntitiesFluentBuilder
pub fn contains_pii_entities(&self) -> ContainsPiiEntitiesFluentBuilder
Constructs a fluent builder for the ContainsPiiEntities operation.
- The fluent builder is configurable:
text(impl Into<String>)/set_text(Option<String>):
required: trueA UTF-8 text string. The maximum string size is 100 KB.
language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: trueThe language of the input documents. Currently, English is the only valid language.
- On success, responds with
ContainsPiiEntitiesOutputwith field(s):labels(Option<Vec::<EntityLabel>>):The labels used in the document being analyzed. Individual labels represent personally identifiable information (PII) entity types.
- On failure, responds with
SdkError<ContainsPiiEntitiesError>
source§impl Client
impl Client
sourcepub fn create_dataset(&self) -> CreateDatasetFluentBuilder
pub fn create_dataset(&self) -> CreateDatasetFluentBuilder
Constructs a fluent builder for the CreateDataset operation.
- The fluent builder is configurable:
flywheel_arn(impl Into<String>)/set_flywheel_arn(Option<String>):
required: trueThe Amazon Resource Number (ARN) of the flywheel of the flywheel to receive the data.
dataset_name(impl Into<String>)/set_dataset_name(Option<String>):
required: trueName of the dataset.
dataset_type(DatasetType)/set_dataset_type(Option<DatasetType>):
required: falseThe dataset type. You can specify that the data in a dataset is for training the model or for testing the model.
description(impl Into<String>)/set_description(Option<String>):
required: falseDescription of the dataset.
input_data_config(DatasetInputDataConfig)/set_input_data_config(Option<DatasetInputDataConfig>):
required: trueInformation about the input data configuration. The type of input data varies based on the format of the input and whether the data is for a classifier model or an entity recognition model.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):
required: falseA unique identifier for the request. If you don’t set the client request token, Amazon Comprehend generates one.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseTags for the dataset.
- On success, responds with
CreateDatasetOutputwith field(s):dataset_arn(Option<String>):The ARN of the dataset.
- On failure, responds with
SdkError<CreateDatasetError>
source§impl Client
impl Client
sourcepub fn create_document_classifier(
&self
) -> CreateDocumentClassifierFluentBuilder
pub fn create_document_classifier( &self ) -> CreateDocumentClassifierFluentBuilder
Constructs a fluent builder for the CreateDocumentClassifier operation.
- The fluent builder is configurable:
document_classifier_name(impl Into<String>)/set_document_classifier_name(Option<String>):
required: trueThe name of the document classifier.
version_name(impl Into<String>)/set_version_name(Option<String>):
required: falseThe version name given to the newly created classifier. 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 Amazon Web Services account/Amazon Web Services Region.
data_access_role_arn(impl Into<String>)/set_data_access_role_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseTags to associate with the document classifier. 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.
input_data_config(DocumentClassifierInputDataConfig)/set_input_data_config(Option<DocumentClassifierInputDataConfig>):
required: trueSpecifies the format and location of the input data for the job.
output_data_config(DocumentClassifierOutputDataConfig)/set_output_data_config(Option<DocumentClassifierOutputDataConfig>):
required: falseSpecifies the location for the output files from a custom classifier job. This parameter is required for a request that creates a native document model.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):
required: falseA unique identifier for the request. If you don’t set the client request token, Amazon Comprehend generates one.
language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: trueThe language of the input documents. You can specify any of the languages supported by Amazon Comprehend. All documents must be in the same language.
volume_kms_key_id(impl Into<String>)/set_volume_kms_key_id(Option<String>):
required: falseID 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”
-
vpc_config(VpcConfig)/set_vpc_config(Option<VpcConfig>):
required: falseConfiguration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier. For more information, see Amazon VPC.
mode(DocumentClassifierMode)/set_mode(Option<DocumentClassifierMode>):
required: falseIndicates the mode in which the classifier will be trained. The classifier can be trained in multi-class (single-label) mode or multi-label mode. Multi-class mode identifies a single class label for each document and multi-label mode identifies one or more class labels for each document. Multiple labels for an individual document are separated by a delimiter. The default delimiter between labels is a pipe (|).
model_kms_key_id(impl Into<String>)/set_model_kms_key_id(Option<String>):
required: falseID 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”
-
model_policy(impl Into<String>)/set_model_policy(Option<String>):
required: falseThe resource-based policy to attach to your custom document classifier model. You can use this policy to allow another Amazon Web Services account to import your custom model.
Provide your policy as a JSON body that you enter as a UTF-8 encoded string without line breaks. To provide valid JSON, 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”]}’
- On success, responds with
CreateDocumentClassifierOutputwith field(s):document_classifier_arn(Option<String>):The Amazon Resource Name (ARN) that identifies the document classifier.
- On failure, responds with
SdkError<CreateDocumentClassifierError>
source§impl Client
impl Client
sourcepub fn create_endpoint(&self) -> CreateEndpointFluentBuilder
pub fn create_endpoint(&self) -> CreateEndpointFluentBuilder
Constructs a fluent builder for the CreateEndpoint operation.
- The fluent builder is configurable:
endpoint_name(impl Into<String>)/set_endpoint_name(Option<String>):
required: trueThis is the descriptive suffix that becomes part of the
EndpointArnused for all subsequent requests to this resource.model_arn(impl Into<String>)/set_model_arn(Option<String>):
required: falseThe Amazon Resource Number (ARN) of the model to which the endpoint will be attached.
desired_inference_units(i32)/set_desired_inference_units(Option<i32>):
required: trueThe desired number of inference units to be used by the model using this endpoint. Each inference unit represents of a throughput of 100 characters per second.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):
required: falseAn idempotency token provided by the customer. If this token matches a previous endpoint creation request, Amazon Comprehend will not return a
ResourceInUseException.tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseTags to associate with the endpoint. A tag is a key-value pair that adds metadata to the endpoint. For example, a tag with “Sales” as the key might be added to an endpoint to indicate its use by the sales department.
data_access_role_arn(impl Into<String>)/set_data_access_role_arn(Option<String>):
required: falseThe Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to trained custom models encrypted with a customer managed key (ModelKmsKeyId).
flywheel_arn(impl Into<String>)/set_flywheel_arn(Option<String>):
required: falseThe Amazon Resource Number (ARN) of the flywheel to which the endpoint will be attached.
- On success, responds with
CreateEndpointOutputwith field(s):endpoint_arn(Option<String>):The Amazon Resource Number (ARN) of the endpoint being created.
model_arn(Option<String>):The Amazon Resource Number (ARN) of the model to which the endpoint is attached.
- On failure, responds with
SdkError<CreateEndpointError>
source§impl Client
impl Client
sourcepub fn create_entity_recognizer(&self) -> CreateEntityRecognizerFluentBuilder
pub fn create_entity_recognizer(&self) -> CreateEntityRecognizerFluentBuilder
Constructs a fluent builder for the CreateEntityRecognizer operation.
- The fluent builder is configurable:
recognizer_name(impl Into<String>)/set_recognizer_name(Option<String>):
required: trueThe 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.
version_name(impl Into<String>)/set_version_name(Option<String>):
required: falseThe 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.
data_access_role_arn(impl Into<String>)/set_data_access_role_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseTags 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.
input_data_config(EntityRecognizerInputDataConfig)/set_input_data_config(Option<EntityRecognizerInputDataConfig>):
required: trueSpecifies 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.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):
required: falseA unique identifier for the request. If you don’t set the client request token, Amazon Comprehend generates one.
language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: trueYou 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.
volume_kms_key_id(impl Into<String>)/set_volume_kms_key_id(Option<String>):
required: falseID 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”
-
vpc_config(VpcConfig)/set_vpc_config(Option<VpcConfig>):
required: falseConfiguration 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.
model_kms_key_id(impl Into<String>)/set_model_kms_key_id(Option<String>):
required: falseID 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”
-
model_policy(impl Into<String>)/set_model_policy(Option<String>):
required: falseThe 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”]}’
- On success, responds with
CreateEntityRecognizerOutputwith field(s):entity_recognizer_arn(Option<String>):The Amazon Resource Name (ARN) that identifies the entity recognizer.
- On failure, responds with
SdkError<CreateEntityRecognizerError>
source§impl Client
impl Client
sourcepub fn create_flywheel(&self) -> CreateFlywheelFluentBuilder
pub fn create_flywheel(&self) -> CreateFlywheelFluentBuilder
Constructs a fluent builder for the CreateFlywheel operation.
- The fluent builder is configurable:
flywheel_name(impl Into<String>)/set_flywheel_name(Option<String>):
required: trueName for the flywheel.
active_model_arn(impl Into<String>)/set_active_model_arn(Option<String>):
required: falseTo associate an existing model with the flywheel, specify the Amazon Resource Number (ARN) of the model version. Do not set
TaskConfigorModelTypeif you specify anActiveModelArn.data_access_role_arn(impl Into<String>)/set_data_access_role_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend the permissions required to access the flywheel data in the data lake.
task_config(TaskConfig)/set_task_config(Option<TaskConfig>):
required: falseConfiguration about the model associated with the flywheel. You need to set
TaskConfigif you are creating a flywheel for a new model.model_type(ModelType)/set_model_type(Option<ModelType>):
required: falseThe model type. You need to set
ModelTypeif you are creating a flywheel for a new model.data_lake_s3_uri(impl Into<String>)/set_data_lake_s3_uri(Option<String>):
required: trueEnter the S3 location for the data lake. You can specify a new S3 bucket or a new folder of an existing S3 bucket. The flywheel creates the data lake at this location.
data_security_config(DataSecurityConfig)/set_data_security_config(Option<DataSecurityConfig>):
required: falseData security configurations.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):
required: falseA unique identifier for the request. If you don’t set the client request token, Amazon Comprehend generates one.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseThe tags to associate with this flywheel.
- On success, responds with
CreateFlywheelOutputwith field(s):flywheel_arn(Option<String>):The Amazon Resource Number (ARN) of the flywheel.
active_model_arn(Option<String>):The Amazon Resource Number (ARN) of the active model version.
- On failure, responds with
SdkError<CreateFlywheelError>
source§impl Client
impl Client
sourcepub fn delete_document_classifier(
&self
) -> DeleteDocumentClassifierFluentBuilder
pub fn delete_document_classifier( &self ) -> DeleteDocumentClassifierFluentBuilder
Constructs a fluent builder for the DeleteDocumentClassifier operation.
- The fluent builder is configurable:
document_classifier_arn(impl Into<String>)/set_document_classifier_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) that identifies the document classifier.
- On success, responds with
DeleteDocumentClassifierOutput - On failure, responds with
SdkError<DeleteDocumentClassifierError>
source§impl Client
impl Client
sourcepub fn delete_endpoint(&self) -> DeleteEndpointFluentBuilder
pub fn delete_endpoint(&self) -> DeleteEndpointFluentBuilder
Constructs a fluent builder for the DeleteEndpoint operation.
- The fluent builder is configurable:
endpoint_arn(impl Into<String>)/set_endpoint_arn(Option<String>):
required: trueThe Amazon Resource Number (ARN) of the endpoint being deleted.
- On success, responds with
DeleteEndpointOutput - On failure, responds with
SdkError<DeleteEndpointError>
source§impl Client
impl Client
sourcepub fn delete_entity_recognizer(&self) -> DeleteEntityRecognizerFluentBuilder
pub fn delete_entity_recognizer(&self) -> DeleteEntityRecognizerFluentBuilder
Constructs a fluent builder for the DeleteEntityRecognizer operation.
- The fluent builder is configurable:
entity_recognizer_arn(impl Into<String>)/set_entity_recognizer_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) that identifies the entity recognizer.
- On success, responds with
DeleteEntityRecognizerOutput - On failure, responds with
SdkError<DeleteEntityRecognizerError>
source§impl Client
impl Client
sourcepub fn delete_flywheel(&self) -> DeleteFlywheelFluentBuilder
pub fn delete_flywheel(&self) -> DeleteFlywheelFluentBuilder
Constructs a fluent builder for the DeleteFlywheel operation.
- The fluent builder is configurable:
flywheel_arn(impl Into<String>)/set_flywheel_arn(Option<String>):
required: trueThe Amazon Resource Number (ARN) of the flywheel to delete.
- On success, responds with
DeleteFlywheelOutput - On failure, responds with
SdkError<DeleteFlywheelError>
source§impl Client
impl Client
sourcepub fn delete_resource_policy(&self) -> DeleteResourcePolicyFluentBuilder
pub fn delete_resource_policy(&self) -> DeleteResourcePolicyFluentBuilder
Constructs a fluent builder for the DeleteResourcePolicy operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the custom model version that has the policy to delete.
policy_revision_id(impl Into<String>)/set_policy_revision_id(Option<String>):
required: falseThe revision ID of the policy to delete.
- On success, responds with
DeleteResourcePolicyOutput - On failure, responds with
SdkError<DeleteResourcePolicyError>
source§impl Client
impl Client
sourcepub fn describe_dataset(&self) -> DescribeDatasetFluentBuilder
pub fn describe_dataset(&self) -> DescribeDatasetFluentBuilder
Constructs a fluent builder for the DescribeDataset operation.
- The fluent builder is configurable:
dataset_arn(impl Into<String>)/set_dataset_arn(Option<String>):
required: trueThe ARN of the dataset.
- On success, responds with
DescribeDatasetOutputwith field(s):dataset_properties(Option<DatasetProperties>):The dataset properties.
- On failure, responds with
SdkError<DescribeDatasetError>
source§impl Client
impl Client
sourcepub fn describe_document_classification_job(
&self
) -> DescribeDocumentClassificationJobFluentBuilder
pub fn describe_document_classification_job( &self ) -> DescribeDocumentClassificationJobFluentBuilder
Constructs a fluent builder for the DescribeDocumentClassificationJob operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe identifier that Amazon Comprehend generated for the job. The
StartDocumentClassificationJoboperation returns this identifier in its response.
- On success, responds with
DescribeDocumentClassificationJobOutputwith field(s):document_classification_job_properties(Option<DocumentClassificationJobProperties>):An object that describes the properties associated with the document classification job.
- On failure, responds with
SdkError<DescribeDocumentClassificationJobError>
source§impl Client
impl Client
sourcepub fn describe_document_classifier(
&self
) -> DescribeDocumentClassifierFluentBuilder
pub fn describe_document_classifier( &self ) -> DescribeDocumentClassifierFluentBuilder
Constructs a fluent builder for the DescribeDocumentClassifier operation.
- The fluent builder is configurable:
document_classifier_arn(impl Into<String>)/set_document_classifier_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) that identifies the document classifier. The
CreateDocumentClassifieroperation returns this identifier in its response.
- On success, responds with
DescribeDocumentClassifierOutputwith field(s):document_classifier_properties(Option<DocumentClassifierProperties>):An object that contains the properties associated with a document classifier.
- On failure, responds with
SdkError<DescribeDocumentClassifierError>
source§impl Client
impl Client
sourcepub fn describe_dominant_language_detection_job(
&self
) -> DescribeDominantLanguageDetectionJobFluentBuilder
pub fn describe_dominant_language_detection_job( &self ) -> DescribeDominantLanguageDetectionJobFluentBuilder
Constructs a fluent builder for the DescribeDominantLanguageDetectionJob operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe identifier that Amazon Comprehend generated for the job. The
StartDominantLanguageDetectionJoboperation returns this identifier in its response.
- On success, responds with
DescribeDominantLanguageDetectionJobOutputwith field(s):dominant_language_detection_job_properties(Option<DominantLanguageDetectionJobProperties>):An object that contains the properties associated with a dominant language detection job.
- On failure, responds with
SdkError<DescribeDominantLanguageDetectionJobError>
source§impl Client
impl Client
sourcepub fn describe_endpoint(&self) -> DescribeEndpointFluentBuilder
pub fn describe_endpoint(&self) -> DescribeEndpointFluentBuilder
Constructs a fluent builder for the DescribeEndpoint operation.
- The fluent builder is configurable:
endpoint_arn(impl Into<String>)/set_endpoint_arn(Option<String>):
required: trueThe Amazon Resource Number (ARN) of the endpoint being described.
- On success, responds with
DescribeEndpointOutputwith field(s):endpoint_properties(Option<EndpointProperties>):Describes information associated with the specific endpoint.
- On failure, responds with
SdkError<DescribeEndpointError>
source§impl Client
impl Client
sourcepub fn describe_entities_detection_job(
&self
) -> DescribeEntitiesDetectionJobFluentBuilder
pub fn describe_entities_detection_job( &self ) -> DescribeEntitiesDetectionJobFluentBuilder
Constructs a fluent builder for the DescribeEntitiesDetectionJob operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe identifier that Amazon Comprehend generated for the job. The
StartEntitiesDetectionJoboperation returns this identifier in its response.
- On success, responds with
DescribeEntitiesDetectionJobOutputwith field(s):entities_detection_job_properties(Option<EntitiesDetectionJobProperties>):An object that contains the properties associated with an entities detection job.
- On failure, responds with
SdkError<DescribeEntitiesDetectionJobError>
source§impl Client
impl Client
sourcepub fn describe_entity_recognizer(
&self
) -> DescribeEntityRecognizerFluentBuilder
pub fn describe_entity_recognizer( &self ) -> DescribeEntityRecognizerFluentBuilder
Constructs a fluent builder for the DescribeEntityRecognizer operation.
- The fluent builder is configurable:
entity_recognizer_arn(impl Into<String>)/set_entity_recognizer_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) that identifies the entity recognizer.
- On success, responds with
DescribeEntityRecognizerOutputwith field(s):entity_recognizer_properties(Option<EntityRecognizerProperties>):Describes information associated with an entity recognizer.
- On failure, responds with
SdkError<DescribeEntityRecognizerError>
source§impl Client
impl Client
sourcepub fn describe_events_detection_job(
&self
) -> DescribeEventsDetectionJobFluentBuilder
pub fn describe_events_detection_job( &self ) -> DescribeEventsDetectionJobFluentBuilder
Constructs a fluent builder for the DescribeEventsDetectionJob operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe identifier of the events detection job.
- On success, responds with
DescribeEventsDetectionJobOutputwith field(s):events_detection_job_properties(Option<EventsDetectionJobProperties>):An object that contains the properties associated with an event detection job.
- On failure, responds with
SdkError<DescribeEventsDetectionJobError>
source§impl Client
impl Client
sourcepub fn describe_flywheel(&self) -> DescribeFlywheelFluentBuilder
pub fn describe_flywheel(&self) -> DescribeFlywheelFluentBuilder
Constructs a fluent builder for the DescribeFlywheel operation.
- The fluent builder is configurable:
flywheel_arn(impl Into<String>)/set_flywheel_arn(Option<String>):
required: trueThe Amazon Resource Number (ARN) of the flywheel.
- On success, responds with
DescribeFlywheelOutputwith field(s):flywheel_properties(Option<FlywheelProperties>):The flywheel properties.
- On failure, responds with
SdkError<DescribeFlywheelError>
source§impl Client
impl Client
sourcepub fn describe_flywheel_iteration(
&self
) -> DescribeFlywheelIterationFluentBuilder
pub fn describe_flywheel_iteration( &self ) -> DescribeFlywheelIterationFluentBuilder
Constructs a fluent builder for the DescribeFlywheelIteration operation.
- The fluent builder is configurable:
flywheel_arn(impl Into<String>)/set_flywheel_arn(Option<String>):
required: trueflywheel_iteration_id(impl Into<String>)/set_flywheel_iteration_id(Option<String>):
required: true
- On success, responds with
DescribeFlywheelIterationOutputwith field(s):flywheel_iteration_properties(Option<FlywheelIterationProperties>):The configuration properties of a flywheel iteration.
- On failure, responds with
SdkError<DescribeFlywheelIterationError>
source§impl Client
impl Client
sourcepub fn describe_key_phrases_detection_job(
&self
) -> DescribeKeyPhrasesDetectionJobFluentBuilder
pub fn describe_key_phrases_detection_job( &self ) -> DescribeKeyPhrasesDetectionJobFluentBuilder
Constructs a fluent builder for the DescribeKeyPhrasesDetectionJob operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe identifier that Amazon Comprehend generated for the job. The
StartKeyPhrasesDetectionJoboperation returns this identifier in its response.
- On success, responds with
DescribeKeyPhrasesDetectionJobOutputwith field(s):key_phrases_detection_job_properties(Option<KeyPhrasesDetectionJobProperties>):An object that contains the properties associated with a key phrases detection job.
- On failure, responds with
SdkError<DescribeKeyPhrasesDetectionJobError>
source§impl Client
impl Client
sourcepub fn describe_pii_entities_detection_job(
&self
) -> DescribePiiEntitiesDetectionJobFluentBuilder
pub fn describe_pii_entities_detection_job( &self ) -> DescribePiiEntitiesDetectionJobFluentBuilder
Constructs a fluent builder for the DescribePiiEntitiesDetectionJob operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe identifier that Amazon Comprehend generated for the job. The operation returns this identifier in its response.
- On success, responds with
DescribePiiEntitiesDetectionJobOutputwith field(s):pii_entities_detection_job_properties(Option<PiiEntitiesDetectionJobProperties>):Provides information about a PII entities detection job.
- On failure, responds with
SdkError<DescribePiiEntitiesDetectionJobError>
source§impl Client
impl Client
sourcepub fn describe_resource_policy(&self) -> DescribeResourcePolicyFluentBuilder
pub fn describe_resource_policy(&self) -> DescribeResourcePolicyFluentBuilder
Constructs a fluent builder for the DescribeResourcePolicy operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the custom model version that has the resource policy.
- On success, responds with
DescribeResourcePolicyOutputwith field(s):resource_policy(Option<String>):The JSON body of the resource-based policy.
creation_time(Option<DateTime>):The time at which the policy was created.
last_modified_time(Option<DateTime>):The time at which the policy was last modified.
policy_revision_id(Option<String>):The revision ID of the policy. Each time you modify a policy, Amazon Comprehend assigns a new revision ID, and it deletes the prior version of the policy.
- On failure, responds with
SdkError<DescribeResourcePolicyError>
source§impl Client
impl Client
sourcepub fn describe_sentiment_detection_job(
&self
) -> DescribeSentimentDetectionJobFluentBuilder
pub fn describe_sentiment_detection_job( &self ) -> DescribeSentimentDetectionJobFluentBuilder
Constructs a fluent builder for the DescribeSentimentDetectionJob operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe identifier that Amazon Comprehend generated for the job. The operation returns this identifier in its response.
- On success, responds with
DescribeSentimentDetectionJobOutputwith field(s):sentiment_detection_job_properties(Option<SentimentDetectionJobProperties>):An object that contains the properties associated with a sentiment detection job.
- On failure, responds with
SdkError<DescribeSentimentDetectionJobError>
source§impl Client
impl Client
sourcepub fn describe_targeted_sentiment_detection_job(
&self
) -> DescribeTargetedSentimentDetectionJobFluentBuilder
pub fn describe_targeted_sentiment_detection_job( &self ) -> DescribeTargetedSentimentDetectionJobFluentBuilder
Constructs a fluent builder for the DescribeTargetedSentimentDetectionJob operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe identifier that Amazon Comprehend generated for the job. The
StartTargetedSentimentDetectionJoboperation returns this identifier in its response.
- On success, responds with
DescribeTargetedSentimentDetectionJobOutputwith field(s):targeted_sentiment_detection_job_properties(Option<TargetedSentimentDetectionJobProperties>):An object that contains the properties associated with a targeted sentiment detection job.
- On failure, responds with
SdkError<DescribeTargetedSentimentDetectionJobError>
source§impl Client
impl Client
sourcepub fn describe_topics_detection_job(
&self
) -> DescribeTopicsDetectionJobFluentBuilder
pub fn describe_topics_detection_job( &self ) -> DescribeTopicsDetectionJobFluentBuilder
Constructs a fluent builder for the DescribeTopicsDetectionJob operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe identifier assigned by the user to the detection job.
- On success, responds with
DescribeTopicsDetectionJobOutputwith field(s):topics_detection_job_properties(Option<TopicsDetectionJobProperties>):The list of properties for the requested job.
- On failure, responds with
SdkError<DescribeTopicsDetectionJobError>
source§impl Client
impl Client
sourcepub fn detect_dominant_language(&self) -> DetectDominantLanguageFluentBuilder
pub fn detect_dominant_language(&self) -> DetectDominantLanguageFluentBuilder
Constructs a fluent builder for the DetectDominantLanguage operation.
- The fluent builder is configurable:
text(impl Into<String>)/set_text(Option<String>):
required: trueA UTF-8 text string. The string must contain at least 20 characters. The maximum string size is 100 KB.
- On success, responds with
DetectDominantLanguageOutputwith field(s):languages(Option<Vec::<DominantLanguage>>):Array of languages that Amazon Comprehend detected in the input text. The array is sorted in descending order of the score (the dominant language is always the first element in the array).
For each language, the response returns the RFC 5646 language code and the level of confidence that Amazon Comprehend has in the accuracy of its inference. For more information about RFC 5646, see Tags for Identifying Languages on the IETF Tools web site.
- On failure, responds with
SdkError<DetectDominantLanguageError>
source§impl Client
impl Client
sourcepub fn detect_entities(&self) -> DetectEntitiesFluentBuilder
pub fn detect_entities(&self) -> DetectEntitiesFluentBuilder
Constructs a fluent builder for the DetectEntities operation.
- The fluent builder is configurable:
text(impl Into<String>)/set_text(Option<String>):
required: falseA UTF-8 text string. The maximum string size is 100 KB. If you enter text using this parameter, do not use the
Bytesparameter.language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: falseThe language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. If your request includes the endpoint for a custom entity recognition model, Amazon Comprehend uses the language of your custom model, and it ignores any language code that you specify here.
All input documents must be in the same language.
endpoint_arn(impl Into<String>)/set_endpoint_arn(Option<String>):
required: falseThe Amazon Resource Name of an endpoint that is associated with a custom entity recognition model. Provide an endpoint if you want to detect entities by using your own custom model instead of the default model that is used by Amazon Comprehend.
If you specify an endpoint, Amazon Comprehend uses the language of your custom model, and it ignores any language code that you provide in your request.
For information about endpoints, see Managing endpoints.
bytes(Blob)/set_bytes(Option<Blob>):
required: falseThis field applies only when you use a custom entity recognition model that was trained with PDF annotations. For other cases, enter your text input in the
Textfield.Use the
Bytesparameter to input a text, PDF, Word or image file. Using a plain-text file in theBytesparameter is equivelent to using theTextparameter (theEntitiesfield in the response is identical).You can also use the
Bytesparameter to input an Amazon TextractDetectDocumentTextorAnalyzeDocumentoutput file.Provide the input document as a sequence of base64-encoded bytes. If your code uses an Amazon Web Services SDK to detect entities, the SDK may encode the document file bytes for you.
The maximum length of this field depends on the input document type. For details, see Inputs for real-time custom analysis in the Comprehend Developer Guide.
If you use the
Bytesparameter, do not use theTextparameter.document_reader_config(DocumentReaderConfig)/set_document_reader_config(Option<DocumentReaderConfig>):
required: falseProvides configuration parameters to override the default actions for extracting text from PDF documents and image files.
- On success, responds with
DetectEntitiesOutputwith field(s):entities(Option<Vec::<Entity>>):A collection of entities identified in the input text. For each entity, the response provides the entity text, entity type, where the entity text begins and ends, and the level of confidence that Amazon Comprehend has in the detection.
If your request uses a custom entity recognition model, Amazon Comprehend detects the entities that the model is trained to recognize. Otherwise, it detects the default entity types. For a list of default entity types, see Entities in the Comprehend Developer Guide.
document_metadata(Option<DocumentMetadata>):Information about the document, discovered during text extraction. This field is present in the response only if your request used the
Byteparameter.document_type(Option<Vec::<DocumentTypeListItem>>):The document type for each page in the input document. This field is present in the response only if your request used the
Byteparameter.blocks(Option<Vec::<Block>>):Information about each block of text in the input document. Blocks are nested. A page block contains a block for each line of text, which contains a block for each word.
The
Blockcontent for a Word input document does not include aGeometryfield.The
Blockfield is not present in the response for plain-text inputs.errors(Option<Vec::<ErrorsListItem>>):Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors.
- On failure, responds with
SdkError<DetectEntitiesError>
source§impl Client
impl Client
sourcepub fn detect_key_phrases(&self) -> DetectKeyPhrasesFluentBuilder
pub fn detect_key_phrases(&self) -> DetectKeyPhrasesFluentBuilder
Constructs a fluent builder for the DetectKeyPhrases operation.
- The fluent builder is configurable:
text(impl Into<String>)/set_text(Option<String>):
required: trueA UTF-8 text string. The string must contain less than 100 KB of UTF-8 encoded characters.
language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: trueThe language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
- On success, responds with
DetectKeyPhrasesOutputwith field(s):key_phrases(Option<Vec::<KeyPhrase>>):A collection of key phrases that Amazon Comprehend identified in the input text. For each key phrase, the response provides the text of the key phrase, where the key phrase begins and ends, and the level of confidence that Amazon Comprehend has in the accuracy of the detection.
- On failure, responds with
SdkError<DetectKeyPhrasesError>
source§impl Client
impl Client
sourcepub fn detect_pii_entities(&self) -> DetectPiiEntitiesFluentBuilder
pub fn detect_pii_entities(&self) -> DetectPiiEntitiesFluentBuilder
Constructs a fluent builder for the DetectPiiEntities operation.
- The fluent builder is configurable:
text(impl Into<String>)/set_text(Option<String>):
required: trueA UTF-8 text string. The maximum string size is 100 KB.
language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: trueThe language of the input documents. Currently, English is the only valid language.
- On success, responds with
DetectPiiEntitiesOutputwith field(s):entities(Option<Vec::<PiiEntity>>):A collection of PII entities identified in the input text. For each entity, the response provides the entity type, where the entity text begins and ends, and the level of confidence that Amazon Comprehend has in the detection.
- On failure, responds with
SdkError<DetectPiiEntitiesError>
source§impl Client
impl Client
sourcepub fn detect_sentiment(&self) -> DetectSentimentFluentBuilder
pub fn detect_sentiment(&self) -> DetectSentimentFluentBuilder
Constructs a fluent builder for the DetectSentiment operation.
- The fluent builder is configurable:
text(impl Into<String>)/set_text(Option<String>):
required: trueA UTF-8 text string. The maximum string size is 5 KB.
language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: trueThe language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
- On success, responds with
DetectSentimentOutputwith field(s):sentiment(Option<SentimentType>):The inferred sentiment that Amazon Comprehend has the highest level of confidence in.
sentiment_score(Option<SentimentScore>):An object that lists the sentiments, and their corresponding confidence levels.
- On failure, responds with
SdkError<DetectSentimentError>
source§impl Client
impl Client
sourcepub fn detect_syntax(&self) -> DetectSyntaxFluentBuilder
pub fn detect_syntax(&self) -> DetectSyntaxFluentBuilder
Constructs a fluent builder for the DetectSyntax operation.
- The fluent builder is configurable:
text(impl Into<String>)/set_text(Option<String>):
required: trueA UTF-8 string. The maximum string size is 5 KB.
language_code(SyntaxLanguageCode)/set_language_code(Option<SyntaxLanguageCode>):
required: trueThe language code of the input documents. You can specify any of the following languages supported by Amazon Comprehend: German (“de”), English (“en”), Spanish (“es”), French (“fr”), Italian (“it”), or Portuguese (“pt”).
- On success, responds with
DetectSyntaxOutputwith field(s):syntax_tokens(Option<Vec::<SyntaxToken>>):A collection of syntax tokens describing the text. For each token, the response provides the text, the token type, where the text begins and ends, and the level of confidence that Amazon Comprehend has that the token is correct. For a list of token types, see Syntax in the Comprehend Developer Guide.
- On failure, responds with
SdkError<DetectSyntaxError>
source§impl Client
impl Client
sourcepub fn detect_targeted_sentiment(&self) -> DetectTargetedSentimentFluentBuilder
pub fn detect_targeted_sentiment(&self) -> DetectTargetedSentimentFluentBuilder
Constructs a fluent builder for the DetectTargetedSentiment operation.
- The fluent builder is configurable:
text(impl Into<String>)/set_text(Option<String>):
required: trueA UTF-8 text string. The maximum string length is 5 KB.
language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: trueThe language of the input documents. Currently, English is the only supported language.
- On success, responds with
DetectTargetedSentimentOutputwith field(s):entities(Option<Vec::<TargetedSentimentEntity>>):Targeted sentiment analysis for each of the entities identified in the input text.
- On failure, responds with
SdkError<DetectTargetedSentimentError>
source§impl Client
impl Client
sourcepub fn detect_toxic_content(&self) -> DetectToxicContentFluentBuilder
pub fn detect_toxic_content(&self) -> DetectToxicContentFluentBuilder
Constructs a fluent builder for the DetectToxicContent operation.
- The fluent builder is configurable:
text_segments(TextSegment)/set_text_segments(Option<Vec::<TextSegment>>):
required: trueA list of up to 10 text strings. Each string has a maximum size of 1 KB, and the maximum size of the list is 10 KB.
language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: trueThe language of the input text. Currently, English is the only supported language.
- On success, responds with
DetectToxicContentOutputwith field(s):result_list(Option<Vec::<ToxicLabels>>):Results of the content moderation analysis. Each entry in the results list contains a list of toxic content types identified in the text, along with a confidence score for each content type. The results list also includes a toxicity score for each entry in the results list.
- On failure, responds with
SdkError<DetectToxicContentError>
source§impl Client
impl Client
sourcepub fn import_model(&self) -> ImportModelFluentBuilder
pub fn import_model(&self) -> ImportModelFluentBuilder
Constructs a fluent builder for the ImportModel operation.
- The fluent builder is configurable:
source_model_arn(impl Into<String>)/set_source_model_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the custom model to import.
model_name(impl Into<String>)/set_model_name(Option<String>):
required: falseThe name to assign to the custom model that is created in Amazon Comprehend by this import.
version_name(impl Into<String>)/set_version_name(Option<String>):
required: falseThe 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.
model_kms_key_id(impl Into<String>)/set_model_kms_key_id(Option<String>):
required: falseID 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”
-
data_access_role_arn(impl Into<String>)/set_data_access_role_arn(Option<String>):
required: falseThe 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.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseTags 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.
- On success, responds with
ImportModelOutputwith field(s):model_arn(Option<String>):The Amazon Resource Name (ARN) of the custom model being imported.
- On failure, responds with
SdkError<ImportModelError>
source§impl Client
impl Client
sourcepub fn list_datasets(&self) -> ListDatasetsFluentBuilder
pub fn list_datasets(&self) -> ListDatasetsFluentBuilder
Constructs a fluent builder for the ListDatasets operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
flywheel_arn(impl Into<String>)/set_flywheel_arn(Option<String>):
required: falseThe Amazon Resource Number (ARN) of the flywheel.
filter(DatasetFilter)/set_filter(Option<DatasetFilter>):
required: falseFilters the datasets to be returned in the response.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIdentifies the next page of results to return.
max_results(i32)/set_max_results(Option<i32>):
required: falseMaximum number of results to return in a response. The default is 100.
- On success, responds with
ListDatasetsOutputwith field(s):dataset_properties_list(Option<Vec::<DatasetProperties>>):The dataset properties list.
next_token(Option<String>):Identifies the next page of results to return.
- On failure, responds with
SdkError<ListDatasetsError>
source§impl Client
impl Client
sourcepub fn list_document_classification_jobs(
&self
) -> ListDocumentClassificationJobsFluentBuilder
pub fn list_document_classification_jobs( &self ) -> ListDocumentClassificationJobsFluentBuilder
Constructs a fluent builder for the ListDocumentClassificationJobs operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filter(DocumentClassificationJobFilter)/set_filter(Option<DocumentClassificationJobFilter>):
required: falseFilters the jobs that are returned. You can filter jobs on their names, status, or the date and time that they were submitted. You can only set one filter at a time.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIdentifies the next page of results to return.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in each page. The default is 100.
- On success, responds with
ListDocumentClassificationJobsOutputwith field(s):document_classification_job_properties_list(Option<Vec::<DocumentClassificationJobProperties>>):A list containing the properties of each job returned.
next_token(Option<String>):Identifies the next page of results to return.
- On failure, responds with
SdkError<ListDocumentClassificationJobsError>
source§impl Client
impl Client
sourcepub fn list_document_classifier_summaries(
&self
) -> ListDocumentClassifierSummariesFluentBuilder
pub fn list_document_classifier_summaries( &self ) -> ListDocumentClassifierSummariesFluentBuilder
Constructs a fluent builder for the ListDocumentClassifierSummaries operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIdentifies the next page of results to return.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return on each page. The default is 100.
- On success, responds with
ListDocumentClassifierSummariesOutputwith field(s):document_classifier_summaries_list(Option<Vec::<DocumentClassifierSummary>>):The list of summaries of document classifiers.
next_token(Option<String>):Identifies the next page of results to return.
- On failure, responds with
SdkError<ListDocumentClassifierSummariesError>
source§impl Client
impl Client
sourcepub fn list_document_classifiers(&self) -> ListDocumentClassifiersFluentBuilder
pub fn list_document_classifiers(&self) -> ListDocumentClassifiersFluentBuilder
Constructs a fluent builder for the ListDocumentClassifiers operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filter(DocumentClassifierFilter)/set_filter(Option<DocumentClassifierFilter>):
required: falseFilters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIdentifies the next page of results to return.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in each page. The default is 100.
- On success, responds with
ListDocumentClassifiersOutputwith field(s):document_classifier_properties_list(Option<Vec::<DocumentClassifierProperties>>):A list containing the properties of each job returned.
next_token(Option<String>):Identifies the next page of results to return.
- On failure, responds with
SdkError<ListDocumentClassifiersError>
source§impl Client
impl Client
sourcepub fn list_dominant_language_detection_jobs(
&self
) -> ListDominantLanguageDetectionJobsFluentBuilder
pub fn list_dominant_language_detection_jobs( &self ) -> ListDominantLanguageDetectionJobsFluentBuilder
Constructs a fluent builder for the ListDominantLanguageDetectionJobs operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filter(DominantLanguageDetectionJobFilter)/set_filter(Option<DominantLanguageDetectionJobFilter>):
required: falseFilters that jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIdentifies the next page of results to return.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in each page. The default is 100.
- On success, responds with
ListDominantLanguageDetectionJobsOutputwith field(s):dominant_language_detection_job_properties_list(Option<Vec::<DominantLanguageDetectionJobProperties>>):A list containing the properties of each job that is returned.
next_token(Option<String>):Identifies the next page of results to return.
- On failure, responds with
SdkError<ListDominantLanguageDetectionJobsError>
source§impl Client
impl Client
sourcepub fn list_endpoints(&self) -> ListEndpointsFluentBuilder
pub fn list_endpoints(&self) -> ListEndpointsFluentBuilder
Constructs a fluent builder for the ListEndpoints operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filter(EndpointFilter)/set_filter(Option<EndpointFilter>):
required: falseFilters the endpoints that are returned. You can filter endpoints on their name, model, status, or the date and time that they were created. You can only set one filter at a time.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIdentifies the next page of results to return.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in each page. The default is 100.
- On success, responds with
ListEndpointsOutputwith field(s):endpoint_properties_list(Option<Vec::<EndpointProperties>>):Displays a list of endpoint properties being retrieved by the service in response to the request.
next_token(Option<String>):Identifies the next page of results to return.
- On failure, responds with
SdkError<ListEndpointsError>
source§impl Client
impl Client
sourcepub fn list_entities_detection_jobs(
&self
) -> ListEntitiesDetectionJobsFluentBuilder
pub fn list_entities_detection_jobs( &self ) -> ListEntitiesDetectionJobsFluentBuilder
Constructs a fluent builder for the ListEntitiesDetectionJobs operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filter(EntitiesDetectionJobFilter)/set_filter(Option<EntitiesDetectionJobFilter>):
required: falseFilters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIdentifies the next page of results to return.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in each page. The default is 100.
- On success, responds with
ListEntitiesDetectionJobsOutputwith field(s):entities_detection_job_properties_list(Option<Vec::<EntitiesDetectionJobProperties>>):A list containing the properties of each job that is returned.
next_token(Option<String>):Identifies the next page of results to return.
- On failure, responds with
SdkError<ListEntitiesDetectionJobsError>
source§impl Client
impl Client
sourcepub fn list_entity_recognizer_summaries(
&self
) -> ListEntityRecognizerSummariesFluentBuilder
pub fn list_entity_recognizer_summaries( &self ) -> ListEntityRecognizerSummariesFluentBuilder
Constructs a fluent builder for the ListEntityRecognizerSummaries operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIdentifies the next page of results to return.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return on each page. The default is 100.
- On success, responds with
ListEntityRecognizerSummariesOutputwith field(s):entity_recognizer_summaries_list(Option<Vec::<EntityRecognizerSummary>>):The list entity recognizer summaries.
next_token(Option<String>):Identifies the next page of results to return.
- On failure, responds with
SdkError<ListEntityRecognizerSummariesError>
source§impl Client
impl Client
sourcepub fn list_entity_recognizers(&self) -> ListEntityRecognizersFluentBuilder
pub fn list_entity_recognizers(&self) -> ListEntityRecognizersFluentBuilder
Constructs a fluent builder for the ListEntityRecognizers operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filter(EntityRecognizerFilter)/set_filter(Option<EntityRecognizerFilter>):
required: falseFilters the list of entities returned. You can filter on
Status,SubmitTimeBefore, orSubmitTimeAfter. You can only set one filter at a time.next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIdentifies the next page of results to return.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return on each page. The default is 100.
- On success, responds with
ListEntityRecognizersOutputwith field(s):entity_recognizer_properties_list(Option<Vec::<EntityRecognizerProperties>>):The list of properties of an entity recognizer.
next_token(Option<String>):Identifies the next page of results to return.
- On failure, responds with
SdkError<ListEntityRecognizersError>
source§impl Client
impl Client
sourcepub fn list_events_detection_jobs(&self) -> ListEventsDetectionJobsFluentBuilder
pub fn list_events_detection_jobs(&self) -> ListEventsDetectionJobsFluentBuilder
Constructs a fluent builder for the ListEventsDetectionJobs operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filter(EventsDetectionJobFilter)/set_filter(Option<EventsDetectionJobFilter>):
required: falseFilters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIdentifies the next page of results to return.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in each page.
- On success, responds with
ListEventsDetectionJobsOutputwith field(s):events_detection_job_properties_list(Option<Vec::<EventsDetectionJobProperties>>):A list containing the properties of each job that is returned.
next_token(Option<String>):Identifies the next page of results to return.
- On failure, responds with
SdkError<ListEventsDetectionJobsError>
source§impl Client
impl Client
sourcepub fn list_flywheel_iteration_history(
&self
) -> ListFlywheelIterationHistoryFluentBuilder
pub fn list_flywheel_iteration_history( &self ) -> ListFlywheelIterationHistoryFluentBuilder
Constructs a fluent builder for the ListFlywheelIterationHistory operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
flywheel_arn(impl Into<String>)/set_flywheel_arn(Option<String>):
required: trueThe ARN of the flywheel.
filter(FlywheelIterationFilter)/set_filter(Option<FlywheelIterationFilter>):
required: falseFilter the flywheel iteration history based on creation time.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseNext token
max_results(i32)/set_max_results(Option<i32>):
required: falseMaximum number of iteration history results to return
- On success, responds with
ListFlywheelIterationHistoryOutputwith field(s):flywheel_iteration_properties_list(Option<Vec::<FlywheelIterationProperties>>):List of flywheel iteration properties
next_token(Option<String>):Next token
- On failure, responds with
SdkError<ListFlywheelIterationHistoryError>
source§impl Client
impl Client
sourcepub fn list_flywheels(&self) -> ListFlywheelsFluentBuilder
pub fn list_flywheels(&self) -> ListFlywheelsFluentBuilder
Constructs a fluent builder for the ListFlywheels operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filter(FlywheelFilter)/set_filter(Option<FlywheelFilter>):
required: falseFilters the flywheels that are returned. You can filter flywheels on their status, or the date and time that they were submitted. You can only set one filter at a time.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIdentifies the next page of results to return.
max_results(i32)/set_max_results(Option<i32>):
required: falseMaximum number of results to return in a response. The default is 100.
- On success, responds with
ListFlywheelsOutputwith field(s):flywheel_summary_list(Option<Vec::<FlywheelSummary>>):A list of flywheel properties retrieved by the service in response to the request.
next_token(Option<String>):Identifies the next page of results to return.
- On failure, responds with
SdkError<ListFlywheelsError>
source§impl Client
impl Client
sourcepub fn list_key_phrases_detection_jobs(
&self
) -> ListKeyPhrasesDetectionJobsFluentBuilder
pub fn list_key_phrases_detection_jobs( &self ) -> ListKeyPhrasesDetectionJobsFluentBuilder
Constructs a fluent builder for the ListKeyPhrasesDetectionJobs operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filter(KeyPhrasesDetectionJobFilter)/set_filter(Option<KeyPhrasesDetectionJobFilter>):
required: falseFilters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIdentifies the next page of results to return.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in each page. The default is 100.
- On success, responds with
ListKeyPhrasesDetectionJobsOutputwith field(s):key_phrases_detection_job_properties_list(Option<Vec::<KeyPhrasesDetectionJobProperties>>):A list containing the properties of each job that is returned.
next_token(Option<String>):Identifies the next page of results to return.
- On failure, responds with
SdkError<ListKeyPhrasesDetectionJobsError>
source§impl Client
impl Client
sourcepub fn list_pii_entities_detection_jobs(
&self
) -> ListPiiEntitiesDetectionJobsFluentBuilder
pub fn list_pii_entities_detection_jobs( &self ) -> ListPiiEntitiesDetectionJobsFluentBuilder
Constructs a fluent builder for the ListPiiEntitiesDetectionJobs operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filter(PiiEntitiesDetectionJobFilter)/set_filter(Option<PiiEntitiesDetectionJobFilter>):
required: falseFilters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIdentifies the next page of results to return.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in each page.
- On success, responds with
ListPiiEntitiesDetectionJobsOutputwith field(s):pii_entities_detection_job_properties_list(Option<Vec::<PiiEntitiesDetectionJobProperties>>):A list containing the properties of each job that is returned.
next_token(Option<String>):Identifies the next page of results to return.
- On failure, responds with
SdkError<ListPiiEntitiesDetectionJobsError>
source§impl Client
impl Client
sourcepub fn list_sentiment_detection_jobs(
&self
) -> ListSentimentDetectionJobsFluentBuilder
pub fn list_sentiment_detection_jobs( &self ) -> ListSentimentDetectionJobsFluentBuilder
Constructs a fluent builder for the ListSentimentDetectionJobs operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filter(SentimentDetectionJobFilter)/set_filter(Option<SentimentDetectionJobFilter>):
required: falseFilters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIdentifies the next page of results to return.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in each page. The default is 100.
- On success, responds with
ListSentimentDetectionJobsOutputwith field(s):sentiment_detection_job_properties_list(Option<Vec::<SentimentDetectionJobProperties>>):A list containing the properties of each job that is returned.
next_token(Option<String>):Identifies the next page of results to return.
- On failure, responds with
SdkError<ListSentimentDetectionJobsError>
source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the given Amazon Comprehend resource you are querying.
- On success, responds with
ListTagsForResourceOutputwith field(s):resource_arn(Option<String>):The Amazon Resource Name (ARN) of the given Amazon Comprehend resource you are querying.
tags(Option<Vec::<Tag>>):Tags associated with the Amazon Comprehend resource being queried. 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.
- On failure, responds with
SdkError<ListTagsForResourceError>
source§impl Client
impl Client
sourcepub fn list_targeted_sentiment_detection_jobs(
&self
) -> ListTargetedSentimentDetectionJobsFluentBuilder
pub fn list_targeted_sentiment_detection_jobs( &self ) -> ListTargetedSentimentDetectionJobsFluentBuilder
Constructs a fluent builder for the ListTargetedSentimentDetectionJobs operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filter(TargetedSentimentDetectionJobFilter)/set_filter(Option<TargetedSentimentDetectionJobFilter>):
required: falseFilters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIdentifies the next page of results to return.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in each page. The default is 100.
- On success, responds with
ListTargetedSentimentDetectionJobsOutputwith field(s):targeted_sentiment_detection_job_properties_list(Option<Vec::<TargetedSentimentDetectionJobProperties>>):A list containing the properties of each job that is returned.
next_token(Option<String>):Identifies the next page of results to return.
- On failure, responds with
SdkError<ListTargetedSentimentDetectionJobsError>
source§impl Client
impl Client
sourcepub fn list_topics_detection_jobs(&self) -> ListTopicsDetectionJobsFluentBuilder
pub fn list_topics_detection_jobs(&self) -> ListTopicsDetectionJobsFluentBuilder
Constructs a fluent builder for the ListTopicsDetectionJobs operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filter(TopicsDetectionJobFilter)/set_filter(Option<TopicsDetectionJobFilter>):
required: falseFilters the jobs that are returned. Jobs can be filtered on their name, status, or the date and time that they were submitted. You can set only one filter at a time.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseIdentifies the next page of results to return.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in each page. The default is 100.
- On success, responds with
ListTopicsDetectionJobsOutputwith field(s):topics_detection_job_properties_list(Option<Vec::<TopicsDetectionJobProperties>>):A list containing the properties of each job that is returned.
next_token(Option<String>):Identifies the next page of results to return.
- On failure, responds with
SdkError<ListTopicsDetectionJobsError>
source§impl Client
impl Client
sourcepub fn put_resource_policy(&self) -> PutResourcePolicyFluentBuilder
pub fn put_resource_policy(&self) -> PutResourcePolicyFluentBuilder
Constructs a fluent builder for the PutResourcePolicy operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the custom model to attach the policy to.
resource_policy(impl Into<String>)/set_resource_policy(Option<String>):
required: trueThe JSON resource-based policy to attach to 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”]}’policy_revision_id(impl Into<String>)/set_policy_revision_id(Option<String>):
required: falseThe revision ID that Amazon Comprehend assigned to the policy that you are updating. If you are creating a new policy that has no prior version, don’t use this parameter. Amazon Comprehend creates the revision ID for you.
- On success, responds with
PutResourcePolicyOutputwith field(s):policy_revision_id(Option<String>):The revision ID of the policy. Each time you modify a policy, Amazon Comprehend assigns a new revision ID, and it deletes the prior version of the policy.
- On failure, responds with
SdkError<PutResourcePolicyError>
source§impl Client
impl Client
sourcepub fn start_document_classification_job(
&self
) -> StartDocumentClassificationJobFluentBuilder
pub fn start_document_classification_job( &self ) -> StartDocumentClassificationJobFluentBuilder
Constructs a fluent builder for the StartDocumentClassificationJob operation.
- The fluent builder is configurable:
job_name(impl Into<String>)/set_job_name(Option<String>):
required: falseThe identifier of the job.
document_classifier_arn(impl Into<String>)/set_document_classifier_arn(Option<String>):
required: falseThe Amazon Resource Name (ARN) of the document classifier to use to process the job.
input_data_config(InputDataConfig)/set_input_data_config(Option<InputDataConfig>):
required: trueSpecifies the format and location of the input data for the job.
output_data_config(OutputDataConfig)/set_output_data_config(Option<OutputDataConfig>):
required: trueSpecifies where to send the output files.
data_access_role_arn(impl Into<String>)/set_data_access_role_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):
required: falseA unique identifier for the request. If you do not set the client request token, Amazon Comprehend generates one.
volume_kms_key_id(impl Into<String>)/set_volume_kms_key_id(Option<String>):
required: falseID 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”
-
vpc_config(VpcConfig)/set_vpc_config(Option<VpcConfig>):
required: falseConfiguration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your document classification job. For more information, see Amazon VPC.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseTags to associate with the document classification job. A tag is a key-value pair that adds 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.
flywheel_arn(impl Into<String>)/set_flywheel_arn(Option<String>):
required: falseThe Amazon Resource Number (ARN) of the flywheel associated with the model to use.
- On success, responds with
StartDocumentClassificationJobOutputwith field(s):job_id(Option<String>):The identifier generated for the job. To get the status of the job, use this identifier with the
DescribeDocumentClassificationJoboperation.job_arn(Option<String>):The Amazon Resource Name (ARN) of the document classification job. It is a unique, fully qualified identifier for the job. It includes the Amazon Web Services account, Amazon Web Services Region, and the job ID. The format of the ARN is as follows:
arn::comprehend: : :document-classification-job/ The following is an example job ARN:
arn:aws:comprehend:us-west-2:111122223333:document-classification-job/1234abcd12ab34cd56ef1234567890abjob_status(Option<JobStatus>):The status of the job:
-
SUBMITTED - The job has been received and queued for processing.
-
IN_PROGRESS - Amazon Comprehend is processing the job.
-
COMPLETED - The job was successfully completed and the output is available.
-
FAILED - The job did not complete. For details, use the
DescribeDocumentClassificationJoboperation. -
STOP_REQUESTED - Amazon Comprehend has received a stop request for the job and is processing the request.
-
STOPPED - The job was successfully stopped without completing.
-
document_classifier_arn(Option<String>):The ARN of the custom classification model.
- On failure, responds with
SdkError<StartDocumentClassificationJobError>
source§impl Client
impl Client
sourcepub fn start_dominant_language_detection_job(
&self
) -> StartDominantLanguageDetectionJobFluentBuilder
pub fn start_dominant_language_detection_job( &self ) -> StartDominantLanguageDetectionJobFluentBuilder
Constructs a fluent builder for the StartDominantLanguageDetectionJob operation.
- The fluent builder is configurable:
input_data_config(InputDataConfig)/set_input_data_config(Option<InputDataConfig>):
required: trueSpecifies the format and location of the input data for the job.
output_data_config(OutputDataConfig)/set_output_data_config(Option<OutputDataConfig>):
required: trueSpecifies where to send the output files.
data_access_role_arn(impl Into<String>)/set_data_access_role_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data. For more information, see Role-based permissions.
job_name(impl Into<String>)/set_job_name(Option<String>):
required: falseAn identifier for the job.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):
required: falseA unique identifier for the request. If you do not set the client request token, Amazon Comprehend generates one.
volume_kms_key_id(impl Into<String>)/set_volume_kms_key_id(Option<String>):
required: falseID 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”
-
vpc_config(VpcConfig)/set_vpc_config(Option<VpcConfig>):
required: falseConfiguration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your dominant language detection job. For more information, see Amazon VPC.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseTags to associate with the dominant language detection job. A tag is a key-value pair that adds 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.
- On success, responds with
StartDominantLanguageDetectionJobOutputwith field(s):job_id(Option<String>):The identifier generated for the job. To get the status of a job, use this identifier with the operation.
job_arn(Option<String>):The Amazon Resource Name (ARN) of the dominant language detection job. It is a unique, fully qualified identifier for the job. It includes the Amazon Web Services account, Amazon Web Services Region, and the job ID. The format of the ARN is as follows:
arn::comprehend: : :dominant-language-detection-job/ The following is an example job ARN:
arn:aws:comprehend:us-west-2:111122223333:dominant-language-detection-job/1234abcd12ab34cd56ef1234567890abjob_status(Option<JobStatus>):The status of the job.
-
SUBMITTED - The job has been received and is queued for processing.
-
IN_PROGRESS - Amazon Comprehend is processing the job.
-
COMPLETED - The job was successfully completed and the output is available.
-
FAILED - The job did not complete. To get details, use the operation.
-
- On failure, responds with
SdkError<StartDominantLanguageDetectionJobError>
source§impl Client
impl Client
sourcepub fn start_entities_detection_job(
&self
) -> StartEntitiesDetectionJobFluentBuilder
pub fn start_entities_detection_job( &self ) -> StartEntitiesDetectionJobFluentBuilder
Constructs a fluent builder for the StartEntitiesDetectionJob operation.
- The fluent builder is configurable:
input_data_config(InputDataConfig)/set_input_data_config(Option<InputDataConfig>):
required: trueSpecifies the format and location of the input data for the job.
output_data_config(OutputDataConfig)/set_output_data_config(Option<OutputDataConfig>):
required: trueSpecifies where to send the output files.
data_access_role_arn(impl Into<String>)/set_data_access_role_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data. For more information, see Role-based permissions.
job_name(impl Into<String>)/set_job_name(Option<String>):
required: falseThe identifier of the job.
entity_recognizer_arn(impl Into<String>)/set_entity_recognizer_arn(Option<String>):
required: falseThe Amazon Resource Name (ARN) that identifies the specific entity recognizer to be used by the
StartEntitiesDetectionJob. This ARN is optional and is only used for a custom entity recognition job.language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: trueThe language of the input documents. All documents must be in the same language. You can specify any of the languages supported by Amazon Comprehend. If custom entities recognition is used, this parameter is ignored and the language used for training the model is used instead.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):
required: falseA unique identifier for the request. If you don’t set the client request token, Amazon Comprehend generates one.
volume_kms_key_id(impl Into<String>)/set_volume_kms_key_id(Option<String>):
required: falseID 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”
-
vpc_config(VpcConfig)/set_vpc_config(Option<VpcConfig>):
required: falseConfiguration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your entity detection job. For more information, see Amazon VPC.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseTags to associate with the entities detection job. A tag is a key-value pair that adds 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.
flywheel_arn(impl Into<String>)/set_flywheel_arn(Option<String>):
required: falseThe Amazon Resource Number (ARN) of the flywheel associated with the model to use.
- On success, responds with
StartEntitiesDetectionJobOutputwith field(s):job_id(Option<String>):The identifier generated for the job. To get the status of job, use this identifier with the operation.
job_arn(Option<String>):The Amazon Resource Name (ARN) of the entities detection job. It is a unique, fully qualified identifier for the job. It includes the Amazon Web Services account, Amazon Web Services Region, and the job ID. The format of the ARN is as follows:
arn::comprehend: : :entities-detection-job/ The following is an example job ARN:
arn:aws:comprehend:us-west-2:111122223333:entities-detection-job/1234abcd12ab34cd56ef1234567890abjob_status(Option<JobStatus>):The status of the job.
-
SUBMITTED - The job has been received and is queued for processing.
-
IN_PROGRESS - Amazon Comprehend is processing the job.
-
COMPLETED - The job was successfully completed and the output is available.
-
FAILED - The job did not complete. To get details, use the operation.
-
STOP_REQUESTED - Amazon Comprehend has received a stop request for the job and is processing the request.
-
STOPPED - The job was successfully stopped without completing.
-
entity_recognizer_arn(Option<String>):The ARN of the custom entity recognition model.
- On failure, responds with
SdkError<StartEntitiesDetectionJobError>
source§impl Client
impl Client
sourcepub fn start_events_detection_job(&self) -> StartEventsDetectionJobFluentBuilder
pub fn start_events_detection_job(&self) -> StartEventsDetectionJobFluentBuilder
Constructs a fluent builder for the StartEventsDetectionJob operation.
- The fluent builder is configurable:
input_data_config(InputDataConfig)/set_input_data_config(Option<InputDataConfig>):
required: trueSpecifies the format and location of the input data for the job.
output_data_config(OutputDataConfig)/set_output_data_config(Option<OutputDataConfig>):
required: trueSpecifies where to send the output files.
data_access_role_arn(impl Into<String>)/set_data_access_role_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data.
job_name(impl Into<String>)/set_job_name(Option<String>):
required: falseThe identifier of the events detection job.
language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: trueThe language code of the input documents.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):
required: falseAn unique identifier for the request. If you don’t set the client request token, Amazon Comprehend generates one.
target_event_types(impl Into<String>)/set_target_event_types(Option<Vec::<String>>):
required: trueThe types of events to detect in the input documents.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseTags to associate with the events detection job. A tag is a key-value pair that adds 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.
- On success, responds with
StartEventsDetectionJobOutputwith field(s):job_id(Option<String>):An unique identifier for the request. If you don’t set the client request token, Amazon Comprehend generates one.
job_arn(Option<String>):The Amazon Resource Name (ARN) of the events detection job. It is a unique, fully qualified identifier for the job. It includes the Amazon Web Services account, Amazon Web Services Region, and the job ID. The format of the ARN is as follows:
arn::comprehend: : :events-detection-job/ The following is an example job ARN:
arn:aws:comprehend:us-west-2:111122223333:events-detection-job/1234abcd12ab34cd56ef1234567890abjob_status(Option<JobStatus>):The status of the events detection job.
- On failure, responds with
SdkError<StartEventsDetectionJobError>
source§impl Client
impl Client
sourcepub fn start_flywheel_iteration(&self) -> StartFlywheelIterationFluentBuilder
pub fn start_flywheel_iteration(&self) -> StartFlywheelIterationFluentBuilder
Constructs a fluent builder for the StartFlywheelIteration operation.
- The fluent builder is configurable:
flywheel_arn(impl Into<String>)/set_flywheel_arn(Option<String>):
required: trueThe ARN of the flywheel.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):
required: falseA unique identifier for the request. If you don’t set the client request token, Amazon Comprehend generates one.
- On success, responds with
StartFlywheelIterationOutputwith field(s): - On failure, responds with
SdkError<StartFlywheelIterationError>
source§impl Client
impl Client
sourcepub fn start_key_phrases_detection_job(
&self
) -> StartKeyPhrasesDetectionJobFluentBuilder
pub fn start_key_phrases_detection_job( &self ) -> StartKeyPhrasesDetectionJobFluentBuilder
Constructs a fluent builder for the StartKeyPhrasesDetectionJob operation.
- The fluent builder is configurable:
input_data_config(InputDataConfig)/set_input_data_config(Option<InputDataConfig>):
required: trueSpecifies the format and location of the input data for the job.
output_data_config(OutputDataConfig)/set_output_data_config(Option<OutputDataConfig>):
required: trueSpecifies where to send the output files.
data_access_role_arn(impl Into<String>)/set_data_access_role_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data. For more information, see Role-based permissions.
job_name(impl Into<String>)/set_job_name(Option<String>):
required: falseThe identifier of the job.
language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: trueThe language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):
required: falseA unique identifier for the request. If you don’t set the client request token, Amazon Comprehend generates one.
volume_kms_key_id(impl Into<String>)/set_volume_kms_key_id(Option<String>):
required: falseID 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”
-
vpc_config(VpcConfig)/set_vpc_config(Option<VpcConfig>):
required: falseConfiguration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your key phrases detection job. For more information, see Amazon VPC.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseTags to associate with the key phrases detection job. A tag is a key-value pair that adds 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.
- On success, responds with
StartKeyPhrasesDetectionJobOutputwith field(s):job_id(Option<String>):The identifier generated for the job. To get the status of a job, use this identifier with the operation.
job_arn(Option<String>):The Amazon Resource Name (ARN) of the key phrase detection job. It is a unique, fully qualified identifier for the job. It includes the Amazon Web Services account, Amazon Web Services Region, and the job ID. The format of the ARN is as follows:
arn::comprehend: : :key-phrases-detection-job/ The following is an example job ARN:
arn:aws:comprehend:us-west-2:111122223333:key-phrases-detection-job/1234abcd12ab34cd56ef1234567890abjob_status(Option<JobStatus>):The status of the job.
-
SUBMITTED - The job has been received and is queued for processing.
-
IN_PROGRESS - Amazon Comprehend is processing the job.
-
COMPLETED - The job was successfully completed and the output is available.
-
FAILED - The job did not complete. To get details, use the operation.
-
- On failure, responds with
SdkError<StartKeyPhrasesDetectionJobError>
source§impl Client
impl Client
sourcepub fn start_pii_entities_detection_job(
&self
) -> StartPiiEntitiesDetectionJobFluentBuilder
pub fn start_pii_entities_detection_job( &self ) -> StartPiiEntitiesDetectionJobFluentBuilder
Constructs a fluent builder for the StartPiiEntitiesDetectionJob operation.
- The fluent builder is configurable:
input_data_config(InputDataConfig)/set_input_data_config(Option<InputDataConfig>):
required: trueThe input properties for a PII entities detection job.
output_data_config(OutputDataConfig)/set_output_data_config(Option<OutputDataConfig>):
required: trueProvides configuration parameters for the output of PII entity detection jobs.
mode(PiiEntitiesDetectionMode)/set_mode(Option<PiiEntitiesDetectionMode>):
required: trueSpecifies whether the output provides the locations (offsets) of PII entities or a file in which PII entities are redacted.
redaction_config(RedactionConfig)/set_redaction_config(Option<RedactionConfig>):
required: falseProvides configuration parameters for PII entity redaction.
This parameter is required if you set the
Modeparameter toONLY_REDACTION. In that case, you must provide aRedactionConfigdefinition that includes thePiiEntityTypesparameter.data_access_role_arn(impl Into<String>)/set_data_access_role_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data.
job_name(impl Into<String>)/set_job_name(Option<String>):
required: falseThe identifier of the job.
language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: trueThe language of the input documents. Currently, English is the only valid language.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):
required: falseA unique identifier for the request. If you don’t set the client request token, Amazon Comprehend generates one.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseTags to associate with the PII entities detection job. A tag is a key-value pair that adds 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.
- On success, responds with
StartPiiEntitiesDetectionJobOutputwith field(s):job_id(Option<String>):The identifier generated for the job.
job_arn(Option<String>):The Amazon Resource Name (ARN) of the PII entity detection job. It is a unique, fully qualified identifier for the job. It includes the Amazon Web Services account, Amazon Web Services Region, and the job ID. The format of the ARN is as follows:
arn::comprehend: : :pii-entities-detection-job/ The following is an example job ARN:
arn:aws:comprehend:us-west-2:111122223333:pii-entities-detection-job/1234abcd12ab34cd56ef1234567890abjob_status(Option<JobStatus>):The status of the job.
- On failure, responds with
SdkError<StartPiiEntitiesDetectionJobError>
source§impl Client
impl Client
sourcepub fn start_sentiment_detection_job(
&self
) -> StartSentimentDetectionJobFluentBuilder
pub fn start_sentiment_detection_job( &self ) -> StartSentimentDetectionJobFluentBuilder
Constructs a fluent builder for the StartSentimentDetectionJob operation.
- The fluent builder is configurable:
input_data_config(InputDataConfig)/set_input_data_config(Option<InputDataConfig>):
required: trueSpecifies the format and location of the input data for the job.
output_data_config(OutputDataConfig)/set_output_data_config(Option<OutputDataConfig>):
required: trueSpecifies where to send the output files.
data_access_role_arn(impl Into<String>)/set_data_access_role_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data. For more information, see Role-based permissions.
job_name(impl Into<String>)/set_job_name(Option<String>):
required: falseThe identifier of the job.
language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: trueThe language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):
required: falseA unique identifier for the request. If you don’t set the client request token, Amazon Comprehend generates one.
volume_kms_key_id(impl Into<String>)/set_volume_kms_key_id(Option<String>):
required: falseID 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”
-
vpc_config(VpcConfig)/set_vpc_config(Option<VpcConfig>):
required: falseConfiguration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your sentiment detection job. For more information, see Amazon VPC.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseTags to associate with the sentiment detection job. A tag is a key-value pair that adds 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.
- On success, responds with
StartSentimentDetectionJobOutputwith field(s):job_id(Option<String>):The identifier generated for the job. To get the status of a job, use this identifier with the operation.
job_arn(Option<String>):The Amazon Resource Name (ARN) of the sentiment detection job. It is a unique, fully qualified identifier for the job. It includes the Amazon Web Services account, Amazon Web Services Region, and the job ID. The format of the ARN is as follows:
arn::comprehend: : :sentiment-detection-job/ The following is an example job ARN:
arn:aws:comprehend:us-west-2:111122223333:sentiment-detection-job/1234abcd12ab34cd56ef1234567890abjob_status(Option<JobStatus>):The status of the job.
-
SUBMITTED - The job has been received and is queued for processing.
-
IN_PROGRESS - Amazon Comprehend is processing the job.
-
COMPLETED - The job was successfully completed and the output is available.
-
FAILED - The job did not complete. To get details, use the operation.
-
- On failure, responds with
SdkError<StartSentimentDetectionJobError>
source§impl Client
impl Client
sourcepub fn start_targeted_sentiment_detection_job(
&self
) -> StartTargetedSentimentDetectionJobFluentBuilder
pub fn start_targeted_sentiment_detection_job( &self ) -> StartTargetedSentimentDetectionJobFluentBuilder
Constructs a fluent builder for the StartTargetedSentimentDetectionJob operation.
- The fluent builder is configurable:
input_data_config(InputDataConfig)/set_input_data_config(Option<InputDataConfig>):
required: trueThe input properties for an inference job. The document reader config field applies only to non-text inputs for custom analysis.
output_data_config(OutputDataConfig)/set_output_data_config(Option<OutputDataConfig>):
required: trueSpecifies where to send the output files.
data_access_role_arn(impl Into<String>)/set_data_access_role_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data. For more information, see Role-based permissions.
job_name(impl Into<String>)/set_job_name(Option<String>):
required: falseThe identifier of the job.
language_code(LanguageCode)/set_language_code(Option<LanguageCode>):
required: trueThe language of the input documents. Currently, English is the only supported language.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):
required: falseA unique identifier for the request. If you don’t set the client request token, Amazon Comprehend generates one.
volume_kms_key_id(impl Into<String>)/set_volume_kms_key_id(Option<String>):
required: falseID for the 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”
-
vpc_config(VpcConfig)/set_vpc_config(Option<VpcConfig>):
required: falseConfiguration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for the job. For more information, see Amazon VPC.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseTags to associate with the targeted sentiment detection job. A tag is a key-value pair that adds 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.
- On success, responds with
StartTargetedSentimentDetectionJobOutputwith field(s):job_id(Option<String>):The identifier generated for the job. To get the status of a job, use this identifier with the
DescribeTargetedSentimentDetectionJoboperation.job_arn(Option<String>):The Amazon Resource Name (ARN) of the targeted sentiment detection job. It is a unique, fully qualified identifier for the job. It includes the Amazon Web Services account, Amazon Web Services Region, and the job ID. The format of the ARN is as follows:
arn::comprehend: : :targeted-sentiment-detection-job/ The following is an example job ARN:
arn:aws:comprehend:us-west-2:111122223333:targeted-sentiment-detection-job/1234abcd12ab34cd56ef1234567890abjob_status(Option<JobStatus>):The status of the job.
-
SUBMITTED - The job has been received and is queued for processing.
-
IN_PROGRESS - Amazon Comprehend is processing the job.
-
COMPLETED - The job was successfully completed and the output is available.
-
FAILED - The job did not complete. To get details, use the
DescribeTargetedSentimentDetectionJoboperation.
-
- On failure, responds with
SdkError<StartTargetedSentimentDetectionJobError>
source§impl Client
impl Client
sourcepub fn start_topics_detection_job(&self) -> StartTopicsDetectionJobFluentBuilder
pub fn start_topics_detection_job(&self) -> StartTopicsDetectionJobFluentBuilder
Constructs a fluent builder for the StartTopicsDetectionJob operation.
- The fluent builder is configurable:
input_data_config(InputDataConfig)/set_input_data_config(Option<InputDataConfig>):
required: trueSpecifies the format and location of the input data for the job.
output_data_config(OutputDataConfig)/set_output_data_config(Option<OutputDataConfig>):
required: trueSpecifies where to send the output files. The output is a compressed archive with two files,
topic-terms.csvthat lists the terms associated with each topic, anddoc-topics.csvthat lists the documents associated with each topicdata_access_role_arn(impl Into<String>)/set_data_access_role_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data. For more information, see Role-based permissions.
job_name(impl Into<String>)/set_job_name(Option<String>):
required: falseThe identifier of the job.
number_of_topics(i32)/set_number_of_topics(Option<i32>):
required: falseThe number of topics to detect.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):
required: falseA unique identifier for the request. If you do not set the client request token, Amazon Comprehend generates one.
volume_kms_key_id(impl Into<String>)/set_volume_kms_key_id(Option<String>):
required: falseID 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”
-
vpc_config(VpcConfig)/set_vpc_config(Option<VpcConfig>):
required: falseConfiguration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your topic detection job. For more information, see Amazon VPC.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseTags to associate with the topics detection job. A tag is a key-value pair that adds 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.
- On success, responds with
StartTopicsDetectionJobOutputwith field(s):job_id(Option<String>):The identifier generated for the job. To get the status of the job, use this identifier with the
DescribeTopicDetectionJoboperation.job_arn(Option<String>):The Amazon Resource Name (ARN) of the topics detection job. It is a unique, fully qualified identifier for the job. It includes the Amazon Web Services account, Amazon Web Services Region, and the job ID. The format of the ARN is as follows:
arn::comprehend: : :topics-detection-job/ The following is an example job ARN:
arn:aws:comprehend:us-west-2:111122223333:document-classification-job/1234abcd12ab34cd56ef1234567890abjob_status(Option<JobStatus>):The status of the job:
-
SUBMITTED - The job has been received and is queued for processing.
-
IN_PROGRESS - Amazon Comprehend is processing the job.
-
COMPLETED - The job was successfully completed and the output is available.
-
FAILED - The job did not complete. To get details, use the
DescribeTopicDetectionJoboperation.
-
- On failure, responds with
SdkError<StartTopicsDetectionJobError>
source§impl Client
impl Client
sourcepub fn stop_dominant_language_detection_job(
&self
) -> StopDominantLanguageDetectionJobFluentBuilder
pub fn stop_dominant_language_detection_job( &self ) -> StopDominantLanguageDetectionJobFluentBuilder
Constructs a fluent builder for the StopDominantLanguageDetectionJob operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe identifier of the dominant language detection job to stop.
- On success, responds with
StopDominantLanguageDetectionJobOutputwith field(s):job_id(Option<String>):The identifier of the dominant language detection job to stop.
job_status(Option<JobStatus>):Either
STOP_REQUESTEDif the job is currently running, orSTOPPEDif the job was previously stopped with theStopDominantLanguageDetectionJoboperation.
- On failure, responds with
SdkError<StopDominantLanguageDetectionJobError>
source§impl Client
impl Client
sourcepub fn stop_entities_detection_job(
&self
) -> StopEntitiesDetectionJobFluentBuilder
pub fn stop_entities_detection_job( &self ) -> StopEntitiesDetectionJobFluentBuilder
Constructs a fluent builder for the StopEntitiesDetectionJob operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe identifier of the entities detection job to stop.
- On success, responds with
StopEntitiesDetectionJobOutputwith field(s):job_id(Option<String>):The identifier of the entities detection job to stop.
job_status(Option<JobStatus>):Either
STOP_REQUESTEDif the job is currently running, orSTOPPEDif the job was previously stopped with theStopEntitiesDetectionJoboperation.
- On failure, responds with
SdkError<StopEntitiesDetectionJobError>
source§impl Client
impl Client
sourcepub fn stop_events_detection_job(&self) -> StopEventsDetectionJobFluentBuilder
pub fn stop_events_detection_job(&self) -> StopEventsDetectionJobFluentBuilder
Constructs a fluent builder for the StopEventsDetectionJob operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe identifier of the events detection job to stop.
- On success, responds with
StopEventsDetectionJobOutputwith field(s):job_id(Option<String>):The identifier of the events detection job to stop.
job_status(Option<JobStatus>):The status of the events detection job.
- On failure, responds with
SdkError<StopEventsDetectionJobError>
source§impl Client
impl Client
sourcepub fn stop_key_phrases_detection_job(
&self
) -> StopKeyPhrasesDetectionJobFluentBuilder
pub fn stop_key_phrases_detection_job( &self ) -> StopKeyPhrasesDetectionJobFluentBuilder
Constructs a fluent builder for the StopKeyPhrasesDetectionJob operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe identifier of the key phrases detection job to stop.
- On success, responds with
StopKeyPhrasesDetectionJobOutputwith field(s):job_id(Option<String>):The identifier of the key phrases detection job to stop.
job_status(Option<JobStatus>):Either
STOP_REQUESTEDif the job is currently running, orSTOPPEDif the job was previously stopped with theStopKeyPhrasesDetectionJoboperation.
- On failure, responds with
SdkError<StopKeyPhrasesDetectionJobError>
source§impl Client
impl Client
sourcepub fn stop_pii_entities_detection_job(
&self
) -> StopPiiEntitiesDetectionJobFluentBuilder
pub fn stop_pii_entities_detection_job( &self ) -> StopPiiEntitiesDetectionJobFluentBuilder
Constructs a fluent builder for the StopPiiEntitiesDetectionJob operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe identifier of the PII entities detection job to stop.
- On success, responds with
StopPiiEntitiesDetectionJobOutputwith field(s):job_id(Option<String>):The identifier of the PII entities detection job to stop.
job_status(Option<JobStatus>):The status of the PII entities detection job.
- On failure, responds with
SdkError<StopPiiEntitiesDetectionJobError>
source§impl Client
impl Client
sourcepub fn stop_sentiment_detection_job(
&self
) -> StopSentimentDetectionJobFluentBuilder
pub fn stop_sentiment_detection_job( &self ) -> StopSentimentDetectionJobFluentBuilder
Constructs a fluent builder for the StopSentimentDetectionJob operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe identifier of the sentiment detection job to stop.
- On success, responds with
StopSentimentDetectionJobOutputwith field(s):job_id(Option<String>):The identifier of the sentiment detection job to stop.
job_status(Option<JobStatus>):Either
STOP_REQUESTEDif the job is currently running, orSTOPPEDif the job was previously stopped with theStopSentimentDetectionJoboperation.
- On failure, responds with
SdkError<StopSentimentDetectionJobError>
source§impl Client
impl Client
sourcepub fn stop_targeted_sentiment_detection_job(
&self
) -> StopTargetedSentimentDetectionJobFluentBuilder
pub fn stop_targeted_sentiment_detection_job( &self ) -> StopTargetedSentimentDetectionJobFluentBuilder
Constructs a fluent builder for the StopTargetedSentimentDetectionJob operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):
required: trueThe identifier of the targeted sentiment detection job to stop.
- On success, responds with
StopTargetedSentimentDetectionJobOutputwith field(s):job_id(Option<String>):The identifier of the targeted sentiment detection job to stop.
job_status(Option<JobStatus>):Either
STOP_REQUESTEDif the job is currently running, orSTOPPEDif the job was previously stopped with theStopSentimentDetectionJoboperation.
- On failure, responds with
SdkError<StopTargetedSentimentDetectionJobError>
source§impl Client
impl Client
sourcepub fn stop_training_document_classifier(
&self
) -> StopTrainingDocumentClassifierFluentBuilder
pub fn stop_training_document_classifier( &self ) -> StopTrainingDocumentClassifierFluentBuilder
Constructs a fluent builder for the StopTrainingDocumentClassifier operation.
- The fluent builder is configurable:
document_classifier_arn(impl Into<String>)/set_document_classifier_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) that identifies the document classifier currently being trained.
- On success, responds with
StopTrainingDocumentClassifierOutput - On failure, responds with
SdkError<StopTrainingDocumentClassifierError>
source§impl Client
impl Client
sourcepub fn stop_training_entity_recognizer(
&self
) -> StopTrainingEntityRecognizerFluentBuilder
pub fn stop_training_entity_recognizer( &self ) -> StopTrainingEntityRecognizerFluentBuilder
Constructs a fluent builder for the StopTrainingEntityRecognizer operation.
- The fluent builder is configurable:
entity_recognizer_arn(impl Into<String>)/set_entity_recognizer_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) that identifies the entity recognizer currently being trained.
- On success, responds with
StopTrainingEntityRecognizerOutput - On failure, responds with
SdkError<StopTrainingEntityRecognizerError>
source§impl Client
impl Client
sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the given Amazon Comprehend resource to which you want to associate the tags.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: trueTags being associated with a specific Amazon Comprehend resource. There can be a maximum of 50 tags (both existing and pending) associated with a specific resource.
- On success, responds with
TagResourceOutput - On failure, responds with
SdkError<TagResourceError>
source§impl Client
impl Client
sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the given Amazon Comprehend resource from which you want to remove the tags.
tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: trueThe initial part of a key-value pair that forms a tag being removed from a given resource. For example, a tag with “Sales” as the key might be added to a resource to indicate its use by the sales department. Keys must be unique and cannot be duplicated for a particular resource.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
source§impl Client
impl Client
sourcepub fn update_endpoint(&self) -> UpdateEndpointFluentBuilder
pub fn update_endpoint(&self) -> UpdateEndpointFluentBuilder
Constructs a fluent builder for the UpdateEndpoint operation.
- The fluent builder is configurable:
endpoint_arn(impl Into<String>)/set_endpoint_arn(Option<String>):
required: trueThe Amazon Resource Number (ARN) of the endpoint being updated.
desired_model_arn(impl Into<String>)/set_desired_model_arn(Option<String>):
required: falseThe ARN of the new model to use when updating an existing endpoint.
desired_inference_units(i32)/set_desired_inference_units(Option<i32>):
required: falseThe desired number of inference units to be used by the model using this endpoint. Each inference unit represents of a throughput of 100 characters per second.
desired_data_access_role_arn(impl Into<String>)/set_desired_data_access_role_arn(Option<String>):
required: falseData access role ARN to use in case the new model is encrypted with a customer CMK.
flywheel_arn(impl Into<String>)/set_flywheel_arn(Option<String>):
required: falseThe Amazon Resource Number (ARN) of the flywheel
- On success, responds with
UpdateEndpointOutputwith field(s):desired_model_arn(Option<String>):The Amazon Resource Number (ARN) of the new model.
- On failure, responds with
SdkError<UpdateEndpointError>
source§impl Client
impl Client
sourcepub fn update_flywheel(&self) -> UpdateFlywheelFluentBuilder
pub fn update_flywheel(&self) -> UpdateFlywheelFluentBuilder
Constructs a fluent builder for the UpdateFlywheel operation.
- The fluent builder is configurable:
flywheel_arn(impl Into<String>)/set_flywheel_arn(Option<String>):
required: trueThe Amazon Resource Number (ARN) of the flywheel to update.
active_model_arn(impl Into<String>)/set_active_model_arn(Option<String>):
required: falseThe Amazon Resource Number (ARN) of the active model version.
data_access_role_arn(impl Into<String>)/set_data_access_role_arn(Option<String>):
required: falseThe Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data.
data_security_config(UpdateDataSecurityConfig)/set_data_security_config(Option<UpdateDataSecurityConfig>):
required: falseFlywheel data security configuration.
- On success, responds with
UpdateFlywheelOutputwith field(s):flywheel_properties(Option<FlywheelProperties>):The flywheel properties.
- On failure, responds with
SdkError<UpdateFlywheelError>
source§impl Client
impl Client
sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config.
Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis provided.
The panic message for each of these will have instructions on how to resolve them.
source§impl Client
impl Client
sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
Panics
- This method will panic if the
sdk_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo feature.