The code examples in this section show how to use the AWS SDK for .NET with Amazon Comprehend to manage custom metrics and alarms.
Amazon Comprehend is a monitoring and observability service built for DevOps engineers, developers, site reliability engineers (SREs), IT managers, and product owners.
- Running this code might result in charges to your AWS account.
- Running the tests might result in charges to your AWS account.
- We recommend that you grant your code least privilege. At most, grant only the minimum permissions required to perform the task. For more information, see Grant least privilege.
- This code is not tested in every AWS Region. For more information, see AWS Regional Services.
Code excerpts that show you how to call individual service functions.
- Detect entities in a document (
DetectEntitiesAsync
) - Detect key phrases in a document (
DetectKeyPhrasesAsync
) - Detect personally identifiable information in a document (
DetectPiiEntitiesAsync
) - Detect syntactical elements of a document (
DetectSyntaxAsync
) - Detect the dominant language in a document (
DetectDominantLanguageAsync
) - Detect the sentiment of a document (
DetectSentimentAsync
) - Start a topic modeling job (
StartTopicsDetectionJobAsync
)
- To find prerequisites for running these examples, see the README in the dotnetv3 folder.
The examples in this folder use the default user account. The call to initialize the client object does not specify the AWS Region. The following example shows how to supply the AWS Region to match your own as a parameter to the client constructor:
var client = new AmazonComprehendClient(Amazon.RegionEndpoint.USWest2);
After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command:
dotnet run
Alternatively, you can run the example from within your IDE.
- Amazon Comprehend Developer Guide
- Amazon Comprehend API Reference
- AWS SDK for .NET Amazon Comprehend
- AWS SDK for .NET Developer Guide
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0