Amazon S3, SQS and STS, and any S3 compatible service, with Signature Version 4.
Functions
func S3List (cfg: Config, o: ListOptions): ObjectList One page of the object listing, with options.
The example for this item is shown with the ones above: aws-Objects.salam
func S3ListPrefix (cfg: Config, prefix: str ): ObjectList The objects under a prefix: one page, at most 1000. Check truncated or use S3ListAll.
The example for this item is shown with the ones above: aws-Objects.salam
func S3ListFolder (cfg: Config, prefix: str ): ObjectList One "folder": the objects and subfolders with the / delimiter.
The example for this item is shown with the ones above: aws-Objects.salam
func S3ListV1 (cfg: Config, o: ListOptions, marker: str ): ObjectList The old version of listing, for services that lack version 2.
The example for this item is shown with the ones above: aws-Objects.salam
func S3ListAll (cfg: Config, prefix: str ): ObjectList Fetches every page, one after the other, up to 100000 objects; truncated is set when it stopped there.
The example for this item is shown with the ones above: aws-Objects.salam
func S3ListAllWith (cfg: Config, o: ListOptions): ObjectList Every page, with options.
The example for this item is shown with the ones above: aws-Objects.salam
func S3ListVersions (cfg: Config, o: ListOptions, key_marker: str , version_marker: str ): ObjectList The versions and delete markers.
The example for this item is shown with the ones above: aws-Objects.salam
func S3Keys (cfg: Config, prefix: str ): KeyList All the keys under a prefix. A failed listing gives an empty list, not an error.
The example for this item is shown with the ones above: aws-Objects.salam
func ListCount (l: ObjectList): int The example for this item is shown with the ones above: aws-Parse.salam
func ListAt (l: ObjectList, i: int ): ObjectEntry The example for this item is shown with the ones above: aws-Parse.salam
func ListPrefixCount (l: ObjectList): int The example for this item is shown with the ones above: aws-Parse.salam
func ListPrefixAt (l: ObjectList, i: int ): str The example for this item is shown with the ones above: aws-Parse.salam
func ListTotalSize (l: ObjectList): i64 The example for this item is shown with the ones above: aws-Parse.salam
func ListFree (l &: ObjectList) The example for this item is shown with the ones above: aws-Parse.salam
func KeyCount (k: KeyList): int The example for this item is shown with the ones above: aws-Parse.salam
func KeyAt (k: KeyList, i: int ): str The example for this item is shown with the ones above: aws-Parse.salam
func NewKeyList (): KeyList The example for this item is shown with the ones above: aws-Parse.salam
func KeyPush (k &: KeyList, key: str ) The example for this item is shown with the ones above: aws-Parse.salam
func KeyFree (k &: KeyList) The example for this item is shown with the ones above: aws-Parse.salam
func S3DeleteMany (cfg: Config, keys: KeyList): Result Deletes the keys in batches of a thousand.
The example for this item is shown with the ones above: aws-Objects.salam
func S3DeletePrefix (cfg: Config, prefix: str ): Result Deletes every object under a prefix.
The example for this item is shown with the ones above: aws-Objects.salam
func ListToResult (l: ObjectList): Result The state of a listing as a result.
The example for this item is shown with the ones above: aws-Parse.salam
func ParseListing (body: str , status: int ): ObjectList Reads the XML response of a listing.
The example for this item is shown with the ones above: aws-Parse.salam
func ServiceEndpoint (service: str , region: str ): str The regional address of a service.
The example for this item is shown with the ones above: aws-Config.salam
func NewQueryCall (service: str , action: str , version: str ): Call A call to a query API, such as SQS and STS, with Action and Version.
The example for this item is shown with the ones above: aws-Parse.salam
func NewJsonCall (service: str , target: str , json: str ): Call A call to a JSON 1.0 API, such as DynamoDB.
The example for this item is shown with the ones above: aws-Parse.salam
func NewJson11Call (service: str , target: str , json: str ): Call A call to a JSON 1.1 API, such as CloudWatch Logs.
The example for this item is shown with the ones above: aws-Parse.salam
func NewRestCall (service: str , method: str , path: str ): Call A call to a REST API, such as Lambda.
The example for this item is shown with the ones above: aws-Parse.salam
func CallParam (c &: Call, name: str , value: str ) The example for this item is shown with the ones above: aws-Parse.salam
func CallParamInt (c &: Call, name: str , value: int ) The example for this item is shown with the ones above: aws-Parse.salam
func CallHeader (c &: Call, name: str , value: str ) The example for this item is shown with the ones above: aws-Parse.salam
func CallQuery (c &: Call, name: str , value: str ) A query string parameter.
The example for this item is shown with the ones above: aws-Parse.salam
func CallBody (c &: Call, body: str , content_type: str ) The body with a content type.
The example for this item is shown with the ones above: aws-Parse.salam
func CallRegion (c &: Call, region: str ) The example for this item is shown with the ones above: aws-Parse.salam
func CallEndpoint (c &: Call, endpoint: str ) The example for this item is shown with the ones above: aws-Parse.salam
func Invoke (cfg: Config, c: Call): Result Signs and runs the call, and tries again on transient errors.
The example for this item is shown with the ones above: aws-Services.salam
func ServiceErrorCode (body: str ): str The error code from an XML or JSON service response.
The example for this item is shown with the ones above: aws-Parse.salam
func ServiceErrorMessage (body: str , status: int ): str The error message; when the body is empty, a message from the status code.
The example for this item is shown with the ones above: aws-Parse.salam
The example for this item is shown with the ones above: aws-Parse.salam
func PreparedCall (cfg: Config, c: Call, at: i64 ): str The signed HTTP text of the call at the given time, without sending it; for tests.
The example for this item is shown with the ones above: aws-Parse.salam
func CallBodyText (c: Call): str The body that will be sent.
The example for this item is shown with the ones above: aws-Parse.salam
func S3CreateUpload (cfg: Config, key: str , o: PutOptions): Upload Starts a multipart upload.
The example for this item is shown with the ones above: aws-Files.salam
func S3UploadPart (cfg: Config, u &: Upload, number: int , data: void *, n: int ): Result Sends one part and records it in the upload.
The example for this item is shown with the ones above: aws-Files.salam
func S3UploadPartCopy (cfg: Config, u &: Upload, number: int , src_key: str , o: CopyOptions, start: i64 , stop: i64 ): Result Copies a range of another object as a part.
The example for this item is shown with the ones above: aws-Files.salam
func S3CompleteUpload (cfg: Config, u: Upload): Result Turns the parts into one object.
The example for this item is shown with the ones above: aws-Files.salam
func S3AbortUpload (cfg: Config, u: Upload): Result Aborts the upload and removes the parts; abandoned parts cost money.
The example for this item is shown with the ones above: aws-Files.salam
func S3ListParts (cfg: Config, key: str , upload_id: str ): PartList The example for this item is shown with the ones above: aws-Files.salam
func S3ListUploads (cfg: Config, prefix: str ): UploadList The unfinished uploads of the bucket.
The example for this item is shown with the ones above: aws-Files.salam
func S3PutLarge (cfg: Config, key: str , data: void *, n: int , part_size: int , o: PutOptions): Result Sends large data in parts automatically; when it fails, it aborts.
The example for this item is shown with the ones above: aws-Files.salam
func S3CopyLarge (cfg: Config, src_key: str , dst_key: str , part_size: int , o: CopyOptions): Result Copies an object larger than 5 GB, part by part.
The example for this item is shown with the ones above: aws-Files.salam
func S3MultipartEtag (data: void *, n: int , part_size: int ): str The ETag S3 gives a multipart upload with this part size; for checking integrity.
The example for this item is shown with the ones above: aws-Sign.salam
func S3ContentHashMd5 (data: void *, n: int ): str The hexadecimal MD5 digest of the data.
The example for this item is shown with the ones above: aws-Sign.salam
func PartCount (p: PartList): int The example for this item is shown with the ones above: aws-Files.salam
func PartAt (p: PartList, i: int ): PartRef The example for this item is shown with the ones above: aws-Files.salam
func UploadCount (u: UploadList): int The example for this item is shown with the ones above: aws-Files.salam
func UploadAt (u: UploadList, i: int ): UploadRef The example for this item is shown with the ones above: aws-Files.salam
func UploadParts (u: Upload): int The number of parts sent.
The example for this item is shown with the ones above: aws-Files.salam
func UploadBytes (u: Upload): i64 The example for this item is shown with the ones above: aws-Files.salam
func UploadFreeParts (u &: Upload) The example for this item is shown with the ones above: aws-Files.salam
func S3UploadFile (cfg: Config, key: str , path: str , o: PutOptions): TransferResult Sends a file; a large file goes as a multipart upload automatically and the whole file is never loaded into memory.
The example for this item is shown with the ones above: aws-Files.salam
func S3UploadFileAs (cfg: Config, key: str , path: str , content_type: str ): TransferResult A file with a content type.
The example for this item is shown with the ones above: aws-Files.salam
func S3DownloadFile (cfg: Config, key: str , path: str ): TransferResult Saves an object to a file.
The example for this item is shown with the ones above: aws-Files.salam
func S3UploadDir (cfg: Config, dir: str , prefix: str , o: PutOptions): DirResult Sends every file of a folder under a prefix; the content type is guessed from the extension.
The example for this item is shown with the ones above: aws-Files.salam
func S3DownloadPrefix (cfg: Config, prefix: str , dir: str ): DirResult Saves every object under a prefix into a folder.
The example for this item is shown with the ones above: aws-Files.salam
func S3FileEtag (path: str , part_size: int ): str The ETag S3 gives this file; for syncing without downloading.
The example for this item is shown with the ones above: aws-Files.salam
The example for this item is shown with the ones above: aws-Sign.salam
func TagSet (h &: Headers, name: str , value: str ) The example for this item is shown with the ones above: aws-Sign.salam
func TagString (tags: Headers): str The tags as a query string, for the x-amz-tagging header.
The example for this item is shown with the ones above: aws-Sign.salam
func S3SetObjectTags (cfg: Config, key: str , tags: Headers): Result Replaces the object tags.
The example for this item is shown with the ones above: aws-Objects.salam
func S3ObjectTags (cfg: Config, key: str ): Headers The example for this item is shown with the ones above: aws-Objects.salam
func S3ObjectTagsVersion (cfg: Config, key: str , version_id: str ): Headers The example for this item is shown with the ones above: aws-Objects.salam
func S3DeleteObjectTags (cfg: Config, key: str ): Result The example for this item is shown with the ones above: aws-Objects.salam
func S3AddObjectTag (cfg: Config, key: str , name: str , value: str ): Result Adds a tag and keeps the others.
The example for this item is shown with the ones above: aws-Objects.salam
func S3SetObjectAcl (cfg: Config, key: str , acl: str ): Result Sets the canned ACL of the object.
The example for this item is shown with the ones above: aws-Objects.salam
func S3ObjectAcl (cfg: Config, key: str ): str The example for this item is shown with the ones above: aws-Objects.salam
func S3MakePublic (cfg: Config, key: str ): Result Makes the object readable by everyone.
The example for this item is shown with the ones above: aws-Objects.salam
func S3MakePrivate (cfg: Config, key: str ): Result Makes the object private.
The example for this item is shown with the ones above: aws-Objects.salam
func S3SetLegalHold (cfg: Config, key: str , held: bool ): Result Turns a legal hold on or off; needs Object Lock.
The example for this item is shown with the ones above: aws-Objects.salam
func S3LegalHold (cfg: Config, key: str ): bool The example for this item is shown with the ones above: aws-Objects.salam
func S3SetRetention (cfg: Config, key: str , mode: str , until_epoch: i64 ): Result GOVERNANCE or COMPLIANCE retention until the given time.
The example for this item is shown with the ones above: aws-Objects.salam
func S3CreateBucket (cfg: Config, bucket: str ): Result Creates a bucket; outside us-east-1 it sends the region too.
The example for this item is shown with the ones above: aws-Buckets.salam
func S3CreateBucketAcl (cfg: Config, bucket: str , acl: str ): Result A bucket with a canned ACL, such as private.
The example for this item is shown with the ones above: aws-Buckets.salam
func S3DeleteBucket (cfg: Config, bucket: str ): Result The example for this item is shown with the ones above: aws-Buckets.salam
func S3HeadBucket (cfg: Config, bucket: str ): Result The bucket headers; for checking that it exists and is reachable.
The example for this item is shown with the ones above: aws-Buckets.salam
func S3BucketExists (cfg: Config, bucket: str ): bool The bucket exists and is reachable.
The example for this item is shown with the ones above: aws-Buckets.salam
func S3ListBuckets (cfg: Config): BucketList The buckets of the account.
The example for this item is shown with the ones above: aws-Buckets.salam
func BucketCount (l: BucketList): int The example for this item is shown with the ones above: aws-Buckets.salam
func BucketAt (l: BucketList, i: int ): BucketEntry The example for this item is shown with the ones above: aws-Buckets.salam
func BucketListFree (l &: BucketList) The example for this item is shown with the ones above: aws-Buckets.salam
func S3BucketRegion (cfg: Config, bucket: str ): str The region of the bucket.
The example for this item is shown with the ones above: aws-Buckets.salam
func S3SetVersioning (cfg: Config, bucket: str , enabled: bool ): Result Turns bucket versioning on or suspends it.
The example for this item is shown with the ones above: aws-Buckets.salam
func S3Versioning (cfg: Config, bucket: str ): str The versioning state: Enabled, Suspended or empty.
The example for this item is shown with the ones above: aws-Buckets.salam
func S3SetBucketTags (cfg: Config, bucket: str , tags: Headers): Result Replaces the bucket tags.
The example for this item is shown with the ones above: aws-Buckets.salam
func S3BucketTags (cfg: Config, bucket: str ): Headers The example for this item is shown with the ones above: aws-Buckets.salam
func S3DeleteBucketTags (cfg: Config, bucket: str ): Result The example for this item is shown with the ones above: aws-Buckets.salam
func S3SetBucketPolicy (cfg: Config, bucket: str , policy_json: str ): Result Sets the JSON policy of the bucket.
The example for this item is shown with the ones above: aws-Buckets.salam
func S3BucketPolicy (cfg: Config, bucket: str ): str The example for this item is shown with the ones above: aws-Buckets.salam
func S3DeleteBucketPolicy (cfg: Config, bucket: str ): Result The example for this item is shown with the ones above: aws-Buckets.salam
func S3SetBucketCors (cfg: Config, bucket: str , origin: str , methods: str , max_age: int ): Result A CORS rule with an origin, methods and a max age; for direct uploads from the browser.
The example for this item is shown with the ones above: aws-Buckets.salam
func S3BucketCors (cfg: Config, bucket: str ): str The CORS configuration as XML.
The example for this item is shown with the ones above: aws-Buckets.salam
func S3DeleteBucketCors (cfg: Config, bucket: str ): Result Deletes the CORS configuration.
The example for this item is shown with the ones above: aws-Buckets.salam
func S3SetLifecycle (cfg: Config, bucket: str , config_xml: str ): Result Sets the XML lifecycle configuration.
The example for this item is shown with the ones above: aws-Buckets.salam
func S3Lifecycle (cfg: Config, bucket: str ): str The lifecycle configuration.
The example for this item is shown with the ones above: aws-Buckets.salam
func S3DeleteLifecycle (cfg: Config, bucket: str ): Result The example for this item is shown with the ones above: aws-Buckets.salam
func S3ExpiryRule (prefix: str , days: int , abort_days: int ): str The XML of a rule that deletes the objects under a prefix after some days and aborts unfinished uploads.
The example for this item is shown with the ones above: aws-Parse.salam
func NewConfig (endpoint: str , bucket: str ): Config A configuration with an address and a bucket.
The example for this item is shown with the ones above: aws-Config.salam
func WithCredentials (cfg: Config, access_key: str , secret_key: str ): Config The configuration with keys.
The example for this item is shown with the ones above: aws-Config.salam
func Configured (cfg: Config): bool The address, the bucket and the keys are all set, or the configuration is anonymous. It is false without a bucket, even for SQS or STS.
The example for this item is shown with the ones above: aws-Config.salam
func Failure (reason: str ): Result A failed result with a reason.
The example for this item is shown with the ones above: aws-Config.salam
func AmzDate (epoch_seconds: i64 ): str The time in the 20130524T000000Z form.
The example for this item is shown with the ones above: aws-Sign.salam
func DateStamp (amz_date: str ): str The date part, such as 20130524.
The example for this item is shown with the ones above: aws-Sign.salam
func Scope (date_stamp: str , region: str , service: str ): str The credential scope of the signature: date/region/service/aws4_request.
The example for this item is shown with the ones above: aws-Sign.salam
func UriEncode (s: str , keep_slash: bool ): str Percent encoding the AWS way; with the second flag, / is kept.
The example for this item is shown with the ones above: aws-Sign.salam
func EncodeKey (key: str ): str Encodes an object key for the URL path.
The example for this item is shown with the ones above: aws-Sign.salam
func Sha256Bytes (ptr: void *, n: int ): str The hexadecimal SHA-256 digest.
The example for this item is shown with the ones above: aws-Sign.salam
func SignRequest (cfg: Config, method: str , path: str , query: str , canonical_headers: str , signed_headers: str , payload_hash: str , epoch_seconds: i64 ): Signed Builds a Signature Version 4 signature from the parts of the canonical request.
The example for this item is shown with the ones above: aws-Sign.salam
func SignString (cfg: Config, date_stamp: str , payload: str ): str Signs a string with the signing key of the day.
The example for this item is shown with the ones above: aws-Sign.salam
func SignQueryHeaders (cfg: Config, method: str , path: str , query: str , canonical_headers: str , signed_headers: str , epoch_seconds: i64 ): str A query string signature with signed headers.
The example for this item is shown with the ones above: aws-Sign.salam
func SignQuery (cfg: Config, method: str , path: str , query: str , host: str , epoch_seconds: i64 ): str The query string signature parameters for a presigned URL.
The example for this item is shown with the ones above: aws-Sign.salam
func AwsEndpoint (region: str ): str The S3 address in one region.
The example for this item is shown with the ones above: aws-Config.salam
func ForAws (region: str , bucket: str ): Config A configuration for Amazon S3 with the regional address and virtual host addressing.
The example for this item is shown with the ones above: aws-Config.salam
func ForMinio (endpoint: str , bucket: str ): Config A configuration for MinIO with path addressing.
The example for this item is shown with the ones above: aws-Config.salam
func ForR2 (account_id: str , bucket: str ): Config A configuration for Cloudflare R2 with the account id.
The example for this item is shown with the ones above: aws-Config.salam
func ForSpaces (region: str , bucket: str ): Config A configuration for DigitalOcean Spaces.
The example for this item is shown with the ones above: aws-Config.salam
func ForWasabi (region: str , bucket: str ): Config A configuration for Wasabi.
The example for this item is shown with the ones above: aws-Config.salam
func ForBackblaze (region: str , bucket: str ): Config A configuration for Backblaze B2.
The example for this item is shown with the ones above: aws-Config.salam
func ForEndpoint (endpoint: str , region: str , bucket: str ): Config A configuration for any S3 compatible service, with an address and a region.
The example for this item is shown with the ones above: aws-Config.salam
func FromEnvironment (bucket: str ): Config A configuration from environment variables, such as AWS_REGION and AWS_ENDPOINT_URL.
The example for this item is shown with the ones above: aws-Config.salam
func CredentialsPath (): str The path of the credentials file, usually ~/.aws/credentials.
The example for this item is shown with the ones above: aws-Config.salam
The path of the config file, usually ~/.aws/config.
The example for this item is shown with the ones above: aws-Config.salam
func FromProfile (profile: str , bucket: str ): Config A configuration from one profile in the ~/.aws files.
The example for this item is shown with the ones above: aws-Files.salam
func ParseIni (text: str , section: str , key: str ): str The value of one key in one section of INI text.
The example for this item is shown with the ones above: aws-Config.salam
func WithBucket (cfg: Config, bucket: str ): Config The configuration with another bucket.
The example for this item is shown with the ones above: aws-Config.salam
func WithSessionToken (cfg: Config, token: str ): Config The configuration with a session token.
The example for this item is shown with the ones above: aws-Config.salam
func WithRetry (cfg: Config, attempts: int , base_ms: int ): Config The number of attempts and the base delay in milliseconds; the delay doubles every time.
The example for this item is shown with the ones above: aws-Config.salam
func Describe (cfg: Config): str A description of the configuration that does not reveal the secret.
The example for this item is shown with the ones above: aws-Config.salam
FromEnvironmentCredentials #
func FromEnvironmentCredentials (): Credentials Reads the credentials from the environment variables.
The example for this item is shown with the ones above: aws-Services.salam
func FromProfileCredentials (profile: str , o: ChainOptions): Credentials Reads the credentials from a profile, and assumes the role when the profile has one.
The example for this item is shown with the ones above: aws-Services.salam
FromWebIdentityCredentials #
func FromWebIdentityCredentials (o: ChainOptions): Credentials Assumes the AWS_ROLE_ARN role with the AWS_WEB_IDENTITY_TOKEN_FILE file.
The example for this item is shown with the ones above: aws-Services.salam
FromContainerCredentials #
func FromContainerCredentials (timeout_ms: int ): Credentials Gets the credentials from the ECS or EKS container endpoint.
The example for this item is shown with the ones above: aws-Services.salam
func FromInstanceCredentials (timeout_ms: int ): Credentials Gets the credentials from the EC2 metadata service with IMDSv2. AWS_EC2_METADATA_SERVICE_ENDPOINT replaces the address of the service.
The example for this item is shown with the ones above: aws-Services.salam
func InstanceRegion (timeout_ms: int ): str The region of the EC2 instance from the metadata service; an empty string outside EC2.
The example for this item is shown with the ones above: aws-Services.salam
func DefaultChain (): ChainOptions The default chain: environment, profile, web identity, container and instance, in that order, as in the official SDKs.
The example for this item is shown with the ones above: aws-Config.salam
func ContainerChain (): ChainOptions A chain for containers that does not ask the instance.
The example for this item is shown with the ones above: aws-Config.salam
func Resolve (o: ChainOptions): Credentials Tries the sources of the chain in order and returns the first credentials it finds.
The example for this item is shown with the ones above: aws-Services.salam
func ResolveConfig (bucket: str , region: str , o: ChainOptions): Config Builds a ready configuration with the bucket, the region and the credentials of the chain.
The example for this item is shown with the ones above: aws-Services.salam
func S3Url (cfg: Config, key: str ): str The public URL of the object.
The example for this item is shown with the ones above: aws-Presign.salam
func S3Presign (cfg: Config, method: str , key: str , expires: int ): str A presigned URL with a method and a lifetime; anyone who has the URL can use it until it expires.
The example for this item is shown with the ones above: aws-Presign.salam
func S3PresignAt (cfg: Config, method: str , key: str , expires: int , epoch_seconds: i64 ): str Presigns at the given time; for tests.
The example for this item is shown with the ones above: aws-Presign.salam
func S3PresignWith (cfg: Config, method: str , key: str , o: PresignOptions, epoch_seconds: i64 ): str The example for this item is shown with the ones above: aws-Presign.salam
func S3PresignGet (cfg: Config, key: str , expires: int ): str The example for this item is shown with the ones above: aws-Presign.salam
func S3PresignPut (cfg: Config, key: str , content_type: str , expires: int ): str A URL for a direct upload from the browser with a content type.
The example for this item is shown with the ones above: aws-Presign.salam
func S3PresignDownload (cfg: Config, key: str , filename: str , expires: int ): str A download URL with a chosen file name.
The example for this item is shown with the ones above: aws-Presign.salam
func S3PresignPost (cfg: Config, key: str , o: PostOptions): PostForm A POST form with a policy for uploading from the browser with size and type limits.
The example for this item is shown with the ones above: aws-Presign.salam
func S3PresignPostAt (cfg: Config, key: str , o: PostOptions, epoch_seconds: i64 ): PostForm Like the function above, at the given time.
The example for this item is shown with the ones above: aws-Presign.salam
func PostFormHtml (f: PostForm, file_field: str ): str The HTML of the form with the hidden fields and a file field.
The example for this item is shown with the ones above: aws-Presign.salam
func SqsQueueUrl (cfg: Config, name: str ): str The URL of a queue by name.
The example for this item is shown with the ones above: aws-Services.salam
func SqsCreateQueue (cfg: Config, name: str , attributes: Headers): str Creates a queue with attributes and returns its URL; a name ending in .fifo makes a FIFO queue.
The example for this item is shown with the ones above: aws-Services.salam
func SqsDeleteQueue (cfg: Config, url: str ): Result The example for this item is shown with the ones above: aws-Services.salam
func SqsListQueues (cfg: Config, prefix: str ): QueueList The queues with a prefix.
The example for this item is shown with the ones above: aws-Services.salam
func QueueCount (l: QueueList): int The example for this item is shown with the ones above: aws-Services.salam
func QueueAt (l: QueueList, i: int ): str The URL of queue number i.
The example for this item is shown with the ones above: aws-Services.salam
func QueueListFree (l &: QueueList) The example for this item is shown with the ones above: aws-Services.salam
func SqsSend (cfg: Config, url: str , body: str ): SendResult The example for this item is shown with the ones above: aws-Services.salam
func SqsSendWith (cfg: Config, url: str , m: OutMessage): SendResult A message with a delay, a group and attributes.
The example for this item is shown with the ones above: aws-Services.salam
func SqsSendCall (url: str , m: OutMessage): Call Builds the send call without sending it.
The example for this item is shown with the ones above: aws-Parse.salam
func SqsReceive (cfg: Config, url: str , o: ReceiveOptions): MessageList Receives messages; a message stays hidden from others until it is deleted or its visibility timeout ends.
The example for this item is shown with the ones above: aws-Services.salam
func SqsReceiveCall (url: str , o: ReceiveOptions): Call The example for this item is shown with the ones above: aws-Parse.salam
func ParseReceive (body: str , status: int ): MessageList Reads the XML response of a receive.
The example for this item is shown with the ones above: aws-Parse.salam
func SqsPoll (cfg: Config, url: str ): MessageList Waits for messages with the longest long poll.
The example for this item is shown with the ones above: aws-Services.salam
func SqsReceiveBatch (cfg: Config, url: str , count: int ): MessageList Receives up to n messages.
The example for this item is shown with the ones above: aws-Services.salam
func MessageCount (l: MessageList): int The example for this item is shown with the ones above: aws-Parse.salam
func MessageAt (l: MessageList, i: int ): Message The example for this item is shown with the ones above: aws-Parse.salam
func MessageListFree (l &: MessageList) The example for this item is shown with the ones above: aws-Parse.salam
func MessageAttribute (m: Message, name: str ): str A message attribute by name.
The example for this item is shown with the ones above: aws-Parse.salam
func SqsDelete (cfg: Config, url: str , receipt: str ): Result Deletes a processed message; otherwise it shows up again.
The example for this item is shown with the ones above: aws-Services.salam
func SqsDeleteBatch (cfg: Config, url: str , l: MessageList): Result Deletes all the messages of the list at once.
The example for this item is shown with the ones above: aws-Services.salam
func SqsChangeVisibility (cfg: Config, url: str , receipt: str , seconds: int ): Result Changes how long a message stays hidden; for long jobs.
The example for this item is shown with the ones above: aws-Services.salam
func SqsRelease (cfg: Config, url: str , receipt: str ): Result Makes the message visible to others right away.
The example for this item is shown with the ones above: aws-Services.salam
func SqsPurge (cfg: Config, url: str ): Result Removes every message of the queue.
The example for this item is shown with the ones above: aws-Services.salam
func SqsAttributes (cfg: Config, url: str ): Headers The example for this item is shown with the ones above: aws-Services.salam
func SqsSetAttributes (cfg: Config, url: str , attributes: Headers): Result Sets the queue attributes.
The example for this item is shown with the ones above: aws-Services.salam
func SqsDepth (cfg: Config, url: str ): int The approximate number of waiting messages.
The example for this item is shown with the ones above: aws-Services.salam
func SqsRedrivePolicy (dead_letter_arn: str , max_receives: int ): str A JSON policy that sends messages that failed several times to a dead letter queue.
The example for this item is shown with the ones above: aws-Parse.salam
func SqsQueueArn (cfg: Config, url: str ): str The example for this item is shown with the ones above: aws-Services.salam
func S3PutBytes (cfg: Config, key: str , body: void *, n: int , content_type: str ): Result The example for this item is shown with the ones above: aws-Objects.salam
func S3PutBytesWith (cfg: Config, key: str , body: void *, n: int , o: PutOptions): Result Like the function above, with options.
The example for this item is shown with the ones above: aws-Objects.salam
func S3Put (cfg: Config, key: str , body: str , content_type: str ): Result The example for this item is shown with the ones above: aws-Objects.salam
func S3PutWith (cfg: Config, key: str , body: str , o: PutOptions): Result The example for this item is shown with the ones above: aws-Objects.salam
func S3Get (cfg: Config, key: str ): Result Reads an object as text. The body is a str and stops at the first zero byte; use S3GetBytes for binary data.
The example for this item is shown with the ones above: aws-Objects.salam
func S3GetWith (cfg: Config, key: str , o: GetOptions): Result The example for this item is shown with the ones above: aws-Objects.salam
func S3GetBytes (cfg: Config, key: str ): Bytes Reads an object as binary.
The example for this item is shown with the ones above: aws-Objects.salam
func S3GetBytesWith (cfg: Config, key: str , o: GetOptions): Bytes The example for this item is shown with the ones above: aws-Objects.salam
func S3GetRange (cfg: Config, key: str , start: i64 , stop: i64 ): Bytes A range of bytes, from the start to the end, the end included.
The example for this item is shown with the ones above: aws-Objects.salam
func S3Head (cfg: Config, key: str ): Result The object headers without the body.
The example for this item is shown with the ones above: aws-Objects.salam
func S3Stat (cfg: Config, key: str ): ObjectInfo Information about the object.
The example for this item is shown with the ones above: aws-Objects.salam
func S3StatVersion (cfg: Config, key: str , version_id: str ): ObjectInfo Information about one version.
The example for this item is shown with the ones above: aws-Objects.salam
func S3Delete (cfg: Config, key: str ): Result Deletes the object; a missing object is not an error.
The example for this item is shown with the ones above: aws-Objects.salam
func S3DeleteVersion (cfg: Config, key: str , version_id: str ): Result The example for this item is shown with the ones above: aws-Objects.salam
func S3Exists (cfg: Config, key: str ): bool The example for this item is shown with the ones above: aws-Objects.salam
func S3Size (cfg: Config, key: str ): i64 The size of the object; -1 when it does not exist.
The example for this item is shown with the ones above: aws-Objects.salam
func S3Copy (cfg: Config, src_key: str , dst_key: str ): Result A copy inside the server, without downloading.
The example for this item is shown with the ones above: aws-Objects.salam
func S3CopyWith (cfg: Config, src_key: str , dst_key: str , o: CopyOptions): Result The example for this item is shown with the ones above: aws-Objects.salam
func S3Move (cfg: Config, src_key: str , dst_key: str ): Result Copies, then deletes the source.
The example for this item is shown with the ones above: aws-Objects.salam
func S3Touch (cfg: Config, key: str , o: CopyOptions): Result Copies the object onto itself so its time and metadata are refreshed.
The example for this item is shown with the ones above: aws-Objects.salam
func S3Restore (cfg: Config, key: str , days: int , tier: str ): Result Brings a Glacier object back for some days; tier is one of Expedited, Standard or Bulk.
The example for this item is shown with the ones above: aws-Objects.salam
func S3ContentHash (body: void *, n: int ): str The hexadecimal SHA-256 digest, for the signature header.
The example for this item is shown with the ones above: aws-Sign.salam
func S3ContentMd5 (body: void *, n: int ): str The MD5 in Base64 for the Content-MD5 header.
The example for this item is shown with the ones above: aws-Sign.salam
func S3ChecksumSha256 (body: void *, n: int ): str The SHA-256 in Base64 for the checksum header.
The example for this item is shown with the ones above: aws-Sign.salam
func S3ObjectChecksum (cfg: Config, key: str ): str The digest S3 keeps for the object.
The example for this item is shown with the ones above: aws-Objects.salam
func StsEndpoint (region: str ): str The regional address of the STS service.
The example for this item is shown with the ones above: aws-Config.salam
func AssumeRole (cfg: Config, role_arn: str , session_name: str , duration: int ): Credentials Assumes a role and returns its temporary credentials.
The example for this item is shown with the ones above: aws-Services.salam
func AssumeRoleWith (cfg: Config, role_arn: str , session_name: str , duration: int , external_id: str , policy_arn: str ): Credentials Like the function above, with an external id and a limiting policy.
The example for this item is shown with the ones above: aws-Services.salam
AssumeRoleWithWebIdentity #
func AssumeRoleWithWebIdentity (cfg: Config, role_arn: str , session_name: str , web_identity_token: str , duration: int ): Credentials Assumes a role with an OIDC token, from GitHub Actions for instance; no keys needed.
The example for this item is shown with the ones above: aws-Services.salam
func GetSessionToken (cfg: Config, duration: int , mfa_serial: str , mfa_code: str ): Credentials Temporary credentials, with an MFA code when needed.
The example for this item is shown with the ones above: aws-Services.salam
func GetFederationToken (cfg: Config, name: str , policy_json: str , duration: int ): Credentials Temporary credentials for an outside user with the given policy.
The example for this item is shown with the ones above: aws-Services.salam
func GetCallerIdentity (cfg: Config): Identity The account and ARN of the current credentials; for testing keys.
The example for this item is shown with the ones above: aws-Services.salam
func Apply (cfg: Config, creds: Credentials): Config Puts the credentials on a configuration, with the session token.
The example for this item is shown with the ones above: aws-Config.salam
func StaticCredentials (access_key: str , secret_key: str ): Credentials Static credentials from keys.
The example for this item is shown with the ones above: aws-Config.salam
func Expired (creds: Credentials, now: i64 , skew: int ): bool The credentials are expired at the given time, with the margin.
The example for this item is shown with the ones above: aws-Config.salam
func ExpiredNow (creds: Credentials): bool The example for this item is shown with the ones above: aws-Config.salam
func SecondsRemaining (creds: Credentials, now: i64 ): i64 The seconds left until expiry; -1 for static credentials.
The example for this item is shown with the ones above: aws-Config.salam
func DescribeCredentials (creds: Credentials): str A description of the credentials that does not reveal the secret; for logs.
The example for this item is shown with the ones above: aws-Config.salam
func ParseCredentials (body: str , status: int , source: str ): Credentials Turns an STS XML response into credentials.
The example for this item is shown with the ones above: aws-Config.salam
func NewHeaders (): Headers The example for this item is shown with the ones above: aws-Sign.salam
func HeaderSet (h &: Headers, name: str , value: str ) Sets a value; names match regardless of letter case.
The example for this item is shown with the ones above: aws-Sign.salam
func HeaderAdd (h &: Headers, name: str , value: str ) Adds the name and value, even when the name repeats.
The example for this item is shown with the ones above: aws-Sign.salam
func HeaderGet (h: Headers, name: str ): str The value of the first matching name.
The example for this item is shown with the ones above: aws-Sign.salam
func HeaderHas (h: Headers, name: str ): bool The example for this item is shown with the ones above: aws-Sign.salam
func HeaderCount (h: Headers): int The example for this item is shown with the ones above: aws-Sign.salam
func HeaderNameAt (h: Headers, i: int ): str The example for this item is shown with the ones above: aws-Sign.salam
func HeaderValueAt (h: Headers, i: int ): str The example for this item is shown with the ones above: aws-Sign.salam
func HeaderFree (h &: Headers) The example for this item is shown with the ones above: aws-Sign.salam
func NewRequest (method: str , key: str ): Request A request for a key in the bucket of the configuration.
The example for this item is shown with the ones above: aws-Sign.salam
func NewBucketRequest (method: str , bucket: str , key: str ): Request A request for another bucket.
The example for this item is shown with the ones above: aws-Sign.salam
func NewServiceRequest (method: str ): Request A request to the service itself, such as listing the buckets.
The example for this item is shown with the ones above: aws-Sign.salam
func SetQuery (r &: Request, name: str , value: str ) The example for this item is shown with the ones above: aws-Sign.salam
func SetQueryInt (r &: Request, name: str , value: int ) A numeric query parameter.
The example for this item is shown with the ones above: aws-Sign.salam
func SetFlag (r &: Request, name: str ) A parameter without a value, such as ?acl.
The example for this item is shown with the ones above: aws-Sign.salam
func SetHeader (r &: Request, name: str , value: str ) The example for this item is shown with the ones above: aws-Sign.salam
func SetBody (r &: Request, p: void *, n: int ) A binary body; its digest is computed.
The example for this item is shown with the ones above: aws-Sign.salam
func SetText (r &: Request, s: str ) The example for this item is shown with the ones above: aws-Sign.salam
func SetUnsignedPayload (r &: Request) Leaves the body unsigned; for large bodies over HTTPS.
The example for this item is shown with the ones above: aws-Sign.salam
func Do (cfg: Config, r: Request): Result Signs and runs the request.
The example for this item is shown with the ones above: aws-Services.salam
func DoBytes (cfg: Config, r: Request): Bytes Like the function above, with a binary response.
The example for this item is shown with the ones above: aws-Services.salam
func FreeBytes (b &: Bytes) The example for this item is shown with the ones above: aws-Objects.salam
func ResultHeader (r: Result, name: str ): str One header of the response.
The example for this item is shown with the ones above: aws-Objects.salam
func BytesHeader (b: Bytes, name: str ): str One header of a binary response.
The example for this item is shown with the ones above: aws-Objects.salam
func ResultErrorCode (body: str ): str The error code from an XML body.
The example for this item is shown with the ones above: aws-Sign.salam
func ResultErrorMessage (body: str , status: int ): str The error message from the body, or from the status code.
The example for this item is shown with the ones above: aws-Sign.salam
func ResultTag (body: str , tag: str ): str The text of the first XML element with this name.
The example for this item is shown with the ones above: aws-Sign.salam
func Unquote (s: str ): str Removes the quotes on both sides; for ETags.
The example for this item is shown with the ones above: aws-Sign.salam
func CanonicalRequest (cfg: Config, r: Request, at: i64 ): str The Signature Version 4 canonical request; for debugging a SignatureDoesNotMatch error.
The example for this item is shown with the ones above: aws-Sign.salam
func PreparedHead (cfg: Config, r: Request, at: i64 ): str The signed HTTP headers of the request, without sending it.
The example for this item is shown with the ones above: aws-Sign.salam