Awskit.CredentialsSourceAWS credentials for request signing.
AWS credentials.
Values are opaque to prevent accidental logging of secret access keys.
Opaque AWS credentials. The secret access key is retained for signing but is not exposed by accessors.
Credential source that produced, skipped, or failed resolution.
val create :
access_key_id:string ->
secret_access_key:string ->
?session_token:string ->
?source:Provider.source ->
?expires_at:Ptime.t ->
unit ->
(t, Error.t) resultCreate credentials from AWS access key material.
Empty access keys, empty secret keys, and invalid session token values are rejected with a validation error. Optional source and expires_at metadata are preserved for provider chains, refresh, and diagnostics.
val create_exn :
access_key_id:string ->
secret_access_key:string ->
?session_token:string ->
?source:Provider.source ->
?expires_at:Ptime.t ->
unit ->
tLike create, but raises Error.Awskit_error carrying the structured validation error on validation failure.
Return the optional session token for temporary credentials.
Return the credential source metadata, if the provider supplied one.
Return a stable, human-readable source label, if source metadata exists.
Return the credential expiration timestamp, if the provider supplied one.
Return the instant until which these credentials are usable, if they are temporary credentials.
Return true when t has expiration metadata and is not usable at now.
Return Ok () when credentials can sign operation at now.
The operation name is controlled SDK context for diagnostics. It must not contain request data such as bucket names, keys, URLs, or headers.
Return Ok () when credentials are still usable at now.
Credentials without expiration metadata are treated as fresh. Expired credentials return a credentials error with source metadata when available.
Derive a SigV4 signing key without exposing the raw secret access key. This is primarily for Awskit.Signing and custom AWS signers.