Expand description
Shared utilities for the S3 service.
Provides ID generation, timestamp helpers, range-header parsing, conditional-request matching, continuation-token encoding, and XML escaping functions.
Functionsยง
- decode_
continuation_ token - Decode a base64 continuation token back to an object key.
- encode_
continuation_ token - Encode an object key as a base64 continuation token.
- generate_
request_ id - Generate a unique request ID (UUID v4 without dashes).
- generate_
upload_ id - Generate a random upload ID for multipart uploads.
- generate_
version_ id - Generate a random version ID suitable for S3 versioned objects.
- is_
valid_ if_ match - Check whether the given ETag satisfies an
If-Matchcondition. - is_
valid_ if_ none_ match - Check whether the given ETag satisfies an
If-None-Matchcondition. - parse_
copy_ source - Parse the
x-amz-copy-sourceheader value into bucket, key, and optional version ID components. - parse_
range_ header - Parse an HTTP
Rangeheader value and return the inclusive byte range. - timestamp_
millis - Return the current UTC time as milliseconds since the Unix epoch.
- timestamp_
rfc3339 - Return the current UTC time formatted as an RFC 3339 string.
- xml_
escape - Escape a string for safe inclusion in XML content.