Ada lebih banyak contoh AWS SDK yang tersedia di repo Contoh SDK AWS Doc
Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.
Gunakan DescribeDocumentClassificationJobdengan AWS SDK atau CLI
Contoh kode berikut menunjukkan cara menggunakanDescribeDocumentClassificationJob.
Contoh tindakan adalah kutipan kode dari program yang lebih besar dan harus dijalankan dalam konteks. Anda dapat melihat tindakan ini dalam konteks dalam contoh kode berikut:
- CLI
-
- AWS CLI
-
Untuk menggambarkan pekerjaan klasifikasi dokumen
describe-document-classification-jobContoh berikut mendapatkan properti pekerjaan klasifikasi dokumen asinkron.aws comprehend describe-document-classification-job \ --job-id123456abcdeb0e11022f22a11EXAMPLEOutput:
{ "DocumentClassificationJobProperties": { "JobId": "123456abcdeb0e11022f22a11EXAMPLE", "JobArn": "arn:aws:comprehend:us-west-2:111122223333:document-classification-job/123456abcdeb0e11022f22a11EXAMPLE", "JobName": "exampleclassificationjob", "JobStatus": "COMPLETED", "SubmitTime": "2023-06-14T17:09:51.788000+00:00", "EndTime": "2023-06-14T17:15:58.582000+00:00", "DocumentClassifierArn": "arn:aws:comprehend:us-west-2:111122223333:document-classifier/mymodel/version/1", "InputDataConfig": { "S3Uri": "s3://amzn-s3-demo-bucket/jobdata/", "InputFormat": "ONE_DOC_PER_LINE" }, "OutputDataConfig": { "S3Uri": "s3://amzn-s3-demo-destination-bucket/testfolder/111122223333-CLN-123456abcdeb0e11022f22a11EXAMPLE/output/output.tar.gz" }, "DataAccessRoleArn": "arn:aws:iam::111122223333:role/service-role/AmazonComprehendServiceRole-servicerole" } }Untuk informasi selengkapnya, lihat Klasifikasi Kustom di Panduan Pengembang Amazon Comprehend.
-
Untuk detail API, lihat DescribeDocumentClassificationJob
di Referensi AWS CLI Perintah.
-
- Python
-
- SDK untuk Python (Boto3)
-
catatan
Ada lebih banyak tentang GitHub. Temukan contoh lengkapnya dan pelajari cara mengatur dan menjalankannya di Repositori Contoh Kode AWS
. class ComprehendClassifier: """Encapsulates an Amazon Comprehend custom classifier.""" def __init__(self, comprehend_client): """ :param comprehend_client: A Boto3 Comprehend client. """ self.comprehend_client = comprehend_client self.classifier_arn = None def describe_job(self, job_id): """ Gets metadata about a classification job. :param job_id: The ID of the job to look up. :return: Metadata about the job. """ try: response = self.comprehend_client.describe_document_classification_job( JobId=job_id ) job = response["DocumentClassificationJobProperties"] logger.info("Got classification job %s.", job["JobName"]) except ClientError: logger.exception("Couldn't get classification job %s.", job_id) raise else: return job-
Untuk detail API, lihat DescribeDocumentClassificationJobdi AWS SDK for Python (Boto3) Referensi API.
-
- SAP ABAP
-
- SDK for SAP ABAP
-
catatan
Ada lebih banyak tentang GitHub. Temukan contoh lengkapnya dan pelajari cara mengatur dan menjalankannya di Repositori Contoh Kode AWS
. TRY. oo_result = lo_cpd->describedocclassificationjob( iv_jobid = iv_job_id ). MESSAGE 'Document classification job described.' TYPE 'I'. CATCH /aws1/cx_cpdinvalidrequestex. MESSAGE 'Invalid request.' TYPE 'E'. CATCH /aws1/cx_cpdjobnotfoundex. MESSAGE 'Job not found.' TYPE 'E'. CATCH /aws1/cx_cpdtoomanyrequestsex. MESSAGE 'Too many requests.' TYPE 'E'. CATCH /aws1/cx_cpdinternalserverex. MESSAGE 'Internal server error occurred.' TYPE 'E'. ENDTRY.-
Untuk detail API, lihat DescribeDocumentClassificationJobdi AWS SDK untuk referensi SAP ABAP API.
-