Skip to content

AWS.Comprehend reference

Source: src/AWS/Comprehend/BatchDetectDominantLanguage.ts

Runtime binding for comprehend:BatchDetectDominantLanguage — determine the dominant language for a batch of up to 25 documents in a single call.

The response carries a ResultList (index-aligned with TextList) and an ErrorList for documents that could not be processed. Like all Comprehend real-time APIs the action has no resource-level IAM, so the binding takes no arguments and grants the action on *.

BatchDetectDominantLanguage: Batch Real-Time Analysis

Section titled “BatchDetectDominantLanguage: Batch Real-Time Analysis”
// init
const batchDetectDominantLanguage = yield* AWS.Comprehend.BatchDetectDominantLanguage();
// runtime
const result = yield* batchDetectDominantLanguage({
TextList: ["I love this product!", "The delivery was late."],
});
// result.ResultList[0].Languages[0].LanguageCode === "en"

Source: src/AWS/Comprehend/BatchDetectEntities.ts

Runtime binding for comprehend:BatchDetectEntities — detect named entities for a batch of up to 25 documents in a single call.

The response carries a ResultList (index-aligned with TextList) and an ErrorList for documents that could not be processed. Like all Comprehend real-time APIs the action has no resource-level IAM, so the binding takes no arguments and grants the action on *.

BatchDetectEntities: Batch Real-Time Analysis

Section titled “BatchDetectEntities: Batch Real-Time Analysis”
// init
const batchDetectEntities = yield* AWS.Comprehend.BatchDetectEntities();
// runtime
const result = yield* batchDetectEntities({
TextList: ["I love this product!", "The delivery was late."],
LanguageCode: "en",
});
// result.ResultList[0].Entities

Source: src/AWS/Comprehend/BatchDetectKeyPhrases.ts

Runtime binding for comprehend:BatchDetectKeyPhrases — extract key phrases for a batch of up to 25 documents in a single call.

The response carries a ResultList (index-aligned with TextList) and an ErrorList for documents that could not be processed. Like all Comprehend real-time APIs the action has no resource-level IAM, so the binding takes no arguments and grants the action on *.

BatchDetectKeyPhrases: Batch Real-Time Analysis

Section titled “BatchDetectKeyPhrases: Batch Real-Time Analysis”
// init
const batchDetectKeyPhrases = yield* AWS.Comprehend.BatchDetectKeyPhrases();
// runtime
const result = yield* batchDetectKeyPhrases({
TextList: ["I love this product!", "The delivery was late."],
LanguageCode: "en",
});
// result.ResultList[0].KeyPhrases

Source: src/AWS/Comprehend/BatchDetectSentiment.ts

Runtime binding for comprehend:BatchDetectSentiment — infer the prevailing sentiment for a batch of up to 25 documents in a single call.

The response carries a ResultList (index-aligned with TextList) and an ErrorList for documents that could not be processed. Like all Comprehend real-time APIs the action has no resource-level IAM, so the binding takes no arguments and grants the action on *.

BatchDetectSentiment: Batch Real-Time Analysis

Section titled “BatchDetectSentiment: Batch Real-Time Analysis”
// init
const batchDetectSentiment = yield* AWS.Comprehend.BatchDetectSentiment();
// runtime
const result = yield* batchDetectSentiment({
TextList: ["I love this product!", "The delivery was late."],
LanguageCode: "en",
});
// result.ResultList[0].Sentiment === "POSITIVE"

Source: src/AWS/Comprehend/BatchDetectSyntax.ts

Runtime binding for comprehend:BatchDetectSyntax — tokenize and label parts of speech for a batch of up to 25 documents in a single call.

The response carries a ResultList (index-aligned with TextList) and an ErrorList for documents that could not be processed. Like all Comprehend real-time APIs the action has no resource-level IAM, so the binding takes no arguments and grants the action on *.

BatchDetectSyntax: Batch Real-Time Analysis

Section titled “BatchDetectSyntax: Batch Real-Time Analysis”
// init
const batchDetectSyntax = yield* AWS.Comprehend.BatchDetectSyntax();
// runtime
const result = yield* batchDetectSyntax({
TextList: ["I love this product!", "The delivery was late."],
LanguageCode: "en",
});
// result.ResultList[0].SyntaxTokens

Source: src/AWS/Comprehend/BatchDetectTargetedSentiment.ts

Runtime binding for comprehend:BatchDetectTargetedSentiment — analyze entity-level (targeted) sentiment for a batch of up to 25 documents in a single call.

The response carries a ResultList (index-aligned with TextList) and an ErrorList for documents that could not be processed. Like all Comprehend real-time APIs the action has no resource-level IAM, so the binding takes no arguments and grants the action on *.

BatchDetectTargetedSentiment: Batch Real-Time Analysis

Section titled “BatchDetectTargetedSentiment: Batch Real-Time Analysis”
// init
const batchDetectTargetedSentiment = yield* AWS.Comprehend.BatchDetectTargetedSentiment();
// runtime
const result = yield* batchDetectTargetedSentiment({
TextList: ["I love this product!", "The delivery was late."],
LanguageCode: "en",
});
// result.ResultList[0].Entities[…].Mentions

Source: src/AWS/Comprehend/ClassifyDocument.ts

Runtime binding for comprehend:ClassifyDocument — classify a single document in real time against a custom classifier endpoint or a Comprehend prebuilt model ARN (EndpointArn).

The binding takes no arguments and grants the action on * — endpoints are addressed per-request via EndpointArn, so the grant cannot be scoped tighter at deploy time.

// init
const classifyDocument = yield* AWS.Comprehend.ClassifyDocument();
// runtime
const result = yield* classifyDocument({
Text: "Subject: your invoice for March is attached",
EndpointArn: endpointArn,
});
// result.Classes: [{ Name: "INVOICE", Score: 0.98 }, …]

Source: src/AWS/Comprehend/ContainsPiiEntities.ts

Runtime binding for comprehend:ContainsPiiEntities — check whether the input text contains personally identifiable information, returning the PII entity-type labels present (without offsets; use DetectPiiEntities to locate them).

The binding takes no arguments and grants the action on * (the action has no resource-level IAM).

// init
const containsPiiEntities = yield* AWS.Comprehend.ContainsPiiEntities();
// runtime
const result = yield* containsPiiEntities({
Text: "My name is Jane Doe and my email is jane@example.com.",
LanguageCode: "en",
});
// result.Labels: [{ Name: "NAME" }, { Name: "EMAIL" }]

Source: src/AWS/Comprehend/DescribeDocumentClassificationJob.ts

Runtime binding for comprehend:DescribeDocumentClassificationJob — get the properties (status, input/output config, timings) of an asynchronous document classification job started with StartDocumentClassificationJob.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

DescribeDocumentClassificationJob: Monitoring Analysis Jobs

Section titled “DescribeDocumentClassificationJob: Monitoring Analysis Jobs”
// init
const describeDocumentClassificationJob = yield* AWS.Comprehend.DescribeDocumentClassificationJob();
// runtime
const job = yield* describeDocumentClassificationJob({ JobId: jobId });
// job.DocumentClassificationJobProperties?.JobStatus: "SUBMITTED" | "IN_PROGRESS" | "COMPLETED" | …

Source: src/AWS/Comprehend/DescribeDominantLanguageDetectionJob.ts

Runtime binding for comprehend:DescribeDominantLanguageDetectionJob — get the properties (status, input/output config, timings) of an asynchronous dominant-language detection job started with StartDominantLanguageDetectionJob.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

DescribeDominantLanguageDetectionJob: Monitoring Analysis Jobs

Section titled “DescribeDominantLanguageDetectionJob: Monitoring Analysis Jobs”
// init
const describeDominantLanguageDetectionJob = yield* AWS.Comprehend.DescribeDominantLanguageDetectionJob();
// runtime
const job = yield* describeDominantLanguageDetectionJob({ JobId: jobId });
// job.DominantLanguageDetectionJobProperties?.JobStatus: "SUBMITTED" | "IN_PROGRESS" | "COMPLETED" | …

Source: src/AWS/Comprehend/DescribeEntitiesDetectionJob.ts

Runtime binding for comprehend:DescribeEntitiesDetectionJob — get the properties (status, input/output config, timings) of an asynchronous entity detection job started with StartEntitiesDetectionJob.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

DescribeEntitiesDetectionJob: Monitoring Analysis Jobs

Section titled “DescribeEntitiesDetectionJob: Monitoring Analysis Jobs”
// init
const describeEntitiesDetectionJob = yield* AWS.Comprehend.DescribeEntitiesDetectionJob();
// runtime
const job = yield* describeEntitiesDetectionJob({ JobId: jobId });
// job.EntitiesDetectionJobProperties?.JobStatus: "SUBMITTED" | "IN_PROGRESS" | "COMPLETED" | …

Source: src/AWS/Comprehend/DescribeEventsDetectionJob.ts

Runtime binding for comprehend:DescribeEventsDetectionJob — get the properties (status, input/output config, timings) of an asynchronous event detection job started with StartEventsDetectionJob.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

DescribeEventsDetectionJob: Monitoring Analysis Jobs

Section titled “DescribeEventsDetectionJob: Monitoring Analysis Jobs”
// init
const describeEventsDetectionJob = yield* AWS.Comprehend.DescribeEventsDetectionJob();
// runtime
const job = yield* describeEventsDetectionJob({ JobId: jobId });
// job.EventsDetectionJobProperties?.JobStatus: "SUBMITTED" | "IN_PROGRESS" | "COMPLETED" | …

Source: src/AWS/Comprehend/DescribeKeyPhrasesDetectionJob.ts

Runtime binding for comprehend:DescribeKeyPhrasesDetectionJob — get the properties (status, input/output config, timings) of an asynchronous key-phrase detection job started with StartKeyPhrasesDetectionJob.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

DescribeKeyPhrasesDetectionJob: Monitoring Analysis Jobs

Section titled “DescribeKeyPhrasesDetectionJob: Monitoring Analysis Jobs”
// init
const describeKeyPhrasesDetectionJob = yield* AWS.Comprehend.DescribeKeyPhrasesDetectionJob();
// runtime
const job = yield* describeKeyPhrasesDetectionJob({ JobId: jobId });
// job.KeyPhrasesDetectionJobProperties?.JobStatus: "SUBMITTED" | "IN_PROGRESS" | "COMPLETED" | …

Source: src/AWS/Comprehend/DescribePiiEntitiesDetectionJob.ts

Runtime binding for comprehend:DescribePiiEntitiesDetectionJob — get the properties (status, input/output config, timings) of an asynchronous PII entity detection job started with StartPiiEntitiesDetectionJob.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

DescribePiiEntitiesDetectionJob: Monitoring Analysis Jobs

Section titled “DescribePiiEntitiesDetectionJob: Monitoring Analysis Jobs”
// init
const describePiiEntitiesDetectionJob = yield* AWS.Comprehend.DescribePiiEntitiesDetectionJob();
// runtime
const job = yield* describePiiEntitiesDetectionJob({ JobId: jobId });
// job.PiiEntitiesDetectionJobProperties?.JobStatus: "SUBMITTED" | "IN_PROGRESS" | "COMPLETED" | …

Source: src/AWS/Comprehend/DescribeSentimentDetectionJob.ts

Runtime binding for comprehend:DescribeSentimentDetectionJob — get the properties (status, input/output config, timings) of an asynchronous sentiment detection job started with StartSentimentDetectionJob.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

DescribeSentimentDetectionJob: Monitoring Analysis Jobs

Section titled “DescribeSentimentDetectionJob: Monitoring Analysis Jobs”
// init
const describeSentimentDetectionJob = yield* AWS.Comprehend.DescribeSentimentDetectionJob();
// runtime
const job = yield* describeSentimentDetectionJob({ JobId: jobId });
// job.SentimentDetectionJobProperties?.JobStatus: "SUBMITTED" | "IN_PROGRESS" | "COMPLETED" | …

Source: src/AWS/Comprehend/DescribeTargetedSentimentDetectionJob.ts

Runtime binding for comprehend:DescribeTargetedSentimentDetectionJob — get the properties (status, input/output config, timings) of an asynchronous targeted-sentiment detection job started with StartTargetedSentimentDetectionJob.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

DescribeTargetedSentimentDetectionJob: Monitoring Analysis Jobs

Section titled “DescribeTargetedSentimentDetectionJob: Monitoring Analysis Jobs”
// init
const describeTargetedSentimentDetectionJob = yield* AWS.Comprehend.DescribeTargetedSentimentDetectionJob();
// runtime
const job = yield* describeTargetedSentimentDetectionJob({ JobId: jobId });
// job.TargetedSentimentDetectionJobProperties?.JobStatus: "SUBMITTED" | "IN_PROGRESS" | "COMPLETED" | …

Source: src/AWS/Comprehend/DescribeTopicsDetectionJob.ts

Runtime binding for comprehend:DescribeTopicsDetectionJob — get the properties (status, input/output config, timings) of an asynchronous topic modeling job started with StartTopicsDetectionJob.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

DescribeTopicsDetectionJob: Monitoring Analysis Jobs

Section titled “DescribeTopicsDetectionJob: Monitoring Analysis Jobs”
// init
const describeTopicsDetectionJob = yield* AWS.Comprehend.DescribeTopicsDetectionJob();
// runtime
const job = yield* describeTopicsDetectionJob({ JobId: jobId });
// job.TopicsDetectionJobProperties?.JobStatus: "SUBMITTED" | "IN_PROGRESS" | "COMPLETED" | …

Source: src/AWS/Comprehend/DetectDominantLanguage.ts

Runtime binding for comprehend:DetectDominantLanguage — determine the dominant language of the input text (returns RFC 5646 language codes with confidence scores).

Comprehend’s synchronous detect APIs are pure pay-per-call with no resource to manage: the binding takes no arguments and grants the action on * (it has no resource-level IAM).

DetectDominantLanguage: Real-Time Analysis

Section titled “DetectDominantLanguage: Real-Time Analysis”
// init
const detectDominantLanguage = yield* AWS.Comprehend.DetectDominantLanguage();
// runtime
const result = yield* detectDominantLanguage({
Text: "Bob ordered two sandwiches yesterday.",
});
// result.Languages[0].LanguageCode === "en"

Source: src/AWS/Comprehend/DetectEntities.ts

Runtime binding for comprehend:DetectEntities — detect named entities (people, places, organizations, dates, quantities, …) in the input text using the pre-trained model, or custom entities via a custom entity recognizer endpoint (EndpointArn).

The binding takes no arguments and grants the action on * (the action has no resource-level IAM for the pre-trained model).

// init
const detectEntities = yield* AWS.Comprehend.DetectEntities();
// runtime
const result = yield* detectEntities({
Text: "Bob moved to Seattle in 2017.",
LanguageCode: "en",
});
// result.Entities: [{ Type: "PERSON", Text: "Bob" }, { Type: "LOCATION", Text: "Seattle" }, …]

Source: src/AWS/Comprehend/DetectKeyPhrases.ts

Runtime binding for comprehend:DetectKeyPhrases — extract the key noun phrases of the input text with confidence scores and offsets.

The binding takes no arguments and grants the action on * (the action has no resource-level IAM).

// init
const detectKeyPhrases = yield* AWS.Comprehend.DetectKeyPhrases();
// runtime
const result = yield* detectKeyPhrases({
Text: "The quarterly earnings report exceeded analyst expectations.",
LanguageCode: "en",
});
// result.KeyPhrases: [{ Text: "The quarterly earnings report" }, …]

Source: src/AWS/Comprehend/DetectPiiEntities.ts

Runtime binding for comprehend:DetectPiiEntities — locate personally identifiable information (names, addresses, bank account numbers, …) in the input text, with entity type, score, and character offsets.

The binding takes no arguments and grants the action on * (the action has no resource-level IAM). To only test whether a document contains PII, use the cheaper ContainsPiiEntities.

// init
const detectPiiEntities = yield* AWS.Comprehend.DetectPiiEntities();
// runtime
const result = yield* detectPiiEntities({
Text: "My name is Jane Doe and my email is jane@example.com.",
LanguageCode: "en",
});
// result.Entities: [{ Type: "NAME", BeginOffset: 11, … }, { Type: "EMAIL", … }]

Source: src/AWS/Comprehend/DetectSentiment.ts

Runtime binding for comprehend:DetectSentiment — infer the prevailing sentiment of a piece of text (POSITIVE, NEGATIVE, NEUTRAL, or MIXED).

Comprehend’s synchronous detect APIs are pure pay-per-call with no resource to manage: the binding takes no arguments and grants the function comprehend:DetectSentiment (the action has no resource-level IAM).

// init
const detectSentiment = yield* AWS.Comprehend.DetectSentiment();
// runtime
const result = yield* detectSentiment({
Text: "I love this product, it works wonderfully!",
LanguageCode: "en",
});
// result.Sentiment === "POSITIVE"
// result.SentimentScore.Positive ~ 0.99

Source: src/AWS/Comprehend/DetectSyntax.ts

Runtime binding for comprehend:DetectSyntax — tokenize the input text and label each token with its part of speech (noun, verb, adjective, …).

The binding takes no arguments and grants the action on * (the action has no resource-level IAM).

// init
const detectSyntax = yield* AWS.Comprehend.DetectSyntax();
// runtime
const result = yield* detectSyntax({
Text: "The cat sat on the mat.",
LanguageCode: "en",
});
// result.SyntaxTokens: [{ Text: "cat", PartOfSpeech: { Tag: "NOUN" } }, …]

Source: src/AWS/Comprehend/DetectTargetedSentiment.ts

Runtime binding for comprehend:DetectTargetedSentiment — analyze the sentiment expressed toward each entity mentioned in the input text (entity-level sentiment rather than whole-document sentiment).

The binding takes no arguments and grants the action on * (the action has no resource-level IAM).

DetectTargetedSentiment: Real-Time Analysis

Section titled “DetectTargetedSentiment: Real-Time Analysis”
// init
const detectTargetedSentiment = yield* AWS.Comprehend.DetectTargetedSentiment();
// runtime
const result = yield* detectTargetedSentiment({
Text: "The screen is gorgeous but the battery life is disappointing.",
LanguageCode: "en",
});
// result.Entities[…].Mentions[…].MentionSentiment.Sentiment

Source: src/AWS/Comprehend/DetectToxicContent.ts

Runtime binding for comprehend:DetectToxicContent — run toxicity analysis over a list of text segments; the response carries one result per segment with per-label scores (profanity, hate speech, harassment, …).

The binding takes no arguments and grants the action on * (the action has no resource-level IAM).

// init
const detectToxicContent = yield* AWS.Comprehend.DetectToxicContent();
// runtime
const result = yield* detectToxicContent({
TextSegments: [{ Text: "You are a wonderful person." }],
LanguageCode: "en",
});
// result.ResultList[0].Toxicity ~ 0.01

Source: src/AWS/Comprehend/ListDocumentClassificationJobs.ts

Runtime binding for comprehend:ListDocumentClassificationJobs — list the account’s asynchronous document classification jobs, with optional status/name/time filters.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

ListDocumentClassificationJobs: Monitoring Analysis Jobs

Section titled “ListDocumentClassificationJobs: Monitoring Analysis Jobs”
// init
const listDocumentClassificationJobs = yield* AWS.Comprehend.ListDocumentClassificationJobs();
// runtime
const page = yield* listDocumentClassificationJobs({
Filter: { JobStatus: "IN_PROGRESS" },
MaxResults: 25,
});
// page.DocumentClassificationJobPropertiesList

Source: src/AWS/Comprehend/ListDominantLanguageDetectionJobs.ts

Runtime binding for comprehend:ListDominantLanguageDetectionJobs — list the account’s asynchronous dominant-language detection jobs, with optional status/name/time filters.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

ListDominantLanguageDetectionJobs: Monitoring Analysis Jobs

Section titled “ListDominantLanguageDetectionJobs: Monitoring Analysis Jobs”
// init
const listDominantLanguageDetectionJobs = yield* AWS.Comprehend.ListDominantLanguageDetectionJobs();
// runtime
const page = yield* listDominantLanguageDetectionJobs({
Filter: { JobStatus: "IN_PROGRESS" },
MaxResults: 25,
});
// page.DominantLanguageDetectionJobPropertiesList

Source: src/AWS/Comprehend/ListEntitiesDetectionJobs.ts

Runtime binding for comprehend:ListEntitiesDetectionJobs — list the account’s asynchronous entity detection jobs, with optional status/name/time filters.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

ListEntitiesDetectionJobs: Monitoring Analysis Jobs

Section titled “ListEntitiesDetectionJobs: Monitoring Analysis Jobs”
// init
const listEntitiesDetectionJobs = yield* AWS.Comprehend.ListEntitiesDetectionJobs();
// runtime
const page = yield* listEntitiesDetectionJobs({
Filter: { JobStatus: "IN_PROGRESS" },
MaxResults: 25,
});
// page.EntitiesDetectionJobPropertiesList

Source: src/AWS/Comprehend/ListEventsDetectionJobs.ts

Runtime binding for comprehend:ListEventsDetectionJobs — list the account’s asynchronous event detection jobs, with optional status/name/time filters.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

ListEventsDetectionJobs: Monitoring Analysis Jobs

Section titled “ListEventsDetectionJobs: Monitoring Analysis Jobs”
// init
const listEventsDetectionJobs = yield* AWS.Comprehend.ListEventsDetectionJobs();
// runtime
const page = yield* listEventsDetectionJobs({
Filter: { JobStatus: "IN_PROGRESS" },
MaxResults: 25,
});
// page.EventsDetectionJobPropertiesList

Source: src/AWS/Comprehend/ListKeyPhrasesDetectionJobs.ts

Runtime binding for comprehend:ListKeyPhrasesDetectionJobs — list the account’s asynchronous key-phrase detection jobs, with optional status/name/time filters.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

ListKeyPhrasesDetectionJobs: Monitoring Analysis Jobs

Section titled “ListKeyPhrasesDetectionJobs: Monitoring Analysis Jobs”
// init
const listKeyPhrasesDetectionJobs = yield* AWS.Comprehend.ListKeyPhrasesDetectionJobs();
// runtime
const page = yield* listKeyPhrasesDetectionJobs({
Filter: { JobStatus: "IN_PROGRESS" },
MaxResults: 25,
});
// page.KeyPhrasesDetectionJobPropertiesList

Source: src/AWS/Comprehend/ListPiiEntitiesDetectionJobs.ts

Runtime binding for comprehend:ListPiiEntitiesDetectionJobs — list the account’s asynchronous PII entity detection jobs, with optional status/name/time filters.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

ListPiiEntitiesDetectionJobs: Monitoring Analysis Jobs

Section titled “ListPiiEntitiesDetectionJobs: Monitoring Analysis Jobs”
// init
const listPiiEntitiesDetectionJobs = yield* AWS.Comprehend.ListPiiEntitiesDetectionJobs();
// runtime
const page = yield* listPiiEntitiesDetectionJobs({
Filter: { JobStatus: "IN_PROGRESS" },
MaxResults: 25,
});
// page.PiiEntitiesDetectionJobPropertiesList

Source: src/AWS/Comprehend/ListSentimentDetectionJobs.ts

Runtime binding for comprehend:ListSentimentDetectionJobs — list the account’s asynchronous sentiment detection jobs, with optional status/name/time filters.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

ListSentimentDetectionJobs: Monitoring Analysis Jobs

Section titled “ListSentimentDetectionJobs: Monitoring Analysis Jobs”
// init
const listSentimentDetectionJobs = yield* AWS.Comprehend.ListSentimentDetectionJobs();
// runtime
const page = yield* listSentimentDetectionJobs({
Filter: { JobStatus: "IN_PROGRESS" },
MaxResults: 25,
});
// page.SentimentDetectionJobPropertiesList

Source: src/AWS/Comprehend/ListTargetedSentimentDetectionJobs.ts

Runtime binding for comprehend:ListTargetedSentimentDetectionJobs — list the account’s asynchronous targeted-sentiment detection jobs, with optional status/name/time filters.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

ListTargetedSentimentDetectionJobs: Monitoring Analysis Jobs

Section titled “ListTargetedSentimentDetectionJobs: Monitoring Analysis Jobs”
// init
const listTargetedSentimentDetectionJobs = yield* AWS.Comprehend.ListTargetedSentimentDetectionJobs();
// runtime
const page = yield* listTargetedSentimentDetectionJobs({
Filter: { JobStatus: "IN_PROGRESS" },
MaxResults: 25,
});
// page.TargetedSentimentDetectionJobPropertiesList

Source: src/AWS/Comprehend/ListTopicsDetectionJobs.ts

Runtime binding for comprehend:ListTopicsDetectionJobs — list the account’s asynchronous topic modeling jobs, with optional status/name/time filters.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

ListTopicsDetectionJobs: Monitoring Analysis Jobs

Section titled “ListTopicsDetectionJobs: Monitoring Analysis Jobs”
// init
const listTopicsDetectionJobs = yield* AWS.Comprehend.ListTopicsDetectionJobs();
// runtime
const page = yield* listTopicsDetectionJobs({
Filter: { JobStatus: "IN_PROGRESS" },
MaxResults: 25,
});
// page.TopicsDetectionJobPropertiesList

Source: src/AWS/Comprehend/StartDocumentClassificationJob.ts

Runtime binding for comprehend:StartDocumentClassificationJob — start an asynchronous document classification job over a collection of documents in S3.

The binding is constructed with the data-access role (the IAM role Amazon Comprehend assumes to read the input documents and write results; its trust policy must allow comprehend.amazonaws.com). The role’s ARN is injected as DataAccessRoleArn on every runtime request and the host is granted iam:PassRole on it alongside the comprehend:StartDocumentClassificationJob action (which has no resource-level IAM). Track the job with DescribeDocumentClassificationJob.

StartDocumentClassificationJob: Starting Analysis Jobs

Section titled “StartDocumentClassificationJob: Starting Analysis Jobs”
// deploy time — bind the Comprehend data-access role
const startDocumentClassificationJob = yield* AWS.Comprehend.StartDocumentClassificationJob(dataAccessRole);
// runtime
const job = yield* startDocumentClassificationJob({
DocumentClassifierArn: classifierArn,
InputDataConfig: { S3Uri: "s3://my-bucket/input/", InputFormat: "ONE_DOC_PER_LINE" },
OutputDataConfig: { S3Uri: "s3://my-bucket/output/" },
});
// job.JobId, job.JobStatus === "SUBMITTED"

Source: src/AWS/Comprehend/StartDominantLanguageDetectionJob.ts

Runtime binding for comprehend:StartDominantLanguageDetectionJob — start an asynchronous dominant-language detection job over a collection of documents in S3.

The binding is constructed with the data-access role (the IAM role Amazon Comprehend assumes to read the input documents and write results; its trust policy must allow comprehend.amazonaws.com). The role’s ARN is injected as DataAccessRoleArn on every runtime request and the host is granted iam:PassRole on it alongside the comprehend:StartDominantLanguageDetectionJob action (which has no resource-level IAM). Track the job with DescribeDominantLanguageDetectionJob and stop it with StopDominantLanguageDetectionJob.

StartDominantLanguageDetectionJob: Starting Analysis Jobs

Section titled “StartDominantLanguageDetectionJob: Starting Analysis Jobs”
// deploy time — bind the Comprehend data-access role
const startDominantLanguageDetectionJob = yield* AWS.Comprehend.StartDominantLanguageDetectionJob(dataAccessRole);
// runtime
const job = yield* startDominantLanguageDetectionJob({
InputDataConfig: { S3Uri: "s3://my-bucket/input/", InputFormat: "ONE_DOC_PER_LINE" },
OutputDataConfig: { S3Uri: "s3://my-bucket/output/" },
LanguageCode: "en",
});
// job.JobId, job.JobStatus === "SUBMITTED"

Source: src/AWS/Comprehend/StartEntitiesDetectionJob.ts

Runtime binding for comprehend:StartEntitiesDetectionJob — start an asynchronous entity detection job over a collection of documents in S3.

The binding is constructed with the data-access role (the IAM role Amazon Comprehend assumes to read the input documents and write results; its trust policy must allow comprehend.amazonaws.com). The role’s ARN is injected as DataAccessRoleArn on every runtime request and the host is granted iam:PassRole on it alongside the comprehend:StartEntitiesDetectionJob action (which has no resource-level IAM). Track the job with DescribeEntitiesDetectionJob and stop it with StopEntitiesDetectionJob.

StartEntitiesDetectionJob: Starting Analysis Jobs

Section titled “StartEntitiesDetectionJob: Starting Analysis Jobs”
// deploy time — bind the Comprehend data-access role
const startEntitiesDetectionJob = yield* AWS.Comprehend.StartEntitiesDetectionJob(dataAccessRole);
// runtime
const job = yield* startEntitiesDetectionJob({
InputDataConfig: { S3Uri: "s3://my-bucket/input/", InputFormat: "ONE_DOC_PER_LINE" },
OutputDataConfig: { S3Uri: "s3://my-bucket/output/" },
LanguageCode: "en",
});
// job.JobId, job.JobStatus === "SUBMITTED"

Source: src/AWS/Comprehend/StartEventsDetectionJob.ts

Runtime binding for comprehend:StartEventsDetectionJob — start an asynchronous event detection job over a collection of documents in S3.

The binding is constructed with the data-access role (the IAM role Amazon Comprehend assumes to read the input documents and write results; its trust policy must allow comprehend.amazonaws.com). The role’s ARN is injected as DataAccessRoleArn on every runtime request and the host is granted iam:PassRole on it alongside the comprehend:StartEventsDetectionJob action (which has no resource-level IAM). Track the job with DescribeEventsDetectionJob and stop it with StopEventsDetectionJob.

StartEventsDetectionJob: Starting Analysis Jobs

Section titled “StartEventsDetectionJob: Starting Analysis Jobs”
// deploy time — bind the Comprehend data-access role
const startEventsDetectionJob = yield* AWS.Comprehend.StartEventsDetectionJob(dataAccessRole);
// runtime
const job = yield* startEventsDetectionJob({
TargetEventTypes: ["BANKRUPTCY", "EMPLOYMENT"],
InputDataConfig: { S3Uri: "s3://my-bucket/input/", InputFormat: "ONE_DOC_PER_LINE" },
OutputDataConfig: { S3Uri: "s3://my-bucket/output/" },
LanguageCode: "en",
});
// job.JobId, job.JobStatus === "SUBMITTED"

Source: src/AWS/Comprehend/StartKeyPhrasesDetectionJob.ts

Runtime binding for comprehend:StartKeyPhrasesDetectionJob — start an asynchronous key-phrase detection job over a collection of documents in S3.

The binding is constructed with the data-access role (the IAM role Amazon Comprehend assumes to read the input documents and write results; its trust policy must allow comprehend.amazonaws.com). The role’s ARN is injected as DataAccessRoleArn on every runtime request and the host is granted iam:PassRole on it alongside the comprehend:StartKeyPhrasesDetectionJob action (which has no resource-level IAM). Track the job with DescribeKeyPhrasesDetectionJob and stop it with StopKeyPhrasesDetectionJob.

StartKeyPhrasesDetectionJob: Starting Analysis Jobs

Section titled “StartKeyPhrasesDetectionJob: Starting Analysis Jobs”
// deploy time — bind the Comprehend data-access role
const startKeyPhrasesDetectionJob = yield* AWS.Comprehend.StartKeyPhrasesDetectionJob(dataAccessRole);
// runtime
const job = yield* startKeyPhrasesDetectionJob({
InputDataConfig: { S3Uri: "s3://my-bucket/input/", InputFormat: "ONE_DOC_PER_LINE" },
OutputDataConfig: { S3Uri: "s3://my-bucket/output/" },
LanguageCode: "en",
});
// job.JobId, job.JobStatus === "SUBMITTED"

Source: src/AWS/Comprehend/StartPiiEntitiesDetectionJob.ts

Runtime binding for comprehend:StartPiiEntitiesDetectionJob — start an asynchronous PII entity detection job over a collection of documents in S3.

The binding is constructed with the data-access role (the IAM role Amazon Comprehend assumes to read the input documents and write results; its trust policy must allow comprehend.amazonaws.com). The role’s ARN is injected as DataAccessRoleArn on every runtime request and the host is granted iam:PassRole on it alongside the comprehend:StartPiiEntitiesDetectionJob action (which has no resource-level IAM). Track the job with DescribePiiEntitiesDetectionJob and stop it with StopPiiEntitiesDetectionJob.

StartPiiEntitiesDetectionJob: Starting Analysis Jobs

Section titled “StartPiiEntitiesDetectionJob: Starting Analysis Jobs”
// deploy time — bind the Comprehend data-access role
const startPiiEntitiesDetectionJob = yield* AWS.Comprehend.StartPiiEntitiesDetectionJob(dataAccessRole);
// runtime
const job = yield* startPiiEntitiesDetectionJob({
InputDataConfig: { S3Uri: "s3://my-bucket/input/", InputFormat: "ONE_DOC_PER_LINE" },
OutputDataConfig: { S3Uri: "s3://my-bucket/output/" },
LanguageCode: "en",
});
// job.JobId, job.JobStatus === "SUBMITTED"

Source: src/AWS/Comprehend/StartSentimentDetectionJob.ts

Runtime binding for comprehend:StartSentimentDetectionJob — start an asynchronous sentiment detection job over a collection of documents in S3.

The binding is constructed with the data-access role (the IAM role Amazon Comprehend assumes to read the input documents and write results; its trust policy must allow comprehend.amazonaws.com). The role’s ARN is injected as DataAccessRoleArn on every runtime request and the host is granted iam:PassRole on it alongside the comprehend:StartSentimentDetectionJob action (which has no resource-level IAM). Track the job with DescribeSentimentDetectionJob and stop it with StopSentimentDetectionJob.

StartSentimentDetectionJob: Starting Analysis Jobs

Section titled “StartSentimentDetectionJob: Starting Analysis Jobs”
// deploy time — bind the Comprehend data-access role
const startSentimentDetectionJob = yield* AWS.Comprehend.StartSentimentDetectionJob(dataAccessRole);
// runtime
const job = yield* startSentimentDetectionJob({
InputDataConfig: { S3Uri: "s3://my-bucket/input/", InputFormat: "ONE_DOC_PER_LINE" },
OutputDataConfig: { S3Uri: "s3://my-bucket/output/" },
LanguageCode: "en",
});
// job.JobId, job.JobStatus === "SUBMITTED"

Source: src/AWS/Comprehend/StartTargetedSentimentDetectionJob.ts

Runtime binding for comprehend:StartTargetedSentimentDetectionJob — start an asynchronous targeted-sentiment detection job over a collection of documents in S3.

The binding is constructed with the data-access role (the IAM role Amazon Comprehend assumes to read the input documents and write results; its trust policy must allow comprehend.amazonaws.com). The role’s ARN is injected as DataAccessRoleArn on every runtime request and the host is granted iam:PassRole on it alongside the comprehend:StartTargetedSentimentDetectionJob action (which has no resource-level IAM). Track the job with DescribeTargetedSentimentDetectionJob and stop it with StopTargetedSentimentDetectionJob.

StartTargetedSentimentDetectionJob: Starting Analysis Jobs

Section titled “StartTargetedSentimentDetectionJob: Starting Analysis Jobs”
// deploy time — bind the Comprehend data-access role
const startTargetedSentimentDetectionJob = yield* AWS.Comprehend.StartTargetedSentimentDetectionJob(dataAccessRole);
// runtime
const job = yield* startTargetedSentimentDetectionJob({
InputDataConfig: { S3Uri: "s3://my-bucket/input/", InputFormat: "ONE_DOC_PER_LINE" },
OutputDataConfig: { S3Uri: "s3://my-bucket/output/" },
LanguageCode: "en",
});
// job.JobId, job.JobStatus === "SUBMITTED"

Source: src/AWS/Comprehend/StartTopicsDetectionJob.ts

Runtime binding for comprehend:StartTopicsDetectionJob — start an asynchronous topic modeling job over a collection of documents in S3.

The binding is constructed with the data-access role (the IAM role Amazon Comprehend assumes to read the input documents and write results; its trust policy must allow comprehend.amazonaws.com). The role’s ARN is injected as DataAccessRoleArn on every runtime request and the host is granted iam:PassRole on it alongside the comprehend:StartTopicsDetectionJob action (which has no resource-level IAM). Track the job with DescribeTopicsDetectionJob.

StartTopicsDetectionJob: Starting Analysis Jobs

Section titled “StartTopicsDetectionJob: Starting Analysis Jobs”
// deploy time — bind the Comprehend data-access role
const startTopicsDetectionJob = yield* AWS.Comprehend.StartTopicsDetectionJob(dataAccessRole);
// runtime
const job = yield* startTopicsDetectionJob({
InputDataConfig: { S3Uri: "s3://my-bucket/input/", InputFormat: "ONE_DOC_PER_LINE" },
OutputDataConfig: { S3Uri: "s3://my-bucket/output/" },
});
// job.JobId, job.JobStatus === "SUBMITTED"

Source: src/AWS/Comprehend/StopDominantLanguageDetectionJob.ts

Runtime binding for comprehend:StopDominantLanguageDetectionJob — request termination of an in-progress asynchronous dominant-language detection job. The job moves to STOP_REQUESTED and then STOPPED; documents already processed are written to the output location.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

StopDominantLanguageDetectionJob: Stopping Analysis Jobs

Section titled “StopDominantLanguageDetectionJob: Stopping Analysis Jobs”
// init
const stopDominantLanguageDetectionJob = yield* AWS.Comprehend.StopDominantLanguageDetectionJob();
// runtime
const result = yield* stopDominantLanguageDetectionJob({ JobId: jobId });
// result.JobStatus === "STOP_REQUESTED"

Source: src/AWS/Comprehend/StopEntitiesDetectionJob.ts

Runtime binding for comprehend:StopEntitiesDetectionJob — request termination of an in-progress asynchronous entity detection job. The job moves to STOP_REQUESTED and then STOPPED; documents already processed are written to the output location.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

StopEntitiesDetectionJob: Stopping Analysis Jobs

Section titled “StopEntitiesDetectionJob: Stopping Analysis Jobs”
// init
const stopEntitiesDetectionJob = yield* AWS.Comprehend.StopEntitiesDetectionJob();
// runtime
const result = yield* stopEntitiesDetectionJob({ JobId: jobId });
// result.JobStatus === "STOP_REQUESTED"

Source: src/AWS/Comprehend/StopEventsDetectionJob.ts

Runtime binding for comprehend:StopEventsDetectionJob — request termination of an in-progress asynchronous event detection job. The job moves to STOP_REQUESTED and then STOPPED; documents already processed are written to the output location.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

StopEventsDetectionJob: Stopping Analysis Jobs

Section titled “StopEventsDetectionJob: Stopping Analysis Jobs”
// init
const stopEventsDetectionJob = yield* AWS.Comprehend.StopEventsDetectionJob();
// runtime
const result = yield* stopEventsDetectionJob({ JobId: jobId });
// result.JobStatus === "STOP_REQUESTED"

Source: src/AWS/Comprehend/StopKeyPhrasesDetectionJob.ts

Runtime binding for comprehend:StopKeyPhrasesDetectionJob — request termination of an in-progress asynchronous key-phrase detection job. The job moves to STOP_REQUESTED and then STOPPED; documents already processed are written to the output location.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

StopKeyPhrasesDetectionJob: Stopping Analysis Jobs

Section titled “StopKeyPhrasesDetectionJob: Stopping Analysis Jobs”
// init
const stopKeyPhrasesDetectionJob = yield* AWS.Comprehend.StopKeyPhrasesDetectionJob();
// runtime
const result = yield* stopKeyPhrasesDetectionJob({ JobId: jobId });
// result.JobStatus === "STOP_REQUESTED"

Source: src/AWS/Comprehend/StopPiiEntitiesDetectionJob.ts

Runtime binding for comprehend:StopPiiEntitiesDetectionJob — request termination of an in-progress asynchronous PII entity detection job. The job moves to STOP_REQUESTED and then STOPPED; documents already processed are written to the output location.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

StopPiiEntitiesDetectionJob: Stopping Analysis Jobs

Section titled “StopPiiEntitiesDetectionJob: Stopping Analysis Jobs”
// init
const stopPiiEntitiesDetectionJob = yield* AWS.Comprehend.StopPiiEntitiesDetectionJob();
// runtime
const result = yield* stopPiiEntitiesDetectionJob({ JobId: jobId });
// result.JobStatus === "STOP_REQUESTED"

Source: src/AWS/Comprehend/StopSentimentDetectionJob.ts

Runtime binding for comprehend:StopSentimentDetectionJob — request termination of an in-progress asynchronous sentiment detection job. The job moves to STOP_REQUESTED and then STOPPED; documents already processed are written to the output location.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

StopSentimentDetectionJob: Stopping Analysis Jobs

Section titled “StopSentimentDetectionJob: Stopping Analysis Jobs”
// init
const stopSentimentDetectionJob = yield* AWS.Comprehend.StopSentimentDetectionJob();
// runtime
const result = yield* stopSentimentDetectionJob({ JobId: jobId });
// result.JobStatus === "STOP_REQUESTED"

Source: src/AWS/Comprehend/StopTargetedSentimentDetectionJob.ts

Runtime binding for comprehend:StopTargetedSentimentDetectionJob — request termination of an in-progress asynchronous targeted-sentiment detection job. The job moves to STOP_REQUESTED and then STOPPED; documents already processed are written to the output location.

The binding takes no arguments and grants the action on * (job APIs have no resource-level IAM).

StopTargetedSentimentDetectionJob: Stopping Analysis Jobs

Section titled “StopTargetedSentimentDetectionJob: Stopping Analysis Jobs”
// init
const stopTargetedSentimentDetectionJob = yield* AWS.Comprehend.StopTargetedSentimentDetectionJob();
// runtime
const result = yield* stopTargetedSentimentDetectionJob({ JobId: jobId });
// result.JobStatus === "STOP_REQUESTED"