aws-sdk-textract 1.21.0 → 1.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-textract.rb +1 -1
- data/lib/aws-sdk-textract/client.rb +21 -1
- data/lib/aws-sdk-textract/client_api.rb +10 -0
- data/lib/aws-sdk-textract/errors.rb +11 -0
- data/lib/aws-sdk-textract/types.rb +36 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7f290f5b7e990fdb7adaa4802ce01016628905a4263b2766f1225aa9636e350
|
4
|
+
data.tar.gz: cc51ed48fd54b4d3dda1e34fa7d7b5e64a06075c0e3cc1c53444f875dc4e9ad1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 286858ce59b6f70aacabd14965d3aaea5377e7a15d0283dafb85b5bd0e9bf58dcbdf80690db7b013b1bc38ae5968475221236d96f9ec0ccb9e1d7ba30bf058c1
|
7
|
+
data.tar.gz: 468e603960039769ec1af6f53fbdd2e244348db5ef46f48d3ba939104da9410b0f00616cdcbe8cd2b888d916c033f59e85ee66bd97279f34cbf7f1340d15e190
|
data/lib/aws-sdk-textract.rb
CHANGED
@@ -431,6 +431,7 @@ module Aws::Textract
|
|
431
431
|
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT"
|
432
432
|
# resp.blocks[0].confidence #=> Float
|
433
433
|
# resp.blocks[0].text #=> String
|
434
|
+
# resp.blocks[0].text_type #=> String, one of "HANDWRITING", "PRINTED"
|
434
435
|
# resp.blocks[0].row_index #=> Integer
|
435
436
|
# resp.blocks[0].column_index #=> Integer
|
436
437
|
# resp.blocks[0].row_span #=> Integer
|
@@ -521,6 +522,7 @@ module Aws::Textract
|
|
521
522
|
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT"
|
522
523
|
# resp.blocks[0].confidence #=> Float
|
523
524
|
# resp.blocks[0].text #=> String
|
525
|
+
# resp.blocks[0].text_type #=> String, one of "HANDWRITING", "PRINTED"
|
524
526
|
# resp.blocks[0].row_index #=> Integer
|
525
527
|
# resp.blocks[0].column_index #=> Integer
|
526
528
|
# resp.blocks[0].row_span #=> Integer
|
@@ -647,6 +649,7 @@ module Aws::Textract
|
|
647
649
|
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT"
|
648
650
|
# resp.blocks[0].confidence #=> Float
|
649
651
|
# resp.blocks[0].text #=> String
|
652
|
+
# resp.blocks[0].text_type #=> String, one of "HANDWRITING", "PRINTED"
|
650
653
|
# resp.blocks[0].row_index #=> Integer
|
651
654
|
# resp.blocks[0].column_index #=> Integer
|
652
655
|
# resp.blocks[0].row_span #=> Integer
|
@@ -764,6 +767,7 @@ module Aws::Textract
|
|
764
767
|
# resp.blocks[0].block_type #=> String, one of "KEY_VALUE_SET", "PAGE", "LINE", "WORD", "TABLE", "CELL", "SELECTION_ELEMENT"
|
765
768
|
# resp.blocks[0].confidence #=> Float
|
766
769
|
# resp.blocks[0].text #=> String
|
770
|
+
# resp.blocks[0].text_type #=> String, one of "HANDWRITING", "PRINTED"
|
767
771
|
# resp.blocks[0].row_index #=> Integer
|
768
772
|
# resp.blocks[0].column_index #=> Integer
|
769
773
|
# resp.blocks[0].row_span #=> Integer
|
@@ -862,6 +866,13 @@ module Aws::Textract
|
|
862
866
|
# Amazon Textract will save the results internally to be accessed by the
|
863
867
|
# GetDocumentAnalysis operation.
|
864
868
|
#
|
869
|
+
# @option params [String] :kms_key_id
|
870
|
+
# The KMS key used to encrypt the inference results. This can be in
|
871
|
+
# either Key ID or Key Alias format. When a KMS key is provided, the KMS
|
872
|
+
# key will be used for server-side encryption of the objects in the
|
873
|
+
# customer bucket. When this parameter is not enabled, the result will
|
874
|
+
# be encrypted server side,using SSE-S3.
|
875
|
+
#
|
865
876
|
# @return [Types::StartDocumentAnalysisResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
866
877
|
#
|
867
878
|
# * {Types::StartDocumentAnalysisResponse#job_id #job_id} => String
|
@@ -887,6 +898,7 @@ module Aws::Textract
|
|
887
898
|
# s3_bucket: "S3Bucket", # required
|
888
899
|
# s3_prefix: "S3ObjectName",
|
889
900
|
# },
|
901
|
+
# kms_key_id: "KMSKeyId",
|
890
902
|
# })
|
891
903
|
#
|
892
904
|
# @example Response structure
|
@@ -957,6 +969,13 @@ module Aws::Textract
|
|
957
969
|
# Amazon Textract will save the results internally to be accessed with
|
958
970
|
# the GetDocumentTextDetection operation.
|
959
971
|
#
|
972
|
+
# @option params [String] :kms_key_id
|
973
|
+
# The KMS key used to encrypt the inference results. This can be in
|
974
|
+
# either Key ID or Key Alias format. When a KMS key is provided, the KMS
|
975
|
+
# key will be used for server-side encryption of the objects in the
|
976
|
+
# customer bucket. When this parameter is not enabled, the result will
|
977
|
+
# be encrypted server side,using SSE-S3.
|
978
|
+
#
|
960
979
|
# @return [Types::StartDocumentTextDetectionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
961
980
|
#
|
962
981
|
# * {Types::StartDocumentTextDetectionResponse#job_id #job_id} => String
|
@@ -981,6 +1000,7 @@ module Aws::Textract
|
|
981
1000
|
# s3_bucket: "S3Bucket", # required
|
982
1001
|
# s3_prefix: "S3ObjectName",
|
983
1002
|
# },
|
1003
|
+
# kms_key_id: "KMSKeyId",
|
984
1004
|
# })
|
985
1005
|
#
|
986
1006
|
# @example Response structure
|
@@ -1009,7 +1029,7 @@ module Aws::Textract
|
|
1009
1029
|
params: params,
|
1010
1030
|
config: config)
|
1011
1031
|
context[:gem_name] = 'aws-sdk-textract'
|
1012
|
-
context[:gem_version] = '1.
|
1032
|
+
context[:gem_version] = '1.22.0'
|
1013
1033
|
Seahorse::Client::Request.new(handlers, context)
|
1014
1034
|
end
|
1015
1035
|
|
@@ -56,11 +56,13 @@ module Aws::Textract
|
|
56
56
|
ImageBlob = Shapes::BlobShape.new(name: 'ImageBlob')
|
57
57
|
InternalServerError = Shapes::StructureShape.new(name: 'InternalServerError')
|
58
58
|
InvalidJobIdException = Shapes::StructureShape.new(name: 'InvalidJobIdException')
|
59
|
+
InvalidKMSKeyException = Shapes::StructureShape.new(name: 'InvalidKMSKeyException')
|
59
60
|
InvalidParameterException = Shapes::StructureShape.new(name: 'InvalidParameterException')
|
60
61
|
InvalidS3ObjectException = Shapes::StructureShape.new(name: 'InvalidS3ObjectException')
|
61
62
|
JobId = Shapes::StringShape.new(name: 'JobId')
|
62
63
|
JobStatus = Shapes::StringShape.new(name: 'JobStatus')
|
63
64
|
JobTag = Shapes::StringShape.new(name: 'JobTag')
|
65
|
+
KMSKeyId = Shapes::StringShape.new(name: 'KMSKeyId')
|
64
66
|
LimitExceededException = Shapes::StructureShape.new(name: 'LimitExceededException')
|
65
67
|
MaxResults = Shapes::IntegerShape.new(name: 'MaxResults')
|
66
68
|
NonEmptyString = Shapes::StringShape.new(name: 'NonEmptyString')
|
@@ -88,6 +90,7 @@ module Aws::Textract
|
|
88
90
|
StartDocumentTextDetectionResponse = Shapes::StructureShape.new(name: 'StartDocumentTextDetectionResponse')
|
89
91
|
StatusMessage = Shapes::StringShape.new(name: 'StatusMessage')
|
90
92
|
String = Shapes::StringShape.new(name: 'String')
|
93
|
+
TextType = Shapes::StringShape.new(name: 'TextType')
|
91
94
|
ThrottlingException = Shapes::StructureShape.new(name: 'ThrottlingException')
|
92
95
|
UInteger = Shapes::IntegerShape.new(name: 'UInteger')
|
93
96
|
UnsupportedDocumentException = Shapes::StructureShape.new(name: 'UnsupportedDocumentException')
|
@@ -112,6 +115,7 @@ module Aws::Textract
|
|
112
115
|
Block.add_member(:block_type, Shapes::ShapeRef.new(shape: BlockType, location_name: "BlockType"))
|
113
116
|
Block.add_member(:confidence, Shapes::ShapeRef.new(shape: Percent, location_name: "Confidence"))
|
114
117
|
Block.add_member(:text, Shapes::ShapeRef.new(shape: String, location_name: "Text"))
|
118
|
+
Block.add_member(:text_type, Shapes::ShapeRef.new(shape: TextType, location_name: "TextType"))
|
115
119
|
Block.add_member(:row_index, Shapes::ShapeRef.new(shape: UInteger, location_name: "RowIndex"))
|
116
120
|
Block.add_member(:column_index, Shapes::ShapeRef.new(shape: UInteger, location_name: "ColumnIndex"))
|
117
121
|
Block.add_member(:row_span, Shapes::ShapeRef.new(shape: UInteger, location_name: "RowSpan"))
|
@@ -218,6 +222,8 @@ module Aws::Textract
|
|
218
222
|
|
219
223
|
InvalidJobIdException.struct_class = Types::InvalidJobIdException
|
220
224
|
|
225
|
+
InvalidKMSKeyException.struct_class = Types::InvalidKMSKeyException
|
226
|
+
|
221
227
|
InvalidParameterException.struct_class = Types::InvalidParameterException
|
222
228
|
|
223
229
|
InvalidS3ObjectException.struct_class = Types::InvalidS3ObjectException
|
@@ -259,6 +265,7 @@ module Aws::Textract
|
|
259
265
|
StartDocumentAnalysisRequest.add_member(:job_tag, Shapes::ShapeRef.new(shape: JobTag, location_name: "JobTag"))
|
260
266
|
StartDocumentAnalysisRequest.add_member(:notification_channel, Shapes::ShapeRef.new(shape: NotificationChannel, location_name: "NotificationChannel"))
|
261
267
|
StartDocumentAnalysisRequest.add_member(:output_config, Shapes::ShapeRef.new(shape: OutputConfig, location_name: "OutputConfig"))
|
268
|
+
StartDocumentAnalysisRequest.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: KMSKeyId, location_name: "KMSKeyId"))
|
262
269
|
StartDocumentAnalysisRequest.struct_class = Types::StartDocumentAnalysisRequest
|
263
270
|
|
264
271
|
StartDocumentAnalysisResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
|
@@ -269,6 +276,7 @@ module Aws::Textract
|
|
269
276
|
StartDocumentTextDetectionRequest.add_member(:job_tag, Shapes::ShapeRef.new(shape: JobTag, location_name: "JobTag"))
|
270
277
|
StartDocumentTextDetectionRequest.add_member(:notification_channel, Shapes::ShapeRef.new(shape: NotificationChannel, location_name: "NotificationChannel"))
|
271
278
|
StartDocumentTextDetectionRequest.add_member(:output_config, Shapes::ShapeRef.new(shape: OutputConfig, location_name: "OutputConfig"))
|
279
|
+
StartDocumentTextDetectionRequest.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: KMSKeyId, location_name: "KMSKeyId"))
|
272
280
|
StartDocumentTextDetectionRequest.struct_class = Types::StartDocumentTextDetectionRequest
|
273
281
|
|
274
282
|
StartDocumentTextDetectionResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
|
@@ -375,6 +383,7 @@ module Aws::Textract
|
|
375
383
|
o.output = Shapes::ShapeRef.new(shape: StartDocumentAnalysisResponse)
|
376
384
|
o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
|
377
385
|
o.errors << Shapes::ShapeRef.new(shape: InvalidS3ObjectException)
|
386
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidKMSKeyException)
|
378
387
|
o.errors << Shapes::ShapeRef.new(shape: UnsupportedDocumentException)
|
379
388
|
o.errors << Shapes::ShapeRef.new(shape: DocumentTooLargeException)
|
380
389
|
o.errors << Shapes::ShapeRef.new(shape: BadDocumentException)
|
@@ -394,6 +403,7 @@ module Aws::Textract
|
|
394
403
|
o.output = Shapes::ShapeRef.new(shape: StartDocumentTextDetectionResponse)
|
395
404
|
o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
|
396
405
|
o.errors << Shapes::ShapeRef.new(shape: InvalidS3ObjectException)
|
406
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidKMSKeyException)
|
397
407
|
o.errors << Shapes::ShapeRef.new(shape: UnsupportedDocumentException)
|
398
408
|
o.errors << Shapes::ShapeRef.new(shape: DocumentTooLargeException)
|
399
409
|
o.errors << Shapes::ShapeRef.new(shape: BadDocumentException)
|
@@ -34,6 +34,7 @@ module Aws::Textract
|
|
34
34
|
# * {IdempotentParameterMismatchException}
|
35
35
|
# * {InternalServerError}
|
36
36
|
# * {InvalidJobIdException}
|
37
|
+
# * {InvalidKMSKeyException}
|
37
38
|
# * {InvalidParameterException}
|
38
39
|
# * {InvalidS3ObjectException}
|
39
40
|
# * {LimitExceededException}
|
@@ -132,6 +133,16 @@ module Aws::Textract
|
|
132
133
|
end
|
133
134
|
end
|
134
135
|
|
136
|
+
class InvalidKMSKeyException < ServiceError
|
137
|
+
|
138
|
+
# @param [Seahorse::Client::RequestContext] context
|
139
|
+
# @param [String] message
|
140
|
+
# @param [Aws::Textract::Types::InvalidKMSKeyException] data
|
141
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
142
|
+
super(context, message, data)
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
135
146
|
class InvalidParameterException < ServiceError
|
136
147
|
|
137
148
|
# @param [Seahorse::Client::RequestContext] context
|
@@ -184,6 +184,11 @@ module Aws::Textract
|
|
184
184
|
# The word or line of text that's recognized by Amazon Textract.
|
185
185
|
# @return [String]
|
186
186
|
#
|
187
|
+
# @!attribute [rw] text_type
|
188
|
+
# The kind of text that Amazon Textract has detected. Can check for
|
189
|
+
# handwritten text and printed text.
|
190
|
+
# @return [String]
|
191
|
+
#
|
187
192
|
# @!attribute [rw] row_index
|
188
193
|
# The row in which a table cell is located. The first row position is
|
189
194
|
# 1. `RowIndex` isn't returned by `DetectDocumentText` and
|
@@ -265,6 +270,7 @@ module Aws::Textract
|
|
265
270
|
:block_type,
|
266
271
|
:confidence,
|
267
272
|
:text,
|
273
|
+
:text_type,
|
268
274
|
:row_index,
|
269
275
|
:column_index,
|
270
276
|
:row_span,
|
@@ -486,7 +492,7 @@ module Aws::Textract
|
|
486
492
|
end
|
487
493
|
|
488
494
|
# The document can't be processed because it's too large. The maximum
|
489
|
-
# document size for synchronous operations
|
495
|
+
# document size for synchronous operations 10 MB. The maximum document
|
490
496
|
# size for asynchronous operations is 500 MB for PDF files.
|
491
497
|
#
|
492
498
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/DocumentTooLargeException AWS API Documentation
|
@@ -822,6 +828,13 @@ module Aws::Textract
|
|
822
828
|
#
|
823
829
|
class InvalidJobIdException < Aws::EmptyStructure; end
|
824
830
|
|
831
|
+
# Indicates you do not have decrypt permissions with the KMS key
|
832
|
+
# entered, or the KMS key was entered incorrectly.
|
833
|
+
#
|
834
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/InvalidKMSKeyException AWS API Documentation
|
835
|
+
#
|
836
|
+
class InvalidKMSKeyException < Aws::EmptyStructure; end
|
837
|
+
|
825
838
|
# An input parameter violated a constraint. For example, in synchronous
|
826
839
|
# operations, an `InvalidParameterException` exception occurs when
|
827
840
|
# neither of the `S3Object` or `Bytes` values are supplied in the
|
@@ -1046,6 +1059,7 @@ module Aws::Textract
|
|
1046
1059
|
# s3_bucket: "S3Bucket", # required
|
1047
1060
|
# s3_prefix: "S3ObjectName",
|
1048
1061
|
# },
|
1062
|
+
# kms_key_id: "KMSKeyId",
|
1049
1063
|
# }
|
1050
1064
|
#
|
1051
1065
|
# @!attribute [rw] document_location
|
@@ -1093,6 +1107,14 @@ module Aws::Textract
|
|
1093
1107
|
# the GetDocumentAnalysis operation.
|
1094
1108
|
# @return [Types::OutputConfig]
|
1095
1109
|
#
|
1110
|
+
# @!attribute [rw] kms_key_id
|
1111
|
+
# The KMS key used to encrypt the inference results. This can be in
|
1112
|
+
# either Key ID or Key Alias format. When a KMS key is provided, the
|
1113
|
+
# KMS key will be used for server-side encryption of the objects in
|
1114
|
+
# the customer bucket. When this parameter is not enabled, the result
|
1115
|
+
# will be encrypted server side,using SSE-S3.
|
1116
|
+
# @return [String]
|
1117
|
+
#
|
1096
1118
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartDocumentAnalysisRequest AWS API Documentation
|
1097
1119
|
#
|
1098
1120
|
class StartDocumentAnalysisRequest < Struct.new(
|
@@ -1101,7 +1123,8 @@ module Aws::Textract
|
|
1101
1123
|
:client_request_token,
|
1102
1124
|
:job_tag,
|
1103
1125
|
:notification_channel,
|
1104
|
-
:output_config
|
1126
|
+
:output_config,
|
1127
|
+
:kms_key_id)
|
1105
1128
|
SENSITIVE = []
|
1106
1129
|
include Aws::Structure
|
1107
1130
|
end
|
@@ -1141,6 +1164,7 @@ module Aws::Textract
|
|
1141
1164
|
# s3_bucket: "S3Bucket", # required
|
1142
1165
|
# s3_prefix: "S3ObjectName",
|
1143
1166
|
# },
|
1167
|
+
# kms_key_id: "KMSKeyId",
|
1144
1168
|
# }
|
1145
1169
|
#
|
1146
1170
|
# @!attribute [rw] document_location
|
@@ -1178,6 +1202,14 @@ module Aws::Textract
|
|
1178
1202
|
# the GetDocumentTextDetection operation.
|
1179
1203
|
# @return [Types::OutputConfig]
|
1180
1204
|
#
|
1205
|
+
# @!attribute [rw] kms_key_id
|
1206
|
+
# The KMS key used to encrypt the inference results. This can be in
|
1207
|
+
# either Key ID or Key Alias format. When a KMS key is provided, the
|
1208
|
+
# KMS key will be used for server-side encryption of the objects in
|
1209
|
+
# the customer bucket. When this parameter is not enabled, the result
|
1210
|
+
# will be encrypted server side,using SSE-S3.
|
1211
|
+
# @return [String]
|
1212
|
+
#
|
1181
1213
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartDocumentTextDetectionRequest AWS API Documentation
|
1182
1214
|
#
|
1183
1215
|
class StartDocumentTextDetectionRequest < Struct.new(
|
@@ -1185,7 +1217,8 @@ module Aws::Textract
|
|
1185
1217
|
:client_request_token,
|
1186
1218
|
:job_tag,
|
1187
1219
|
:notification_channel,
|
1188
|
-
:output_config
|
1220
|
+
:output_config,
|
1221
|
+
:kms_key_id)
|
1189
1222
|
SENSITIVE = []
|
1190
1223
|
include Aws::Structure
|
1191
1224
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-textract
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.22.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: 2020-
|
11
|
+
date: 2020-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|