Textract / Client / start_document_insights

start_document_insights

Textract.Client.start_document_insights(**kwargs)

Starts an asynchronous job that analyzes a document using the configuration defined by a project or a set of blueprints. Use GetDocumentInsights to retrieve the results of the job.

See also: AWS API Documentation

Request Syntax

response = client.start_document_insights(
    InputConfiguration={
        'S3Uri': 'string'
    },
    OutputConfiguration={
        'S3Uri': 'string'
    },
    ProjectArn='string',
    Blueprints=[
        {
            'BlueprintArn': 'string',
            'BlueprintVersion': 'string'
        },
    ],
    EncryptionConfiguration={
        'KmsKeyId': 'string',
        'KmsEncryptionContext': {
            'string': 'string'
        }
    },
    NotificationConfiguration={
        'EventBridgeConfiguration': {
            'State': 'ENABLED'|'DISABLED'
        }
    },
    Tags={
        'string': 'string'
    }
)
Parameters:
  • InputConfiguration (dict) –

    [REQUIRED]

    The Amazon S3 location of the input document to analyze.

    • S3Uri (string) – [REQUIRED]

      The Amazon S3 URI of the input document.

  • OutputConfiguration (dict) –

    [REQUIRED]

    The Amazon S3 location where the analysis results are written.

    • S3Uri (string) – [REQUIRED]

      The Amazon S3 URI where the analysis results are written.

  • ProjectArn (string) – The Amazon Resource Name (ARN) of the project whose configuration is used to analyze the document.

  • Blueprints (list) –

    The blueprints used to extract custom structured output from the document.

    • (dict) –

      Associates a blueprint, and optionally a specific blueprint version, with a project for custom output extraction.

      • BlueprintArn (string) – [REQUIRED]

        The Amazon Resource Name (ARN) of the blueprint.

      • BlueprintVersion (string) –

        The version of the blueprint. If omitted, the latest version is used.

  • EncryptionConfiguration (dict) –

    The AWS KMS encryption configuration used to encrypt the analysis output. If you don’t specify a value, Amazon Textract encrypts the output using an AWS owned key.

    • KmsKeyId (string) – [REQUIRED]

      The identifier of the AWS KMS key to use for encryption. This can be a key ID, key ARN, alias name, or alias ARN.

    • KmsEncryptionContext (dict) –

      A set of key-value pairs that Amazon Textract includes as the AWS KMS encryption context when encrypting and decrypting the resource.

      On UpdateProject and UpdateBlueprint, this member is the one exception to replacing a supplied configuration whole. If you omit it, the stored encryption context is kept. To clear a custom encryption context, specify an empty map ( {}).

      • (string) –

        • (string) –

  • NotificationConfiguration (dict) –

    Notification settings for the job.

    • EventBridgeConfiguration (dict) – [REQUIRED]

      Event bus settings.

      • State (string) – [REQUIRED]

        Set to ENABLED to send events to an event bus, or DISABLED to not send them.

  • Tags (dict) –

    A set of tags (key-value pairs) to assign to the document insights job.

    • (string) –

      • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'JobArn': 'string'
}

Response Structure

  • (dict) –

    • JobArn (string) –

      The Amazon Resource Name (ARN) of the document insights job that was started. Use it with GetDocumentInsights to retrieve the results.

Exceptions