the-sett/elm-aws-core/2.0.0

NOTE: the latest version is 9.0.0

AWS.Core.Service

type Service

Defines an AWS service.

type alias ApiVersion =
String

Version of a service.

type alias Region =
String

An AWS region string.

For example "us-east-1".

= EC2
| JSON
| QUERY
| REST_JSON
| REST_XML

Defines the different protocols that AWS services can use.

type Signer
= SignV4
| SignS3

Defines the different signing schemes that AWS services can use.

= ISO8601
| RFC822
| UnixTimestamp

Defines the different timestamp formats that AWS services can use.

= GlobalEndpoint
| RegionalEndpoint Region

Defines an AWS service endpoint.

Enumerates the signing schemes.

Enumerates the protocols.

Enumerates the timestamp formats.

Constructors

Use either one of these to create a service definition.

String
-> ApiVersion
-> Signer
-> (Service -> Service)

Creates a global service definition.

let
    service = defineGlobal "sts" "2011-06-15" query signV4
        (setXmlNamespace "https://sts.amazonaws.com/doc/2011-06-15/")
in
( service |> endpointPrefix
, service |> host
, service |> targetPrefix
)
--> ( "sts"
--> , "sts.amazonaws.com"
--> , "AWSSTS_20110615"
--> )
String
-> ApiVersion
-> Signer
-> (Service -> Service)
-> Region

Creates a regional service definition.

let
    acm = defineRegional "acm" "2015-12-08" json signV4
        (setJsonVersion "1.1" >> setTargetPrefix "CertificateManager")
    service = acm "ca-central-1"
in
( service |> endpointPrefix
, service |> host
, service |> targetPrefix
)
--> ( "acm"
--> , "acm.ca-central-1.amazonaws.com"
--> , "CertificateManager"
--> )

Your client library should not provide the region. Instead it should expose a function Region -> Service by leaving out the last argument.

Property Setters

Set the JSON apiVersion.

Use this if jsonVersion is provided in the metadata.

Set the signing name for the service.

Use this if signingName is provided in the metadata.

Set the target prefix for the service.

Use this if targetPrefix is provided in the metadata.

Set the timestamp format for the service.

Use this if timestampFormat is provided in the metadata.

Set the XML namespace for the service.

Use this if xmlNamespace is provided in the metadata.

Use Digital Ocean Spaces as the backend service provider.

Changes the way hostnames are resolved.

Attributes

These functions are exposed so that AWS.Core.Http can properly sign requests. They can be useful for debugging, testing, and logging, but otherwise are not required.

Name of the service.

region : Service -> String

Service region.

host : Service -> String

Service endpoint as a hostname.

Service signature version.

targetPrefix : Service -> String

Set the target prefix.

Gets the service JSON content type header value.

acceptType : Service -> String

Gets the service Accept header value.