stratosphere-0.6.0: EDSL for AWS CloudFormation

Safe HaskellNone
LanguageHaskell2010

Stratosphere.Values

Synopsis

Documentation

data Val a #

This type is a wrapper around any values in a template. A value can be a Literal, a Ref, or an intrinsic function. See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html

Constructors

Literal a 
Ref Text 
If Text (Val a) (Val a) 
And (Val Bool) (Val Bool) 
Equals (Val Bool) (Val Bool) 
Or (Val Bool) (Val Bool) 
GetAtt Text Text 
Base64 (Val a) 
Join Text [Val a] 
Split Text Text 
Select Integer (Val a) 
GetAZs (Val a) 
FindInMap (Val a) (Val a) (Val a)

Map name, top level key, and second level key

ImportValue Text

The account-and-region-unique exported name of the value to import

Instances

Functor Val # 

Methods

fmap :: (a -> b) -> Val a -> Val b #

(<$) :: a -> Val b -> Val a #

Eq a => Eq (Val a) # 

Methods

(==) :: Val a -> Val a -> Bool #

(/=) :: Val a -> Val a -> Bool #

Show a => Show (Val a) # 

Methods

showsPrec :: Int -> Val a -> ShowS #

show :: Val a -> String #

showList :: [Val a] -> ShowS #

IsString a => IsString (Val a) # 

Methods

fromString :: String -> Val a #

ToJSON a => ToJSON (Val a) # 

Methods

toJSON :: Val a -> Value #

toEncoding :: Val a -> Encoding #

toJSONList :: [Val a] -> Value #

toEncodingList :: [Val a] -> Encoding #

FromJSON a => FromJSON (Val a) # 

Methods

parseJSON :: Value -> Parser (Val a) #

parseJSONList :: Value -> Parser [Val a] #

data ValList a #

There are two ways to construct a list of Vals. One is to use a literal ValList to construct the list. The other is to reference something that is already a list. For example, if you have a parameter called SubnetIds of type ListAWS::EC2::Subnet::Id then, you can use RefList SubnetIds to reference it.

Constructors

ValList [Val a] 
RefList Text 

Instances

IsList (ValList a) # 

Associated Types

type Item (ValList a) :: * #

Methods

fromList :: [Item (ValList a)] -> ValList a #

fromListN :: Int -> [Item (ValList a)] -> ValList a #

toList :: ValList a -> [Item (ValList a)] #

Eq a => Eq (ValList a) # 

Methods

(==) :: ValList a -> ValList a -> Bool #

(/=) :: ValList a -> ValList a -> Bool #

Show a => Show (ValList a) # 

Methods

showsPrec :: Int -> ValList a -> ShowS #

show :: ValList a -> String #

showList :: [ValList a] -> ShowS #

ToJSON a => ToJSON (ValList a) # 
FromJSON a => FromJSON (ValList a) # 
type Item (ValList a) # 
type Item (ValList a) = Val a

newtype Integer' #

We need to wrap integers so we can override the Aeson type-classes. This is necessary because CloudFront made the silly decision to represent numbers as JSON strings.

Constructors

Integer' 

Fields

newtype Bool' #

We need to wrap Bools for the same reason we need to wrap Ints.

Constructors

Bool' 

Fields

newtype Double' #

We need to wrap Doubles for the same reason we need to wrap Ints.

Constructors

Double' 

Fields

class ToRef a b where #

Class used to create a Ref from another type.

Minimal complete definition

toRef

Methods

toRef :: a -> Val b #

Instances

ToRef Parameter b # 

Methods

toRef :: Parameter -> Val b #

ToRef Output b # 

Methods

toRef :: Output -> Val b #

ToRef Resource b # 

Methods

toRef :: Resource -> Val b #