Expand description
Primitives shared across the Amazon Translate handlers: ARN synthesis, deterministic id derivation, timestamps, and terminology-file parsing. Kept in one place so the create / get paths cannot diverge on wire format.
Structs§
- File
Facts - Facts read from an imported terminology / parallel-data file.
Functions§
- data_
location - A service-managed S3 location Translate exposes for a downloadable resource file (terminology / parallel-data). The file itself is not produced; this is the presigned-style location it would live at.
- decode_
blob - Decode a wire blob member. awsJson1_1 base64-encodes blobs; the AWS SDK and terraform always send base64. If the value is not valid base64 (e.g. a raw synthetic probe string) fall back to the raw UTF-8 bytes so the parser never panics on unexpected input.
- hash_
str - FNV-1a hash for deterministic synthesis of ids from a seed so a given resource’s derived value is stable across reads and restarts.
- job_id
- A 32-character lowercase-hex job id (matching the
JobId@lengthmax of 32 and the permissiveJobIdpattern). Derived deterministically from a seed so repeated calls in a test are stable, but seeded with a UUID at the call site to stay unique across jobs. - now_
epoch - Current time as awsJson1_1 epoch-seconds (a floating-point number). The
Translate
Timestampshape carries no@timestampFormat, so awsJson1_1’s default epoch-seconds applies. - parse_
file - Parse a terminology / parallel-data file (CSV or TSV) for its size, record count, and language columns. This reads the caller-supplied data file only; it runs no translation. Unknown / binary formats yield just the byte size.
- parse_
resource_ arn - Split a Translate ARN into
(resource_type, name).arn:aws:translate:{region}:{account}:{type}/{name}->(type, name). - resource_
arn - Amazon Translate resource ARN,
arn:aws:translate:{region}:{account}:{resource_type}/{name}.