aws-sdk-translate 1.38.0 → 1.42.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-translate/client.rb +34 -3
- data/lib/aws-sdk-translate/client_api.rb +9 -0
- data/lib/aws-sdk-translate/types.rb +111 -19
- data/lib/aws-sdk-translate.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbccaa5325a7a60643eccd5b4eabf0891c06df99218dcc7191e3fbe97187d676
|
4
|
+
data.tar.gz: 6dc19563254ffc0d8a21aa57b7e60cd8281e94b8e017c7f6a17eabd8f73c3dfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b88054715b10c07e9cc7fa8f4eecc056ca64310b8eee914f00c8b135f2a2f5fe97742cf18466ff09da7bd5e87d9213a420e202f4a89c845b60ff4233ed0fbf60
|
7
|
+
data.tar.gz: a8ac4364655e9945b2a62484442050959fd6728dc2766ecb3f6da751573b9e00d0122c274fc79de1985a68557df96271b37725f2cf33f22cd7c84435d18804dd
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,26 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.42.0 (2022-02-03)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
8
|
+
|
9
|
+
1.41.0 (2021-12-21)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
13
|
+
|
14
|
+
1.40.0 (2021-11-30)
|
15
|
+
------------------
|
16
|
+
|
17
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
18
|
+
|
19
|
+
1.39.0 (2021-11-24)
|
20
|
+
------------------
|
21
|
+
|
22
|
+
* Feature - This release enables customers to use translation settings to mask profane words and phrases in their translation output.
|
23
|
+
|
4
24
|
1.38.0 (2021-11-11)
|
5
25
|
------------------
|
6
26
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.42.0
|
@@ -27,6 +27,8 @@ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
|
27
27
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
28
28
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
29
29
|
require 'aws-sdk-core/plugins/http_checksum.rb'
|
30
|
+
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
31
|
+
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
30
32
|
require 'aws-sdk-core/plugins/signature_v4.rb'
|
31
33
|
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
32
34
|
|
@@ -73,6 +75,8 @@ module Aws::Translate
|
|
73
75
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
74
76
|
add_plugin(Aws::Plugins::TransferEncoding)
|
75
77
|
add_plugin(Aws::Plugins::HttpChecksum)
|
78
|
+
add_plugin(Aws::Plugins::DefaultsMode)
|
79
|
+
add_plugin(Aws::Plugins::RecursionDetection)
|
76
80
|
add_plugin(Aws::Plugins::SignatureV4)
|
77
81
|
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
78
82
|
|
@@ -119,7 +123,9 @@ module Aws::Translate
|
|
119
123
|
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
120
124
|
# are very aggressive. Construct and pass an instance of
|
121
125
|
# `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
|
122
|
-
# enable retries and extended timeouts.
|
126
|
+
# enable retries and extended timeouts. Instance profile credential
|
127
|
+
# fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
|
128
|
+
# to true.
|
123
129
|
#
|
124
130
|
# @option options [required, String] :region
|
125
131
|
# The AWS region to connect to. The configured `:region` is
|
@@ -173,6 +179,10 @@ module Aws::Translate
|
|
173
179
|
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
174
180
|
# a clock skew correction and retry requests with skewed client clocks.
|
175
181
|
#
|
182
|
+
# @option options [String] :defaults_mode ("legacy")
|
183
|
+
# See {Aws::DefaultsModeConfiguration} for a list of the
|
184
|
+
# accepted modes and the configuration defaults that are included.
|
185
|
+
#
|
176
186
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
177
187
|
# Set to true to disable SDK automatically adding host prefix
|
178
188
|
# to default service endpoint when available.
|
@@ -305,7 +315,7 @@ module Aws::Translate
|
|
305
315
|
# seconds to wait when opening a HTTP session before raising a
|
306
316
|
# `Timeout::Error`.
|
307
317
|
#
|
308
|
-
# @option options [
|
318
|
+
# @option options [Float] :http_read_timeout (60) The default
|
309
319
|
# number of seconds to wait for response data. This value can
|
310
320
|
# safely be set per-request on the session.
|
311
321
|
#
|
@@ -321,6 +331,9 @@ module Aws::Translate
|
|
321
331
|
# disables this behaviour. This value can safely be set per
|
322
332
|
# request on the session.
|
323
333
|
#
|
334
|
+
# @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
|
335
|
+
# in seconds.
|
336
|
+
#
|
324
337
|
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
325
338
|
# HTTP debug output will be sent to the `:logger`.
|
326
339
|
#
|
@@ -503,6 +516,7 @@ module Aws::Translate
|
|
503
516
|
# resp.text_translation_job_properties.output_data_config.encryption_key.type #=> String, one of "KMS"
|
504
517
|
# resp.text_translation_job_properties.output_data_config.encryption_key.id #=> String
|
505
518
|
# resp.text_translation_job_properties.data_access_role_arn #=> String
|
519
|
+
# resp.text_translation_job_properties.settings.profanity #=> String, one of "MASK"
|
506
520
|
#
|
507
521
|
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/DescribeTextTranslationJob AWS API Documentation
|
508
522
|
#
|
@@ -883,6 +897,7 @@ module Aws::Translate
|
|
883
897
|
# resp.text_translation_job_properties_list[0].output_data_config.encryption_key.type #=> String, one of "KMS"
|
884
898
|
# resp.text_translation_job_properties_list[0].output_data_config.encryption_key.id #=> String
|
885
899
|
# resp.text_translation_job_properties_list[0].data_access_role_arn #=> String
|
900
|
+
# resp.text_translation_job_properties_list[0].settings.profanity #=> String, one of "MASK"
|
886
901
|
# resp.next_token #=> String
|
887
902
|
#
|
888
903
|
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListTextTranslationJobs AWS API Documentation
|
@@ -975,6 +990,10 @@ module Aws::Translate
|
|
975
990
|
# **A suitable default value is auto-generated.** You should normally
|
976
991
|
# not need to pass this option.**
|
977
992
|
#
|
993
|
+
# @option params [Types::TranslationSettings] :settings
|
994
|
+
# Settings to configure your translation output, including the option to
|
995
|
+
# mask profane words and phrases.
|
996
|
+
#
|
978
997
|
# @return [Types::StartTextTranslationJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
979
998
|
#
|
980
999
|
# * {Types::StartTextTranslationJobResponse#job_id #job_id} => String
|
@@ -1001,6 +1020,9 @@ module Aws::Translate
|
|
1001
1020
|
# terminology_names: ["ResourceName"],
|
1002
1021
|
# parallel_data_names: ["ResourceName"],
|
1003
1022
|
# client_token: "ClientTokenString", # required
|
1023
|
+
# settings: {
|
1024
|
+
# profanity: "MASK", # accepts MASK
|
1025
|
+
# },
|
1004
1026
|
# })
|
1005
1027
|
#
|
1006
1028
|
# @example Response structure
|
@@ -1089,12 +1111,17 @@ module Aws::Translate
|
|
1089
1111
|
# The language code requested for the language of the target text. The
|
1090
1112
|
# language must be a language supported by Amazon Translate.
|
1091
1113
|
#
|
1114
|
+
# @option params [Types::TranslationSettings] :settings
|
1115
|
+
# Settings to configure your translation output, including the option to
|
1116
|
+
# mask profane words and phrases.
|
1117
|
+
#
|
1092
1118
|
# @return [Types::TranslateTextResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1093
1119
|
#
|
1094
1120
|
# * {Types::TranslateTextResponse#translated_text #translated_text} => String
|
1095
1121
|
# * {Types::TranslateTextResponse#source_language_code #source_language_code} => String
|
1096
1122
|
# * {Types::TranslateTextResponse#target_language_code #target_language_code} => String
|
1097
1123
|
# * {Types::TranslateTextResponse#applied_terminologies #applied_terminologies} => Array<Types::AppliedTerminology>
|
1124
|
+
# * {Types::TranslateTextResponse#applied_settings #applied_settings} => Types::TranslationSettings
|
1098
1125
|
#
|
1099
1126
|
# @example Request syntax with placeholder values
|
1100
1127
|
#
|
@@ -1103,6 +1130,9 @@ module Aws::Translate
|
|
1103
1130
|
# terminology_names: ["ResourceName"],
|
1104
1131
|
# source_language_code: "LanguageCodeString", # required
|
1105
1132
|
# target_language_code: "LanguageCodeString", # required
|
1133
|
+
# settings: {
|
1134
|
+
# profanity: "MASK", # accepts MASK
|
1135
|
+
# },
|
1106
1136
|
# })
|
1107
1137
|
#
|
1108
1138
|
# @example Response structure
|
@@ -1115,6 +1145,7 @@ module Aws::Translate
|
|
1115
1145
|
# resp.applied_terminologies[0].terms #=> Array
|
1116
1146
|
# resp.applied_terminologies[0].terms[0].source_text #=> String
|
1117
1147
|
# resp.applied_terminologies[0].terms[0].target_text #=> String
|
1148
|
+
# resp.applied_settings.profanity #=> String, one of "MASK"
|
1118
1149
|
#
|
1119
1150
|
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TranslateText AWS API Documentation
|
1120
1151
|
#
|
@@ -1193,7 +1224,7 @@ module Aws::Translate
|
|
1193
1224
|
params: params,
|
1194
1225
|
config: config)
|
1195
1226
|
context[:gem_name] = 'aws-sdk-translate'
|
1196
|
-
context[:gem_version] = '1.
|
1227
|
+
context[:gem_version] = '1.42.0'
|
1197
1228
|
Seahorse::Client::Request.new(handlers, context)
|
1198
1229
|
end
|
1199
1230
|
|
@@ -71,6 +71,7 @@ module Aws::Translate
|
|
71
71
|
ParallelDataProperties = Shapes::StructureShape.new(name: 'ParallelDataProperties')
|
72
72
|
ParallelDataPropertiesList = Shapes::ListShape.new(name: 'ParallelDataPropertiesList')
|
73
73
|
ParallelDataStatus = Shapes::StringShape.new(name: 'ParallelDataStatus')
|
74
|
+
Profanity = Shapes::StringShape.new(name: 'Profanity')
|
74
75
|
ResourceName = Shapes::StringShape.new(name: 'ResourceName')
|
75
76
|
ResourceNameList = Shapes::ListShape.new(name: 'ResourceNameList')
|
76
77
|
ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
|
@@ -99,6 +100,7 @@ module Aws::Translate
|
|
99
100
|
TooManyRequestsException = Shapes::StructureShape.new(name: 'TooManyRequestsException')
|
100
101
|
TranslateTextRequest = Shapes::StructureShape.new(name: 'TranslateTextRequest')
|
101
102
|
TranslateTextResponse = Shapes::StructureShape.new(name: 'TranslateTextResponse')
|
103
|
+
TranslationSettings = Shapes::StructureShape.new(name: 'TranslationSettings')
|
102
104
|
UnboundedLengthString = Shapes::StringShape.new(name: 'UnboundedLengthString')
|
103
105
|
UnsupportedLanguagePairException = Shapes::StructureShape.new(name: 'UnsupportedLanguagePairException')
|
104
106
|
UpdateParallelDataRequest = Shapes::StructureShape.new(name: 'UpdateParallelDataRequest')
|
@@ -281,6 +283,7 @@ module Aws::Translate
|
|
281
283
|
StartTextTranslationJobRequest.add_member(:terminology_names, Shapes::ShapeRef.new(shape: ResourceNameList, location_name: "TerminologyNames"))
|
282
284
|
StartTextTranslationJobRequest.add_member(:parallel_data_names, Shapes::ShapeRef.new(shape: ResourceNameList, location_name: "ParallelDataNames"))
|
283
285
|
StartTextTranslationJobRequest.add_member(:client_token, Shapes::ShapeRef.new(shape: ClientTokenString, required: true, location_name: "ClientToken", metadata: {"idempotencyToken"=>true}))
|
286
|
+
StartTextTranslationJobRequest.add_member(:settings, Shapes::ShapeRef.new(shape: TranslationSettings, location_name: "Settings"))
|
284
287
|
StartTextTranslationJobRequest.struct_class = Types::StartTextTranslationJobRequest
|
285
288
|
|
286
289
|
StartTextTranslationJobResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
|
@@ -352,6 +355,7 @@ module Aws::Translate
|
|
352
355
|
TextTranslationJobProperties.add_member(:input_data_config, Shapes::ShapeRef.new(shape: InputDataConfig, location_name: "InputDataConfig"))
|
353
356
|
TextTranslationJobProperties.add_member(:output_data_config, Shapes::ShapeRef.new(shape: OutputDataConfig, location_name: "OutputDataConfig"))
|
354
357
|
TextTranslationJobProperties.add_member(:data_access_role_arn, Shapes::ShapeRef.new(shape: IamRoleArn, location_name: "DataAccessRoleArn"))
|
358
|
+
TextTranslationJobProperties.add_member(:settings, Shapes::ShapeRef.new(shape: TranslationSettings, location_name: "Settings"))
|
355
359
|
TextTranslationJobProperties.struct_class = Types::TextTranslationJobProperties
|
356
360
|
|
357
361
|
TextTranslationJobPropertiesList.member = Shapes::ShapeRef.new(shape: TextTranslationJobProperties)
|
@@ -363,14 +367,19 @@ module Aws::Translate
|
|
363
367
|
TranslateTextRequest.add_member(:terminology_names, Shapes::ShapeRef.new(shape: ResourceNameList, location_name: "TerminologyNames"))
|
364
368
|
TranslateTextRequest.add_member(:source_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, required: true, location_name: "SourceLanguageCode"))
|
365
369
|
TranslateTextRequest.add_member(:target_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, required: true, location_name: "TargetLanguageCode"))
|
370
|
+
TranslateTextRequest.add_member(:settings, Shapes::ShapeRef.new(shape: TranslationSettings, location_name: "Settings"))
|
366
371
|
TranslateTextRequest.struct_class = Types::TranslateTextRequest
|
367
372
|
|
368
373
|
TranslateTextResponse.add_member(:translated_text, Shapes::ShapeRef.new(shape: String, required: true, location_name: "TranslatedText"))
|
369
374
|
TranslateTextResponse.add_member(:source_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, required: true, location_name: "SourceLanguageCode"))
|
370
375
|
TranslateTextResponse.add_member(:target_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, required: true, location_name: "TargetLanguageCode"))
|
371
376
|
TranslateTextResponse.add_member(:applied_terminologies, Shapes::ShapeRef.new(shape: AppliedTerminologyList, location_name: "AppliedTerminologies"))
|
377
|
+
TranslateTextResponse.add_member(:applied_settings, Shapes::ShapeRef.new(shape: TranslationSettings, location_name: "AppliedSettings"))
|
372
378
|
TranslateTextResponse.struct_class = Types::TranslateTextResponse
|
373
379
|
|
380
|
+
TranslationSettings.add_member(:profanity, Shapes::ShapeRef.new(shape: Profanity, location_name: "Profanity"))
|
381
|
+
TranslationSettings.struct_class = Types::TranslationSettings
|
382
|
+
|
374
383
|
UnsupportedLanguagePairException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
375
384
|
UnsupportedLanguagePairException.add_member(:source_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, location_name: "SourceLanguageCode"))
|
376
385
|
UnsupportedLanguagePairException.add_member(:target_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, location_name: "TargetLanguageCode"))
|
@@ -266,13 +266,13 @@ module Aws::Translate
|
|
266
266
|
# }
|
267
267
|
#
|
268
268
|
# @!attribute [rw] type
|
269
|
-
# The type of encryption key used by Amazon Translate to encrypt
|
270
|
-
#
|
269
|
+
# The type of encryption key used by Amazon Translate to encrypt this
|
270
|
+
# object.
|
271
271
|
# @return [String]
|
272
272
|
#
|
273
273
|
# @!attribute [rw] id
|
274
274
|
# The Amazon Resource Name (ARN) of the encryption key being used to
|
275
|
-
# encrypt
|
275
|
+
# encrypt this object.
|
276
276
|
# @return [String]
|
277
277
|
#
|
278
278
|
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/EncryptionKey AWS API Documentation
|
@@ -313,8 +313,8 @@ module Aws::Translate
|
|
313
313
|
# that was successfully imported into Amazon Translate. The location
|
314
314
|
# is returned as a presigned URL that has a 30 minute expiration.
|
315
315
|
#
|
316
|
-
# Amazon Translate doesn't scan
|
317
|
-
#
|
316
|
+
# Amazon Translate doesn't scan all input files for the risk of CSV
|
317
|
+
# injection attacks.
|
318
318
|
#
|
319
319
|
# CSV injection occurs when a .csv or .tsv file is altered so that a
|
320
320
|
# record contains malicious code. The record begins with a special
|
@@ -322,8 +322,8 @@ module Aws::Translate
|
|
322
322
|
# spreadsheet program, the program might interpret the record as a
|
323
323
|
# formula and run the code within it.
|
324
324
|
#
|
325
|
-
# Before you download
|
326
|
-
#
|
325
|
+
# Before you download an input file from Amazon S3, ensure that you
|
326
|
+
# recognize the file and trust its creator.
|
327
327
|
# @return [Types::ParallelDataDataLocation]
|
328
328
|
#
|
329
329
|
# @!attribute [rw] auxiliary_data_location
|
@@ -392,9 +392,22 @@ module Aws::Translate
|
|
392
392
|
# @return [Types::TerminologyProperties]
|
393
393
|
#
|
394
394
|
# @!attribute [rw] terminology_data_location
|
395
|
-
# The
|
396
|
-
#
|
397
|
-
# minute
|
395
|
+
# The Amazon S3 location of the most recent custom terminology input
|
396
|
+
# file that was successfully imported into Amazon Translate. The
|
397
|
+
# location is returned as a presigned URL that has a 30 minute
|
398
|
+
# expiration.
|
399
|
+
#
|
400
|
+
# Amazon Translate doesn't scan all input files for the risk of CSV
|
401
|
+
# injection attacks.
|
402
|
+
#
|
403
|
+
# CSV injection occurs when a .csv or .tsv file is altered so that a
|
404
|
+
# record contains malicious code. The record begins with a special
|
405
|
+
# character, such as =, +, -, or @. When the file is opened in a
|
406
|
+
# spreadsheet program, the program might interpret the record as a
|
407
|
+
# formula and run the code within it.
|
408
|
+
#
|
409
|
+
# Before you download an input file from Amazon S3, ensure that you
|
410
|
+
# recognize the file and trust its creator.
|
398
411
|
# @return [Types::TerminologyDataLocation]
|
399
412
|
#
|
400
413
|
# @!attribute [rw] auxiliary_data_location
|
@@ -869,8 +882,8 @@ module Aws::Translate
|
|
869
882
|
# The Amazon S3 location of the parallel data input file. The location
|
870
883
|
# is returned as a presigned URL to that has a 30 minute expiration.
|
871
884
|
#
|
872
|
-
# Amazon Translate doesn't scan
|
873
|
-
#
|
885
|
+
# Amazon Translate doesn't scan all input files for the risk of CSV
|
886
|
+
# injection attacks.
|
874
887
|
#
|
875
888
|
# CSV injection occurs when a .csv or .tsv file is altered so that a
|
876
889
|
# record contains malicious code. The record begins with a special
|
@@ -878,8 +891,8 @@ module Aws::Translate
|
|
878
891
|
# spreadsheet program, the program might interpret the record as a
|
879
892
|
# formula and run the code within it.
|
880
893
|
#
|
881
|
-
# Before you download
|
882
|
-
#
|
894
|
+
# Before you download an input file from Amazon S3, ensure that you
|
895
|
+
# recognize the file and trust its creator.
|
883
896
|
# @return [String]
|
884
897
|
#
|
885
898
|
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ParallelDataDataLocation AWS API Documentation
|
@@ -1052,6 +1065,9 @@ module Aws::Translate
|
|
1052
1065
|
# terminology_names: ["ResourceName"],
|
1053
1066
|
# parallel_data_names: ["ResourceName"],
|
1054
1067
|
# client_token: "ClientTokenString", # required
|
1068
|
+
# settings: {
|
1069
|
+
# profanity: "MASK", # accepts MASK
|
1070
|
+
# },
|
1055
1071
|
# }
|
1056
1072
|
#
|
1057
1073
|
# @!attribute [rw] job_name
|
@@ -1131,6 +1147,11 @@ module Aws::Translate
|
|
1131
1147
|
# not need to pass this option.
|
1132
1148
|
# @return [String]
|
1133
1149
|
#
|
1150
|
+
# @!attribute [rw] settings
|
1151
|
+
# Settings to configure your translation output, including the option
|
1152
|
+
# to mask profane words and phrases.
|
1153
|
+
# @return [Types::TranslationSettings]
|
1154
|
+
#
|
1134
1155
|
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StartTextTranslationJobRequest AWS API Documentation
|
1135
1156
|
#
|
1136
1157
|
class StartTextTranslationJobRequest < Struct.new(
|
@@ -1142,7 +1163,8 @@ module Aws::Translate
|
|
1142
1163
|
:target_language_codes,
|
1143
1164
|
:terminology_names,
|
1144
1165
|
:parallel_data_names,
|
1145
|
-
:client_token
|
1166
|
+
:client_token,
|
1167
|
+
:settings)
|
1146
1168
|
SENSITIVE = []
|
1147
1169
|
include Aws::Structure
|
1148
1170
|
end
|
@@ -1306,7 +1328,22 @@ module Aws::Translate
|
|
1306
1328
|
# @return [String]
|
1307
1329
|
#
|
1308
1330
|
# @!attribute [rw] location
|
1309
|
-
# The location of the custom terminology
|
1331
|
+
# The Amazon S3 location of the most recent custom terminology input
|
1332
|
+
# file that was successfully imported into Amazon Translate. The
|
1333
|
+
# location is returned as a presigned URL that has a 30 minute
|
1334
|
+
# expiration.
|
1335
|
+
#
|
1336
|
+
# Amazon Translate doesn't scan all input files for the risk of CSV
|
1337
|
+
# injection attacks.
|
1338
|
+
#
|
1339
|
+
# CSV injection occurs when a .csv or .tsv file is altered so that a
|
1340
|
+
# record contains malicious code. The record begins with a special
|
1341
|
+
# character, such as =, +, -, or @. When the file is opened in a
|
1342
|
+
# spreadsheet program, the program might interpret the record as a
|
1343
|
+
# formula and run the code within it.
|
1344
|
+
#
|
1345
|
+
# Before you download an input file from Amazon S3, ensure that you
|
1346
|
+
# recognize the file and trust its creator.
|
1310
1347
|
# @return [String]
|
1311
1348
|
#
|
1312
1349
|
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TerminologyDataLocation AWS API Documentation
|
@@ -1547,6 +1584,10 @@ module Aws::Translate
|
|
1547
1584
|
# the job's input data.
|
1548
1585
|
# @return [String]
|
1549
1586
|
#
|
1587
|
+
# @!attribute [rw] settings
|
1588
|
+
# Settings that configure the translation output.
|
1589
|
+
# @return [Types::TranslationSettings]
|
1590
|
+
#
|
1550
1591
|
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TextTranslationJobProperties AWS API Documentation
|
1551
1592
|
#
|
1552
1593
|
class TextTranslationJobProperties < Struct.new(
|
@@ -1563,7 +1604,8 @@ module Aws::Translate
|
|
1563
1604
|
:end_time,
|
1564
1605
|
:input_data_config,
|
1565
1606
|
:output_data_config,
|
1566
|
-
:data_access_role_arn
|
1607
|
+
:data_access_role_arn,
|
1608
|
+
:settings)
|
1567
1609
|
SENSITIVE = []
|
1568
1610
|
include Aws::Structure
|
1569
1611
|
end
|
@@ -1590,6 +1632,9 @@ module Aws::Translate
|
|
1590
1632
|
# terminology_names: ["ResourceName"],
|
1591
1633
|
# source_language_code: "LanguageCodeString", # required
|
1592
1634
|
# target_language_code: "LanguageCodeString", # required
|
1635
|
+
# settings: {
|
1636
|
+
# profanity: "MASK", # accepts MASK
|
1637
|
+
# },
|
1593
1638
|
# }
|
1594
1639
|
#
|
1595
1640
|
# @!attribute [rw] text
|
@@ -1625,13 +1670,19 @@ module Aws::Translate
|
|
1625
1670
|
# language must be a language supported by Amazon Translate.
|
1626
1671
|
# @return [String]
|
1627
1672
|
#
|
1673
|
+
# @!attribute [rw] settings
|
1674
|
+
# Settings to configure your translation output, including the option
|
1675
|
+
# to mask profane words and phrases.
|
1676
|
+
# @return [Types::TranslationSettings]
|
1677
|
+
#
|
1628
1678
|
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TranslateTextRequest AWS API Documentation
|
1629
1679
|
#
|
1630
1680
|
class TranslateTextRequest < Struct.new(
|
1631
1681
|
:text,
|
1632
1682
|
:terminology_names,
|
1633
1683
|
:source_language_code,
|
1634
|
-
:target_language_code
|
1684
|
+
:target_language_code,
|
1685
|
+
:settings)
|
1635
1686
|
SENSITIVE = []
|
1636
1687
|
include Aws::Structure
|
1637
1688
|
end
|
@@ -1653,13 +1704,54 @@ module Aws::Translate
|
|
1653
1704
|
# Amazon Translate for the translated text response.
|
1654
1705
|
# @return [Array<Types::AppliedTerminology>]
|
1655
1706
|
#
|
1707
|
+
# @!attribute [rw] applied_settings
|
1708
|
+
# Settings that configure the translation output.
|
1709
|
+
# @return [Types::TranslationSettings]
|
1710
|
+
#
|
1656
1711
|
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TranslateTextResponse AWS API Documentation
|
1657
1712
|
#
|
1658
1713
|
class TranslateTextResponse < Struct.new(
|
1659
1714
|
:translated_text,
|
1660
1715
|
:source_language_code,
|
1661
1716
|
:target_language_code,
|
1662
|
-
:applied_terminologies
|
1717
|
+
:applied_terminologies,
|
1718
|
+
:applied_settings)
|
1719
|
+
SENSITIVE = []
|
1720
|
+
include Aws::Structure
|
1721
|
+
end
|
1722
|
+
|
1723
|
+
# Settings that configure the translation output.
|
1724
|
+
#
|
1725
|
+
# @note When making an API call, you may pass TranslationSettings
|
1726
|
+
# data as a hash:
|
1727
|
+
#
|
1728
|
+
# {
|
1729
|
+
# profanity: "MASK", # accepts MASK
|
1730
|
+
# }
|
1731
|
+
#
|
1732
|
+
# @!attribute [rw] profanity
|
1733
|
+
# Enable the profanity setting if you want Amazon Translate to mask
|
1734
|
+
# profane words and phrases in your translation output.
|
1735
|
+
#
|
1736
|
+
# To mask profane words and phrases, Amazon Translate replaces them
|
1737
|
+
# with the grawlix string “?$#@$“. This 5-character sequence is used
|
1738
|
+
# for each profane word or phrase, regardless of the length or number
|
1739
|
+
# of words.
|
1740
|
+
#
|
1741
|
+
# Amazon Translate does not detect profanity in all of its supported
|
1742
|
+
# languages. For languages that support profanity detection, see
|
1743
|
+
# [Supported Languages and Language Codes in the Amazon Translate
|
1744
|
+
# Developer Guide][1].
|
1745
|
+
#
|
1746
|
+
#
|
1747
|
+
#
|
1748
|
+
# [1]: https://docs.aws.amazon.com/translate/latest/dg/what-is.html#what-is-languages
|
1749
|
+
# @return [String]
|
1750
|
+
#
|
1751
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TranslationSettings AWS API Documentation
|
1752
|
+
#
|
1753
|
+
class TranslationSettings < Struct.new(
|
1754
|
+
:profanity)
|
1663
1755
|
SENSITIVE = []
|
1664
1756
|
include Aws::Structure
|
1665
1757
|
end
|
data/lib/aws-sdk-translate.rb
CHANGED
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.
|
4
|
+
version: 1.42.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:
|
11
|
+
date: 2022-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '3'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 3.
|
22
|
+
version: 3.126.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '3'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 3.
|
32
|
+
version: 3.126.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: aws-sigv4
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|