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

Description

Starts the classification and analysis of an input document. StartLendingAnalysis initiates the classification and analysis of a packet of lending documents. StartLendingAnalysis operates on a document file located in an Amazon S3 bucket.

StartLendingAnalysis can analyze text in documents that are in one of the following formats: JPEG, PNG, TIFF, PDF. Use DocumentLocation to specify the bucket name and the file name of the document.

StartLendingAnalysis returns a job identifier (JobId) that you use to get the results of the operation. When the 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 the status is SUCCEEDED you can call either GetLendingAnalysis or GetLendingAnalysisSummary and provide the JobId to obtain the results of the analysis.

If using OutputConfig to specify an Amazon S3 bucket, the output will be contained within the specified prefix in a directory labeled with the job-id. In the directory there are 3 sub-directories:

  • detailedResponse (contains the GetLendingAnalysis response)
  • summaryResponse (for the GetLendingAnalysisSummary response)
  • splitDocuments (documents split across logical boundaries)
Synopsis

Creating a Request

data StartLendingAnalysis Source #

See: newStartLendingAnalysis smart constructor.

Constructors

StartLendingAnalysis' 

Fields

  • clientRequestToken :: Maybe Text

    The idempotent token that you use to identify the start request. If you use the same token with multiple StartLendingAnalysis 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 to be 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
     
  • outputConfig :: Maybe OutputConfig
     
  • documentLocation :: DocumentLocation
     

Instances

Instances details
ToJSON StartLendingAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

ToHeaders StartLendingAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

ToPath StartLendingAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

ToQuery StartLendingAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

AWSRequest StartLendingAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

Associated Types

type AWSResponse StartLendingAnalysis #

Generic StartLendingAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

Associated Types

type Rep StartLendingAnalysis :: Type -> Type #

Read StartLendingAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

Show StartLendingAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

NFData StartLendingAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

Methods

rnf :: StartLendingAnalysis -> () #

Eq StartLendingAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

Hashable StartLendingAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

type AWSResponse StartLendingAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

type Rep StartLendingAnalysis Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

type Rep StartLendingAnalysis = D1 ('MetaData "StartLendingAnalysis" "Amazonka.Textract.StartLendingAnalysis" "amazonka-textract-2.0-6i5mJlqzS4xCepXxXFK6UK" 'False) (C1 ('MetaCons "StartLendingAnalysis'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "clientRequestToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "jobTag") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "kmsKeyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 ('MetaSel ('Just "notificationChannel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe NotificationChannel)) :*: (S1 ('MetaSel ('Just "outputConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe OutputConfig)) :*: S1 ('MetaSel ('Just "documentLocation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DocumentLocation)))))

newStartLendingAnalysis Source #

Create a value of StartLendingAnalysis 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:StartLendingAnalysis', startLendingAnalysis_clientRequestToken - The idempotent token that you use to identify the start request. If you use the same token with multiple StartLendingAnalysis 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:StartLendingAnalysis', startLendingAnalysis_jobTag - An identifier that you specify to be 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:StartLendingAnalysis', startLendingAnalysis_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:StartLendingAnalysis', startLendingAnalysis_notificationChannel - Undocumented member.

$sel:outputConfig:StartLendingAnalysis', startLendingAnalysis_outputConfig - Undocumented member.

$sel:documentLocation:StartLendingAnalysis', startLendingAnalysis_documentLocation - Undocumented member.

Request Lenses

startLendingAnalysis_clientRequestToken :: Lens' StartLendingAnalysis (Maybe Text) Source #

The idempotent token that you use to identify the start request. If you use the same token with multiple StartLendingAnalysis 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.

startLendingAnalysis_jobTag :: Lens' StartLendingAnalysis (Maybe Text) Source #

An identifier that you specify to be 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).

startLendingAnalysis_kmsKeyId :: Lens' StartLendingAnalysis (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.

Destructuring the Response

data StartLendingAnalysisResponse Source #

See: newStartLendingAnalysisResponse smart constructor.

Constructors

StartLendingAnalysisResponse' 

Fields

  • jobId :: Maybe Text

    A unique identifier for the lending or text-detection job. The JobId is returned from StartLendingAnalysis. A JobId value is only valid for 7 days.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic StartLendingAnalysisResponse Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

Associated Types

type Rep StartLendingAnalysisResponse :: Type -> Type #

Read StartLendingAnalysisResponse Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

Show StartLendingAnalysisResponse Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

NFData StartLendingAnalysisResponse Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

Eq StartLendingAnalysisResponse Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

type Rep StartLendingAnalysisResponse Source # 
Instance details

Defined in Amazonka.Textract.StartLendingAnalysis

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

newStartLendingAnalysisResponse Source #

Create a value of StartLendingAnalysisResponse 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:StartLendingAnalysisResponse', startLendingAnalysisResponse_jobId - A unique identifier for the lending or text-detection job. The JobId is returned from StartLendingAnalysis. A JobId value is only valid for 7 days.

$sel:httpStatus:StartLendingAnalysisResponse', startLendingAnalysisResponse_httpStatus - The response's http status code.

Response Lenses

startLendingAnalysisResponse_jobId :: Lens' StartLendingAnalysisResponse (Maybe Text) Source #

A unique identifier for the lending or text-detection job. The JobId is returned from StartLendingAnalysis. A JobId value is only valid for 7 days.