AWSTranslate
Objective-C
@interface AWSTranslate
Swift
class AWSTranslate
Provides translation of the input content from the source language to the target language.
-
The service configuration used to instantiate this service client.
Warning
Once the client is instantiated, do not modify the configuration object. It may cause unspecified behaviors.Declaration
Objective-C
@property (nonatomic, strong, readonly) AWSServiceConfiguration *configuration
-
Returns the singleton service client. If the singleton object does not exist, the SDK instantiates the default service client with
defaultServiceConfiguration
from[AWSServiceManager defaultServiceManager]
. The reference to this object is maintained by the SDK, and you do not need to retain it manually.For example, set the default service configuration in
- application:didFinishLaunchingWithOptions:
Swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId") let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider) AWSServiceManager.default().defaultServiceConfiguration = configuration return true
}
Objective-C
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1 identityPoolId:@"YourIdentityPoolId"]; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:credentialsProvider]; [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration; return YES; }
Then call the following to get the default service client:
Swift
let Translate = AWSTranslate.default()
Objective-C
AWSTranslate *Translate = [AWSTranslate defaultTranslate];
Declaration
Objective-C
+ (nonnull instancetype)defaultTranslate;
Swift
class func `default`() -> Self
Return Value
The default service client.
-
Creates a service client with the given service configuration and registers it for the key.
For example, set the default service configuration in
- application:didFinishLaunchingWithOptions:
Swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId") let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider) AWSTranslate.register(with: configuration!, forKey: "USWest2Translate") return true
}
Objective-C
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1 identityPoolId:@"YourIdentityPoolId"]; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2 credentialsProvider:credentialsProvider]; [AWSTranslate registerTranslateWithConfiguration:configuration forKey:@"USWest2Translate"]; return YES; }
Then call the following to get the service client:
Swift
let Translate = AWSTranslate(forKey: "USWest2Translate")
Objective-C
AWSTranslate *Translate = [AWSTranslate TranslateForKey:@"USWest2Translate"];
Warning
After calling this method, do not modify the configuration object. It may cause unspecified behaviors.
Declaration
Objective-C
+ (void)registerTranslateWithConfiguration:(id)configuration forKey:(nonnull NSString *)key;
Swift
class func register(withConfiguration configuration: Any!, forKey key: String)
Parameters
configuration
A service configuration object.
key
A string to identify the service client.
-
Retrieves the service client associated with the key. You need to call
+ registerTranslateWithConfiguration:forKey:
before invoking this method.For example, set the default service configuration in
- application:didFinishLaunchingWithOptions:
Swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId") let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider) AWSTranslate.register(with: configuration!, forKey: "USWest2Translate") return true
}
Objective-C
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1 identityPoolId:@"YourIdentityPoolId"]; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2 credentialsProvider:credentialsProvider]; [AWSTranslate registerTranslateWithConfiguration:configuration forKey:@"USWest2Translate"]; return YES; }
Then call the following to get the service client:
Swift
let Translate = AWSTranslate(forKey: "USWest2Translate")
Objective-C
AWSTranslate *Translate = [AWSTranslate TranslateForKey:@"USWest2Translate"];
Declaration
Objective-C
+ (nonnull instancetype)TranslateForKey:(nonnull NSString *)key;
Swift
convenience init(forKey key: String)
Parameters
key
A string to identify the service client.
Return Value
An instance of the service client.
-
Removes the service client associated with the key and release it.
Warning
Before calling this method, make sure no method is running on this client.
Declaration
Objective-C
+ (void)removeTranslateForKey:(nonnull NSString *)key;
Swift
class func remove(forKey key: String)
Parameters
key
A string to identify the service client.
-
Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3. Parallel data files contain examples that show how you want segments of text to be translated. By adding parallel data, you can influence the style, tone, and word choice in your translation output.
See
AWSTranslateCreateParallelDataRequest
See
AWSTranslateCreateParallelDataResponse
Declaration
Objective-C
- (id)createParallelData: (nonnull AWSTranslateCreateParallelDataRequest *)request;
Swift
func createParallelData(_ request: AWSTranslateCreateParallelDataRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the CreateParallelData service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSTranslateCreateParallelDataResponse
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorInvalidRequest
,AWSTranslateErrorLimitExceeded
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorTooManyTags
,AWSTranslateErrorConflict
,AWSTranslateErrorConcurrentModification
,AWSTranslateErrorInternalServer
. -
Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3. Parallel data files contain examples that show how you want segments of text to be translated. By adding parallel data, you can influence the style, tone, and word choice in your translation output.
See
AWSTranslateCreateParallelDataRequest
See
AWSTranslateCreateParallelDataResponse
Declaration
Objective-C
- (void) createParallelData:(nonnull AWSTranslateCreateParallelDataRequest *)request completionHandler: (void (^_Nullable)(AWSTranslateCreateParallelDataResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func createParallelData(_ request: AWSTranslateCreateParallelDataRequest) async throws -> AWSTranslateCreateParallelDataResponse
Parameters
request
A container for the necessary parameters to execute the CreateParallelData service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorInvalidRequest
,AWSTranslateErrorLimitExceeded
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorTooManyTags
,AWSTranslateErrorConflict
,AWSTranslateErrorConcurrentModification
,AWSTranslateErrorInternalServer
. -
Deletes a parallel data resource in Amazon Translate.
See
AWSTranslateDeleteParallelDataRequest
See
AWSTranslateDeleteParallelDataResponse
Declaration
Objective-C
- (id)deleteParallelData: (nonnull AWSTranslateDeleteParallelDataRequest *)request;
Swift
func deleteParallelData(_ request: AWSTranslateDeleteParallelDataRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the DeleteParallelData service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSTranslateDeleteParallelDataResponse
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorConcurrentModification
,AWSTranslateErrorResourceNotFound
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorInternalServer
. -
Deletes a parallel data resource in Amazon Translate.
See
AWSTranslateDeleteParallelDataRequest
See
AWSTranslateDeleteParallelDataResponse
Declaration
Objective-C
- (void) deleteParallelData:(nonnull AWSTranslateDeleteParallelDataRequest *)request completionHandler: (void (^_Nullable)(AWSTranslateDeleteParallelDataResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func deleteParallelData(_ request: AWSTranslateDeleteParallelDataRequest) async throws -> AWSTranslateDeleteParallelDataResponse
Parameters
request
A container for the necessary parameters to execute the DeleteParallelData service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorConcurrentModification
,AWSTranslateErrorResourceNotFound
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorInternalServer
. -
A synchronous action that deletes a custom terminology.
See
AWSTranslateDeleteTerminologyRequest
Declaration
Objective-C
- (id)deleteTerminology:(nonnull AWSTranslateDeleteTerminologyRequest *)request;
Swift
func deleteTerminology(_ request: AWSTranslateDeleteTerminologyRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the DeleteTerminology service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will benil
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorResourceNotFound
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorInternalServer
. -
A synchronous action that deletes a custom terminology.
See
AWSTranslateDeleteTerminologyRequest
Declaration
Objective-C
- (void) deleteTerminology:(nonnull AWSTranslateDeleteTerminologyRequest *)request completionHandler:(void (^_Nullable)(NSError *_Nullable))completionHandler;
Swift
func deleteTerminology(_ request: AWSTranslateDeleteTerminologyRequest) async throws
Parameters
request
A container for the necessary parameters to execute the DeleteTerminology service method.
completionHandler
The completion handler to call when the load request is complete.
error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorResourceNotFound
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorInternalServer
. -
Gets the properties associated with an asynchronous batch translation job including name, ID, status, source and target languages, input/output S3 buckets, and so on.
See
AWSTranslateDescribeTextTranslationJobRequest
See
AWSTranslateDescribeTextTranslationJobResponse
Declaration
Objective-C
- (id)describeTextTranslationJob: (nonnull AWSTranslateDescribeTextTranslationJobRequest *)request;
Swift
func describeTextTranslationJob(_ request: AWSTranslateDescribeTextTranslationJobRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the DescribeTextTranslationJob service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSTranslateDescribeTextTranslationJobResponse
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorResourceNotFound
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorInternalServer
. -
Gets the properties associated with an asynchronous batch translation job including name, ID, status, source and target languages, input/output S3 buckets, and so on.
See
AWSTranslateDescribeTextTranslationJobRequest
See
AWSTranslateDescribeTextTranslationJobResponse
Declaration
Objective-C
- (void) describeTextTranslationJob: (nonnull AWSTranslateDescribeTextTranslationJobRequest *)request completionHandler: (void (^_Nullable)( AWSTranslateDescribeTextTranslationJobResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func describeTextTranslationJob(_ request: AWSTranslateDescribeTextTranslationJobRequest) async throws -> AWSTranslateDescribeTextTranslationJobResponse
Parameters
request
A container for the necessary parameters to execute the DescribeTextTranslationJob service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorResourceNotFound
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorInternalServer
. -
Provides information about a parallel data resource.
See
AWSTranslateGetParallelDataRequest
See
AWSTranslateGetParallelDataResponse
Declaration
Objective-C
- (id)getParallelData:(nonnull AWSTranslateGetParallelDataRequest *)request;
Swift
func getParallelData(_ request: AWSTranslateGetParallelDataRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the GetParallelData service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSTranslateGetParallelDataResponse
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorResourceNotFound
,AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorInternalServer
. -
Provides information about a parallel data resource.
See
AWSTranslateGetParallelDataRequest
See
AWSTranslateGetParallelDataResponse
Declaration
Objective-C
- (void)getParallelData:(nonnull AWSTranslateGetParallelDataRequest *)request completionHandler: (void (^_Nullable)(AWSTranslateGetParallelDataResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func parallelData(_ request: AWSTranslateGetParallelDataRequest) async throws -> AWSTranslateGetParallelDataResponse
Parameters
request
A container for the necessary parameters to execute the GetParallelData service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorResourceNotFound
,AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorInternalServer
. -
Retrieves a custom terminology.
See
AWSTranslateGetTerminologyRequest
See
AWSTranslateGetTerminologyResponse
Declaration
Objective-C
- (id)getTerminology:(nonnull AWSTranslateGetTerminologyRequest *)request;
Swift
func getTerminology(_ request: AWSTranslateGetTerminologyRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the GetTerminology service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSTranslateGetTerminologyResponse
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorResourceNotFound
,AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorInternalServer
. -
Retrieves a custom terminology.
See
AWSTranslateGetTerminologyRequest
See
AWSTranslateGetTerminologyResponse
Declaration
Objective-C
- (void)getTerminology:(nonnull AWSTranslateGetTerminologyRequest *)request completionHandler: (void (^_Nullable)(AWSTranslateGetTerminologyResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func terminology(_ request: AWSTranslateGetTerminologyRequest) async throws -> AWSTranslateGetTerminologyResponse
Parameters
request
A container for the necessary parameters to execute the GetTerminology service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorResourceNotFound
,AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorInternalServer
. -
Creates or updates a custom terminology, depending on whether one already exists for the given terminology name. Importing a terminology with the same name as an existing one will merge the terminologies based on the chosen merge strategy. The only supported merge strategy is OVERWRITE, where the imported terminology overwrites the existing terminology of the same name.
If you import a terminology that overwrites an existing one, the new terminology takes up to 10 minutes to fully propagate. After that, translations have access to the new terminology.
See
AWSTranslateImportTerminologyRequest
See
AWSTranslateImportTerminologyResponse
Declaration
Objective-C
- (id)importTerminology:(nonnull AWSTranslateImportTerminologyRequest *)request;
Swift
func importTerminology(_ request: AWSTranslateImportTerminologyRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the ImportTerminology service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSTranslateImportTerminologyResponse
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorLimitExceeded
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorTooManyTags
,AWSTranslateErrorConcurrentModification
,AWSTranslateErrorInternalServer
. -
Creates or updates a custom terminology, depending on whether one already exists for the given terminology name. Importing a terminology with the same name as an existing one will merge the terminologies based on the chosen merge strategy. The only supported merge strategy is OVERWRITE, where the imported terminology overwrites the existing terminology of the same name.
If you import a terminology that overwrites an existing one, the new terminology takes up to 10 minutes to fully propagate. After that, translations have access to the new terminology.
See
AWSTranslateImportTerminologyRequest
See
AWSTranslateImportTerminologyResponse
Declaration
Objective-C
- (void)importTerminology: (nonnull AWSTranslateImportTerminologyRequest *)request completionHandler: (void (^_Nullable)(AWSTranslateImportTerminologyResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func importTerminology(_ request: AWSTranslateImportTerminologyRequest) async throws -> AWSTranslateImportTerminologyResponse
Parameters
request
A container for the necessary parameters to execute the ImportTerminology service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorLimitExceeded
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorTooManyTags
,AWSTranslateErrorConcurrentModification
,AWSTranslateErrorInternalServer
. -
Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.
See
AWSTranslateListLanguagesRequest
See
AWSTranslateListLanguagesResponse
Declaration
Objective-C
- (id)listLanguages:(nonnull AWSTranslateListLanguagesRequest *)request;
Swift
func listLanguages(_ request: AWSTranslateListLanguagesRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the ListLanguages service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSTranslateListLanguagesResponse
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorUnsupportedDisplayLanguageCode
,AWSTranslateErrorInternalServer
. -
Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.
See
AWSTranslateListLanguagesRequest
See
AWSTranslateListLanguagesResponse
Declaration
Objective-C
- (void)listLanguages:(nonnull AWSTranslateListLanguagesRequest *)request completionHandler: (void (^_Nullable)(AWSTranslateListLanguagesResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func listLanguages(_ request: AWSTranslateListLanguagesRequest) async throws -> AWSTranslateListLanguagesResponse
Parameters
request
A container for the necessary parameters to execute the ListLanguages service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorUnsupportedDisplayLanguageCode
,AWSTranslateErrorInternalServer
. -
Provides a list of your parallel data resources in Amazon Translate.
See
AWSTranslateListParallelDataRequest
See
AWSTranslateListParallelDataResponse
Declaration
Objective-C
- (id)listParallelData:(nonnull AWSTranslateListParallelDataRequest *)request;
Swift
func listParallelData(_ request: AWSTranslateListParallelDataRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the ListParallelData service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSTranslateListParallelDataResponse
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorInternalServer
. -
Provides a list of your parallel data resources in Amazon Translate.
See
AWSTranslateListParallelDataRequest
See
AWSTranslateListParallelDataResponse
Declaration
Objective-C
- (void)listParallelData:(nonnull AWSTranslateListParallelDataRequest *)request completionHandler: (void (^_Nullable)(AWSTranslateListParallelDataResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func listParallelData(_ request: AWSTranslateListParallelDataRequest) async throws -> AWSTranslateListParallelDataResponse
Parameters
request
A container for the necessary parameters to execute the ListParallelData service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorInternalServer
. -
Lists all tags associated with a given Amazon Translate resource. For more information, see Tagging your resources.
See
AWSTranslateListTagsForResourceRequest
See
AWSTranslateListTagsForResourceResponse
Declaration
Objective-C
- (id)listTagsForResource: (nonnull AWSTranslateListTagsForResourceRequest *)request;
Swift
func listTags(forResource request: AWSTranslateListTagsForResourceRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the ListTagsForResource service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSTranslateListTagsForResourceResponse
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorResourceNotFound
,AWSTranslateErrorInternalServer
. -
Lists all tags associated with a given Amazon Translate resource. For more information, see Tagging your resources.
See
AWSTranslateListTagsForResourceRequest
See
AWSTranslateListTagsForResourceResponse
Declaration
Objective-C
- (void) listTagsForResource: (nonnull AWSTranslateListTagsForResourceRequest *)request completionHandler: (void (^_Nullable)(AWSTranslateListTagsForResourceResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func listTags(forResource request: AWSTranslateListTagsForResourceRequest) async throws -> AWSTranslateListTagsForResourceResponse
Parameters
request
A container for the necessary parameters to execute the ListTagsForResource service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorResourceNotFound
,AWSTranslateErrorInternalServer
. -
Provides a list of custom terminologies associated with your account.
See
AWSTranslateListTerminologiesRequest
See
AWSTranslateListTerminologiesResponse
Declaration
Objective-C
- (id)listTerminologies:(nonnull AWSTranslateListTerminologiesRequest *)request;
Swift
func listTerminologies(_ request: AWSTranslateListTerminologiesRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the ListTerminologies service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSTranslateListTerminologiesResponse
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorInternalServer
. -
Provides a list of custom terminologies associated with your account.
See
AWSTranslateListTerminologiesRequest
See
AWSTranslateListTerminologiesResponse
Declaration
Objective-C
- (void)listTerminologies: (nonnull AWSTranslateListTerminologiesRequest *)request completionHandler: (void (^_Nullable)(AWSTranslateListTerminologiesResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func listTerminologies(_ request: AWSTranslateListTerminologiesRequest) async throws -> AWSTranslateListTerminologiesResponse
Parameters
request
A container for the necessary parameters to execute the ListTerminologies service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorInternalServer
. -
Gets a list of the batch translation jobs that you have submitted.
See
AWSTranslateListTextTranslationJobsRequest
See
AWSTranslateListTextTranslationJobsResponse
Declaration
Objective-C
- (id)listTextTranslationJobs: (nonnull AWSTranslateListTextTranslationJobsRequest *)request;
Swift
func listTextTranslationJobs(_ request: AWSTranslateListTextTranslationJobsRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the ListTextTranslationJobs service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSTranslateListTextTranslationJobsResponse
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidRequest
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorInvalidFilter
,AWSTranslateErrorInternalServer
. -
Gets a list of the batch translation jobs that you have submitted.
See
AWSTranslateListTextTranslationJobsRequest
See
AWSTranslateListTextTranslationJobsResponse
Declaration
Objective-C
- (void)listTextTranslationJobs: (nonnull AWSTranslateListTextTranslationJobsRequest *)request completionHandler: (void (^_Nullable)( AWSTranslateListTextTranslationJobsResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func listTextTranslationJobs(_ request: AWSTranslateListTextTranslationJobsRequest) async throws -> AWSTranslateListTextTranslationJobsResponse
Parameters
request
A container for the necessary parameters to execute the ListTextTranslationJobs service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidRequest
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorInvalidFilter
,AWSTranslateErrorInternalServer
. -
Starts an asynchronous batch translation job. Use batch translation jobs to translate large volumes of text across multiple documents at once. For batch translation, you can input documents with different source languages (specify
auto
as the source language). You can specify one or more target languages. Batch translation translates each input document into each of the target languages. For more information, see Asynchronous batch processing.Batch translation jobs can be described with the DescribeTextTranslationJob operation, listed with the ListTextTranslationJobs operation, and stopped with the StopTextTranslationJob operation.
See
AWSTranslateStartTextTranslationJobRequest
See
AWSTranslateStartTextTranslationJobResponse
Declaration
Objective-C
- (id)startTextTranslationJob: (nonnull AWSTranslateStartTextTranslationJobRequest *)request;
Swift
func startTextTranslationJob(_ request: AWSTranslateStartTextTranslationJobRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the StartTextTranslationJob service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSTranslateStartTextTranslationJobResponse
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorTooManyRequests
,AWSTranslateErrorUnsupportedLanguagePair
,AWSTranslateErrorInvalidRequest
,AWSTranslateErrorResourceNotFound
,AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorInternalServer
. -
Starts an asynchronous batch translation job. Use batch translation jobs to translate large volumes of text across multiple documents at once. For batch translation, you can input documents with different source languages (specify
auto
as the source language). You can specify one or more target languages. Batch translation translates each input document into each of the target languages. For more information, see Asynchronous batch processing.Batch translation jobs can be described with the DescribeTextTranslationJob operation, listed with the ListTextTranslationJobs operation, and stopped with the StopTextTranslationJob operation.
See
AWSTranslateStartTextTranslationJobRequest
See
AWSTranslateStartTextTranslationJobResponse
Declaration
Objective-C
- (void)startTextTranslationJob: (nonnull AWSTranslateStartTextTranslationJobRequest *)request completionHandler: (void (^_Nullable)( AWSTranslateStartTextTranslationJobResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func startTextTranslationJob(_ request: AWSTranslateStartTextTranslationJobRequest) async throws -> AWSTranslateStartTextTranslationJobResponse
Parameters
request
A container for the necessary parameters to execute the StartTextTranslationJob service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorTooManyRequests
,AWSTranslateErrorUnsupportedLanguagePair
,AWSTranslateErrorInvalidRequest
,AWSTranslateErrorResourceNotFound
,AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorInternalServer
. -
Stops an asynchronous batch translation job that is in progress.
If the job’s state is
IN_PROGRESS
, the job will be marked for termination and put into theSTOP_REQUESTED
state. If the job completes before it can be stopped, it is put into theCOMPLETED
state. Otherwise, the job is put into theSTOPPED
state.Asynchronous batch translation jobs are started with the StartTextTranslationJob operation. You can use the DescribeTextTranslationJob or ListTextTranslationJobs operations to get a batch translation job’s
JobId
.See
AWSTranslateStopTextTranslationJobRequest
See
AWSTranslateStopTextTranslationJobResponse
Declaration
Objective-C
- (id)stopTextTranslationJob: (nonnull AWSTranslateStopTextTranslationJobRequest *)request;
Swift
func stopTextTranslationJob(_ request: AWSTranslateStopTextTranslationJobRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the StopTextTranslationJob service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSTranslateStopTextTranslationJobResponse
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorResourceNotFound
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorInternalServer
. -
Stops an asynchronous batch translation job that is in progress.
If the job’s state is
IN_PROGRESS
, the job will be marked for termination and put into theSTOP_REQUESTED
state. If the job completes before it can be stopped, it is put into theCOMPLETED
state. Otherwise, the job is put into theSTOPPED
state.Asynchronous batch translation jobs are started with the StartTextTranslationJob operation. You can use the DescribeTextTranslationJob or ListTextTranslationJobs operations to get a batch translation job’s
JobId
.See
AWSTranslateStopTextTranslationJobRequest
See
AWSTranslateStopTextTranslationJobResponse
Declaration
Objective-C
- (void)stopTextTranslationJob: (nonnull AWSTranslateStopTextTranslationJobRequest *)request completionHandler: (void (^_Nullable)( AWSTranslateStopTextTranslationJobResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func stopTextTranslationJob(_ request: AWSTranslateStopTextTranslationJobRequest) async throws -> AWSTranslateStopTextTranslationJobResponse
Parameters
request
A container for the necessary parameters to execute the StopTextTranslationJob service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorResourceNotFound
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorInternalServer
. -
Associates a specific tag with a resource. A tag is a key-value pair that adds as a metadata to a resource. For more information, see Tagging your resources.
See
AWSTranslateTagResourceRequest
See
AWSTranslateTagResourceResponse
Declaration
Objective-C
- (id)tagResource:(nonnull AWSTranslateTagResourceRequest *)request;
Swift
func tagResource(_ request: AWSTranslateTagResourceRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the TagResource service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSTranslateTagResourceResponse
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorConcurrentModification
,AWSTranslateErrorResourceNotFound
,AWSTranslateErrorTooManyTags
,AWSTranslateErrorInternalServer
. -
Associates a specific tag with a resource. A tag is a key-value pair that adds as a metadata to a resource. For more information, see Tagging your resources.
See
AWSTranslateTagResourceRequest
See
AWSTranslateTagResourceResponse
Declaration
Objective-C
- (void)tagResource:(nonnull AWSTranslateTagResourceRequest *)request completionHandler: (void (^_Nullable)(AWSTranslateTagResourceResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func tagResource(_ request: AWSTranslateTagResourceRequest) async throws -> AWSTranslateTagResourceResponse
Parameters
request
A container for the necessary parameters to execute the TagResource service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorConcurrentModification
,AWSTranslateErrorResourceNotFound
,AWSTranslateErrorTooManyTags
,AWSTranslateErrorInternalServer
. -
Translates the input document from the source language to the target language. This synchronous operation supports plain text or HTML for the input document.
TranslateDocument
supports translations from English to any supported language, and from any supported language to English. Therefore, specify either the source language code or the target language code as “en” (English).TranslateDocument
does not support language auto-detection.If you set the
Formality
parameter, the request will fail if the target language does not support formality. For a list of target languages that support formality, see Setting formality.See
AWSTranslateTranslateDocumentRequest
See
AWSTranslateTranslateDocumentResponse
Declaration
Objective-C
- (id)translateDocument:(nonnull AWSTranslateTranslateDocumentRequest *)request;
Swift
func translateDocument(_ request: AWSTranslateTranslateDocumentRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the TranslateDocument service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSTranslateTranslateDocumentResponse
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidRequest
,AWSTranslateErrorLimitExceeded
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorResourceNotFound
,AWSTranslateErrorUnsupportedLanguagePair
,AWSTranslateErrorInternalServer
,AWSTranslateErrorServiceUnavailable
. -
Translates the input document from the source language to the target language. This synchronous operation supports plain text or HTML for the input document.
TranslateDocument
supports translations from English to any supported language, and from any supported language to English. Therefore, specify either the source language code or the target language code as “en” (English).TranslateDocument
does not support language auto-detection.If you set the
Formality
parameter, the request will fail if the target language does not support formality. For a list of target languages that support formality, see Setting formality.See
AWSTranslateTranslateDocumentRequest
See
AWSTranslateTranslateDocumentResponse
Declaration
Objective-C
- (void)translateDocument: (nonnull AWSTranslateTranslateDocumentRequest *)request completionHandler: (void (^_Nullable)(AWSTranslateTranslateDocumentResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func translateDocument(_ request: AWSTranslateTranslateDocumentRequest) async throws -> AWSTranslateTranslateDocumentResponse
Parameters
request
A container for the necessary parameters to execute the TranslateDocument service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidRequest
,AWSTranslateErrorLimitExceeded
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorResourceNotFound
,AWSTranslateErrorUnsupportedLanguagePair
,AWSTranslateErrorInternalServer
,AWSTranslateErrorServiceUnavailable
. -
Translates input text from the source language to the target language. For a list of available languages and language codes, see Supported languages.
See
AWSTranslateTranslateTextRequest
See
AWSTranslateTranslateTextResponse
Declaration
Objective-C
- (id)translateText:(nonnull AWSTranslateTranslateTextRequest *)request;
Swift
func translateText(_ request: AWSTranslateTranslateTextRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the TranslateText service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSTranslateTranslateTextResponse
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidRequest
,AWSTranslateErrorTextSizeLimitExceeded
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorUnsupportedLanguagePair
,AWSTranslateErrorDetectedLanguageLowConfidence
,AWSTranslateErrorResourceNotFound
,AWSTranslateErrorInternalServer
,AWSTranslateErrorServiceUnavailable
. -
Translates input text from the source language to the target language. For a list of available languages and language codes, see Supported languages.
See
AWSTranslateTranslateTextRequest
See
AWSTranslateTranslateTextResponse
Declaration
Objective-C
- (void)translateText:(nonnull AWSTranslateTranslateTextRequest *)request completionHandler: (void (^_Nullable)(AWSTranslateTranslateTextResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func translateText(_ request: AWSTranslateTranslateTextRequest) async throws -> AWSTranslateTranslateTextResponse
Parameters
request
A container for the necessary parameters to execute the TranslateText service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidRequest
,AWSTranslateErrorTextSizeLimitExceeded
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorUnsupportedLanguagePair
,AWSTranslateErrorDetectedLanguageLowConfidence
,AWSTranslateErrorResourceNotFound
,AWSTranslateErrorInternalServer
,AWSTranslateErrorServiceUnavailable
. -
Removes a specific tag associated with an Amazon Translate resource. For more information, see Tagging your resources.
See
AWSTranslateUntagResourceRequest
See
AWSTranslateUntagResourceResponse
Declaration
Objective-C
- (id)untagResource:(nonnull AWSTranslateUntagResourceRequest *)request;
Swift
func untagResource(_ request: AWSTranslateUntagResourceRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the UntagResource service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSTranslateUntagResourceResponse
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorConcurrentModification
,AWSTranslateErrorResourceNotFound
,AWSTranslateErrorInternalServer
. -
Removes a specific tag associated with an Amazon Translate resource. For more information, see Tagging your resources.
See
AWSTranslateUntagResourceRequest
See
AWSTranslateUntagResourceResponse
Declaration
Objective-C
- (void)untagResource:(nonnull AWSTranslateUntagResourceRequest *)request completionHandler: (void (^_Nullable)(AWSTranslateUntagResourceResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func untagResource(_ request: AWSTranslateUntagResourceRequest) async throws -> AWSTranslateUntagResourceResponse
Parameters
request
A container for the necessary parameters to execute the UntagResource service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorConcurrentModification
,AWSTranslateErrorResourceNotFound
,AWSTranslateErrorInternalServer
. -
Updates a previously created parallel data resource by importing a new input file from Amazon S3.
See
AWSTranslateUpdateParallelDataRequest
See
AWSTranslateUpdateParallelDataResponse
Declaration
Objective-C
- (id)updateParallelData: (nonnull AWSTranslateUpdateParallelDataRequest *)request;
Swift
func updateParallelData(_ request: AWSTranslateUpdateParallelDataRequest) -> Any!
Parameters
request
A container for the necessary parameters to execute the UpdateParallelData service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSTranslateUpdateParallelDataResponse
. On failed execution,task.error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorConcurrentModification
,AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorInvalidRequest
,AWSTranslateErrorLimitExceeded
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorConflict
,AWSTranslateErrorResourceNotFound
,AWSTranslateErrorInternalServer
. -
Updates a previously created parallel data resource by importing a new input file from Amazon S3.
See
AWSTranslateUpdateParallelDataRequest
See
AWSTranslateUpdateParallelDataResponse
Declaration
Objective-C
- (void) updateParallelData:(nonnull AWSTranslateUpdateParallelDataRequest *)request completionHandler: (void (^_Nullable)(AWSTranslateUpdateParallelDataResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func updateParallelData(_ request: AWSTranslateUpdateParallelDataRequest) async throws -> AWSTranslateUpdateParallelDataResponse
Parameters
request
A container for the necessary parameters to execute the UpdateParallelData service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSTranslateErrorDomain
domain and the following error code:AWSTranslateErrorConcurrentModification
,AWSTranslateErrorInvalidParameterValue
,AWSTranslateErrorInvalidRequest
,AWSTranslateErrorLimitExceeded
,AWSTranslateErrorTooManyRequests
,AWSTranslateErrorConflict
,AWSTranslateErrorResourceNotFound
,AWSTranslateErrorInternalServer
.