the-sett/elm-aws-core/1.1.1

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".

type alias Protocol =
Protocol

Enumerates AWS request protocols.

See Protocols for constructors.

type alias Signer =
Signer

Enumerates AWS signature versions.

See Signatures for constructors.

type alias TimestampFormat =
TimestampFormat

Enumerates timestamp formats.

See Timestamp Formats for constructors.

= GlobalEndpoint
| RegionalEndpoint Region

Defines an AWS service endpoint.

Constructors

Use either one of these to create a service definition.

String
-> ApiVersion
-> Protocol
-> 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
-> Protocol
-> 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.

setTimestampFormat : TimestampFormat -> Service -> Service

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.

Protocols

Use these functions to specify the AWS request protocol used by the service.

ec2 : Protocol

EC2 request protocol.

json : Protocol

JSON request protocol.

query : Protocol

QUERY request protocol.

restJson : Protocol

REST_JSON request protocol.

restXml : Protocol

REST_XML request protocol.

Signatures

Use these functions to specify the signature version used by a service.

signV4 : Signer

Use V4 signing.

Timestamp Formats

Use these functions to specify the timestamp format used by a service.

iso8601 : TimestampFormat

Use the timestamp format ISO8601.

rfc822 : TimestampFormat

Use the timestamp format RCF822.

unixTimestamp : TimestampFormat

Use the timestamp format UnixTimestamp.

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.

signer : Service -> Signer

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.