Sigv4Client class

A client that stores secrets and configuration for AWS requests signed with Signature Version 4. Required the following parameters:

  • keyId: Your access key ID
  • accessKey: Your secret access key
Implemented types

Constructors

Sigv4Client({required String keyId, required String accessKey, required String serviceName, required String region, String? sessionToken, String defaultContentType = _default_content_type, String defaultAcceptType = _default_accept_type})

Properties

accessKey String
Your secret access key
getter/setter pair
defaultAcceptType String
The deafult Accept header value. Defaults to application/json
getter/setter pair
defaultContentType String
The default Content-Type header value. Defaults to application/json
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
keyId String
Your access key ID
getter/setter pair
region String
The region of the service(s) to be called.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serviceName String
The name of the service to be called. E.g. s3, execute-api etc.
getter/setter pair
sessionToken String?
An optional session token
getter/setter pair

Methods

canonicalUrl(String path, {Map<String, dynamic>? query}) String
Returns the path with encoded, canonical query parameters. This is required by AWS.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
request(String path, {String? method = 'GET', Map<String, dynamic>? query, Map<String, dynamic>? headers, String? body, String? dateTime, String? encoding, bool signPayload = true}) → Request
A wrapper that generates both the canonical path and signed headers and returns a Request object from package:http
override
signedHeaders(String path, {String? method = 'GET', Map<String, dynamic>? query, Map<String, dynamic>? headers, String? body, String? dateTime, String? encoding, bool signPayload = true, bool chunked = false}) Map<String, String>
Generates SIGV4-signed headers.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited