Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Starts the asynchronous detection of text in a document. Amazon Textract can detect lines of text and the words that make up a line of text.
StartDocumentTextDetection
can analyze text in documents that are in
JPEG, PNG, 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.
StartTextDetection
returns a job identifier (JobId
) that you use to
get the results of the operation. When text detection 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 detection
operation, first check that the status value published to the Amazon SNS
topic is SUCCEEDED
. If so, call GetDocumentTextDetection, and pass the
job identifier (JobId
) from the initial call to
StartDocumentTextDetection
.
For more information, see Document Text Detection.
Synopsis
- data StartDocumentTextDetection = StartDocumentTextDetection' {}
- newStartDocumentTextDetection :: DocumentLocation -> StartDocumentTextDetection
- startDocumentTextDetection_jobTag :: Lens' StartDocumentTextDetection (Maybe Text)
- startDocumentTextDetection_notificationChannel :: Lens' StartDocumentTextDetection (Maybe NotificationChannel)
- startDocumentTextDetection_kmsKeyId :: Lens' StartDocumentTextDetection (Maybe Text)
- startDocumentTextDetection_outputConfig :: Lens' StartDocumentTextDetection (Maybe OutputConfig)
- startDocumentTextDetection_clientRequestToken :: Lens' StartDocumentTextDetection (Maybe Text)
- startDocumentTextDetection_documentLocation :: Lens' StartDocumentTextDetection DocumentLocation
- data StartDocumentTextDetectionResponse = StartDocumentTextDetectionResponse' {
- jobId :: Maybe Text
- httpStatus :: Int
- newStartDocumentTextDetectionResponse :: Int -> StartDocumentTextDetectionResponse
- startDocumentTextDetectionResponse_jobId :: Lens' StartDocumentTextDetectionResponse (Maybe Text)
- startDocumentTextDetectionResponse_httpStatus :: Lens' StartDocumentTextDetectionResponse Int
Creating a Request
data StartDocumentTextDetection Source #
See: newStartDocumentTextDetection
smart constructor.
StartDocumentTextDetection' | |
|
Instances
newStartDocumentTextDetection Source #
Create a value of StartDocumentTextDetection
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:jobTag:StartDocumentTextDetection'
, startDocumentTextDetection_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:notificationChannel:StartDocumentTextDetection'
, startDocumentTextDetection_notificationChannel
- The Amazon SNS topic ARN that you want Amazon Textract to publish the
completion status of the operation to.
$sel:kmsKeyId:StartDocumentTextDetection'
, startDocumentTextDetection_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:outputConfig:StartDocumentTextDetection'
, startDocumentTextDetection_outputConfig
- Sets if the output will go to a customer defined bucket. By default
Amazon Textract will save the results internally to be accessed with the
GetDocumentTextDetection operation.
$sel:clientRequestToken:StartDocumentTextDetection'
, startDocumentTextDetection_clientRequestToken
- The idempotent token that's used to identify the start request. If you
use the same token with multiple StartDocumentTextDetection
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:documentLocation:StartDocumentTextDetection'
, startDocumentTextDetection_documentLocation
- The location of the document to be processed.
Request Lenses
startDocumentTextDetection_jobTag :: Lens' StartDocumentTextDetection (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).
startDocumentTextDetection_notificationChannel :: Lens' StartDocumentTextDetection (Maybe NotificationChannel) Source #
The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation to.
startDocumentTextDetection_kmsKeyId :: Lens' StartDocumentTextDetection (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.
startDocumentTextDetection_outputConfig :: Lens' StartDocumentTextDetection (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 with the GetDocumentTextDetection operation.
startDocumentTextDetection_clientRequestToken :: Lens' StartDocumentTextDetection (Maybe Text) Source #
The idempotent token that's used to identify the start request. If you
use the same token with multiple StartDocumentTextDetection
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.
startDocumentTextDetection_documentLocation :: Lens' StartDocumentTextDetection DocumentLocation Source #
The location of the document to be processed.
Destructuring the Response
data StartDocumentTextDetectionResponse Source #
See: newStartDocumentTextDetectionResponse
smart constructor.
StartDocumentTextDetectionResponse' | |
|
Instances
Eq StartDocumentTextDetectionResponse Source # | |
Read StartDocumentTextDetectionResponse Source # | |
Show StartDocumentTextDetectionResponse Source # | |
Generic StartDocumentTextDetectionResponse Source # | |
NFData StartDocumentTextDetectionResponse Source # | |
Defined in Amazonka.Textract.StartDocumentTextDetection rnf :: StartDocumentTextDetectionResponse -> () # | |
type Rep StartDocumentTextDetectionResponse Source # | |
Defined in Amazonka.Textract.StartDocumentTextDetection type Rep StartDocumentTextDetectionResponse = D1 ('MetaData "StartDocumentTextDetectionResponse" "Amazonka.Textract.StartDocumentTextDetection" "libZSservicesZSamazonka-textractZSamazonka-textract" 'False) (C1 ('MetaCons "StartDocumentTextDetectionResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "jobId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) |
newStartDocumentTextDetectionResponse Source #
Create a value of StartDocumentTextDetectionResponse
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:StartDocumentTextDetectionResponse'
, startDocumentTextDetectionResponse_jobId
- The identifier of the text detection job for the document. Use JobId
to identify the job in a subsequent call to GetDocumentTextDetection
.
A JobId
value is only valid for 7 days.
$sel:httpStatus:StartDocumentTextDetectionResponse'
, startDocumentTextDetectionResponse_httpStatus
- The response's http status code.
Response Lenses
startDocumentTextDetectionResponse_jobId :: Lens' StartDocumentTextDetectionResponse (Maybe Text) Source #
The identifier of the text detection job for the document. Use JobId
to identify the job in a subsequent call to GetDocumentTextDetection
.
A JobId
value is only valid for 7 days.
startDocumentTextDetectionResponse_httpStatus :: Lens' StartDocumentTextDetectionResponse Int Source #
The response's http status code.