View a markdown version of this page

CreateBlueprint - Amazon Textract

CreateBlueprint

Creates a blueprint that defines the schema Amazon Textract uses to extract structured data from a document during a document insights job. A blueprint describes the fields to extract and how to normalize them.

Request Syntax

{ "BlueprintName": "string", "ClientRequestToken": "string", "EncryptionConfiguration": { "KmsEncryptionContext": { "string" : "string" }, "KmsKeyId": "string" }, "Schema": "string", "Tags": { "string" : "string" } }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

BlueprintName

A unique name for the blueprint.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^[a-zA-Z0-9-_]+$

Required: Yes

ClientRequestToken

A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If you use the same token for a request that matches a previous request, the service ignores the request, but does not return an error.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[a-zA-Z0-9-_]+$

Required: No

EncryptionConfiguration

The AWS KMS encryption configuration used to encrypt the blueprint at rest.

Type: EncryptionConfiguration object

Required: No

Schema

The schema of the blueprint, which defines the fields to extract and their expected structure.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100000.

Pattern: ^[a-zA-Z0-9\s!"\#\$%'&\(\)\*\+\,\-\./:;=\?@\[\\\]\^_`\{\|\}~><À-ÖØ-Üßà-öø-üẞ¿¡Œ-œ°£¥₹€§©ª®™¹±-µ✓⑆-⑉฿₽₱₦₣₩₫₺\u4E00-\u9FFF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\u3400-\u4DBF]+$

Required: Yes

Tags

A set of tags (key-value pairs) to assign to the blueprint.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 200 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^[\p{L}\p{Z}\p{N}_.:/=+\-@]*$

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Value Pattern: ^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$

Required: No

Response Syntax

{ "BlueprintArn": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

BlueprintArn

The Amazon Resource Name (ARN) of the blueprint that was created.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^arn:aws(|-cn|-iso|-iso-[a-z]|-us-gov):textract:[a-zA-Z0-9-]*:(aws|[0-9]{12}):blueprint/(public-[a-zA-Z0-9-_]{1,30}|[a-zA-Z0-9-]{12,36})$

Errors

For information about the errors that are common to all actions, see Common Error Types.

AccessDeniedException

You aren't authorized to perform the action. Use the Amazon Resource Name (ARN) of an authorized user or IAM role to perform the operation.

HTTP Status Code: 400

ConflictException

Updating or deleting a resource can cause an inconsistent state.

HTTP Status Code: 400

InternalServerError

Amazon Textract experienced a service issue. Try your call again.

HTTP Status Code: 500

InvalidParameterException

An input parameter violated a constraint. For example, in synchronous operations, an InvalidParameterException exception occurs when neither of the S3Object or Bytes values are supplied in the Document request parameter. Validate your parameter before calling the API operation again.

HTTP Status Code: 400

LimitExceededException

An Amazon Textract service limit was exceeded. For example, if you start too many asynchronous jobs concurrently, calls to start operations (StartDocumentTextDetection, for example) raise a LimitExceededException exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Textract service limit.

HTTP Status Code: 400

ProvisionedThroughputExceededException

The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Textract.

HTTP Status Code: 400

ValidationException

Indicates that a request was not valid. Check request for proper formatting.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: