pub struct Client<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* 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.

Examples

Constructing a client and invoking an operation

    // create a shared configuration. This can be used & shared between multiple service clients.
    let shared_config = aws_config::load_from_env().await;
    let client = aws_sdk_comprehend::Client::new(&shared_config);
    // invoke an operation
    /* let rsp = client
        .<operation_name>().
        .<param>("some value")
        .send().await; */

Constructing a client with custom configuration

use aws_config::RetryConfig;
    let shared_config = aws_config::load_from_env().await;
    let config = aws_sdk_comprehend::config::Builder::from(&shared_config)
        .retry_config(RetryConfig::disabled())
        .build();
    let client = aws_sdk_comprehend::Client::from_conf(config);

Implementations

Creates a client with the given service configuration.

Returns the client’s configuration.

Constructs a fluent builder for the BatchDetectDominantLanguage operation.

Constructs a fluent builder for the BatchDetectEntities operation.

Constructs a fluent builder for the BatchDetectKeyPhrases operation.

Constructs a fluent builder for the BatchDetectSentiment operation.

Constructs a fluent builder for the BatchDetectSyntax operation.

Constructs a fluent builder for the ClassifyDocument operation.

Constructs a fluent builder for the ContainsPiiEntities operation.

Constructs a fluent builder for the CreateDocumentClassifier operation.

Constructs a fluent builder for the CreateEndpoint operation.

Constructs a fluent builder for the CreateEntityRecognizer operation.

Constructs a fluent builder for the DeleteDocumentClassifier operation.

Constructs a fluent builder for the DeleteEndpoint operation.

Constructs a fluent builder for the DeleteEntityRecognizer operation.

Constructs a fluent builder for the DescribeDocumentClassificationJob operation.

Constructs a fluent builder for the DescribeDocumentClassifier operation.

Constructs a fluent builder for the DescribeDominantLanguageDetectionJob operation.

Constructs a fluent builder for the DescribeEndpoint operation.

Constructs a fluent builder for the DescribeEntitiesDetectionJob operation.

Constructs a fluent builder for the DescribeEntityRecognizer operation.

Constructs a fluent builder for the DescribeEventsDetectionJob operation.

Constructs a fluent builder for the DescribeKeyPhrasesDetectionJob operation.

Constructs a fluent builder for the DescribePiiEntitiesDetectionJob operation.

Constructs a fluent builder for the DescribeSentimentDetectionJob operation.

Constructs a fluent builder for the DescribeTopicsDetectionJob operation.

Constructs a fluent builder for the DetectDominantLanguage operation.

Constructs a fluent builder for the DetectEntities operation.

  • The fluent builder is configurable:
    • text(impl Into<String>) / set_text(Option<String>):

      A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded characters.

    • language_code(LanguageCode) / set_language_code(Option<LanguageCode>):

      The 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.

      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.

    • endpoint_arn(impl Into<String>) / set_endpoint_arn(Option<String>):

      The 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.

  • On success, responds with DetectEntitiesOutput with 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 how-entities.

  • On failure, responds with SdkError<DetectEntitiesError>

Constructs a fluent builder for the DetectKeyPhrases operation.

Constructs a fluent builder for the DetectPiiEntities operation.

Constructs a fluent builder for the DetectSentiment operation.

Constructs a fluent builder for the DetectSyntax operation.

Constructs a fluent builder for the ListDocumentClassificationJobs operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListDocumentClassifiers operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListDocumentClassifierSummaries operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListDominantLanguageDetectionJobs operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListEndpoints operation.

Constructs a fluent builder for the ListEntitiesDetectionJobs operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListEntityRecognizers operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListEntityRecognizerSummaries operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListEventsDetectionJobs operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListKeyPhrasesDetectionJobs operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListPiiEntitiesDetectionJobs operation.

Constructs a fluent builder for the ListSentimentDetectionJobs operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the ListTagsForResource operation.

Constructs a fluent builder for the ListTopicsDetectionJobs operation. This operation supports pagination; See into_paginator().

Constructs a fluent builder for the StartDocumentClassificationJob operation.

Constructs a fluent builder for the StartDominantLanguageDetectionJob operation.

Constructs a fluent builder for the StartEntitiesDetectionJob operation.

Constructs a fluent builder for the StartEventsDetectionJob operation.

Constructs a fluent builder for the StartKeyPhrasesDetectionJob operation.

Constructs a fluent builder for the StartPiiEntitiesDetectionJob operation.

Constructs a fluent builder for the StartSentimentDetectionJob operation.

Constructs a fluent builder for the StartTopicsDetectionJob operation.

Constructs a fluent builder for the StopDominantLanguageDetectionJob operation.

Constructs a fluent builder for the StopEntitiesDetectionJob operation.

Constructs a fluent builder for the StopEventsDetectionJob operation.

Constructs a fluent builder for the StopKeyPhrasesDetectionJob operation.

Constructs a fluent builder for the StopPiiEntitiesDetectionJob operation.

Constructs a fluent builder for the StopSentimentDetectionJob operation.

Constructs a fluent builder for the StopTrainingDocumentClassifier operation.

Constructs a fluent builder for the StopTrainingEntityRecognizer operation.

Constructs a fluent builder for the TagResource operation.

Constructs a fluent builder for the UntagResource operation.

Constructs a fluent builder for the UpdateEndpoint operation.

Creates a client with the given service config and connector override.

Creates a new client from a shared config.

Creates a new client from the service Config.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more