DescribeTextTranslationJobÚselo con un AWS SDK o CLI - AWS SDKEjemplos de código

Hay más AWS SDK ejemplos disponibles en el GitHub repositorio de AWS Doc SDK Examples.

Las traducciones son generadas a través de traducción automática. En caso de conflicto entre la traducción y la version original de inglés, prevalecerá la version en inglés.

DescribeTextTranslationJobÚselo con un AWS SDK o CLI

En los siguientes ejemplos de código, se muestra cómo utilizar DescribeTextTranslationJob.

Los ejemplos de acciones son extractos de código de programas más grandes y deben ejecutarse en contexto. Puede ver esta acción en contexto en el siguiente ejemplo de código:

.NET
AWS SDK for .NET
nota

Hay más en marcha GitHub. Busque el ejemplo completo y aprenda a configurar y ejecutar en el Repositorio de ejemplos de código de AWS.

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
SDKpara SAP ABAP
nota

Hay más información GitHub. Busque el ejemplo completo y aprenda a configurar y ejecutar en el Repositorio de ejemplos de código de AWS.

"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.