Verwenden Sie DescribeTextTranslationJob mit einem AWS SDKoder CLI - Amazon Translate

Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.

Verwenden Sie DescribeTextTranslationJob mit einem AWS SDKoder CLI

Die folgenden Codebeispiele zeigen, wie man es benutztDescribeTextTranslationJob.

Beispiele für Aktionen sind Codeauszüge aus größeren Programmen und müssen im Kontext ausgeführt werden. Im folgenden Codebeispiel können Sie diese Aktion im Kontext sehen:

.NET
AWS SDK for .NET
Anmerkung

Es gibt noch mehr dazu GitHub. Das vollständige Beispiel und Informationen zur Einrichtung und Ausführung finden Sie in AWS Repository mit Codebeispielen.

using System; using System.Threading.Tasks; using Amazon.Translate; using Amazon.Translate.Model; /// <summary> /// The following example shows how to retrieve the details of /// a text translation job using Amazon Translate. /// </summary> public class DescribeTextTranslation { public static async Task Main() { var client = new AmazonTranslateClient(); // The Job Id is generated when the text translation job is started // with a call to the StartTextTranslationJob method. var jobId = "1234567890abcdef01234567890abcde"; var request = new DescribeTextTranslationJobRequest { JobId = jobId, }; var jobProperties = await DescribeTranslationJobAsync(client, request); DisplayTranslationJobDetails(jobProperties); } /// <summary> /// Retrieve information about an Amazon Translate text translation job. /// </summary> /// <param name="client">The initialized Amazon Translate client object.</param> /// <param name="request">The DescribeTextTranslationJobRequest object.</param> /// <returns>The TextTranslationJobProperties object containing /// information about the text translation job..</returns> public static async Task<TextTranslationJobProperties> DescribeTranslationJobAsync( AmazonTranslateClient client, DescribeTextTranslationJobRequest request) { var response = await client.DescribeTextTranslationJobAsync(request); if (response.HttpStatusCode == System.Net.HttpStatusCode.OK) { return response.TextTranslationJobProperties; } else { return null; } } /// <summary> /// Displays the properties of the text translation job. /// </summary> /// <param name="jobProperties">The properties of the text translation /// job returned by the call to DescribeTextTranslationJobAsync.</param> public static void DisplayTranslationJobDetails(TextTranslationJobProperties jobProperties) { if (jobProperties is null) { Console.WriteLine("No text translation job properties found."); return; } // Display the details of the text translation job. Console.WriteLine($"{jobProperties.JobId}: {jobProperties.JobName}"); } }
SAP ABAP
SDKfür SAP ABAP
Anmerkung

Es gibt noch mehr dazu GitHub. Das vollständige Beispiel und Informationen zur Einrichtung und Ausführung finden Sie in AWS Repository mit Codebeispielen.

"Gets the properties associated with an asynchronous batch translation job." "Includes properties such as name, ID, status, source and target languages, and input/output Amazon Simple Storage Service (Amazon S3) buckets." TRY. oo_result = lo_xl8->describetexttranslationjob( "oo_result is returned for testing purposes." EXPORTING iv_jobid = iv_jobid ). MESSAGE 'Job description retrieved.' TYPE 'I'. CATCH /aws1/cx_xl8internalserverex . MESSAGE 'An internal server error occurred. Retry your request.' TYPE 'E'. CATCH /aws1/cx_xl8resourcenotfoundex . MESSAGE 'The resource you are looking for has not been found.' TYPE 'E'. CATCH /aws1/cx_xl8toomanyrequestsex. MESSAGE 'You have made too many requests within a short period of time.' TYPE 'E'. ENDTRY.

Für eine vollständige Liste von AWS SDKEntwicklerhandbücher und Codebeispiele finden Sie unterVerwenden Sie diesen Dienst mit einem AWS SDK. Dieses Thema enthält auch Informationen zu den ersten Schritten und Details zu früheren SDK Versionen.