the-sett/elm-aws-core/9.0.0

AWS.ServiceSpec

Provides the data model for an AWS Service Descriptor, and a codec for that model to encode/decode it from JSON.

All AWS services also have a specification, that describes the data model that the service accepts or produces, and the endpoint that the service provides. It is a similar concept to a Swagger or OpenAPI specification; the format is not the same but the function is. The format is specific to AWS, and is encoded as JSON. The most relevant place to find these service descriptors is here:

https://github.com/aws/aws-sdk-js/tree/master/apis

These service specifications are not needed to call the services. They are meta data describing the services, and can be useful for things such code generation. They are not an essential part of the elm-aws-core package, but the data model is included here for convenience.

The JSON encoders and decoders for the service specification.

awsServiceDecoder : Decoder ServiceSpec

A JSON decoder for the service specification.

awsServiceEncoder : ServiceSpec -> Value

A JSON encoder for the service specification.

The service spec data model.

type alias ServiceSpec =
{ metaData : MetaData
, operations : Dict String Operation
, shapes : Dict String Shape
, authorizers : Maybe Authorizers
, documentation : Maybe String
, version : Maybe String
}

The AWS service specification data model.

type AWSType
= AString
| ABoolean
| AInteger
| ALong
| AFloat
| ADouble
| ABlob
| AStructure
| AList
| AMap
| ATimestamp
| AUnknown

The basic data types that AWS uses to define its service data model.

{ name : String
, placement : Placement
, type_ : String
}

An authorization strategy.

type alias Authorizers =
{ authorization_strategy : AuthorizationStrategy }

The service authorizers.

= DELETE
| GET
| HEAD
| OPTIONS
| POST
| PUT
| PATCH

The HTTP method used to invoke a service.

= Header
| QueryString
| StatusCode
| Uri
| Body

Describes the possible locations that a parameter being passed to or received from a service can occupy; is it in the HTTP header, body, query and so on.

type alias MetaData =
{ apiVersion : String
, endpointPrefix : String
, protocol : Protocol
, serviceId : String
, checksumFormat : Maybe String
, globalEndpoint : Maybe String
, jsonVersion : Maybe String
, serviceAbbreviation : Maybe String
, serviceFullName : Maybe String
, signatureVersion : Maybe Signer
, signingName : Maybe String
, targetPrefix : Maybe String
, uid : Maybe String
, xmlNamespace : Maybe String
}

The service meta data.

type alias Operation =
{ http : Http
, name : String
, alias : Maybe String
, authtype : Maybe String
, deprecated : Maybe Bool
, deprecatedMessage : Maybe String
, documentation : Maybe String
, documentationUrl : Maybe String
, endpoint : Maybe Endpoint
, errors : Maybe (List ShapeRef)
, idempotent : Maybe Bool
, input : Maybe ShapeRef
, output : Maybe ShapeRef
}

A descriptor for a service endpoint.

type alias Shape =
{ type_ : AWSType
, box : Maybe Bool
, deprecated : Maybe Bool
, deprecatedMessage : Maybe String
, documentation : Maybe String
, enum : Maybe (List String)
, error : Maybe Error
, event : Maybe Bool
, eventstream : Maybe Bool
, exception : Maybe Bool
, fault : Maybe Bool
, flattened : Maybe Bool
, key : Maybe ShapeRef
, locationName : Maybe String
, max : Maybe Int
, member : Maybe ShapeRef
, members : Maybe (Dict String ShapeRef)
, min : Maybe Int
, pattern : Maybe String
, payload : Maybe String
, required : Maybe (List String)
, sensitive : Maybe Bool
, streaming : Maybe Bool
, timestampFormat : Maybe TimestampFormat
, value : Maybe ShapeRef
, wrapper : Maybe Bool
, xmlNamespace : Maybe String
, xmlOrder : Maybe (List String)
}

A data model descriptor

type alias ShapeRef =
{ shape : String
, box : Maybe Bool
, deprecated : Maybe Bool
, deprecatedMessage : Maybe String
, documentation : Maybe String
, eventpayload : Maybe Bool
, flattened : Maybe Bool
, idempotencyToken : Maybe String
, jsonvalue : Maybe Bool
, location : Location
, locationName : Maybe String
, queryName : Maybe String
, resultWrapper : Maybe String
, streaming : Maybe Bool
, timestampFormat : Maybe TimestampFormat
, xmlAttribute : Maybe String
, xmlNamespace : Maybe String
}

A reference to a data model.