aws-sdk-textract 1.12.0 → 1.17.0
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 +9 -4
- data/lib/aws-sdk-textract/client.rb +72 -14
- data/lib/aws-sdk-textract/client_api.rb +26 -0
- data/lib/aws-sdk-textract/errors.rb +156 -0
- data/lib/aws-sdk-textract/resource.rb +3 -0
- data/lib/aws-sdk-textract/types.rb +120 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 52c6f685360d88622e4956c9a33061fa21609049dc2dc53339e1e78b5205d006
|
4
|
+
data.tar.gz: 5bb98a06c36728b973127eb8f9cad9251300010841769af7c1a3da952a4b6256
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cbcf99648571186d675d0045c76b3f27f65f6743414f3bded5fa70526bb7aa20b02ab717fbd6008a4d26891a9482dd92c914c1bf59f3520ae0755bfc5d531a6
|
7
|
+
data.tar.gz: 4cddedf3dd529a6fe2bd496ee47855c1adb0d4a72f2bfd9dcd585561a60e82ecc331c7c3759d4c7410cc84f81e2347755e37ccbf504a689e1f268a71e88e7960
|
data/lib/aws-sdk-textract.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
@@ -24,17 +26,20 @@ require_relative 'aws-sdk-textract/customizations'
|
|
24
26
|
# methods each accept a hash of request parameters and return a response
|
25
27
|
# structure.
|
26
28
|
#
|
29
|
+
# textract = Aws::Textract::Client.new
|
30
|
+
# resp = textract.analyze_document(params)
|
31
|
+
#
|
27
32
|
# See {Client} for more information.
|
28
33
|
#
|
29
34
|
# # Errors
|
30
35
|
#
|
31
|
-
# Errors returned from Amazon Textract
|
32
|
-
# extend {Errors::ServiceError}.
|
36
|
+
# Errors returned from Amazon Textract are defined in the
|
37
|
+
# {Errors} module and all extend {Errors::ServiceError}.
|
33
38
|
#
|
34
39
|
# begin
|
35
40
|
# # do stuff
|
36
41
|
# rescue Aws::Textract::Errors::ServiceError
|
37
|
-
# # rescues all
|
42
|
+
# # rescues all Amazon Textract API errors
|
38
43
|
# end
|
39
44
|
#
|
40
45
|
# See {Errors} for more information.
|
@@ -42,6 +47,6 @@ require_relative 'aws-sdk-textract/customizations'
|
|
42
47
|
# @service
|
43
48
|
module Aws::Textract
|
44
49
|
|
45
|
-
GEM_VERSION = '1.
|
50
|
+
GEM_VERSION = '1.17.0'
|
46
51
|
|
47
52
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
@@ -24,12 +26,25 @@ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
|
24
26
|
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
25
27
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
26
28
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
29
|
+
require 'aws-sdk-core/plugins/http_checksum.rb'
|
27
30
|
require 'aws-sdk-core/plugins/signature_v4.rb'
|
28
31
|
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
29
32
|
|
30
33
|
Aws::Plugins::GlobalConfiguration.add_identifier(:textract)
|
31
34
|
|
32
35
|
module Aws::Textract
|
36
|
+
# An API client for Textract. To construct a client, you need to configure a `:region` and `:credentials`.
|
37
|
+
#
|
38
|
+
# client = Aws::Textract::Client.new(
|
39
|
+
# region: region_name,
|
40
|
+
# credentials: credentials,
|
41
|
+
# # ...
|
42
|
+
# )
|
43
|
+
#
|
44
|
+
# For details on configuring region and credentials see
|
45
|
+
# the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
|
46
|
+
#
|
47
|
+
# See {#initialize} for a full list of supported configuration options.
|
33
48
|
class Client < Seahorse::Client::Base
|
34
49
|
|
35
50
|
include Aws::ClientStubs
|
@@ -57,6 +72,7 @@ module Aws::Textract
|
|
57
72
|
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
58
73
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
59
74
|
add_plugin(Aws::Plugins::TransferEncoding)
|
75
|
+
add_plugin(Aws::Plugins::HttpChecksum)
|
60
76
|
add_plugin(Aws::Plugins::SignatureV4)
|
61
77
|
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
62
78
|
|
@@ -93,7 +109,7 @@ module Aws::Textract
|
|
93
109
|
# @option options [required, String] :region
|
94
110
|
# The AWS region to connect to. The configured `:region` is
|
95
111
|
# used to determine the service `:endpoint`. When not passed,
|
96
|
-
# a default `:region` is
|
112
|
+
# a default `:region` is searched for in the following locations:
|
97
113
|
#
|
98
114
|
# * `Aws.config[:region]`
|
99
115
|
# * `ENV['AWS_REGION']`
|
@@ -108,6 +124,12 @@ module Aws::Textract
|
|
108
124
|
# When set to `true`, a thread polling for endpoints will be running in
|
109
125
|
# the background every 60 secs (default). Defaults to `false`.
|
110
126
|
#
|
127
|
+
# @option options [Boolean] :adaptive_retry_wait_to_fill (true)
|
128
|
+
# Used only in `adaptive` retry mode. When true, the request will sleep
|
129
|
+
# until there is sufficent client side capacity to retry the request.
|
130
|
+
# When false, the request will raise a `RetryCapacityNotAvailableError` and will
|
131
|
+
# not retry instead of sleeping.
|
132
|
+
#
|
111
133
|
# @option options [Boolean] :client_side_monitoring (false)
|
112
134
|
# When `true`, client-side metrics will be collected for all API requests from
|
113
135
|
# this client.
|
@@ -132,6 +154,10 @@ module Aws::Textract
|
|
132
154
|
# When `true`, an attempt is made to coerce request parameters into
|
133
155
|
# the required types.
|
134
156
|
#
|
157
|
+
# @option options [Boolean] :correct_clock_skew (true)
|
158
|
+
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
159
|
+
# a clock skew correction and retry requests with skewed client clocks.
|
160
|
+
#
|
135
161
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
136
162
|
# Set to true to disable SDK automatically adding host prefix
|
137
163
|
# to default service endpoint when available.
|
@@ -139,7 +165,7 @@ module Aws::Textract
|
|
139
165
|
# @option options [String] :endpoint
|
140
166
|
# The client endpoint is normally constructed from the `:region`
|
141
167
|
# option. You should only configure an `:endpoint` when connecting
|
142
|
-
# to test endpoints. This should be
|
168
|
+
# to test or custom endpoints. This should be a valid HTTP(S) URI.
|
143
169
|
#
|
144
170
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
145
171
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
@@ -154,7 +180,7 @@ module Aws::Textract
|
|
154
180
|
# requests fetching endpoints information. Defaults to 60 sec.
|
155
181
|
#
|
156
182
|
# @option options [Boolean] :endpoint_discovery (false)
|
157
|
-
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
183
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
158
184
|
#
|
159
185
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
160
186
|
# The log formatter.
|
@@ -166,15 +192,29 @@ module Aws::Textract
|
|
166
192
|
# The Logger instance to send log messages to. If this option
|
167
193
|
# is not set, logging will be disabled.
|
168
194
|
#
|
195
|
+
# @option options [Integer] :max_attempts (3)
|
196
|
+
# An integer representing the maximum number attempts that will be made for
|
197
|
+
# a single request, including the initial attempt. For example,
|
198
|
+
# setting this value to 5 will result in a request being retried up to
|
199
|
+
# 4 times. Used in `standard` and `adaptive` retry modes.
|
200
|
+
#
|
169
201
|
# @option options [String] :profile ("default")
|
170
202
|
# Used when loading credentials from the shared credentials file
|
171
203
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
172
204
|
#
|
205
|
+
# @option options [Proc] :retry_backoff
|
206
|
+
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
207
|
+
# This option is only used in the `legacy` retry mode.
|
208
|
+
#
|
173
209
|
# @option options [Float] :retry_base_delay (0.3)
|
174
|
-
# The base delay in seconds used by the default backoff function.
|
210
|
+
# The base delay in seconds used by the default backoff function. This option
|
211
|
+
# is only used in the `legacy` retry mode.
|
175
212
|
#
|
176
213
|
# @option options [Symbol] :retry_jitter (:none)
|
177
|
-
# A delay randomiser function used by the default backoff function.
|
214
|
+
# A delay randomiser function used by the default backoff function.
|
215
|
+
# Some predefined functions can be referenced by name - :none, :equal, :full,
|
216
|
+
# otherwise a Proc that takes and returns a number. This option is only used
|
217
|
+
# in the `legacy` retry mode.
|
178
218
|
#
|
179
219
|
# @see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
180
220
|
#
|
@@ -182,11 +222,30 @@ module Aws::Textract
|
|
182
222
|
# The maximum number of times to retry failed requests. Only
|
183
223
|
# ~ 500 level server errors and certain ~ 400 level client errors
|
184
224
|
# are retried. Generally, these are throttling errors, data
|
185
|
-
# checksum errors, networking errors, timeout errors
|
186
|
-
# errors from expired credentials.
|
225
|
+
# checksum errors, networking errors, timeout errors, auth errors,
|
226
|
+
# endpoint discovery, and errors from expired credentials.
|
227
|
+
# This option is only used in the `legacy` retry mode.
|
187
228
|
#
|
188
229
|
# @option options [Integer] :retry_max_delay (0)
|
189
|
-
# The maximum number of seconds to delay between retries (0 for no limit)
|
230
|
+
# The maximum number of seconds to delay between retries (0 for no limit)
|
231
|
+
# used by the default backoff function. This option is only used in the
|
232
|
+
# `legacy` retry mode.
|
233
|
+
#
|
234
|
+
# @option options [String] :retry_mode ("legacy")
|
235
|
+
# Specifies which retry algorithm to use. Values are:
|
236
|
+
#
|
237
|
+
# * `legacy` - The pre-existing retry behavior. This is default value if
|
238
|
+
# no retry mode is provided.
|
239
|
+
#
|
240
|
+
# * `standard` - A standardized set of retry rules across the AWS SDKs.
|
241
|
+
# This includes support for retry quotas, which limit the number of
|
242
|
+
# unsuccessful retries a client can make.
|
243
|
+
#
|
244
|
+
# * `adaptive` - An experimental retry mode that includes all the
|
245
|
+
# functionality of `standard` mode along with automatic client side
|
246
|
+
# throttling. This is a provisional mode that may change behavior
|
247
|
+
# in the future.
|
248
|
+
#
|
190
249
|
#
|
191
250
|
# @option options [String] :secret_access_key
|
192
251
|
#
|
@@ -219,16 +278,15 @@ module Aws::Textract
|
|
219
278
|
# requests through. Formatted like 'http://proxy.com:123'.
|
220
279
|
#
|
221
280
|
# @option options [Float] :http_open_timeout (15) The number of
|
222
|
-
# seconds to wait when opening a HTTP session before
|
281
|
+
# seconds to wait when opening a HTTP session before raising a
|
223
282
|
# `Timeout::Error`.
|
224
283
|
#
|
225
284
|
# @option options [Integer] :http_read_timeout (60) The default
|
226
285
|
# number of seconds to wait for response data. This value can
|
227
|
-
# safely be set
|
228
|
-
# per-request on the session yeidled by {#session_for}.
|
286
|
+
# safely be set per-request on the session.
|
229
287
|
#
|
230
288
|
# @option options [Float] :http_idle_timeout (5) The number of
|
231
|
-
# seconds a connection is allowed to sit
|
289
|
+
# seconds a connection is allowed to sit idle before it is
|
232
290
|
# considered stale. Stale connections are closed and removed
|
233
291
|
# from the pool before making a request.
|
234
292
|
#
|
@@ -237,7 +295,7 @@ module Aws::Textract
|
|
237
295
|
# request body. This option has no effect unless the request has
|
238
296
|
# "Expect" header set to "100-continue". Defaults to `nil` which
|
239
297
|
# disables this behaviour. This value can safely be set per
|
240
|
-
# request on the session
|
298
|
+
# request on the session.
|
241
299
|
#
|
242
300
|
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
243
301
|
# HTTP debug output will be sent to the `:logger`.
|
@@ -918,7 +976,7 @@ module Aws::Textract
|
|
918
976
|
params: params,
|
919
977
|
config: config)
|
920
978
|
context[:gem_name] = 'aws-sdk-textract'
|
921
|
-
context[:gem_version] = '1.
|
979
|
+
context[:gem_version] = '1.17.0'
|
922
980
|
Seahorse::Client::Request.new(handlers, context)
|
923
981
|
end
|
924
982
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
@@ -91,6 +93,8 @@ module Aws::Textract
|
|
91
93
|
Warning = Shapes::StructureShape.new(name: 'Warning')
|
92
94
|
Warnings = Shapes::ListShape.new(name: 'Warnings')
|
93
95
|
|
96
|
+
AccessDeniedException.struct_class = Types::AccessDeniedException
|
97
|
+
|
94
98
|
AnalyzeDocumentRequest.add_member(:document, Shapes::ShapeRef.new(shape: Document, required: true, location_name: "Document"))
|
95
99
|
AnalyzeDocumentRequest.add_member(:feature_types, Shapes::ShapeRef.new(shape: FeatureTypes, required: true, location_name: "FeatureTypes"))
|
96
100
|
AnalyzeDocumentRequest.add_member(:human_loop_config, Shapes::ShapeRef.new(shape: HumanLoopConfig, location_name: "HumanLoopConfig"))
|
@@ -102,6 +106,8 @@ module Aws::Textract
|
|
102
106
|
AnalyzeDocumentResponse.add_member(:analyze_document_model_version, Shapes::ShapeRef.new(shape: String, location_name: "AnalyzeDocumentModelVersion"))
|
103
107
|
AnalyzeDocumentResponse.struct_class = Types::AnalyzeDocumentResponse
|
104
108
|
|
109
|
+
BadDocumentException.struct_class = Types::BadDocumentException
|
110
|
+
|
105
111
|
Block.add_member(:block_type, Shapes::ShapeRef.new(shape: BlockType, location_name: "BlockType"))
|
106
112
|
Block.add_member(:confidence, Shapes::ShapeRef.new(shape: Percent, location_name: "Confidence"))
|
107
113
|
Block.add_member(:text, Shapes::ShapeRef.new(shape: String, location_name: "Text"))
|
@@ -145,6 +151,8 @@ module Aws::Textract
|
|
145
151
|
DocumentMetadata.add_member(:pages, Shapes::ShapeRef.new(shape: UInteger, location_name: "Pages"))
|
146
152
|
DocumentMetadata.struct_class = Types::DocumentMetadata
|
147
153
|
|
154
|
+
DocumentTooLargeException.struct_class = Types::DocumentTooLargeException
|
155
|
+
|
148
156
|
EntityTypes.member = Shapes::ShapeRef.new(shape: EntityType)
|
149
157
|
|
150
158
|
FeatureTypes.member = Shapes::ShapeRef.new(shape: FeatureType)
|
@@ -203,6 +211,18 @@ module Aws::Textract
|
|
203
211
|
|
204
212
|
IdList.member = Shapes::ShapeRef.new(shape: NonEmptyString)
|
205
213
|
|
214
|
+
IdempotentParameterMismatchException.struct_class = Types::IdempotentParameterMismatchException
|
215
|
+
|
216
|
+
InternalServerError.struct_class = Types::InternalServerError
|
217
|
+
|
218
|
+
InvalidJobIdException.struct_class = Types::InvalidJobIdException
|
219
|
+
|
220
|
+
InvalidParameterException.struct_class = Types::InvalidParameterException
|
221
|
+
|
222
|
+
InvalidS3ObjectException.struct_class = Types::InvalidS3ObjectException
|
223
|
+
|
224
|
+
LimitExceededException.struct_class = Types::LimitExceededException
|
225
|
+
|
206
226
|
NotificationChannel.add_member(:sns_topic_arn, Shapes::ShapeRef.new(shape: SNSTopicArn, required: true, location_name: "SNSTopicArn"))
|
207
227
|
NotificationChannel.add_member(:role_arn, Shapes::ShapeRef.new(shape: RoleArn, required: true, location_name: "RoleArn"))
|
208
228
|
NotificationChannel.struct_class = Types::NotificationChannel
|
@@ -215,6 +235,8 @@ module Aws::Textract
|
|
215
235
|
|
216
236
|
Polygon.member = Shapes::ShapeRef.new(shape: Point)
|
217
237
|
|
238
|
+
ProvisionedThroughputExceededException.struct_class = Types::ProvisionedThroughputExceededException
|
239
|
+
|
218
240
|
Relationship.add_member(:type, Shapes::ShapeRef.new(shape: RelationshipType, location_name: "Type"))
|
219
241
|
Relationship.add_member(:ids, Shapes::ShapeRef.new(shape: IdList, location_name: "Ids"))
|
220
242
|
Relationship.struct_class = Types::Relationship
|
@@ -245,6 +267,10 @@ module Aws::Textract
|
|
245
267
|
StartDocumentTextDetectionResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
|
246
268
|
StartDocumentTextDetectionResponse.struct_class = Types::StartDocumentTextDetectionResponse
|
247
269
|
|
270
|
+
ThrottlingException.struct_class = Types::ThrottlingException
|
271
|
+
|
272
|
+
UnsupportedDocumentException.struct_class = Types::UnsupportedDocumentException
|
273
|
+
|
248
274
|
Warning.add_member(:error_code, Shapes::ShapeRef.new(shape: ErrorCode, location_name: "ErrorCode"))
|
249
275
|
Warning.add_member(:pages, Shapes::ShapeRef.new(shape: Pages, location_name: "Pages"))
|
250
276
|
Warning.struct_class = Types::Warning
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
@@ -6,10 +8,75 @@
|
|
6
8
|
# WARNING ABOUT GENERATED CODE
|
7
9
|
|
8
10
|
module Aws::Textract
|
11
|
+
|
12
|
+
# When Textract returns an error response, the Ruby SDK constructs and raises an error.
|
13
|
+
# These errors all extend Aws::Textract::Errors::ServiceError < {Aws::Errors::ServiceError}
|
14
|
+
#
|
15
|
+
# You can rescue all Textract errors using ServiceError:
|
16
|
+
#
|
17
|
+
# begin
|
18
|
+
# # do stuff
|
19
|
+
# rescue Aws::Textract::Errors::ServiceError
|
20
|
+
# # rescues all Textract API errors
|
21
|
+
# end
|
22
|
+
#
|
23
|
+
#
|
24
|
+
# ## Request Context
|
25
|
+
# ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
|
26
|
+
# information about the request that generated the error.
|
27
|
+
# See {Seahorse::Client::RequestContext} for more information.
|
28
|
+
#
|
29
|
+
# ## Error Classes
|
30
|
+
# * {AccessDeniedException}
|
31
|
+
# * {BadDocumentException}
|
32
|
+
# * {DocumentTooLargeException}
|
33
|
+
# * {HumanLoopQuotaExceededException}
|
34
|
+
# * {IdempotentParameterMismatchException}
|
35
|
+
# * {InternalServerError}
|
36
|
+
# * {InvalidJobIdException}
|
37
|
+
# * {InvalidParameterException}
|
38
|
+
# * {InvalidS3ObjectException}
|
39
|
+
# * {LimitExceededException}
|
40
|
+
# * {ProvisionedThroughputExceededException}
|
41
|
+
# * {ThrottlingException}
|
42
|
+
# * {UnsupportedDocumentException}
|
43
|
+
#
|
44
|
+
# Additionally, error classes are dynamically generated for service errors based on the error code
|
45
|
+
# if they are not defined above.
|
9
46
|
module Errors
|
10
47
|
|
11
48
|
extend Aws::Errors::DynamicErrors
|
12
49
|
|
50
|
+
class AccessDeniedException < ServiceError
|
51
|
+
|
52
|
+
# @param [Seahorse::Client::RequestContext] context
|
53
|
+
# @param [String] message
|
54
|
+
# @param [Aws::Textract::Types::AccessDeniedException] data
|
55
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
56
|
+
super(context, message, data)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
class BadDocumentException < ServiceError
|
61
|
+
|
62
|
+
# @param [Seahorse::Client::RequestContext] context
|
63
|
+
# @param [String] message
|
64
|
+
# @param [Aws::Textract::Types::BadDocumentException] data
|
65
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
66
|
+
super(context, message, data)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
class DocumentTooLargeException < ServiceError
|
71
|
+
|
72
|
+
# @param [Seahorse::Client::RequestContext] context
|
73
|
+
# @param [String] message
|
74
|
+
# @param [Aws::Textract::Types::DocumentTooLargeException] data
|
75
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
76
|
+
super(context, message, data)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
13
80
|
class HumanLoopQuotaExceededException < ServiceError
|
14
81
|
|
15
82
|
# @param [Seahorse::Client::RequestContext] context
|
@@ -33,7 +100,96 @@ module Aws::Textract
|
|
33
100
|
def service_code
|
34
101
|
@data[:service_code]
|
35
102
|
end
|
103
|
+
end
|
104
|
+
|
105
|
+
class IdempotentParameterMismatchException < ServiceError
|
106
|
+
|
107
|
+
# @param [Seahorse::Client::RequestContext] context
|
108
|
+
# @param [String] message
|
109
|
+
# @param [Aws::Textract::Types::IdempotentParameterMismatchException] data
|
110
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
111
|
+
super(context, message, data)
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
class InternalServerError < ServiceError
|
116
|
+
|
117
|
+
# @param [Seahorse::Client::RequestContext] context
|
118
|
+
# @param [String] message
|
119
|
+
# @param [Aws::Textract::Types::InternalServerError] data
|
120
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
121
|
+
super(context, message, data)
|
122
|
+
end
|
123
|
+
end
|
36
124
|
|
125
|
+
class InvalidJobIdException < ServiceError
|
126
|
+
|
127
|
+
# @param [Seahorse::Client::RequestContext] context
|
128
|
+
# @param [String] message
|
129
|
+
# @param [Aws::Textract::Types::InvalidJobIdException] data
|
130
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
131
|
+
super(context, message, data)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
class InvalidParameterException < ServiceError
|
136
|
+
|
137
|
+
# @param [Seahorse::Client::RequestContext] context
|
138
|
+
# @param [String] message
|
139
|
+
# @param [Aws::Textract::Types::InvalidParameterException] data
|
140
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
141
|
+
super(context, message, data)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
class InvalidS3ObjectException < ServiceError
|
146
|
+
|
147
|
+
# @param [Seahorse::Client::RequestContext] context
|
148
|
+
# @param [String] message
|
149
|
+
# @param [Aws::Textract::Types::InvalidS3ObjectException] data
|
150
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
151
|
+
super(context, message, data)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
class LimitExceededException < ServiceError
|
156
|
+
|
157
|
+
# @param [Seahorse::Client::RequestContext] context
|
158
|
+
# @param [String] message
|
159
|
+
# @param [Aws::Textract::Types::LimitExceededException] data
|
160
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
161
|
+
super(context, message, data)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
class ProvisionedThroughputExceededException < ServiceError
|
166
|
+
|
167
|
+
# @param [Seahorse::Client::RequestContext] context
|
168
|
+
# @param [String] message
|
169
|
+
# @param [Aws::Textract::Types::ProvisionedThroughputExceededException] data
|
170
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
171
|
+
super(context, message, data)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
class ThrottlingException < ServiceError
|
176
|
+
|
177
|
+
# @param [Seahorse::Client::RequestContext] context
|
178
|
+
# @param [String] message
|
179
|
+
# @param [Aws::Textract::Types::ThrottlingException] data
|
180
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
181
|
+
super(context, message, data)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
class UnsupportedDocumentException < ServiceError
|
186
|
+
|
187
|
+
# @param [Seahorse::Client::RequestContext] context
|
188
|
+
# @param [String] message
|
189
|
+
# @param [Aws::Textract::Types::UnsupportedDocumentException] data
|
190
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
191
|
+
super(context, message, data)
|
192
|
+
end
|
37
193
|
end
|
38
194
|
|
39
195
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
@@ -6,6 +8,7 @@
|
|
6
8
|
# WARNING ABOUT GENERATED CODE
|
7
9
|
|
8
10
|
module Aws::Textract
|
11
|
+
|
9
12
|
class Resource
|
10
13
|
|
11
14
|
# @param options ({})
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
@@ -8,6 +10,12 @@
|
|
8
10
|
module Aws::Textract
|
9
11
|
module Types
|
10
12
|
|
13
|
+
# You aren't authorized to perform the action.
|
14
|
+
#
|
15
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AccessDeniedException AWS API Documentation
|
16
|
+
#
|
17
|
+
class AccessDeniedException < Aws::EmptyStructure; end
|
18
|
+
|
11
19
|
# @note When making an API call, you may pass AnalyzeDocumentRequest
|
12
20
|
# data as a hash:
|
13
21
|
#
|
@@ -62,6 +70,7 @@ module Aws::Textract
|
|
62
70
|
:document,
|
63
71
|
:feature_types,
|
64
72
|
:human_loop_config)
|
73
|
+
SENSITIVE = []
|
65
74
|
include Aws::Structure
|
66
75
|
end
|
67
76
|
|
@@ -89,9 +98,16 @@ module Aws::Textract
|
|
89
98
|
:blocks,
|
90
99
|
:human_loop_activation_output,
|
91
100
|
:analyze_document_model_version)
|
101
|
+
SENSITIVE = []
|
92
102
|
include Aws::Structure
|
93
103
|
end
|
94
104
|
|
105
|
+
# Amazon Textract isn't able to read the document.
|
106
|
+
#
|
107
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/BadDocumentException AWS API Documentation
|
108
|
+
#
|
109
|
+
class BadDocumentException < Aws::EmptyStructure; end
|
110
|
+
|
95
111
|
# A `Block` represents items that are recognized in a document within a
|
96
112
|
# group of pixels close to each other. The information returned in a
|
97
113
|
# `Block` object depends on the type of operation. In text detection for
|
@@ -257,6 +273,7 @@ module Aws::Textract
|
|
257
273
|
:entity_types,
|
258
274
|
:selection_status,
|
259
275
|
:page)
|
276
|
+
SENSITIVE = []
|
260
277
|
include Aws::Structure
|
261
278
|
end
|
262
279
|
|
@@ -304,6 +321,7 @@ module Aws::Textract
|
|
304
321
|
:height,
|
305
322
|
:left,
|
306
323
|
:top)
|
324
|
+
SENSITIVE = []
|
307
325
|
include Aws::Structure
|
308
326
|
end
|
309
327
|
|
@@ -336,6 +354,7 @@ module Aws::Textract
|
|
336
354
|
#
|
337
355
|
class DetectDocumentTextRequest < Struct.new(
|
338
356
|
:document)
|
357
|
+
SENSITIVE = []
|
339
358
|
include Aws::Structure
|
340
359
|
end
|
341
360
|
|
@@ -358,6 +377,7 @@ module Aws::Textract
|
|
358
377
|
:document_metadata,
|
359
378
|
:blocks,
|
360
379
|
:detect_document_text_model_version)
|
380
|
+
SENSITIVE = []
|
361
381
|
include Aws::Structure
|
362
382
|
end
|
363
383
|
|
@@ -416,6 +436,7 @@ module Aws::Textract
|
|
416
436
|
class Document < Struct.new(
|
417
437
|
:bytes,
|
418
438
|
:s3_object)
|
439
|
+
SENSITIVE = []
|
419
440
|
include Aws::Structure
|
420
441
|
end
|
421
442
|
|
@@ -444,6 +465,7 @@ module Aws::Textract
|
|
444
465
|
#
|
445
466
|
class DocumentLocation < Struct.new(
|
446
467
|
:s3_object)
|
468
|
+
SENSITIVE = []
|
447
469
|
include Aws::Structure
|
448
470
|
end
|
449
471
|
|
@@ -457,9 +479,18 @@ module Aws::Textract
|
|
457
479
|
#
|
458
480
|
class DocumentMetadata < Struct.new(
|
459
481
|
:pages)
|
482
|
+
SENSITIVE = []
|
460
483
|
include Aws::Structure
|
461
484
|
end
|
462
485
|
|
486
|
+
# The document can't be processed because it's too large. The maximum
|
487
|
+
# document size for synchronous operations 5 MB. The maximum document
|
488
|
+
# size for asynchronous operations is 500 MB for PDF files.
|
489
|
+
#
|
490
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/DocumentTooLargeException AWS API Documentation
|
491
|
+
#
|
492
|
+
class DocumentTooLargeException < Aws::EmptyStructure; end
|
493
|
+
|
463
494
|
# Information about where the following items are located on a document
|
464
495
|
# page: detected page, text, key-value pairs, tables, table cells, and
|
465
496
|
# selection elements.
|
@@ -479,6 +510,7 @@ module Aws::Textract
|
|
479
510
|
class Geometry < Struct.new(
|
480
511
|
:bounding_box,
|
481
512
|
:polygon)
|
513
|
+
SENSITIVE = []
|
482
514
|
include Aws::Structure
|
483
515
|
end
|
484
516
|
|
@@ -517,6 +549,7 @@ module Aws::Textract
|
|
517
549
|
:job_id,
|
518
550
|
:max_results,
|
519
551
|
:next_token)
|
552
|
+
SENSITIVE = []
|
520
553
|
include Aws::Structure
|
521
554
|
end
|
522
555
|
|
@@ -562,6 +595,7 @@ module Aws::Textract
|
|
562
595
|
:warnings,
|
563
596
|
:status_message,
|
564
597
|
:analyze_document_model_version)
|
598
|
+
SENSITIVE = []
|
565
599
|
include Aws::Structure
|
566
600
|
end
|
567
601
|
|
@@ -600,6 +634,7 @@ module Aws::Textract
|
|
600
634
|
:job_id,
|
601
635
|
:max_results,
|
602
636
|
:next_token)
|
637
|
+
SENSITIVE = []
|
603
638
|
include Aws::Structure
|
604
639
|
end
|
605
640
|
|
@@ -646,6 +681,7 @@ module Aws::Textract
|
|
646
681
|
:warnings,
|
647
682
|
:status_message,
|
648
683
|
:detect_document_text_model_version)
|
684
|
+
SENSITIVE = []
|
649
685
|
include Aws::Structure
|
650
686
|
end
|
651
687
|
|
@@ -671,6 +707,7 @@ module Aws::Textract
|
|
671
707
|
:human_loop_arn,
|
672
708
|
:human_loop_activation_reasons,
|
673
709
|
:human_loop_activation_conditions_evaluation_results)
|
710
|
+
SENSITIVE = []
|
674
711
|
include Aws::Structure
|
675
712
|
end
|
676
713
|
|
@@ -708,6 +745,7 @@ module Aws::Textract
|
|
708
745
|
:human_loop_name,
|
709
746
|
:flow_definition_arn,
|
710
747
|
:data_attributes)
|
748
|
+
SENSITIVE = []
|
711
749
|
include Aws::Structure
|
712
750
|
end
|
713
751
|
|
@@ -731,6 +769,7 @@ module Aws::Textract
|
|
731
769
|
#
|
732
770
|
class HumanLoopDataAttributes < Struct.new(
|
733
771
|
:content_classifiers)
|
772
|
+
SENSITIVE = []
|
734
773
|
include Aws::Structure
|
735
774
|
end
|
736
775
|
|
@@ -752,9 +791,59 @@ module Aws::Textract
|
|
752
791
|
:resource_type,
|
753
792
|
:quota_code,
|
754
793
|
:service_code)
|
794
|
+
SENSITIVE = []
|
755
795
|
include Aws::Structure
|
756
796
|
end
|
757
797
|
|
798
|
+
# A `ClientRequestToken` input parameter was reused with an operation,
|
799
|
+
# but at least one of the other input parameters is different from the
|
800
|
+
# previous call to the operation.
|
801
|
+
#
|
802
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/IdempotentParameterMismatchException AWS API Documentation
|
803
|
+
#
|
804
|
+
class IdempotentParameterMismatchException < Aws::EmptyStructure; end
|
805
|
+
|
806
|
+
# Amazon Textract experienced a service issue. Try your call again.
|
807
|
+
#
|
808
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/InternalServerError AWS API Documentation
|
809
|
+
#
|
810
|
+
class InternalServerError < Aws::EmptyStructure; end
|
811
|
+
|
812
|
+
# An invalid job identifier was passed to GetDocumentAnalysis or to
|
813
|
+
# GetDocumentAnalysis.
|
814
|
+
#
|
815
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/InvalidJobIdException AWS API Documentation
|
816
|
+
#
|
817
|
+
class InvalidJobIdException < Aws::EmptyStructure; end
|
818
|
+
|
819
|
+
# An input parameter violated a constraint. For example, in synchronous
|
820
|
+
# operations, an `InvalidParameterException` exception occurs when
|
821
|
+
# neither of the `S3Object` or `Bytes` values are supplied in the
|
822
|
+
# `Document` request parameter. Validate your parameter before calling
|
823
|
+
# the API operation again.
|
824
|
+
#
|
825
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/InvalidParameterException AWS API Documentation
|
826
|
+
#
|
827
|
+
class InvalidParameterException < Aws::EmptyStructure; end
|
828
|
+
|
829
|
+
# Amazon Textract is unable to access the S3 object that's specified in
|
830
|
+
# the request.
|
831
|
+
#
|
832
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/InvalidS3ObjectException AWS API Documentation
|
833
|
+
#
|
834
|
+
class InvalidS3ObjectException < Aws::EmptyStructure; end
|
835
|
+
|
836
|
+
# An Amazon Textract service limit was exceeded. For example, if you
|
837
|
+
# start too many asynchronous jobs concurrently, calls to start
|
838
|
+
# operations (`StartDocumentTextDetection`, for example) raise a
|
839
|
+
# LimitExceededException exception (HTTP status code: 400) until the
|
840
|
+
# number of concurrently running jobs is below the Amazon Textract
|
841
|
+
# service limit.
|
842
|
+
#
|
843
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/LimitExceededException AWS API Documentation
|
844
|
+
#
|
845
|
+
class LimitExceededException < Aws::EmptyStructure; end
|
846
|
+
|
758
847
|
# The Amazon Simple Notification Service (Amazon SNS) topic to which
|
759
848
|
# Amazon Textract publishes the completion status of an asynchronous
|
760
849
|
# document operation, such as StartDocumentTextDetection.
|
@@ -782,6 +871,7 @@ module Aws::Textract
|
|
782
871
|
class NotificationChannel < Struct.new(
|
783
872
|
:sns_topic_arn,
|
784
873
|
:role_arn)
|
874
|
+
SENSITIVE = []
|
785
875
|
include Aws::Structure
|
786
876
|
end
|
787
877
|
|
@@ -809,9 +899,17 @@ module Aws::Textract
|
|
809
899
|
class Point < Struct.new(
|
810
900
|
:x,
|
811
901
|
:y)
|
902
|
+
SENSITIVE = []
|
812
903
|
include Aws::Structure
|
813
904
|
end
|
814
905
|
|
906
|
+
# The number of requests exceeded your throughput limit. If you want to
|
907
|
+
# increase this limit, contact Amazon Textract.
|
908
|
+
#
|
909
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/ProvisionedThroughputExceededException AWS API Documentation
|
910
|
+
#
|
911
|
+
class ProvisionedThroughputExceededException < Aws::EmptyStructure; end
|
912
|
+
|
815
913
|
# Information about how blocks are related to each other. A `Block`
|
816
914
|
# object contains 0 or more `Relation` objects in a list,
|
817
915
|
# `Relationships`. For more information, see Block.
|
@@ -838,6 +936,7 @@ module Aws::Textract
|
|
838
936
|
class Relationship < Struct.new(
|
839
937
|
:type,
|
840
938
|
:ids)
|
939
|
+
SENSITIVE = []
|
841
940
|
include Aws::Structure
|
842
941
|
end
|
843
942
|
|
@@ -879,6 +978,7 @@ module Aws::Textract
|
|
879
978
|
:bucket,
|
880
979
|
:name,
|
881
980
|
:version)
|
981
|
+
SENSITIVE = []
|
882
982
|
include Aws::Structure
|
883
983
|
end
|
884
984
|
|
@@ -949,6 +1049,7 @@ module Aws::Textract
|
|
949
1049
|
:client_request_token,
|
950
1050
|
:job_tag,
|
951
1051
|
:notification_channel)
|
1052
|
+
SENSITIVE = []
|
952
1053
|
include Aws::Structure
|
953
1054
|
end
|
954
1055
|
|
@@ -962,6 +1063,7 @@ module Aws::Textract
|
|
962
1063
|
#
|
963
1064
|
class StartDocumentAnalysisResponse < Struct.new(
|
964
1065
|
:job_id)
|
1066
|
+
SENSITIVE = []
|
965
1067
|
include Aws::Structure
|
966
1068
|
end
|
967
1069
|
|
@@ -1020,6 +1122,7 @@ module Aws::Textract
|
|
1020
1122
|
:client_request_token,
|
1021
1123
|
:job_tag,
|
1022
1124
|
:notification_channel)
|
1125
|
+
SENSITIVE = []
|
1023
1126
|
include Aws::Structure
|
1024
1127
|
end
|
1025
1128
|
|
@@ -1034,9 +1137,25 @@ module Aws::Textract
|
|
1034
1137
|
#
|
1035
1138
|
class StartDocumentTextDetectionResponse < Struct.new(
|
1036
1139
|
:job_id)
|
1140
|
+
SENSITIVE = []
|
1037
1141
|
include Aws::Structure
|
1038
1142
|
end
|
1039
1143
|
|
1144
|
+
# Amazon Textract is temporarily unable to process the request. Try your
|
1145
|
+
# call again.
|
1146
|
+
#
|
1147
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/ThrottlingException AWS API Documentation
|
1148
|
+
#
|
1149
|
+
class ThrottlingException < Aws::EmptyStructure; end
|
1150
|
+
|
1151
|
+
# The format of the input document isn't supported. Documents for
|
1152
|
+
# synchronous operations can be in PNG or JPEG format. Documents for
|
1153
|
+
# asynchronous operations can also be in PDF format.
|
1154
|
+
#
|
1155
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/UnsupportedDocumentException AWS API Documentation
|
1156
|
+
#
|
1157
|
+
class UnsupportedDocumentException < Aws::EmptyStructure; end
|
1158
|
+
|
1040
1159
|
# A warning about an issue that occurred during asynchronous text
|
1041
1160
|
# analysis (StartDocumentAnalysis) or asynchronous document text
|
1042
1161
|
# detection (StartDocumentTextDetection).
|
@@ -1054,6 +1173,7 @@ module Aws::Textract
|
|
1054
1173
|
class Warning < Struct.new(
|
1055
1174
|
:error_code,
|
1056
1175
|
:pages)
|
1176
|
+
SENSITIVE = []
|
1057
1177
|
include Aws::Structure
|
1058
1178
|
end
|
1059
1179
|
|
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.17.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: 2020-06-23 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.99.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.99.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: aws-sigv4
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
81
|
version: '0'
|
82
82
|
requirements: []
|
83
83
|
rubyforge_project:
|
84
|
-
rubygems_version: 2.
|
84
|
+
rubygems_version: 2.7.6.2
|
85
85
|
signing_key:
|
86
86
|
specification_version: 4
|
87
87
|
summary: AWS SDK for Ruby - Amazon Textract
|