PHP SDK Operation not found: StartTextTranslationJob

0

Trying to use the async batch translate API with the AWS PHP SDK (updated to 3.130.3 via composer) and get returned the error "Operation not found: StartTextTranslationJob" when calling the job:

$result = $client->StartTextTranslationJob([
			    'ClientToken' => $job_uuid, // REQUIRED
			    'DataAccessRoleArn' => 'myiam', // REQUIRED
			    'InputDataConfig' => [ // REQUIRED
			        'ContentType' => 'text/plain ', // REQUIRED
			        'S3Uri' => 'myinput', // REQUIRED
			    ],
			    'JobName' => 'myjobname',
			    'OutputDataConfig' => [ // REQUIRED
			        'S3Uri' => 'my output', // REQUIRED
			    ],
			    'SourceLanguageCode' => $currentLanguage, // REQUIRED
			    'TargetLanguageCodes' => $languages, // REQUIRED
			    'TerminologyNames' => ['my_terminology'],
			]);

I have been using TranslteText successfully for a few months but it is beginning to throttle so I am trying to move larger text strings into async batch jobs.

I have opened the TranslateClient.php file and it does not seem to describe StartTextTranslationJob:

namespace Aws\Translate;

use Aws\AwsClient;

/**
 * This client is used to interact with the **Amazon Translate** service.
 * @method \Aws\Result deleteTerminology(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteTerminologyAsync(array $args = [])
 * @method \Aws\Result getTerminology(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getTerminologyAsync(array $args = [])
 * @method \Aws\Result importTerminology(array $args = [])
 * @method \GuzzleHttp\Promise\Promise importTerminologyAsync(array $args = [])
 * @method \Aws\Result listTerminologies(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listTerminologiesAsync(array $args = [])
 * @method \Aws\Result translateText(array $args = [])
 * @method \GuzzleHttp\Promise\Promise translateTextAsync(array $args = [])
 */
class TranslateClient extends AwsClient

Any clues?

Edited by: elderbre on May 2, 2020 4:03 AM

asked 4 years ago383 views
1 Answer
0

Finally found out the issue. Those calls were added in version 3.132 and my composer was only updating to 3.130 due to another dependency and I wasn't seeing that. Updated the dependency then was sdk to 1.137.1 and voila.

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions