Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Starts the asynchronous analysis of an input document for relationships between detected items such as key-value pairs, tables, and selection elements.
StartDocumentAnalysis
can analyze text in documents that are in JPEG,
PNG, TIFF, and PDF format. The documents are stored in an Amazon S3
bucket. Use DocumentLocation to specify the bucket name and file name of
the document.
StartDocumentAnalysis
returns a job identifier (JobId
) that you use
to get the results of the operation. When text analysis is finished,
Amazon Textract publishes a completion status to the Amazon Simple
Notification Service (Amazon SNS) topic that you specify in
NotificationChannel
. To get the results of the text analysis
operation, first check that the status value published to the Amazon SNS
topic is SUCCEEDED
. If so, call GetDocumentAnalysis, and pass the job
identifier (JobId
) from the initial call to StartDocumentAnalysis
.
For more information, see Document Text Analysis.
Synopsis
- data StartDocumentAnalysis = StartDocumentAnalysis' {}
- newStartDocumentAnalysis :: DocumentLocation -> StartDocumentAnalysis
- startDocumentAnalysis_clientRequestToken :: Lens' StartDocumentAnalysis (Maybe Text)
- startDocumentAnalysis_jobTag :: Lens' StartDocumentAnalysis (Maybe Text)
- startDocumentAnalysis_kmsKeyId :: Lens' StartDocumentAnalysis (Maybe Text)
- startDocumentAnalysis_notificationChannel :: Lens' StartDocumentAnalysis (Maybe NotificationChannel)
- startDocumentAnalysis_outputConfig :: Lens' StartDocumentAnalysis (Maybe OutputConfig)
- startDocumentAnalysis_queriesConfig :: Lens' StartDocumentAnalysis (Maybe QueriesConfig)
- startDocumentAnalysis_documentLocation :: Lens' StartDocumentAnalysis DocumentLocation
- startDocumentAnalysis_featureTypes :: Lens' StartDocumentAnalysis [FeatureType]
- data StartDocumentAnalysisResponse = StartDocumentAnalysisResponse' {
- jobId :: Maybe Text
- httpStatus :: Int
- newStartDocumentAnalysisResponse :: Int -> StartDocumentAnalysisResponse
- startDocumentAnalysisResponse_jobId :: Lens' StartDocumentAnalysisResponse (Maybe Text)
- startDocumentAnalysisResponse_httpStatus :: Lens' StartDocumentAnalysisResponse Int
Creating a Request
data StartDocumentAnalysis Source #
See: newStartDocumentAnalysis
smart constructor.
StartDocumentAnalysis' | |
|
Instances
newStartDocumentAnalysis Source #
Create a value of StartDocumentAnalysis
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:clientRequestToken:StartDocumentAnalysis'
, startDocumentAnalysis_clientRequestToken
- The idempotent token that you use to identify the start request. If you
use the same token with multiple StartDocumentAnalysis
requests, the
same JobId
is returned. Use ClientRequestToken
to prevent the same
job from being accidentally started more than once. For more
information, see
Calling Amazon Textract Asynchronous Operations.
$sel:jobTag:StartDocumentAnalysis'
, startDocumentAnalysis_jobTag
- An identifier that you specify that's included in the completion
notification published to the Amazon SNS topic. For example, you can use
JobTag
to identify the type of document that the completion
notification corresponds to (such as a tax form or a receipt).
$sel:kmsKeyId:StartDocumentAnalysis'
, startDocumentAnalysis_kmsKeyId
- The KMS key used to encrypt the inference results. This can be in either
Key ID or Key Alias format. When a KMS key is provided, the KMS key will
be used for server-side encryption of the objects in the customer
bucket. When this parameter is not enabled, the result will be encrypted
server side,using SSE-S3.
$sel:notificationChannel:StartDocumentAnalysis'
, startDocumentAnalysis_notificationChannel
- The Amazon SNS topic ARN that you want Amazon Textract to publish the
completion status of the operation to.
$sel:outputConfig:StartDocumentAnalysis'
, startDocumentAnalysis_outputConfig
- Sets if the output will go to a customer defined bucket. By default,
Amazon Textract will save the results internally to be accessed by the
GetDocumentAnalysis operation.
$sel:queriesConfig:StartDocumentAnalysis'
, startDocumentAnalysis_queriesConfig
- Undocumented member.
$sel:documentLocation:StartDocumentAnalysis'
, startDocumentAnalysis_documentLocation
- The location of the document to be processed.
$sel:featureTypes:StartDocumentAnalysis'
, startDocumentAnalysis_featureTypes
- A list of the types of analysis to perform. Add TABLES to the list to
return information about the tables that are detected in the input
document. Add FORMS to return detected form data. To perform both types
of analysis, add TABLES and FORMS to FeatureTypes
. All lines and words
detected in the document are included in the response (including text
that isn't related to the value of FeatureTypes
).
Request Lenses
startDocumentAnalysis_clientRequestToken :: Lens' StartDocumentAnalysis (Maybe Text) Source #
The idempotent token that you use to identify the start request. If you
use the same token with multiple StartDocumentAnalysis
requests, the
same JobId
is returned. Use ClientRequestToken
to prevent the same
job from being accidentally started more than once. For more
information, see
Calling Amazon Textract Asynchronous Operations.
startDocumentAnalysis_jobTag :: Lens' StartDocumentAnalysis (Maybe Text) Source #
An identifier that you specify that's included in the completion
notification published to the Amazon SNS topic. For example, you can use
JobTag
to identify the type of document that the completion
notification corresponds to (such as a tax form or a receipt).
startDocumentAnalysis_kmsKeyId :: Lens' StartDocumentAnalysis (Maybe Text) Source #
The KMS key used to encrypt the inference results. This can be in either Key ID or Key Alias format. When a KMS key is provided, the KMS key will be used for server-side encryption of the objects in the customer bucket. When this parameter is not enabled, the result will be encrypted server side,using SSE-S3.
startDocumentAnalysis_notificationChannel :: Lens' StartDocumentAnalysis (Maybe NotificationChannel) Source #
The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation to.
startDocumentAnalysis_outputConfig :: Lens' StartDocumentAnalysis (Maybe OutputConfig) Source #
Sets if the output will go to a customer defined bucket. By default, Amazon Textract will save the results internally to be accessed by the GetDocumentAnalysis operation.
startDocumentAnalysis_queriesConfig :: Lens' StartDocumentAnalysis (Maybe QueriesConfig) Source #
Undocumented member.
startDocumentAnalysis_documentLocation :: Lens' StartDocumentAnalysis DocumentLocation Source #
The location of the document to be processed.
startDocumentAnalysis_featureTypes :: Lens' StartDocumentAnalysis [FeatureType] Source #
A list of the types of analysis to perform. Add TABLES to the list to
return information about the tables that are detected in the input
document. Add FORMS to return detected form data. To perform both types
of analysis, add TABLES and FORMS to FeatureTypes
. All lines and words
detected in the document are included in the response (including text
that isn't related to the value of FeatureTypes
).
Destructuring the Response
data StartDocumentAnalysisResponse Source #
See: newStartDocumentAnalysisResponse
smart constructor.
StartDocumentAnalysisResponse' | |
|
Instances
newStartDocumentAnalysisResponse Source #
Create a value of StartDocumentAnalysisResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:jobId:StartDocumentAnalysisResponse'
, startDocumentAnalysisResponse_jobId
- The identifier for the document text detection job. Use JobId
to
identify the job in a subsequent call to GetDocumentAnalysis
. A
JobId
value is only valid for 7 days.
$sel:httpStatus:StartDocumentAnalysisResponse'
, startDocumentAnalysisResponse_httpStatus
- The response's http status code.
Response Lenses
startDocumentAnalysisResponse_jobId :: Lens' StartDocumentAnalysisResponse (Maybe Text) Source #
The identifier for the document text detection job. Use JobId
to
identify the job in a subsequent call to GetDocumentAnalysis
. A
JobId
value is only valid for 7 days.
startDocumentAnalysisResponse_httpStatus :: Lens' StartDocumentAnalysisResponse Int Source #
The response's http status code.