aws-sdk-textract 1.11.0 → 1.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/aws-sdk-textract.rb +7 -4
- data/lib/aws-sdk-textract/client.rb +185 -82
- data/lib/aws-sdk-textract/client_api.rb +65 -0
- data/lib/aws-sdk-textract/errors.rb +180 -0
- data/lib/aws-sdk-textract/resource.rb +1 -0
- data/lib/aws-sdk-textract/types.rb +371 -108
- metadata +5 -5
@@ -20,6 +20,8 @@ module Aws::Textract
|
|
20
20
|
BlockType = Shapes::StringShape.new(name: 'BlockType')
|
21
21
|
BoundingBox = Shapes::StructureShape.new(name: 'BoundingBox')
|
22
22
|
ClientRequestToken = Shapes::StringShape.new(name: 'ClientRequestToken')
|
23
|
+
ContentClassifier = Shapes::StringShape.new(name: 'ContentClassifier')
|
24
|
+
ContentClassifiers = Shapes::ListShape.new(name: 'ContentClassifiers')
|
23
25
|
DetectDocumentTextRequest = Shapes::StructureShape.new(name: 'DetectDocumentTextRequest')
|
24
26
|
DetectDocumentTextResponse = Shapes::StructureShape.new(name: 'DetectDocumentTextResponse')
|
25
27
|
Document = Shapes::StructureShape.new(name: 'Document')
|
@@ -32,11 +34,21 @@ module Aws::Textract
|
|
32
34
|
FeatureType = Shapes::StringShape.new(name: 'FeatureType')
|
33
35
|
FeatureTypes = Shapes::ListShape.new(name: 'FeatureTypes')
|
34
36
|
Float = Shapes::FloatShape.new(name: 'Float')
|
37
|
+
FlowDefinitionArn = Shapes::StringShape.new(name: 'FlowDefinitionArn')
|
35
38
|
Geometry = Shapes::StructureShape.new(name: 'Geometry')
|
36
39
|
GetDocumentAnalysisRequest = Shapes::StructureShape.new(name: 'GetDocumentAnalysisRequest')
|
37
40
|
GetDocumentAnalysisResponse = Shapes::StructureShape.new(name: 'GetDocumentAnalysisResponse')
|
38
41
|
GetDocumentTextDetectionRequest = Shapes::StructureShape.new(name: 'GetDocumentTextDetectionRequest')
|
39
42
|
GetDocumentTextDetectionResponse = Shapes::StructureShape.new(name: 'GetDocumentTextDetectionResponse')
|
43
|
+
HumanLoopActivationConditionsEvaluationResults = Shapes::StringShape.new(name: 'HumanLoopActivationConditionsEvaluationResults')
|
44
|
+
HumanLoopActivationOutput = Shapes::StructureShape.new(name: 'HumanLoopActivationOutput')
|
45
|
+
HumanLoopActivationReason = Shapes::StringShape.new(name: 'HumanLoopActivationReason')
|
46
|
+
HumanLoopActivationReasons = Shapes::ListShape.new(name: 'HumanLoopActivationReasons')
|
47
|
+
HumanLoopArn = Shapes::StringShape.new(name: 'HumanLoopArn')
|
48
|
+
HumanLoopConfig = Shapes::StructureShape.new(name: 'HumanLoopConfig')
|
49
|
+
HumanLoopDataAttributes = Shapes::StructureShape.new(name: 'HumanLoopDataAttributes')
|
50
|
+
HumanLoopName = Shapes::StringShape.new(name: 'HumanLoopName')
|
51
|
+
HumanLoopQuotaExceededException = Shapes::StructureShape.new(name: 'HumanLoopQuotaExceededException')
|
40
52
|
IdList = Shapes::ListShape.new(name: 'IdList')
|
41
53
|
IdempotentParameterMismatchException = Shapes::StructureShape.new(name: 'IdempotentParameterMismatchException')
|
42
54
|
ImageBlob = Shapes::BlobShape.new(name: 'ImageBlob')
|
@@ -79,14 +91,21 @@ module Aws::Textract
|
|
79
91
|
Warning = Shapes::StructureShape.new(name: 'Warning')
|
80
92
|
Warnings = Shapes::ListShape.new(name: 'Warnings')
|
81
93
|
|
94
|
+
AccessDeniedException.struct_class = Types::AccessDeniedException
|
95
|
+
|
82
96
|
AnalyzeDocumentRequest.add_member(:document, Shapes::ShapeRef.new(shape: Document, required: true, location_name: "Document"))
|
83
97
|
AnalyzeDocumentRequest.add_member(:feature_types, Shapes::ShapeRef.new(shape: FeatureTypes, required: true, location_name: "FeatureTypes"))
|
98
|
+
AnalyzeDocumentRequest.add_member(:human_loop_config, Shapes::ShapeRef.new(shape: HumanLoopConfig, location_name: "HumanLoopConfig"))
|
84
99
|
AnalyzeDocumentRequest.struct_class = Types::AnalyzeDocumentRequest
|
85
100
|
|
86
101
|
AnalyzeDocumentResponse.add_member(:document_metadata, Shapes::ShapeRef.new(shape: DocumentMetadata, location_name: "DocumentMetadata"))
|
87
102
|
AnalyzeDocumentResponse.add_member(:blocks, Shapes::ShapeRef.new(shape: BlockList, location_name: "Blocks"))
|
103
|
+
AnalyzeDocumentResponse.add_member(:human_loop_activation_output, Shapes::ShapeRef.new(shape: HumanLoopActivationOutput, location_name: "HumanLoopActivationOutput"))
|
104
|
+
AnalyzeDocumentResponse.add_member(:analyze_document_model_version, Shapes::ShapeRef.new(shape: String, location_name: "AnalyzeDocumentModelVersion"))
|
88
105
|
AnalyzeDocumentResponse.struct_class = Types::AnalyzeDocumentResponse
|
89
106
|
|
107
|
+
BadDocumentException.struct_class = Types::BadDocumentException
|
108
|
+
|
90
109
|
Block.add_member(:block_type, Shapes::ShapeRef.new(shape: BlockType, location_name: "BlockType"))
|
91
110
|
Block.add_member(:confidence, Shapes::ShapeRef.new(shape: Percent, location_name: "Confidence"))
|
92
111
|
Block.add_member(:text, Shapes::ShapeRef.new(shape: String, location_name: "Text"))
|
@@ -110,11 +129,14 @@ module Aws::Textract
|
|
110
129
|
BoundingBox.add_member(:top, Shapes::ShapeRef.new(shape: Float, location_name: "Top"))
|
111
130
|
BoundingBox.struct_class = Types::BoundingBox
|
112
131
|
|
132
|
+
ContentClassifiers.member = Shapes::ShapeRef.new(shape: ContentClassifier)
|
133
|
+
|
113
134
|
DetectDocumentTextRequest.add_member(:document, Shapes::ShapeRef.new(shape: Document, required: true, location_name: "Document"))
|
114
135
|
DetectDocumentTextRequest.struct_class = Types::DetectDocumentTextRequest
|
115
136
|
|
116
137
|
DetectDocumentTextResponse.add_member(:document_metadata, Shapes::ShapeRef.new(shape: DocumentMetadata, location_name: "DocumentMetadata"))
|
117
138
|
DetectDocumentTextResponse.add_member(:blocks, Shapes::ShapeRef.new(shape: BlockList, location_name: "Blocks"))
|
139
|
+
DetectDocumentTextResponse.add_member(:detect_document_text_model_version, Shapes::ShapeRef.new(shape: String, location_name: "DetectDocumentTextModelVersion"))
|
118
140
|
DetectDocumentTextResponse.struct_class = Types::DetectDocumentTextResponse
|
119
141
|
|
120
142
|
Document.add_member(:bytes, Shapes::ShapeRef.new(shape: ImageBlob, location_name: "Bytes"))
|
@@ -127,6 +149,8 @@ module Aws::Textract
|
|
127
149
|
DocumentMetadata.add_member(:pages, Shapes::ShapeRef.new(shape: UInteger, location_name: "Pages"))
|
128
150
|
DocumentMetadata.struct_class = Types::DocumentMetadata
|
129
151
|
|
152
|
+
DocumentTooLargeException.struct_class = Types::DocumentTooLargeException
|
153
|
+
|
130
154
|
EntityTypes.member = Shapes::ShapeRef.new(shape: EntityType)
|
131
155
|
|
132
156
|
FeatureTypes.member = Shapes::ShapeRef.new(shape: FeatureType)
|
@@ -146,6 +170,7 @@ module Aws::Textract
|
|
146
170
|
GetDocumentAnalysisResponse.add_member(:blocks, Shapes::ShapeRef.new(shape: BlockList, location_name: "Blocks"))
|
147
171
|
GetDocumentAnalysisResponse.add_member(:warnings, Shapes::ShapeRef.new(shape: Warnings, location_name: "Warnings"))
|
148
172
|
GetDocumentAnalysisResponse.add_member(:status_message, Shapes::ShapeRef.new(shape: StatusMessage, location_name: "StatusMessage"))
|
173
|
+
GetDocumentAnalysisResponse.add_member(:analyze_document_model_version, Shapes::ShapeRef.new(shape: String, location_name: "AnalyzeDocumentModelVersion"))
|
149
174
|
GetDocumentAnalysisResponse.struct_class = Types::GetDocumentAnalysisResponse
|
150
175
|
|
151
176
|
GetDocumentTextDetectionRequest.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, required: true, location_name: "JobId"))
|
@@ -159,10 +184,43 @@ module Aws::Textract
|
|
159
184
|
GetDocumentTextDetectionResponse.add_member(:blocks, Shapes::ShapeRef.new(shape: BlockList, location_name: "Blocks"))
|
160
185
|
GetDocumentTextDetectionResponse.add_member(:warnings, Shapes::ShapeRef.new(shape: Warnings, location_name: "Warnings"))
|
161
186
|
GetDocumentTextDetectionResponse.add_member(:status_message, Shapes::ShapeRef.new(shape: StatusMessage, location_name: "StatusMessage"))
|
187
|
+
GetDocumentTextDetectionResponse.add_member(:detect_document_text_model_version, Shapes::ShapeRef.new(shape: String, location_name: "DetectDocumentTextModelVersion"))
|
162
188
|
GetDocumentTextDetectionResponse.struct_class = Types::GetDocumentTextDetectionResponse
|
163
189
|
|
190
|
+
HumanLoopActivationOutput.add_member(:human_loop_arn, Shapes::ShapeRef.new(shape: HumanLoopArn, location_name: "HumanLoopArn"))
|
191
|
+
HumanLoopActivationOutput.add_member(:human_loop_activation_reasons, Shapes::ShapeRef.new(shape: HumanLoopActivationReasons, location_name: "HumanLoopActivationReasons"))
|
192
|
+
HumanLoopActivationOutput.add_member(:human_loop_activation_conditions_evaluation_results, Shapes::ShapeRef.new(shape: HumanLoopActivationConditionsEvaluationResults, location_name: "HumanLoopActivationConditionsEvaluationResults", metadata: {"jsonvalue"=>true}))
|
193
|
+
HumanLoopActivationOutput.struct_class = Types::HumanLoopActivationOutput
|
194
|
+
|
195
|
+
HumanLoopActivationReasons.member = Shapes::ShapeRef.new(shape: HumanLoopActivationReason)
|
196
|
+
|
197
|
+
HumanLoopConfig.add_member(:human_loop_name, Shapes::ShapeRef.new(shape: HumanLoopName, required: true, location_name: "HumanLoopName"))
|
198
|
+
HumanLoopConfig.add_member(:flow_definition_arn, Shapes::ShapeRef.new(shape: FlowDefinitionArn, required: true, location_name: "FlowDefinitionArn"))
|
199
|
+
HumanLoopConfig.add_member(:data_attributes, Shapes::ShapeRef.new(shape: HumanLoopDataAttributes, location_name: "DataAttributes"))
|
200
|
+
HumanLoopConfig.struct_class = Types::HumanLoopConfig
|
201
|
+
|
202
|
+
HumanLoopDataAttributes.add_member(:content_classifiers, Shapes::ShapeRef.new(shape: ContentClassifiers, location_name: "ContentClassifiers"))
|
203
|
+
HumanLoopDataAttributes.struct_class = Types::HumanLoopDataAttributes
|
204
|
+
|
205
|
+
HumanLoopQuotaExceededException.add_member(:resource_type, Shapes::ShapeRef.new(shape: String, location_name: "ResourceType"))
|
206
|
+
HumanLoopQuotaExceededException.add_member(:quota_code, Shapes::ShapeRef.new(shape: String, location_name: "QuotaCode"))
|
207
|
+
HumanLoopQuotaExceededException.add_member(:service_code, Shapes::ShapeRef.new(shape: String, location_name: "ServiceCode"))
|
208
|
+
HumanLoopQuotaExceededException.struct_class = Types::HumanLoopQuotaExceededException
|
209
|
+
|
164
210
|
IdList.member = Shapes::ShapeRef.new(shape: NonEmptyString)
|
165
211
|
|
212
|
+
IdempotentParameterMismatchException.struct_class = Types::IdempotentParameterMismatchException
|
213
|
+
|
214
|
+
InternalServerError.struct_class = Types::InternalServerError
|
215
|
+
|
216
|
+
InvalidJobIdException.struct_class = Types::InvalidJobIdException
|
217
|
+
|
218
|
+
InvalidParameterException.struct_class = Types::InvalidParameterException
|
219
|
+
|
220
|
+
InvalidS3ObjectException.struct_class = Types::InvalidS3ObjectException
|
221
|
+
|
222
|
+
LimitExceededException.struct_class = Types::LimitExceededException
|
223
|
+
|
166
224
|
NotificationChannel.add_member(:sns_topic_arn, Shapes::ShapeRef.new(shape: SNSTopicArn, required: true, location_name: "SNSTopicArn"))
|
167
225
|
NotificationChannel.add_member(:role_arn, Shapes::ShapeRef.new(shape: RoleArn, required: true, location_name: "RoleArn"))
|
168
226
|
NotificationChannel.struct_class = Types::NotificationChannel
|
@@ -175,6 +233,8 @@ module Aws::Textract
|
|
175
233
|
|
176
234
|
Polygon.member = Shapes::ShapeRef.new(shape: Point)
|
177
235
|
|
236
|
+
ProvisionedThroughputExceededException.struct_class = Types::ProvisionedThroughputExceededException
|
237
|
+
|
178
238
|
Relationship.add_member(:type, Shapes::ShapeRef.new(shape: RelationshipType, location_name: "Type"))
|
179
239
|
Relationship.add_member(:ids, Shapes::ShapeRef.new(shape: IdList, location_name: "Ids"))
|
180
240
|
Relationship.struct_class = Types::Relationship
|
@@ -205,6 +265,10 @@ module Aws::Textract
|
|
205
265
|
StartDocumentTextDetectionResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
|
206
266
|
StartDocumentTextDetectionResponse.struct_class = Types::StartDocumentTextDetectionResponse
|
207
267
|
|
268
|
+
ThrottlingException.struct_class = Types::ThrottlingException
|
269
|
+
|
270
|
+
UnsupportedDocumentException.struct_class = Types::UnsupportedDocumentException
|
271
|
+
|
208
272
|
Warning.add_member(:error_code, Shapes::ShapeRef.new(shape: ErrorCode, location_name: "ErrorCode"))
|
209
273
|
Warning.add_member(:pages, Shapes::ShapeRef.new(shape: Pages, location_name: "Pages"))
|
210
274
|
Warning.struct_class = Types::Warning
|
@@ -244,6 +308,7 @@ module Aws::Textract
|
|
244
308
|
o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
|
245
309
|
o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
|
246
310
|
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
311
|
+
o.errors << Shapes::ShapeRef.new(shape: HumanLoopQuotaExceededException)
|
247
312
|
end)
|
248
313
|
|
249
314
|
api.add_operation(:detect_document_text, Seahorse::Model::Operation.new.tap do |o|
|
@@ -6,9 +6,189 @@
|
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
8
|
module Aws::Textract
|
9
|
+
|
10
|
+
# When Textract returns an error response, the Ruby SDK constructs and raises an error.
|
11
|
+
# These errors all extend Aws::Textract::Errors::ServiceError < {Aws::Errors::ServiceError}
|
12
|
+
#
|
13
|
+
# You can rescue all Textract errors using ServiceError:
|
14
|
+
#
|
15
|
+
# begin
|
16
|
+
# # do stuff
|
17
|
+
# rescue Aws::Textract::Errors::ServiceError
|
18
|
+
# # rescues all Textract API errors
|
19
|
+
# end
|
20
|
+
#
|
21
|
+
#
|
22
|
+
# ## Request Context
|
23
|
+
# ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
|
24
|
+
# information about the request that generated the error.
|
25
|
+
# See {Seahorse::Client::RequestContext} for more information.
|
26
|
+
#
|
27
|
+
# ## Error Classes
|
28
|
+
# * {AccessDeniedException}
|
29
|
+
# * {BadDocumentException}
|
30
|
+
# * {DocumentTooLargeException}
|
31
|
+
# * {HumanLoopQuotaExceededException}
|
32
|
+
# * {IdempotentParameterMismatchException}
|
33
|
+
# * {InternalServerError}
|
34
|
+
# * {InvalidJobIdException}
|
35
|
+
# * {InvalidParameterException}
|
36
|
+
# * {InvalidS3ObjectException}
|
37
|
+
# * {LimitExceededException}
|
38
|
+
# * {ProvisionedThroughputExceededException}
|
39
|
+
# * {ThrottlingException}
|
40
|
+
# * {UnsupportedDocumentException}
|
41
|
+
#
|
42
|
+
# Additionally, error classes are dynamically generated for service errors based on the error code
|
43
|
+
# if they are not defined above.
|
9
44
|
module Errors
|
10
45
|
|
11
46
|
extend Aws::Errors::DynamicErrors
|
12
47
|
|
48
|
+
class AccessDeniedException < ServiceError
|
49
|
+
|
50
|
+
# @param [Seahorse::Client::RequestContext] context
|
51
|
+
# @param [String] message
|
52
|
+
# @param [Aws::Textract::Types::AccessDeniedException] data
|
53
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
54
|
+
super(context, message, data)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
class BadDocumentException < ServiceError
|
59
|
+
|
60
|
+
# @param [Seahorse::Client::RequestContext] context
|
61
|
+
# @param [String] message
|
62
|
+
# @param [Aws::Textract::Types::BadDocumentException] data
|
63
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
64
|
+
super(context, message, data)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
class DocumentTooLargeException < ServiceError
|
69
|
+
|
70
|
+
# @param [Seahorse::Client::RequestContext] context
|
71
|
+
# @param [String] message
|
72
|
+
# @param [Aws::Textract::Types::DocumentTooLargeException] data
|
73
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
74
|
+
super(context, message, data)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
class HumanLoopQuotaExceededException < ServiceError
|
79
|
+
|
80
|
+
# @param [Seahorse::Client::RequestContext] context
|
81
|
+
# @param [String] message
|
82
|
+
# @param [Aws::Textract::Types::HumanLoopQuotaExceededException] data
|
83
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
84
|
+
super(context, message, data)
|
85
|
+
end
|
86
|
+
|
87
|
+
# @return [String]
|
88
|
+
def resource_type
|
89
|
+
@data[:resource_type]
|
90
|
+
end
|
91
|
+
|
92
|
+
# @return [String]
|
93
|
+
def quota_code
|
94
|
+
@data[:quota_code]
|
95
|
+
end
|
96
|
+
|
97
|
+
# @return [String]
|
98
|
+
def service_code
|
99
|
+
@data[:service_code]
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
class IdempotentParameterMismatchException < ServiceError
|
104
|
+
|
105
|
+
# @param [Seahorse::Client::RequestContext] context
|
106
|
+
# @param [String] message
|
107
|
+
# @param [Aws::Textract::Types::IdempotentParameterMismatchException] data
|
108
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
109
|
+
super(context, message, data)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
class InternalServerError < ServiceError
|
114
|
+
|
115
|
+
# @param [Seahorse::Client::RequestContext] context
|
116
|
+
# @param [String] message
|
117
|
+
# @param [Aws::Textract::Types::InternalServerError] data
|
118
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
119
|
+
super(context, message, data)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
class InvalidJobIdException < ServiceError
|
124
|
+
|
125
|
+
# @param [Seahorse::Client::RequestContext] context
|
126
|
+
# @param [String] message
|
127
|
+
# @param [Aws::Textract::Types::InvalidJobIdException] data
|
128
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
129
|
+
super(context, message, data)
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
class InvalidParameterException < ServiceError
|
134
|
+
|
135
|
+
# @param [Seahorse::Client::RequestContext] context
|
136
|
+
# @param [String] message
|
137
|
+
# @param [Aws::Textract::Types::InvalidParameterException] data
|
138
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
139
|
+
super(context, message, data)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
class InvalidS3ObjectException < ServiceError
|
144
|
+
|
145
|
+
# @param [Seahorse::Client::RequestContext] context
|
146
|
+
# @param [String] message
|
147
|
+
# @param [Aws::Textract::Types::InvalidS3ObjectException] data
|
148
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
149
|
+
super(context, message, data)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
class LimitExceededException < ServiceError
|
154
|
+
|
155
|
+
# @param [Seahorse::Client::RequestContext] context
|
156
|
+
# @param [String] message
|
157
|
+
# @param [Aws::Textract::Types::LimitExceededException] data
|
158
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
159
|
+
super(context, message, data)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
class ProvisionedThroughputExceededException < ServiceError
|
164
|
+
|
165
|
+
# @param [Seahorse::Client::RequestContext] context
|
166
|
+
# @param [String] message
|
167
|
+
# @param [Aws::Textract::Types::ProvisionedThroughputExceededException] data
|
168
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
169
|
+
super(context, message, data)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
class ThrottlingException < ServiceError
|
174
|
+
|
175
|
+
# @param [Seahorse::Client::RequestContext] context
|
176
|
+
# @param [String] message
|
177
|
+
# @param [Aws::Textract::Types::ThrottlingException] data
|
178
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
179
|
+
super(context, message, data)
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
class UnsupportedDocumentException < ServiceError
|
184
|
+
|
185
|
+
# @param [Seahorse::Client::RequestContext] context
|
186
|
+
# @param [String] message
|
187
|
+
# @param [Aws::Textract::Types::UnsupportedDocumentException] data
|
188
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
189
|
+
super(context, message, data)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
13
193
|
end
|
14
194
|
end
|
@@ -8,6 +8,12 @@
|
|
8
8
|
module Aws::Textract
|
9
9
|
module Types
|
10
10
|
|
11
|
+
# You aren't authorized to perform the action.
|
12
|
+
#
|
13
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AccessDeniedException AWS API Documentation
|
14
|
+
#
|
15
|
+
class AccessDeniedException < Aws::EmptyStructure; end
|
16
|
+
|
11
17
|
# @note When making an API call, you may pass AnalyzeDocumentRequest
|
12
18
|
# data as a hash:
|
13
19
|
#
|
@@ -21,31 +27,47 @@ module Aws::Textract
|
|
21
27
|
# },
|
22
28
|
# },
|
23
29
|
# feature_types: ["TABLES"], # required, accepts TABLES, FORMS
|
30
|
+
# human_loop_config: {
|
31
|
+
# human_loop_name: "HumanLoopName", # required
|
32
|
+
# flow_definition_arn: "FlowDefinitionArn", # required
|
33
|
+
# data_attributes: {
|
34
|
+
# content_classifiers: ["FreeOfPersonallyIdentifiableInformation"], # accepts FreeOfPersonallyIdentifiableInformation, FreeOfAdultContent
|
35
|
+
# },
|
36
|
+
# },
|
24
37
|
# }
|
25
38
|
#
|
26
39
|
# @!attribute [rw] document
|
27
40
|
# The input document as base64-encoded bytes or an Amazon S3 object.
|
28
41
|
# If you use the AWS CLI to call Amazon Textract operations, you
|
29
|
-
# can't pass image bytes. The document must be an image in
|
30
|
-
# format.
|
42
|
+
# can't pass image bytes. The document must be an image in JPEG or
|
43
|
+
# PNG format.
|
31
44
|
#
|
32
|
-
# If you
|
33
|
-
# need to base64-encode image bytes passed using the `Bytes`
|
45
|
+
# If you're using an AWS SDK to call Amazon Textract, you might not
|
46
|
+
# need to base64-encode image bytes that are passed using the `Bytes`
|
47
|
+
# field.
|
34
48
|
# @return [Types::Document]
|
35
49
|
#
|
36
50
|
# @!attribute [rw] feature_types
|
37
51
|
# A list of the types of analysis to perform. Add TABLES to the list
|
38
|
-
# to return information about the tables detected in the
|
39
|
-
# document. Add FORMS to return detected
|
40
|
-
#
|
41
|
-
#
|
52
|
+
# to return information about the tables that are detected in the
|
53
|
+
# input document. Add FORMS to return detected form data. To perform
|
54
|
+
# both types of analysis, add TABLES and FORMS to `FeatureTypes`. All
|
55
|
+
# lines and words detected in the document are included in the
|
56
|
+
# response (including text that isn't related to the value of
|
57
|
+
# `FeatureTypes`).
|
42
58
|
# @return [Array<String>]
|
43
59
|
#
|
60
|
+
# @!attribute [rw] human_loop_config
|
61
|
+
# Sets the configuration for the human in the loop workflow for
|
62
|
+
# analyzing documents.
|
63
|
+
# @return [Types::HumanLoopConfig]
|
64
|
+
#
|
44
65
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeDocumentRequest AWS API Documentation
|
45
66
|
#
|
46
67
|
class AnalyzeDocumentRequest < Struct.new(
|
47
68
|
:document,
|
48
|
-
:feature_types
|
69
|
+
:feature_types,
|
70
|
+
:human_loop_config)
|
49
71
|
include Aws::Structure
|
50
72
|
end
|
51
73
|
|
@@ -55,24 +77,40 @@ module Aws::Textract
|
|
55
77
|
# @return [Types::DocumentMetadata]
|
56
78
|
#
|
57
79
|
# @!attribute [rw] blocks
|
58
|
-
# The
|
80
|
+
# The items that are detected and analyzed by `AnalyzeDocument`.
|
59
81
|
# @return [Array<Types::Block>]
|
60
82
|
#
|
83
|
+
# @!attribute [rw] human_loop_activation_output
|
84
|
+
# Shows the results of the human in the loop evaluation.
|
85
|
+
# @return [Types::HumanLoopActivationOutput]
|
86
|
+
#
|
87
|
+
# @!attribute [rw] analyze_document_model_version
|
88
|
+
# The version of the model used to analyze the document.
|
89
|
+
# @return [String]
|
90
|
+
#
|
61
91
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeDocumentResponse AWS API Documentation
|
62
92
|
#
|
63
93
|
class AnalyzeDocumentResponse < Struct.new(
|
64
94
|
:document_metadata,
|
65
|
-
:blocks
|
95
|
+
:blocks,
|
96
|
+
:human_loop_activation_output,
|
97
|
+
:analyze_document_model_version)
|
66
98
|
include Aws::Structure
|
67
99
|
end
|
68
100
|
|
101
|
+
# Amazon Textract isn't able to read the document.
|
102
|
+
#
|
103
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/BadDocumentException AWS API Documentation
|
104
|
+
#
|
105
|
+
class BadDocumentException < Aws::EmptyStructure; end
|
106
|
+
|
69
107
|
# A `Block` represents items that are recognized in a document within a
|
70
108
|
# group of pixels close to each other. The information returned in a
|
71
|
-
# `Block` depends on the type of operation. In
|
72
|
-
# (for example DetectDocumentText), you get information about
|
73
|
-
# detected words and lines of text. In text analysis (for example
|
109
|
+
# `Block` object depends on the type of operation. In text detection for
|
110
|
+
# documents (for example DetectDocumentText), you get information about
|
111
|
+
# the detected words and lines of text. In text analysis (for example
|
74
112
|
# AnalyzeDocument), you can also get information about the fields,
|
75
|
-
# tables and selection elements that are detected in the document.
|
113
|
+
# tables, and selection elements that are detected in the document.
|
76
114
|
#
|
77
115
|
# An array of `Block` objects is returned by both synchronous and
|
78
116
|
# asynchronous operations. In synchronous operations, such as
|
@@ -87,51 +125,51 @@ module Aws::Textract
|
|
87
125
|
# [1]: https://docs.aws.amazon.com/textract/latest/dg/how-it-works.html
|
88
126
|
#
|
89
127
|
# @!attribute [rw] block_type
|
90
|
-
# The type of text that's recognized
|
91
|
-
#
|
128
|
+
# The type of text item that's recognized. In operations for text
|
129
|
+
# detection, the following types are returned:
|
92
130
|
#
|
93
|
-
# * *PAGE* - Contains a list of the LINE Block objects that are
|
131
|
+
# * *PAGE* - Contains a list of the LINE `Block` objects that are
|
94
132
|
# detected on a document page.
|
95
133
|
#
|
96
134
|
# * *WORD* - A word detected on a document page. A word is one or more
|
97
135
|
# ISO basic Latin script characters that aren't separated by
|
98
136
|
# spaces.
|
99
137
|
#
|
100
|
-
# * *LINE* - A string of tab-delimited, contiguous words that
|
138
|
+
# * *LINE* - A string of tab-delimited, contiguous words that are
|
101
139
|
# detected on a document page.
|
102
140
|
#
|
103
141
|
# In text analysis operations, the following types are returned:
|
104
142
|
#
|
105
|
-
# * *PAGE* - Contains a list of child Block objects that are
|
106
|
-
# on a document page.
|
143
|
+
# * *PAGE* - Contains a list of child `Block` objects that are
|
144
|
+
# detected on a document page.
|
107
145
|
#
|
108
|
-
# * *KEY\_VALUE\_SET* - Stores the KEY and VALUE Block objects for
|
109
|
-
#
|
110
|
-
# field to determine if a KEY\_VALUE\_SET object is a
|
111
|
-
# object or a VALUE Block object.
|
146
|
+
# * *KEY\_VALUE\_SET* - Stores the KEY and VALUE `Block` objects for
|
147
|
+
# linked text that's detected on a document page. Use the
|
148
|
+
# `EntityType` field to determine if a KEY\_VALUE\_SET object is a
|
149
|
+
# KEY `Block` object or a VALUE `Block` object.
|
112
150
|
#
|
113
|
-
# * *WORD* - A word detected on a document page. A word is one
|
114
|
-
# ISO basic Latin script characters that aren't separated
|
115
|
-
#
|
151
|
+
# * *WORD* - A word that's detected on a document page. A word is one
|
152
|
+
# or more ISO basic Latin script characters that aren't separated
|
153
|
+
# by spaces.
|
116
154
|
#
|
117
|
-
# * *LINE* - A string of tab-delimited, contiguous words that
|
155
|
+
# * *LINE* - A string of tab-delimited, contiguous words that are
|
118
156
|
# detected on a document page.
|
119
157
|
#
|
120
158
|
# * *TABLE* - A table that's detected on a document page. A table is
|
121
|
-
#
|
122
|
-
# cell span of
|
159
|
+
# grid-based information with two or more rows or columns, with a
|
160
|
+
# cell span of one row and one column each.
|
123
161
|
#
|
124
162
|
# * *CELL* - A cell within a detected table. The cell is the parent of
|
125
163
|
# the block that contains the text in the cell.
|
126
164
|
#
|
127
|
-
# * *SELECTION\_ELEMENT* - A
|
128
|
-
# or
|
129
|
-
# `SelectionStatus` to determine the
|
130
|
-
# element.
|
165
|
+
# * *SELECTION\_ELEMENT* - A selection element such as an option
|
166
|
+
# button (radio button) or a check box that's detected on a
|
167
|
+
# document page. Use the value of `SelectionStatus` to determine the
|
168
|
+
# status of the selection element.
|
131
169
|
# @return [String]
|
132
170
|
#
|
133
171
|
# @!attribute [rw] confidence
|
134
|
-
# The confidence that Amazon Textract has in the accuracy of the
|
172
|
+
# The confidence score that Amazon Textract has in the accuracy of the
|
135
173
|
# recognized text and the accuracy of the geometry points around the
|
136
174
|
# recognized text.
|
137
175
|
# @return [Float]
|
@@ -153,13 +191,17 @@ module Aws::Textract
|
|
153
191
|
# @return [Integer]
|
154
192
|
#
|
155
193
|
# @!attribute [rw] row_span
|
156
|
-
# The number of rows that a table spans.
|
157
|
-
#
|
194
|
+
# The number of rows that a table cell spans. Currently this value is
|
195
|
+
# always 1, even if the number of rows spanned is greater than 1.
|
196
|
+
# `RowSpan` isn't returned by `DetectDocumentText` and
|
197
|
+
# `GetDocumentTextDetection`.
|
158
198
|
# @return [Integer]
|
159
199
|
#
|
160
200
|
# @!attribute [rw] column_span
|
161
|
-
# The number of columns that a table cell spans.
|
162
|
-
#
|
201
|
+
# The number of columns that a table cell spans. Currently this value
|
202
|
+
# is always 1, even if the number of columns spanned is greater than
|
203
|
+
# 1. `ColumnSpan` isn't returned by `DetectDocumentText` and
|
204
|
+
# `GetDocumentTextDetection`.
|
163
205
|
# @return [Integer]
|
164
206
|
#
|
165
207
|
# @!attribute [rw] geometry
|
@@ -174,7 +216,7 @@ module Aws::Textract
|
|
174
216
|
# @return [String]
|
175
217
|
#
|
176
218
|
# @!attribute [rw] relationships
|
177
|
-
# A list of child blocks of the current block. For example a LINE
|
219
|
+
# A list of child blocks of the current block. For example, a LINE
|
178
220
|
# object has child blocks for each WORD block that's part of the line
|
179
221
|
# of text. There aren't Relationship objects in the list for
|
180
222
|
# relationships that don't exist, such as when the current block has
|
@@ -197,18 +239,18 @@ module Aws::Textract
|
|
197
239
|
# @return [Array<String>]
|
198
240
|
#
|
199
241
|
# @!attribute [rw] selection_status
|
200
|
-
# The selection status of a
|
201
|
-
# or
|
242
|
+
# The selection status of a selection element, such as an option
|
243
|
+
# button or check box.
|
202
244
|
# @return [String]
|
203
245
|
#
|
204
246
|
# @!attribute [rw] page
|
205
|
-
# The page
|
247
|
+
# The page on which a block was detected. `Page` is returned by
|
206
248
|
# asynchronous operations. Page values greater than 1 are only
|
207
|
-
# returned for
|
208
|
-
# image (
|
209
|
-
#
|
210
|
-
#
|
211
|
-
#
|
249
|
+
# returned for multipage documents that are in PDF format. A scanned
|
250
|
+
# image (JPEG/PNG), even if it contains multiple document pages, is
|
251
|
+
# considered to be a single-page document. The value of `Page` is
|
252
|
+
# always 1. Synchronous operations don't return `Page` because every
|
253
|
+
# input document is considered to be a single-page document.
|
212
254
|
# @return [Integer]
|
213
255
|
#
|
214
256
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/Block AWS API Documentation
|
@@ -230,11 +272,11 @@ module Aws::Textract
|
|
230
272
|
include Aws::Structure
|
231
273
|
end
|
232
274
|
|
233
|
-
# The bounding box around the
|
234
|
-
# table cell on a document page. The `left`
|
235
|
-
# (y-coordinate) are coordinates that represent
|
236
|
-
# of the bounding box. Note that the upper-left
|
237
|
-
# the origin (0,0).
|
275
|
+
# The bounding box around the detected page, text, key-value pair,
|
276
|
+
# table, table cell, or selection element on a document page. The `left`
|
277
|
+
# (x-coordinate) and `top` (y-coordinate) are coordinates that represent
|
278
|
+
# the top and left sides of the bounding box. Note that the upper-left
|
279
|
+
# corner of the image is the origin (0,0).
|
238
280
|
#
|
239
281
|
# The `top` and `left` values returned are ratios of the overall
|
240
282
|
# document page size. For example, if the input image is 700 x 200
|
@@ -294,11 +336,12 @@ module Aws::Textract
|
|
294
336
|
# @!attribute [rw] document
|
295
337
|
# The input document as base64-encoded bytes or an Amazon S3 object.
|
296
338
|
# If you use the AWS CLI to call Amazon Textract operations, you
|
297
|
-
# can't pass image bytes. The document must be an image in
|
298
|
-
# format.
|
339
|
+
# can't pass image bytes. The document must be an image in JPEG or
|
340
|
+
# PNG format.
|
299
341
|
#
|
300
|
-
# If you
|
301
|
-
# need to base64-encode image bytes passed using the `Bytes`
|
342
|
+
# If you're using an AWS SDK to call Amazon Textract, you might not
|
343
|
+
# need to base64-encode image bytes that are passed using the `Bytes`
|
344
|
+
# field.
|
302
345
|
# @return [Types::Document]
|
303
346
|
#
|
304
347
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/DetectDocumentTextRequest AWS API Documentation
|
@@ -309,20 +352,24 @@ module Aws::Textract
|
|
309
352
|
end
|
310
353
|
|
311
354
|
# @!attribute [rw] document_metadata
|
312
|
-
# Metadata about the document.
|
313
|
-
# detected in the document.
|
355
|
+
# Metadata about the document. It contains the number of pages that
|
356
|
+
# are detected in the document.
|
314
357
|
# @return [Types::DocumentMetadata]
|
315
358
|
#
|
316
359
|
# @!attribute [rw] blocks
|
317
|
-
# An array of Block objects
|
318
|
-
# document.
|
360
|
+
# An array of `Block` objects that contain the text that's detected
|
361
|
+
# in the document.
|
319
362
|
# @return [Array<Types::Block>]
|
320
363
|
#
|
364
|
+
# @!attribute [rw] detect_document_text_model_version
|
365
|
+
# @return [String]
|
366
|
+
#
|
321
367
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/DetectDocumentTextResponse AWS API Documentation
|
322
368
|
#
|
323
369
|
class DetectDocumentTextResponse < Struct.new(
|
324
370
|
:document_metadata,
|
325
|
-
:blocks
|
371
|
+
:blocks,
|
372
|
+
:detect_document_text_model_version)
|
326
373
|
include Aws::Structure
|
327
374
|
end
|
328
375
|
|
@@ -363,17 +410,17 @@ module Aws::Textract
|
|
363
410
|
# }
|
364
411
|
#
|
365
412
|
# @!attribute [rw] bytes
|
366
|
-
# A blob of
|
413
|
+
# A blob of base64-encoded document bytes. The maximum size of a
|
367
414
|
# document that's provided in a blob of bytes is 5 MB. The document
|
368
|
-
# bytes must be in PNG or
|
415
|
+
# bytes must be in PNG or JPEG format.
|
369
416
|
#
|
370
|
-
# If you
|
417
|
+
# If you're using an AWS SDK to call Amazon Textract, you might not
|
371
418
|
# need to base64-encode image bytes passed using the `Bytes` field.
|
372
419
|
# @return [String]
|
373
420
|
#
|
374
421
|
# @!attribute [rw] s3_object
|
375
422
|
# Identifies an S3 object as the document source. The maximum size of
|
376
|
-
# a document stored in an S3 bucket is 5 MB.
|
423
|
+
# a document that's stored in an S3 bucket is 5 MB.
|
377
424
|
# @return [Types::S3Object]
|
378
425
|
#
|
379
426
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/Document AWS API Documentation
|
@@ -387,7 +434,7 @@ module Aws::Textract
|
|
387
434
|
# The Amazon S3 bucket that contains the document to be processed. It's
|
388
435
|
# used by asynchronous operations such as StartDocumentTextDetection.
|
389
436
|
#
|
390
|
-
# The input document can be an image file in
|
437
|
+
# The input document can be an image file in JPEG or PNG format. It can
|
391
438
|
# also be a file in PDF format.
|
392
439
|
#
|
393
440
|
# @note When making an API call, you may pass DocumentLocation
|
@@ -415,7 +462,7 @@ module Aws::Textract
|
|
415
462
|
# Information about the input document.
|
416
463
|
#
|
417
464
|
# @!attribute [rw] pages
|
418
|
-
# The number of pages detected in the document.
|
465
|
+
# The number of pages that are detected in the document.
|
419
466
|
# @return [Integer]
|
420
467
|
#
|
421
468
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/DocumentMetadata AWS API Documentation
|
@@ -425,17 +472,26 @@ module Aws::Textract
|
|
425
472
|
include Aws::Structure
|
426
473
|
end
|
427
474
|
|
428
|
-
#
|
429
|
-
#
|
475
|
+
# The document can't be processed because it's too large. The maximum
|
476
|
+
# document size for synchronous operations 5 MB. The maximum document
|
477
|
+
# size for asynchronous operations is 500 MB for PDF files.
|
478
|
+
#
|
479
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/DocumentTooLargeException AWS API Documentation
|
480
|
+
#
|
481
|
+
class DocumentTooLargeException < Aws::EmptyStructure; end
|
482
|
+
|
483
|
+
# Information about where the following items are located on a document
|
484
|
+
# page: detected page, text, key-value pairs, tables, table cells, and
|
485
|
+
# selection elements.
|
430
486
|
#
|
431
487
|
# @!attribute [rw] bounding_box
|
432
488
|
# An axis-aligned coarse representation of the location of the
|
433
|
-
# recognized
|
489
|
+
# recognized item on the document page.
|
434
490
|
# @return [Types::BoundingBox]
|
435
491
|
#
|
436
492
|
# @!attribute [rw] polygon
|
437
493
|
# Within the bounding box, a fine-grained polygon around the
|
438
|
-
# recognized
|
494
|
+
# recognized item.
|
439
495
|
# @return [Array<Types::Point>]
|
440
496
|
#
|
441
497
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/Geometry AWS API Documentation
|
@@ -457,7 +513,8 @@ module Aws::Textract
|
|
457
513
|
#
|
458
514
|
# @!attribute [rw] job_id
|
459
515
|
# A unique identifier for the text-detection job. The `JobId` is
|
460
|
-
# returned from `StartDocumentAnalysis`.
|
516
|
+
# returned from `StartDocumentAnalysis`. A `JobId` value is only valid
|
517
|
+
# for 7 days.
|
461
518
|
# @return [String]
|
462
519
|
#
|
463
520
|
# @!attribute [rw] max_results
|
@@ -500,16 +557,19 @@ module Aws::Textract
|
|
500
557
|
# @return [String]
|
501
558
|
#
|
502
559
|
# @!attribute [rw] blocks
|
503
|
-
# The results of the text
|
560
|
+
# The results of the text-analysis operation.
|
504
561
|
# @return [Array<Types::Block>]
|
505
562
|
#
|
506
563
|
# @!attribute [rw] warnings
|
507
|
-
# A list of warnings that occurred during the document
|
564
|
+
# A list of warnings that occurred during the document-analysis
|
508
565
|
# operation.
|
509
566
|
# @return [Array<Types::Warning>]
|
510
567
|
#
|
511
568
|
# @!attribute [rw] status_message
|
512
|
-
# The current status of an asynchronous document
|
569
|
+
# The current status of an asynchronous document-analysis operation.
|
570
|
+
# @return [String]
|
571
|
+
#
|
572
|
+
# @!attribute [rw] analyze_document_model_version
|
513
573
|
# @return [String]
|
514
574
|
#
|
515
575
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetDocumentAnalysisResponse AWS API Documentation
|
@@ -520,7 +580,8 @@ module Aws::Textract
|
|
520
580
|
:next_token,
|
521
581
|
:blocks,
|
522
582
|
:warnings,
|
523
|
-
:status_message
|
583
|
+
:status_message,
|
584
|
+
:analyze_document_model_version)
|
524
585
|
include Aws::Structure
|
525
586
|
end
|
526
587
|
|
@@ -535,7 +596,8 @@ module Aws::Textract
|
|
535
596
|
#
|
536
597
|
# @!attribute [rw] job_id
|
537
598
|
# A unique identifier for the text detection job. The `JobId` is
|
538
|
-
# returned from `StartDocumentTextDetection`.
|
599
|
+
# returned from `StartDocumentTextDetection`. A `JobId` value is only
|
600
|
+
# valid for 7 days.
|
539
601
|
# @return [String]
|
540
602
|
#
|
541
603
|
# @!attribute [rw] max_results
|
@@ -582,13 +644,16 @@ module Aws::Textract
|
|
582
644
|
# @return [Array<Types::Block>]
|
583
645
|
#
|
584
646
|
# @!attribute [rw] warnings
|
585
|
-
# A list of warnings that occurred during the
|
586
|
-
#
|
647
|
+
# A list of warnings that occurred during the text-detection operation
|
648
|
+
# for the document.
|
587
649
|
# @return [Array<Types::Warning>]
|
588
650
|
#
|
589
651
|
# @!attribute [rw] status_message
|
590
|
-
# The current status of an asynchronous
|
591
|
-
#
|
652
|
+
# The current status of an asynchronous text-detection operation for
|
653
|
+
# the document.
|
654
|
+
# @return [String]
|
655
|
+
#
|
656
|
+
# @!attribute [rw] detect_document_text_model_version
|
592
657
|
# @return [String]
|
593
658
|
#
|
594
659
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetDocumentTextDetectionResponse AWS API Documentation
|
@@ -599,10 +664,166 @@ module Aws::Textract
|
|
599
664
|
:next_token,
|
600
665
|
:blocks,
|
601
666
|
:warnings,
|
602
|
-
:status_message
|
667
|
+
:status_message,
|
668
|
+
:detect_document_text_model_version)
|
669
|
+
include Aws::Structure
|
670
|
+
end
|
671
|
+
|
672
|
+
# Shows the results of the human in the loop evaluation. If there is no
|
673
|
+
# HumanLoopArn, the input did not trigger human review.
|
674
|
+
#
|
675
|
+
# @!attribute [rw] human_loop_arn
|
676
|
+
# The Amazon Resource Name (ARN) of the HumanLoop created.
|
677
|
+
# @return [String]
|
678
|
+
#
|
679
|
+
# @!attribute [rw] human_loop_activation_reasons
|
680
|
+
# Shows if and why human review was needed.
|
681
|
+
# @return [Array<String>]
|
682
|
+
#
|
683
|
+
# @!attribute [rw] human_loop_activation_conditions_evaluation_results
|
684
|
+
# Shows the result of condition evaluations, including those
|
685
|
+
# conditions which activated a human review.
|
686
|
+
# @return [String]
|
687
|
+
#
|
688
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/HumanLoopActivationOutput AWS API Documentation
|
689
|
+
#
|
690
|
+
class HumanLoopActivationOutput < Struct.new(
|
691
|
+
:human_loop_arn,
|
692
|
+
:human_loop_activation_reasons,
|
693
|
+
:human_loop_activation_conditions_evaluation_results)
|
603
694
|
include Aws::Structure
|
604
695
|
end
|
605
696
|
|
697
|
+
# Sets up the human review workflow the document will be sent to if one
|
698
|
+
# of the conditions is met. You can also set certain attributes of the
|
699
|
+
# image before review.
|
700
|
+
#
|
701
|
+
# @note When making an API call, you may pass HumanLoopConfig
|
702
|
+
# data as a hash:
|
703
|
+
#
|
704
|
+
# {
|
705
|
+
# human_loop_name: "HumanLoopName", # required
|
706
|
+
# flow_definition_arn: "FlowDefinitionArn", # required
|
707
|
+
# data_attributes: {
|
708
|
+
# content_classifiers: ["FreeOfPersonallyIdentifiableInformation"], # accepts FreeOfPersonallyIdentifiableInformation, FreeOfAdultContent
|
709
|
+
# },
|
710
|
+
# }
|
711
|
+
#
|
712
|
+
# @!attribute [rw] human_loop_name
|
713
|
+
# The name of the human workflow used for this image. This should be
|
714
|
+
# kept unique within a region.
|
715
|
+
# @return [String]
|
716
|
+
#
|
717
|
+
# @!attribute [rw] flow_definition_arn
|
718
|
+
# The Amazon Resource Name (ARN) of the flow definition.
|
719
|
+
# @return [String]
|
720
|
+
#
|
721
|
+
# @!attribute [rw] data_attributes
|
722
|
+
# Sets attributes of the input data.
|
723
|
+
# @return [Types::HumanLoopDataAttributes]
|
724
|
+
#
|
725
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/HumanLoopConfig AWS API Documentation
|
726
|
+
#
|
727
|
+
class HumanLoopConfig < Struct.new(
|
728
|
+
:human_loop_name,
|
729
|
+
:flow_definition_arn,
|
730
|
+
:data_attributes)
|
731
|
+
include Aws::Structure
|
732
|
+
end
|
733
|
+
|
734
|
+
# Allows you to set attributes of the image. Currently, you can declare
|
735
|
+
# an image as free of personally identifiable information and adult
|
736
|
+
# content.
|
737
|
+
#
|
738
|
+
# @note When making an API call, you may pass HumanLoopDataAttributes
|
739
|
+
# data as a hash:
|
740
|
+
#
|
741
|
+
# {
|
742
|
+
# content_classifiers: ["FreeOfPersonallyIdentifiableInformation"], # accepts FreeOfPersonallyIdentifiableInformation, FreeOfAdultContent
|
743
|
+
# }
|
744
|
+
#
|
745
|
+
# @!attribute [rw] content_classifiers
|
746
|
+
# Sets whether the input image is free of personally identifiable
|
747
|
+
# information or adult content.
|
748
|
+
# @return [Array<String>]
|
749
|
+
#
|
750
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/HumanLoopDataAttributes AWS API Documentation
|
751
|
+
#
|
752
|
+
class HumanLoopDataAttributes < Struct.new(
|
753
|
+
:content_classifiers)
|
754
|
+
include Aws::Structure
|
755
|
+
end
|
756
|
+
|
757
|
+
# Indicates you have exceeded the maximum number of active human in the
|
758
|
+
# loop workflows available
|
759
|
+
#
|
760
|
+
# @!attribute [rw] resource_type
|
761
|
+
# @return [String]
|
762
|
+
#
|
763
|
+
# @!attribute [rw] quota_code
|
764
|
+
# @return [String]
|
765
|
+
#
|
766
|
+
# @!attribute [rw] service_code
|
767
|
+
# @return [String]
|
768
|
+
#
|
769
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/HumanLoopQuotaExceededException AWS API Documentation
|
770
|
+
#
|
771
|
+
class HumanLoopQuotaExceededException < Struct.new(
|
772
|
+
:resource_type,
|
773
|
+
:quota_code,
|
774
|
+
:service_code)
|
775
|
+
include Aws::Structure
|
776
|
+
end
|
777
|
+
|
778
|
+
# A `ClientRequestToken` input parameter was reused with an operation,
|
779
|
+
# but at least one of the other input parameters is different from the
|
780
|
+
# previous call to the operation.
|
781
|
+
#
|
782
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/IdempotentParameterMismatchException AWS API Documentation
|
783
|
+
#
|
784
|
+
class IdempotentParameterMismatchException < Aws::EmptyStructure; end
|
785
|
+
|
786
|
+
# Amazon Textract experienced a service issue. Try your call again.
|
787
|
+
#
|
788
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/InternalServerError AWS API Documentation
|
789
|
+
#
|
790
|
+
class InternalServerError < Aws::EmptyStructure; end
|
791
|
+
|
792
|
+
# An invalid job identifier was passed to GetDocumentAnalysis or to
|
793
|
+
# GetDocumentAnalysis.
|
794
|
+
#
|
795
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/InvalidJobIdException AWS API Documentation
|
796
|
+
#
|
797
|
+
class InvalidJobIdException < Aws::EmptyStructure; end
|
798
|
+
|
799
|
+
# An input parameter violated a constraint. For example, in synchronous
|
800
|
+
# operations, an `InvalidParameterException` exception occurs when
|
801
|
+
# neither of the `S3Object` or `Bytes` values are supplied in the
|
802
|
+
# `Document` request parameter. Validate your parameter before calling
|
803
|
+
# the API operation again.
|
804
|
+
#
|
805
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/InvalidParameterException AWS API Documentation
|
806
|
+
#
|
807
|
+
class InvalidParameterException < Aws::EmptyStructure; end
|
808
|
+
|
809
|
+
# Amazon Textract is unable to access the S3 object that's specified in
|
810
|
+
# the request.
|
811
|
+
#
|
812
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/InvalidS3ObjectException AWS API Documentation
|
813
|
+
#
|
814
|
+
class InvalidS3ObjectException < Aws::EmptyStructure; end
|
815
|
+
|
816
|
+
# An Amazon Textract service limit was exceeded. For example, if you
|
817
|
+
# start too many asynchronous jobs concurrently, calls to start
|
818
|
+
# operations (`StartDocumentTextDetection`, for example) raise a
|
819
|
+
# LimitExceededException exception (HTTP status code: 400) until the
|
820
|
+
# number of concurrently running jobs is below the Amazon Textract
|
821
|
+
# service limit.
|
822
|
+
#
|
823
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/LimitExceededException AWS API Documentation
|
824
|
+
#
|
825
|
+
class LimitExceededException < Aws::EmptyStructure; end
|
826
|
+
|
606
827
|
# The Amazon Simple Notification Service (Amazon SNS) topic to which
|
607
828
|
# Amazon Textract publishes the completion status of an asynchronous
|
608
829
|
# document operation, such as StartDocumentTextDetection.
|
@@ -634,10 +855,10 @@ module Aws::Textract
|
|
634
855
|
end
|
635
856
|
|
636
857
|
# The X and Y coordinates of a point on a document page. The X and Y
|
637
|
-
# values returned are ratios of the overall document page size.
|
638
|
-
# example, if the input document is 700 x 200 and the operation
|
639
|
-
# X=0.5 and Y=0.25, then the point is at the (350,50) pixel
|
640
|
-
# on the document page.
|
858
|
+
# values that are returned are ratios of the overall document page size.
|
859
|
+
# For example, if the input document is 700 x 200 and the operation
|
860
|
+
# returns X=0.5 and Y=0.25, then the point is at the (350,50) pixel
|
861
|
+
# coordinate on the document page.
|
641
862
|
#
|
642
863
|
# An array of `Point` objects, `Polygon`, is returned by
|
643
864
|
# DetectDocumentText. `Polygon` represents a fine-grained polygon around
|
@@ -660,6 +881,13 @@ module Aws::Textract
|
|
660
881
|
include Aws::Structure
|
661
882
|
end
|
662
883
|
|
884
|
+
# The number of requests exceeded your throughput limit. If you want to
|
885
|
+
# increase this limit, contact Amazon Textract.
|
886
|
+
#
|
887
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/ProvisionedThroughputExceededException AWS API Documentation
|
888
|
+
#
|
889
|
+
class ProvisionedThroughputExceededException < Aws::EmptyStructure; end
|
890
|
+
|
663
891
|
# Information about how blocks are related to each other. A `Block`
|
664
892
|
# object contains 0 or more `Relation` objects in a list,
|
665
893
|
# `Relationships`. For more information, see Block.
|
@@ -669,7 +897,11 @@ module Aws::Textract
|
|
669
897
|
#
|
670
898
|
# @!attribute [rw] type
|
671
899
|
# The type of relationship that the blocks in the IDs array have with
|
672
|
-
# the current block. The relationship can be `VALUE` or `CHILD`.
|
900
|
+
# the current block. The relationship can be `VALUE` or `CHILD`. A
|
901
|
+
# relationship of type VALUE is a list that contains the ID of the
|
902
|
+
# VALUE block that's associated with the KEY of a key-value pair. A
|
903
|
+
# relationship of type CHILD is a list of IDs that identify WORD
|
904
|
+
# blocks.
|
673
905
|
# @return [String]
|
674
906
|
#
|
675
907
|
# @!attribute [rw] ids
|
@@ -707,8 +939,9 @@ module Aws::Textract
|
|
707
939
|
# @return [String]
|
708
940
|
#
|
709
941
|
# @!attribute [rw] name
|
710
|
-
# The file name of the input document.
|
711
|
-
# or
|
942
|
+
# The file name of the input document. Synchronous operations can use
|
943
|
+
# image files that are in JPEG or PNG format. Asynchronous operations
|
944
|
+
# also support PDF format files.
|
712
945
|
# @return [String]
|
713
946
|
#
|
714
947
|
# @!attribute [rw] version
|
@@ -752,11 +985,11 @@ module Aws::Textract
|
|
752
985
|
# @!attribute [rw] feature_types
|
753
986
|
# A list of the types of analysis to perform. Add TABLES to the list
|
754
987
|
# to return information about the tables that are detected in the
|
755
|
-
# input document. Add FORMS to return detected
|
756
|
-
#
|
757
|
-
#
|
758
|
-
# (
|
759
|
-
#
|
988
|
+
# input document. Add FORMS to return detected form data. To perform
|
989
|
+
# both types of analysis, add TABLES and FORMS to `FeatureTypes`. All
|
990
|
+
# lines and words detected in the document are included in the
|
991
|
+
# response (including text that isn't related to the value of
|
992
|
+
# `FeatureTypes`).
|
760
993
|
# @return [Array<String>]
|
761
994
|
#
|
762
995
|
# @!attribute [rw] client_request_token
|
@@ -764,13 +997,19 @@ module Aws::Textract
|
|
764
997
|
# you use the same token with multiple `StartDocumentAnalysis`
|
765
998
|
# requests, the same `JobId` is returned. Use `ClientRequestToken` to
|
766
999
|
# prevent the same job from being accidentally started more than once.
|
1000
|
+
# For more information, see [Calling Amazon Textract Asynchronous
|
1001
|
+
# Operations][1].
|
1002
|
+
#
|
1003
|
+
#
|
1004
|
+
#
|
1005
|
+
# [1]: https://docs.aws.amazon.com/textract/latest/dg/api-async.html
|
767
1006
|
# @return [String]
|
768
1007
|
#
|
769
1008
|
# @!attribute [rw] job_tag
|
770
|
-
# An identifier you specify that's included in the completion
|
771
|
-
# notification
|
772
|
-
#
|
773
|
-
#
|
1009
|
+
# An identifier that you specify that's included in the completion
|
1010
|
+
# notification published to the Amazon SNS topic. For example, you can
|
1011
|
+
# use `JobTag` to identify the type of document that the completion
|
1012
|
+
# notification corresponds to (such as a tax form or a receipt).
|
774
1013
|
# @return [String]
|
775
1014
|
#
|
776
1015
|
# @!attribute [rw] notification_channel
|
@@ -791,7 +1030,8 @@ module Aws::Textract
|
|
791
1030
|
|
792
1031
|
# @!attribute [rw] job_id
|
793
1032
|
# The identifier for the document text detection job. Use `JobId` to
|
794
|
-
# identify the job in a subsequent call to `GetDocumentAnalysis`.
|
1033
|
+
# identify the job in a subsequent call to `GetDocumentAnalysis`. A
|
1034
|
+
# `JobId` value is only valid for 7 days.
|
795
1035
|
# @return [String]
|
796
1036
|
#
|
797
1037
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartDocumentAnalysisResponse AWS API Documentation
|
@@ -829,13 +1069,19 @@ module Aws::Textract
|
|
829
1069
|
# you use the same token with multiple `StartDocumentTextDetection`
|
830
1070
|
# requests, the same `JobId` is returned. Use `ClientRequestToken` to
|
831
1071
|
# prevent the same job from being accidentally started more than once.
|
1072
|
+
# For more information, see [Calling Amazon Textract Asynchronous
|
1073
|
+
# Operations][1].
|
1074
|
+
#
|
1075
|
+
#
|
1076
|
+
#
|
1077
|
+
# [1]: https://docs.aws.amazon.com/textract/latest/dg/api-async.html
|
832
1078
|
# @return [String]
|
833
1079
|
#
|
834
1080
|
# @!attribute [rw] job_tag
|
835
|
-
# An identifier you specify that's included in the completion
|
836
|
-
# notification
|
837
|
-
#
|
838
|
-
#
|
1081
|
+
# An identifier that you specify that's included in the completion
|
1082
|
+
# notification published to the Amazon SNS topic. For example, you can
|
1083
|
+
# use `JobTag` to identify the type of document that the completion
|
1084
|
+
# notification corresponds to (such as a tax form or a receipt).
|
839
1085
|
# @return [String]
|
840
1086
|
#
|
841
1087
|
# @!attribute [rw] notification_channel
|
@@ -854,8 +1100,10 @@ module Aws::Textract
|
|
854
1100
|
end
|
855
1101
|
|
856
1102
|
# @!attribute [rw] job_id
|
857
|
-
# The identifier
|
858
|
-
# identify the job in a subsequent call to
|
1103
|
+
# The identifier of the text detection job for the document. Use
|
1104
|
+
# `JobId` to identify the job in a subsequent call to
|
1105
|
+
# `GetDocumentTextDetection`. A `JobId` value is only valid for 7
|
1106
|
+
# days.
|
859
1107
|
# @return [String]
|
860
1108
|
#
|
861
1109
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartDocumentTextDetectionResponse AWS API Documentation
|
@@ -865,8 +1113,23 @@ module Aws::Textract
|
|
865
1113
|
include Aws::Structure
|
866
1114
|
end
|
867
1115
|
|
1116
|
+
# Amazon Textract is temporarily unable to process the request. Try your
|
1117
|
+
# call again.
|
1118
|
+
#
|
1119
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/ThrottlingException AWS API Documentation
|
1120
|
+
#
|
1121
|
+
class ThrottlingException < Aws::EmptyStructure; end
|
1122
|
+
|
1123
|
+
# The format of the input document isn't supported. Documents for
|
1124
|
+
# synchronous operations can be in PNG or JPEG format. Documents for
|
1125
|
+
# asynchronous operations can also be in PDF format.
|
1126
|
+
#
|
1127
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/UnsupportedDocumentException AWS API Documentation
|
1128
|
+
#
|
1129
|
+
class UnsupportedDocumentException < Aws::EmptyStructure; end
|
1130
|
+
|
868
1131
|
# A warning about an issue that occurred during asynchronous text
|
869
|
-
# analysis (StartDocumentAnalysis) or asynchronous document
|
1132
|
+
# analysis (StartDocumentAnalysis) or asynchronous document text
|
870
1133
|
# detection (StartDocumentTextDetection).
|
871
1134
|
#
|
872
1135
|
# @!attribute [rw] error_code
|