internal virtual StartTopicsDetectionJobResponse StartTopicsDetectionJob(StartTopicsDetectionJobRequest request) { var marshaller = new StartTopicsDetectionJobRequestMarshaller(); var unmarshaller = StartTopicsDetectionJobResponseUnmarshaller.Instance; return(Invoke <StartTopicsDetectionJobRequest, StartTopicsDetectionJobResponse>(request, marshaller, unmarshaller)); }
public static void Sample() { var comprehendClient = new AmazonComprehendClient(Amazon.RegionEndpoint.USWest2); String inputS3Uri = "s3://input bucket/input path"; InputFormat inputDocFormat = InputFormat.ONE_DOC_PER_FILE; String outputS3Uri = "s3://output bucket/output path"; String dataAccessRoleArn = "arn:aws:iam::account ID:role/data access role"; int numberOfTopics = 10; var startTopicsDetectionJobRequest = new StartTopicsDetectionJobRequest() { InputDataConfig = new InputDataConfig() { S3Uri = inputS3Uri, InputFormat = inputDocFormat }, OutputDataConfig = new OutputDataConfig() { S3Uri = outputS3Uri }, DataAccessRoleArn = dataAccessRoleArn, NumberOfTopics = numberOfTopics }; var startTopicsDetectionJobResponse = comprehendClient.StartTopicsDetectionJob(startTopicsDetectionJobRequest); var jobId = startTopicsDetectionJobResponse.JobId; Console.WriteLine("JobId: " + jobId); var describeTopicsDetectionJobRequest = new DescribeTopicsDetectionJobRequest() { JobId = jobId }; var describeTopicsDetectionJobResponse = comprehendClient.DescribeTopicsDetectionJob(describeTopicsDetectionJobRequest); PrintJobProperties(describeTopicsDetectionJobResponse.TopicsDetectionJobProperties); var listTopicsDetectionJobsResponse = comprehendClient.ListTopicsDetectionJobs(new ListTopicsDetectionJobsRequest()); foreach (var props in listTopicsDetectionJobsResponse.TopicsDetectionJobPropertiesList) { PrintJobProperties(props); } }
/// <summary> /// Initiates the asynchronous execution of the StartTopicsDetectionJob operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the StartTopicsDetectionJob operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartTopicsDetectionJob">REST API Reference for StartTopicsDetectionJob Operation</seealso> public virtual Task <StartTopicsDetectionJobResponse> StartTopicsDetectionJobAsync(StartTopicsDetectionJobRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new StartTopicsDetectionJobRequestMarshaller(); var unmarshaller = StartTopicsDetectionJobResponseUnmarshaller.Instance; return(InvokeAsync <StartTopicsDetectionJobRequest, StartTopicsDetectionJobResponse>(request, marshaller, unmarshaller, cancellationToken)); }