object
s3_session(HTTPTransport)
HTTPTransport- The object implementinghttp_transport_protocol.
Explicit S3 client sessions carrying default request options.
logtalk_load(s3(loader))static, context_switching_callsPublic predicates
get_object/6
Fetches an object into a local file path using session defaults merged with per-call options and returns its response metadata as a separate argument.
staticget_object(Session,Bucket,Key,File,Properties,Options)get_object(+compound,+atom,+atom,+atom,-compound,+list(compound)) - one_or_errorSession is a variable:instantiation_errorSession is neither a variable nor a valid S3 session handle:domain_error(s3_session,Session)Session is a valid S3 session handle but not open:existence_error(s3_session,Session)Bucket is a variable:instantiation_errorBucket is neither a variable nor an atom:type_error(atom,Bucket)Bucket is an atom but not a valid S3 bucket:domain_error(s3_bucket,Bucket)Key is a variable:instantiation_errorKey is neither a variable nor an atom:type_error(atom,Key)File is a variable:instantiation_errorFile is neither a variable nor an atom:type_error(atom,File)File exists but is not a writable file:domain_error(file([],[write]),File)Directory exists but is not writable:domain_error(directory([write]),Directory)Directory does not exist:existence_error(directory,Directory)domain_error(s3_http_status,Status)
Option precedence: Per-call options are merged before the stored session defaults, so explicit call options take precedence.
Option
credentials/1: Access credentials ascredentials(access_key_id(AccessKeyId), secret_access_key(SecretAccessKey)).Option
session_token/1: Optional session token for temporary credentials.Option
region/1: AWS region to use whenendpoint/1is absent.Option
endpoint/1: Optional custom S3-compatible endpoint URL.Option
addressing_style/1: Endpoint addressing style, eithervirtual_hostedorpath.Option
headers/1: Optional extra normalized HTTP request headers.Option
version/1: HTTP protocol version ashttp(Major, Minor).Option
properties/1: Optional extra normalized HTTP request properties.Option
connection_options/1: Optional transport-specific HTTP client options.Option
payload_hash_mode/1: Payload signing mode, eithersignedorunsigned.Option
request_time/1: Optional explicit local request time asdate_time(Year, Month, Day, Hours, Minutes, Seconds).Option
utc_offset_seconds/1: UTC offset used to derive the signing time from the local clock.Option
amz_date/1: Optional explicit AWS SigV4 timestamp overriding any derived request time.
open/1
Opens a new S3 client session with no default options.
staticopen(Session)open(-compound) - one_or_erroropen/2
Opens a new S3 client session with the given default options.
staticopen(Session,Options)open(-compound,+list(compound)) - one_or_errorOptions contains an invalid S3 session option:domain_error(option,Option)
Option role:
Optionsstores default request options reused by later session calls.Option
credentials/1: Default access credentials ascredentials(access_key_id(AccessKeyId), secret_access_key(SecretAccessKey)).Option
session_token/1: Optional default session token for temporary credentials.Option
region/1: Default AWS region to use whenendpoint/1is absent.Option
endpoint/1: Optional default custom S3-compatible endpoint URL.Option
addressing_style/1: Default endpoint addressing style, eithervirtual_hostedorpath.Option
headers/1: Optional default normalized HTTP request headers.Option
version/1: Default HTTP protocol version ashttp(Major, Minor).Option
properties/1: Optional default normalized HTTP request properties.Option
connection_options/1: Optional default transport-specific HTTP client options.Option
payload_hash_mode/1: Default payload signing mode, eithersignedorunsigned.Option
request_time/1: Optional default local request time asdate_time(Year, Month, Day, Hours, Minutes, Seconds).Option
utc_offset_seconds/1: Default UTC offset used to derive the signing time from the local clock.Option
amz_date/1: Optional default AWS SigV4 timestamp overriding any derived request time.
close/1
Closes a S3 client session.
staticclose(Session)close(+compound) - one_or_errorSession is a variable:instantiation_errorSession is neither a variable nor a valid S3 session handle:domain_error(s3_session,Session)Session is a valid S3 session handle but not open:existence_error(s3_session,Session)list_buckets/3
Lists accessible buckets using session defaults merged with per-call options.
staticlist_buckets(Session,Buckets,Options)list_buckets(+compound,-compound,+list(compound)) - one_or_errorSession is a variable:instantiation_errorSession is neither a variable nor a valid S3 session handle:domain_error(s3_session,Session)Session is a valid S3 session handle but not open:existence_error(s3_session,Session)Options contains an invalid S3 session option:domain_error(option,Option)domain_error(s3_http_status,Status)
Options: Per-call options accept the same terms as
open/2and are merged before the stored session defaults, so explicit call options take precedence.
head_bucket/4
Returns bucket metadata using session defaults merged with per-call options.
statichead_bucket(Session,Bucket,Metadata,Options)head_bucket(+compound,+atom,-compound,+list(compound)) - one_or_errorSession is a variable:instantiation_errorSession is neither a variable nor a valid S3 session handle:domain_error(s3_session,Session)Session is a valid S3 session handle but not open:existence_error(s3_session,Session)Bucket is a variable:instantiation_errorBucket is neither a variable nor an atom:type_error(atom,Bucket)Bucket is an atom but not a valid S3 bucket:domain_error(s3_bucket,Bucket)domain_error(s3_http_status,Status)
Options: Per-call options accept the same terms as
open/2and are merged before the stored session defaults, so explicit call options take precedence.
list_objects_v2/5
Lists objects using session defaults merged with per-call options.
staticlist_objects_v2(Session,Bucket,Request,Listing,Options)list_objects_v2(+compound,+atom,+compound,-compound,+list(compound)) - one_or_errorSession is a variable:instantiation_errorSession is neither a variable nor a valid S3 session handle:domain_error(s3_session,Session)Session is a valid S3 session handle but not open:existence_error(s3_session,Session)Bucket is a variable:instantiation_errorBucket is neither a variable nor an atom:type_error(atom,Bucket)Bucket is an atom but not a valid S3 bucket:domain_error(s3_bucket,Bucket)Request is a variable:instantiation_errorOption of the request option list is a variable:instantiation_errorOption of the request option list is neither a variable nor a compound term:type_error(compound,Option)Request is not a valid ListObjectsV2 request term or option list:domain_error(s3_list_objects_request,Request)Option of the request option list is a compound term but not a valid ListObjectsV2 request option:domain_error(s3_list_objects_request_option,Option)domain_error(s3_http_status,Status)
Options: Per-call options accept the same terms as
open/2and are merged before the stored session defaults, so explicit call options take precedence. TheRequestargument carries the ListObjectsV2-specific request terms.
head_object/5
Returns object metadata using session defaults merged with per-call options.
statichead_object(Session,Bucket,Key,Metadata,Options)head_object(+compound,+atom,+atom,-compound,+list(compound)) - one_or_errorSession is a variable:instantiation_errorSession is neither a variable nor a valid S3 session handle:domain_error(s3_session,Session)Session is a valid S3 session handle but not open:existence_error(s3_session,Session)Bucket is a variable:instantiation_errorBucket is neither a variable nor an atom:type_error(atom,Bucket)Bucket is an atom but not a valid S3 bucket:domain_error(s3_bucket,Bucket)Key is a variable:instantiation_errorKey is neither a variable nor an atom:type_error(atom,Key)domain_error(s3_http_status,Status)
Options: Per-call options accept the same terms as
open/2and are merged before the stored session defaults, so explicit call options take precedence.
presigned_get_object/5
Generates a presigned download URL using session defaults merged with per-call options.
staticpresigned_get_object(Session,Bucket,Key,URL,Options)presigned_get_object(+compound,+atom,+atom,-atom,+list(compound)) - one_or_errorSession is a variable:instantiation_errorSession is neither a variable nor a valid S3 session handle:domain_error(s3_session,Session)Session is a valid S3 session handle but not open:existence_error(s3_session,Session)Bucket is a variable:instantiation_errorBucket is neither a variable nor an atom:type_error(atom,Bucket)Bucket is an atom but not a valid S3 bucket:domain_error(s3_bucket,Bucket)Key is a variable:instantiation_errorKey is neither a variable nor an atom:type_error(atom,Key)domain_error(s3_client_option,Option)
Options: Per-call options accept the same terms as
open/2plusexpires(Seconds)for the URL lifetime andpayload_hash(Hash)whenpayload_hash_mode(signed)is selected. Presigned URLs default topayload_hash_mode(unsigned). Options are merged before the stored session defaults, so explicit call options take precedence.
presigned_put_object/5
Generates a presigned upload URL using session defaults merged with per-call options.
staticpresigned_put_object(Session,Bucket,Key,URL,Options)presigned_put_object(+compound,+atom,+atom,-atom,+list(compound)) - one_or_errorSession is a variable:instantiation_errorSession is neither a variable nor a valid S3 session handle:domain_error(s3_session,Session)Session is a valid S3 session handle but not open:existence_error(s3_session,Session)Bucket is a variable:instantiation_errorBucket is neither a variable nor an atom:type_error(atom,Bucket)Bucket is an atom but not a valid S3 bucket:domain_error(s3_bucket,Bucket)Key is a variable:instantiation_errorKey is neither a variable nor an atom:type_error(atom,Key)domain_error(s3_client_option,Option)
Options: Per-call options accept the same terms as
open/2plusexpires(Seconds)for the URL lifetime andpayload_hash(Hash)whenpayload_hash_mode(signed)is selected. Presigned URLs default topayload_hash_mode(unsigned). Options are merged before the stored session defaults, so explicit call options take precedence.
presigned_post_object/5
Generates a presigned POST URL using session defaults merged with per-call options.
staticpresigned_post_object(Session,Bucket,Key,URL,Options)presigned_post_object(+compound,+atom,+atom,-atom,+list(compound)) - one_or_errorSession is a variable:instantiation_errorSession is neither a variable nor a valid S3 session handle:domain_error(s3_session,Session)Session is a valid S3 session handle but not open:existence_error(s3_session,Session)Bucket is a variable:instantiation_errorBucket is neither a variable nor an atom:type_error(atom,Bucket)Bucket is an atom but not a valid S3 bucket:domain_error(s3_bucket,Bucket)Key is a variable:instantiation_errorKey is neither a variable nor an atom:type_error(atom,Key)domain_error(s3_client_option,Option)
Options: Per-call options accept the same terms as
open/2plusexpires(Seconds)for the URL lifetime andpayload_hash(Hash)whenpayload_hash_mode(signed)is selected. Presigned URLs default topayload_hash_mode(unsigned). Options are merged before the stored session defaults, so explicit call options take precedence.
put_object/7
Uploads a local file path using session defaults merged with per-call options and returns the object ETag and response metadata as separate arguments.
staticput_object(Session,Bucket,Key,File,ETag,Properties,Options)put_object(+compound,+atom,+atom,+atom,-atom,-compound,+list(compound)) - one_or_errorSession is a variable:instantiation_errorSession is neither a variable nor a valid S3 session handle:domain_error(s3_session,Session)Session is a valid S3 session handle but not open:existence_error(s3_session,Session)Bucket is a variable:instantiation_errorBucket is neither a variable nor an atom:type_error(atom,Bucket)Bucket is an atom but not a valid S3 bucket:domain_error(s3_bucket,Bucket)Key is a variable:instantiation_errorKey is neither a variable nor an atom:type_error(atom,Key)File is a variable:instantiation_errorFile is neither a variable nor an atom:type_error(atom,File)File exists but is not a readable file:domain_error(file([],[read]),File)File does not exist:existence_error(file,File)domain_error(s3_http_status,Status)
Options: Per-call options accept the same terms as
open/2and are merged before the stored session defaults, so explicit call options take precedence.
delete_object/5
Deletes an object using session defaults merged with per-call options, returning delete_result(Properties).
staticdelete_object(Session,Bucket,Key,Result,Options)delete_object(+compound,+atom,+atom,-compound,+list(compound)) - one_or_errorSession is a variable:instantiation_errorSession is neither a variable nor a valid S3 session handle:domain_error(s3_session,Session)Session is a valid S3 session handle but not open:existence_error(s3_session,Session)Bucket is a variable:instantiation_errorBucket is neither a variable nor an atom:type_error(atom,Bucket)Bucket is an atom but not a valid S3 bucket:domain_error(s3_bucket,Bucket)Key is a variable:instantiation_errorKey is neither a variable nor an atom:type_error(atom,Key)domain_error(s3_http_status,Status)
Options: Per-call options accept the same terms as
open/2and are merged before the stored session defaults, so explicit call options take precedence.
copy_object/6
Copies an object using session defaults merged with per-call options, returning copy_result(ETag, Properties).
staticcopy_object(Session,Source,Bucket,Key,Result,Options)copy_object(+compound,+compound,+atom,+atom,-compound,+list(compound)) - one_or_errorSession is a variable:instantiation_errorSession is neither a variable nor a valid S3 session handle:domain_error(s3_session,Session)Session is a valid S3 session handle but not open:existence_error(s3_session,Session)Bucket is a variable:instantiation_errorSource is a variable:instantiation_errorSource is a variable:instantiation_errorSource is neither a variable nor a compound term:type_error(compound,Source)Bucket is neither a variable nor an atom:type_error(atom,Bucket)Source is neither a variable nor an atom:type_error(atom,VersionId)Source is a compound term but not a valid copy source term:domain_error(s3_copy_source,Source)Bucket is an atom but not a valid S3 bucket:domain_error(s3_bucket,Bucket)Source is an atom but not a valid version identifier:domain_error(s3_version_id,VersionId)Key is a variable:instantiation_errorKey is neither a variable nor an atom:type_error(atom,Key)domain_error(s3_http_status,Status)
Options: Per-call options accept the same terms as
open/2and are merged before the stored session defaults, so explicit call options take precedence.
Protected predicates
(no local declarations; see entity ancestors if any)
Private predicates
session_seed_/1
Dynamic counter used to generate fresh session identifiers.
dynamicsession_seed_(SessionId)session_seed_(?positive_integer) - zero_or_onesession_state_/2
Dynamic mapping between session identifiers and their stored default option lists.
dynamicsession_state_(SessionId,Options)session_state_(?positive_integer,?list(compound)) - zero_or_moreOperators
(none)