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

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

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

  • 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
Eq StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

Read StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

Show StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

Generic StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

Associated Types

type Rep StartDocumentAnalysis :: Type -> Type #

NFData StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

Methods

rnf :: StartDocumentAnalysis -> () #

Hashable StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

ToJSON StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

AWSRequest StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

Associated Types

type AWSResponse 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

type Rep StartDocumentAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

type Rep StartDocumentAnalysis = D1 ('MetaData "StartDocumentAnalysis" "Amazonka.Textract.StartDocumentAnalysis" "libZSservicesZSamazonka-textractZSamazonka-textract" 'False) (C1 ('MetaCons "StartDocumentAnalysis'" '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) :*: S1 ('MetaSel ('Just "featureTypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [FeatureType])))))
type AWSResponse 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: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:notificationChannel:StartDocumentAnalysis', startDocumentAnalysis_notificationChannel - The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation to.

$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: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: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: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_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_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_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_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_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_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
Eq StartDocumentAnalysisResponse Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

Read StartDocumentAnalysisResponse Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

Show StartDocumentAnalysisResponse Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

Generic StartDocumentAnalysisResponse Source # 
Instance details

Defined in Amazonka.Textract.StartDocumentAnalysis

Associated Types

type Rep StartDocumentAnalysisResponse :: Type -> Type #

NFData 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" "libZSservicesZSamazonka-textractZSamazonka-textract" '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.