amazonka-textract-2.0: Amazon Textract SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Textract.StartDocumentAnalysis

Description

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

Creating a Request

data StartDocumentAnalysis Source #

See: newStartDocumentAnalysis smart constructor.

Constructors

StartDocumentAnalysis' 

Fields

  • clientRequestToken :: Maybe Text

    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.

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

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

  • notificationChannel :: Maybe NotificationChannel

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

  • 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 by the GetDocumentAnalysis operation.

  • queriesConfig :: Maybe QueriesConfig
     
  • documentLocation :: DocumentLocation

    The location of the document to be processed.

  • featureTypes :: [FeatureType]

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

Instances

Instances details
ToJSON StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

ToHeaders StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

ToPath StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

ToQuery StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

AWSRequest StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

Associated Types

type AWSResponse StartDocumentAnalysis #

Generic StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

Associated Types

type Rep StartDocumentAnalysis :: Type -> Type #

Read StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

Show StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

NFData StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

Methods

rnf :: StartDocumentAnalysis -> () #

Eq StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

Hashable StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

type AWSResponse StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

type Rep StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

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

Constructors

StartDocumentAnalysisResponse' 

Fields

  • jobId :: Maybe Text

    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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic StartDocumentAnalysisResponse Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

Associated Types

type Rep StartDocumentAnalysisResponse :: Type -> Type #

Read StartDocumentAnalysisResponse Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

Show StartDocumentAnalysisResponse Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

NFData StartDocumentAnalysisResponse Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

Eq StartDocumentAnalysisResponse Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

type Rep StartDocumentAnalysisResponse Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

type Rep StartDocumentAnalysisResponse = D1 ('MetaData "StartDocumentAnalysisResponse" "Amazonka.Textract.StartDocumentAnalysis" "amazonka-textract-2.0-6i5mJlqzS4xCepXxXFK6UK" 'False) (C1 ('MetaCons "StartDocumentAnalysisResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "jobId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

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.