Menu
Amazon Comprehend
Developer Guide

StartTopicsDetectionJob

Starts an asynchronous topic detection job. Use the DescribeTopicDetectionJob operation to track the status of a job.

Request Syntax

{
   "ClientRequestToken": "string",
   "DataAccessRoleArn": "string",
   "InputDataConfig": { 
      "InputFormat": "string",
      "S3Uri": "string"
   },
   "JobName": "string",
   "NumberOfTopics": number,
   "OutputDataConfig": { 
      "S3Uri": "string"
   }
}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

ClientRequestToken

A unique identifier for the request. If you do not set the client request token, Amazon Comprehend generates one.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[a-zA-Z0-9-]+$

Required: No

DataAccessRoleArn

The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data.

Type: String

Pattern: arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+

Required: Yes

InputDataConfig

Specifies the format and location of the input data for the job.

Type: InputDataConfig object

Required: Yes

JobName

The identifier of the job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-%@]*)$

Required: No

NumberOfTopics

The number of topics to detect.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 100.

Required: No

OutputDataConfig

Specifies where to send the output files.

Type: OutputDataConfig object

Required: Yes

Response Syntax

{
   "JobId": "string",
   "JobStatus": "string"
}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

JobId

The identifier generated for the job. To get the status of the job, use this identifier with the DescribeTopicDetectionJob operation.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 32.

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 DescribeTopicDetectionJob operation.

Type: String

Valid Values: SUBMITTED | IN_PROGRESS | COMPLETED | FAILED

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServerException

An internal server error occurred. Retry your request.

HTTP Status Code: 500

InvalidRequestException

The request is invalid.

HTTP Status Code: 400

TooManyRequestsException

The number of requests exceeds the limit. Resubmit your request later.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: