textract

package module
v1.30.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 42 Imported by: 17

Documentation

Overview

Package textract provides the API client, operations, and parameter types for Amazon Textract.

Amazon Textract detects and analyzes text in documents and converts it into machine-readable text. This is the API reference documentation for Amazon Textract.

Index

Constants

View Source
const ServiceAPIVersion = "2018-06-27"
View Source
const ServiceID = "Textract"

Variables

This section is empty.

Functions

func NewDefaultEndpointResolver

func NewDefaultEndpointResolver() *internalendpoints.Resolver

NewDefaultEndpointResolver constructs a new service endpoint resolver

func WithAPIOptions added in v1.0.0

func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)

WithAPIOptions returns a functional option for setting the Client's APIOptions option.

func WithEndpointResolver deprecated

func WithEndpointResolver(v EndpointResolver) func(*Options)

Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for this field will likely prevent you from using any endpoint-related service features released after the introduction of EndpointResolverV2 and BaseEndpoint. To migrate an EndpointResolver implementation that uses a custom endpoint, set the client option BaseEndpoint instead.

func WithEndpointResolverV2 added in v1.22.0

func WithEndpointResolverV2(v EndpointResolverV2) func(*Options)

WithEndpointResolverV2 returns a functional option for setting the Client's EndpointResolverV2 option.

func WithSigV4SigningName added in v1.27.2

func WithSigV4SigningName(name string) func(*Options)

WithSigV4SigningName applies an override to the authentication workflow to use the given signing name for SigV4-authenticated operations.

This is an advanced setting. The value here is FINAL, taking precedence over the resolved signing name from both auth scheme resolution and endpoint resolution.

func WithSigV4SigningRegion added in v1.27.2

func WithSigV4SigningRegion(region string) func(*Options)

WithSigV4SigningRegion applies an override to the authentication workflow to use the given signing region for SigV4-authenticated operations.

This is an advanced setting. The value here is FINAL, taking precedence over the resolved signing region from both auth scheme resolution and endpoint resolution.

Types

type AnalyzeDocumentInput

type AnalyzeDocumentInput struct {

	// The input document as base64-encoded bytes or an Amazon S3 object. If you use
	// the AWS CLI to call Amazon Textract operations, you can't pass image bytes. The
	// document must be an image in JPEG, PNG, PDF, or TIFF format. If you're using an
	// AWS SDK to call Amazon Textract, you might not need to base64-encode image bytes
	// that are passed using the Bytes field.
	//
	// This member is required.
	Document *types.Document

	// 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. Add SIGNATURES to return the locations of detected
	// signatures. Add LAYOUT to the list to return information about the layout of the
	// document. All lines and words detected in the document are included in the
	// response (including text that isn't related to the value of FeatureTypes ).
	//
	// This member is required.
	FeatureTypes []types.FeatureType

	// Specifies the adapter to be used when analyzing a document.
	AdaptersConfig *types.AdaptersConfig

	// Sets the configuration for the human in the loop workflow for analyzing
	// documents.
	HumanLoopConfig *types.HumanLoopConfig

	// Contains Queries and the alias for those Queries, as determined by the input.
	QueriesConfig *types.QueriesConfig
	// contains filtered or unexported fields
}

type AnalyzeDocumentOutput

type AnalyzeDocumentOutput struct {

	// The version of the model used to analyze the document.
	AnalyzeDocumentModelVersion *string

	// The items that are detected and analyzed by AnalyzeDocument .
	Blocks []types.Block

	// Metadata about the analyzed document. An example is the number of pages.
	DocumentMetadata *types.DocumentMetadata

	// Shows the results of the human in the loop evaluation.
	HumanLoopActivationOutput *types.HumanLoopActivationOutput

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type AnalyzeExpenseInput added in v1.4.0

type AnalyzeExpenseInput struct {

	// The input document, either as bytes or as an S3 object. You pass image bytes to
	// an Amazon Textract API operation by using the Bytes property. For example, you
	// would use the Bytes property to pass a document loaded from a local file
	// system. Image bytes passed by using the Bytes property must be base64 encoded.
	// Your code might not need to encode document file bytes if you're using an AWS
	// SDK to call Amazon Textract API operations. You pass images stored in an S3
	// bucket to an Amazon Textract API operation by using the S3Object property.
	// Documents stored in an S3 bucket don't need to be base64 encoded. The AWS Region
	// for the S3 bucket that contains the S3 object must match the AWS Region that you
	// use for Amazon Textract operations. If you use the AWS CLI to call Amazon
	// Textract operations, passing image bytes using the Bytes property isn't
	// supported. You must first upload the document to an Amazon S3 bucket, and then
	// call the operation using the S3Object property. For Amazon Textract to process
	// an S3 object, the user must have permission to access the S3 object.
	//
	// This member is required.
	Document *types.Document
	// contains filtered or unexported fields
}

type AnalyzeExpenseOutput added in v1.4.0

type AnalyzeExpenseOutput struct {

	// Information about the input document.
	DocumentMetadata *types.DocumentMetadata

	// The expenses detected by Amazon Textract.
	ExpenseDocuments []types.ExpenseDocument

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type AnalyzeIDInput added in v1.10.0

type AnalyzeIDInput struct {

	// The document being passed to AnalyzeID.
	//
	// This member is required.
	DocumentPages []types.Document
	// contains filtered or unexported fields
}

type AnalyzeIDOutput added in v1.10.0

type AnalyzeIDOutput struct {

	// The version of the AnalyzeIdentity API being used to process documents.
	AnalyzeIDModelVersion *string

	// Information about the input document.
	DocumentMetadata *types.DocumentMetadata

	// The list of documents processed by AnalyzeID. Includes a number denoting their
	// place in the list and the response structure for the document.
	IdentityDocuments []types.IdentityDocument

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type AuthResolverParameters added in v1.27.2

type AuthResolverParameters struct {
	// The name of the operation being invoked.
	Operation string

	// The region in which the operation is being invoked.
	Region string
}

AuthResolverParameters contains the set of inputs necessary for auth scheme resolution.

type AuthSchemeResolver added in v1.27.2

type AuthSchemeResolver interface {
	ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error)
}

AuthSchemeResolver returns a set of possible authentication options for an operation.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides the API client to make operations call for Amazon Textract.

func New

func New(options Options, optFns ...func(*Options)) *Client

New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.

func NewFromConfig

func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client

NewFromConfig returns a new client from the provided config.

func (*Client) AnalyzeDocument

func (c *Client) AnalyzeDocument(ctx context.Context, params *AnalyzeDocumentInput, optFns ...func(*Options)) (*AnalyzeDocumentOutput, error)

Analyzes an input document for relationships between detected items. The types of information returned are as follows:

  • Form data (key-value pairs). The related information is returned in two Block objects, each of type KEY_VALUE_SET : a KEY Block object and a VALUE Block object. For example, Name: Ana Silva Carolina contains a key and value. Name: is the key. Ana Silva Carolina is the value.
  • Table and table cell data. A TABLE Block object contains information about a detected table. A CELL Block object is returned for each cell in a table.
  • Lines and words of text. A LINE Block object contains one or more WORD Block objects. All lines and words that are detected in the document are returned (including text that doesn't have a relationship with the value of FeatureTypes ).
  • Signatures. A SIGNATURE Block object contains the location information of a signature in a document. If used in conjunction with forms or tables, a signature can be given a Key-Value pairing or be detected in the cell of a table.
  • Query. A QUERY Block object contains the query text, alias and link to the associated Query results block object.
  • Query Result. A QUERY_RESULT Block object contains the answer to the query and an ID that connects it to the query asked. This Block also contains a confidence score.

Selection elements such as check boxes and option buttons (radio buttons) can be detected in form data and in tables. A SELECTION_ELEMENT Block object contains information about a selection element, including the selection status. You can choose which type of analysis to perform by specifying the FeatureTypes list. The output is returned in a list of Block objects. AnalyzeDocument is a synchronous operation. To analyze documents asynchronously, use StartDocumentAnalysis . For more information, see Document Text Analysis (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html) .

func (*Client) AnalyzeExpense added in v1.4.0

func (c *Client) AnalyzeExpense(ctx context.Context, params *AnalyzeExpenseInput, optFns ...func(*Options)) (*AnalyzeExpenseOutput, error)

AnalyzeExpense synchronously analyzes an input document for financially related relationships between text. Information is returned as ExpenseDocuments and seperated as follows:

  • LineItemGroups - A data set containing LineItems which store information about the lines of text, such as an item purchased and its price on a receipt.
  • SummaryFields - Contains all other information a receipt, such as header information or the vendors name.

func (*Client) AnalyzeID added in v1.10.0

func (c *Client) AnalyzeID(ctx context.Context, params *AnalyzeIDInput, optFns ...func(*Options)) (*AnalyzeIDOutput, error)

Analyzes identity documents for relevant information. This information is extracted and returned as IdentityDocumentFields , which records both the normalized field and value of the extracted text. Unlike other Amazon Textract operations, AnalyzeID doesn't return any Geometry data.

func (*Client) CreateAdapter added in v1.25.0

func (c *Client) CreateAdapter(ctx context.Context, params *CreateAdapterInput, optFns ...func(*Options)) (*CreateAdapterOutput, error)

Creates an adapter, which can be fine-tuned for enhanced performance on user provided documents. Takes an AdapterName and FeatureType. Currently the only supported feature type is QUERIES . You can also provide a Description, Tags, and a ClientRequestToken. You can choose whether or not the adapter should be AutoUpdated with the AutoUpdate argument. By default, AutoUpdate is set to DISABLED.

func (*Client) CreateAdapterVersion added in v1.25.0

func (c *Client) CreateAdapterVersion(ctx context.Context, params *CreateAdapterVersionInput, optFns ...func(*Options)) (*CreateAdapterVersionOutput, error)

Creates a new version of an adapter. Operates on a provided AdapterId and a specified dataset provided via the DatasetConfig argument. Requires that you specify an Amazon S3 bucket with the OutputConfig argument. You can provide an optional KMSKeyId, an optional ClientRequestToken, and optional tags.

func (*Client) DeleteAdapter added in v1.25.0

func (c *Client) DeleteAdapter(ctx context.Context, params *DeleteAdapterInput, optFns ...func(*Options)) (*DeleteAdapterOutput, error)

Deletes an Amazon Textract adapter. Takes an AdapterId and deletes the adapter specified by the ID.

func (*Client) DeleteAdapterVersion added in v1.25.0

func (c *Client) DeleteAdapterVersion(ctx context.Context, params *DeleteAdapterVersionInput, optFns ...func(*Options)) (*DeleteAdapterVersionOutput, error)

Deletes an Amazon Textract adapter version. Requires that you specify both an AdapterId and a AdapterVersion. Deletes the adapter version specified by the AdapterId and the AdapterVersion.

func (*Client) DetectDocumentText

func (c *Client) DetectDocumentText(ctx context.Context, params *DetectDocumentTextInput, optFns ...func(*Options)) (*DetectDocumentTextOutput, error)

Detects text in the input document. Amazon Textract can detect lines of text and the words that make up a line of text. The input document must be in one of the following image formats: JPEG, PNG, PDF, or TIFF. DetectDocumentText returns the detected text in an array of Block objects. Each document page has as an associated Block of type PAGE. Each PAGE Block object is the parent of LINE Block objects that represent the lines of detected text on a page. A LINE Block object is a parent for each word that makes up the line. Words are represented by Block objects of type WORD. DetectDocumentText is a synchronous operation. To analyze documents asynchronously, use StartDocumentTextDetection . For more information, see Document Text Detection (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html) .

func (*Client) GetAdapter added in v1.25.0

func (c *Client) GetAdapter(ctx context.Context, params *GetAdapterInput, optFns ...func(*Options)) (*GetAdapterOutput, error)

Gets configuration information for an adapter specified by an AdapterId, returning information on AdapterName, Description, CreationTime, AutoUpdate status, and FeatureTypes.

func (*Client) GetAdapterVersion added in v1.25.0

func (c *Client) GetAdapterVersion(ctx context.Context, params *GetAdapterVersionInput, optFns ...func(*Options)) (*GetAdapterVersionOutput, error)

Gets configuration information for the specified adapter version, including: AdapterId, AdapterVersion, FeatureTypes, Status, StatusMessage, DatasetConfig, KMSKeyId, OutputConfig, Tags and EvaluationMetrics.

func (*Client) GetDocumentAnalysis

func (c *Client) GetDocumentAnalysis(ctx context.Context, params *GetDocumentAnalysisInput, optFns ...func(*Options)) (*GetDocumentAnalysisOutput, error)

Gets the results for an Amazon Textract asynchronous operation that analyzes text in a document. You start asynchronous text analysis by calling StartDocumentAnalysis , which returns a job identifier ( JobId ). When the text analysis operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to StartDocumentAnalysis . 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 GetDocumentAnalysis , and pass the job identifier ( JobId ) from the initial call to StartDocumentAnalysis . GetDocumentAnalysis returns an array of Block objects. The following types of information are returned:

  • Form data (key-value pairs). The related information is returned in two Block objects, each of type KEY_VALUE_SET : a KEY Block object and a VALUE Block object. For example, Name: Ana Silva Carolina contains a key and value. Name: is the key. Ana Silva Carolina is the value.
  • Table and table cell data. A TABLE Block object contains information about a detected table. A CELL Block object is returned for each cell in a table.
  • Lines and words of text. A LINE Block object contains one or more WORD Block objects. All lines and words that are detected in the document are returned (including text that doesn't have a relationship with the value of the StartDocumentAnalysis FeatureTypes input parameter).
  • Query. A QUERY Block object contains the query text, alias and link to the associated Query results block object.
  • Query Results. A QUERY_RESULT Block object contains the answer to the query and an ID that connects it to the query asked. This Block also contains a confidence score.

While processing a document with queries, look out for INVALID_REQUEST_PARAMETERS output. This indicates that either the per page query limit has been exceeded or that the operation is trying to query a page in the document which doesn’t exist. Selection elements such as check boxes and option buttons (radio buttons) can be detected in form data and in tables. A SELECTION_ELEMENT Block object contains information about a selection element, including the selection status. Use the MaxResults parameter to limit the number of blocks that are returned. If there are more results than specified in MaxResults , the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetDocumentAnalysis , and populate the NextToken request parameter with the token value that's returned from the previous call to GetDocumentAnalysis . For more information, see Document Text Analysis (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html) .

func (*Client) GetDocumentTextDetection

func (c *Client) GetDocumentTextDetection(ctx context.Context, params *GetDocumentTextDetectionInput, optFns ...func(*Options)) (*GetDocumentTextDetectionOutput, error)

Gets the results for an Amazon Textract asynchronous operation that detects text in a document. Amazon Textract can detect lines of text and the words that make up a line of text. You start asynchronous text detection by calling StartDocumentTextDetection , which returns a job identifier ( JobId ). When the text detection operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to StartDocumentTextDetection . 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 . GetDocumentTextDetection returns an array of Block objects. Each document page has as an associated Block of type PAGE. Each PAGE Block object is the parent of LINE Block objects that represent the lines of detected text on a page. A LINE Block object is a parent for each word that makes up the line. Words are represented by Block objects of type WORD. Use the MaxResults parameter to limit the number of blocks that are returned. If there are more results than specified in MaxResults , the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetDocumentTextDetection , and populate the NextToken request parameter with the token value that's returned from the previous call to GetDocumentTextDetection . For more information, see Document Text Detection (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html) .

func (*Client) GetExpenseAnalysis added in v1.8.0

func (c *Client) GetExpenseAnalysis(ctx context.Context, params *GetExpenseAnalysisInput, optFns ...func(*Options)) (*GetExpenseAnalysisOutput, error)

Gets the results for an Amazon Textract asynchronous operation that analyzes invoices and receipts. Amazon Textract finds contact information, items purchased, and vendor name, from input invoices and receipts. You start asynchronous invoice/receipt analysis by calling StartExpenseAnalysis , which returns a job identifier ( JobId ). Upon completion of the invoice/receipt analysis, Amazon Textract publishes the completion status to the Amazon Simple Notification Service (Amazon SNS) topic. This topic must be registered in the initial call to StartExpenseAnalysis . To get the results of the invoice/receipt analysis operation, first ensure that the status value published to the Amazon SNS topic is SUCCEEDED . If so, call GetExpenseAnalysis , and pass the job identifier ( JobId ) from the initial call to StartExpenseAnalysis . Use the MaxResults parameter to limit the number of blocks that are returned. If there are more results than specified in MaxResults , the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetExpenseAnalysis , and populate the NextToken request parameter with the token value that's returned from the previous call to GetExpenseAnalysis . For more information, see Analyzing Invoices and Receipts (https://docs.aws.amazon.com/textract/latest/dg/invoices-receipts.html) .

func (*Client) GetLendingAnalysis added in v1.19.0

func (c *Client) GetLendingAnalysis(ctx context.Context, params *GetLendingAnalysisInput, optFns ...func(*Options)) (*GetLendingAnalysisOutput, error)

Gets the results for an Amazon Textract asynchronous operation that analyzes text in a lending document. You start asynchronous text analysis by calling StartLendingAnalysis , which returns a job identifier ( JobId ). When the text analysis operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to StartLendingAnalysis . 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 GetLendingAnalysis, and pass the job identifier ( JobId ) from the initial call to StartLendingAnalysis .

func (*Client) GetLendingAnalysisSummary added in v1.19.0

func (c *Client) GetLendingAnalysisSummary(ctx context.Context, params *GetLendingAnalysisSummaryInput, optFns ...func(*Options)) (*GetLendingAnalysisSummaryOutput, error)

Gets summarized results for the StartLendingAnalysis operation, which analyzes text in a lending document. The returned summary consists of information about documents grouped together by a common document type. Information like detected signatures, page numbers, and split documents is returned with respect to the type of grouped document. You start asynchronous text analysis by calling StartLendingAnalysis , which returns a job identifier ( JobId ). When the text analysis operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that's registered in the initial call to StartLendingAnalysis . 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 GetLendingAnalysisSummary , and pass the job identifier ( JobId ) from the initial call to StartLendingAnalysis .

func (*Client) ListAdapterVersions added in v1.25.0

func (c *Client) ListAdapterVersions(ctx context.Context, params *ListAdapterVersionsInput, optFns ...func(*Options)) (*ListAdapterVersionsOutput, error)

List all version of an adapter that meet the specified filtration criteria.

func (*Client) ListAdapters added in v1.25.0

func (c *Client) ListAdapters(ctx context.Context, params *ListAdaptersInput, optFns ...func(*Options)) (*ListAdaptersOutput, error)

Lists all adapters that match the specified filtration criteria.

func (*Client) ListTagsForResource added in v1.25.0

func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error)

Lists all tags for an Amazon Textract resource.

func (*Client) Options added in v1.28.0

func (c *Client) Options() Options

Options returns a copy of the client configuration.

Callers SHOULD NOT perform mutations on any inner structures within client config. Config overrides should instead be made on a per-operation basis through functional options.

func (*Client) StartDocumentAnalysis

func (c *Client) StartDocumentAnalysis(ctx context.Context, params *StartDocumentAnalysisInput, optFns ...func(*Options)) (*StartDocumentAnalysisOutput, error)

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 (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html) .

func (*Client) StartDocumentTextDetection

func (c *Client) StartDocumentTextDetection(ctx context.Context, params *StartDocumentTextDetectionInput, optFns ...func(*Options)) (*StartDocumentTextDetectionOutput, error)

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, 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. 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 (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html) .

func (*Client) StartExpenseAnalysis added in v1.8.0

func (c *Client) StartExpenseAnalysis(ctx context.Context, params *StartExpenseAnalysisInput, optFns ...func(*Options)) (*StartExpenseAnalysisOutput, error)

Starts the asynchronous analysis of invoices or receipts for data like contact information, items purchased, and vendor names. StartExpenseAnalysis can analyze text in documents that are in JPEG, PNG, and PDF format. The documents must be stored in an Amazon S3 bucket. Use the DocumentLocation parameter to specify the name of your S3 bucket and the name of the document in that bucket. StartExpenseAnalysis returns a job identifier ( JobId ) that you will provide to GetExpenseAnalysis to retrieve the results of the operation. When the analysis of the input invoices/receipts is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you provide to the NotificationChannel . To obtain the results of the invoice and receipt analysis operation, ensure that the status value published to the Amazon SNS topic is SUCCEEDED . If so, call GetExpenseAnalysis , and pass the job identifier ( JobId ) that was returned by your call to StartExpenseAnalysis . For more information, see Analyzing Invoices and Receipts (https://docs.aws.amazon.com/textract/latest/dg/invoice-receipts.html) .

func (*Client) StartLendingAnalysis added in v1.19.0

func (c *Client) StartLendingAnalysis(ctx context.Context, params *StartLendingAnalysisInput, optFns ...func(*Options)) (*StartLendingAnalysisOutput, error)

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)

func (*Client) TagResource added in v1.25.0

func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error)

Adds one or more tags to the specified resource.

func (*Client) UntagResource added in v1.25.0

func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error)

Removes any tags with the specified keys from the specified resource.

func (*Client) UpdateAdapter added in v1.25.0

func (c *Client) UpdateAdapter(ctx context.Context, params *UpdateAdapterInput, optFns ...func(*Options)) (*UpdateAdapterOutput, error)

Update the configuration for an adapter. FeatureTypes configurations cannot be updated. At least one new parameter must be specified as an argument.

type CreateAdapterInput added in v1.25.0

type CreateAdapterInput struct {

	// The name to be assigned to the adapter being created.
	//
	// This member is required.
	AdapterName *string

	// The type of feature that the adapter is being trained on. Currrenly, supported
	// feature types are: QUERIES
	//
	// This member is required.
	FeatureTypes []types.FeatureType

	// Controls whether or not the adapter should automatically update.
	AutoUpdate types.AutoUpdate

	// Idempotent token is used to recognize the request. If the same token is used
	// with multiple CreateAdapter requests, the same session is returned. This token
	// is employed to avoid unintentionally creating the same session multiple times.
	ClientRequestToken *string

	// The description to be assigned to the adapter being created.
	Description *string

	// A list of tags to be added to the adapter.
	Tags map[string]string
	// contains filtered or unexported fields
}

type CreateAdapterOutput added in v1.25.0

type CreateAdapterOutput struct {

	// A string containing the unique ID for the adapter that has been created.
	AdapterId *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type CreateAdapterVersionInput added in v1.25.0

type CreateAdapterVersionInput struct {

	// A string containing a unique ID for the adapter that will receive a new version.
	//
	// This member is required.
	AdapterId *string

	// Specifies a dataset used to train a new adapter version. Takes a
	// ManifestS3Object as the value.
	//
	// This member is required.
	DatasetConfig *types.AdapterVersionDatasetConfig

	// Sets whether or not your output will go to a user created bucket. Used to set
	// the name of the bucket, and the prefix on the output file. OutputConfig is an
	// optional parameter which lets you adjust where your output will be placed. By
	// default, Amazon Textract will store the results internally and can only be
	// accessed by the Get API operations. With OutputConfig enabled, you can set the
	// name of the bucket the output will be sent to the file prefix of the results
	// where you can download your results. Additionally, you can set the KMSKeyID
	// parameter to a customer master key (CMK) to encrypt your output. Without this
	// parameter set Amazon Textract will encrypt server-side using the AWS managed CMK
	// for Amazon S3. Decryption of Customer Content is necessary for processing of the
	// documents by Amazon Textract. If your account is opted out under an AI services
	// opt out policy then all unencrypted Customer Content is immediately and
	// permanently deleted after the Customer Content has been processed by the
	// service. No copy of of the output is retained by Amazon Textract. For
	// information about how to opt out, see Managing AI services opt-out policy.  (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html)
	// For more information on data privacy, see the Data Privacy FAQ (https://aws.amazon.com/compliance/data-privacy-faq/)
	// .
	//
	// This member is required.
	OutputConfig *types.OutputConfig

	// Idempotent token is used to recognize the request. If the same token is used
	// with multiple CreateAdapterVersion requests, the same session is returned. This
	// token is employed to avoid unintentionally creating the same session multiple
	// times.
	ClientRequestToken *string

	// The identifier for your AWS Key Management Service key (AWS KMS key). Used to
	// encrypt your documents.
	KMSKeyId *string

	// A set of tags (key-value pairs) that you want to attach to the adapter version.
	Tags map[string]string
	// contains filtered or unexported fields
}

type CreateAdapterVersionOutput added in v1.25.0

type CreateAdapterVersionOutput struct {

	// A string containing the unique ID for the adapter that has received a new
	// version.
	AdapterId *string

	// A string describing the new version of the adapter.
	AdapterVersion *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type DeleteAdapterInput added in v1.25.0

type DeleteAdapterInput struct {

	// A string containing a unique ID for the adapter to be deleted.
	//
	// This member is required.
	AdapterId *string
	// contains filtered or unexported fields
}

type DeleteAdapterOutput added in v1.25.0

type DeleteAdapterOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type DeleteAdapterVersionInput added in v1.25.0

type DeleteAdapterVersionInput struct {

	// A string containing a unique ID for the adapter version that will be deleted.
	//
	// This member is required.
	AdapterId *string

	// Specifies the adapter version to be deleted.
	//
	// This member is required.
	AdapterVersion *string
	// contains filtered or unexported fields
}

type DeleteAdapterVersionOutput added in v1.25.0

type DeleteAdapterVersionOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type DetectDocumentTextInput

type DetectDocumentTextInput struct {

	// The input document as base64-encoded bytes or an Amazon S3 object. If you use
	// the AWS CLI to call Amazon Textract operations, you can't pass image bytes. The
	// document must be an image in JPEG or PNG format. If you're using an AWS SDK to
	// call Amazon Textract, you might not need to base64-encode image bytes that are
	// passed using the Bytes field.
	//
	// This member is required.
	Document *types.Document
	// contains filtered or unexported fields
}

type DetectDocumentTextOutput

type DetectDocumentTextOutput struct {

	// An array of Block objects that contain the text that's detected in the document.
	Blocks []types.Block

	//
	DetectDocumentTextModelVersion *string

	// Metadata about the document. It contains the number of pages that are detected
	// in the document.
	DocumentMetadata *types.DocumentMetadata

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type EndpointParameters added in v1.22.0

type EndpointParameters struct {
	// The AWS region used to dispatch the request.
	//
	// Parameter is
	// required.
	//
	// AWS::Region
	Region *string

	// When true, use the dual-stack endpoint. If the configured endpoint does not
	// support dual-stack, dispatching the request MAY return an error.
	//
	// Defaults to
	// false if no value is provided.
	//
	// AWS::UseDualStack
	UseDualStack *bool

	// When true, send this request to the FIPS-compliant regional endpoint. If the
	// configured endpoint does not have a FIPS compliant endpoint, dispatching the
	// request will return an error.
	//
	// Defaults to false if no value is
	// provided.
	//
	// AWS::UseFIPS
	UseFIPS *bool

	// Override the endpoint used to send this request
	//
	// Parameter is
	// required.
	//
	// SDK::Endpoint
	Endpoint *string
}

EndpointParameters provides the parameters that influence how endpoints are resolved.

func (EndpointParameters) ValidateRequired added in v1.22.0

func (p EndpointParameters) ValidateRequired() error

ValidateRequired validates required parameters are set.

func (EndpointParameters) WithDefaults added in v1.22.0

func (p EndpointParameters) WithDefaults() EndpointParameters

WithDefaults returns a shallow copy of EndpointParameterswith default values applied to members where applicable.

type EndpointResolver

type EndpointResolver interface {
	ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
}

EndpointResolver interface for resolving service endpoints.

func EndpointResolverFromURL added in v1.1.0

func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver

EndpointResolverFromURL returns an EndpointResolver configured using the provided endpoint url. By default, the resolved endpoint resolver uses the client region as signing region, and the endpoint source is set to EndpointSourceCustom.You can provide functional options to configure endpoint values for the resolved endpoint.

type EndpointResolverFunc

type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)

EndpointResolverFunc is a helper utility that wraps a function so it satisfies the EndpointResolver interface. This is useful when you want to add additional endpoint resolving logic, or stub out specific endpoints with custom values.

func (EndpointResolverFunc) ResolveEndpoint

func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error)

type EndpointResolverOptions added in v0.29.0

type EndpointResolverOptions = internalendpoints.Options

EndpointResolverOptions is the service endpoint resolver options

type EndpointResolverV2 added in v1.22.0

type EndpointResolverV2 interface {
	// ResolveEndpoint attempts to resolve the endpoint with the provided options,
	// returning the endpoint if found. Otherwise an error is returned.
	ResolveEndpoint(ctx context.Context, params EndpointParameters) (
		smithyendpoints.Endpoint, error,
	)
}

EndpointResolverV2 provides the interface for resolving service endpoints.

func NewDefaultEndpointResolverV2 added in v1.22.0

func NewDefaultEndpointResolverV2() EndpointResolverV2

type GetAdapterInput added in v1.25.0

type GetAdapterInput struct {

	// A string containing a unique ID for the adapter.
	//
	// This member is required.
	AdapterId *string
	// contains filtered or unexported fields
}

type GetAdapterOutput added in v1.25.0

type GetAdapterOutput struct {

	// A string identifying the adapter that information has been retrieved for.
	AdapterId *string

	// The name of the requested adapter.
	AdapterName *string

	// Binary value indicating if the adapter is being automatically updated or not.
	AutoUpdate types.AutoUpdate

	// The date and time the requested adapter was created at.
	CreationTime *time.Time

	// The description for the requested adapter.
	Description *string

	// List of the targeted feature types for the requested adapter.
	FeatureTypes []types.FeatureType

	// A set of tags (key-value pairs) associated with the adapter that has been
	// retrieved.
	Tags map[string]string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetAdapterVersionInput added in v1.25.0

type GetAdapterVersionInput struct {

	// A string specifying a unique ID for the adapter version you want to retrieve
	// information for.
	//
	// This member is required.
	AdapterId *string

	// A string specifying the adapter version you want to retrieve information for.
	//
	// This member is required.
	AdapterVersion *string
	// contains filtered or unexported fields
}

type GetAdapterVersionOutput added in v1.25.0

type GetAdapterVersionOutput struct {

	// A string containing a unique ID for the adapter version being retrieved.
	AdapterId *string

	// A string containing the adapter version that has been retrieved.
	AdapterVersion *string

	// The time that the adapter version was created.
	CreationTime *time.Time

	// Specifies a dataset used to train a new adapter version. Takes a
	// ManifestS3Objec as the value.
	DatasetConfig *types.AdapterVersionDatasetConfig

	// The evaluation metrics (F1 score, Precision, and Recall) for the requested
	// version, grouped by baseline metrics and adapter version.
	EvaluationMetrics []types.AdapterVersionEvaluationMetric

	// List of the targeted feature types for the requested adapter version.
	FeatureTypes []types.FeatureType

	// The identifier for your AWS Key Management Service key (AWS KMS key). Used to
	// encrypt your documents.
	KMSKeyId *string

	// Sets whether or not your output will go to a user created bucket. Used to set
	// the name of the bucket, and the prefix on the output file. OutputConfig is an
	// optional parameter which lets you adjust where your output will be placed. By
	// default, Amazon Textract will store the results internally and can only be
	// accessed by the Get API operations. With OutputConfig enabled, you can set the
	// name of the bucket the output will be sent to the file prefix of the results
	// where you can download your results. Additionally, you can set the KMSKeyID
	// parameter to a customer master key (CMK) to encrypt your output. Without this
	// parameter set Amazon Textract will encrypt server-side using the AWS managed CMK
	// for Amazon S3. Decryption of Customer Content is necessary for processing of the
	// documents by Amazon Textract. If your account is opted out under an AI services
	// opt out policy then all unencrypted Customer Content is immediately and
	// permanently deleted after the Customer Content has been processed by the
	// service. No copy of of the output is retained by Amazon Textract. For
	// information about how to opt out, see Managing AI services opt-out policy.  (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html)
	// For more information on data privacy, see the Data Privacy FAQ (https://aws.amazon.com/compliance/data-privacy-faq/)
	// .
	OutputConfig *types.OutputConfig

	// The status of the adapter version that has been requested.
	Status types.AdapterVersionStatus

	// A message that describes the status of the requested adapter version.
	StatusMessage *string

	// A set of tags (key-value pairs) that are associated with the adapter version.
	Tags map[string]string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetDocumentAnalysisInput

type GetDocumentAnalysisInput struct {

	// A unique identifier for the text-detection job. The JobId is returned from
	// StartDocumentAnalysis . A JobId value is only valid for 7 days.
	//
	// This member is required.
	JobId *string

	// The maximum number of results to return per paginated call. The largest value
	// that you can specify is 1,000. If you specify a value greater than 1,000, a
	// maximum of 1,000 results is returned. The default value is 1,000.
	MaxResults *int32

	// If the previous response was incomplete (because there are more blocks to
	// retrieve), Amazon Textract returns a pagination token in the response. You can
	// use this pagination token to retrieve the next set of blocks.
	NextToken *string
	// contains filtered or unexported fields
}

type GetDocumentAnalysisOutput

type GetDocumentAnalysisOutput struct {

	//
	AnalyzeDocumentModelVersion *string

	// The results of the text-analysis operation.
	Blocks []types.Block

	// Information about a document that Amazon Textract processed. DocumentMetadata
	// is returned in every page of paginated responses from an Amazon Textract video
	// operation.
	DocumentMetadata *types.DocumentMetadata

	// The current status of the text detection job.
	JobStatus types.JobStatus

	// If the response is truncated, Amazon Textract returns this token. You can use
	// this token in the subsequent request to retrieve the next set of text detection
	// results.
	NextToken *string

	// Returns if the detection job could not be completed. Contains explanation for
	// what error occured.
	StatusMessage *string

	// A list of warnings that occurred during the document-analysis operation.
	Warnings []types.Warning

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetDocumentTextDetectionInput

type GetDocumentTextDetectionInput struct {

	// A unique identifier for the text detection job. The JobId is returned from
	// StartDocumentTextDetection . A JobId value is only valid for 7 days.
	//
	// This member is required.
	JobId *string

	// The maximum number of results to return per paginated call. The largest value
	// you can specify is 1,000. If you specify a value greater than 1,000, a maximum
	// of 1,000 results is returned. The default value is 1,000.
	MaxResults *int32

	// If the previous response was incomplete (because there are more blocks to
	// retrieve), Amazon Textract returns a pagination token in the response. You can
	// use this pagination token to retrieve the next set of blocks.
	NextToken *string
	// contains filtered or unexported fields
}

type GetDocumentTextDetectionOutput

type GetDocumentTextDetectionOutput struct {

	// The results of the text-detection operation.
	Blocks []types.Block

	//
	DetectDocumentTextModelVersion *string

	// Information about a document that Amazon Textract processed. DocumentMetadata
	// is returned in every page of paginated responses from an Amazon Textract video
	// operation.
	DocumentMetadata *types.DocumentMetadata

	// The current status of the text detection job.
	JobStatus types.JobStatus

	// If the response is truncated, Amazon Textract returns this token. You can use
	// this token in the subsequent request to retrieve the next set of text-detection
	// results.
	NextToken *string

	// Returns if the detection job could not be completed. Contains explanation for
	// what error occured.
	StatusMessage *string

	// A list of warnings that occurred during the text-detection operation for the
	// document.
	Warnings []types.Warning

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetExpenseAnalysisInput added in v1.8.0

type GetExpenseAnalysisInput struct {

	// A unique identifier for the text detection job. The JobId is returned from
	// StartExpenseAnalysis . A JobId value is only valid for 7 days.
	//
	// This member is required.
	JobId *string

	// The maximum number of results to return per paginated call. The largest value
	// you can specify is 20. If you specify a value greater than 20, a maximum of 20
	// results is returned. The default value is 20.
	MaxResults *int32

	// If the previous response was incomplete (because there are more blocks to
	// retrieve), Amazon Textract returns a pagination token in the response. You can
	// use this pagination token to retrieve the next set of blocks.
	NextToken *string
	// contains filtered or unexported fields
}

type GetExpenseAnalysisOutput added in v1.8.0

type GetExpenseAnalysisOutput struct {

	// The current model version of AnalyzeExpense.
	AnalyzeExpenseModelVersion *string

	// Information about a document that Amazon Textract processed. DocumentMetadata
	// is returned in every page of paginated responses from an Amazon Textract
	// operation.
	DocumentMetadata *types.DocumentMetadata

	// The expenses detected by Amazon Textract.
	ExpenseDocuments []types.ExpenseDocument

	// The current status of the text detection job.
	JobStatus types.JobStatus

	// If the response is truncated, Amazon Textract returns this token. You can use
	// this token in the subsequent request to retrieve the next set of text-detection
	// results.
	NextToken *string

	// Returns if the detection job could not be completed. Contains explanation for
	// what error occured.
	StatusMessage *string

	// A list of warnings that occurred during the text-detection operation for the
	// document.
	Warnings []types.Warning

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetLendingAnalysisInput added in v1.19.0

type GetLendingAnalysisInput struct {

	// 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.
	//
	// This member is required.
	JobId *string

	// The maximum number of results to return per paginated call. The largest value
	// that you can specify is 30. If you specify a value greater than 30, a maximum of
	// 30 results is returned. The default value is 30.
	MaxResults *int32

	// If the previous response was incomplete, Amazon Textract returns a pagination
	// token in the response. You can use this pagination token to retrieve the next
	// set of lending results.
	NextToken *string
	// contains filtered or unexported fields
}

type GetLendingAnalysisOutput added in v1.19.0

type GetLendingAnalysisOutput struct {

	// The current model version of the Analyze Lending API.
	AnalyzeLendingModelVersion *string

	// Information about the input document.
	DocumentMetadata *types.DocumentMetadata

	// The current status of the lending analysis job.
	JobStatus types.JobStatus

	// If the response is truncated, Amazon Textract returns this token. You can use
	// this token in the subsequent request to retrieve the next set of lending
	// results.
	NextToken *string

	// Holds the information returned by one of AmazonTextract's document analysis
	// operations for the pinstripe.
	Results []types.LendingResult

	// Returns if the lending analysis job could not be completed. Contains
	// explanation for what error occurred.
	StatusMessage *string

	// A list of warnings that occurred during the lending analysis operation.
	Warnings []types.Warning

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetLendingAnalysisSummaryInput added in v1.19.0

type GetLendingAnalysisSummaryInput struct {

	// 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.
	//
	// This member is required.
	JobId *string
	// contains filtered or unexported fields
}

type GetLendingAnalysisSummaryOutput added in v1.19.0

type GetLendingAnalysisSummaryOutput struct {

	// The current model version of the Analyze Lending API.
	AnalyzeLendingModelVersion *string

	// Information about the input document.
	DocumentMetadata *types.DocumentMetadata

	// The current status of the lending analysis job.
	JobStatus types.JobStatus

	// Returns if the lending analysis could not be completed. Contains explanation
	// for what error occurred.
	StatusMessage *string

	// Contains summary information for documents grouped by type.
	Summary *types.LendingSummary

	// A list of warnings that occurred during the lending analysis operation.
	Warnings []types.Warning

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type HTTPSignerV4

type HTTPSignerV4 interface {
	SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
}

type IdempotencyTokenProvider added in v1.25.0

type IdempotencyTokenProvider interface {
	GetIdempotencyToken() (string, error)
}

IdempotencyTokenProvider interface for providing idempotency token

type ListAdapterVersionsAPIClient added in v1.25.0

type ListAdapterVersionsAPIClient interface {
	ListAdapterVersions(context.Context, *ListAdapterVersionsInput, ...func(*Options)) (*ListAdapterVersionsOutput, error)
}

ListAdapterVersionsAPIClient is a client that implements the ListAdapterVersions operation.

type ListAdapterVersionsInput added in v1.25.0

type ListAdapterVersionsInput struct {

	// A string containing a unique ID for the adapter to match for when listing
	// adapter versions.
	AdapterId *string

	// Specifies the lower bound for the ListAdapterVersions operation. Ensures
	// ListAdapterVersions returns only adapter versions created after the specified
	// creation time.
	AfterCreationTime *time.Time

	// Specifies the upper bound for the ListAdapterVersions operation. Ensures
	// ListAdapterVersions returns only adapter versions created after the specified
	// creation time.
	BeforeCreationTime *time.Time

	// The maximum number of results to return when listing adapter versions.
	MaxResults *int32

	// Identifies the next page of results to return when listing adapter versions.
	NextToken *string
	// contains filtered or unexported fields
}

type ListAdapterVersionsOutput added in v1.25.0

type ListAdapterVersionsOutput struct {

	// Adapter versions that match the filtering criteria specified when calling
	// ListAdapters.
	AdapterVersions []types.AdapterVersionOverview

	// Identifies the next page of results to return when listing adapter versions.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ListAdapterVersionsPaginator added in v1.25.0

type ListAdapterVersionsPaginator struct {
	// contains filtered or unexported fields
}

ListAdapterVersionsPaginator is a paginator for ListAdapterVersions

func NewListAdapterVersionsPaginator added in v1.25.0

func NewListAdapterVersionsPaginator(client ListAdapterVersionsAPIClient, params *ListAdapterVersionsInput, optFns ...func(*ListAdapterVersionsPaginatorOptions)) *ListAdapterVersionsPaginator

NewListAdapterVersionsPaginator returns a new ListAdapterVersionsPaginator

func (*ListAdapterVersionsPaginator) HasMorePages added in v1.25.0

func (p *ListAdapterVersionsPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*ListAdapterVersionsPaginator) NextPage added in v1.25.0

func (p *ListAdapterVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAdapterVersionsOutput, error)

NextPage retrieves the next ListAdapterVersions page.

type ListAdapterVersionsPaginatorOptions added in v1.25.0

type ListAdapterVersionsPaginatorOptions struct {
	// The maximum number of results to return when listing adapter versions.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListAdapterVersionsPaginatorOptions is the paginator options for ListAdapterVersions

type ListAdaptersAPIClient added in v1.25.0

type ListAdaptersAPIClient interface {
	ListAdapters(context.Context, *ListAdaptersInput, ...func(*Options)) (*ListAdaptersOutput, error)
}

ListAdaptersAPIClient is a client that implements the ListAdapters operation.

type ListAdaptersInput added in v1.25.0

type ListAdaptersInput struct {

	// Specifies the lower bound for the ListAdapters operation. Ensures ListAdapters
	// returns only adapters created after the specified creation time.
	AfterCreationTime *time.Time

	// Specifies the upper bound for the ListAdapters operation. Ensures ListAdapters
	// returns only adapters created before the specified creation time.
	BeforeCreationTime *time.Time

	// The maximum number of results to return when listing adapters.
	MaxResults *int32

	// Identifies the next page of results to return when listing adapters.
	NextToken *string
	// contains filtered or unexported fields
}

type ListAdaptersOutput added in v1.25.0

type ListAdaptersOutput struct {

	// A list of adapters that matches the filtering criteria specified when calling
	// ListAdapters.
	Adapters []types.AdapterOverview

	// Identifies the next page of results to return when listing adapters.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ListAdaptersPaginator added in v1.25.0

type ListAdaptersPaginator struct {
	// contains filtered or unexported fields
}

ListAdaptersPaginator is a paginator for ListAdapters

func NewListAdaptersPaginator added in v1.25.0

func NewListAdaptersPaginator(client ListAdaptersAPIClient, params *ListAdaptersInput, optFns ...func(*ListAdaptersPaginatorOptions)) *ListAdaptersPaginator

NewListAdaptersPaginator returns a new ListAdaptersPaginator

func (*ListAdaptersPaginator) HasMorePages added in v1.25.0

func (p *ListAdaptersPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*ListAdaptersPaginator) NextPage added in v1.25.0

func (p *ListAdaptersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAdaptersOutput, error)

NextPage retrieves the next ListAdapters page.

type ListAdaptersPaginatorOptions added in v1.25.0

type ListAdaptersPaginatorOptions struct {
	// The maximum number of results to return when listing adapters.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListAdaptersPaginatorOptions is the paginator options for ListAdapters

type ListTagsForResourceInput added in v1.25.0

type ListTagsForResourceInput struct {

	// The Amazon Resource Name (ARN) that specifies the resource to list tags for.
	//
	// This member is required.
	ResourceARN *string
	// contains filtered or unexported fields
}

type ListTagsForResourceOutput added in v1.25.0

type ListTagsForResourceOutput struct {

	// A set of tags (key-value pairs) that are part of the requested resource.
	Tags map[string]string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type Options

type Options struct {
	// Set of options to modify how an operation is invoked. These apply to all
	// operations invoked for this client. Use functional options on operation call to
	// modify this list for per operation behavior.
	APIOptions []func(*middleware.Stack) error

	// The optional application specific identifier appended to the User-Agent header.
	AppID string

	// This endpoint will be given as input to an EndpointResolverV2. It is used for
	// providing a custom base endpoint that is subject to modifications by the
	// processing EndpointResolverV2.
	BaseEndpoint *string

	// Configures the events that will be sent to the configured logger.
	ClientLogMode aws.ClientLogMode

	// The credentials object to use when signing requests.
	Credentials aws.CredentialsProvider

	// The configuration DefaultsMode that the SDK should use when constructing the
	// clients initial default settings.
	DefaultsMode aws.DefaultsMode

	// The endpoint options to be used when attempting to resolve an endpoint.
	EndpointOptions EndpointResolverOptions

	// The service endpoint resolver.
	//
	// Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a
	// value for this field will likely prevent you from using any endpoint-related
	// service features released after the introduction of EndpointResolverV2 and
	// BaseEndpoint. To migrate an EndpointResolver implementation that uses a custom
	// endpoint, set the client option BaseEndpoint instead.
	EndpointResolver EndpointResolver

	// Resolves the endpoint used for a particular service operation. This should be
	// used over the deprecated EndpointResolver.
	EndpointResolverV2 EndpointResolverV2

	// Signature Version 4 (SigV4) Signer
	HTTPSignerV4 HTTPSignerV4

	// Provides idempotency tokens values that will be automatically populated into
	// idempotent API operations.
	IdempotencyTokenProvider IdempotencyTokenProvider

	// The logger writer interface to write logging messages to.
	Logger logging.Logger

	// The region to send requests to. (Required)
	Region string

	// RetryMaxAttempts specifies the maximum number attempts an API client will call
	// an operation that fails with a retryable error. A value of 0 is ignored, and
	// will not be used to configure the API client created default retryer, or modify
	// per operation call's retry max attempts. If specified in an operation call's
	// functional options with a value that is different than the constructed client's
	// Options, the Client's Retryer will be wrapped to use the operation's specific
	// RetryMaxAttempts value.
	RetryMaxAttempts int

	// RetryMode specifies the retry mode the API client will be created with, if
	// Retryer option is not also specified. When creating a new API Clients this
	// member will only be used if the Retryer Options member is nil. This value will
	// be ignored if Retryer is not nil. Currently does not support per operation call
	// overrides, may in the future.
	RetryMode aws.RetryMode

	// Retryer guides how HTTP requests should be retried in case of recoverable
	// failures. When nil the API client will use a default retryer. The kind of
	// default retry created by the API client can be changed with the RetryMode
	// option.
	Retryer aws.Retryer

	// The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
	// to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You
	// should not populate this structure programmatically, or rely on the values here
	// within your applications.
	RuntimeEnvironment aws.RuntimeEnvironment

	// The HTTP client to invoke API calls with. Defaults to client's default HTTP
	// implementation if nil.
	HTTPClient HTTPClient

	// The auth scheme resolver which determines how to authenticate for each
	// operation.
	AuthSchemeResolver AuthSchemeResolver

	// The list of auth schemes supported by the client.
	AuthSchemes []smithyhttp.AuthScheme
	// contains filtered or unexported fields
}

func (Options) Copy

func (o Options) Copy() Options

Copy creates a clone where the APIOptions list is deep copied.

func (Options) GetIdentityResolver added in v1.27.2

func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver

type ResolveEndpoint

type ResolveEndpoint struct {
	Resolver EndpointResolver
	Options  EndpointResolverOptions
}

func (*ResolveEndpoint) HandleSerialize

func (*ResolveEndpoint) ID

func (*ResolveEndpoint) ID() string

type StartDocumentAnalysisInput

type StartDocumentAnalysisInput struct {

	// The location of the document to be processed.
	//
	// This member is required.
	DocumentLocation *types.DocumentLocation

	// 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 ).
	//
	// This member is required.
	FeatureTypes []types.FeatureType

	// Specifies the adapter to be used when analyzing a document.
	AdaptersConfig *types.AdaptersConfig

	// 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 (https://docs.aws.amazon.com/textract/latest/dg/api-async.html)
	// .
	ClientRequestToken *string

	// 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).
	JobTag *string

	// 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.
	KMSKeyId *string

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

	// 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.
	OutputConfig *types.OutputConfig

	//
	QueriesConfig *types.QueriesConfig
	// contains filtered or unexported fields
}

type StartDocumentAnalysisOutput

type StartDocumentAnalysisOutput struct {

	// 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.
	JobId *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type StartDocumentTextDetectionInput

type StartDocumentTextDetectionInput struct {

	// The location of the document to be processed.
	//
	// This member is required.
	DocumentLocation *types.DocumentLocation

	// 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 (https://docs.aws.amazon.com/textract/latest/dg/api-async.html)
	// .
	ClientRequestToken *string

	// 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).
	JobTag *string

	// 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.
	KMSKeyId *string

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

	// 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.
	OutputConfig *types.OutputConfig
	// contains filtered or unexported fields
}

type StartDocumentTextDetectionOutput

type StartDocumentTextDetectionOutput struct {

	// 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.
	JobId *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type StartExpenseAnalysisInput added in v1.8.0

type StartExpenseAnalysisInput struct {

	// The location of the document to be processed.
	//
	// This member is required.
	DocumentLocation *types.DocumentLocation

	// 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 (https://docs.aws.amazon.com/textract/latest/dg/api-async.html)
	ClientRequestToken *string

	// An identifier 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).
	JobTag *string

	// 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.
	KMSKeyId *string

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

	// 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
	// GetExpenseAnalysis operation.
	OutputConfig *types.OutputConfig
	// contains filtered or unexported fields
}

type StartExpenseAnalysisOutput added in v1.8.0

type StartExpenseAnalysisOutput struct {

	// A unique identifier for the text detection job. The JobId is returned from
	// StartExpenseAnalysis . A JobId value is only valid for 7 days.
	JobId *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type StartLendingAnalysisInput added in v1.19.0

type StartLendingAnalysisInput struct {

	// The Amazon S3 bucket that contains the document to be processed. It's used by
	// asynchronous operations. The input document can be an image file in JPEG or PNG
	// format. It can also be a file in PDF format.
	//
	// This member is required.
	DocumentLocation *types.DocumentLocation

	// 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 (https://docs.aws.amazon.com/textract/latest/dg/api-sync.html)
	// .
	ClientRequestToken *string

	// 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).
	JobTag *string

	// 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.
	KMSKeyId *string

	// The Amazon Simple Notification Service (Amazon SNS) topic to which Amazon
	// Textract publishes the completion status of an asynchronous document operation.
	NotificationChannel *types.NotificationChannel

	// Sets whether or not your output will go to a user created bucket. Used to set
	// the name of the bucket, and the prefix on the output file. OutputConfig is an
	// optional parameter which lets you adjust where your output will be placed. By
	// default, Amazon Textract will store the results internally and can only be
	// accessed by the Get API operations. With OutputConfig enabled, you can set the
	// name of the bucket the output will be sent to the file prefix of the results
	// where you can download your results. Additionally, you can set the KMSKeyID
	// parameter to a customer master key (CMK) to encrypt your output. Without this
	// parameter set Amazon Textract will encrypt server-side using the AWS managed CMK
	// for Amazon S3. Decryption of Customer Content is necessary for processing of the
	// documents by Amazon Textract. If your account is opted out under an AI services
	// opt out policy then all unencrypted Customer Content is immediately and
	// permanently deleted after the Customer Content has been processed by the
	// service. No copy of of the output is retained by Amazon Textract. For
	// information about how to opt out, see Managing AI services opt-out policy.  (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html)
	// For more information on data privacy, see the Data Privacy FAQ (https://aws.amazon.com/compliance/data-privacy-faq/)
	// .
	OutputConfig *types.OutputConfig
	// contains filtered or unexported fields
}

type StartLendingAnalysisOutput added in v1.19.0

type StartLendingAnalysisOutput struct {

	// 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.
	JobId *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type TagResourceInput added in v1.25.0

type TagResourceInput struct {

	// The Amazon Resource Name (ARN) that specifies the resource to be tagged.
	//
	// This member is required.
	ResourceARN *string

	// A set of tags (key-value pairs) that you want to assign to the resource.
	//
	// This member is required.
	Tags map[string]string
	// contains filtered or unexported fields
}

type TagResourceOutput added in v1.25.0

type TagResourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type UntagResourceInput added in v1.25.0

type UntagResourceInput struct {

	// The Amazon Resource Name (ARN) that specifies the resource to be untagged.
	//
	// This member is required.
	ResourceARN *string

	// Specifies the tags to be removed from the resource specified by the ResourceARN.
	//
	// This member is required.
	TagKeys []string
	// contains filtered or unexported fields
}

type UntagResourceOutput added in v1.25.0

type UntagResourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type UpdateAdapterInput added in v1.25.0

type UpdateAdapterInput struct {

	// A string containing a unique ID for the adapter that will be updated.
	//
	// This member is required.
	AdapterId *string

	// The new name to be applied to the adapter.
	AdapterName *string

	// The new auto-update status to be applied to the adapter.
	AutoUpdate types.AutoUpdate

	// The new description to be applied to the adapter.
	Description *string
	// contains filtered or unexported fields
}

type UpdateAdapterOutput added in v1.25.0

type UpdateAdapterOutput struct {

	// A string containing a unique ID for the adapter that has been updated.
	AdapterId *string

	// A string containing the name of the adapter that has been updated.
	AdapterName *string

	// The auto-update status of the adapter that has been updated.
	AutoUpdate types.AutoUpdate

	// An object specifying the creation time of the the adapter that has been updated.
	CreationTime *time.Time

	// A string containing the description of the adapter that has been updated.
	Description *string

	// List of the targeted feature types for the updated adapter.
	FeatureTypes []types.FeatureType

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL