aws-sdk-translate 1.44.0 → 1.45.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9cdc7a0d222d37e8ec06dbf670c7ec820f6c0bb46d1cd2be50f1cf912f76802
4
- data.tar.gz: 6bd7df09084d29b58b264706d4b01370dde080632df9a21f1df4468ae213527d
3
+ metadata.gz: abd066b6c5b9dac4d629ffbbc189078b1ad429a8feca5970634bfa4df1aea81e
4
+ data.tar.gz: 0dc26a80eb1dd895d3bf5c4e1720818cf1b7cf0849527f5d41ac0572c16ff23a
5
5
  SHA512:
6
- metadata.gz: 18d2c09df89ff166bf194b84fcb51de91757592ded2419e24de43a3776b2820aea41bb5e03d334af2dd68e4236541ef7091c040b474a9060699b08c2f697929b
7
- data.tar.gz: 67ff46c300e730de503d2977336027da798d22a63cd926bafdb09a9ece7b4a954ffcc2d26462e2714b7f4ea9a0d00bd4ee60144202459cd36d2c3f1ba2d62df3
6
+ metadata.gz: 84d26f6c04e0c0193f23517a6bd6161ab896df0f9a150ed7b27157f5d2184deee3df26c9a4274a4fecfb355ee38fffbe6f9c8188ec21548baf2206e7b03bef1c
7
+ data.tar.gz: a5c833133ca4feb63679f1ee0edf21aba3967daf1af88e421ec75157190e6092c530dc5666f1e53ac2ab27e783da1b99a2f986bc37a46a74d1c763a11ab348b8
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.45.0 (2022-06-29)
5
+ ------------------
6
+
7
+ * Feature - Added ListLanguages API which can be used to list the languages supported by Translate.
8
+
4
9
  1.44.0 (2022-02-24)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.44.0
1
+ 1.45.0
@@ -595,12 +595,12 @@ module Aws::Translate
595
595
  # The data format of the custom terminology being retrieved.
596
596
  #
597
597
  # If you don't specify this parameter, Amazon Translate returns a file
598
- # that has the same format as the file that was imported to create the
598
+ # with the same format as the file that was imported to create the
599
599
  # terminology.
600
600
  #
601
601
  # If you specify this parameter when you retrieve a multi-directional
602
- # terminology resource, you must specify the same format as that of the
603
- # input file that was imported to create it. Otherwise, Amazon Translate
602
+ # terminology resource, you must specify the same format as the input
603
+ # file that was imported to create it. Otherwise, Amazon Translate
604
604
  # throws an error.
605
605
  #
606
606
  # @return [Types::GetTerminologyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
@@ -648,17 +648,16 @@ module Aws::Translate
648
648
  req.send_request(options)
649
649
  end
650
650
 
651
- # Creates or updates a custom terminology, depending on whether or not
652
- # one already exists for the given terminology name. Importing a
653
- # terminology with the same name as an existing one will merge the
654
- # terminologies based on the chosen merge strategy. Currently, the only
655
- # supported merge strategy is OVERWRITE, and so the imported terminology
656
- # will overwrite an existing terminology of the same name.
651
+ # Creates or updates a custom terminology, depending on whether one
652
+ # already exists for the given terminology name. Importing a terminology
653
+ # with the same name as an existing one will merge the terminologies
654
+ # based on the chosen merge strategy. The only supported merge strategy
655
+ # is OVERWRITE, where the imported terminology overwrites the existing
656
+ # terminology of the same name.
657
657
  #
658
658
  # If you import a terminology that overwrites an existing one, the new
659
- # terminology take up to 10 minutes to fully propagate and be available
660
- # for use in a translation due to cache policies with the DataPlane
661
- # service that performs the translations.
659
+ # terminology takes up to 10 minutes to fully propagate. After that,
660
+ # translations have access to the new terminology.
662
661
  #
663
662
  # @option params [required, String] :name
664
663
  # The name of the custom terminology being imported.
@@ -730,6 +729,53 @@ module Aws::Translate
730
729
  req.send_request(options)
731
730
  end
732
731
 
732
+ # Provides a list of languages (RFC-5646 codes and names) that Amazon
733
+ # Translate supports.
734
+ #
735
+ # @option params [String] :display_language_code
736
+ # The language code for the language to use to display the language
737
+ # names in the response. The language code is `en` by default.
738
+ #
739
+ # @option params [String] :next_token
740
+ # Include the NextToken value to fetch the next group of supported
741
+ # languages.
742
+ #
743
+ # @option params [Integer] :max_results
744
+ # The maximum number of results to return in each response.
745
+ #
746
+ # @return [Types::ListLanguagesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
747
+ #
748
+ # * {Types::ListLanguagesResponse#languages #languages} => Array<Types::Language>
749
+ # * {Types::ListLanguagesResponse#display_language_code #display_language_code} => String
750
+ # * {Types::ListLanguagesResponse#next_token #next_token} => String
751
+ #
752
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
753
+ #
754
+ # @example Request syntax with placeholder values
755
+ #
756
+ # resp = client.list_languages({
757
+ # display_language_code: "de", # accepts de, en, es, fr, it, ja, ko, pt, zh, zh-TW
758
+ # next_token: "NextToken",
759
+ # max_results: 1,
760
+ # })
761
+ #
762
+ # @example Response structure
763
+ #
764
+ # resp.languages #=> Array
765
+ # resp.languages[0].language_name #=> String
766
+ # resp.languages[0].language_code #=> String
767
+ # resp.display_language_code #=> String, one of "de", "en", "es", "fr", "it", "ja", "ko", "pt", "zh", "zh-TW"
768
+ # resp.next_token #=> String
769
+ #
770
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListLanguages AWS API Documentation
771
+ #
772
+ # @overload list_languages(params = {})
773
+ # @param [Hash] params ({})
774
+ def list_languages(params = {}, options = {})
775
+ req = build_request(:list_languages, params)
776
+ req.send_request(options)
777
+ end
778
+
733
779
  # Provides a list of your parallel data resources in Amazon Translate.
734
780
  #
735
781
  # @option params [String] :next_token
@@ -931,7 +977,7 @@ module Aws::Translate
931
977
  # The name of the batch translation job to be performed.
932
978
  #
933
979
  # @option params [required, Types::InputDataConfig] :input_data_config
934
- # Specifies the format and S3 location of the input documents for the
980
+ # Specifies the format and location of the input documents for the
935
981
  # translation job.
936
982
  #
937
983
  # @option params [required, Types::OutputDataConfig] :output_data_config
@@ -988,15 +1034,16 @@ module Aws::Translate
988
1034
  # [1]: http://aws.amazon.com/translate/pricing/
989
1035
  #
990
1036
  # @option params [required, String] :client_token
991
- # A unique identifier for the request. This token is auto-generated when
992
- # using the Amazon Translate SDK.
1037
+ # A unique identifier for the request. This token is generated for you
1038
+ # when using the Amazon Translate SDK.
993
1039
  #
994
1040
  # **A suitable default value is auto-generated.** You should normally
995
1041
  # not need to pass this option.**
996
1042
  #
997
1043
  # @option params [Types::TranslationSettings] :settings
998
1044
  # Settings to configure your translation output, including the option to
999
- # mask profane words and phrases.
1045
+ # mask profane words and phrases. `StartTextTranslationJob` does not
1046
+ # support the formality setting.
1000
1047
  #
1001
1048
  # @return [Types::StartTextTranslationJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1002
1049
  #
@@ -1108,6 +1155,12 @@ module Aws::Translate
1108
1155
  # specify `auto`, Amazon Translate will call [Amazon Comprehend][1] to
1109
1156
  # determine the source language.
1110
1157
  #
1158
+ # <note markdown="1"> If you specify `auto`, you must send the `TranslateText` request in a
1159
+ # region that supports Amazon Comprehend. Otherwise, the request returns
1160
+ # an error indicating that autodetect is not supported.
1161
+ #
1162
+ # </note>
1163
+ #
1111
1164
  #
1112
1165
  #
1113
1166
  # [1]: https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html
@@ -1118,7 +1171,8 @@ module Aws::Translate
1118
1171
  #
1119
1172
  # @option params [Types::TranslationSettings] :settings
1120
1173
  # Settings to configure your translation output, including the option to
1121
- # mask profane words and phrases.
1174
+ # set the formality level of the output text and the option to mask
1175
+ # profane words and phrases.
1122
1176
  #
1123
1177
  # @return [Types::TranslateTextResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1124
1178
  #
@@ -1231,7 +1285,7 @@ module Aws::Translate
1231
1285
  params: params,
1232
1286
  config: config)
1233
1287
  context[:gem_name] = 'aws-sdk-translate'
1234
- context[:gem_version] = '1.44.0'
1288
+ context[:gem_version] = '1.45.0'
1235
1289
  Seahorse::Client::Request.new(handlers, context)
1236
1290
  end
1237
1291
 
@@ -30,6 +30,7 @@ module Aws::Translate
30
30
  Description = Shapes::StringShape.new(name: 'Description')
31
31
  DetectedLanguageLowConfidenceException = Shapes::StructureShape.new(name: 'DetectedLanguageLowConfidenceException')
32
32
  Directionality = Shapes::StringShape.new(name: 'Directionality')
33
+ DisplayLanguageCode = Shapes::StringShape.new(name: 'DisplayLanguageCode')
33
34
  EncryptionKey = Shapes::StructureShape.new(name: 'EncryptionKey')
34
35
  EncryptionKeyID = Shapes::StringShape.new(name: 'EncryptionKeyID')
35
36
  EncryptionKeyType = Shapes::StringShape.new(name: 'EncryptionKeyType')
@@ -51,15 +52,20 @@ module Aws::Translate
51
52
  JobId = Shapes::StringShape.new(name: 'JobId')
52
53
  JobName = Shapes::StringShape.new(name: 'JobName')
53
54
  JobStatus = Shapes::StringShape.new(name: 'JobStatus')
55
+ Language = Shapes::StructureShape.new(name: 'Language')
54
56
  LanguageCodeString = Shapes::StringShape.new(name: 'LanguageCodeString')
55
57
  LanguageCodeStringList = Shapes::ListShape.new(name: 'LanguageCodeStringList')
58
+ LanguagesList = Shapes::ListShape.new(name: 'LanguagesList')
56
59
  LimitExceededException = Shapes::StructureShape.new(name: 'LimitExceededException')
60
+ ListLanguagesRequest = Shapes::StructureShape.new(name: 'ListLanguagesRequest')
61
+ ListLanguagesResponse = Shapes::StructureShape.new(name: 'ListLanguagesResponse')
57
62
  ListParallelDataRequest = Shapes::StructureShape.new(name: 'ListParallelDataRequest')
58
63
  ListParallelDataResponse = Shapes::StructureShape.new(name: 'ListParallelDataResponse')
59
64
  ListTerminologiesRequest = Shapes::StructureShape.new(name: 'ListTerminologiesRequest')
60
65
  ListTerminologiesResponse = Shapes::StructureShape.new(name: 'ListTerminologiesResponse')
61
66
  ListTextTranslationJobsRequest = Shapes::StructureShape.new(name: 'ListTextTranslationJobsRequest')
62
67
  ListTextTranslationJobsResponse = Shapes::StructureShape.new(name: 'ListTextTranslationJobsResponse')
68
+ LocalizedNameString = Shapes::StringShape.new(name: 'LocalizedNameString')
63
69
  Long = Shapes::IntegerShape.new(name: 'Long')
64
70
  MaxResultsInteger = Shapes::IntegerShape.new(name: 'MaxResultsInteger')
65
71
  MergeStrategy = Shapes::StringShape.new(name: 'MergeStrategy')
@@ -103,6 +109,7 @@ module Aws::Translate
103
109
  TranslateTextResponse = Shapes::StructureShape.new(name: 'TranslateTextResponse')
104
110
  TranslationSettings = Shapes::StructureShape.new(name: 'TranslationSettings')
105
111
  UnboundedLengthString = Shapes::StringShape.new(name: 'UnboundedLengthString')
112
+ UnsupportedDisplayLanguageCodeException = Shapes::StructureShape.new(name: 'UnsupportedDisplayLanguageCodeException')
106
113
  UnsupportedLanguagePairException = Shapes::StructureShape.new(name: 'UnsupportedLanguagePairException')
107
114
  UpdateParallelDataRequest = Shapes::StructureShape.new(name: 'UpdateParallelDataRequest')
108
115
  UpdateParallelDataResponse = Shapes::StructureShape.new(name: 'UpdateParallelDataResponse')
@@ -204,11 +211,27 @@ module Aws::Translate
204
211
  JobDetails.add_member(:input_documents_count, Shapes::ShapeRef.new(shape: Integer, location_name: "InputDocumentsCount"))
205
212
  JobDetails.struct_class = Types::JobDetails
206
213
 
214
+ Language.add_member(:language_name, Shapes::ShapeRef.new(shape: LocalizedNameString, required: true, location_name: "LanguageName"))
215
+ Language.add_member(:language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, required: true, location_name: "LanguageCode"))
216
+ Language.struct_class = Types::Language
217
+
207
218
  LanguageCodeStringList.member = Shapes::ShapeRef.new(shape: LanguageCodeString)
208
219
 
220
+ LanguagesList.member = Shapes::ShapeRef.new(shape: Language)
221
+
209
222
  LimitExceededException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
210
223
  LimitExceededException.struct_class = Types::LimitExceededException
211
224
 
225
+ ListLanguagesRequest.add_member(:display_language_code, Shapes::ShapeRef.new(shape: DisplayLanguageCode, location_name: "DisplayLanguageCode"))
226
+ ListLanguagesRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
227
+ ListLanguagesRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResultsInteger, location_name: "MaxResults"))
228
+ ListLanguagesRequest.struct_class = Types::ListLanguagesRequest
229
+
230
+ ListLanguagesResponse.add_member(:languages, Shapes::ShapeRef.new(shape: LanguagesList, location_name: "Languages"))
231
+ ListLanguagesResponse.add_member(:display_language_code, Shapes::ShapeRef.new(shape: DisplayLanguageCode, location_name: "DisplayLanguageCode"))
232
+ ListLanguagesResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
233
+ ListLanguagesResponse.struct_class = Types::ListLanguagesResponse
234
+
212
235
  ListParallelDataRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
213
236
  ListParallelDataRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResultsInteger, location_name: "MaxResults"))
214
237
  ListParallelDataRequest.struct_class = Types::ListParallelDataRequest
@@ -382,6 +405,10 @@ module Aws::Translate
382
405
  TranslationSettings.add_member(:profanity, Shapes::ShapeRef.new(shape: Profanity, location_name: "Profanity"))
383
406
  TranslationSettings.struct_class = Types::TranslationSettings
384
407
 
408
+ UnsupportedDisplayLanguageCodeException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
409
+ UnsupportedDisplayLanguageCodeException.add_member(:display_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, location_name: "DisplayLanguageCode"))
410
+ UnsupportedDisplayLanguageCodeException.struct_class = Types::UnsupportedDisplayLanguageCodeException
411
+
385
412
  UnsupportedLanguagePairException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
386
413
  UnsupportedLanguagePairException.add_member(:source_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, location_name: "SourceLanguageCode"))
387
414
  UnsupportedLanguagePairException.add_member(:target_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, location_name: "TargetLanguageCode"))
@@ -503,6 +530,24 @@ module Aws::Translate
503
530
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
504
531
  end)
505
532
 
533
+ api.add_operation(:list_languages, Seahorse::Model::Operation.new.tap do |o|
534
+ o.name = "ListLanguages"
535
+ o.http_method = "POST"
536
+ o.http_request_uri = "/"
537
+ o.input = Shapes::ShapeRef.new(shape: ListLanguagesRequest)
538
+ o.output = Shapes::ShapeRef.new(shape: ListLanguagesResponse)
539
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterValueException)
540
+ o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
541
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedDisplayLanguageCodeException)
542
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
543
+ o[:pager] = Aws::Pager.new(
544
+ limit_key: "max_results",
545
+ tokens: {
546
+ "next_token" => "next_token"
547
+ }
548
+ )
549
+ end)
550
+
506
551
  api.add_operation(:list_parallel_data, Seahorse::Model::Operation.new.tap do |o|
507
552
  o.name = "ListParallelData"
508
553
  o.http_method = "POST"
@@ -39,6 +39,7 @@ module Aws::Translate
39
39
  # * {ServiceUnavailableException}
40
40
  # * {TextSizeLimitExceededException}
41
41
  # * {TooManyRequestsException}
42
+ # * {UnsupportedDisplayLanguageCodeException}
42
43
  # * {UnsupportedLanguagePairException}
43
44
  #
44
45
  # Additionally, error classes are dynamically generated for service errors based on the error code
@@ -232,6 +233,26 @@ module Aws::Translate
232
233
  end
233
234
  end
234
235
 
236
+ class UnsupportedDisplayLanguageCodeException < ServiceError
237
+
238
+ # @param [Seahorse::Client::RequestContext] context
239
+ # @param [String] message
240
+ # @param [Aws::Translate::Types::UnsupportedDisplayLanguageCodeException] data
241
+ def initialize(context, message, data = Aws::EmptyStructure.new)
242
+ super(context, message, data)
243
+ end
244
+
245
+ # @return [String]
246
+ def message
247
+ @message || @data[:message]
248
+ end
249
+
250
+ # @return [String]
251
+ def display_language_code
252
+ @data[:display_language_code]
253
+ end
254
+ end
255
+
235
256
  class UnsupportedLanguagePairException < ServiceError
236
257
 
237
258
  # @param [Seahorse::Client::RequestContext] context
@@ -311,7 +311,7 @@ module Aws::Translate
311
311
  # @!attribute [rw] data_location
312
312
  # The Amazon S3 location of the most recent parallel data input file
313
313
  # that was successfully imported into Amazon Translate. The location
314
- # is returned as a presigned URL that has a 30 minute expiration.
314
+ # is returned as a presigned URL that has a 30-minute expiration.
315
315
  #
316
316
  # Amazon Translate doesn't scan all input files for the risk of CSV
317
317
  # injection attacks.
@@ -331,7 +331,7 @@ module Aws::Translate
331
331
  # warnings that were produced by your input file. This file was
332
332
  # created when Amazon Translate attempted to create a parallel data
333
333
  # resource. The location is returned as a presigned URL to that has a
334
- # 30 minute expiration.
334
+ # 30-minute expiration.
335
335
  # @return [Types::ParallelDataDataLocation]
336
336
  #
337
337
  # @!attribute [rw] latest_update_attempt_auxiliary_data_location
@@ -339,7 +339,7 @@ module Aws::Translate
339
339
  # warnings that were produced by your input file. This file was
340
340
  # created when Amazon Translate attempted to update a parallel data
341
341
  # resource. The location is returned as a presigned URL to that has a
342
- # 30 minute expiration.
342
+ # 30-minute expiration.
343
343
  # @return [Types::ParallelDataDataLocation]
344
344
  #
345
345
  # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/GetParallelDataResponse AWS API Documentation
@@ -369,13 +369,13 @@ module Aws::Translate
369
369
  # The data format of the custom terminology being retrieved.
370
370
  #
371
371
  # If you don't specify this parameter, Amazon Translate returns a
372
- # file that has the same format as the file that was imported to
373
- # create the terminology.
372
+ # file with the same format as the file that was imported to create
373
+ # the terminology.
374
374
  #
375
375
  # If you specify this parameter when you retrieve a multi-directional
376
- # terminology resource, you must specify the same format as that of
377
- # the input file that was imported to create it. Otherwise, Amazon
378
- # Translate throws an error.
376
+ # terminology resource, you must specify the same format as the input
377
+ # file that was imported to create it. Otherwise, Amazon Translate
378
+ # throws an error.
379
379
  # @return [String]
380
380
  #
381
381
  # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/GetTerminologyRequest AWS API Documentation
@@ -394,7 +394,7 @@ module Aws::Translate
394
394
  # @!attribute [rw] terminology_data_location
395
395
  # The Amazon S3 location of the most recent custom terminology input
396
396
  # file that was successfully imported into Amazon Translate. The
397
- # location is returned as a presigned URL that has a 30 minute
397
+ # location is returned as a presigned URL that has a 30-minute
398
398
  # expiration.
399
399
  #
400
400
  # Amazon Translate doesn't scan all input files for the risk of CSV
@@ -415,7 +415,7 @@ module Aws::Translate
415
415
  # warnings that were produced by your input file. This file was
416
416
  # created when Amazon Translate attempted to create a terminology
417
417
  # resource. The location is returned as a presigned URL to that has a
418
- # 30 minute expiration.
418
+ # 30-minute expiration.
419
419
  # @return [Types::TerminologyDataLocation]
420
420
  #
421
421
  # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/GetTerminologyResponse AWS API Documentation
@@ -514,9 +514,18 @@ module Aws::Translate
514
514
  # }
515
515
  #
516
516
  # @!attribute [rw] s3_uri
517
- # The URI of the AWS S3 folder that contains the input file. The
518
- # folder must be in the same Region as the API endpoint you are
519
- # calling.
517
+ # The URI of the AWS S3 folder that contains the input files. Amazon
518
+ # Translate translates all the files in the folder. The folder must be
519
+ # in the same Region as the API endpoint you are calling.
520
+ #
521
+ # <note markdown="1"> The URI can also point to a single input document, or it can provide
522
+ # the prefix for a collection of input documents. For example. if you
523
+ # use the URI `S3://bucketName/prefix` and the prefix is a single
524
+ # file, Amazon Translate uses that files as input. If more than one
525
+ # file begins with the prefix, Amazon Translate uses all of them as
526
+ # input.
527
+ #
528
+ # </note>
520
529
  # @return [String]
521
530
  #
522
531
  # @!attribute [rw] content_type
@@ -576,8 +585,8 @@ module Aws::Translate
576
585
  include Aws::Structure
577
586
  end
578
587
 
579
- # The filter specified for the operation is invalid. Specify a different
580
- # filter.
588
+ # The filter specified for the operation is not valid. Specify a
589
+ # different filter.
581
590
  #
582
591
  # @!attribute [rw] message
583
592
  # @return [String]
@@ -590,7 +599,7 @@ module Aws::Translate
590
599
  include Aws::Structure
591
600
  end
592
601
 
593
- # The value of the parameter is invalid. Review the value of the
602
+ # The value of the parameter is not valid. Review the value of the
594
603
  # parameter you are using to correct it, and then retry your operation.
595
604
  #
596
605
  # @!attribute [rw] message
@@ -604,8 +613,8 @@ module Aws::Translate
604
613
  include Aws::Structure
605
614
  end
606
615
 
607
- # The request that you made is invalid. Check your request to determine
608
- # why it's invalid and then retry the request.
616
+ # The request that you made is not valid. Check your request to
617
+ # determine why it's not valid and then retry the request.
609
618
  #
610
619
  # @!attribute [rw] message
611
620
  # @return [String]
@@ -645,6 +654,25 @@ module Aws::Translate
645
654
  include Aws::Structure
646
655
  end
647
656
 
657
+ # A supported language.
658
+ #
659
+ # @!attribute [rw] language_name
660
+ # Language name of the supported language.
661
+ # @return [String]
662
+ #
663
+ # @!attribute [rw] language_code
664
+ # Language code for the supported language.
665
+ # @return [String]
666
+ #
667
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/Language AWS API Documentation
668
+ #
669
+ class Language < Struct.new(
670
+ :language_name,
671
+ :language_code)
672
+ SENSITIVE = []
673
+ include Aws::Structure
674
+ end
675
+
648
676
  # The specified limit has been exceeded. Review your request and retry
649
677
  # it with a quantity below the stated limit.
650
678
  #
@@ -659,6 +687,63 @@ module Aws::Translate
659
687
  include Aws::Structure
660
688
  end
661
689
 
690
+ # @note When making an API call, you may pass ListLanguagesRequest
691
+ # data as a hash:
692
+ #
693
+ # {
694
+ # display_language_code: "de", # accepts de, en, es, fr, it, ja, ko, pt, zh, zh-TW
695
+ # next_token: "NextToken",
696
+ # max_results: 1,
697
+ # }
698
+ #
699
+ # @!attribute [rw] display_language_code
700
+ # The language code for the language to use to display the language
701
+ # names in the response. The language code is `en` by default.
702
+ # @return [String]
703
+ #
704
+ # @!attribute [rw] next_token
705
+ # Include the NextToken value to fetch the next group of supported
706
+ # languages.
707
+ # @return [String]
708
+ #
709
+ # @!attribute [rw] max_results
710
+ # The maximum number of results to return in each response.
711
+ # @return [Integer]
712
+ #
713
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListLanguagesRequest AWS API Documentation
714
+ #
715
+ class ListLanguagesRequest < Struct.new(
716
+ :display_language_code,
717
+ :next_token,
718
+ :max_results)
719
+ SENSITIVE = []
720
+ include Aws::Structure
721
+ end
722
+
723
+ # @!attribute [rw] languages
724
+ # The list of supported languages.
725
+ # @return [Array<Types::Language>]
726
+ #
727
+ # @!attribute [rw] display_language_code
728
+ # The language code passed in with the request.
729
+ # @return [String]
730
+ #
731
+ # @!attribute [rw] next_token
732
+ # If the response does not include all remaining results, use the
733
+ # NextToken in the next request to fetch the next group of supported
734
+ # languages.
735
+ # @return [String]
736
+ #
737
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListLanguagesResponse AWS API Documentation
738
+ #
739
+ class ListLanguagesResponse < Struct.new(
740
+ :languages,
741
+ :display_language_code,
742
+ :next_token)
743
+ SENSITIVE = []
744
+ include Aws::Structure
745
+ end
746
+
662
747
  # @note When making an API call, you may pass ListParallelDataRequest
663
748
  # data as a hash:
664
749
  #
@@ -880,7 +965,7 @@ module Aws::Translate
880
965
  #
881
966
  # @!attribute [rw] location
882
967
  # The Amazon S3 location of the parallel data input file. The location
883
- # is returned as a presigned URL to that has a 30 minute expiration.
968
+ # is returned as a presigned URL to that has a 30-minute expiration.
884
969
  #
885
970
  # Amazon Translate doesn't scan all input files for the risk of CSV
886
971
  # injection attacks.
@@ -1029,8 +1114,8 @@ module Aws::Translate
1029
1114
  include Aws::Structure
1030
1115
  end
1031
1116
 
1032
- # The Amazon Translate service is temporarily unavailable. Please wait a
1033
- # bit and then retry your request.
1117
+ # The Amazon Translate service is temporarily unavailable. Wait a bit
1118
+ # and then retry your request.
1034
1119
  #
1035
1120
  # @!attribute [rw] message
1036
1121
  # @return [String]
@@ -1076,7 +1161,7 @@ module Aws::Translate
1076
1161
  # @return [String]
1077
1162
  #
1078
1163
  # @!attribute [rw] input_data_config
1079
- # Specifies the format and S3 location of the input documents for the
1164
+ # Specifies the format and location of the input documents for the
1080
1165
  # translation job.
1081
1166
  # @return [Types::InputDataConfig]
1082
1167
  #
@@ -1141,7 +1226,7 @@ module Aws::Translate
1141
1226
  # @return [Array<String>]
1142
1227
  #
1143
1228
  # @!attribute [rw] client_token
1144
- # A unique identifier for the request. This token is auto-generated
1229
+ # A unique identifier for the request. This token is generated for you
1145
1230
  # when using the Amazon Translate SDK.
1146
1231
  #
1147
1232
  # **A suitable default value is auto-generated.** You should normally
@@ -1150,7 +1235,8 @@ module Aws::Translate
1150
1235
  #
1151
1236
  # @!attribute [rw] settings
1152
1237
  # Settings to configure your translation output, including the option
1153
- # to mask profane words and phrases.
1238
+ # to mask profane words and phrases. `StartTextTranslationJob` does
1239
+ # not support the formality setting.
1154
1240
  # @return [Types::TranslationSettings]
1155
1241
  #
1156
1242
  # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StartTextTranslationJobRequest AWS API Documentation
@@ -1265,7 +1351,12 @@ module Aws::Translate
1265
1351
  include Aws::Structure
1266
1352
  end
1267
1353
 
1268
- # The data associated with the custom terminology.
1354
+ # The data associated with the custom terminology. For information about
1355
+ # the custom terminology file, see [ Creating a Custom Terminology][1].
1356
+ #
1357
+ #
1358
+ #
1359
+ # [1]: https://docs.aws.amazon.com/translate/latest/dg/creating-custom-terminology.html
1269
1360
  #
1270
1361
  # @note When making an API call, you may pass TerminologyData
1271
1362
  # data as a hash:
@@ -1303,9 +1394,9 @@ module Aws::Translate
1303
1394
  # : Any language in the terminology resource can be the source
1304
1395
  # language or a target language. A single multi-directional
1305
1396
  # terminology resource can be used for jobs that translate different
1306
- # language pairs. For example, if the terminology contains terms in
1307
- # English and Spanish, then it can be used for jobs that translate
1308
- # English to Spanish and jobs that translate Spanish to English.
1397
+ # language pairs. For example, if the terminology contains English
1398
+ # and Spanish terms, it can be used for jobs that translate English
1399
+ # to Spanish and Spanish to English.
1309
1400
  #
1310
1401
  # When you create a custom terminology resource without specifying the
1311
1402
  # directionality, it behaves as uni-directional terminology, although
@@ -1331,8 +1422,8 @@ module Aws::Translate
1331
1422
  # @!attribute [rw] location
1332
1423
  # The Amazon S3 location of the most recent custom terminology input
1333
1424
  # file that was successfully imported into Amazon Translate. The
1334
- # location is returned as a presigned URL that has a 30 minute
1335
- # expiration.
1425
+ # location is returned as a presigned URL that has a 30-minute
1426
+ # expiration .
1336
1427
  #
1337
1428
  # Amazon Translate doesn't scan all input files for the risk of CSV
1338
1429
  # injection attacks.
@@ -1662,6 +1753,12 @@ module Aws::Translate
1662
1753
  # specify `auto`, Amazon Translate will call [Amazon Comprehend][1] to
1663
1754
  # determine the source language.
1664
1755
  #
1756
+ # <note markdown="1"> If you specify `auto`, you must send the `TranslateText` request in
1757
+ # a region that supports Amazon Comprehend. Otherwise, the request
1758
+ # returns an error indicating that autodetect is not supported.
1759
+ #
1760
+ # </note>
1761
+ #
1665
1762
  #
1666
1763
  #
1667
1764
  # [1]: https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html
@@ -1674,7 +1771,8 @@ module Aws::Translate
1674
1771
  #
1675
1772
  # @!attribute [rw] settings
1676
1773
  # Settings to configure your translation output, including the option
1677
- # to mask profane words and phrases.
1774
+ # to set the formality level of the output text and the option to mask
1775
+ # profane words and phrases.
1678
1776
  # @return [Types::TranslationSettings]
1679
1777
  #
1680
1778
  # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TranslateTextRequest AWS API Documentation
@@ -1733,6 +1831,26 @@ module Aws::Translate
1733
1831
  # }
1734
1832
  #
1735
1833
  # @!attribute [rw] formality
1834
+ # You can optionally specify the desired level of formality for
1835
+ # real-time translations to supported target languages. The formality
1836
+ # setting controls the level of formal language usage (also known as
1837
+ # [register][1]) in the translation output. You can set the value to
1838
+ # informal or formal. If you don't specify a value for formality, or
1839
+ # if the target language doesn't support formality, the translation
1840
+ # will ignore the formality setting.
1841
+ #
1842
+ # Note that asynchronous translation jobs don't support formality. If
1843
+ # you provide a value for formality, the `StartTextTranslationJob` API
1844
+ # throws an exception (InvalidRequestException).
1845
+ #
1846
+ # For target languages that support formality, see [Supported
1847
+ # Languages and Language Codes in the Amazon Translate Developer
1848
+ # Guide][2].
1849
+ #
1850
+ #
1851
+ #
1852
+ # [1]: https://en.wikipedia.org/wiki/Register_(sociolinguistics)
1853
+ # [2]: https://docs.aws.amazon.com/translate/latest/dg/what-is.html
1736
1854
  # @return [String]
1737
1855
  #
1738
1856
  # @!attribute [rw] profanity
@@ -1744,14 +1862,14 @@ module Aws::Translate
1744
1862
  # for each profane word or phrase, regardless of the length or number
1745
1863
  # of words.
1746
1864
  #
1747
- # Amazon Translate does not detect profanity in all of its supported
1865
+ # Amazon Translate doesn't detect profanity in all of its supported
1748
1866
  # languages. For languages that support profanity detection, see
1749
1867
  # [Supported Languages and Language Codes in the Amazon Translate
1750
1868
  # Developer Guide][1].
1751
1869
  #
1752
1870
  #
1753
1871
  #
1754
- # [1]: https://docs.aws.amazon.com/translate/latest/dg/what-is.html#what-is-languages
1872
+ # [1]: https://docs.aws.amazon.com/translate/latest/dg/what-is.html
1755
1873
  # @return [String]
1756
1874
  #
1757
1875
  # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TranslationSettings AWS API Documentation
@@ -1763,6 +1881,24 @@ module Aws::Translate
1763
1881
  include Aws::Structure
1764
1882
  end
1765
1883
 
1884
+ # Requested display language code is not supported.
1885
+ #
1886
+ # @!attribute [rw] message
1887
+ # @return [String]
1888
+ #
1889
+ # @!attribute [rw] display_language_code
1890
+ # Language code passed in with the request.
1891
+ # @return [String]
1892
+ #
1893
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/UnsupportedDisplayLanguageCodeException AWS API Documentation
1894
+ #
1895
+ class UnsupportedDisplayLanguageCodeException < Struct.new(
1896
+ :message,
1897
+ :display_language_code)
1898
+ SENSITIVE = []
1899
+ include Aws::Structure
1900
+ end
1901
+
1766
1902
  # Amazon Translate does not support translation from the language of the
1767
1903
  # source text into the requested target language. For more information,
1768
1904
  # see how-to-error-msg.
@@ -48,6 +48,6 @@ require_relative 'aws-sdk-translate/customizations'
48
48
  # @!group service
49
49
  module Aws::Translate
50
50
 
51
- GEM_VERSION = '1.44.0'
51
+ GEM_VERSION = '1.45.0'
52
52
 
53
53
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-translate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.44.0
4
+ version: 1.45.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-24 00:00:00.000000000 Z
11
+ date: 2022-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core