start_sentiment_detection_job
async
¶
start_sentiment_detection_job(
input_data_config: InputDataConfig,
output_data_config: OutputDataConfig,
data_access_role_arn: IamRoleArn,
language_code: LanguageCode,
*,
config_overrides: Optional[AsyncComprehendClientConfig] = 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/async_comprehend.py
5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 | |