start_sentiment_detection_job
¶
start_sentiment_detection_job(
input_data_config: InputDataConfig,
output_data_config: OutputDataConfig,
data_access_role_arn: IamRoleArn,
language_code: LanguageCode,
*,
config_overrides: Optional[ComprehendClientConfig] = None,
job_name: Optional[JobName] = None,
client_request_token: Optional[ClientRequestTokenString] = None,
volume_kms_key_id: Optional[KmsKeyId] = None,
vpc_config: Optional[VpcConfig] = None,
tags: Optional[TagList] = None,
) -> StartSentimentDetectionJobResponse
Starts an asynchronous sentiment detection job for a collection of documents. Use the operation to track the status of a job.
Parameters:
-
input_data_config(InputDataConfig) –Specifies the format and location of the input data for the job.
-
output_data_config(OutputDataConfig) –Specifies where to send the output files.
-
data_access_role_arn(IamRoleArn) –The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to your input data. For more information, see Role-based permissions.
-
job_name(Optional[JobName], default:None) –The identifier of the job.
-
language_code(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.
-
client_request_token(Optional[ClientRequestTokenString], default:None) –A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
-
volume_kms_key_id(Optional[KmsKeyId], default:None) –ID for the Amazon Web Services Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:
-
KMS Key ID:
"1234abcd-12ab-34cd-56ef-1234567890ab" -
Amazon Resource Name (ARN) of a KMS Key:
"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
-
-
vpc_config(Optional[VpcConfig], default:None) –Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your sentiment detection job. For more information, see Amazon VPC.
-
tags(Optional[TagList], default:None) –Tags to associate with the sentiment detection job. A tag is a key-value pair that adds metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
Raises:
-
InternalServerException–An internal server error occurred. Retry your request.
-
InvalidRequestException–The request is invalid.
-
KmsKeyValidationException–The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it.
-
ResourceInUseException–The specified resource name is already in use. Use a different name and try your request again.
-
TooManyRequestsException–The number of requests exceeds the limit. Resubmit your request later.
-
TooManyTagsException–The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_comprehend/_services/comprehend.py
5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 | |