A configuration for a service can be built directly, or by using the helper functions for convenience.
To build an AWS service configuration directly:
{ endpointPrefix = "lambda"
, apiVersion = "2015-03-31"
, protocol = AWS.Config.REST_JSON
, signer = AWS.Config.SignV4
, endpoint = RegionalEndpoint "us-east-1"
, jsonVersion = Nothing
, signingName = Nothing
, xmlNamespace = Nothing
, timestampFormat = Nothing
, targetPrefix = Nothing
}The same thing with the convenience functions would look like:
AWS.Service.defineRegional
"lambda"
"2015-03-31"
AWS.Config.REST_JSON
AWS.Config.SignV4
"us-east-1"In some of the comments below you will see 'API metadata' mentioned. AWS publishes a set of JSON files containing metadata describing each of its services, and this is what is being referred to. You can find this metadata here:
https://github.com/aws/aws-sdk-js/tree/master/apis
Version of a service.
Defines the different protocols that AWS services can use.
Defines the different signing schemes that AWS services can use.
Defines the different timestamp formats that AWS services can use.
An AWS region string.
For example "us-east-1".
Defines an AWS service endpoint.
Creates a global service definition.
Creates a regional service definition.
Set the JSON apiVersion.
Use this if jsonVersion is provided in the API metadata.
Set the signing name for the service.
Use this if signingName is provided in the API metadata.
Set the target prefix for the service.
Use this if targetPrefix is provided in the API metadata.
Note that targetPrefix will default to AWS ++ prefix ++ (apiVersion with the
'-' characters removed). This only needs to be set to a different value if it differs
in the API metadata.
Set the timestamp format for the service.
Use this if timestampFormat is provided in the API metadata.
Note that timestampFormat defaults to UnixTimestamp for JSON and REST_JSON based
services and ISO8601 for other services. Specifying Nothing will use the correct
default, unless it is set to something different in the API metadata.
Set the XML namespace for the service.
Use this if xmlNamespace is provided in the API metadata.
Configures an AWS service.
Note that
timestampFormatdefaults toUnixTimestampfor JSON and REST_JSON based services andISO8601for other services. SpecifyingNothingwill use the correct default, unless it is set to something different in the API metadata.Also note that
targetPrefixwill default to AWS ++ prefix ++ (apiVersion with the '-' characters removed). This only needs to be set to a different value if it differs in the API metadata.