Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Synopsis
- data Document = Document' {}
- newDocument :: Document
- document_s3Object :: Lens' Document (Maybe S3Object)
- document_bytes :: Lens' Document (Maybe ByteString)
Documentation
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.
See: newDocument
smart constructor.
Document' | |
|
Instances
Eq Document Source # | |
Read Document Source # | |
Show Document Source # | |
Generic Document Source # | |
NFData Document Source # | |
Defined in Amazonka.Textract.Types.Document | |
Hashable Document Source # | |
Defined in Amazonka.Textract.Types.Document | |
ToJSON Document Source # | |
Defined in Amazonka.Textract.Types.Document | |
type Rep Document Source # | |
Defined in Amazonka.Textract.Types.Document type Rep Document = D1 ('MetaData "Document" "Amazonka.Textract.Types.Document" "libZSservicesZSamazonka-textractZSamazonka-textract" 'False) (C1 ('MetaCons "Document'" 'PrefixI 'True) (S1 ('MetaSel ('Just "s3Object") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe S3Object)) :*: S1 ('MetaSel ('Just "bytes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Base64)))) |
newDocument :: Document Source #
Create a value of Document
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:s3Object:Document'
, document_s3Object
- Identifies an S3 object as the document source. The maximum size of a
document that's stored in an S3 bucket is 5 MB.
$sel:bytes:Document'
, document_bytes
- A blob of base64-encoded document bytes. The maximum size of a document
that's provided in a blob of bytes is 5 MB. The document bytes must be
in PNG or JPEG format.
If you're using an AWS SDK to call Amazon Textract, you might not need
to base64-encode image bytes passed using the Bytes
field.--
-- Note: This Lens
automatically encodes and decodes Base64 data.
-- The underlying isomorphism will encode to Base64 representation during
-- serialisation, and decode from Base64 representation during deserialisation.
-- This Lens
accepts and returns only raw unencoded data.
document_s3Object :: Lens' Document (Maybe S3Object) Source #
Identifies an S3 object as the document source. The maximum size of a document that's stored in an S3 bucket is 5 MB.
document_bytes :: Lens' Document (Maybe ByteString) Source #
A blob of base64-encoded document bytes. The maximum size of a document that's provided in a blob of bytes is 5 MB. The document bytes must be in PNG or JPEG format.
If you're using an AWS SDK to call Amazon Textract, you might not need
to base64-encode image bytes passed using the Bytes
field.--
-- Note: This Lens
automatically encodes and decodes Base64 data.
-- The underlying isomorphism will encode to Base64 representation during
-- serialisation, and decode from Base64 representation during deserialisation.
-- This Lens
accepts and returns only raw unencoded data.