aws-sdk-textract 1.28.0 → 1.32.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-textract/client.rb +307 -9
- data/lib/aws-sdk-textract/client_api.rb +123 -0
- data/lib/aws-sdk-textract/types.rb +333 -9
- data/lib/aws-sdk-textract.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df6666495294f9fc6b74bf03c15386b3a277793bf493429cf654bc6b886cdffb
|
4
|
+
data.tar.gz: fa9f0fc72726ac3ce66b790a1c44bf648457676464f35719d71222e3b1e35b37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67e9dfbb0d26731400082b00878c216ab4e31910a4cbaf1c2304d52c75408a9699441f0ba2a209db9955f1ec803becbf7074d1680de6703f5f23592f745c8f30
|
7
|
+
data.tar.gz: e56227ef0f6aea46e6c419bd7a762cee042baa430668712086e9b6096cf123380ff055604758ed7deb1860dda77448b7da33b79a76fa250ad0747aeda07216d9
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,26 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.32.0 (2021-11-29)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - This release adds support for synchronously analyzing identity documents through a new API: AnalyzeID
|
8
|
+
|
9
|
+
1.31.0 (2021-11-04)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
13
|
+
|
14
|
+
1.30.0 (2021-10-27)
|
15
|
+
------------------
|
16
|
+
|
17
|
+
* Feature - This release adds support for asynchronously analyzing invoice and receipt documents through two new APIs: StartExpenseAnalysis and GetExpenseAnalysis
|
18
|
+
|
19
|
+
1.29.0 (2021-10-18)
|
20
|
+
------------------
|
21
|
+
|
22
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
23
|
+
|
4
24
|
1.28.0 (2021-09-01)
|
5
25
|
------------------
|
6
26
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.32.0
|
@@ -285,6 +285,15 @@ module Aws::Textract
|
|
285
285
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
286
286
|
# requests are made, and retries are disabled.
|
287
287
|
#
|
288
|
+
# @option options [Boolean] :use_dualstack_endpoint
|
289
|
+
# When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
|
290
|
+
# will be used if available.
|
291
|
+
#
|
292
|
+
# @option options [Boolean] :use_fips_endpoint
|
293
|
+
# When set to `true`, fips compatible endpoints will be used if available.
|
294
|
+
# When a `fips` region is used, the region is normalized and this config
|
295
|
+
# is set to `true`.
|
296
|
+
#
|
288
297
|
# @option options [Boolean] :validate_params (true)
|
289
298
|
# When `true`, request parameters are validated before
|
290
299
|
# sending the request.
|
@@ -467,8 +476,8 @@ module Aws::Textract
|
|
467
476
|
req.send_request(options)
|
468
477
|
end
|
469
478
|
|
470
|
-
#
|
471
|
-
# between text.
|
479
|
+
# `AnalyzeExpense` synchronously analyzes an input document for
|
480
|
+
# financially related relationships between text.
|
472
481
|
#
|
473
482
|
# Information is returned as `ExpenseDocuments` and seperated as
|
474
483
|
# follows.
|
@@ -585,6 +594,59 @@ module Aws::Textract
|
|
585
594
|
req.send_request(options)
|
586
595
|
end
|
587
596
|
|
597
|
+
# Analyzes identity documents for relevant information. This information
|
598
|
+
# is extracted and returned as `IdentityDocumentFields`, which records
|
599
|
+
# both the normalized field and value of the extracted text.
|
600
|
+
#
|
601
|
+
# @option params [required, Array<Types::Document>] :document_pages
|
602
|
+
# The document being passed to AnalyzeID.
|
603
|
+
#
|
604
|
+
# @return [Types::AnalyzeIDResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
605
|
+
#
|
606
|
+
# * {Types::AnalyzeIDResponse#identity_documents #identity_documents} => Array<Types::IdentityDocument>
|
607
|
+
# * {Types::AnalyzeIDResponse#document_metadata #document_metadata} => Types::DocumentMetadata
|
608
|
+
# * {Types::AnalyzeIDResponse#analyze_id_model_version #analyze_id_model_version} => String
|
609
|
+
#
|
610
|
+
# @example Request syntax with placeholder values
|
611
|
+
#
|
612
|
+
# resp = client.analyze_id({
|
613
|
+
# document_pages: [ # required
|
614
|
+
# {
|
615
|
+
# bytes: "data",
|
616
|
+
# s3_object: {
|
617
|
+
# bucket: "S3Bucket",
|
618
|
+
# name: "S3ObjectName",
|
619
|
+
# version: "S3ObjectVersion",
|
620
|
+
# },
|
621
|
+
# },
|
622
|
+
# ],
|
623
|
+
# })
|
624
|
+
#
|
625
|
+
# @example Response structure
|
626
|
+
#
|
627
|
+
# resp.identity_documents #=> Array
|
628
|
+
# resp.identity_documents[0].document_index #=> Integer
|
629
|
+
# resp.identity_documents[0].identity_document_fields #=> Array
|
630
|
+
# resp.identity_documents[0].identity_document_fields[0].type.text #=> String
|
631
|
+
# resp.identity_documents[0].identity_document_fields[0].type.normalized_value.value #=> String
|
632
|
+
# resp.identity_documents[0].identity_document_fields[0].type.normalized_value.value_type #=> String, one of "DATE"
|
633
|
+
# resp.identity_documents[0].identity_document_fields[0].type.confidence #=> Float
|
634
|
+
# resp.identity_documents[0].identity_document_fields[0].value_detection.text #=> String
|
635
|
+
# resp.identity_documents[0].identity_document_fields[0].value_detection.normalized_value.value #=> String
|
636
|
+
# resp.identity_documents[0].identity_document_fields[0].value_detection.normalized_value.value_type #=> String, one of "DATE"
|
637
|
+
# resp.identity_documents[0].identity_document_fields[0].value_detection.confidence #=> Float
|
638
|
+
# resp.document_metadata.pages #=> Integer
|
639
|
+
# resp.analyze_id_model_version #=> String
|
640
|
+
#
|
641
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeID AWS API Documentation
|
642
|
+
#
|
643
|
+
# @overload analyze_id(params = {})
|
644
|
+
# @param [Hash] params ({})
|
645
|
+
def analyze_id(params = {}, options = {})
|
646
|
+
req = build_request(:analyze_id, params)
|
647
|
+
req.send_request(options)
|
648
|
+
end
|
649
|
+
|
588
650
|
# Detects text in the input document. Amazon Textract can detect lines
|
589
651
|
# of text and the words that make up a line of text. The input document
|
590
652
|
# must be an image in JPEG or PNG format. `DetectDocumentText` returns
|
@@ -922,14 +984,148 @@ module Aws::Textract
|
|
922
984
|
req.send_request(options)
|
923
985
|
end
|
924
986
|
|
987
|
+
# Gets the results for an Amazon Textract asynchronous operation that
|
988
|
+
# analyzes invoices and receipts. Amazon Textract finds contact
|
989
|
+
# information, items purchased, and vendor name, from input invoices and
|
990
|
+
# receipts.
|
991
|
+
#
|
992
|
+
# You start asynchronous invoice/receipt analysis by calling
|
993
|
+
# StartExpenseAnalysis, which returns a job identifier (`JobId`). Upon
|
994
|
+
# completion of the invoice/receipt analysis, Amazon Textract publishes
|
995
|
+
# the completion status to the Amazon Simple Notification Service
|
996
|
+
# (Amazon SNS) topic. This topic must be registered in the initial call
|
997
|
+
# to `StartExpenseAnalysis`. To get the results of the invoice/receipt
|
998
|
+
# analysis operation, first ensure that the status value published to
|
999
|
+
# the Amazon SNS topic is `SUCCEEDED`. If so, call `GetExpenseAnalysis`,
|
1000
|
+
# and pass the job identifier (`JobId`) from the initial call to
|
1001
|
+
# `StartExpenseAnalysis`.
|
1002
|
+
#
|
1003
|
+
# Use the MaxResults parameter to limit the number of blocks that are
|
1004
|
+
# returned. If there are more results than specified in `MaxResults`,
|
1005
|
+
# the value of `NextToken` in the operation response contains a
|
1006
|
+
# pagination token for getting the next set of results. To get the next
|
1007
|
+
# page of results, call `GetExpenseAnalysis`, and populate the
|
1008
|
+
# `NextToken` request parameter with the token value that's returned
|
1009
|
+
# from the previous call to `GetExpenseAnalysis`.
|
1010
|
+
#
|
1011
|
+
# For more information, see [Analyzing Invoices and Receipts][1].
|
1012
|
+
#
|
1013
|
+
#
|
1014
|
+
#
|
1015
|
+
# [1]: https://docs.aws.amazon.com/textract/latest/dg/invoices-receipts.html
|
1016
|
+
#
|
1017
|
+
# @option params [required, String] :job_id
|
1018
|
+
# A unique identifier for the text detection job. The `JobId` is
|
1019
|
+
# returned from `StartExpenseAnalysis`. A `JobId` value is only valid
|
1020
|
+
# for 7 days.
|
1021
|
+
#
|
1022
|
+
# @option params [Integer] :max_results
|
1023
|
+
# The maximum number of results to return per paginated call. The
|
1024
|
+
# largest value you can specify is 20. If you specify a value greater
|
1025
|
+
# than 20, a maximum of 20 results is returned. The default value is 20.
|
1026
|
+
#
|
1027
|
+
# @option params [String] :next_token
|
1028
|
+
# If the previous response was incomplete (because there are more blocks
|
1029
|
+
# to retrieve), Amazon Textract returns a pagination token in the
|
1030
|
+
# response. You can use this pagination token to retrieve the next set
|
1031
|
+
# of blocks.
|
1032
|
+
#
|
1033
|
+
# @return [Types::GetExpenseAnalysisResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1034
|
+
#
|
1035
|
+
# * {Types::GetExpenseAnalysisResponse#document_metadata #document_metadata} => Types::DocumentMetadata
|
1036
|
+
# * {Types::GetExpenseAnalysisResponse#job_status #job_status} => String
|
1037
|
+
# * {Types::GetExpenseAnalysisResponse#next_token #next_token} => String
|
1038
|
+
# * {Types::GetExpenseAnalysisResponse#expense_documents #expense_documents} => Array<Types::ExpenseDocument>
|
1039
|
+
# * {Types::GetExpenseAnalysisResponse#warnings #warnings} => Array<Types::Warning>
|
1040
|
+
# * {Types::GetExpenseAnalysisResponse#status_message #status_message} => String
|
1041
|
+
# * {Types::GetExpenseAnalysisResponse#analyze_expense_model_version #analyze_expense_model_version} => String
|
1042
|
+
#
|
1043
|
+
# @example Request syntax with placeholder values
|
1044
|
+
#
|
1045
|
+
# resp = client.get_expense_analysis({
|
1046
|
+
# job_id: "JobId", # required
|
1047
|
+
# max_results: 1,
|
1048
|
+
# next_token: "PaginationToken",
|
1049
|
+
# })
|
1050
|
+
#
|
1051
|
+
# @example Response structure
|
1052
|
+
#
|
1053
|
+
# resp.document_metadata.pages #=> Integer
|
1054
|
+
# resp.job_status #=> String, one of "IN_PROGRESS", "SUCCEEDED", "FAILED", "PARTIAL_SUCCESS"
|
1055
|
+
# resp.next_token #=> String
|
1056
|
+
# resp.expense_documents #=> Array
|
1057
|
+
# resp.expense_documents[0].expense_index #=> Integer
|
1058
|
+
# resp.expense_documents[0].summary_fields #=> Array
|
1059
|
+
# resp.expense_documents[0].summary_fields[0].type.text #=> String
|
1060
|
+
# resp.expense_documents[0].summary_fields[0].type.confidence #=> Float
|
1061
|
+
# resp.expense_documents[0].summary_fields[0].label_detection.text #=> String
|
1062
|
+
# resp.expense_documents[0].summary_fields[0].label_detection.geometry.bounding_box.width #=> Float
|
1063
|
+
# resp.expense_documents[0].summary_fields[0].label_detection.geometry.bounding_box.height #=> Float
|
1064
|
+
# resp.expense_documents[0].summary_fields[0].label_detection.geometry.bounding_box.left #=> Float
|
1065
|
+
# resp.expense_documents[0].summary_fields[0].label_detection.geometry.bounding_box.top #=> Float
|
1066
|
+
# resp.expense_documents[0].summary_fields[0].label_detection.geometry.polygon #=> Array
|
1067
|
+
# resp.expense_documents[0].summary_fields[0].label_detection.geometry.polygon[0].x #=> Float
|
1068
|
+
# resp.expense_documents[0].summary_fields[0].label_detection.geometry.polygon[0].y #=> Float
|
1069
|
+
# resp.expense_documents[0].summary_fields[0].label_detection.confidence #=> Float
|
1070
|
+
# resp.expense_documents[0].summary_fields[0].value_detection.text #=> String
|
1071
|
+
# resp.expense_documents[0].summary_fields[0].value_detection.geometry.bounding_box.width #=> Float
|
1072
|
+
# resp.expense_documents[0].summary_fields[0].value_detection.geometry.bounding_box.height #=> Float
|
1073
|
+
# resp.expense_documents[0].summary_fields[0].value_detection.geometry.bounding_box.left #=> Float
|
1074
|
+
# resp.expense_documents[0].summary_fields[0].value_detection.geometry.bounding_box.top #=> Float
|
1075
|
+
# resp.expense_documents[0].summary_fields[0].value_detection.geometry.polygon #=> Array
|
1076
|
+
# resp.expense_documents[0].summary_fields[0].value_detection.geometry.polygon[0].x #=> Float
|
1077
|
+
# resp.expense_documents[0].summary_fields[0].value_detection.geometry.polygon[0].y #=> Float
|
1078
|
+
# resp.expense_documents[0].summary_fields[0].value_detection.confidence #=> Float
|
1079
|
+
# resp.expense_documents[0].summary_fields[0].page_number #=> Integer
|
1080
|
+
# resp.expense_documents[0].line_item_groups #=> Array
|
1081
|
+
# resp.expense_documents[0].line_item_groups[0].line_item_group_index #=> Integer
|
1082
|
+
# resp.expense_documents[0].line_item_groups[0].line_items #=> Array
|
1083
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields #=> Array
|
1084
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].type.text #=> String
|
1085
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].type.confidence #=> Float
|
1086
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.text #=> String
|
1087
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.bounding_box.width #=> Float
|
1088
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.bounding_box.height #=> Float
|
1089
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.bounding_box.left #=> Float
|
1090
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.bounding_box.top #=> Float
|
1091
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.polygon #=> Array
|
1092
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.polygon[0].x #=> Float
|
1093
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.geometry.polygon[0].y #=> Float
|
1094
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].label_detection.confidence #=> Float
|
1095
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.text #=> String
|
1096
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.bounding_box.width #=> Float
|
1097
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.bounding_box.height #=> Float
|
1098
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.bounding_box.left #=> Float
|
1099
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.bounding_box.top #=> Float
|
1100
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.polygon #=> Array
|
1101
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.polygon[0].x #=> Float
|
1102
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.geometry.polygon[0].y #=> Float
|
1103
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].value_detection.confidence #=> Float
|
1104
|
+
# resp.expense_documents[0].line_item_groups[0].line_items[0].line_item_expense_fields[0].page_number #=> Integer
|
1105
|
+
# resp.warnings #=> Array
|
1106
|
+
# resp.warnings[0].error_code #=> String
|
1107
|
+
# resp.warnings[0].pages #=> Array
|
1108
|
+
# resp.warnings[0].pages[0] #=> Integer
|
1109
|
+
# resp.status_message #=> String
|
1110
|
+
# resp.analyze_expense_model_version #=> String
|
1111
|
+
#
|
1112
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetExpenseAnalysis AWS API Documentation
|
1113
|
+
#
|
1114
|
+
# @overload get_expense_analysis(params = {})
|
1115
|
+
# @param [Hash] params ({})
|
1116
|
+
def get_expense_analysis(params = {}, options = {})
|
1117
|
+
req = build_request(:get_expense_analysis, params)
|
1118
|
+
req.send_request(options)
|
1119
|
+
end
|
1120
|
+
|
925
1121
|
# Starts the asynchronous analysis of an input document for
|
926
1122
|
# relationships between detected items such as key-value pairs, tables,
|
927
1123
|
# and selection elements.
|
928
1124
|
#
|
929
1125
|
# `StartDocumentAnalysis` can analyze text in documents that are in
|
930
|
-
# JPEG, PNG, and PDF format. The documents are stored in an Amazon
|
931
|
-
# bucket. Use DocumentLocation to specify the bucket name and file
|
932
|
-
# of the document.
|
1126
|
+
# JPEG, PNG, TIFF, and PDF format. The documents are stored in an Amazon
|
1127
|
+
# S3 bucket. Use DocumentLocation to specify the bucket name and file
|
1128
|
+
# name of the document.
|
933
1129
|
#
|
934
1130
|
# `StartDocumentAnalysis` returns a job identifier (`JobId`) that you
|
935
1131
|
# use to get the results of the operation. When text analysis is
|
@@ -1037,9 +1233,9 @@ module Aws::Textract
|
|
1037
1233
|
# text.
|
1038
1234
|
#
|
1039
1235
|
# `StartDocumentTextDetection` can analyze text in documents that are in
|
1040
|
-
# JPEG, PNG, and PDF format. The documents are stored in an Amazon
|
1041
|
-
# bucket. Use DocumentLocation to specify the bucket name and file
|
1042
|
-
# of the document.
|
1236
|
+
# JPEG, PNG, TIFF, and PDF format. The documents are stored in an Amazon
|
1237
|
+
# S3 bucket. Use DocumentLocation to specify the bucket name and file
|
1238
|
+
# name of the document.
|
1043
1239
|
#
|
1044
1240
|
# `StartTextDetection` returns a job identifier (`JobId`) that you use
|
1045
1241
|
# to get the results of the operation. When text detection is finished,
|
@@ -1134,6 +1330,108 @@ module Aws::Textract
|
|
1134
1330
|
req.send_request(options)
|
1135
1331
|
end
|
1136
1332
|
|
1333
|
+
# Starts the asynchronous analysis of invoices or receipts for data like
|
1334
|
+
# contact information, items purchased, and vendor names.
|
1335
|
+
#
|
1336
|
+
# `StartExpenseAnalysis` can analyze text in documents that are in JPEG,
|
1337
|
+
# PNG, and PDF format. The documents must be stored in an Amazon S3
|
1338
|
+
# bucket. Use the DocumentLocation parameter to specify the name of your
|
1339
|
+
# S3 bucket and the name of the document in that bucket.
|
1340
|
+
#
|
1341
|
+
# `StartExpenseAnalysis` returns a job identifier (`JobId`) that you
|
1342
|
+
# will provide to `GetExpenseAnalysis` to retrieve the results of the
|
1343
|
+
# operation. When the analysis of the input invoices/receipts is
|
1344
|
+
# finished, Amazon Textract publishes a completion status to the Amazon
|
1345
|
+
# Simple Notification Service (Amazon SNS) topic that you provide to the
|
1346
|
+
# `NotificationChannel`. To obtain the results of the invoice and
|
1347
|
+
# receipt analysis operation, ensure that the status value published to
|
1348
|
+
# the Amazon SNS topic is `SUCCEEDED`. If so, call GetExpenseAnalysis,
|
1349
|
+
# and pass the job identifier (`JobId`) that was returned by your call
|
1350
|
+
# to `StartExpenseAnalysis`.
|
1351
|
+
#
|
1352
|
+
# For more information, see [Analyzing Invoices and Receipts][1].
|
1353
|
+
#
|
1354
|
+
#
|
1355
|
+
#
|
1356
|
+
# [1]: https://docs.aws.amazon.com/textract/latest/dg/invoice-receipts.html
|
1357
|
+
#
|
1358
|
+
# @option params [required, Types::DocumentLocation] :document_location
|
1359
|
+
# The location of the document to be processed.
|
1360
|
+
#
|
1361
|
+
# @option params [String] :client_request_token
|
1362
|
+
# The idempotent token that's used to identify the start request. If
|
1363
|
+
# you use the same token with multiple `StartDocumentTextDetection`
|
1364
|
+
# requests, the same `JobId` is returned. Use `ClientRequestToken` to
|
1365
|
+
# prevent the same job from being accidentally started more than once.
|
1366
|
+
# For more information, see [Calling Amazon Textract Asynchronous
|
1367
|
+
# Operations][1]
|
1368
|
+
#
|
1369
|
+
#
|
1370
|
+
#
|
1371
|
+
# [1]: https://docs.aws.amazon.com/textract/latest/dg/api-async.html
|
1372
|
+
#
|
1373
|
+
# @option params [String] :job_tag
|
1374
|
+
# An identifier you specify that's included in the completion
|
1375
|
+
# notification published to the Amazon SNS topic. For example, you can
|
1376
|
+
# use `JobTag` to identify the type of document that the completion
|
1377
|
+
# notification corresponds to (such as a tax form or a receipt).
|
1378
|
+
#
|
1379
|
+
# @option params [Types::NotificationChannel] :notification_channel
|
1380
|
+
# The Amazon SNS topic ARN that you want Amazon Textract to publish the
|
1381
|
+
# completion status of the operation to.
|
1382
|
+
#
|
1383
|
+
# @option params [Types::OutputConfig] :output_config
|
1384
|
+
# Sets if the output will go to a customer defined bucket. By default,
|
1385
|
+
# Amazon Textract will save the results internally to be accessed by the
|
1386
|
+
# `GetExpenseAnalysis` operation.
|
1387
|
+
#
|
1388
|
+
# @option params [String] :kms_key_id
|
1389
|
+
# The KMS key used to encrypt the inference results. This can be in
|
1390
|
+
# either Key ID or Key Alias format. When a KMS key is provided, the KMS
|
1391
|
+
# key will be used for server-side encryption of the objects in the
|
1392
|
+
# customer bucket. When this parameter is not enabled, the result will
|
1393
|
+
# be encrypted server side,using SSE-S3.
|
1394
|
+
#
|
1395
|
+
# @return [Types::StartExpenseAnalysisResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1396
|
+
#
|
1397
|
+
# * {Types::StartExpenseAnalysisResponse#job_id #job_id} => String
|
1398
|
+
#
|
1399
|
+
# @example Request syntax with placeholder values
|
1400
|
+
#
|
1401
|
+
# resp = client.start_expense_analysis({
|
1402
|
+
# document_location: { # required
|
1403
|
+
# s3_object: {
|
1404
|
+
# bucket: "S3Bucket",
|
1405
|
+
# name: "S3ObjectName",
|
1406
|
+
# version: "S3ObjectVersion",
|
1407
|
+
# },
|
1408
|
+
# },
|
1409
|
+
# client_request_token: "ClientRequestToken",
|
1410
|
+
# job_tag: "JobTag",
|
1411
|
+
# notification_channel: {
|
1412
|
+
# sns_topic_arn: "SNSTopicArn", # required
|
1413
|
+
# role_arn: "RoleArn", # required
|
1414
|
+
# },
|
1415
|
+
# output_config: {
|
1416
|
+
# s3_bucket: "S3Bucket", # required
|
1417
|
+
# s3_prefix: "S3ObjectName",
|
1418
|
+
# },
|
1419
|
+
# kms_key_id: "KMSKeyId",
|
1420
|
+
# })
|
1421
|
+
#
|
1422
|
+
# @example Response structure
|
1423
|
+
#
|
1424
|
+
# resp.job_id #=> String
|
1425
|
+
#
|
1426
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartExpenseAnalysis AWS API Documentation
|
1427
|
+
#
|
1428
|
+
# @overload start_expense_analysis(params = {})
|
1429
|
+
# @param [Hash] params ({})
|
1430
|
+
def start_expense_analysis(params = {}, options = {})
|
1431
|
+
req = build_request(:start_expense_analysis, params)
|
1432
|
+
req.send_request(options)
|
1433
|
+
end
|
1434
|
+
|
1137
1435
|
# @!endgroup
|
1138
1436
|
|
1139
1437
|
# @param params ({})
|
@@ -1147,7 +1445,7 @@ module Aws::Textract
|
|
1147
1445
|
params: params,
|
1148
1446
|
config: config)
|
1149
1447
|
context[:gem_name] = 'aws-sdk-textract'
|
1150
|
-
context[:gem_version] = '1.
|
1448
|
+
context[:gem_version] = '1.32.0'
|
1151
1449
|
Seahorse::Client::Request.new(handlers, context)
|
1152
1450
|
end
|
1153
1451
|
|
@@ -18,6 +18,9 @@ module Aws::Textract
|
|
18
18
|
AnalyzeDocumentResponse = Shapes::StructureShape.new(name: 'AnalyzeDocumentResponse')
|
19
19
|
AnalyzeExpenseRequest = Shapes::StructureShape.new(name: 'AnalyzeExpenseRequest')
|
20
20
|
AnalyzeExpenseResponse = Shapes::StructureShape.new(name: 'AnalyzeExpenseResponse')
|
21
|
+
AnalyzeIDDetections = Shapes::StructureShape.new(name: 'AnalyzeIDDetections')
|
22
|
+
AnalyzeIDRequest = Shapes::StructureShape.new(name: 'AnalyzeIDRequest')
|
23
|
+
AnalyzeIDResponse = Shapes::StructureShape.new(name: 'AnalyzeIDResponse')
|
21
24
|
BadDocumentException = Shapes::StructureShape.new(name: 'BadDocumentException')
|
22
25
|
Block = Shapes::StructureShape.new(name: 'Block')
|
23
26
|
BlockList = Shapes::ListShape.new(name: 'BlockList')
|
@@ -31,6 +34,7 @@ module Aws::Textract
|
|
31
34
|
Document = Shapes::StructureShape.new(name: 'Document')
|
32
35
|
DocumentLocation = Shapes::StructureShape.new(name: 'DocumentLocation')
|
33
36
|
DocumentMetadata = Shapes::StructureShape.new(name: 'DocumentMetadata')
|
37
|
+
DocumentPages = Shapes::ListShape.new(name: 'DocumentPages')
|
34
38
|
DocumentTooLargeException = Shapes::StructureShape.new(name: 'DocumentTooLargeException')
|
35
39
|
EntityType = Shapes::StringShape.new(name: 'EntityType')
|
36
40
|
EntityTypes = Shapes::ListShape.new(name: 'EntityTypes')
|
@@ -50,6 +54,8 @@ module Aws::Textract
|
|
50
54
|
GetDocumentAnalysisResponse = Shapes::StructureShape.new(name: 'GetDocumentAnalysisResponse')
|
51
55
|
GetDocumentTextDetectionRequest = Shapes::StructureShape.new(name: 'GetDocumentTextDetectionRequest')
|
52
56
|
GetDocumentTextDetectionResponse = Shapes::StructureShape.new(name: 'GetDocumentTextDetectionResponse')
|
57
|
+
GetExpenseAnalysisRequest = Shapes::StructureShape.new(name: 'GetExpenseAnalysisRequest')
|
58
|
+
GetExpenseAnalysisResponse = Shapes::StructureShape.new(name: 'GetExpenseAnalysisResponse')
|
53
59
|
HumanLoopActivationConditionsEvaluationResults = Shapes::StringShape.new(name: 'HumanLoopActivationConditionsEvaluationResults')
|
54
60
|
HumanLoopActivationOutput = Shapes::StructureShape.new(name: 'HumanLoopActivationOutput')
|
55
61
|
HumanLoopActivationReason = Shapes::StringShape.new(name: 'HumanLoopActivationReason')
|
@@ -61,6 +67,10 @@ module Aws::Textract
|
|
61
67
|
HumanLoopQuotaExceededException = Shapes::StructureShape.new(name: 'HumanLoopQuotaExceededException')
|
62
68
|
IdList = Shapes::ListShape.new(name: 'IdList')
|
63
69
|
IdempotentParameterMismatchException = Shapes::StructureShape.new(name: 'IdempotentParameterMismatchException')
|
70
|
+
IdentityDocument = Shapes::StructureShape.new(name: 'IdentityDocument')
|
71
|
+
IdentityDocumentField = Shapes::StructureShape.new(name: 'IdentityDocumentField')
|
72
|
+
IdentityDocumentFieldList = Shapes::ListShape.new(name: 'IdentityDocumentFieldList')
|
73
|
+
IdentityDocumentList = Shapes::ListShape.new(name: 'IdentityDocumentList')
|
64
74
|
ImageBlob = Shapes::BlobShape.new(name: 'ImageBlob')
|
65
75
|
InternalServerError = Shapes::StructureShape.new(name: 'InternalServerError')
|
66
76
|
InvalidJobIdException = Shapes::StructureShape.new(name: 'InvalidJobIdException')
|
@@ -78,6 +88,7 @@ module Aws::Textract
|
|
78
88
|
LineItemList = Shapes::ListShape.new(name: 'LineItemList')
|
79
89
|
MaxResults = Shapes::IntegerShape.new(name: 'MaxResults')
|
80
90
|
NonEmptyString = Shapes::StringShape.new(name: 'NonEmptyString')
|
91
|
+
NormalizedValue = Shapes::StructureShape.new(name: 'NormalizedValue')
|
81
92
|
NotificationChannel = Shapes::StructureShape.new(name: 'NotificationChannel')
|
82
93
|
OutputConfig = Shapes::StructureShape.new(name: 'OutputConfig')
|
83
94
|
Pages = Shapes::ListShape.new(name: 'Pages')
|
@@ -100,12 +111,15 @@ module Aws::Textract
|
|
100
111
|
StartDocumentAnalysisResponse = Shapes::StructureShape.new(name: 'StartDocumentAnalysisResponse')
|
101
112
|
StartDocumentTextDetectionRequest = Shapes::StructureShape.new(name: 'StartDocumentTextDetectionRequest')
|
102
113
|
StartDocumentTextDetectionResponse = Shapes::StructureShape.new(name: 'StartDocumentTextDetectionResponse')
|
114
|
+
StartExpenseAnalysisRequest = Shapes::StructureShape.new(name: 'StartExpenseAnalysisRequest')
|
115
|
+
StartExpenseAnalysisResponse = Shapes::StructureShape.new(name: 'StartExpenseAnalysisResponse')
|
103
116
|
StatusMessage = Shapes::StringShape.new(name: 'StatusMessage')
|
104
117
|
String = Shapes::StringShape.new(name: 'String')
|
105
118
|
TextType = Shapes::StringShape.new(name: 'TextType')
|
106
119
|
ThrottlingException = Shapes::StructureShape.new(name: 'ThrottlingException')
|
107
120
|
UInteger = Shapes::IntegerShape.new(name: 'UInteger')
|
108
121
|
UnsupportedDocumentException = Shapes::StructureShape.new(name: 'UnsupportedDocumentException')
|
122
|
+
ValueType = Shapes::StringShape.new(name: 'ValueType')
|
109
123
|
Warning = Shapes::StructureShape.new(name: 'Warning')
|
110
124
|
Warnings = Shapes::ListShape.new(name: 'Warnings')
|
111
125
|
|
@@ -129,6 +143,19 @@ module Aws::Textract
|
|
129
143
|
AnalyzeExpenseResponse.add_member(:expense_documents, Shapes::ShapeRef.new(shape: ExpenseDocumentList, location_name: "ExpenseDocuments"))
|
130
144
|
AnalyzeExpenseResponse.struct_class = Types::AnalyzeExpenseResponse
|
131
145
|
|
146
|
+
AnalyzeIDDetections.add_member(:text, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Text"))
|
147
|
+
AnalyzeIDDetections.add_member(:normalized_value, Shapes::ShapeRef.new(shape: NormalizedValue, location_name: "NormalizedValue"))
|
148
|
+
AnalyzeIDDetections.add_member(:confidence, Shapes::ShapeRef.new(shape: Percent, location_name: "Confidence"))
|
149
|
+
AnalyzeIDDetections.struct_class = Types::AnalyzeIDDetections
|
150
|
+
|
151
|
+
AnalyzeIDRequest.add_member(:document_pages, Shapes::ShapeRef.new(shape: DocumentPages, required: true, location_name: "DocumentPages"))
|
152
|
+
AnalyzeIDRequest.struct_class = Types::AnalyzeIDRequest
|
153
|
+
|
154
|
+
AnalyzeIDResponse.add_member(:identity_documents, Shapes::ShapeRef.new(shape: IdentityDocumentList, location_name: "IdentityDocuments"))
|
155
|
+
AnalyzeIDResponse.add_member(:document_metadata, Shapes::ShapeRef.new(shape: DocumentMetadata, location_name: "DocumentMetadata"))
|
156
|
+
AnalyzeIDResponse.add_member(:analyze_id_model_version, Shapes::ShapeRef.new(shape: String, location_name: "AnalyzeIDModelVersion"))
|
157
|
+
AnalyzeIDResponse.struct_class = Types::AnalyzeIDResponse
|
158
|
+
|
132
159
|
BadDocumentException.struct_class = Types::BadDocumentException
|
133
160
|
|
134
161
|
Block.add_member(:block_type, Shapes::ShapeRef.new(shape: BlockType, location_name: "BlockType"))
|
@@ -175,6 +202,8 @@ module Aws::Textract
|
|
175
202
|
DocumentMetadata.add_member(:pages, Shapes::ShapeRef.new(shape: UInteger, location_name: "Pages"))
|
176
203
|
DocumentMetadata.struct_class = Types::DocumentMetadata
|
177
204
|
|
205
|
+
DocumentPages.member = Shapes::ShapeRef.new(shape: Document)
|
206
|
+
|
178
207
|
DocumentTooLargeException.struct_class = Types::DocumentTooLargeException
|
179
208
|
|
180
209
|
EntityTypes.member = Shapes::ShapeRef.new(shape: EntityType)
|
@@ -237,6 +266,20 @@ module Aws::Textract
|
|
237
266
|
GetDocumentTextDetectionResponse.add_member(:detect_document_text_model_version, Shapes::ShapeRef.new(shape: String, location_name: "DetectDocumentTextModelVersion"))
|
238
267
|
GetDocumentTextDetectionResponse.struct_class = Types::GetDocumentTextDetectionResponse
|
239
268
|
|
269
|
+
GetExpenseAnalysisRequest.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, required: true, location_name: "JobId"))
|
270
|
+
GetExpenseAnalysisRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResults, location_name: "MaxResults"))
|
271
|
+
GetExpenseAnalysisRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location_name: "NextToken"))
|
272
|
+
GetExpenseAnalysisRequest.struct_class = Types::GetExpenseAnalysisRequest
|
273
|
+
|
274
|
+
GetExpenseAnalysisResponse.add_member(:document_metadata, Shapes::ShapeRef.new(shape: DocumentMetadata, location_name: "DocumentMetadata"))
|
275
|
+
GetExpenseAnalysisResponse.add_member(:job_status, Shapes::ShapeRef.new(shape: JobStatus, location_name: "JobStatus"))
|
276
|
+
GetExpenseAnalysisResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location_name: "NextToken"))
|
277
|
+
GetExpenseAnalysisResponse.add_member(:expense_documents, Shapes::ShapeRef.new(shape: ExpenseDocumentList, location_name: "ExpenseDocuments"))
|
278
|
+
GetExpenseAnalysisResponse.add_member(:warnings, Shapes::ShapeRef.new(shape: Warnings, location_name: "Warnings"))
|
279
|
+
GetExpenseAnalysisResponse.add_member(:status_message, Shapes::ShapeRef.new(shape: StatusMessage, location_name: "StatusMessage"))
|
280
|
+
GetExpenseAnalysisResponse.add_member(:analyze_expense_model_version, Shapes::ShapeRef.new(shape: String, location_name: "AnalyzeExpenseModelVersion"))
|
281
|
+
GetExpenseAnalysisResponse.struct_class = Types::GetExpenseAnalysisResponse
|
282
|
+
|
240
283
|
HumanLoopActivationOutput.add_member(:human_loop_arn, Shapes::ShapeRef.new(shape: HumanLoopArn, location_name: "HumanLoopArn"))
|
241
284
|
HumanLoopActivationOutput.add_member(:human_loop_activation_reasons, Shapes::ShapeRef.new(shape: HumanLoopActivationReasons, location_name: "HumanLoopActivationReasons"))
|
242
285
|
HumanLoopActivationOutput.add_member(:human_loop_activation_conditions_evaluation_results, Shapes::ShapeRef.new(shape: HumanLoopActivationConditionsEvaluationResults, location_name: "HumanLoopActivationConditionsEvaluationResults", metadata: {"jsonvalue"=>true}))
|
@@ -261,6 +304,18 @@ module Aws::Textract
|
|
261
304
|
|
262
305
|
IdempotentParameterMismatchException.struct_class = Types::IdempotentParameterMismatchException
|
263
306
|
|
307
|
+
IdentityDocument.add_member(:document_index, Shapes::ShapeRef.new(shape: UInteger, location_name: "DocumentIndex"))
|
308
|
+
IdentityDocument.add_member(:identity_document_fields, Shapes::ShapeRef.new(shape: IdentityDocumentFieldList, location_name: "IdentityDocumentFields"))
|
309
|
+
IdentityDocument.struct_class = Types::IdentityDocument
|
310
|
+
|
311
|
+
IdentityDocumentField.add_member(:type, Shapes::ShapeRef.new(shape: AnalyzeIDDetections, location_name: "Type"))
|
312
|
+
IdentityDocumentField.add_member(:value_detection, Shapes::ShapeRef.new(shape: AnalyzeIDDetections, location_name: "ValueDetection"))
|
313
|
+
IdentityDocumentField.struct_class = Types::IdentityDocumentField
|
314
|
+
|
315
|
+
IdentityDocumentFieldList.member = Shapes::ShapeRef.new(shape: IdentityDocumentField)
|
316
|
+
|
317
|
+
IdentityDocumentList.member = Shapes::ShapeRef.new(shape: IdentityDocument)
|
318
|
+
|
264
319
|
InternalServerError.struct_class = Types::InternalServerError
|
265
320
|
|
266
321
|
InvalidJobIdException.struct_class = Types::InvalidJobIdException
|
@@ -284,6 +339,10 @@ module Aws::Textract
|
|
284
339
|
|
285
340
|
LineItemList.member = Shapes::ShapeRef.new(shape: LineItemFields)
|
286
341
|
|
342
|
+
NormalizedValue.add_member(:value, Shapes::ShapeRef.new(shape: String, location_name: "Value"))
|
343
|
+
NormalizedValue.add_member(:value_type, Shapes::ShapeRef.new(shape: ValueType, location_name: "ValueType"))
|
344
|
+
NormalizedValue.struct_class = Types::NormalizedValue
|
345
|
+
|
287
346
|
NotificationChannel.add_member(:sns_topic_arn, Shapes::ShapeRef.new(shape: SNSTopicArn, required: true, location_name: "SNSTopicArn"))
|
288
347
|
NotificationChannel.add_member(:role_arn, Shapes::ShapeRef.new(shape: RoleArn, required: true, location_name: "RoleArn"))
|
289
348
|
NotificationChannel.struct_class = Types::NotificationChannel
|
@@ -336,6 +395,17 @@ module Aws::Textract
|
|
336
395
|
StartDocumentTextDetectionResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
|
337
396
|
StartDocumentTextDetectionResponse.struct_class = Types::StartDocumentTextDetectionResponse
|
338
397
|
|
398
|
+
StartExpenseAnalysisRequest.add_member(:document_location, Shapes::ShapeRef.new(shape: DocumentLocation, required: true, location_name: "DocumentLocation"))
|
399
|
+
StartExpenseAnalysisRequest.add_member(:client_request_token, Shapes::ShapeRef.new(shape: ClientRequestToken, location_name: "ClientRequestToken"))
|
400
|
+
StartExpenseAnalysisRequest.add_member(:job_tag, Shapes::ShapeRef.new(shape: JobTag, location_name: "JobTag"))
|
401
|
+
StartExpenseAnalysisRequest.add_member(:notification_channel, Shapes::ShapeRef.new(shape: NotificationChannel, location_name: "NotificationChannel"))
|
402
|
+
StartExpenseAnalysisRequest.add_member(:output_config, Shapes::ShapeRef.new(shape: OutputConfig, location_name: "OutputConfig"))
|
403
|
+
StartExpenseAnalysisRequest.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: KMSKeyId, location_name: "KMSKeyId"))
|
404
|
+
StartExpenseAnalysisRequest.struct_class = Types::StartExpenseAnalysisRequest
|
405
|
+
|
406
|
+
StartExpenseAnalysisResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
|
407
|
+
StartExpenseAnalysisResponse.struct_class = Types::StartExpenseAnalysisResponse
|
408
|
+
|
339
409
|
ThrottlingException.struct_class = Types::ThrottlingException
|
340
410
|
|
341
411
|
UnsupportedDocumentException.struct_class = Types::UnsupportedDocumentException
|
@@ -399,6 +469,23 @@ module Aws::Textract
|
|
399
469
|
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
400
470
|
end)
|
401
471
|
|
472
|
+
api.add_operation(:analyze_id, Seahorse::Model::Operation.new.tap do |o|
|
473
|
+
o.name = "AnalyzeID"
|
474
|
+
o.http_method = "POST"
|
475
|
+
o.http_request_uri = "/"
|
476
|
+
o.input = Shapes::ShapeRef.new(shape: AnalyzeIDRequest)
|
477
|
+
o.output = Shapes::ShapeRef.new(shape: AnalyzeIDResponse)
|
478
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
|
479
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidS3ObjectException)
|
480
|
+
o.errors << Shapes::ShapeRef.new(shape: UnsupportedDocumentException)
|
481
|
+
o.errors << Shapes::ShapeRef.new(shape: DocumentTooLargeException)
|
482
|
+
o.errors << Shapes::ShapeRef.new(shape: BadDocumentException)
|
483
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
484
|
+
o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
|
485
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
|
486
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
487
|
+
end)
|
488
|
+
|
402
489
|
api.add_operation(:detect_document_text, Seahorse::Model::Operation.new.tap do |o|
|
403
490
|
o.name = "DetectDocumentText"
|
404
491
|
o.http_method = "POST"
|
@@ -448,6 +535,22 @@ module Aws::Textract
|
|
448
535
|
o.errors << Shapes::ShapeRef.new(shape: InvalidKMSKeyException)
|
449
536
|
end)
|
450
537
|
|
538
|
+
api.add_operation(:get_expense_analysis, Seahorse::Model::Operation.new.tap do |o|
|
539
|
+
o.name = "GetExpenseAnalysis"
|
540
|
+
o.http_method = "POST"
|
541
|
+
o.http_request_uri = "/"
|
542
|
+
o.input = Shapes::ShapeRef.new(shape: GetExpenseAnalysisRequest)
|
543
|
+
o.output = Shapes::ShapeRef.new(shape: GetExpenseAnalysisResponse)
|
544
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
|
545
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
546
|
+
o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
|
547
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidJobIdException)
|
548
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
|
549
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
550
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidS3ObjectException)
|
551
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidKMSKeyException)
|
552
|
+
end)
|
553
|
+
|
451
554
|
api.add_operation(:start_document_analysis, Seahorse::Model::Operation.new.tap do |o|
|
452
555
|
o.name = "StartDocumentAnalysis"
|
453
556
|
o.http_method = "POST"
|
@@ -487,6 +590,26 @@ module Aws::Textract
|
|
487
590
|
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
488
591
|
o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
|
489
592
|
end)
|
593
|
+
|
594
|
+
api.add_operation(:start_expense_analysis, Seahorse::Model::Operation.new.tap do |o|
|
595
|
+
o.name = "StartExpenseAnalysis"
|
596
|
+
o.http_method = "POST"
|
597
|
+
o.http_request_uri = "/"
|
598
|
+
o.input = Shapes::ShapeRef.new(shape: StartExpenseAnalysisRequest)
|
599
|
+
o.output = Shapes::ShapeRef.new(shape: StartExpenseAnalysisResponse)
|
600
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
|
601
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidS3ObjectException)
|
602
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidKMSKeyException)
|
603
|
+
o.errors << Shapes::ShapeRef.new(shape: UnsupportedDocumentException)
|
604
|
+
o.errors << Shapes::ShapeRef.new(shape: DocumentTooLargeException)
|
605
|
+
o.errors << Shapes::ShapeRef.new(shape: BadDocumentException)
|
606
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
607
|
+
o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
|
608
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
|
609
|
+
o.errors << Shapes::ShapeRef.new(shape: IdempotentParameterMismatchException)
|
610
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
611
|
+
o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
|
612
|
+
end)
|
490
613
|
end
|
491
614
|
|
492
615
|
end
|
@@ -168,6 +168,84 @@ module Aws::Textract
|
|
168
168
|
include Aws::Structure
|
169
169
|
end
|
170
170
|
|
171
|
+
# Used to contain the information detected by an AnalyzeID operation.
|
172
|
+
#
|
173
|
+
# @!attribute [rw] text
|
174
|
+
# Text of either the normalized field or value associated with it.
|
175
|
+
# @return [String]
|
176
|
+
#
|
177
|
+
# @!attribute [rw] normalized_value
|
178
|
+
# Only returned for dates, returns the type of value detected and the
|
179
|
+
# date written in a more machine readable way.
|
180
|
+
# @return [Types::NormalizedValue]
|
181
|
+
#
|
182
|
+
# @!attribute [rw] confidence
|
183
|
+
# The confidence score of the detected text.
|
184
|
+
# @return [Float]
|
185
|
+
#
|
186
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeIDDetections AWS API Documentation
|
187
|
+
#
|
188
|
+
class AnalyzeIDDetections < Struct.new(
|
189
|
+
:text,
|
190
|
+
:normalized_value,
|
191
|
+
:confidence)
|
192
|
+
SENSITIVE = []
|
193
|
+
include Aws::Structure
|
194
|
+
end
|
195
|
+
|
196
|
+
# @note When making an API call, you may pass AnalyzeIDRequest
|
197
|
+
# data as a hash:
|
198
|
+
#
|
199
|
+
# {
|
200
|
+
# document_pages: [ # required
|
201
|
+
# {
|
202
|
+
# bytes: "data",
|
203
|
+
# s3_object: {
|
204
|
+
# bucket: "S3Bucket",
|
205
|
+
# name: "S3ObjectName",
|
206
|
+
# version: "S3ObjectVersion",
|
207
|
+
# },
|
208
|
+
# },
|
209
|
+
# ],
|
210
|
+
# }
|
211
|
+
#
|
212
|
+
# @!attribute [rw] document_pages
|
213
|
+
# The document being passed to AnalyzeID.
|
214
|
+
# @return [Array<Types::Document>]
|
215
|
+
#
|
216
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeIDRequest AWS API Documentation
|
217
|
+
#
|
218
|
+
class AnalyzeIDRequest < Struct.new(
|
219
|
+
:document_pages)
|
220
|
+
SENSITIVE = []
|
221
|
+
include Aws::Structure
|
222
|
+
end
|
223
|
+
|
224
|
+
# @!attribute [rw] identity_documents
|
225
|
+
# The list of documents processed by AnalyzeID. Includes a number
|
226
|
+
# denoting their place in the list and the response structure for the
|
227
|
+
# document.
|
228
|
+
# @return [Array<Types::IdentityDocument>]
|
229
|
+
#
|
230
|
+
# @!attribute [rw] document_metadata
|
231
|
+
# Information about the input document.
|
232
|
+
# @return [Types::DocumentMetadata]
|
233
|
+
#
|
234
|
+
# @!attribute [rw] analyze_id_model_version
|
235
|
+
# The version of the AnalyzeIdentity API being used to process
|
236
|
+
# documents.
|
237
|
+
# @return [String]
|
238
|
+
#
|
239
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeIDResponse AWS API Documentation
|
240
|
+
#
|
241
|
+
class AnalyzeIDResponse < Struct.new(
|
242
|
+
:identity_documents,
|
243
|
+
:document_metadata,
|
244
|
+
:analyze_id_model_version)
|
245
|
+
SENSITIVE = []
|
246
|
+
include Aws::Structure
|
247
|
+
end
|
248
|
+
|
171
249
|
# Amazon Textract isn't able to read the document. For more information
|
172
250
|
# on the document limits in Amazon Textract, see limits.
|
173
251
|
#
|
@@ -322,11 +400,12 @@ module Aws::Textract
|
|
322
400
|
# @!attribute [rw] page
|
323
401
|
# The page on which a block was detected. `Page` is returned by
|
324
402
|
# asynchronous operations. Page values greater than 1 are only
|
325
|
-
# returned for multipage documents that are in PDF format. A
|
326
|
-
# image (JPEG/PNG), even if it contains multiple document
|
327
|
-
# considered to be a single-page document. The value of
|
328
|
-
# always 1. Synchronous operations don't return `Page`
|
329
|
-
# input document is considered to be a single-page
|
403
|
+
# returned for multipage documents that are in PDF or TIFF format. A
|
404
|
+
# scanned image (JPEG/PNG), even if it contains multiple document
|
405
|
+
# pages, is considered to be a single-page document. The value of
|
406
|
+
# `Page` is always 1. Synchronous operations don't return `Page`
|
407
|
+
# because every input document is considered to be a single-page
|
408
|
+
# document.
|
330
409
|
# @return [Integer]
|
331
410
|
#
|
332
411
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/Block AWS API Documentation
|
@@ -618,7 +697,7 @@ module Aws::Textract
|
|
618
697
|
end
|
619
698
|
|
620
699
|
# Breakdown of detected information, seperated into the catagories Type,
|
621
|
-
#
|
700
|
+
# LabelDetection, and ValueDetection
|
622
701
|
#
|
623
702
|
# @!attribute [rw] type
|
624
703
|
# The implied label of a detected element. Present alongside
|
@@ -864,6 +943,93 @@ module Aws::Textract
|
|
864
943
|
include Aws::Structure
|
865
944
|
end
|
866
945
|
|
946
|
+
# @note When making an API call, you may pass GetExpenseAnalysisRequest
|
947
|
+
# data as a hash:
|
948
|
+
#
|
949
|
+
# {
|
950
|
+
# job_id: "JobId", # required
|
951
|
+
# max_results: 1,
|
952
|
+
# next_token: "PaginationToken",
|
953
|
+
# }
|
954
|
+
#
|
955
|
+
# @!attribute [rw] job_id
|
956
|
+
# A unique identifier for the text detection job. The `JobId` is
|
957
|
+
# returned from `StartExpenseAnalysis`. A `JobId` value is only valid
|
958
|
+
# for 7 days.
|
959
|
+
# @return [String]
|
960
|
+
#
|
961
|
+
# @!attribute [rw] max_results
|
962
|
+
# The maximum number of results to return per paginated call. The
|
963
|
+
# largest value you can specify is 20. If you specify a value greater
|
964
|
+
# than 20, a maximum of 20 results is returned. The default value is
|
965
|
+
# 20.
|
966
|
+
# @return [Integer]
|
967
|
+
#
|
968
|
+
# @!attribute [rw] next_token
|
969
|
+
# If the previous response was incomplete (because there are more
|
970
|
+
# blocks to retrieve), Amazon Textract returns a pagination token in
|
971
|
+
# the response. You can use this pagination token to retrieve the next
|
972
|
+
# set of blocks.
|
973
|
+
# @return [String]
|
974
|
+
#
|
975
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetExpenseAnalysisRequest AWS API Documentation
|
976
|
+
#
|
977
|
+
class GetExpenseAnalysisRequest < Struct.new(
|
978
|
+
:job_id,
|
979
|
+
:max_results,
|
980
|
+
:next_token)
|
981
|
+
SENSITIVE = []
|
982
|
+
include Aws::Structure
|
983
|
+
end
|
984
|
+
|
985
|
+
# @!attribute [rw] document_metadata
|
986
|
+
# Information about a document that Amazon Textract processed.
|
987
|
+
# `DocumentMetadata` is returned in every page of paginated responses
|
988
|
+
# from an Amazon Textract operation.
|
989
|
+
# @return [Types::DocumentMetadata]
|
990
|
+
#
|
991
|
+
# @!attribute [rw] job_status
|
992
|
+
# The current status of the text detection job.
|
993
|
+
# @return [String]
|
994
|
+
#
|
995
|
+
# @!attribute [rw] next_token
|
996
|
+
# If the response is truncated, Amazon Textract returns this token.
|
997
|
+
# You can use this token in the subsequent request to retrieve the
|
998
|
+
# next set of text-detection results.
|
999
|
+
# @return [String]
|
1000
|
+
#
|
1001
|
+
# @!attribute [rw] expense_documents
|
1002
|
+
# The expenses detected by Amazon Textract.
|
1003
|
+
# @return [Array<Types::ExpenseDocument>]
|
1004
|
+
#
|
1005
|
+
# @!attribute [rw] warnings
|
1006
|
+
# A list of warnings that occurred during the text-detection operation
|
1007
|
+
# for the document.
|
1008
|
+
# @return [Array<Types::Warning>]
|
1009
|
+
#
|
1010
|
+
# @!attribute [rw] status_message
|
1011
|
+
# Returns if the detection job could not be completed. Contains
|
1012
|
+
# explanation for what error occured.
|
1013
|
+
# @return [String]
|
1014
|
+
#
|
1015
|
+
# @!attribute [rw] analyze_expense_model_version
|
1016
|
+
# The current model version of AnalyzeExpense.
|
1017
|
+
# @return [String]
|
1018
|
+
#
|
1019
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetExpenseAnalysisResponse AWS API Documentation
|
1020
|
+
#
|
1021
|
+
class GetExpenseAnalysisResponse < Struct.new(
|
1022
|
+
:document_metadata,
|
1023
|
+
:job_status,
|
1024
|
+
:next_token,
|
1025
|
+
:expense_documents,
|
1026
|
+
:warnings,
|
1027
|
+
:status_message,
|
1028
|
+
:analyze_expense_model_version)
|
1029
|
+
SENSITIVE = []
|
1030
|
+
include Aws::Structure
|
1031
|
+
end
|
1032
|
+
|
867
1033
|
# Shows the results of the human in the loop evaluation. If there is no
|
868
1034
|
# HumanLoopArn, the input did not trigger human review.
|
869
1035
|
#
|
@@ -985,6 +1151,50 @@ module Aws::Textract
|
|
985
1151
|
#
|
986
1152
|
class IdempotentParameterMismatchException < Aws::EmptyStructure; end
|
987
1153
|
|
1154
|
+
# The structure that lists each document processed in an AnalyzeID
|
1155
|
+
# operation.
|
1156
|
+
#
|
1157
|
+
# @!attribute [rw] document_index
|
1158
|
+
# Denotes the placement of a document in the IdentityDocument list.
|
1159
|
+
# The first document is marked 1, the second 2 and so on.
|
1160
|
+
# @return [Integer]
|
1161
|
+
#
|
1162
|
+
# @!attribute [rw] identity_document_fields
|
1163
|
+
# The structure used to record information extracted from identity
|
1164
|
+
# documents. Contains both normalized field and value of the extracted
|
1165
|
+
# text.
|
1166
|
+
# @return [Array<Types::IdentityDocumentField>]
|
1167
|
+
#
|
1168
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/IdentityDocument AWS API Documentation
|
1169
|
+
#
|
1170
|
+
class IdentityDocument < Struct.new(
|
1171
|
+
:document_index,
|
1172
|
+
:identity_document_fields)
|
1173
|
+
SENSITIVE = []
|
1174
|
+
include Aws::Structure
|
1175
|
+
end
|
1176
|
+
|
1177
|
+
# Structure containing both the normalized type of the extracted
|
1178
|
+
# information and the text associated with it. These are extracted as
|
1179
|
+
# Type and Value respectively.
|
1180
|
+
#
|
1181
|
+
# @!attribute [rw] type
|
1182
|
+
# Used to contain the information detected by an AnalyzeID operation.
|
1183
|
+
# @return [Types::AnalyzeIDDetections]
|
1184
|
+
#
|
1185
|
+
# @!attribute [rw] value_detection
|
1186
|
+
# Used to contain the information detected by an AnalyzeID operation.
|
1187
|
+
# @return [Types::AnalyzeIDDetections]
|
1188
|
+
#
|
1189
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/IdentityDocumentField AWS API Documentation
|
1190
|
+
#
|
1191
|
+
class IdentityDocumentField < Struct.new(
|
1192
|
+
:type,
|
1193
|
+
:value_detection)
|
1194
|
+
SENSITIVE = []
|
1195
|
+
include Aws::Structure
|
1196
|
+
end
|
1197
|
+
|
988
1198
|
# Amazon Textract experienced a service issue. Try your call again.
|
989
1199
|
#
|
990
1200
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/InternalServerError AWS API Documentation
|
@@ -1077,6 +1287,26 @@ module Aws::Textract
|
|
1077
1287
|
include Aws::Structure
|
1078
1288
|
end
|
1079
1289
|
|
1290
|
+
# Contains information relating to dates in a document, including the
|
1291
|
+
# type of value, and the value.
|
1292
|
+
#
|
1293
|
+
# @!attribute [rw] value
|
1294
|
+
# The value of the date, written as Year-Month-DayTHour:Minute:Second.
|
1295
|
+
# @return [String]
|
1296
|
+
#
|
1297
|
+
# @!attribute [rw] value_type
|
1298
|
+
# The normalized type of the value detected. In this case, DATE.
|
1299
|
+
# @return [String]
|
1300
|
+
#
|
1301
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/NormalizedValue AWS API Documentation
|
1302
|
+
#
|
1303
|
+
class NormalizedValue < Struct.new(
|
1304
|
+
:value,
|
1305
|
+
:value_type)
|
1306
|
+
SENSITIVE = []
|
1307
|
+
include Aws::Structure
|
1308
|
+
end
|
1309
|
+
|
1080
1310
|
# The Amazon Simple Notification Service (Amazon SNS) topic to which
|
1081
1311
|
# Amazon Textract publishes the completion status of an asynchronous
|
1082
1312
|
# document operation, such as StartDocumentTextDetection.
|
@@ -1253,7 +1483,7 @@ module Aws::Textract
|
|
1253
1483
|
# @!attribute [rw] name
|
1254
1484
|
# The file name of the input document. Synchronous operations can use
|
1255
1485
|
# image files that are in JPEG or PNG format. Asynchronous operations
|
1256
|
-
# also support PDF format files.
|
1486
|
+
# also support PDF and TIFF format files.
|
1257
1487
|
# @return [String]
|
1258
1488
|
#
|
1259
1489
|
# @!attribute [rw] version
|
@@ -1472,6 +1702,100 @@ module Aws::Textract
|
|
1472
1702
|
include Aws::Structure
|
1473
1703
|
end
|
1474
1704
|
|
1705
|
+
# @note When making an API call, you may pass StartExpenseAnalysisRequest
|
1706
|
+
# data as a hash:
|
1707
|
+
#
|
1708
|
+
# {
|
1709
|
+
# document_location: { # required
|
1710
|
+
# s3_object: {
|
1711
|
+
# bucket: "S3Bucket",
|
1712
|
+
# name: "S3ObjectName",
|
1713
|
+
# version: "S3ObjectVersion",
|
1714
|
+
# },
|
1715
|
+
# },
|
1716
|
+
# client_request_token: "ClientRequestToken",
|
1717
|
+
# job_tag: "JobTag",
|
1718
|
+
# notification_channel: {
|
1719
|
+
# sns_topic_arn: "SNSTopicArn", # required
|
1720
|
+
# role_arn: "RoleArn", # required
|
1721
|
+
# },
|
1722
|
+
# output_config: {
|
1723
|
+
# s3_bucket: "S3Bucket", # required
|
1724
|
+
# s3_prefix: "S3ObjectName",
|
1725
|
+
# },
|
1726
|
+
# kms_key_id: "KMSKeyId",
|
1727
|
+
# }
|
1728
|
+
#
|
1729
|
+
# @!attribute [rw] document_location
|
1730
|
+
# The location of the document to be processed.
|
1731
|
+
# @return [Types::DocumentLocation]
|
1732
|
+
#
|
1733
|
+
# @!attribute [rw] client_request_token
|
1734
|
+
# The idempotent token that's used to identify the start request. If
|
1735
|
+
# you use the same token with multiple `StartDocumentTextDetection`
|
1736
|
+
# requests, the same `JobId` is returned. Use `ClientRequestToken` to
|
1737
|
+
# prevent the same job from being accidentally started more than once.
|
1738
|
+
# For more information, see [Calling Amazon Textract Asynchronous
|
1739
|
+
# Operations][1]
|
1740
|
+
#
|
1741
|
+
#
|
1742
|
+
#
|
1743
|
+
# [1]: https://docs.aws.amazon.com/textract/latest/dg/api-async.html
|
1744
|
+
# @return [String]
|
1745
|
+
#
|
1746
|
+
# @!attribute [rw] job_tag
|
1747
|
+
# An identifier you specify that's included in the completion
|
1748
|
+
# notification published to the Amazon SNS topic. For example, you can
|
1749
|
+
# use `JobTag` to identify the type of document that the completion
|
1750
|
+
# notification corresponds to (such as a tax form or a receipt).
|
1751
|
+
# @return [String]
|
1752
|
+
#
|
1753
|
+
# @!attribute [rw] notification_channel
|
1754
|
+
# The Amazon SNS topic ARN that you want Amazon Textract to publish
|
1755
|
+
# the completion status of the operation to.
|
1756
|
+
# @return [Types::NotificationChannel]
|
1757
|
+
#
|
1758
|
+
# @!attribute [rw] output_config
|
1759
|
+
# Sets if the output will go to a customer defined bucket. By default,
|
1760
|
+
# Amazon Textract will save the results internally to be accessed by
|
1761
|
+
# the `GetExpenseAnalysis` operation.
|
1762
|
+
# @return [Types::OutputConfig]
|
1763
|
+
#
|
1764
|
+
# @!attribute [rw] kms_key_id
|
1765
|
+
# The KMS key used to encrypt the inference results. This can be in
|
1766
|
+
# either Key ID or Key Alias format. When a KMS key is provided, the
|
1767
|
+
# KMS key will be used for server-side encryption of the objects in
|
1768
|
+
# the customer bucket. When this parameter is not enabled, the result
|
1769
|
+
# will be encrypted server side,using SSE-S3.
|
1770
|
+
# @return [String]
|
1771
|
+
#
|
1772
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartExpenseAnalysisRequest AWS API Documentation
|
1773
|
+
#
|
1774
|
+
class StartExpenseAnalysisRequest < Struct.new(
|
1775
|
+
:document_location,
|
1776
|
+
:client_request_token,
|
1777
|
+
:job_tag,
|
1778
|
+
:notification_channel,
|
1779
|
+
:output_config,
|
1780
|
+
:kms_key_id)
|
1781
|
+
SENSITIVE = []
|
1782
|
+
include Aws::Structure
|
1783
|
+
end
|
1784
|
+
|
1785
|
+
# @!attribute [rw] job_id
|
1786
|
+
# A unique identifier for the text detection job. The `JobId` is
|
1787
|
+
# returned from `StartExpenseAnalysis`. A `JobId` value is only valid
|
1788
|
+
# for 7 days.
|
1789
|
+
# @return [String]
|
1790
|
+
#
|
1791
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartExpenseAnalysisResponse AWS API Documentation
|
1792
|
+
#
|
1793
|
+
class StartExpenseAnalysisResponse < Struct.new(
|
1794
|
+
:job_id)
|
1795
|
+
SENSITIVE = []
|
1796
|
+
include Aws::Structure
|
1797
|
+
end
|
1798
|
+
|
1475
1799
|
# Amazon Textract is temporarily unable to process the request. Try your
|
1476
1800
|
# call again.
|
1477
1801
|
#
|
@@ -1480,8 +1804,8 @@ module Aws::Textract
|
|
1480
1804
|
class ThrottlingException < Aws::EmptyStructure; end
|
1481
1805
|
|
1482
1806
|
# The format of the input document isn't supported. Documents for
|
1483
|
-
# synchronous operations can be in PNG or JPEG format. Documents
|
1484
|
-
# asynchronous operations can
|
1807
|
+
# synchronous operations can be in PNG or JPEG format only. Documents
|
1808
|
+
# for asynchronous operations can be in PDF format.
|
1485
1809
|
#
|
1486
1810
|
# @see http://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/UnsupportedDocumentException AWS API Documentation
|
1487
1811
|
#
|
data/lib/aws-sdk-textract.rb
CHANGED
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.32.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: 2021-
|
11
|
+
date: 2021-11-29 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.122.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.122.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: aws-sigv4
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|