libZSservicesZSamazonka-textractZSamazonka-textract
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Textract.StartDocumentTextDetection

Description

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

Creating a Request

data StartDocumentTextDetection Source #

See: newStartDocumentTextDetection smart constructor.

Constructors

StartDocumentTextDetection' 

Fields

  • jobTag :: Maybe Text

    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).

  • notificationChannel :: Maybe NotificationChannel

    The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation to.

  • kmsKeyId :: Maybe Text

    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.

  • outputConfig :: Maybe 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.

  • clientRequestToken :: Maybe Text

    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.

  • documentLocation :: DocumentLocation

    The location of the document to be processed.

Instances

Instances details
Eq StartDocumentTextDetection Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentTextDetection

Read StartDocumentTextDetection Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentTextDetection

Show StartDocumentTextDetection Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentTextDetection

Generic StartDocumentTextDetection Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentTextDetection

Associated Types

type Rep StartDocumentTextDetection :: Type -> Type #

NFData StartDocumentTextDetection Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentTextDetection

Hashable StartDocumentTextDetection Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentTextDetection

ToJSON StartDocumentTextDetection Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentTextDetection

AWSRequest StartDocumentTextDetection Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentTextDetection

ToHeaders StartDocumentTextDetection Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentTextDetection

ToPath StartDocumentTextDetection Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentTextDetection

ToQuery StartDocumentTextDetection Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentTextDetection

type Rep StartDocumentTextDetection Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentTextDetection

type Rep StartDocumentTextDetection = D1 ('MetaData "StartDocumentTextDetection" "Amazonka.Textract.StartDocumentTextDetection" "libZSservicesZSamazonka-textractZSamazonka-textract" 'False) (C1 ('MetaCons "StartDocumentTextDetection'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "jobTag") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "notificationChannel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe NotificationChannel)) :*: S1 ('MetaSel ('Just "kmsKeyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 ('MetaSel ('Just "outputConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe OutputConfig)) :*: (S1 ('MetaSel ('Just "clientRequestToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "documentLocation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DocumentLocation)))))
type AWSResponse StartDocumentTextDetection Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentTextDetection

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.

Destructuring the Response

data StartDocumentTextDetectionResponse Source #

Constructors

StartDocumentTextDetectionResponse' 

Fields

  • jobId :: Maybe Text

    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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq StartDocumentTextDetectionResponse Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentTextDetection

Read StartDocumentTextDetectionResponse Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentTextDetection

Show StartDocumentTextDetectionResponse Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentTextDetection

Generic StartDocumentTextDetectionResponse Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentTextDetection

Associated Types

type Rep StartDocumentTextDetectionResponse :: Type -> Type #

NFData StartDocumentTextDetectionResponse Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentTextDetection

type Rep StartDocumentTextDetectionResponse Source # 
Instance details

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.