packages feed

stratosphere 0.1.6 → 0.2.0

raw patch · 45 files changed

+3708/−2 lines, 45 filesnew-component:exe:api-gateway-lambdanew-component:exe:s3-copynew-component:exe:simple-lambda

Files

CHANGELOG.md view
@@ -1,5 +1,18 @@ # Change Log +## Unreleased++* Breaking change: The `DependsOn` property previously allowed lists of `Val+  Text`, when in fact CloudFormation only accepts literal `Text` values. The+  new type of `DependsOn` is `Maybe [Text]`.+* Added `AWS::ElastiCache::CacheCluster` resource (@MichaelXavier)+* Added many `AWS::Lambda` resources and associated resource properties (@ababkin)+* Added new `ImportValue` CloudFormation function (@timmytofu)+* Added tons of AWS Kineses resources (@MichaelXavier)+* Added a lot of Api Gateway resources (@ababkin)+* Allow setting `LensPrefix` in JSON model files to avoid name collisions+  (https://github.com/frontrowed/stratosphere/issues/27)+ ## 0.1.6  * Fix Haddock parsing for `FindInMap`. We now run haddock in CircleCI so we
+ examples/api-gateway-lambda.hs view
@@ -0,0 +1,193 @@+{-# LANGUAGE OverloadedLists   #-}+{-# LANGUAGE OverloadedStrings #-}++module Main where++import           Control.Lens+import           Data.Aeson                 (Value (Array), object)+import qualified Data.ByteString.Lazy.Char8 as B+import           Data.Text                  (Text)+import           Stratosphere+++-- to curl the endpoint: (substitute your APIGW deployment URL)+-- curl -v -X POST -H "Content-Type: application/json" -d "{\"description\": \"test task\"}" "https://t04rmwbtgj.execute-api.us-east-1.amazonaws.com/v1/stack"++main :: IO ()+main = B.putStrLn $ encodeTemplate myTemplate++myTemplate :: Template+myTemplate = template+  [ role+  , incomingS3Bucket+  , lambda+  , permission+  , apiGWRestApi+  , apiGWResource+  , apiGWMethod+  , apiGWDeployment+  ]+  & description ?~ "Simple api gateway attached to a lambda that writes the request body to a S3 object"+  & formatVersion ?~ "2010-09-09"++apiGWRestApi :: Resource+apiGWRestApi = (resource "ApiGWRestApi" $+  ApiGatewayRestApiProperties $+  apiGatewayRestApi+    "myApi"+  )++apiGWResource :: Resource+apiGWResource = (resource "ApiGWResource" $+  ApiGatewayResourceProperties $+  apiGatewayResource+    (GetAtt "ApiGWRestApi" "RootResourceId")+    "stack"+    (toRef apiGWRestApi)+  )+  & dependsOn ?~ deps [ apiGWRestApi ]++apiGWMethod :: Resource+apiGWMethod = (resource "ApiGWMethod" $+  ApiGatewayMethodProperties $+  apiGatewayMethod+    "NONE"+    "POST"+    (toRef apiGWResource)+    (toRef apiGWRestApi)+    & agmeIntegration ?~ integration+    & agmeMethodResponses ?~ [ methodResponse ]+  )+  & dependsOn ?~ deps [+      apiGWRestApi+    , apiGWResource+    , lambda+    ]++  where+    integration = apiGatewayIntegration "AWS"+      & agiIntegrationHttpMethod ?~ "POST"+      & agiUri ?~ (Join "" [+          "arn:aws:apigateway:"+        , Ref "AWS::Region"+        , ":lambda:path/2015-03-31/functions/"+        , GetAtt "WriteS3ObjectLambda" "Arn"+        , "/invocations"])+      & agiIntegrationResponses ?~ [ integrationResponse ]+      & agiPassthroughBehavior ?~ "NEVER"+      & agiRequestTemplates ?~ [ ("application/json", "{\"body\": $input.body}") ]++    integrationResponse = apiGatewayIntegrationResponse+      & agirResponseTemplates ?~ [ ("application/json", "$input.json('$.body')") ]+      & agirStatusCode ?~ "200"++    methodResponse = apiGatewayMethodResponse "200"++apiGWDeployment :: Resource+apiGWDeployment = (resource "ApiGWDeployment" $+  ApiGatewayDeploymentProperties $+  apiGatewayDeployment+    (toRef apiGWRestApi)+    & agdStageName ?~ "v1"+  )+  & dependsOn ?~ deps [+      apiGWRestApi+    , apiGWMethod+    ]++lambda :: Resource+lambda = (resource "WriteS3ObjectLambda" $+  LambdaFunctionProperties $+  lambdaFunction+    lambdaCode+    "index.handler"+    (GetAtt "IAMRole" "Arn")+    "nodejs4.3"+    & lfFunctionName ?~ "writeS3Object"+  )+  & dependsOn ?~ deps [ role ]++  where+    lambdaCode :: LambdaFunctionCode+    lambdaCode = lambdaFunctionCode+      & lfcZipFile ?~ code++    code :: Val Text+    code = "\+    \ var AWS = require('aws-sdk');\n\+    \ var s3 = new AWS.S3({apiVersion: '2006-03-01'});\n\+    \ exports.handler = function(event, context, callback) {\n\+    \   console.log(JSON.stringify(event));\n\+    \   s3.putObject({Bucket: \"stratosphere-api-gateway-lambda-incoming\", Key: \"content.json\", ContentType: \"application/json\", Body: JSON.stringify(event.body)}, function(err){\n\+    \     if (err) { \n\+    \       console.log(\"Error:\", err); \n\+    \       callback(err) \n\+    \     } else { \n\+    \       callback(null, {\"body\": event.body});\n\+    \     } \n\+    \   });\n\+    \ }\n\+    \ "++role :: Resource+role = resource "IAMRole" $+  IAMRoleProperties $+  iamRole rolePolicyDocumentObject+  & iamrPolicies ?~ [ executePolicy ]+  & iamrRoleName ?~ "MyLambdaBasicExecutionRole"+  & iamrPath ?~ "/"++  where+    executePolicy =+      iamPolicies+      [ ("Version", "2012-10-17")+      , ("Statement", statement)+      ]+      "MyLambdaExecutionPolicy"++      where+        statement = object+          [ ("Effect", "Allow")+          , ("Action", actions)+          , ("Resource", "*")+          ]++        actions = Array+          [ "logs:CreateLogGroup"+          , "logs:CreateLogStream"+          , "logs:PutLogEvents"+          , "s3:PutObject"+          ]+++    rolePolicyDocumentObject =+      [ ("Version", "2012-10-17")+      , ("Statement", statement)+      ]++      where+        statement = object+          [ ("Effect", "Allow")+          , ("Principal", principal)+          , ("Action", "sts:AssumeRole")+          ]++        principal = object+          [ ("Service", "lambda.amazonaws.com") ]++incomingS3Bucket :: Resource+incomingS3Bucket = resource "IncomingBucket" $+  BucketProperties $+  bucket+  & bBucketName ?~ "stratosphere-api-gateway-lambda-incoming"++permission :: Resource+permission = resource "LambdaPermission" $+  LambdaPermissionProperties $+  lambdaPermission+    "lambda:*"+    (GetAtt "WriteS3ObjectLambda" "Arn")+    "apigateway.amazonaws.com"++deps :: [Resource] -> [Text]+deps = map (\d -> d ^. resName)
+ examples/s3-copy.hs view
@@ -0,0 +1,132 @@+{-# LANGUAGE OverloadedLists #-}+{-# LANGUAGE OverloadedStrings #-}++module Main where++import Control.Lens+import qualified Data.ByteString.Lazy.Char8 as B+import Data.Text (Text)+import Stratosphere+import Data.Aeson (object, Value(Array))++main :: IO ()+main = B.putStrLn $ encodeTemplate myTemplate++myTemplate :: Template+myTemplate = template+  [ role, lambda, permission, incomingS3Bucket, outgoingS3Bucket ]+  & description ?~ "Simple event triggered S3 bucket to bucket copy example"+  & formatVersion ?~ "2010-09-09"++lambda :: Resource+lambda = (resource "CopyS3ObjectLambda" $+  LambdaFunctionProperties $+  lambdaFunction+    lambdaCode+    "index.handler"+    (GetAtt "IAMRole" "Arn")+    "nodejs4.3"+    & lfFunctionName ?~ "copyS3Object"+  )+  & dependsOn ?~ [ role ^. resName ]++  where+    lambdaCode :: LambdaFunctionCode+    lambdaCode = lambdaFunctionCode+      & lfcZipFile ?~ code++    code :: Val Text+    code = "\+    \ var AWS = require('aws-sdk'); \+    \ var s3 = new AWS.S3({apiVersion: '2006-03-01'}); \+    \ exports.handler = function(event, context, callback) { \+    \  console.log(JSON.stringify(event)); \+    \  var rec = event.Records[0]; \+    \  var bucket = rec.s3.bucket.name; \+    \  var key = rec.s3.object.key; \+    \  s3.copyObject({Bucket: \"stratosphere-s3-copy-outgoing\", Key: key, CopySource: \"stratosphere-s3-copy-incoming/\"+key}, function(err){ \+    \    callback(null, \"copied s3 object\"); \+    \  }); \+    \ } \+    \ "+++role :: Resource+role = resource "IAMRole" $+  IAMRoleProperties $+  iamRole rolePolicyDocumentObject+  & iamrPolicies ?~ [ executePolicy ]+  & iamrRoleName ?~ "MyLambdaBasicExecutionRole"+  & iamrPath ?~ "/"++  where+    executePolicy =+      iamPolicies+      [ ("Version", "2012-10-17")+      , ("Statement", statement)+      ] $+      "MyLambdaExecutionPolicy"++      where+        statement = object+          [ ("Effect", "Allow")+          , ("Action", actions)+          , ("Resource", "*")+          ]++        actions = Array+          [ "logs:CreateLogGroup"+          , "logs:CreateLogStream"+          , "logs:PutLogEvents"++          , "s3:PutObject"+          , "s3:GetObject"+          ]+++    rolePolicyDocumentObject =+      [ ("Version", "2012-10-17")+      , ("Statement", statement)+      ]++      where+        statement = object+          [ ("Effect", "Allow")+          , ("Principal", principal)+          , ("Action", "sts:AssumeRole")+          ]++        principal = object+          [ ("Service", "lambda.amazonaws.com") ]++incomingS3Bucket :: Resource+incomingS3Bucket = (resource "IncomingBucket" $+  BucketProperties $+  bucket+    & bBucketName ?~ "stratosphere-s3-copy-incoming"+    & bNotificationConfiguration ?~ config+  )+  & dependsOn ?~ [ lambda ^. resName ]++  where+    config = s3NotificationConfiguration+      & sncLambdaConfigurations ?~ [lambdaConfig]++    lambdaConfig = s3NotificationConfigurationLambdaConfiguration+      "s3:ObjectCreated:*"+      (GetAtt "CopyS3ObjectLambda" "Arn")++outgoingS3Bucket :: Resource+outgoingS3Bucket = resource "OutgoingBucket" $+  BucketProperties $+  bucket+  & bBucketName ?~ "stratosphere-s3-copy-outgoing"+++permission :: Resource+permission = resource "LambdaPermission" $+  LambdaPermissionProperties $+  lambdaPermission+    "lambda:*"+    (GetAtt "CopyS3ObjectLambda" "Arn")+    "s3.amazonaws.com"
+ examples/simple-lambda.hs view
@@ -0,0 +1,92 @@+{-# LANGUAGE OverloadedLists #-}+{-# LANGUAGE OverloadedStrings #-}++module Main where++import Control.Lens+import qualified Data.ByteString.Lazy.Char8 as B+import Data.Text (Text)+import Stratosphere+import Data.Aeson (object, Value(Array))++main :: IO ()+main = B.putStrLn $ encodeTemplate myTemplate++myTemplate :: Template+myTemplate =+  template+  [ role, lambda ]+  & description ?~ "Lambda example"+  & formatVersion ?~ "2010-09-09"++lambda :: Resource+lambda =+  (resource "LambdaFunction" $+  LambdaFunctionProperties $+  lambdaFunction+    lambdaCode+    "index.handler"+    (GetAtt "IAMRole" "Arn")+    "nodejs4.3"+  )+  & dependsOn ?~ [ role ^. resName ]++lambdaCode :: LambdaFunctionCode+lambdaCode = lambdaFunctionCode+  & lfcZipFile ?~ code++code :: Val Text+code = "\+\ exports.handler = function(event, context, callback) { \+\  console.log(\"value1 = \" + event.key1); \+\  console.log(\"value2 = \" + event.key2); \+\  callback(null, \"some success message\"); \+\ } \+\ "+++role :: Resource+role =+  resource "IAMRole" $+  IAMRoleProperties $+  iamRole rolePolicyDocumentObject+  & iamrPolicies ?~ [ executePolicy ]+  & iamrRoleName ?~ "MyLambdaBasicExecutionRole"+  & iamrPath ?~ "/"++  where+    executePolicy =+      iamPolicies+      [ ("Version", "2012-10-17")+      , ("Statement", statement)+      ] $+      "MyLambdaExecutionPolicy"++      where+        statement = object+          [ ("Effect", "Allow")+          , ("Action", actions)+          , ("Resource", "*")+          ]++        actions = Array+          [ "logs:CreateLogGroup"+          , "logs:CreateLogStream"+          , "logs:PutLogEvents"+          ]+++    rolePolicyDocumentObject =+      [ ("Version", "2012-10-17")+      , ("Statement", statement)+      ]++      where+        statement = object+          [ ("Effect", "Allow")+          , ("Principal", principal)+          , ("Action", "sts:AssumeRole")+          ]++        principal = object+          [ ("Service", "lambda.amazonaws.com") ]
+ library-gen/Stratosphere/ResourceProperties/APIGatewayDeploymentStageDescription.hs view
@@ -0,0 +1,143 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | StageDescription is a property of the AWS::ApiGateway::Deployment+-- resource that configures an Amazon API Gateway (API Gateway) deployment+-- stage.++module Stratosphere.ResourceProperties.APIGatewayDeploymentStageDescription where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.APIGatewayDeploymentStageDescriptionMethodSetting++-- | Full data type definition for APIGatewayDeploymentStageDescription. See+-- 'apiGatewayDeploymentStageDescription' for a more convenient constructor.+data APIGatewayDeploymentStageDescription =+  APIGatewayDeploymentStageDescription+  { _aPIGatewayDeploymentStageDescriptionCacheClusterEnabled :: Maybe (Val Bool')+  , _aPIGatewayDeploymentStageDescriptionCacheClusterSize :: Maybe (Val Text)+  , _aPIGatewayDeploymentStageDescriptionCacheDataEncrypted :: Maybe (Val Bool')+  , _aPIGatewayDeploymentStageDescriptionCacheTtlInSeconds :: Maybe (Val Integer')+  , _aPIGatewayDeploymentStageDescriptionCachingEnabled :: Maybe (Val Bool')+  , _aPIGatewayDeploymentStageDescriptionClientCertificateId :: Maybe (Val Text)+  , _aPIGatewayDeploymentStageDescriptionDataTraceEnabled :: Maybe (Val Bool')+  , _aPIGatewayDeploymentStageDescriptionDescription :: Maybe (Val Text)+  , _aPIGatewayDeploymentStageDescriptionLoggingLevel :: Maybe (Val Text)+  , _aPIGatewayDeploymentStageDescriptionMethodSettings :: Maybe APIGatewayDeploymentStageDescriptionMethodSetting+  , _aPIGatewayDeploymentStageDescriptionMetricsEnabled :: Maybe (Val Bool')+  , _aPIGatewayDeploymentStageDescriptionStageName :: Maybe (Val Text)+  , _aPIGatewayDeploymentStageDescriptionThrottlingBurstLimit :: Maybe (Val Integer')+  , _aPIGatewayDeploymentStageDescriptionThrottlingRateLimit :: Maybe Double'+  , _aPIGatewayDeploymentStageDescriptionVariables :: Maybe Object+  } deriving (Show, Generic)++instance ToJSON APIGatewayDeploymentStageDescription where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 37, omitNothingFields = True }++instance FromJSON APIGatewayDeploymentStageDescription where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 37, omitNothingFields = True }++-- | Constructor for 'APIGatewayDeploymentStageDescription' containing+-- required fields as arguments.+apiGatewayDeploymentStageDescription+  :: APIGatewayDeploymentStageDescription+apiGatewayDeploymentStageDescription  =+  APIGatewayDeploymentStageDescription+  { _aPIGatewayDeploymentStageDescriptionCacheClusterEnabled = Nothing+  , _aPIGatewayDeploymentStageDescriptionCacheClusterSize = Nothing+  , _aPIGatewayDeploymentStageDescriptionCacheDataEncrypted = Nothing+  , _aPIGatewayDeploymentStageDescriptionCacheTtlInSeconds = Nothing+  , _aPIGatewayDeploymentStageDescriptionCachingEnabled = Nothing+  , _aPIGatewayDeploymentStageDescriptionClientCertificateId = Nothing+  , _aPIGatewayDeploymentStageDescriptionDataTraceEnabled = Nothing+  , _aPIGatewayDeploymentStageDescriptionDescription = Nothing+  , _aPIGatewayDeploymentStageDescriptionLoggingLevel = Nothing+  , _aPIGatewayDeploymentStageDescriptionMethodSettings = Nothing+  , _aPIGatewayDeploymentStageDescriptionMetricsEnabled = Nothing+  , _aPIGatewayDeploymentStageDescriptionStageName = Nothing+  , _aPIGatewayDeploymentStageDescriptionThrottlingBurstLimit = Nothing+  , _aPIGatewayDeploymentStageDescriptionThrottlingRateLimit = Nothing+  , _aPIGatewayDeploymentStageDescriptionVariables = Nothing+  }++-- | Indicates whether cache clustering is enabled for the stage.+apigdsdCacheClusterEnabled :: Lens' APIGatewayDeploymentStageDescription (Maybe (Val Bool'))+apigdsdCacheClusterEnabled = lens _aPIGatewayDeploymentStageDescriptionCacheClusterEnabled (\s a -> s { _aPIGatewayDeploymentStageDescriptionCacheClusterEnabled = a })++-- | The size of the stage's cache cluster.+apigdsdCacheClusterSize :: Lens' APIGatewayDeploymentStageDescription (Maybe (Val Text))+apigdsdCacheClusterSize = lens _aPIGatewayDeploymentStageDescriptionCacheClusterSize (\s a -> s { _aPIGatewayDeploymentStageDescriptionCacheClusterSize = a })++-- | Indicates whether the cached responses are encrypted.+apigdsdCacheDataEncrypted :: Lens' APIGatewayDeploymentStageDescription (Maybe (Val Bool'))+apigdsdCacheDataEncrypted = lens _aPIGatewayDeploymentStageDescriptionCacheDataEncrypted (\s a -> s { _aPIGatewayDeploymentStageDescriptionCacheDataEncrypted = a })++-- | The time-to-live (TTL) period, in seconds, that specifies how long API+-- Gateway caches responses.+apigdsdCacheTtlInSeconds :: Lens' APIGatewayDeploymentStageDescription (Maybe (Val Integer'))+apigdsdCacheTtlInSeconds = lens _aPIGatewayDeploymentStageDescriptionCacheTtlInSeconds (\s a -> s { _aPIGatewayDeploymentStageDescriptionCacheTtlInSeconds = a })++-- | Indicates whether responses are cached and returned for requests. You+-- must enable a cache cluster on the stage to cache responses. For more+-- information, see Enable API Gateway Caching in a Stage to Enhance API+-- Performance in the API Gateway Developer Guide.+apigdsdCachingEnabled :: Lens' APIGatewayDeploymentStageDescription (Maybe (Val Bool'))+apigdsdCachingEnabled = lens _aPIGatewayDeploymentStageDescriptionCachingEnabled (\s a -> s { _aPIGatewayDeploymentStageDescriptionCachingEnabled = a })++-- | The identifier of the client certificate that API Gateway uses to call+-- your integration endpoints in the stage.+apigdsdClientCertificateId :: Lens' APIGatewayDeploymentStageDescription (Maybe (Val Text))+apigdsdClientCertificateId = lens _aPIGatewayDeploymentStageDescriptionClientCertificateId (\s a -> s { _aPIGatewayDeploymentStageDescriptionClientCertificateId = a })++-- | Indicates whether data trace logging is enabled for methods in the stage.+-- API Gateway pushes these logs to Amazon CloudWatch Logs.+apigdsdDataTraceEnabled :: Lens' APIGatewayDeploymentStageDescription (Maybe (Val Bool'))+apigdsdDataTraceEnabled = lens _aPIGatewayDeploymentStageDescriptionDataTraceEnabled (\s a -> s { _aPIGatewayDeploymentStageDescriptionDataTraceEnabled = a })++-- | A description of the purpose of the stage.+apigdsdDescription :: Lens' APIGatewayDeploymentStageDescription (Maybe (Val Text))+apigdsdDescription = lens _aPIGatewayDeploymentStageDescriptionDescription (\s a -> s { _aPIGatewayDeploymentStageDescriptionDescription = a })++-- | The logging level for this method. For valid values, see the loggingLevel+-- property of the Stage resource in the Amazon API Gateway API Reference.+apigdsdLoggingLevel :: Lens' APIGatewayDeploymentStageDescription (Maybe (Val Text))+apigdsdLoggingLevel = lens _aPIGatewayDeploymentStageDescriptionLoggingLevel (\s a -> s { _aPIGatewayDeploymentStageDescriptionLoggingLevel = a })++-- | Configures settings for all of the stage's methods.+apigdsdMethodSettings :: Lens' APIGatewayDeploymentStageDescription (Maybe APIGatewayDeploymentStageDescriptionMethodSetting)+apigdsdMethodSettings = lens _aPIGatewayDeploymentStageDescriptionMethodSettings (\s a -> s { _aPIGatewayDeploymentStageDescriptionMethodSettings = a })++-- | Indicates whether Amazon CloudWatch metrics are enabled for methods in+-- the stage.+apigdsdMetricsEnabled :: Lens' APIGatewayDeploymentStageDescription (Maybe (Val Bool'))+apigdsdMetricsEnabled = lens _aPIGatewayDeploymentStageDescriptionMetricsEnabled (\s a -> s { _aPIGatewayDeploymentStageDescriptionMetricsEnabled = a })++-- | The name of the stage, which API Gateway uses as the first path segment+-- in the invoke Uniform Resource Identifier (URI).+apigdsdStageName :: Lens' APIGatewayDeploymentStageDescription (Maybe (Val Text))+apigdsdStageName = lens _aPIGatewayDeploymentStageDescriptionStageName (\s a -> s { _aPIGatewayDeploymentStageDescriptionStageName = a })++-- | The number of burst requests per second that API Gateway permits across+-- all APIs, stages, and methods in your AWS account. For more information,+-- see Manage API Request Throttling in the API Gateway Developer Guide.+apigdsdThrottlingBurstLimit :: Lens' APIGatewayDeploymentStageDescription (Maybe (Val Integer'))+apigdsdThrottlingBurstLimit = lens _aPIGatewayDeploymentStageDescriptionThrottlingBurstLimit (\s a -> s { _aPIGatewayDeploymentStageDescriptionThrottlingBurstLimit = a })++-- | The number of steady-state requests per second that API Gateway permits+-- across all APIs, stages, and methods in your AWS account. For more+-- information, see Manage API Request Throttling in the API Gateway Developer+-- Guide.+apigdsdThrottlingRateLimit :: Lens' APIGatewayDeploymentStageDescription (Maybe Double')+apigdsdThrottlingRateLimit = lens _aPIGatewayDeploymentStageDescriptionThrottlingRateLimit (\s a -> s { _aPIGatewayDeploymentStageDescriptionThrottlingRateLimit = a })++-- | A map that defines the stage variables. Variable names must consist of+-- alphanumeric characters, and the values must match the following regular+-- expression: [A-Za-z0-9-._~:/?#&=,]+.+apigdsdVariables :: Lens' APIGatewayDeploymentStageDescription (Maybe Object)+apigdsdVariables = lens _aPIGatewayDeploymentStageDescriptionVariables (\s a -> s { _aPIGatewayDeploymentStageDescriptionVariables = a })
+ library-gen/Stratosphere/ResourceProperties/APIGatewayDeploymentStageDescriptionMethodSetting.hs view
@@ -0,0 +1,114 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | MethodSetting is a property of the Amazon API Gateway Deployment+-- StageDescription property that configures settings for all methods in an+-- Amazon API Gateway (API Gateway) stage.++module Stratosphere.ResourceProperties.APIGatewayDeploymentStageDescriptionMethodSetting where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for+-- APIGatewayDeploymentStageDescriptionMethodSetting. See+-- 'apiGatewayDeploymentStageDescriptionMethodSetting' for a more convenient+-- constructor.+data APIGatewayDeploymentStageDescriptionMethodSetting =+  APIGatewayDeploymentStageDescriptionMethodSetting+  { _aPIGatewayDeploymentStageDescriptionMethodSettingCacheDataEncrypted :: Maybe (Val Bool')+  , _aPIGatewayDeploymentStageDescriptionMethodSettingCacheTtlInSeconds :: Maybe (Val Integer')+  , _aPIGatewayDeploymentStageDescriptionMethodSettingCachingEnabled :: Maybe (Val Bool')+  , _aPIGatewayDeploymentStageDescriptionMethodSettingDataTraceEnabled :: Maybe (Val Bool')+  , _aPIGatewayDeploymentStageDescriptionMethodSettingHttpMethod :: Maybe (Val Text)+  , _aPIGatewayDeploymentStageDescriptionMethodSettingLoggingLevel :: Maybe (Val Text)+  , _aPIGatewayDeploymentStageDescriptionMethodSettingMetricsEnabled :: Maybe (Val Bool')+  , _aPIGatewayDeploymentStageDescriptionMethodSettingResourcePath :: Maybe (Val Text)+  , _aPIGatewayDeploymentStageDescriptionMethodSettingThrottlingBurstLimit :: Maybe (Val Integer')+  , _aPIGatewayDeploymentStageDescriptionMethodSettingThrottlingRateLimit :: Maybe Double'+  } deriving (Show, Generic)++instance ToJSON APIGatewayDeploymentStageDescriptionMethodSetting where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 50, omitNothingFields = True }++instance FromJSON APIGatewayDeploymentStageDescriptionMethodSetting where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 50, omitNothingFields = True }++-- | Constructor for 'APIGatewayDeploymentStageDescriptionMethodSetting'+-- containing required fields as arguments.+apiGatewayDeploymentStageDescriptionMethodSetting+  :: APIGatewayDeploymentStageDescriptionMethodSetting+apiGatewayDeploymentStageDescriptionMethodSetting  =+  APIGatewayDeploymentStageDescriptionMethodSetting+  { _aPIGatewayDeploymentStageDescriptionMethodSettingCacheDataEncrypted = Nothing+  , _aPIGatewayDeploymentStageDescriptionMethodSettingCacheTtlInSeconds = Nothing+  , _aPIGatewayDeploymentStageDescriptionMethodSettingCachingEnabled = Nothing+  , _aPIGatewayDeploymentStageDescriptionMethodSettingDataTraceEnabled = Nothing+  , _aPIGatewayDeploymentStageDescriptionMethodSettingHttpMethod = Nothing+  , _aPIGatewayDeploymentStageDescriptionMethodSettingLoggingLevel = Nothing+  , _aPIGatewayDeploymentStageDescriptionMethodSettingMetricsEnabled = Nothing+  , _aPIGatewayDeploymentStageDescriptionMethodSettingResourcePath = Nothing+  , _aPIGatewayDeploymentStageDescriptionMethodSettingThrottlingBurstLimit = Nothing+  , _aPIGatewayDeploymentStageDescriptionMethodSettingThrottlingRateLimit = Nothing+  }++-- | Indicates whether the cached responses are encrypted.+apigdsdmsCacheDataEncrypted :: Lens' APIGatewayDeploymentStageDescriptionMethodSetting (Maybe (Val Bool'))+apigdsdmsCacheDataEncrypted = lens _aPIGatewayDeploymentStageDescriptionMethodSettingCacheDataEncrypted (\s a -> s { _aPIGatewayDeploymentStageDescriptionMethodSettingCacheDataEncrypted = a })++-- | The time-to-live (TTL) period, in seconds, that specifies how long API+-- Gateway caches responses.+apigdsdmsCacheTtlInSeconds :: Lens' APIGatewayDeploymentStageDescriptionMethodSetting (Maybe (Val Integer'))+apigdsdmsCacheTtlInSeconds = lens _aPIGatewayDeploymentStageDescriptionMethodSettingCacheTtlInSeconds (\s a -> s { _aPIGatewayDeploymentStageDescriptionMethodSettingCacheTtlInSeconds = a })++-- | Indicates whether responses are cached and returned for requests. You+-- must enable a cache cluster on the stage to cache responses. For more+-- information, see Enable API Gateway Caching in a Stage to Enhance API+-- Performance in the API Gateway Developer Guide.+apigdsdmsCachingEnabled :: Lens' APIGatewayDeploymentStageDescriptionMethodSetting (Maybe (Val Bool'))+apigdsdmsCachingEnabled = lens _aPIGatewayDeploymentStageDescriptionMethodSettingCachingEnabled (\s a -> s { _aPIGatewayDeploymentStageDescriptionMethodSettingCachingEnabled = a })++-- | Indicates whether data trace logging is enabled for methods in the stage.+-- API Gateway pushes these logs to Amazon CloudWatch Logs.+apigdsdmsDataTraceEnabled :: Lens' APIGatewayDeploymentStageDescriptionMethodSetting (Maybe (Val Bool'))+apigdsdmsDataTraceEnabled = lens _aPIGatewayDeploymentStageDescriptionMethodSettingDataTraceEnabled (\s a -> s { _aPIGatewayDeploymentStageDescriptionMethodSettingDataTraceEnabled = a })++-- | The HTTP method.+apigdsdmsHttpMethod :: Lens' APIGatewayDeploymentStageDescriptionMethodSetting (Maybe (Val Text))+apigdsdmsHttpMethod = lens _aPIGatewayDeploymentStageDescriptionMethodSettingHttpMethod (\s a -> s { _aPIGatewayDeploymentStageDescriptionMethodSettingHttpMethod = a })++-- | The logging level for this method. For valid values, see the loggingLevel+-- property of the Stage resource in the Amazon API Gateway API Reference.+apigdsdmsLoggingLevel :: Lens' APIGatewayDeploymentStageDescriptionMethodSetting (Maybe (Val Text))+apigdsdmsLoggingLevel = lens _aPIGatewayDeploymentStageDescriptionMethodSettingLoggingLevel (\s a -> s { _aPIGatewayDeploymentStageDescriptionMethodSettingLoggingLevel = a })++-- | Indicates whether Amazon CloudWatch metrics are enabled for methods in+-- the stage.+apigdsdmsMetricsEnabled :: Lens' APIGatewayDeploymentStageDescriptionMethodSetting (Maybe (Val Bool'))+apigdsdmsMetricsEnabled = lens _aPIGatewayDeploymentStageDescriptionMethodSettingMetricsEnabled (\s a -> s { _aPIGatewayDeploymentStageDescriptionMethodSettingMetricsEnabled = a })++-- | The resource path for this method. Forward slashes (/) are encoded as ~1+-- and the initial slash must include a forward slash. For example, the path+-- value /resource/subresource must be encoded as /~1resource~1subresource. To+-- specify the root path, use only a slash (/).+apigdsdmsResourcePath :: Lens' APIGatewayDeploymentStageDescriptionMethodSetting (Maybe (Val Text))+apigdsdmsResourcePath = lens _aPIGatewayDeploymentStageDescriptionMethodSettingResourcePath (\s a -> s { _aPIGatewayDeploymentStageDescriptionMethodSettingResourcePath = a })++-- | The number of burst requests per second that API Gateway permits across+-- all APIs, stages, and methods in your AWS account. For more information,+-- see Manage API Request Throttling in the API Gateway Developer Guide.+apigdsdmsThrottlingBurstLimit :: Lens' APIGatewayDeploymentStageDescriptionMethodSetting (Maybe (Val Integer'))+apigdsdmsThrottlingBurstLimit = lens _aPIGatewayDeploymentStageDescriptionMethodSettingThrottlingBurstLimit (\s a -> s { _aPIGatewayDeploymentStageDescriptionMethodSettingThrottlingBurstLimit = a })++-- | The number of steady-state requests per second that API Gateway permits+-- across all APIs, stages, and methods in your AWS account. For more+-- information, see Manage API Request Throttling in the API Gateway Developer+-- Guide.+apigdsdmsThrottlingRateLimit :: Lens' APIGatewayDeploymentStageDescriptionMethodSetting (Maybe Double')+apigdsdmsThrottlingRateLimit = lens _aPIGatewayDeploymentStageDescriptionMethodSettingThrottlingRateLimit (\s a -> s { _aPIGatewayDeploymentStageDescriptionMethodSettingThrottlingRateLimit = a })
+ library-gen/Stratosphere/ResourceProperties/ApiGatewayIntegration.hs view
@@ -0,0 +1,136 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | Integration is a property of the AWS::ApiGateway::Method resource that+-- specifies information about the target back end that an Amazon API Gateway+-- (API Gateway) method calls.++module Stratosphere.ResourceProperties.ApiGatewayIntegration where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.ApiGatewayIntegrationResponse++-- | Full data type definition for ApiGatewayIntegration. See+-- 'apiGatewayIntegration' for a more convenient constructor.+data ApiGatewayIntegration =+  ApiGatewayIntegration+  { _apiGatewayIntegrationCacheKeyParameters :: Maybe [Val Text]+  , _apiGatewayIntegrationCacheNamespace :: Maybe (Val Text)+  , _apiGatewayIntegrationCredentials :: Maybe (Val Text)+  , _apiGatewayIntegrationIntegrationHttpMethod :: Maybe (Val Text)+  , _apiGatewayIntegrationIntegrationResponses :: Maybe [ApiGatewayIntegrationResponse]+  , _apiGatewayIntegrationPassthroughBehavior :: Maybe (Val Text)+  , _apiGatewayIntegrationRequestParameters :: Maybe Object+  , _apiGatewayIntegrationRequestTemplates :: Maybe Object+  , _apiGatewayIntegrationType :: Val Text+  , _apiGatewayIntegrationUri :: Maybe (Val Text)+  } deriving (Show, Generic)++instance ToJSON ApiGatewayIntegration where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 22, omitNothingFields = True }++instance FromJSON ApiGatewayIntegration where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 22, omitNothingFields = True }++-- | Constructor for 'ApiGatewayIntegration' containing required fields as+-- arguments.+apiGatewayIntegration+  :: Val Text -- ^ 'agiType'+  -> ApiGatewayIntegration+apiGatewayIntegration typearg =+  ApiGatewayIntegration+  { _apiGatewayIntegrationCacheKeyParameters = Nothing+  , _apiGatewayIntegrationCacheNamespace = Nothing+  , _apiGatewayIntegrationCredentials = Nothing+  , _apiGatewayIntegrationIntegrationHttpMethod = Nothing+  , _apiGatewayIntegrationIntegrationResponses = Nothing+  , _apiGatewayIntegrationPassthroughBehavior = Nothing+  , _apiGatewayIntegrationRequestParameters = Nothing+  , _apiGatewayIntegrationRequestTemplates = Nothing+  , _apiGatewayIntegrationType = typearg+  , _apiGatewayIntegrationUri = Nothing+  }++-- | A list of request parameters whose values API Gateway will cache.+agiCacheKeyParameters :: Lens' ApiGatewayIntegration (Maybe [Val Text])+agiCacheKeyParameters = lens _apiGatewayIntegrationCacheKeyParameters (\s a -> s { _apiGatewayIntegrationCacheKeyParameters = a })++-- | An API-specific tag group of related cached parameters.+agiCacheNamespace :: Lens' ApiGatewayIntegration (Maybe (Val Text))+agiCacheNamespace = lens _apiGatewayIntegrationCacheNamespace (\s a -> s { _apiGatewayIntegrationCacheNamespace = a })++-- | The credentials required for the integration. To specify an AWS Identity+-- and Access Management (IAM) role that API Gateway assumes, specify the+-- role's Amazon Resource Name (ARN). To require that the caller's identity be+-- passed through from the request, specify arn:aws:iam::*:user/*. To use+-- resource-based permissions on the AWS Lambda (Lambda) function, don't+-- specify this property. Use the AWS::Lambda::Permission resource to permit+-- API Gateway to call the function. For more information, see Allow Amazon+-- API Gateway to Invoke a Lambda Function in the AWS Lambda Developer Guide.+agiCredentials :: Lens' ApiGatewayIntegration (Maybe (Val Text))+agiCredentials = lens _apiGatewayIntegrationCredentials (\s a -> s { _apiGatewayIntegrationCredentials = a })++-- | The integration's HTTP method type.+agiIntegrationHttpMethod :: Lens' ApiGatewayIntegration (Maybe (Val Text))+agiIntegrationHttpMethod = lens _apiGatewayIntegrationIntegrationHttpMethod (\s a -> s { _apiGatewayIntegrationIntegrationHttpMethod = a })++-- | The response that API Gateway provides after a method's back end+-- completes processing a request. API Gateway intercepts the back end's+-- response so that you can control how API Gateway surfaces back-end+-- responses. For example, you can map the back-end status codes to codes that+-- you define.+agiIntegrationResponses :: Lens' ApiGatewayIntegration (Maybe [ApiGatewayIntegrationResponse])+agiIntegrationResponses = lens _apiGatewayIntegrationIntegrationResponses (\s a -> s { _apiGatewayIntegrationIntegrationResponses = a })++-- | Indicates when API Gateway passes requests to the targeted back end. This+-- behavior depends on the request's Content-Type header and whether you+-- defined a mapping template for it. For more information and valid values,+-- see the passthroughBehavior field in the API Gateway API Reference.+agiPassthroughBehavior :: Lens' ApiGatewayIntegration (Maybe (Val Text))+agiPassthroughBehavior = lens _apiGatewayIntegrationPassthroughBehavior (\s a -> s { _apiGatewayIntegrationPassthroughBehavior = a })++-- | The request parameters that API Gateway sends with the back-end request.+-- Specify request parameters as key-value pairs (string-to-string maps), with+-- a destination as the key and a source as the value. Specify the destination+-- using the following pattern integration.request.location.name, where+-- location is querystring, path, or header, and name is a valid, unique+-- parameter name. The source must be an existing method request parameter or+-- a static value. Static values must be enclosed in single quotation marks+-- and pre-encoded based on their destination in the request.+agiRequestParameters :: Lens' ApiGatewayIntegration (Maybe Object)+agiRequestParameters = lens _apiGatewayIntegrationRequestParameters (\s a -> s { _apiGatewayIntegrationRequestParameters = a })++-- | A map of Apache Velocity templates that are applied on the request+-- payload. The template that API Gateway uses is based on the value of the+-- Content-Type header sent by the client. The content type value is the key,+-- and the template is the value (specified as a string), such as the+-- following snippet: For more information about templates, see API Gateway+-- API Request and Response Payload-Mapping Template Reference in the API+-- Gateway Developer Guide.+agiRequestTemplates :: Lens' ApiGatewayIntegration (Maybe Object)+agiRequestTemplates = lens _apiGatewayIntegrationRequestTemplates (\s a -> s { _apiGatewayIntegrationRequestTemplates = a })++-- | The type of back end your method is running, such as HTTP, AWS, or MOCK.+-- For valid values, see the type property in the Amazon API Gateway REST API+-- Reference.+agiType :: Lens' ApiGatewayIntegration (Val Text)+agiType = lens _apiGatewayIntegrationType (\s a -> s { _apiGatewayIntegrationType = a })++-- | The integration's Uniform Resource Identifier (URI). If you specify HTTP+-- for the Type property, specify the API endpoint URL. If you specify MOCK+-- for the Type property, don't specify this property. If you specify AWS for+-- the Type property, specify an AWS service that follows the form:+-- arn:aws:apigateway:region:subdomain.service|service:path|action/service_api.+-- For example, a Lambda function URI follows the form:+-- arn:aws:apigateway:region:lambda:path/path. The path is usually in the form+-- /2015-03-31/functions/LambdaFunctionARN/invocations. For more information,+-- see the uri property of the Integration resource in the Amazon API Gateway+-- REST API Reference.+agiUri :: Lens' ApiGatewayIntegration (Maybe (Val Text))+agiUri = lens _apiGatewayIntegrationUri (\s a -> s { _apiGatewayIntegrationUri = a })
+ library-gen/Stratosphere/ResourceProperties/ApiGatewayIntegrationResponse.hs view
@@ -0,0 +1,76 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | IntegrationResponse is a property of the Amazon API Gateway Method+-- Integration property that specifies the response that Amazon API Gateway+-- (API Gateway) sends after a method's back end finishes processing a+-- request.++module Stratosphere.ResourceProperties.ApiGatewayIntegrationResponse where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for ApiGatewayIntegrationResponse. See+-- 'apiGatewayIntegrationResponse' for a more convenient constructor.+data ApiGatewayIntegrationResponse =+  ApiGatewayIntegrationResponse+  { _apiGatewayIntegrationResponseResponseParameters :: Maybe Object+  , _apiGatewayIntegrationResponseResponseTemplates :: Maybe Object+  , _apiGatewayIntegrationResponseSelectionPattern :: Maybe (Val Text)+  , _apiGatewayIntegrationResponseStatusCode :: Maybe (Val Text)+  } deriving (Show, Generic)++instance ToJSON ApiGatewayIntegrationResponse where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 30, omitNothingFields = True }++instance FromJSON ApiGatewayIntegrationResponse where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 30, omitNothingFields = True }++-- | Constructor for 'ApiGatewayIntegrationResponse' containing required+-- fields as arguments.+apiGatewayIntegrationResponse+  :: ApiGatewayIntegrationResponse+apiGatewayIntegrationResponse  =+  ApiGatewayIntegrationResponse+  { _apiGatewayIntegrationResponseResponseParameters = Nothing+  , _apiGatewayIntegrationResponseResponseTemplates = Nothing+  , _apiGatewayIntegrationResponseSelectionPattern = Nothing+  , _apiGatewayIntegrationResponseStatusCode = Nothing+  }++-- | The response parameters from the back-end response that API Gateway sends+-- to the method response. Specify response parameters as key-value pairs+-- (string-to-string maps), with a destination as the key and a source as the+-- value. For more information, see API Gateway API Request and Response+-- Parameter-Mapping Reference in the API Gateway Developer Guide. The+-- destination must be an existing response parameter in the MethodResponse+-- property. The source must be an existing method request parameter or a+-- static value. Static values must be enclosed in single quotation marks and+-- pre-encoded based on their destination in the request.+agirResponseParameters :: Lens' ApiGatewayIntegrationResponse (Maybe Object)+agirResponseParameters = lens _apiGatewayIntegrationResponseResponseParameters (\s a -> s { _apiGatewayIntegrationResponseResponseParameters = a })++-- | The templates used to transform the integration response body. Specify+-- templates as key-value pairs (string-to-string maps), with a content type+-- as the key and a template as the value. For more information, see API+-- Gateway API Request and Response Payload-Mapping Template Reference in the+-- API Gateway Developer Guide.+agirResponseTemplates :: Lens' ApiGatewayIntegrationResponse (Maybe Object)+agirResponseTemplates = lens _apiGatewayIntegrationResponseResponseTemplates (\s a -> s { _apiGatewayIntegrationResponseResponseTemplates = a })++-- | A regular expression that specifies which error strings or status codes+-- from the back end map to the integration response.+agirSelectionPattern :: Lens' ApiGatewayIntegrationResponse (Maybe (Val Text))+agirSelectionPattern = lens _apiGatewayIntegrationResponseSelectionPattern (\s a -> s { _apiGatewayIntegrationResponseSelectionPattern = a })++-- | The status code that API Gateway uses to map the integration response to+-- a MethodResponse status code.+agirStatusCode :: Lens' ApiGatewayIntegrationResponse (Maybe (Val Text))+agirStatusCode = lens _apiGatewayIntegrationResponseStatusCode (\s a -> s { _apiGatewayIntegrationResponseStatusCode = a })
+ library-gen/Stratosphere/ResourceProperties/ApiGatewayMethodResponse.hs view
@@ -0,0 +1,64 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | MethodResponse is a property of the AWS::ApiGateway::Method resource that+-- defines the responses that can be sent to the client who calls an Amazon+-- API Gateway (API Gateway) method.++module Stratosphere.ResourceProperties.ApiGatewayMethodResponse where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for ApiGatewayMethodResponse. See+-- 'apiGatewayMethodResponse' for a more convenient constructor.+data ApiGatewayMethodResponse =+  ApiGatewayMethodResponse+  { _apiGatewayMethodResponseResponseModels :: Maybe Object+  , _apiGatewayMethodResponseResponseParameters :: Maybe Object+  , _apiGatewayMethodResponseStatusCode :: Val Text+  } deriving (Show, Generic)++instance ToJSON ApiGatewayMethodResponse where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 25, omitNothingFields = True }++instance FromJSON ApiGatewayMethodResponse where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 25, omitNothingFields = True }++-- | Constructor for 'ApiGatewayMethodResponse' containing required fields as+-- arguments.+apiGatewayMethodResponse+  :: Val Text -- ^ 'agmrStatusCode'+  -> ApiGatewayMethodResponse+apiGatewayMethodResponse statusCodearg =+  ApiGatewayMethodResponse+  { _apiGatewayMethodResponseResponseModels = Nothing+  , _apiGatewayMethodResponseResponseParameters = Nothing+  , _apiGatewayMethodResponseStatusCode = statusCodearg+  }++-- | The resources used for the response's content type. Specify response+-- models as key-value pairs (string-to-string maps), with a content type as+-- the key and a Model resource name as the value.+agmrResponseModels :: Lens' ApiGatewayMethodResponse (Maybe Object)+agmrResponseModels = lens _apiGatewayMethodResponseResponseModels (\s a -> s { _apiGatewayMethodResponseResponseModels = a })++-- | Response parameters that API Gateway sends to the client that called a+-- method. Specify response parameters as key-value pairs (string-to-Boolean+-- maps), with a destination as the key and a Boolean as the value. Specify+-- the destination using the following pattern: method.response.header.name,+-- where the name is a valid, unique header name. The Boolean specifies+-- whether a parameter is required.+agmrResponseParameters :: Lens' ApiGatewayMethodResponse (Maybe Object)+agmrResponseParameters = lens _apiGatewayMethodResponseResponseParameters (\s a -> s { _apiGatewayMethodResponseResponseParameters = a })++-- | The method response's status code, which you map to an+-- IntegrationResponse.+agmrStatusCode :: Lens' ApiGatewayMethodResponse (Val Text)+agmrStatusCode = lens _apiGatewayMethodResponseStatusCode (\s a -> s { _apiGatewayMethodResponseStatusCode = a })
+ library-gen/Stratosphere/ResourceProperties/ApiGatewayRestApiS3Location.hs view
@@ -0,0 +1,63 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | S3Location is a property of the AWS::ApiGateway::RestApi resource that+-- specifies the Amazon Simple Storage Service (Amazon S3) location of a+-- Swagger file that defines a set of RESTful APIs in JSON or YAML for an+-- Amazon API Gateway (API Gateway) RestApi.++module Stratosphere.ResourceProperties.ApiGatewayRestApiS3Location where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for ApiGatewayRestApiS3Location. See+-- 'apiGatewayRestApiS3Location' for a more convenient constructor.+data ApiGatewayRestApiS3Location =+  ApiGatewayRestApiS3Location+  { _apiGatewayRestApiS3LocationBucket :: Maybe (Val Text)+  , _apiGatewayRestApiS3LocationETag :: Maybe (Val Text)+  , _apiGatewayRestApiS3LocationKey :: Maybe (Val Text)+  , _apiGatewayRestApiS3LocationVersion :: Maybe (Val Text)+  } deriving (Show, Generic)++instance ToJSON ApiGatewayRestApiS3Location where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 28, omitNothingFields = True }++instance FromJSON ApiGatewayRestApiS3Location where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 28, omitNothingFields = True }++-- | Constructor for 'ApiGatewayRestApiS3Location' containing required fields+-- as arguments.+apiGatewayRestApiS3Location+  :: ApiGatewayRestApiS3Location+apiGatewayRestApiS3Location  =+  ApiGatewayRestApiS3Location+  { _apiGatewayRestApiS3LocationBucket = Nothing+  , _apiGatewayRestApiS3LocationETag = Nothing+  , _apiGatewayRestApiS3LocationKey = Nothing+  , _apiGatewayRestApiS3LocationVersion = Nothing+  }++-- | The name of the S3 bucket where the Swagger file is stored.+agraslBucket :: Lens' ApiGatewayRestApiS3Location (Maybe (Val Text))+agraslBucket = lens _apiGatewayRestApiS3LocationBucket (\s a -> s { _apiGatewayRestApiS3LocationBucket = a })++-- | The Amazon S3 ETag (a file checksum) of the Swagger file. If you don't+-- specify a value, API Gateway skips ETag validation of your Swagger file.+agraslETag :: Lens' ApiGatewayRestApiS3Location (Maybe (Val Text))+agraslETag = lens _apiGatewayRestApiS3LocationETag (\s a -> s { _apiGatewayRestApiS3LocationETag = a })++-- | The file name of the Swagger file (Amazon S3 object name).+agraslKey :: Lens' ApiGatewayRestApiS3Location (Maybe (Val Text))+agraslKey = lens _apiGatewayRestApiS3LocationKey (\s a -> s { _apiGatewayRestApiS3LocationKey = a })++-- | For versioning-enabled buckets, a specific version of the Swagger file.+agraslVersion :: Lens' ApiGatewayRestApiS3Location (Maybe (Val Text))+agraslVersion = lens _apiGatewayRestApiS3LocationVersion (\s a -> s { _apiGatewayRestApiS3LocationVersion = a })
+ library-gen/Stratosphere/ResourceProperties/ApiGatewayStageMethodSetting.hs view
@@ -0,0 +1,112 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | MethodSetting is a property of the AWS::ApiGateway::Stage resource that+-- configures settings for all methods in an Amazon API Gateway (API Gateway)+-- stage.++module Stratosphere.ResourceProperties.ApiGatewayStageMethodSetting where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for ApiGatewayStageMethodSetting. See+-- 'apiGatewayStageMethodSetting' for a more convenient constructor.+data ApiGatewayStageMethodSetting =+  ApiGatewayStageMethodSetting+  { _apiGatewayStageMethodSettingCacheDataEncrypted :: Maybe (Val Bool')+  , _apiGatewayStageMethodSettingCacheTtlInSeconds :: Maybe (Val Integer')+  , _apiGatewayStageMethodSettingCachingEnabled :: Maybe (Val Bool')+  , _apiGatewayStageMethodSettingDataTraceEnabled :: Maybe (Val Bool')+  , _apiGatewayStageMethodSettingHttpMethod :: Val Text+  , _apiGatewayStageMethodSettingLoggingLevel :: Maybe (Val Text)+  , _apiGatewayStageMethodSettingMetricsEnabled :: Maybe (Val Bool')+  , _apiGatewayStageMethodSettingResourcePath :: Val Text+  , _apiGatewayStageMethodSettingThrottlingBurstLimit :: Maybe (Val Integer')+  , _apiGatewayStageMethodSettingThrottlingRateLimit :: Maybe Double'+  } deriving (Show, Generic)++instance ToJSON ApiGatewayStageMethodSetting where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 29, omitNothingFields = True }++instance FromJSON ApiGatewayStageMethodSetting where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 29, omitNothingFields = True }++-- | Constructor for 'ApiGatewayStageMethodSetting' containing required fields+-- as arguments.+apiGatewayStageMethodSetting+  :: Val Text -- ^ 'agsmsHttpMethod'+  -> Val Text -- ^ 'agsmsResourcePath'+  -> ApiGatewayStageMethodSetting+apiGatewayStageMethodSetting httpMethodarg resourcePatharg =+  ApiGatewayStageMethodSetting+  { _apiGatewayStageMethodSettingCacheDataEncrypted = Nothing+  , _apiGatewayStageMethodSettingCacheTtlInSeconds = Nothing+  , _apiGatewayStageMethodSettingCachingEnabled = Nothing+  , _apiGatewayStageMethodSettingDataTraceEnabled = Nothing+  , _apiGatewayStageMethodSettingHttpMethod = httpMethodarg+  , _apiGatewayStageMethodSettingLoggingLevel = Nothing+  , _apiGatewayStageMethodSettingMetricsEnabled = Nothing+  , _apiGatewayStageMethodSettingResourcePath = resourcePatharg+  , _apiGatewayStageMethodSettingThrottlingBurstLimit = Nothing+  , _apiGatewayStageMethodSettingThrottlingRateLimit = Nothing+  }++-- | Indicates whether the cached responses are encrypted.+agsmsCacheDataEncrypted :: Lens' ApiGatewayStageMethodSetting (Maybe (Val Bool'))+agsmsCacheDataEncrypted = lens _apiGatewayStageMethodSettingCacheDataEncrypted (\s a -> s { _apiGatewayStageMethodSettingCacheDataEncrypted = a })++-- | The time-to-live (TTL) period, in seconds, that specifies how long API+-- Gateway caches responses.+agsmsCacheTtlInSeconds :: Lens' ApiGatewayStageMethodSetting (Maybe (Val Integer'))+agsmsCacheTtlInSeconds = lens _apiGatewayStageMethodSettingCacheTtlInSeconds (\s a -> s { _apiGatewayStageMethodSettingCacheTtlInSeconds = a })++-- | Indicates whether responses are cached and returned for requests. You+-- must enable a cache cluster on the stage to cache responses.+agsmsCachingEnabled :: Lens' ApiGatewayStageMethodSetting (Maybe (Val Bool'))+agsmsCachingEnabled = lens _apiGatewayStageMethodSettingCachingEnabled (\s a -> s { _apiGatewayStageMethodSettingCachingEnabled = a })++-- | Indicates whether data trace logging is enabled for methods in the stage.+-- API Gateway pushes these logs to Amazon CloudWatch Logs.+agsmsDataTraceEnabled :: Lens' ApiGatewayStageMethodSetting (Maybe (Val Bool'))+agsmsDataTraceEnabled = lens _apiGatewayStageMethodSettingDataTraceEnabled (\s a -> s { _apiGatewayStageMethodSettingDataTraceEnabled = a })++-- | The HTTP method.+agsmsHttpMethod :: Lens' ApiGatewayStageMethodSetting (Val Text)+agsmsHttpMethod = lens _apiGatewayStageMethodSettingHttpMethod (\s a -> s { _apiGatewayStageMethodSettingHttpMethod = a })++-- | The logging level for this method. For valid values, see the loggingLevel+-- property of the Stage resource in the Amazon API Gateway API Reference.+agsmsLoggingLevel :: Lens' ApiGatewayStageMethodSetting (Maybe (Val Text))+agsmsLoggingLevel = lens _apiGatewayStageMethodSettingLoggingLevel (\s a -> s { _apiGatewayStageMethodSettingLoggingLevel = a })++-- | Indicates whether Amazon CloudWatch metrics are enabled for methods in+-- the stage.+agsmsMetricsEnabled :: Lens' ApiGatewayStageMethodSetting (Maybe (Val Bool'))+agsmsMetricsEnabled = lens _apiGatewayStageMethodSettingMetricsEnabled (\s a -> s { _apiGatewayStageMethodSettingMetricsEnabled = a })++-- | The resource path for this method. Forward slashes (/) are encoded as ~1+-- and the initial slash must include a forward slash. For example, the path+-- value /resource/subresource must be encoded as /~1resource~1subresource. To+-- specify the root path, use only a slash (/).+agsmsResourcePath :: Lens' ApiGatewayStageMethodSetting (Val Text)+agsmsResourcePath = lens _apiGatewayStageMethodSettingResourcePath (\s a -> s { _apiGatewayStageMethodSettingResourcePath = a })++-- | The number of burst requests per second that API Gateway permits across+-- all APIs, stages, and methods in your AWS account. For more information,+-- see Manage API Request Throttling in the API Gateway Developer Guide.+agsmsThrottlingBurstLimit :: Lens' ApiGatewayStageMethodSetting (Maybe (Val Integer'))+agsmsThrottlingBurstLimit = lens _apiGatewayStageMethodSettingThrottlingBurstLimit (\s a -> s { _apiGatewayStageMethodSettingThrottlingBurstLimit = a })++-- | The number of steady-state requests per second that API Gateway permits+-- across all APIs, stages, and methods in your AWS account. For more+-- information, see Manage API Request Throttling in the API Gateway Developer+-- Guide.+agsmsThrottlingRateLimit :: Lens' ApiGatewayStageMethodSetting (Maybe Double')+agsmsThrottlingRateLimit = lens _apiGatewayStageMethodSettingThrottlingRateLimit (\s a -> s { _apiGatewayStageMethodSettingThrottlingRateLimit = a })
+ library-gen/Stratosphere/ResourceProperties/ApiGatewayUsagePlanApiStage.hs view
@@ -0,0 +1,50 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | ApiStage is a property of the AWS::ApiGateway::UsagePlan resource that+-- specifies which Amazon API Gateway (API Gateway) stages and APIs to+-- associate with a usage plan.++module Stratosphere.ResourceProperties.ApiGatewayUsagePlanApiStage where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for ApiGatewayUsagePlanApiStage. See+-- 'apiGatewayUsagePlanApiStage' for a more convenient constructor.+data ApiGatewayUsagePlanApiStage =+  ApiGatewayUsagePlanApiStage+  { _apiGatewayUsagePlanApiStageApiId :: Maybe (Val Text)+  , _apiGatewayUsagePlanApiStageStage :: Maybe (Val Text)+  } deriving (Show, Generic)++instance ToJSON ApiGatewayUsagePlanApiStage where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 28, omitNothingFields = True }++instance FromJSON ApiGatewayUsagePlanApiStage where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 28, omitNothingFields = True }++-- | Constructor for 'ApiGatewayUsagePlanApiStage' containing required fields+-- as arguments.+apiGatewayUsagePlanApiStage+  :: ApiGatewayUsagePlanApiStage+apiGatewayUsagePlanApiStage  =+  ApiGatewayUsagePlanApiStage+  { _apiGatewayUsagePlanApiStageApiId = Nothing+  , _apiGatewayUsagePlanApiStageStage = Nothing+  }++-- | The ID of an API that is in the specified Stage property that you want to+-- associate with the usage plan.+agupasApiId :: Lens' ApiGatewayUsagePlanApiStage (Maybe (Val Text))+agupasApiId = lens _apiGatewayUsagePlanApiStageApiId (\s a -> s { _apiGatewayUsagePlanApiStageApiId = a })++-- | The name of an API Gateway stage to associate with the usage plan.+agupasStage :: Lens' ApiGatewayUsagePlanApiStage (Maybe (Val Text))+agupasStage = lens _apiGatewayUsagePlanApiStageStage (\s a -> s { _apiGatewayUsagePlanApiStageStage = a })
+ library-gen/Stratosphere/ResourceProperties/ApiGatewayUsagePlanQuotaSettings.hs view
@@ -0,0 +1,61 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | QuotaSettings is a property of the AWS::ApiGateway::UsagePlan resource+-- that specifies the maximum number of requests users can make to your Amazon+-- API Gateway (API Gateway) APIs.++module Stratosphere.ResourceProperties.ApiGatewayUsagePlanQuotaSettings where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for ApiGatewayUsagePlanQuotaSettings. See+-- 'apiGatewayUsagePlanQuotaSettings' for a more convenient constructor.+data ApiGatewayUsagePlanQuotaSettings =+  ApiGatewayUsagePlanQuotaSettings+  { _apiGatewayUsagePlanQuotaSettingsLimit :: Maybe (Val Integer')+  , _apiGatewayUsagePlanQuotaSettingsOffset :: Maybe (Val Integer')+  , _apiGatewayUsagePlanQuotaSettingsPeriod :: Maybe (Val Text)+  } deriving (Show, Generic)++instance ToJSON ApiGatewayUsagePlanQuotaSettings where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 33, omitNothingFields = True }++instance FromJSON ApiGatewayUsagePlanQuotaSettings where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 33, omitNothingFields = True }++-- | Constructor for 'ApiGatewayUsagePlanQuotaSettings' containing required+-- fields as arguments.+apiGatewayUsagePlanQuotaSettings+  :: ApiGatewayUsagePlanQuotaSettings+apiGatewayUsagePlanQuotaSettings  =+  ApiGatewayUsagePlanQuotaSettings+  { _apiGatewayUsagePlanQuotaSettingsLimit = Nothing+  , _apiGatewayUsagePlanQuotaSettingsOffset = Nothing+  , _apiGatewayUsagePlanQuotaSettingsPeriod = Nothing+  }++-- | The maximum number of requests that users can make within the specified+-- time period.+agupqsLimit :: Lens' ApiGatewayUsagePlanQuotaSettings (Maybe (Val Integer'))+agupqsLimit = lens _apiGatewayUsagePlanQuotaSettingsLimit (\s a -> s { _apiGatewayUsagePlanQuotaSettingsLimit = a })++-- | For the initial time period, the number of requests to subtract from the+-- specified limit. When you first implement a usage plan, the plan might+-- start in the middle of the week or month. With this property, you can+-- decrease the limit for this initial time period.+agupqsOffset :: Lens' ApiGatewayUsagePlanQuotaSettings (Maybe (Val Integer'))+agupqsOffset = lens _apiGatewayUsagePlanQuotaSettingsOffset (\s a -> s { _apiGatewayUsagePlanQuotaSettingsOffset = a })++-- | The time period for which the maximum limit of requests applies, such as+-- DAY or WEEK. For valid values, see the period property for the UsagePlan+-- resource in the Amazon API Gateway REST API Reference.+agupqsPeriod :: Lens' ApiGatewayUsagePlanQuotaSettings (Maybe (Val Text))+agupqsPeriod = lens _apiGatewayUsagePlanQuotaSettingsPeriod (\s a -> s { _apiGatewayUsagePlanQuotaSettingsPeriod = a })
+ library-gen/Stratosphere/ResourceProperties/ApiGatewayUsagePlanThrottleSettings.hs view
@@ -0,0 +1,55 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | ThrottleSettings is a property of the AWS::ApiGateway::UsagePlan resource+-- that specifies the overall request rate (average requests per second) and+-- burst capacity when users call your Amazon API Gateway (API Gateway) APIs.++module Stratosphere.ResourceProperties.ApiGatewayUsagePlanThrottleSettings where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for ApiGatewayUsagePlanThrottleSettings. See+-- 'apiGatewayUsagePlanThrottleSettings' for a more convenient constructor.+data ApiGatewayUsagePlanThrottleSettings =+  ApiGatewayUsagePlanThrottleSettings+  { _apiGatewayUsagePlanThrottleSettingsBurstLimit :: Maybe (Val Integer')+  , _apiGatewayUsagePlanThrottleSettingsRateLimit :: Maybe Double'+  } deriving (Show, Generic)++instance ToJSON ApiGatewayUsagePlanThrottleSettings where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 36, omitNothingFields = True }++instance FromJSON ApiGatewayUsagePlanThrottleSettings where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 36, omitNothingFields = True }++-- | Constructor for 'ApiGatewayUsagePlanThrottleSettings' containing required+-- fields as arguments.+apiGatewayUsagePlanThrottleSettings+  :: ApiGatewayUsagePlanThrottleSettings+apiGatewayUsagePlanThrottleSettings  =+  ApiGatewayUsagePlanThrottleSettings+  { _apiGatewayUsagePlanThrottleSettingsBurstLimit = Nothing+  , _apiGatewayUsagePlanThrottleSettingsRateLimit = Nothing+  }++-- | The maximum API request rate limit over a time ranging from one to a few+-- seconds. The maximum API request rate limit depends on whether the+-- underlying token bucket is at its full capacity. For more information about+-- request throttling, see Manage API Request Throttling in the API Gateway+-- Developer Guide.+aguptsBurstLimit :: Lens' ApiGatewayUsagePlanThrottleSettings (Maybe (Val Integer'))+aguptsBurstLimit = lens _apiGatewayUsagePlanThrottleSettingsBurstLimit (\s a -> s { _apiGatewayUsagePlanThrottleSettingsBurstLimit = a })++-- | The API request steady-state rate limit (average requests per second over+-- an extended period of time). For more information about request throttling,+-- see Manage API Request Throttling in the API Gateway Developer Guide.+aguptsRateLimit :: Lens' ApiGatewayUsagePlanThrottleSettings (Maybe Double')+aguptsRateLimit = lens _apiGatewayUsagePlanThrottleSettingsRateLimit (\s a -> s { _apiGatewayUsagePlanThrottleSettingsRateLimit = a })
+ library-gen/Stratosphere/ResourceProperties/KinesisFirehoseBufferingHints.hs view
@@ -0,0 +1,59 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | BufferingHints is a property of the Amazon Kinesis Firehose+-- DeliveryStream that specifies how Amazon Kinesis Firehose (Firehose)+-- buffers incoming data while delivering it to the destination. The first+-- buffer condition that is satisfied triggers Firehose to deliver the data.++module Stratosphere.ResourceProperties.KinesisFirehoseBufferingHints where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for KinesisFirehoseBufferingHints. See+-- 'kinesisFirehoseBufferingHints' for a more convenient constructor.+data KinesisFirehoseBufferingHints =+  KinesisFirehoseBufferingHints+  { _kinesisFirehoseBufferingHintsIntervalInSeconds :: Val Integer'+  , _kinesisFirehoseBufferingHintsSizeInMBs :: Val Integer'+  } deriving (Show, Generic)++instance ToJSON KinesisFirehoseBufferingHints where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 30, omitNothingFields = True }++instance FromJSON KinesisFirehoseBufferingHints where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 30, omitNothingFields = True }++-- | Constructor for 'KinesisFirehoseBufferingHints' containing required+-- fields as arguments.+kinesisFirehoseBufferingHints+  :: Val Integer' -- ^ 'kfbhIntervalInSeconds'+  -> Val Integer' -- ^ 'kfbhSizeInMBs'+  -> KinesisFirehoseBufferingHints+kinesisFirehoseBufferingHints intervalInSecondsarg sizeInMBsarg =+  KinesisFirehoseBufferingHints+  { _kinesisFirehoseBufferingHintsIntervalInSeconds = intervalInSecondsarg+  , _kinesisFirehoseBufferingHintsSizeInMBs = sizeInMBsarg+  }++-- | The length of time, in seconds, that Firehose buffers incoming data+-- before delivering it to the destination. The default value is 300. The+-- minimum value is 60. The maximum value 900.+kfbhIntervalInSeconds :: Lens' KinesisFirehoseBufferingHints (Val Integer')+kfbhIntervalInSeconds = lens _kinesisFirehoseBufferingHintsIntervalInSeconds (\s a -> s { _kinesisFirehoseBufferingHintsIntervalInSeconds = a })++-- | The size of the buffer, in MBs, that Firehose uses for incoming data+-- before delivering it to the destination. The default value is 5. The+-- minimum value is 1. The maximum value is 128. We recommend setting+-- SizeInMBs to a value greater than the amount of data you typically ingest+-- into the delivery stream in 10 seconds. For example, if you typically+-- ingest data at 1 MB/sec set SizeInMBs to be 10 MB or higher.+kfbhSizeInMBs :: Lens' KinesisFirehoseBufferingHints (Val Integer')+kfbhSizeInMBs = lens _kinesisFirehoseBufferingHintsSizeInMBs (\s a -> s { _kinesisFirehoseBufferingHintsSizeInMBs = a })
+ library-gen/Stratosphere/ResourceProperties/KinesisFirehoseCloudWatchLoggingOptions.hs view
@@ -0,0 +1,61 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | CloudWatchLoggingOptions is a property of the Amazon Kinesis Firehose+-- DeliveryStream ElasticsearchDestinationConfiguration, Amazon Kinesis+-- Firehose DeliveryStream RedshiftDestinationConfiguration, and Amazon+-- Kinesis Firehose DeliveryStream S3DestinationConfiguration properties that+-- specifies Amazon CloudWatch Logs (CloudWatch Logs) logging options that+-- Amazon Kinesis Firehose (Firehose) uses for the delivery stream.++module Stratosphere.ResourceProperties.KinesisFirehoseCloudWatchLoggingOptions where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for KinesisFirehoseCloudWatchLoggingOptions.+-- See 'kinesisFirehoseCloudWatchLoggingOptions' for a more convenient+-- constructor.+data KinesisFirehoseCloudWatchLoggingOptions =+  KinesisFirehoseCloudWatchLoggingOptions+  { _kinesisFirehoseCloudWatchLoggingOptionsEnabled :: Maybe (Val Bool')+  , _kinesisFirehoseCloudWatchLoggingOptionsLogGroupName :: Maybe (Val Text)+  , _kinesisFirehoseCloudWatchLoggingOptionsLogStreamName :: Maybe (Val Text)+  } deriving (Show, Generic)++instance ToJSON KinesisFirehoseCloudWatchLoggingOptions where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 40, omitNothingFields = True }++instance FromJSON KinesisFirehoseCloudWatchLoggingOptions where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 40, omitNothingFields = True }++-- | Constructor for 'KinesisFirehoseCloudWatchLoggingOptions' containing+-- required fields as arguments.+kinesisFirehoseCloudWatchLoggingOptions+  :: KinesisFirehoseCloudWatchLoggingOptions+kinesisFirehoseCloudWatchLoggingOptions  =+  KinesisFirehoseCloudWatchLoggingOptions+  { _kinesisFirehoseCloudWatchLoggingOptionsEnabled = Nothing+  , _kinesisFirehoseCloudWatchLoggingOptionsLogGroupName = Nothing+  , _kinesisFirehoseCloudWatchLoggingOptionsLogStreamName = Nothing+  }++-- | Indicates whether CloudWatch Logs logging is enabled.+kfcwloEnabled :: Lens' KinesisFirehoseCloudWatchLoggingOptions (Maybe (Val Bool'))+kfcwloEnabled = lens _kinesisFirehoseCloudWatchLoggingOptionsEnabled (\s a -> s { _kinesisFirehoseCloudWatchLoggingOptionsEnabled = a })++-- | The name of the CloudWatch Logs log group that contains the log stream+-- that Firehose will use.+kfcwloLogGroupName :: Lens' KinesisFirehoseCloudWatchLoggingOptions (Maybe (Val Text))+kfcwloLogGroupName = lens _kinesisFirehoseCloudWatchLoggingOptionsLogGroupName (\s a -> s { _kinesisFirehoseCloudWatchLoggingOptionsLogGroupName = a })++-- | The name of the CloudWatch Logs log stream that Firehose uses to send+-- logs about data delivery.+kfcwloLogStreamName :: Lens' KinesisFirehoseCloudWatchLoggingOptions (Maybe (Val Text))+kfcwloLogStreamName = lens _kinesisFirehoseCloudWatchLoggingOptionsLogStreamName (\s a -> s { _kinesisFirehoseCloudWatchLoggingOptionsLogStreamName = a })
+ library-gen/Stratosphere/ResourceProperties/KinesisFirehoseElasticsearchDestinationConfiguration.hs view
@@ -0,0 +1,131 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | ElasticsearchDestinationConfiguration is a property of the+-- AWS::KinesisFirehose::DeliveryStream resource that specifies an Amazon+-- Elasticsearch Service (Amazon ES) domain that Amazon Kinesis Firehose+-- (Firehose) delivers data to.++module Stratosphere.ResourceProperties.KinesisFirehoseElasticsearchDestinationConfiguration where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.KinesisFirehoseBufferingHints+import Stratosphere.ResourceProperties.KinesisFirehoseCloudWatchLoggingOptions+import Stratosphere.ResourceProperties.KinesisFirehoseS3DestinationConfiguration+import Stratosphere.ResourceProperties.KinesisFirehoseElasticsearchRetryOptions+import Stratosphere.Types++-- | Full data type definition for+-- KinesisFirehoseElasticsearchDestinationConfiguration. See+-- 'kinesisFirehoseElasticsearchDestinationConfiguration' for a more+-- convenient constructor.+data KinesisFirehoseElasticsearchDestinationConfiguration =+  KinesisFirehoseElasticsearchDestinationConfiguration+  { _kinesisFirehoseElasticsearchDestinationConfigurationBufferingHints :: KinesisFirehoseBufferingHints+  , _kinesisFirehoseElasticsearchDestinationConfigurationCloudWatchLoggingOptions :: Maybe KinesisFirehoseCloudWatchLoggingOptions+  , _kinesisFirehoseElasticsearchDestinationConfigurationDomainARN :: Val Text+  , _kinesisFirehoseElasticsearchDestinationConfigurationIndexName :: Val Text+  , _kinesisFirehoseElasticsearchDestinationConfigurationIndexRotationPeriod :: Val Text+  , _kinesisFirehoseElasticsearchDestinationConfigurationRetryOptions :: Maybe KinesisFirehoseElasticsearchRetryOptions+  , _kinesisFirehoseElasticsearchDestinationConfigurationRoleARN :: Val Text+  , _kinesisFirehoseElasticsearchDestinationConfigurationS3BackupMode :: KinesisFirehoseElasticsearchS3BackupMode+  , _kinesisFirehoseElasticsearchDestinationConfigurationS3Configuration :: Maybe KinesisFirehoseS3DestinationConfiguration+  , _kinesisFirehoseElasticsearchDestinationConfigurationTypeName :: Val Text+  } deriving (Show, Generic)++instance ToJSON KinesisFirehoseElasticsearchDestinationConfiguration where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 53, omitNothingFields = True }++instance FromJSON KinesisFirehoseElasticsearchDestinationConfiguration where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 53, omitNothingFields = True }++-- | Constructor for 'KinesisFirehoseElasticsearchDestinationConfiguration'+-- containing required fields as arguments.+kinesisFirehoseElasticsearchDestinationConfiguration+  :: KinesisFirehoseBufferingHints -- ^ 'kfedcBufferingHints'+  -> Val Text -- ^ 'kfedcDomainARN'+  -> Val Text -- ^ 'kfedcIndexName'+  -> Val Text -- ^ 'kfedcIndexRotationPeriod'+  -> Val Text -- ^ 'kfedcRoleARN'+  -> KinesisFirehoseElasticsearchS3BackupMode -- ^ 'kfedcS3BackupMode'+  -> Val Text -- ^ 'kfedcTypeName'+  -> KinesisFirehoseElasticsearchDestinationConfiguration+kinesisFirehoseElasticsearchDestinationConfiguration bufferingHintsarg domainARNarg indexNamearg indexRotationPeriodarg roleARNarg s3BackupModearg typeNamearg =+  KinesisFirehoseElasticsearchDestinationConfiguration+  { _kinesisFirehoseElasticsearchDestinationConfigurationBufferingHints = bufferingHintsarg+  , _kinesisFirehoseElasticsearchDestinationConfigurationCloudWatchLoggingOptions = Nothing+  , _kinesisFirehoseElasticsearchDestinationConfigurationDomainARN = domainARNarg+  , _kinesisFirehoseElasticsearchDestinationConfigurationIndexName = indexNamearg+  , _kinesisFirehoseElasticsearchDestinationConfigurationIndexRotationPeriod = indexRotationPeriodarg+  , _kinesisFirehoseElasticsearchDestinationConfigurationRetryOptions = Nothing+  , _kinesisFirehoseElasticsearchDestinationConfigurationRoleARN = roleARNarg+  , _kinesisFirehoseElasticsearchDestinationConfigurationS3BackupMode = s3BackupModearg+  , _kinesisFirehoseElasticsearchDestinationConfigurationS3Configuration = Nothing+  , _kinesisFirehoseElasticsearchDestinationConfigurationTypeName = typeNamearg+  }++-- | Configures how Firehose buffers incoming data while delivering it to the+-- Amazon ES domain.+kfedcBufferingHints :: Lens' KinesisFirehoseElasticsearchDestinationConfiguration KinesisFirehoseBufferingHints+kfedcBufferingHints = lens _kinesisFirehoseElasticsearchDestinationConfigurationBufferingHints (\s a -> s { _kinesisFirehoseElasticsearchDestinationConfigurationBufferingHints = a })++-- | The Amazon CloudWatch Logs logging options for the delivery stream.+kfedcCloudWatchLoggingOptions :: Lens' KinesisFirehoseElasticsearchDestinationConfiguration (Maybe KinesisFirehoseCloudWatchLoggingOptions)+kfedcCloudWatchLoggingOptions = lens _kinesisFirehoseElasticsearchDestinationConfigurationCloudWatchLoggingOptions (\s a -> s { _kinesisFirehoseElasticsearchDestinationConfigurationCloudWatchLoggingOptions = a })++-- | The Amazon Resource Name (ARN) of the Amazon ES domain that Firehose+-- delivers data to.+kfedcDomainARN :: Lens' KinesisFirehoseElasticsearchDestinationConfiguration (Val Text)+kfedcDomainARN = lens _kinesisFirehoseElasticsearchDestinationConfigurationDomainARN (\s a -> s { _kinesisFirehoseElasticsearchDestinationConfigurationDomainARN = a })++-- | The name of the Elasticsearch index to which Firehose adds data for+-- indexing.+kfedcIndexName :: Lens' KinesisFirehoseElasticsearchDestinationConfiguration (Val Text)+kfedcIndexName = lens _kinesisFirehoseElasticsearchDestinationConfigurationIndexName (\s a -> s { _kinesisFirehoseElasticsearchDestinationConfigurationIndexName = a })++-- | The frequency of Elasticsearch index rotation. If you enable index+-- rotation, Firehose appends a portion of the UTC arrival timestamp to the+-- specified index name, and rotates the appended timestamp accordingly. For+-- more information, see Index Rotation for the Amazon ES Destination in the+-- Amazon Kinesis Firehose Developer Guide.+kfedcIndexRotationPeriod :: Lens' KinesisFirehoseElasticsearchDestinationConfiguration (Val Text)+kfedcIndexRotationPeriod = lens _kinesisFirehoseElasticsearchDestinationConfigurationIndexRotationPeriod (\s a -> s { _kinesisFirehoseElasticsearchDestinationConfigurationIndexRotationPeriod = a })++-- | The retry behavior when Firehose is unable to deliver data to Amazon ES.+-- Type: Amazon Kinesis Firehose DeliveryStream+-- ElasticsearchDestinationConfiguration RetryOptions Type: String+kfedcRetryOptions :: Lens' KinesisFirehoseElasticsearchDestinationConfiguration (Maybe KinesisFirehoseElasticsearchRetryOptions)+kfedcRetryOptions = lens _kinesisFirehoseElasticsearchDestinationConfigurationRetryOptions (\s a -> s { _kinesisFirehoseElasticsearchDestinationConfigurationRetryOptions = a })++-- | The ARN of the AWS Identity and Access Management (IAM) role that grants+-- Firehose access to your S3 bucket, AWS KMS (if you enable data encryption),+-- and Amazon CloudWatch Logs (if you enable logging). For more information,+-- see Grant Firehose Access to an Amazon Elasticsearch Service Destination in+-- the Amazon Kinesis Firehose Developer Guide.+kfedcRoleARN :: Lens' KinesisFirehoseElasticsearchDestinationConfiguration (Val Text)+kfedcRoleARN = lens _kinesisFirehoseElasticsearchDestinationConfigurationRoleARN (\s a -> s { _kinesisFirehoseElasticsearchDestinationConfigurationRoleARN = a })++-- | The condition under which Firehose delivers data to Amazon Simple Storage+-- Service (Amazon S3). You can send Amazon S3 all documents (all data) or+-- only the documents that Firehose could not deliver to the Amazon ES+-- destination. For more information and valid values, see the S3BackupMode+-- content for the ElasticsearchDestinationConfiguration data type in the+-- Amazon Kinesis Firehose API Reference.+kfedcS3BackupMode :: Lens' KinesisFirehoseElasticsearchDestinationConfiguration KinesisFirehoseElasticsearchS3BackupMode+kfedcS3BackupMode = lens _kinesisFirehoseElasticsearchDestinationConfigurationS3BackupMode (\s a -> s { _kinesisFirehoseElasticsearchDestinationConfigurationS3BackupMode = a })++-- | The S3 bucket where Firehose backs up incoming data. Type: Amazon Kinesis+-- Firehose DeliveryStream S3DestinationConfiguration Type: String+kfedcS3Configuration :: Lens' KinesisFirehoseElasticsearchDestinationConfiguration (Maybe KinesisFirehoseS3DestinationConfiguration)+kfedcS3Configuration = lens _kinesisFirehoseElasticsearchDestinationConfigurationS3Configuration (\s a -> s { _kinesisFirehoseElasticsearchDestinationConfigurationS3Configuration = a })++-- | The Elasticsearch type name that Amazon ES adds to documents when+-- indexing data.+kfedcTypeName :: Lens' KinesisFirehoseElasticsearchDestinationConfiguration (Val Text)+kfedcTypeName = lens _kinesisFirehoseElasticsearchDestinationConfigurationTypeName (\s a -> s { _kinesisFirehoseElasticsearchDestinationConfigurationTypeName = a })
+ library-gen/Stratosphere/ResourceProperties/KinesisFirehoseElasticsearchRetryOptions.hs view
@@ -0,0 +1,51 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | RetryOptions is a property of the Amazon Kinesis Firehose DeliveryStream+-- ElasticsearchDestinationConfiguration property that configures the retry+-- behavior when Amazon Kinesis Firehose (Firehose) can't deliver data to+-- Amazon Elasticsearch Service (Amazon ES).++module Stratosphere.ResourceProperties.KinesisFirehoseElasticsearchRetryOptions where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for KinesisFirehoseElasticsearchRetryOptions.+-- See 'kinesisFirehoseElasticsearchRetryOptions' for a more convenient+-- constructor.+data KinesisFirehoseElasticsearchRetryOptions =+  KinesisFirehoseElasticsearchRetryOptions+  { _kinesisFirehoseElasticsearchRetryOptionsDurationInSeconds :: Val Integer'+  } deriving (Show, Generic)++instance ToJSON KinesisFirehoseElasticsearchRetryOptions where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 41, omitNothingFields = True }++instance FromJSON KinesisFirehoseElasticsearchRetryOptions where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 41, omitNothingFields = True }++-- | Constructor for 'KinesisFirehoseElasticsearchRetryOptions' containing+-- required fields as arguments.+kinesisFirehoseElasticsearchRetryOptions+  :: Val Integer' -- ^ 'kferoDurationInSeconds'+  -> KinesisFirehoseElasticsearchRetryOptions+kinesisFirehoseElasticsearchRetryOptions durationInSecondsarg =+  KinesisFirehoseElasticsearchRetryOptions+  { _kinesisFirehoseElasticsearchRetryOptionsDurationInSeconds = durationInSecondsarg+  }++-- | After an initial failure to deliver to Amazon ES, the total amount of+-- time during which Firehose re-attempts delivery (including the first+-- attempt). If Firehose can't deliver the data within the specified time, it+-- writes the data to the backup S3 bucket. For valid values, see the+-- DurationInSeconds content for the ElasticsearchRetryOptions data type in+-- the Amazon Kinesis Firehose API Reference.+kferoDurationInSeconds :: Lens' KinesisFirehoseElasticsearchRetryOptions (Val Integer')+kferoDurationInSeconds = lens _kinesisFirehoseElasticsearchRetryOptionsDurationInSeconds (\s a -> s { _kinesisFirehoseElasticsearchRetryOptionsDurationInSeconds = a })
+ library-gen/Stratosphere/ResourceProperties/KinesisFirehoseRedshiftCopyCommand.hs view
@@ -0,0 +1,60 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | CopyCommand is a property of the Amazon Kinesis Firehose DeliveryStream+-- RedshiftDestinationConfiguration property that configures the Amazon+-- Redshift COPY command that Amazon Kinesis Firehose (Firehose) uses to load+-- data into an Amazon Redshift cluster from an S3 bucket.++module Stratosphere.ResourceProperties.KinesisFirehoseRedshiftCopyCommand where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for KinesisFirehoseRedshiftCopyCommand. See+-- 'kinesisFirehoseRedshiftCopyCommand' for a more convenient constructor.+data KinesisFirehoseRedshiftCopyCommand =+  KinesisFirehoseRedshiftCopyCommand+  { _kinesisFirehoseRedshiftCopyCommandCopyOptions :: Maybe (Val Text)+  , _kinesisFirehoseRedshiftCopyCommandDataTableColumns :: Maybe (Val Text)+  , _kinesisFirehoseRedshiftCopyCommandDataTableName :: Val Text+  } deriving (Show, Generic)++instance ToJSON KinesisFirehoseRedshiftCopyCommand where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 35, omitNothingFields = True }++instance FromJSON KinesisFirehoseRedshiftCopyCommand where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 35, omitNothingFields = True }++-- | Constructor for 'KinesisFirehoseRedshiftCopyCommand' containing required+-- fields as arguments.+kinesisFirehoseRedshiftCopyCommand+  :: Val Text -- ^ 'kfrccDataTableName'+  -> KinesisFirehoseRedshiftCopyCommand+kinesisFirehoseRedshiftCopyCommand dataTableNamearg =+  KinesisFirehoseRedshiftCopyCommand+  { _kinesisFirehoseRedshiftCopyCommandCopyOptions = Nothing+  , _kinesisFirehoseRedshiftCopyCommandDataTableColumns = Nothing+  , _kinesisFirehoseRedshiftCopyCommandDataTableName = dataTableNamearg+  }++-- | Parameters to use with the Amazon Redshift COPY command. For examples,+-- see the CopyOptions content for the CopyCommand data type in the Amazon+-- Kinesis Firehose API Reference.+kfrccCopyOptions :: Lens' KinesisFirehoseRedshiftCopyCommand (Maybe (Val Text))+kfrccCopyOptions = lens _kinesisFirehoseRedshiftCopyCommandCopyOptions (\s a -> s { _kinesisFirehoseRedshiftCopyCommandCopyOptions = a })++-- | A comma-separated list of the column names in the table that Firehose+-- copies data to.+kfrccDataTableColumns :: Lens' KinesisFirehoseRedshiftCopyCommand (Maybe (Val Text))+kfrccDataTableColumns = lens _kinesisFirehoseRedshiftCopyCommandDataTableColumns (\s a -> s { _kinesisFirehoseRedshiftCopyCommandDataTableColumns = a })++-- | The name of the table where Firehose adds the copied data.+kfrccDataTableName :: Lens' KinesisFirehoseRedshiftCopyCommand (Val Text)+kfrccDataTableName = lens _kinesisFirehoseRedshiftCopyCommandDataTableName (\s a -> s { _kinesisFirehoseRedshiftCopyCommandDataTableName = a })
+ library-gen/Stratosphere/ResourceProperties/KinesisFirehoseRedshiftDestinationConfiguration.hs view
@@ -0,0 +1,101 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | RedshiftDestinationConfiguration is a property of the+-- AWS::KinesisFirehose::DeliveryStream resource that specifies an Amazon+-- Redshift cluster to which Amazon Kinesis Firehose (Firehose) delivers data.++module Stratosphere.ResourceProperties.KinesisFirehoseRedshiftDestinationConfiguration where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.KinesisFirehoseCloudWatchLoggingOptions+import Stratosphere.ResourceProperties.KinesisFirehoseRedshiftCopyCommand+import Stratosphere.ResourceProperties.KinesisFirehoseS3DestinationConfiguration++-- | Full data type definition for+-- KinesisFirehoseRedshiftDestinationConfiguration. See+-- 'kinesisFirehoseRedshiftDestinationConfiguration' for a more convenient+-- constructor.+data KinesisFirehoseRedshiftDestinationConfiguration =+  KinesisFirehoseRedshiftDestinationConfiguration+  { _kinesisFirehoseRedshiftDestinationConfigurationCloudWatchLoggingOptions :: Maybe KinesisFirehoseCloudWatchLoggingOptions+  , _kinesisFirehoseRedshiftDestinationConfigurationClusterJDBCURL :: Val Text+  , _kinesisFirehoseRedshiftDestinationConfigurationCopyCommand :: KinesisFirehoseRedshiftCopyCommand+  , _kinesisFirehoseRedshiftDestinationConfigurationPassword :: Val Text+  , _kinesisFirehoseRedshiftDestinationConfigurationRoleARN :: Val Text+  , _kinesisFirehoseRedshiftDestinationConfigurationS3Configuration :: KinesisFirehoseS3DestinationConfiguration+  , _kinesisFirehoseRedshiftDestinationConfigurationUsername :: Val Text+  } deriving (Show, Generic)++instance ToJSON KinesisFirehoseRedshiftDestinationConfiguration where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 48, omitNothingFields = True }++instance FromJSON KinesisFirehoseRedshiftDestinationConfiguration where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 48, omitNothingFields = True }++-- | Constructor for 'KinesisFirehoseRedshiftDestinationConfiguration'+-- containing required fields as arguments.+kinesisFirehoseRedshiftDestinationConfiguration+  :: Val Text -- ^ 'kfrdcClusterJDBCURL'+  -> KinesisFirehoseRedshiftCopyCommand -- ^ 'kfrdcCopyCommand'+  -> Val Text -- ^ 'kfrdcPassword'+  -> Val Text -- ^ 'kfrdcRoleARN'+  -> KinesisFirehoseS3DestinationConfiguration -- ^ 'kfrdcS3Configuration'+  -> Val Text -- ^ 'kfrdcUsername'+  -> KinesisFirehoseRedshiftDestinationConfiguration+kinesisFirehoseRedshiftDestinationConfiguration clusterJDBCURLarg copyCommandarg passwordarg roleARNarg s3Configurationarg usernamearg =+  KinesisFirehoseRedshiftDestinationConfiguration+  { _kinesisFirehoseRedshiftDestinationConfigurationCloudWatchLoggingOptions = Nothing+  , _kinesisFirehoseRedshiftDestinationConfigurationClusterJDBCURL = clusterJDBCURLarg+  , _kinesisFirehoseRedshiftDestinationConfigurationCopyCommand = copyCommandarg+  , _kinesisFirehoseRedshiftDestinationConfigurationPassword = passwordarg+  , _kinesisFirehoseRedshiftDestinationConfigurationRoleARN = roleARNarg+  , _kinesisFirehoseRedshiftDestinationConfigurationS3Configuration = s3Configurationarg+  , _kinesisFirehoseRedshiftDestinationConfigurationUsername = usernamearg+  }++-- | The Amazon CloudWatch Logs logging options for the delivery stream.+kfrdcCloudWatchLoggingOptions :: Lens' KinesisFirehoseRedshiftDestinationConfiguration (Maybe KinesisFirehoseCloudWatchLoggingOptions)+kfrdcCloudWatchLoggingOptions = lens _kinesisFirehoseRedshiftDestinationConfigurationCloudWatchLoggingOptions (\s a -> s { _kinesisFirehoseRedshiftDestinationConfigurationCloudWatchLoggingOptions = a })++-- | The connection string that Firehose uses to connect to the Amazon+-- Redshift cluster.+kfrdcClusterJDBCURL :: Lens' KinesisFirehoseRedshiftDestinationConfiguration (Val Text)+kfrdcClusterJDBCURL = lens _kinesisFirehoseRedshiftDestinationConfigurationClusterJDBCURL (\s a -> s { _kinesisFirehoseRedshiftDestinationConfigurationClusterJDBCURL = a })++-- | Configures the Amazon Redshift COPY command that Firehose uses to load+-- data into the cluster from the S3 bucket.+kfrdcCopyCommand :: Lens' KinesisFirehoseRedshiftDestinationConfiguration KinesisFirehoseRedshiftCopyCommand+kfrdcCopyCommand = lens _kinesisFirehoseRedshiftDestinationConfigurationCopyCommand (\s a -> s { _kinesisFirehoseRedshiftDestinationConfigurationCopyCommand = a })++-- | The password for the Amazon Redshift user that you specified in the+-- Username property.+kfrdcPassword :: Lens' KinesisFirehoseRedshiftDestinationConfiguration (Val Text)+kfrdcPassword = lens _kinesisFirehoseRedshiftDestinationConfigurationPassword (\s a -> s { _kinesisFirehoseRedshiftDestinationConfigurationPassword = a })++-- | The ARN of the AWS Identity and Access Management (IAM) role that grants+-- Firehose access to your S3 bucket and AWS KMS (if you enable data+-- encryption). For more information, see Grant Firehose Access to an Amazon+-- Redshift Destination in the Amazon Kinesis Firehose Developer Guide.+kfrdcRoleARN :: Lens' KinesisFirehoseRedshiftDestinationConfiguration (Val Text)+kfrdcRoleARN = lens _kinesisFirehoseRedshiftDestinationConfigurationRoleARN (\s a -> s { _kinesisFirehoseRedshiftDestinationConfigurationRoleARN = a })++-- | The S3 bucket where Firehose first delivers data. After the data is in+-- the bucket, Firehose uses the COPY command to load the data into the Amazon+-- Redshift cluster. For the S3 bucket's compression format, don't specify+-- SNAPPY or ZIP because the Amazon Redshift COPY command doesn't support+-- them.+kfrdcS3Configuration :: Lens' KinesisFirehoseRedshiftDestinationConfiguration KinesisFirehoseS3DestinationConfiguration+kfrdcS3Configuration = lens _kinesisFirehoseRedshiftDestinationConfigurationS3Configuration (\s a -> s { _kinesisFirehoseRedshiftDestinationConfigurationS3Configuration = a })++-- | The Amazon Redshift user that has permission to access the Amazon+-- Redshift cluster. This user must have INSERT privileges for copying data+-- from the S3 bucket to the cluster.+kfrdcUsername :: Lens' KinesisFirehoseRedshiftDestinationConfiguration (Val Text)+kfrdcUsername = lens _kinesisFirehoseRedshiftDestinationConfigurationUsername (\s a -> s { _kinesisFirehoseRedshiftDestinationConfigurationUsername = a })
+ library-gen/Stratosphere/ResourceProperties/KinesisFirehoseS3DestinationConfiguration.hs view
@@ -0,0 +1,101 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | S3DestinationConfiguration is a property of the+-- AWS::KinesisFirehose::DeliveryStream resource and the Amazon Kinesis+-- Firehose DeliveryStream ElasticsearchDestinationConfiguration and Amazon+-- Kinesis Firehose DeliveryStream RedshiftDestinationConfiguration properties+-- that specifies an Amazon Simple Storage Service (Amazon S3) destination to+-- which Amazon Kinesis Firehose (Firehose) delivers data.++module Stratosphere.ResourceProperties.KinesisFirehoseS3DestinationConfiguration where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.KinesisFirehoseBufferingHints+import Stratosphere.ResourceProperties.KinesisFirehoseCloudWatchLoggingOptions+import Stratosphere.ResourceProperties.KinesisFirehoseS3EncryptionConfiguration+import Stratosphere.Types++-- | Full data type definition for KinesisFirehoseS3DestinationConfiguration.+-- See 'kinesisFirehoseS3DestinationConfiguration' for a more convenient+-- constructor.+data KinesisFirehoseS3DestinationConfiguration =+  KinesisFirehoseS3DestinationConfiguration+  { _kinesisFirehoseS3DestinationConfigurationBucketARN :: Val Text+  , _kinesisFirehoseS3DestinationConfigurationBufferingHints :: KinesisFirehoseBufferingHints+  , _kinesisFirehoseS3DestinationConfigurationCloudWatchLoggingOptions :: Maybe KinesisFirehoseCloudWatchLoggingOptions+  , _kinesisFirehoseS3DestinationConfigurationCompressionFormat :: KinesisFirehoseS3CompressionFormat+  , _kinesisFirehoseS3DestinationConfigurationEncryptionConfiguration :: Maybe KinesisFirehoseS3EncryptionConfiguration+  , _kinesisFirehoseS3DestinationConfigurationPrefix :: Val Text+  , _kinesisFirehoseS3DestinationConfigurationRoleARN :: Val Text+  } deriving (Show, Generic)++instance ToJSON KinesisFirehoseS3DestinationConfiguration where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 42, omitNothingFields = True }++instance FromJSON KinesisFirehoseS3DestinationConfiguration where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 42, omitNothingFields = True }++-- | Constructor for 'KinesisFirehoseS3DestinationConfiguration' containing+-- required fields as arguments.+kinesisFirehoseS3DestinationConfiguration+  :: Val Text -- ^ 'kfsdcBucketARN'+  -> KinesisFirehoseBufferingHints -- ^ 'kfsdcBufferingHints'+  -> KinesisFirehoseS3CompressionFormat -- ^ 'kfsdcCompressionFormat'+  -> Val Text -- ^ 'kfsdcPrefix'+  -> Val Text -- ^ 'kfsdcRoleARN'+  -> KinesisFirehoseS3DestinationConfiguration+kinesisFirehoseS3DestinationConfiguration bucketARNarg bufferingHintsarg compressionFormatarg prefixarg roleARNarg =+  KinesisFirehoseS3DestinationConfiguration+  { _kinesisFirehoseS3DestinationConfigurationBucketARN = bucketARNarg+  , _kinesisFirehoseS3DestinationConfigurationBufferingHints = bufferingHintsarg+  , _kinesisFirehoseS3DestinationConfigurationCloudWatchLoggingOptions = Nothing+  , _kinesisFirehoseS3DestinationConfigurationCompressionFormat = compressionFormatarg+  , _kinesisFirehoseS3DestinationConfigurationEncryptionConfiguration = Nothing+  , _kinesisFirehoseS3DestinationConfigurationPrefix = prefixarg+  , _kinesisFirehoseS3DestinationConfigurationRoleARN = roleARNarg+  }++-- | The Amazon Resource Name (ARN) of the S3 bucket to send data to.+kfsdcBucketARN :: Lens' KinesisFirehoseS3DestinationConfiguration (Val Text)+kfsdcBucketARN = lens _kinesisFirehoseS3DestinationConfigurationBucketARN (\s a -> s { _kinesisFirehoseS3DestinationConfigurationBucketARN = a })++-- | Configures how Firehose buffers incoming data while delivering it to the+-- S3 bucket.+kfsdcBufferingHints :: Lens' KinesisFirehoseS3DestinationConfiguration KinesisFirehoseBufferingHints+kfsdcBufferingHints = lens _kinesisFirehoseS3DestinationConfigurationBufferingHints (\s a -> s { _kinesisFirehoseS3DestinationConfigurationBufferingHints = a })++-- | The Amazon CloudWatch Logs logging options for the delivery stream.+kfsdcCloudWatchLoggingOptions :: Lens' KinesisFirehoseS3DestinationConfiguration (Maybe KinesisFirehoseCloudWatchLoggingOptions)+kfsdcCloudWatchLoggingOptions = lens _kinesisFirehoseS3DestinationConfigurationCloudWatchLoggingOptions (\s a -> s { _kinesisFirehoseS3DestinationConfigurationCloudWatchLoggingOptions = a })++-- | The type of compression that Firehose uses to compress the data that it+-- delivers to the S3 bucket. For valid values, see the CompressionFormat+-- content for the S3DestinationConfiguration data type in the Amazon Kinesis+-- Firehose API Reference.+kfsdcCompressionFormat :: Lens' KinesisFirehoseS3DestinationConfiguration KinesisFirehoseS3CompressionFormat+kfsdcCompressionFormat = lens _kinesisFirehoseS3DestinationConfigurationCompressionFormat (\s a -> s { _kinesisFirehoseS3DestinationConfigurationCompressionFormat = a })++-- | Configures Amazon Simple Storage Service (Amazon S3) server-side+-- encryption. Firehose uses AWS Key Management Service (AWS KMS) to encrypt+-- the data that it delivers to your S3 bucket.+kfsdcEncryptionConfiguration :: Lens' KinesisFirehoseS3DestinationConfiguration (Maybe KinesisFirehoseS3EncryptionConfiguration)+kfsdcEncryptionConfiguration = lens _kinesisFirehoseS3DestinationConfigurationEncryptionConfiguration (\s a -> s { _kinesisFirehoseS3DestinationConfigurationEncryptionConfiguration = a })++-- | A prefix that Firehose adds to the files that it delivers to the S3+-- bucket. The prefix helps you identify the files that Firehose delivered.+kfsdcPrefix :: Lens' KinesisFirehoseS3DestinationConfiguration (Val Text)+kfsdcPrefix = lens _kinesisFirehoseS3DestinationConfigurationPrefix (\s a -> s { _kinesisFirehoseS3DestinationConfigurationPrefix = a })++-- | The ARN of an AWS Identity and Access Management (IAM) role that grants+-- Firehose access to your S3 bucket and AWS KMS (if you enable data+-- encryption). For more information, see Grant Firehose Access to an Amazon+-- S3 Destination in the Amazon Kinesis Firehose Developer Guide.+kfsdcRoleARN :: Lens' KinesisFirehoseS3DestinationConfiguration (Val Text)+kfsdcRoleARN = lens _kinesisFirehoseS3DestinationConfigurationRoleARN (\s a -> s { _kinesisFirehoseS3DestinationConfigurationRoleARN = a })
+ library-gen/Stratosphere/ResourceProperties/KinesisFirehoseS3EncryptionConfiguration.hs view
@@ -0,0 +1,55 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | EncryptionConfiguration is a property of the Amazon Kinesis Firehose+-- DeliveryStream S3DestinationConfiguration property that specifies the+-- encryption settings that Amazon Kinesis Firehose (Firehose) uses when+-- delivering data to Amazon Simple Storage Service (Amazon S3).++module Stratosphere.ResourceProperties.KinesisFirehoseS3EncryptionConfiguration where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.KinesisFirehoseS3KMSEncryptionConfig+import Stratosphere.Types++-- | Full data type definition for KinesisFirehoseS3EncryptionConfiguration.+-- See 'kinesisFirehoseS3EncryptionConfiguration' for a more convenient+-- constructor.+data KinesisFirehoseS3EncryptionConfiguration =+  KinesisFirehoseS3EncryptionConfiguration+  { _kinesisFirehoseS3EncryptionConfigurationKMSEncryptionConfig :: Maybe KinesisFirehoseS3KMSEncryptionConfig+  , _kinesisFirehoseS3EncryptionConfigurationNoEncryptionConfig :: Maybe KinesisFirehoseNoEncryptionConfig+  } deriving (Show, Generic)++instance ToJSON KinesisFirehoseS3EncryptionConfiguration where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 41, omitNothingFields = True }++instance FromJSON KinesisFirehoseS3EncryptionConfiguration where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 41, omitNothingFields = True }++-- | Constructor for 'KinesisFirehoseS3EncryptionConfiguration' containing+-- required fields as arguments.+kinesisFirehoseS3EncryptionConfiguration+  :: KinesisFirehoseS3EncryptionConfiguration+kinesisFirehoseS3EncryptionConfiguration  =+  KinesisFirehoseS3EncryptionConfiguration+  { _kinesisFirehoseS3EncryptionConfigurationKMSEncryptionConfig = Nothing+  , _kinesisFirehoseS3EncryptionConfigurationNoEncryptionConfig = Nothing+  }++-- | The AWS Key Management Service (AWS KMS) encryption key that Amazon S3+-- uses to encrypt your data.+kfsecKMSEncryptionConfig :: Lens' KinesisFirehoseS3EncryptionConfiguration (Maybe KinesisFirehoseS3KMSEncryptionConfig)+kfsecKMSEncryptionConfig = lens _kinesisFirehoseS3EncryptionConfigurationKMSEncryptionConfig (\s a -> s { _kinesisFirehoseS3EncryptionConfigurationKMSEncryptionConfig = a })++-- | Disables encryption. For valid values, see the NoEncryptionConfig content+-- for the EncryptionConfiguration data type in the Amazon Kinesis Firehose+-- API Reference.+kfsecNoEncryptionConfig :: Lens' KinesisFirehoseS3EncryptionConfiguration (Maybe KinesisFirehoseNoEncryptionConfig)+kfsecNoEncryptionConfig = lens _kinesisFirehoseS3EncryptionConfigurationNoEncryptionConfig (\s a -> s { _kinesisFirehoseS3EncryptionConfigurationNoEncryptionConfig = a })
+ library-gen/Stratosphere/ResourceProperties/KinesisFirehoseS3KMSEncryptionConfig.hs view
@@ -0,0 +1,48 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | KMSEncryptionConfig is a property of the Amazon Kinesis Firehose+-- DeliveryStream S3DestinationConfiguration EncryptionConfiguration property+-- that specifies the AWS Key Management Service (AWS KMS) encryption key that+-- Amazon Simple Storage Service (Amazon S3) uses to encrypt data delivered by+-- the Amazon Kinesis Firehose (Firehose) stream.++module Stratosphere.ResourceProperties.KinesisFirehoseS3KMSEncryptionConfig where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for KinesisFirehoseS3KMSEncryptionConfig. See+-- 'kinesisFirehoseS3KMSEncryptionConfig' for a more convenient constructor.+data KinesisFirehoseS3KMSEncryptionConfig =+  KinesisFirehoseS3KMSEncryptionConfig+  { _kinesisFirehoseS3KMSEncryptionConfigAWSKMSKeyARN :: Val Text+  } deriving (Show, Generic)++instance ToJSON KinesisFirehoseS3KMSEncryptionConfig where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 37, omitNothingFields = True }++instance FromJSON KinesisFirehoseS3KMSEncryptionConfig where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 37, omitNothingFields = True }++-- | Constructor for 'KinesisFirehoseS3KMSEncryptionConfig' containing+-- required fields as arguments.+kinesisFirehoseS3KMSEncryptionConfig+  :: Val Text -- ^ 'kfskmsecAWSKMSKeyARN'+  -> KinesisFirehoseS3KMSEncryptionConfig+kinesisFirehoseS3KMSEncryptionConfig aWSKMSKeyARNarg =+  KinesisFirehoseS3KMSEncryptionConfig+  { _kinesisFirehoseS3KMSEncryptionConfigAWSKMSKeyARN = aWSKMSKeyARNarg+  }++-- | The Amazon Resource Name (ARN) of the AWS KMS encryption key that Amazon+-- S3 uses to encrypt data delivered by the Firehose stream. The key must+-- belong to the same region as the destination S3 bucket.+kfskmsecAWSKMSKeyARN :: Lens' KinesisFirehoseS3KMSEncryptionConfig (Val Text)+kfskmsecAWSKMSKeyARN = lens _kinesisFirehoseS3KMSEncryptionConfigAWSKMSKeyARN (\s a -> s { _kinesisFirehoseS3KMSEncryptionConfigAWSKMSKeyARN = a })
+ library-gen/Stratosphere/ResourceProperties/LambdaFunctionCode.hs view
@@ -0,0 +1,79 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | Code is a property of the AWS::Lambda::Function resource that enables you+-- to specify the source code of an AWS Lambda (Lambda) function. Source code+-- can be located in a file in an S3 bucket. For nodejs, nodejs4.3, and+-- python2.7 runtime environments only, you can provide source code as inline+-- text.++module Stratosphere.ResourceProperties.LambdaFunctionCode where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for LambdaFunctionCode. See+-- 'lambdaFunctionCode' for a more convenient constructor.+data LambdaFunctionCode =+  LambdaFunctionCode+  { _lambdaFunctionCodeS3Bucket :: Maybe (Val Text)+  , _lambdaFunctionCodeS3Key :: Maybe (Val Text)+  , _lambdaFunctionCodeS3ObjectVersion :: Maybe (Val Text)+  , _lambdaFunctionCodeZipFile :: Maybe (Val Text)+  } deriving (Show, Generic)++instance ToJSON LambdaFunctionCode where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 19, omitNothingFields = True }++instance FromJSON LambdaFunctionCode where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 19, omitNothingFields = True }++-- | Constructor for 'LambdaFunctionCode' containing required fields as+-- arguments.+lambdaFunctionCode+  :: LambdaFunctionCode+lambdaFunctionCode  =+  LambdaFunctionCode+  { _lambdaFunctionCodeS3Bucket = Nothing+  , _lambdaFunctionCodeS3Key = Nothing+  , _lambdaFunctionCodeS3ObjectVersion = Nothing+  , _lambdaFunctionCodeZipFile = Nothing+  }++-- | The name of the S3 bucket that contains the source code of your Lambda+-- function. The S3 bucket must be in the same region as the stack. Note The+-- cfn-response module isn't available for source code stored in S3 buckets.+-- You must write your own functions to send responses.+lfcS3Bucket :: Lens' LambdaFunctionCode (Maybe (Val Text))+lfcS3Bucket = lens _lambdaFunctionCodeS3Bucket (\s a -> s { _lambdaFunctionCodeS3Bucket = a })++-- | The location and name of the .zip file that contains your source code. If+-- you specify this property, you must also specify the S3Bucket property.+lfcS3Key :: Lens' LambdaFunctionCode (Maybe (Val Text))+lfcS3Key = lens _lambdaFunctionCodeS3Key (\s a -> s { _lambdaFunctionCodeS3Key = a })++-- | If you have S3 versioning enabled, the version ID of the.zip file that+-- contains your source code. You can specify this property only if you+-- specify the S3Bucket and S3Key properties.+lfcS3ObjectVersion :: Lens' LambdaFunctionCode (Maybe (Val Text))+lfcS3ObjectVersion = lens _lambdaFunctionCodeS3ObjectVersion (\s a -> s { _lambdaFunctionCodeS3ObjectVersion = a })++-- | For nodejs, nodejs4.3, and python2.7 runtime environments, the source+-- code of your Lambda function. You can't use this property with other+-- runtime environments. You can specify up to 4096 characters. You must+-- precede certain special characters in your source code, such as quotation+-- marks ("), newlines (\n), and tabs (\t), with a backslash (\). For a list+-- of special characters, see http://json.org/. If you specify a function that+-- interacts with an AWS CloudFormation custom resource, you don't have to+-- write your own functions to send responses to the custom resource that+-- invoked the function. AWS CloudFormation provides a response module that+-- simplifies sending responses. For more information, see cfn-response+-- Module.+lfcZipFile :: Lens' LambdaFunctionCode (Maybe (Val Text))+lfcZipFile = lens _lambdaFunctionCodeZipFile (\s a -> s { _lambdaFunctionCodeZipFile = a })
+ library-gen/Stratosphere/ResourceProperties/LambdaFunctionVPCConfig.hs view
@@ -0,0 +1,54 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | VpcConfig is a property of the AWS::Lambda::Function resource that+-- enables to your AWS Lambda (Lambda) function to access resources in a VPC.+-- For more information, see Configuring a Lambda Function to Access Resources+-- in an Amazon VPC in the AWS Lambda Developer Guide.++module Stratosphere.ResourceProperties.LambdaFunctionVPCConfig where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for LambdaFunctionVPCConfig. See+-- 'lambdaFunctionVPCConfig' for a more convenient constructor.+data LambdaFunctionVPCConfig =+  LambdaFunctionVPCConfig+  { _lambdaFunctionVPCConfigSecurityGroupIds :: [Val Text]+  , _lambdaFunctionVPCConfigSubnetIds :: [Val Text]+  } deriving (Show, Generic)++instance ToJSON LambdaFunctionVPCConfig where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 24, omitNothingFields = True }++instance FromJSON LambdaFunctionVPCConfig where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 24, omitNothingFields = True }++-- | Constructor for 'LambdaFunctionVPCConfig' containing required fields as+-- arguments.+lambdaFunctionVPCConfig+  :: [Val Text] -- ^ 'lfvpccSecurityGroupIds'+  -> [Val Text] -- ^ 'lfvpccSubnetIds'+  -> LambdaFunctionVPCConfig+lambdaFunctionVPCConfig securityGroupIdsarg subnetIdsarg =+  LambdaFunctionVPCConfig+  { _lambdaFunctionVPCConfigSecurityGroupIds = securityGroupIdsarg+  , _lambdaFunctionVPCConfigSubnetIds = subnetIdsarg+  }++-- | A list of one or more security groups IDs in the VPC that includes the+-- resources to which your Lambda function requires access.+lfvpccSecurityGroupIds :: Lens' LambdaFunctionVPCConfig [Val Text]+lfvpccSecurityGroupIds = lens _lambdaFunctionVPCConfigSecurityGroupIds (\s a -> s { _lambdaFunctionVPCConfigSecurityGroupIds = a })++-- | A list of one or more subnet IDs in the VPC that includes the resources+-- to which your Lambda function requires access.+lfvpccSubnetIds :: Lens' LambdaFunctionVPCConfig [Val Text]+lfvpccSubnetIds = lens _lambdaFunctionVPCConfigSubnetIds (\s a -> s { _lambdaFunctionVPCConfigSubnetIds = a })
library-gen/Stratosphere/Resources.hs view
@@ -41,13 +41,24 @@ import GHC.Generics (Generic)  import Stratosphere.Resources.AccessKey as X+import Stratosphere.Resources.ApiGatewayAccount as X+import Stratosphere.Resources.ApiGatewayDeployment as X+import Stratosphere.Resources.ApiGatewayMethod as X+import Stratosphere.Resources.ApiGatewayModel as X+import Stratosphere.Resources.ApiGatewayResource as X+import Stratosphere.Resources.ApiGatewayRestApi as X+import Stratosphere.Resources.ApiGatewayStage as X+import Stratosphere.Resources.ApiGatewayUsagePlan as X import Stratosphere.Resources.AutoScalingGroup as X import Stratosphere.Resources.Bucket as X+import Stratosphere.Resources.CacheCluster as X+import Stratosphere.Resources.CacheSubnetGroup as X import Stratosphere.Resources.DBInstance as X import Stratosphere.Resources.DBParameterGroup as X import Stratosphere.Resources.DBSecurityGroup as X import Stratosphere.Resources.DBSecurityGroupIngress as X import Stratosphere.Resources.DBSubnetGroup as X+import Stratosphere.Resources.DeliveryStream as X import Stratosphere.Resources.EC2Instance as X import Stratosphere.Resources.EIP as X import Stratosphere.Resources.EIPAssociation as X@@ -55,9 +66,14 @@ import Stratosphere.Resources.IAMRole as X import Stratosphere.Resources.InstanceProfile as X import Stratosphere.Resources.InternetGateway as X+import Stratosphere.Resources.KinesisStream as X+import Stratosphere.Resources.LambdaFunction as X+import Stratosphere.Resources.LambdaPermission as X import Stratosphere.Resources.LaunchConfiguration as X import Stratosphere.Resources.LifecycleHook as X import Stratosphere.Resources.LoadBalancer as X+import Stratosphere.Resources.LogGroup as X+import Stratosphere.Resources.LogStream as X import Stratosphere.Resources.ManagedPolicy as X import Stratosphere.Resources.NatGateway as X import Stratosphere.Resources.Policy as X@@ -83,8 +99,18 @@ import Stratosphere.Resources.Volume as X import Stratosphere.Resources.VolumeAttachment as X +import Stratosphere.ResourceProperties.APIGatewayDeploymentStageDescription as X+import Stratosphere.ResourceProperties.APIGatewayDeploymentStageDescriptionMethodSetting as X import Stratosphere.ResourceProperties.AccessLoggingPolicy as X import Stratosphere.ResourceProperties.AliasTarget as X+import Stratosphere.ResourceProperties.ApiGatewayIntegration as X+import Stratosphere.ResourceProperties.ApiGatewayIntegrationResponse as X+import Stratosphere.ResourceProperties.ApiGatewayMethodResponse as X+import Stratosphere.ResourceProperties.ApiGatewayRestApiS3Location as X+import Stratosphere.ResourceProperties.ApiGatewayStageMethodSetting as X+import Stratosphere.ResourceProperties.ApiGatewayUsagePlanApiStage as X+import Stratosphere.ResourceProperties.ApiGatewayUsagePlanQuotaSettings as X+import Stratosphere.ResourceProperties.ApiGatewayUsagePlanThrottleSettings as X import Stratosphere.ResourceProperties.AppCookieStickinessPolicy as X import Stratosphere.ResourceProperties.AutoScalingBlockDeviceMapping as X import Stratosphere.ResourceProperties.AutoScalingEBSBlockDevice as X@@ -101,7 +127,18 @@ import Stratosphere.ResourceProperties.ELBPolicy as X import Stratosphere.ResourceProperties.HealthCheck as X import Stratosphere.ResourceProperties.IAMPolicies as X+import Stratosphere.ResourceProperties.KinesisFirehoseBufferingHints as X+import Stratosphere.ResourceProperties.KinesisFirehoseCloudWatchLoggingOptions as X+import Stratosphere.ResourceProperties.KinesisFirehoseElasticsearchDestinationConfiguration as X+import Stratosphere.ResourceProperties.KinesisFirehoseElasticsearchRetryOptions as X+import Stratosphere.ResourceProperties.KinesisFirehoseRedshiftCopyCommand as X+import Stratosphere.ResourceProperties.KinesisFirehoseRedshiftDestinationConfiguration as X+import Stratosphere.ResourceProperties.KinesisFirehoseS3DestinationConfiguration as X+import Stratosphere.ResourceProperties.KinesisFirehoseS3EncryptionConfiguration as X+import Stratosphere.ResourceProperties.KinesisFirehoseS3KMSEncryptionConfig as X import Stratosphere.ResourceProperties.LBCookieStickinessPolicy as X+import Stratosphere.ResourceProperties.LambdaFunctionCode as X+import Stratosphere.ResourceProperties.LambdaFunctionVPCConfig as X import Stratosphere.ResourceProperties.ListenerProperty as X import Stratosphere.ResourceProperties.NameValuePair as X import Stratosphere.ResourceProperties.NetworkInterface as X@@ -149,13 +186,24 @@  data ResourceProperties   = AccessKeyProperties AccessKey+  | ApiGatewayAccountProperties ApiGatewayAccount+  | ApiGatewayDeploymentProperties ApiGatewayDeployment+  | ApiGatewayMethodProperties ApiGatewayMethod+  | ApiGatewayModelProperties ApiGatewayModel+  | ApiGatewayResourceProperties ApiGatewayResource+  | ApiGatewayRestApiProperties ApiGatewayRestApi+  | ApiGatewayStageProperties ApiGatewayStage+  | ApiGatewayUsagePlanProperties ApiGatewayUsagePlan   | AutoScalingGroupProperties AutoScalingGroup   | BucketProperties Bucket+  | CacheClusterProperties CacheCluster+  | CacheSubnetGroupProperties CacheSubnetGroup   | DBInstanceProperties DBInstance   | DBParameterGroupProperties DBParameterGroup   | DBSecurityGroupProperties DBSecurityGroup   | DBSecurityGroupIngressProperties DBSecurityGroupIngress   | DBSubnetGroupProperties DBSubnetGroup+  | DeliveryStreamProperties DeliveryStream   | EC2InstanceProperties EC2Instance   | EIPProperties EIP   | EIPAssociationProperties EIPAssociation@@ -163,9 +211,14 @@   | IAMRoleProperties IAMRole   | InstanceProfileProperties InstanceProfile   | InternetGatewayProperties InternetGateway+  | KinesisStreamProperties KinesisStream+  | LambdaFunctionProperties LambdaFunction+  | LambdaPermissionProperties LambdaPermission   | LaunchConfigurationProperties LaunchConfiguration   | LifecycleHookProperties LifecycleHook   | LoadBalancerProperties LoadBalancer+  | LogGroupProperties LogGroup+  | LogStreamProperties LogStream   | ManagedPolicyProperties ManagedPolicy   | NatGatewayProperties NatGateway   | PolicyProperties Policy@@ -209,7 +262,7 @@   , resourceDeletionPolicy :: Maybe DeletionPolicy   , resourceResCreationPolicy :: Maybe CreationPolicy   , resourceResUpdatePolicy :: Maybe UpdatePolicy-  , resourceDependsOn :: Maybe [Val T.Text]+  , resourceDependsOn :: Maybe [T.Text]   } deriving (Show)  instance ToRef Resource b where@@ -244,10 +297,30 @@ resourcePropertiesJSON :: ResourceProperties -> [Pair] resourcePropertiesJSON (AccessKeyProperties x) =   [ "Type" .= ("AWS::IAM::AccessKey" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (ApiGatewayAccountProperties x) =+  [ "Type" .= ("Api::Gateway::Account" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (ApiGatewayDeploymentProperties x) =+  [ "Type" .= ("AWS::ApiGateway::Deployment" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (ApiGatewayMethodProperties x) =+  [ "Type" .= ("AWS::ApiGateway::Method" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (ApiGatewayModelProperties x) =+  [ "Type" .= ("AWS::ApiGateway::Model" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (ApiGatewayResourceProperties x) =+  [ "Type" .= ("AWS::ApiGateway::Resource" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (ApiGatewayRestApiProperties x) =+  [ "Type" .= ("AWS::ApiGateway::RestApi" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (ApiGatewayStageProperties x) =+  [ "Type" .= ("AWS::ApiGateway::Stage" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (ApiGatewayUsagePlanProperties x) =+  [ "Type" .= ("AWS::ApiGateway::UsagePlan" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (AutoScalingGroupProperties x) =   [ "Type" .= ("AWS::AutoScaling::AutoScalingGroup" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (BucketProperties x) =   [ "Type" .= ("AWS::S3::Bucket" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (CacheClusterProperties x) =+  [ "Type" .= ("AWS::ElastiCache::CacheCluster" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (CacheSubnetGroupProperties x) =+  [ "Type" .= ("AWS::ElastiCache::SubnetGroup" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (DBInstanceProperties x) =   [ "Type" .= ("AWS::RDS::DBInstance" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (DBParameterGroupProperties x) =@@ -258,6 +331,8 @@   [ "Type" .= ("AWS::RDS::DBSecurityGroupIngress" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (DBSubnetGroupProperties x) =   [ "Type" .= ("AWS::RDS::DBSubnetGroup" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (DeliveryStreamProperties x) =+  [ "Type" .= ("AWS::KinesisFirehose::DeliveryStream" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (EC2InstanceProperties x) =   [ "Type" .= ("AWS::EC2::Instance" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (EIPProperties x) =@@ -272,12 +347,22 @@   [ "Type" .= ("AWS::IAM::InstanceProfile" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (InternetGatewayProperties x) =   [ "Type" .= ("AWS::EC2::InternetGateway" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (KinesisStreamProperties x) =+  [ "Type" .= ("AWS::Kinesis::Stream" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (LambdaFunctionProperties x) =+  [ "Type" .= ("AWS::Lambda::Function" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (LambdaPermissionProperties x) =+  [ "Type" .= ("AWS::Lambda::Permission" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (LaunchConfigurationProperties x) =   [ "Type" .= ("AWS::AutoScaling::LaunchConfiguration" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (LifecycleHookProperties x) =   [ "Type" .= ("AWS::AutoScaling::LifecycleHook" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (LoadBalancerProperties x) =   [ "Type" .= ("AWS::ElasticLoadBalancing::LoadBalancer" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (LogGroupProperties x) =+  [ "Type" .= ("AWS::Logs::LogGroup" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (LogStreamProperties x) =+  [ "Type" .= ("AWS::Logs::LogStream" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (ManagedPolicyProperties x) =   [ "Type" .= ("AWS::IAM::ManagedPolicy" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (NatGatewayProperties x) =@@ -333,13 +418,24 @@     do type' <- o .: "Type" :: Parser String        props <- case type' of          "AWS::IAM::AccessKey" -> AccessKeyProperties <$> (o .: "Properties")+         "Api::Gateway::Account" -> ApiGatewayAccountProperties <$> (o .: "Properties")+         "AWS::ApiGateway::Deployment" -> ApiGatewayDeploymentProperties <$> (o .: "Properties")+         "AWS::ApiGateway::Method" -> ApiGatewayMethodProperties <$> (o .: "Properties")+         "AWS::ApiGateway::Model" -> ApiGatewayModelProperties <$> (o .: "Properties")+         "AWS::ApiGateway::Resource" -> ApiGatewayResourceProperties <$> (o .: "Properties")+         "AWS::ApiGateway::RestApi" -> ApiGatewayRestApiProperties <$> (o .: "Properties")+         "AWS::ApiGateway::Stage" -> ApiGatewayStageProperties <$> (o .: "Properties")+         "AWS::ApiGateway::UsagePlan" -> ApiGatewayUsagePlanProperties <$> (o .: "Properties")          "AWS::AutoScaling::AutoScalingGroup" -> AutoScalingGroupProperties <$> (o .: "Properties")          "AWS::S3::Bucket" -> BucketProperties <$> (o .: "Properties")+         "AWS::ElastiCache::CacheCluster" -> CacheClusterProperties <$> (o .: "Properties")+         "AWS::ElastiCache::SubnetGroup" -> CacheSubnetGroupProperties <$> (o .: "Properties")          "AWS::RDS::DBInstance" -> DBInstanceProperties <$> (o .: "Properties")          "AWS::RDS::DBParameterGroup" -> DBParameterGroupProperties <$> (o .: "Properties")          "AWS::RDS::DBSecurityGroup" -> DBSecurityGroupProperties <$> (o .: "Properties")          "AWS::RDS::DBSecurityGroupIngress" -> DBSecurityGroupIngressProperties <$> (o .: "Properties")          "AWS::RDS::DBSubnetGroup" -> DBSubnetGroupProperties <$> (o .: "Properties")+         "AWS::KinesisFirehose::DeliveryStream" -> DeliveryStreamProperties <$> (o .: "Properties")          "AWS::EC2::Instance" -> EC2InstanceProperties <$> (o .: "Properties")          "AWS::EC2::EIP" -> EIPProperties <$> (o .: "Properties")          "AWS::EC2::EIPAssociation" -> EIPAssociationProperties <$> (o .: "Properties")@@ -347,9 +443,14 @@          "AWS::IAM::Role" -> IAMRoleProperties <$> (o .: "Properties")          "AWS::IAM::InstanceProfile" -> InstanceProfileProperties <$> (o .: "Properties")          "AWS::EC2::InternetGateway" -> InternetGatewayProperties <$> (o .: "Properties")+         "AWS::Kinesis::Stream" -> KinesisStreamProperties <$> (o .: "Properties")+         "AWS::Lambda::Function" -> LambdaFunctionProperties <$> (o .: "Properties")+         "AWS::Lambda::Permission" -> LambdaPermissionProperties <$> (o .: "Properties")          "AWS::AutoScaling::LaunchConfiguration" -> LaunchConfigurationProperties <$> (o .: "Properties")          "AWS::AutoScaling::LifecycleHook" -> LifecycleHookProperties <$> (o .: "Properties")          "AWS::ElasticLoadBalancing::LoadBalancer" -> LoadBalancerProperties <$> (o .: "Properties")+         "AWS::Logs::LogGroup" -> LogGroupProperties <$> (o .: "Properties")+         "AWS::Logs::LogStream" -> LogStreamProperties <$> (o .: "Properties")          "AWS::IAM::ManagedPolicy" -> ManagedPolicyProperties <$> (o .: "Properties")          "AWS::EC2::NatGateway" -> NatGatewayProperties <$> (o .: "Properties")          "AWS::IAM::Policy" -> PolicyProperties <$> (o .: "Properties")
+ library-gen/Stratosphere/Resources/ApiGatewayAccount.hs view
@@ -0,0 +1,44 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::ApiGateway::Account resource specifies the AWS Identity and+-- Access Management (IAM) role that Amazon API Gateway (API Gateway) uses to+-- write API logs to Amazon CloudWatch Logs (CloudWatch Logs).++module Stratosphere.Resources.ApiGatewayAccount where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for ApiGatewayAccount. See 'apiGatewayAccount'+-- for a more convenient constructor.+data ApiGatewayAccount =+  ApiGatewayAccount+  { _apiGatewayAccountCloudWatchRoleArn :: Maybe (Val Text)+  } deriving (Show, Generic)++instance ToJSON ApiGatewayAccount where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 18, omitNothingFields = True }++instance FromJSON ApiGatewayAccount where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 18, omitNothingFields = True }++-- | Constructor for 'ApiGatewayAccount' containing required fields as+-- arguments.+apiGatewayAccount+  :: ApiGatewayAccount+apiGatewayAccount  =+  ApiGatewayAccount+  { _apiGatewayAccountCloudWatchRoleArn = Nothing+  }++-- | The Amazon Resource Name (ARN) of an IAM role that has write access to+-- CloudWatch Logs in your account.+agaCloudWatchRoleArn :: Lens' ApiGatewayAccount (Maybe (Val Text))+agaCloudWatchRoleArn = lens _apiGatewayAccountCloudWatchRoleArn (\s a -> s { _apiGatewayAccountCloudWatchRoleArn = a })
+ library-gen/Stratosphere/Resources/ApiGatewayDeployment.hs view
@@ -0,0 +1,63 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::ApiGateway::Deployment resource deploys an Amazon API Gateway+-- (API Gateway) RestApi resource to a stage so that clients can call the API+-- over the Internet. The stage acts as an environment.++module Stratosphere.Resources.ApiGatewayDeployment where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.APIGatewayDeploymentStageDescription++-- | Full data type definition for ApiGatewayDeployment. See+-- 'apiGatewayDeployment' for a more convenient constructor.+data ApiGatewayDeployment =+  ApiGatewayDeployment+  { _apiGatewayDeploymentDescription :: Maybe (Val Text)+  , _apiGatewayDeploymentRestApiId :: Val Text+  , _apiGatewayDeploymentStageDescription :: Maybe APIGatewayDeploymentStageDescription+  , _apiGatewayDeploymentStageName :: Maybe (Val Text)+  } deriving (Show, Generic)++instance ToJSON ApiGatewayDeployment where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 21, omitNothingFields = True }++instance FromJSON ApiGatewayDeployment where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 21, omitNothingFields = True }++-- | Constructor for 'ApiGatewayDeployment' containing required fields as+-- arguments.+apiGatewayDeployment+  :: Val Text -- ^ 'agdRestApiId'+  -> ApiGatewayDeployment+apiGatewayDeployment restApiIdarg =+  ApiGatewayDeployment+  { _apiGatewayDeploymentDescription = Nothing+  , _apiGatewayDeploymentRestApiId = restApiIdarg+  , _apiGatewayDeploymentStageDescription = Nothing+  , _apiGatewayDeploymentStageName = Nothing+  }++-- | A description of the purpose of the API Gateway deployment.+agdDescription :: Lens' ApiGatewayDeployment (Maybe (Val Text))+agdDescription = lens _apiGatewayDeploymentDescription (\s a -> s { _apiGatewayDeploymentDescription = a })++-- | The ID of the RestApi resource to deploy.+agdRestApiId :: Lens' ApiGatewayDeployment (Val Text)+agdRestApiId = lens _apiGatewayDeploymentRestApiId (\s a -> s { _apiGatewayDeploymentRestApiId = a })++-- | Configures the stage that API Gateway creates with this deployment.+agdStageDescription :: Lens' ApiGatewayDeployment (Maybe APIGatewayDeploymentStageDescription)+agdStageDescription = lens _apiGatewayDeploymentStageDescription (\s a -> s { _apiGatewayDeploymentStageDescription = a })++-- | A name for the stage that API Gateway creates with this deployment. Use+-- only alphanumeric characters.+agdStageName :: Lens' ApiGatewayDeployment (Maybe (Val Text))+agdStageName = lens _apiGatewayDeploymentStageName (\s a -> s { _apiGatewayDeploymentStageName = a })
+ library-gen/Stratosphere/Resources/ApiGatewayMethod.hs view
@@ -0,0 +1,112 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::ApiGateway::Method resource creates Amazon API Gateway (API+-- Gateway) methods that define the parameters and body that clients must send+-- in their requests.++module Stratosphere.Resources.ApiGatewayMethod where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.ApiGatewayIntegration+import Stratosphere.ResourceProperties.ApiGatewayMethodResponse++-- | Full data type definition for ApiGatewayMethod. See 'apiGatewayMethod'+-- for a more convenient constructor.+data ApiGatewayMethod =+  ApiGatewayMethod+  { _apiGatewayMethodApiKeyRequired :: Maybe (Val Bool')+  , _apiGatewayMethodAuthorizationType :: Val Text+  , _apiGatewayMethodAuthorizerId :: Maybe (Val Text)+  , _apiGatewayMethodHttpMethod :: Val Text+  , _apiGatewayMethodIntegration :: Maybe ApiGatewayIntegration+  , _apiGatewayMethodMethodResponses :: Maybe [ApiGatewayMethodResponse]+  , _apiGatewayMethodRequestModels :: Maybe Object+  , _apiGatewayMethodRequestParameters :: Maybe Object+  , _apiGatewayMethodResourceId :: Val Text+  , _apiGatewayMethodRestApiId :: Val Text+  } deriving (Show, Generic)++instance ToJSON ApiGatewayMethod where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 17, omitNothingFields = True }++instance FromJSON ApiGatewayMethod where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 17, omitNothingFields = True }++-- | Constructor for 'ApiGatewayMethod' containing required fields as+-- arguments.+apiGatewayMethod+  :: Val Text -- ^ 'agmeAuthorizationType'+  -> Val Text -- ^ 'agmeHttpMethod'+  -> Val Text -- ^ 'agmeResourceId'+  -> Val Text -- ^ 'agmeRestApiId'+  -> ApiGatewayMethod+apiGatewayMethod authorizationTypearg httpMethodarg resourceIdarg restApiIdarg =+  ApiGatewayMethod+  { _apiGatewayMethodApiKeyRequired = Nothing+  , _apiGatewayMethodAuthorizationType = authorizationTypearg+  , _apiGatewayMethodAuthorizerId = Nothing+  , _apiGatewayMethodHttpMethod = httpMethodarg+  , _apiGatewayMethodIntegration = Nothing+  , _apiGatewayMethodMethodResponses = Nothing+  , _apiGatewayMethodRequestModels = Nothing+  , _apiGatewayMethodRequestParameters = Nothing+  , _apiGatewayMethodResourceId = resourceIdarg+  , _apiGatewayMethodRestApiId = restApiIdarg+  }++-- | Indicates whether the method requires clients to submit a valid API key.+agmeApiKeyRequired :: Lens' ApiGatewayMethod (Maybe (Val Bool'))+agmeApiKeyRequired = lens _apiGatewayMethodApiKeyRequired (\s a -> s { _apiGatewayMethodApiKeyRequired = a })++-- | The method's authorization type.+agmeAuthorizationType :: Lens' ApiGatewayMethod (Val Text)+agmeAuthorizationType = lens _apiGatewayMethodAuthorizationType (\s a -> s { _apiGatewayMethodAuthorizationType = a })++-- | The identifier of the authorizer to use on this method. If you specify+-- this property, specify CUSTOM for the AuthorizationType property.+agmeAuthorizerId :: Lens' ApiGatewayMethod (Maybe (Val Text))+agmeAuthorizerId = lens _apiGatewayMethodAuthorizerId (\s a -> s { _apiGatewayMethodAuthorizerId = a })++-- | The HTTP method that clients will use to call this method.+agmeHttpMethod :: Lens' ApiGatewayMethod (Val Text)+agmeHttpMethod = lens _apiGatewayMethodHttpMethod (\s a -> s { _apiGatewayMethodHttpMethod = a })++-- | The back-end system that the method calls when it receives a request.+agmeIntegration :: Lens' ApiGatewayMethod (Maybe ApiGatewayIntegration)+agmeIntegration = lens _apiGatewayMethodIntegration (\s a -> s { _apiGatewayMethodIntegration = a })++-- | The responses that can be sent to the client who calls the method.+agmeMethodResponses :: Lens' ApiGatewayMethod (Maybe [ApiGatewayMethodResponse])+agmeMethodResponses = lens _apiGatewayMethodMethodResponses (\s a -> s { _apiGatewayMethodMethodResponses = a })++-- | The resources used for the response's content type. Specify response+-- models as key-value pairs (string-to-string map), with a content type as+-- the key and a Model resource name as the value.+agmeRequestModels :: Lens' ApiGatewayMethod (Maybe Object)+agmeRequestModels = lens _apiGatewayMethodRequestModels (\s a -> s { _apiGatewayMethodRequestModels = a })++-- | Request parameters that API Gateway accepts. Specify request parameters+-- as key-value pairs (string-to-Boolean map), with a source as the key and a+-- Boolean as the value. The Boolean specifies whether a parameter is+-- required. A source must match the following format+-- method.request.location.name, where the location is querystring, path, or+-- header, and name is a valid, unique parameter name.+agmeRequestParameters :: Lens' ApiGatewayMethod (Maybe Object)+agmeRequestParameters = lens _apiGatewayMethodRequestParameters (\s a -> s { _apiGatewayMethodRequestParameters = a })++-- | The ID of an API Gateway resource. For root resource methods, specify the+-- RestApi root resource ID, such as { "Fn::GetAtt": ["MyRestApi",+-- "RootResourceId"] }.+agmeResourceId :: Lens' ApiGatewayMethod (Val Text)+agmeResourceId = lens _apiGatewayMethodResourceId (\s a -> s { _apiGatewayMethodResourceId = a })++-- | The ID of the RestApi resource in which API Gateway creates the method.+agmeRestApiId :: Lens' ApiGatewayMethod (Val Text)+agmeRestApiId = lens _apiGatewayMethodRestApiId (\s a -> s { _apiGatewayMethodRestApiId = a })
+ library-gen/Stratosphere/Resources/ApiGatewayModel.hs view
@@ -0,0 +1,72 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::ApiGateway::Model resource defines the structure of a request or+-- response payload for an Amazon API Gateway (API Gateway) method.++module Stratosphere.Resources.ApiGatewayModel where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for ApiGatewayModel. See 'apiGatewayModel' for+-- a more convenient constructor.+data ApiGatewayModel =+  ApiGatewayModel+  { _apiGatewayModelContentType :: Maybe (Val Text)+  , _apiGatewayModelDescription :: Maybe (Val Text)+  , _apiGatewayModelName :: Maybe (Val Text)+  , _apiGatewayModelRestApiId :: Val Text+  , _apiGatewayModelSchema :: Maybe Object+  } deriving (Show, Generic)++instance ToJSON ApiGatewayModel where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 16, omitNothingFields = True }++instance FromJSON ApiGatewayModel where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 16, omitNothingFields = True }++-- | Constructor for 'ApiGatewayModel' containing required fields as+-- arguments.+apiGatewayModel+  :: Val Text -- ^ 'agmRestApiId'+  -> ApiGatewayModel+apiGatewayModel restApiIdarg =+  ApiGatewayModel+  { _apiGatewayModelContentType = Nothing+  , _apiGatewayModelDescription = Nothing+  , _apiGatewayModelName = Nothing+  , _apiGatewayModelRestApiId = restApiIdarg+  , _apiGatewayModelSchema = Nothing+  }++-- | The content type for the model.+agmContentType :: Lens' ApiGatewayModel (Maybe (Val Text))+agmContentType = lens _apiGatewayModelContentType (\s a -> s { _apiGatewayModelContentType = a })++-- | A description that identifies this model.+agmDescription :: Lens' ApiGatewayModel (Maybe (Val Text))+agmDescription = lens _apiGatewayModelDescription (\s a -> s { _apiGatewayModelDescription = a })++-- | A name for the mode. If you don't specify a name, AWS CloudFormation+-- generates a unique physical ID and uses that ID for the model name. For+-- more information, see Name Type. Important If you specify a name, you+-- cannot do updates that require this resource to be replaced. You can still+-- do updates that require no or some interruption. If you must replace the+-- resource, specify a new name.+agmName :: Lens' ApiGatewayModel (Maybe (Val Text))+agmName = lens _apiGatewayModelName (\s a -> s { _apiGatewayModelName = a })++-- | The ID of a REST API with which to associate this model.+agmRestApiId :: Lens' ApiGatewayModel (Val Text)+agmRestApiId = lens _apiGatewayModelRestApiId (\s a -> s { _apiGatewayModelRestApiId = a })++-- | The schema to use to transform data to one or more output formats.+agmSchema :: Lens' ApiGatewayModel (Maybe Object)+agmSchema = lens _apiGatewayModelSchema (\s a -> s { _apiGatewayModelSchema = a })
+ library-gen/Stratosphere/Resources/ApiGatewayResource.hs view
@@ -0,0 +1,59 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::ApiGateway::Resource resource creates a resource in an Amazon+-- API Gateway (API Gateway) API.++module Stratosphere.Resources.ApiGatewayResource where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for ApiGatewayResource. See+-- 'apiGatewayResource' for a more convenient constructor.+data ApiGatewayResource =+  ApiGatewayResource+  { _apiGatewayResourceParentId :: Val Text+  , _apiGatewayResourcePathPart :: Val Text+  , _apiGatewayResourceRestApiId :: Val Text+  } deriving (Show, Generic)++instance ToJSON ApiGatewayResource where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 19, omitNothingFields = True }++instance FromJSON ApiGatewayResource where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 19, omitNothingFields = True }++-- | Constructor for 'ApiGatewayResource' containing required fields as+-- arguments.+apiGatewayResource+  :: Val Text -- ^ 'agrParentId'+  -> Val Text -- ^ 'agrPathPart'+  -> Val Text -- ^ 'agrRestApiId'+  -> ApiGatewayResource+apiGatewayResource parentIdarg pathPartarg restApiIdarg =+  ApiGatewayResource+  { _apiGatewayResourceParentId = parentIdarg+  , _apiGatewayResourcePathPart = pathPartarg+  , _apiGatewayResourceRestApiId = restApiIdarg+  }++-- | If you want to create a child resource, the ID of the parent resource.+-- For resources without a parent, specify the RestApi root resource ID, such+-- as { "Fn::GetAtt": ["MyRestApi", "RootResourceId"] }.+agrParentId :: Lens' ApiGatewayResource (Val Text)+agrParentId = lens _apiGatewayResourceParentId (\s a -> s { _apiGatewayResourceParentId = a })++-- | A path name for the resource.+agrPathPart :: Lens' ApiGatewayResource (Val Text)+agrPathPart = lens _apiGatewayResourcePathPart (\s a -> s { _apiGatewayResourcePathPart = a })++-- | The ID of the RestApi resource in which you want to create this resource.+agrRestApiId :: Lens' ApiGatewayResource (Val Text)+agrRestApiId = lens _apiGatewayResourceRestApiId (\s a -> s { _apiGatewayResourceRestApiId = a })
+ library-gen/Stratosphere/Resources/ApiGatewayRestApi.hs view
@@ -0,0 +1,83 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::ApiGateway::RestApi resource contains a collection of Amazon API+-- Gateway (API Gateway) resources and methods that can be invoked through+-- HTTPS endpoints.++module Stratosphere.Resources.ApiGatewayRestApi where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.ApiGatewayRestApiS3Location++-- | Full data type definition for ApiGatewayRestApi. See 'apiGatewayRestApi'+-- for a more convenient constructor.+data ApiGatewayRestApi =+  ApiGatewayRestApi+  { _apiGatewayRestApiBody :: Maybe Object+  , _apiGatewayRestApiBodyS3Location :: Maybe ApiGatewayRestApiS3Location+  , _apiGatewayRestApiCloneFrom :: Maybe (Val Text)+  , _apiGatewayRestApiDescription :: Maybe (Val Text)+  , _apiGatewayRestApiFailOnWarnings :: Maybe (Val Bool')+  , _apiGatewayRestApiName :: Val Text+  , _apiGatewayRestApiParameters :: Maybe [Val Text]+  } deriving (Show, Generic)++instance ToJSON ApiGatewayRestApi where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 18, omitNothingFields = True }++instance FromJSON ApiGatewayRestApi where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 18, omitNothingFields = True }++-- | Constructor for 'ApiGatewayRestApi' containing required fields as+-- arguments.+apiGatewayRestApi+  :: Val Text -- ^ 'agraName'+  -> ApiGatewayRestApi+apiGatewayRestApi namearg =+  ApiGatewayRestApi+  { _apiGatewayRestApiBody = Nothing+  , _apiGatewayRestApiBodyS3Location = Nothing+  , _apiGatewayRestApiCloneFrom = Nothing+  , _apiGatewayRestApiDescription = Nothing+  , _apiGatewayRestApiFailOnWarnings = Nothing+  , _apiGatewayRestApiName = namearg+  , _apiGatewayRestApiParameters = Nothing+  }++-- | A Swagger specification that defines a set of RESTful APIs in the JSON+-- format.+agraBody :: Lens' ApiGatewayRestApi (Maybe Object)+agraBody = lens _apiGatewayRestApiBody (\s a -> s { _apiGatewayRestApiBody = a })++-- | The Amazon Simple Storage Service (Amazon S3) location that points to a+-- Swagger file, which defines a set of RESTful APIs in JSON or YAML format.+agraBodyS3Location :: Lens' ApiGatewayRestApi (Maybe ApiGatewayRestApiS3Location)+agraBodyS3Location = lens _apiGatewayRestApiBodyS3Location (\s a -> s { _apiGatewayRestApiBodyS3Location = a })++-- | The ID of the API Gateway RestApi resource that you want to clone.+agraCloneFrom :: Lens' ApiGatewayRestApi (Maybe (Val Text))+agraCloneFrom = lens _apiGatewayRestApiCloneFrom (\s a -> s { _apiGatewayRestApiCloneFrom = a })++-- | A description of the purpose of this API Gateway RestApi resource.+agraDescription :: Lens' ApiGatewayRestApi (Maybe (Val Text))+agraDescription = lens _apiGatewayRestApiDescription (\s a -> s { _apiGatewayRestApiDescription = a })++-- | If a warning occurs while API Gateway is creating the RestApi resource,+-- indicates whether to roll back the resource.+agraFailOnWarnings :: Lens' ApiGatewayRestApi (Maybe (Val Bool'))+agraFailOnWarnings = lens _apiGatewayRestApiFailOnWarnings (\s a -> s { _apiGatewayRestApiFailOnWarnings = a })++-- | A name for the API Gateway RestApi resource.+agraName :: Lens' ApiGatewayRestApi (Val Text)+agraName = lens _apiGatewayRestApiName (\s a -> s { _apiGatewayRestApiName = a })++-- | Custom header parameters for the request.+agraParameters :: Lens' ApiGatewayRestApi (Maybe [Val Text])+agraParameters = lens _apiGatewayRestApiParameters (\s a -> s { _apiGatewayRestApiParameters = a })
+ library-gen/Stratosphere/Resources/ApiGatewayStage.hs view
@@ -0,0 +1,98 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::ApiGateway::Stage resource creates a stage for an Amazon API+-- Gateway (API Gateway) deployment.++module Stratosphere.Resources.ApiGatewayStage where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.ApiGatewayStageMethodSetting++-- | Full data type definition for ApiGatewayStage. See 'apiGatewayStage' for+-- a more convenient constructor.+data ApiGatewayStage =+  ApiGatewayStage+  { _apiGatewayStageCacheClusterEnabled :: Maybe (Val Bool')+  , _apiGatewayStageCacheClusterSize :: Maybe (Val Text)+  , _apiGatewayStageClientCertificateId :: Maybe (Val Text)+  , _apiGatewayStageDeploymentId :: Val Text+  , _apiGatewayStageDescription :: Maybe (Val Text)+  , _apiGatewayStageMethodSettings :: Maybe [ApiGatewayStageMethodSetting]+  , _apiGatewayStageRestApiId :: Val Text+  , _apiGatewayStageStageName :: Val Text+  , _apiGatewayStageVariables :: Maybe Object+  } deriving (Show, Generic)++instance ToJSON ApiGatewayStage where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 16, omitNothingFields = True }++instance FromJSON ApiGatewayStage where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 16, omitNothingFields = True }++-- | Constructor for 'ApiGatewayStage' containing required fields as+-- arguments.+apiGatewayStage+  :: Val Text -- ^ 'agsDeploymentId'+  -> Val Text -- ^ 'agsRestApiId'+  -> Val Text -- ^ 'agsStageName'+  -> ApiGatewayStage+apiGatewayStage deploymentIdarg restApiIdarg stageNamearg =+  ApiGatewayStage+  { _apiGatewayStageCacheClusterEnabled = Nothing+  , _apiGatewayStageCacheClusterSize = Nothing+  , _apiGatewayStageClientCertificateId = Nothing+  , _apiGatewayStageDeploymentId = deploymentIdarg+  , _apiGatewayStageDescription = Nothing+  , _apiGatewayStageMethodSettings = Nothing+  , _apiGatewayStageRestApiId = restApiIdarg+  , _apiGatewayStageStageName = stageNamearg+  , _apiGatewayStageVariables = Nothing+  }++-- | Indicates whether cache clustering is enabled for the stage.+agsCacheClusterEnabled :: Lens' ApiGatewayStage (Maybe (Val Bool'))+agsCacheClusterEnabled = lens _apiGatewayStageCacheClusterEnabled (\s a -> s { _apiGatewayStageCacheClusterEnabled = a })++-- | The stage's cache cluster size.+agsCacheClusterSize :: Lens' ApiGatewayStage (Maybe (Val Text))+agsCacheClusterSize = lens _apiGatewayStageCacheClusterSize (\s a -> s { _apiGatewayStageCacheClusterSize = a })++-- | The identifier of the client certificate that API Gateway uses to call+-- your integration endpoints in the stage.+agsClientCertificateId :: Lens' ApiGatewayStage (Maybe (Val Text))+agsClientCertificateId = lens _apiGatewayStageClientCertificateId (\s a -> s { _apiGatewayStageClientCertificateId = a })++-- | The ID of the deployment that the stage points to.+agsDeploymentId :: Lens' ApiGatewayStage (Val Text)+agsDeploymentId = lens _apiGatewayStageDeploymentId (\s a -> s { _apiGatewayStageDeploymentId = a })++-- | A description of the stage's purpose.+agsDescription :: Lens' ApiGatewayStage (Maybe (Val Text))+agsDescription = lens _apiGatewayStageDescription (\s a -> s { _apiGatewayStageDescription = a })++-- | Settings for all methods in the stage.+agsMethodSettings :: Lens' ApiGatewayStage (Maybe [ApiGatewayStageMethodSetting])+agsMethodSettings = lens _apiGatewayStageMethodSettings (\s a -> s { _apiGatewayStageMethodSettings = a })++-- | The ID of the RestApi resource that you're deploying with this stage.+agsRestApiId :: Lens' ApiGatewayStage (Val Text)+agsRestApiId = lens _apiGatewayStageRestApiId (\s a -> s { _apiGatewayStageRestApiId = a })++-- | The name of the stage, which API Gateway uses as the first path segment+-- in the invoke Uniform Resource Identifier (URI).+agsStageName :: Lens' ApiGatewayStage (Val Text)+agsStageName = lens _apiGatewayStageStageName (\s a -> s { _apiGatewayStageStageName = a })++-- | A map (string to string map) that defines the stage variables, where the+-- variable name is the key and the variable value is the value. Variable+-- names are limited to alphanumeric characters. Values must match the+-- following regular expression: [A-Za-z0-9-._~:/?#&amp;=,]+.+agsVariables :: Lens' ApiGatewayStage (Maybe Object)+agsVariables = lens _apiGatewayStageVariables (\s a -> s { _apiGatewayStageVariables = a })
+ library-gen/Stratosphere/Resources/ApiGatewayUsagePlan.hs view
@@ -0,0 +1,73 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::ApiGateway::UsagePlan resource specifies a usage plan for+-- deployed Amazon API Gateway (API Gateway) APIs. A usage plan enforces+-- throttling and quota limits on individual client API keys. For more+-- information, see Creating and Using API Usage Plans in Amazon API Gateway+-- in the API Gateway Developer Guide.++module Stratosphere.Resources.ApiGatewayUsagePlan where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.ApiGatewayUsagePlanApiStage+import Stratosphere.ResourceProperties.ApiGatewayUsagePlanQuotaSettings+import Stratosphere.ResourceProperties.ApiGatewayUsagePlanThrottleSettings++-- | Full data type definition for ApiGatewayUsagePlan. See+-- 'apiGatewayUsagePlan' for a more convenient constructor.+data ApiGatewayUsagePlan =+  ApiGatewayUsagePlan+  { _apiGatewayUsagePlanApiStages :: Maybe [ApiGatewayUsagePlanApiStage]+  , _apiGatewayUsagePlanDescription :: Maybe (Val Text)+  , _apiGatewayUsagePlanQuota :: Maybe ApiGatewayUsagePlanQuotaSettings+  , _apiGatewayUsagePlanThrottle :: Maybe ApiGatewayUsagePlanThrottleSettings+  , _apiGatewayUsagePlanUsagePlanName :: Maybe (Val Text)+  } deriving (Show, Generic)++instance ToJSON ApiGatewayUsagePlan where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 20, omitNothingFields = True }++instance FromJSON ApiGatewayUsagePlan where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 20, omitNothingFields = True }++-- | Constructor for 'ApiGatewayUsagePlan' containing required fields as+-- arguments.+apiGatewayUsagePlan+  :: ApiGatewayUsagePlan+apiGatewayUsagePlan  =+  ApiGatewayUsagePlan+  { _apiGatewayUsagePlanApiStages = Nothing+  , _apiGatewayUsagePlanDescription = Nothing+  , _apiGatewayUsagePlanQuota = Nothing+  , _apiGatewayUsagePlanThrottle = Nothing+  , _apiGatewayUsagePlanUsagePlanName = Nothing+  }++-- | The APIs and API stages to associate with this usage plan.+agupApiStages :: Lens' ApiGatewayUsagePlan (Maybe [ApiGatewayUsagePlanApiStage])+agupApiStages = lens _apiGatewayUsagePlanApiStages (\s a -> s { _apiGatewayUsagePlanApiStages = a })++-- | The purpose of this usage plan.+agupDescription :: Lens' ApiGatewayUsagePlan (Maybe (Val Text))+agupDescription = lens _apiGatewayUsagePlanDescription (\s a -> s { _apiGatewayUsagePlanDescription = a })++-- | Configures the number of requests that users can make within a given+-- interval.+agupQuota :: Lens' ApiGatewayUsagePlan (Maybe ApiGatewayUsagePlanQuotaSettings)+agupQuota = lens _apiGatewayUsagePlanQuota (\s a -> s { _apiGatewayUsagePlanQuota = a })++-- | Configures the overall request rate (average requests per second) and+-- burst capacity.+agupThrottle :: Lens' ApiGatewayUsagePlan (Maybe ApiGatewayUsagePlanThrottleSettings)+agupThrottle = lens _apiGatewayUsagePlanThrottle (\s a -> s { _apiGatewayUsagePlanThrottle = a })++-- | A name for this usage plan.+agupUsagePlanName :: Lens' ApiGatewayUsagePlan (Maybe (Val Text))+agupUsagePlanName = lens _apiGatewayUsagePlanUsagePlanName (\s a -> s { _apiGatewayUsagePlanUsagePlanName = a })
+ library-gen/Stratosphere/Resources/CacheCluster.hs view
@@ -0,0 +1,206 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::ElastiCache::CacheCluster type creates an Amazon ElastiCache+-- cache cluster.++module Stratosphere.Resources.CacheCluster where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.ResourceTag++-- | Full data type definition for CacheCluster. See 'cacheCluster' for a more+-- convenient constructor.+data CacheCluster =+  CacheCluster+  { _cacheClusterAutoMinorVersionUpgrade :: Maybe (Val Bool')+  , _cacheClusterAZMode :: Maybe (Val Text)+  , _cacheClusterCacheNodeType :: Val Text+  , _cacheClusterCacheParameterGroupName :: Maybe (Val Text)+  , _cacheClusterCacheSecurityGroupNames :: Maybe [Val Text]+  , _cacheClusterCacheSubnetGroupName :: Maybe (Val Text)+  , _cacheClusterClusterName :: Maybe (Val Text)+  , _cacheClusterEngine :: Val Text+  , _cacheClusterEngineVersion :: Maybe (Val Text)+  , _cacheClusterNotificationTopicArn :: Maybe (Val Text)+  , _cacheClusterNumCacheNodes :: Val Integer'+  , _cacheClusterPort :: Maybe (Val Integer')+  , _cacheClusterPreferredAvailabilityZone :: Maybe (Val Text)+  , _cacheClusterPreferredAvailabilityZones :: Maybe [Val Text]+  , _cacheClusterPreferredMaintenanceWindow :: Maybe (Val Text)+  , _cacheClusterSnapshotArns :: Maybe [Val Text]+  , _cacheClusterSnapshotName :: Maybe (Val Text)+  , _cacheClusterSnapshotRetentionLimit :: Maybe (Val Integer')+  , _cacheClusterSnapshotWindow :: Maybe (Val Text)+  , _cacheClusterTags :: Maybe [ResourceTag]+  , _cacheClusterVpcSecurityGroupIds :: Maybe [Val Text]+  } deriving (Show, Generic)++instance ToJSON CacheCluster where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 13, omitNothingFields = True }++instance FromJSON CacheCluster where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 13, omitNothingFields = True }++-- | Constructor for 'CacheCluster' containing required fields as arguments.+cacheCluster+  :: Val Text -- ^ 'ccCacheNodeType'+  -> Val Text -- ^ 'ccEngine'+  -> Val Integer' -- ^ 'ccNumCacheNodes'+  -> CacheCluster+cacheCluster cacheNodeTypearg enginearg numCacheNodesarg =+  CacheCluster+  { _cacheClusterAutoMinorVersionUpgrade = Nothing+  , _cacheClusterAZMode = Nothing+  , _cacheClusterCacheNodeType = cacheNodeTypearg+  , _cacheClusterCacheParameterGroupName = Nothing+  , _cacheClusterCacheSecurityGroupNames = Nothing+  , _cacheClusterCacheSubnetGroupName = Nothing+  , _cacheClusterClusterName = Nothing+  , _cacheClusterEngine = enginearg+  , _cacheClusterEngineVersion = Nothing+  , _cacheClusterNotificationTopicArn = Nothing+  , _cacheClusterNumCacheNodes = numCacheNodesarg+  , _cacheClusterPort = Nothing+  , _cacheClusterPreferredAvailabilityZone = Nothing+  , _cacheClusterPreferredAvailabilityZones = Nothing+  , _cacheClusterPreferredMaintenanceWindow = Nothing+  , _cacheClusterSnapshotArns = Nothing+  , _cacheClusterSnapshotName = Nothing+  , _cacheClusterSnapshotRetentionLimit = Nothing+  , _cacheClusterSnapshotWindow = Nothing+  , _cacheClusterTags = Nothing+  , _cacheClusterVpcSecurityGroupIds = Nothing+  }++-- | Indicates that minor engine upgrades will be applied automatically to the+-- cache cluster during the maintenance window.+ccAutoMinorVersionUpgrade :: Lens' CacheCluster (Maybe (Val Bool'))+ccAutoMinorVersionUpgrade = lens _cacheClusterAutoMinorVersionUpgrade (\s a -> s { _cacheClusterAutoMinorVersionUpgrade = a })++-- | For Memcached cache clusters, indicates whether the nodes are created in+-- a single Availability Zone or across multiple Availability Zones in the+-- cluster's region. For valid values, see CreateCacheCluster in the Amazon+-- ElastiCache API Reference.+ccAZMode :: Lens' CacheCluster (Maybe (Val Text))+ccAZMode = lens _cacheClusterAZMode (\s a -> s { _cacheClusterAZMode = a })++-- | The compute and memory capacity of nodes in a cache cluster.+ccCacheNodeType :: Lens' CacheCluster (Val Text)+ccCacheNodeType = lens _cacheClusterCacheNodeType (\s a -> s { _cacheClusterCacheNodeType = a })++-- | The name of the cache parameter group that is associated with this cache+-- cluster.+ccCacheParameterGroupName :: Lens' CacheCluster (Maybe (Val Text))+ccCacheParameterGroupName = lens _cacheClusterCacheParameterGroupName (\s a -> s { _cacheClusterCacheParameterGroupName = a })++-- | A list of cache security group names that are associated with this cache+-- cluster. If your cache cluster is in a VPC, specify the VpcSecurityGroupIds+-- property instead.+ccCacheSecurityGroupNames :: Lens' CacheCluster (Maybe [Val Text])+ccCacheSecurityGroupNames = lens _cacheClusterCacheSecurityGroupNames (\s a -> s { _cacheClusterCacheSecurityGroupNames = a })++-- | The cache subnet group that you associate with a cache cluster.+ccCacheSubnetGroupName :: Lens' CacheCluster (Maybe (Val Text))+ccCacheSubnetGroupName = lens _cacheClusterCacheSubnetGroupName (\s a -> s { _cacheClusterCacheSubnetGroupName = a })++-- | A name for the cache cluster. If you don't specify a name, AWS+-- CloudFormation generates a unique physical ID and uses that ID for the+-- cache cluster. For more information, see Name Type. Important If you+-- specify a name, you cannot do updates that require this resource to be+-- replaced. You can still do updates that require no or some interruption. If+-- you must replace the resource, specify a new name. The name must contain 1+-- to 20 alphanumeric characters or hyphens. The name must start with a letter+-- and cannot end with a hyphen or contain two consecutive hyphens.+ccClusterName :: Lens' CacheCluster (Maybe (Val Text))+ccClusterName = lens _cacheClusterClusterName (\s a -> s { _cacheClusterClusterName = a })++-- | The name of the cache engine to be used for this cache cluster, such as+-- memcached or redis.+ccEngine :: Lens' CacheCluster (Val Text)+ccEngine = lens _cacheClusterEngine (\s a -> s { _cacheClusterEngine = a })++-- | The version of the cache engine to be used for this cluster.+ccEngineVersion :: Lens' CacheCluster (Maybe (Val Text))+ccEngineVersion = lens _cacheClusterEngineVersion (\s a -> s { _cacheClusterEngineVersion = a })++-- | The Amazon Resource Name (ARN) of the Amazon Simple Notification Service+-- (SNS) topic to which notifications will be sent.+ccNotificationTopicArn :: Lens' CacheCluster (Maybe (Val Text))+ccNotificationTopicArn = lens _cacheClusterNotificationTopicArn (\s a -> s { _cacheClusterNotificationTopicArn = a })++-- | The number of cache nodes that the cache cluster should have.+ccNumCacheNodes :: Lens' CacheCluster (Val Integer')+ccNumCacheNodes = lens _cacheClusterNumCacheNodes (\s a -> s { _cacheClusterNumCacheNodes = a })++-- | The port number on which each of the cache nodes will accept connections.+ccPort :: Lens' CacheCluster (Maybe (Val Integer'))+ccPort = lens _cacheClusterPort (\s a -> s { _cacheClusterPort = a })++-- | The Amazon EC2 Availability Zone in which the cache cluster is created.+ccPreferredAvailabilityZone :: Lens' CacheCluster (Maybe (Val Text))+ccPreferredAvailabilityZone = lens _cacheClusterPreferredAvailabilityZone (\s a -> s { _cacheClusterPreferredAvailabilityZone = a })++-- | For Memcached cache clusters, the list of Availability Zones in which+-- cache nodes are created. The number of Availability Zones listed must equal+-- the number of cache nodes. For example, if you want to create three nodes+-- in two different Availability Zones, you can specify ["us-east-1a",+-- "us-east-1a", "us-east-1b"], which would create two nodes in us-east-1a and+-- one node in us-east-1b. If you specify a subnet group and you're creating+-- your cache cluster in a VPC, you must specify Availability Zones that are+-- associated with the subnets in the subnet group that you've chosen. If you+-- want all the nodes in the same Availability Zone, use the+-- PreferredAvailabilityZone property or repeat the Availability Zone multiple+-- times in the list.+ccPreferredAvailabilityZones :: Lens' CacheCluster (Maybe [Val Text])+ccPreferredAvailabilityZones = lens _cacheClusterPreferredAvailabilityZones (\s a -> s { _cacheClusterPreferredAvailabilityZones = a })++-- | The weekly time range (in UTC) during which system maintenance can occur.+ccPreferredMaintenanceWindow :: Lens' CacheCluster (Maybe (Val Text))+ccPreferredMaintenanceWindow = lens _cacheClusterPreferredMaintenanceWindow (\s a -> s { _cacheClusterPreferredMaintenanceWindow = a })++-- | The ARN of the snapshot file that you want to use to seed a new Redis+-- cache cluster. If you manage a Redis instance outside of Amazon+-- ElastiCache, you can create a new cache cluster in ElastiCache by using a+-- snapshot file that is stored in an Amazon S3 bucket.+ccSnapshotArns :: Lens' CacheCluster (Maybe [Val Text])+ccSnapshotArns = lens _cacheClusterSnapshotArns (\s a -> s { _cacheClusterSnapshotArns = a })++-- | The name of a snapshot from which to restore data into a new Redis cache+-- cluster.+ccSnapshotName :: Lens' CacheCluster (Maybe (Val Text))+ccSnapshotName = lens _cacheClusterSnapshotName (\s a -> s { _cacheClusterSnapshotName = a })++-- | For Redis cache clusters, the number of days for which ElastiCache+-- retains automatic snapshots before deleting them. For example, if you set+-- the value to 5, a snapshot that was taken today will be retained for 5 days+-- before being deleted.+ccSnapshotRetentionLimit :: Lens' CacheCluster (Maybe (Val Integer'))+ccSnapshotRetentionLimit = lens _cacheClusterSnapshotRetentionLimit (\s a -> s { _cacheClusterSnapshotRetentionLimit = a })++-- | For Redis cache clusters, the daily time range (in UTC) during which+-- ElastiCache will begin taking a daily snapshot of your node group. For+-- example, you can specify 05:00-09:00.+ccSnapshotWindow :: Lens' CacheCluster (Maybe (Val Text))+ccSnapshotWindow = lens _cacheClusterSnapshotWindow (\s a -> s { _cacheClusterSnapshotWindow = a })++-- | An arbitrary set of tags (key–value pairs) for this cache cluster.+ccTags :: Lens' CacheCluster (Maybe [ResourceTag])+ccTags = lens _cacheClusterTags (\s a -> s { _cacheClusterTags = a })++-- | A list of VPC security group IDs. If your cache cluster isn't in a VPC,+-- specify the CacheSecurityGroupNames property instead. Note You must use the+-- AWS::EC2::SecurityGroup resource instead of the+-- AWS::ElastiCache::SecurityGroup resource in order to specify an ElastiCache+-- security group that is in a VPC. In addition, if you use the default VPC+-- for your AWS account, you must use the Fn::GetAtt function and the GroupId+-- attribute to retrieve security group IDs (instead of the Ref function). To+-- see a sample template, see the Template Snippet section.+ccVpcSecurityGroupIds :: Lens' CacheCluster (Maybe [Val Text])+ccVpcSecurityGroupIds = lens _cacheClusterVpcSecurityGroupIds (\s a -> s { _cacheClusterVpcSecurityGroupIds = a })
+ library-gen/Stratosphere/Resources/CacheSubnetGroup.hs view
@@ -0,0 +1,54 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | Creates a cache subnet group. For more information about cache subnet+-- groups, go to Cache Subnet Groups in the Amazon ElastiCache User Guide or+-- go to CreateCacheSubnetGroup in the Amazon ElastiCache API Reference Guide.+-- When you specify an AWS::ElastiCache::SubnetGroup type as an argument to+-- the Ref function, AWS CloudFormation returns the name of the cache subnet+-- group.++module Stratosphere.Resources.CacheSubnetGroup where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for CacheSubnetGroup. See 'cacheSubnetGroup'+-- for a more convenient constructor.+data CacheSubnetGroup =+  CacheSubnetGroup+  { _cacheSubnetGroupDescription :: Val Text+  , _cacheSubnetGroupSubnetIds :: [Val Text]+  } deriving (Show, Generic)++instance ToJSON CacheSubnetGroup where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 17, omitNothingFields = True }++instance FromJSON CacheSubnetGroup where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 17, omitNothingFields = True }++-- | Constructor for 'CacheSubnetGroup' containing required fields as+-- arguments.+cacheSubnetGroup+  :: Val Text -- ^ 'csgDescription'+  -> [Val Text] -- ^ 'csgSubnetIds'+  -> CacheSubnetGroup+cacheSubnetGroup descriptionarg subnetIdsarg =+  CacheSubnetGroup+  { _cacheSubnetGroupDescription = descriptionarg+  , _cacheSubnetGroupSubnetIds = subnetIdsarg+  }++-- | The description for the cache subnet group.+csgDescription :: Lens' CacheSubnetGroup (Val Text)+csgDescription = lens _cacheSubnetGroupDescription (\s a -> s { _cacheSubnetGroupDescription = a })++-- | The Amazon EC2 subnet IDs for the cache subnet group.+csgSubnetIds :: Lens' CacheSubnetGroup [Val Text]+csgSubnetIds = lens _cacheSubnetGroupSubnetIds (\s a -> s { _cacheSubnetGroupSubnetIds = a })
+ library-gen/Stratosphere/Resources/DeliveryStream.hs view
@@ -0,0 +1,65 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::KinesisFirehose::DeliveryStream resource creates an Amazon+-- Kinesis Firehose (Firehose) delivery stream that delivers real-time+-- streaming data to an Amazon Simple Storage Service (Amazon S3), Amazon+-- Redshift, or Amazon Elasticsearch Service (Amazon ES) destination. For more+-- information, see Creating an Amazon Kinesis Firehose Delivery Stream in the+-- Amazon Kinesis Firehose Developer Guide.++module Stratosphere.Resources.DeliveryStream where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.KinesisFirehoseElasticsearchDestinationConfiguration+import Stratosphere.ResourceProperties.KinesisFirehoseRedshiftDestinationConfiguration+import Stratosphere.ResourceProperties.KinesisFirehoseS3DestinationConfiguration++-- | Full data type definition for DeliveryStream. See 'deliveryStream' for a+-- more convenient constructor.+data DeliveryStream =+  DeliveryStream+  { _deliveryStreamDeliveryStreamName :: Maybe (Val Text)+  , _deliveryStreamElasticsearchDestinationConfiguration :: Maybe KinesisFirehoseElasticsearchDestinationConfiguration+  , _deliveryStreamRedshiftDestinationConfiguration :: Maybe KinesisFirehoseRedshiftDestinationConfiguration+  , _deliveryStreamS3DestinationConfiguration :: Maybe KinesisFirehoseS3DestinationConfiguration+  } deriving (Show, Generic)++instance ToJSON DeliveryStream where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 15, omitNothingFields = True }++instance FromJSON DeliveryStream where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 15, omitNothingFields = True }++-- | Constructor for 'DeliveryStream' containing required fields as arguments.+deliveryStream+  :: DeliveryStream+deliveryStream  =+  DeliveryStream+  { _deliveryStreamDeliveryStreamName = Nothing+  , _deliveryStreamElasticsearchDestinationConfiguration = Nothing+  , _deliveryStreamRedshiftDestinationConfiguration = Nothing+  , _deliveryStreamS3DestinationConfiguration = Nothing+  }++-- | A name for the delivery stream.+dsDeliveryStreamName :: Lens' DeliveryStream (Maybe (Val Text))+dsDeliveryStreamName = lens _deliveryStreamDeliveryStreamName (\s a -> s { _deliveryStreamDeliveryStreamName = a })++-- | An Amazon ES destination for the delivery stream.+dsElasticsearchDestinationConfiguration :: Lens' DeliveryStream (Maybe KinesisFirehoseElasticsearchDestinationConfiguration)+dsElasticsearchDestinationConfiguration = lens _deliveryStreamElasticsearchDestinationConfiguration (\s a -> s { _deliveryStreamElasticsearchDestinationConfiguration = a })++-- | An Amazon Redshift destination for the delivery stream.+dsRedshiftDestinationConfiguration :: Lens' DeliveryStream (Maybe KinesisFirehoseRedshiftDestinationConfiguration)+dsRedshiftDestinationConfiguration = lens _deliveryStreamRedshiftDestinationConfiguration (\s a -> s { _deliveryStreamRedshiftDestinationConfiguration = a })++-- | An Amazon S3 destination for the delivery stream.+dsS3DestinationConfiguration :: Lens' DeliveryStream (Maybe KinesisFirehoseS3DestinationConfiguration)+dsS3DestinationConfiguration = lens _deliveryStreamS3DestinationConfiguration (\s a -> s { _deliveryStreamS3DestinationConfiguration = a })
+ library-gen/Stratosphere/Resources/KinesisStream.hs view
@@ -0,0 +1,62 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | Creates an Amazon Kinesis stream that captures and transports data+-- records that are emitted from data sources. For information about creating+-- streams, see CreateStream in the Amazon Kinesis API Reference.++module Stratosphere.Resources.KinesisStream where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.ResourceTag++-- | Full data type definition for KinesisStream. See 'kinesisStream' for a+-- more convenient constructor.+data KinesisStream =+  KinesisStream+  { _kinesisStreamName :: Maybe (Val Text)+  , _kinesisStreamShardCount :: Val Integer'+  , _kinesisStreamTags :: Maybe [ResourceTag]+  } deriving (Show, Generic)++instance ToJSON KinesisStream where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 14, omitNothingFields = True }++instance FromJSON KinesisStream where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 14, omitNothingFields = True }++-- | Constructor for 'KinesisStream' containing required fields as arguments.+kinesisStream+  :: Val Integer' -- ^ 'ksShardCount'+  -> KinesisStream+kinesisStream shardCountarg =+  KinesisStream+  { _kinesisStreamName = Nothing+  , _kinesisStreamShardCount = shardCountarg+  , _kinesisStreamTags = Nothing+  }++-- | The name of the Amazon Kinesis stream. If you don't specify a name, AWS+-- CloudFormation generates a unique physical ID and uses that ID for the+-- stream name. For more information, see Name Type. Important If you specify+-- a name, you cannot do updates that require this resource to be replaced.+-- You can still do updates that require no or some interruption. If you must+-- replace the resource, specify a new name.+ksName :: Lens' KinesisStream (Maybe (Val Text))+ksName = lens _kinesisStreamName (\s a -> s { _kinesisStreamName = a })++-- | The number of shards that the stream uses. For greater provisioned+-- throughput, increase the number of shards.+ksShardCount :: Lens' KinesisStream (Val Integer')+ksShardCount = lens _kinesisStreamShardCount (\s a -> s { _kinesisStreamShardCount = a })++-- | An arbitrary set of tags (key–value pairs) to associate with the Amazon+-- Kinesis stream.+ksTags :: Lens' KinesisStream (Maybe [ResourceTag])+ksTags = lens _kinesisStreamTags (\s a -> s { _kinesisStreamTags = a })
+ library-gen/Stratosphere/Resources/LambdaFunction.hs view
@@ -0,0 +1,128 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::Lambda::Function resource creates an AWS Lambda (Lambda)+-- function that can run code in response to events. For more information, see+-- CreateFunction in the AWS Lambda Developer Guide.++module Stratosphere.Resources.LambdaFunction where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.LambdaFunctionCode+import Stratosphere.ResourceProperties.LambdaFunctionVPCConfig++-- | Full data type definition for LambdaFunction. See 'lambdaFunction' for a+-- more convenient constructor.+data LambdaFunction =+  LambdaFunction+  { _lambdaFunctionCode :: LambdaFunctionCode+  , _lambdaFunctionDescription :: Maybe (Val Text)+  , _lambdaFunctionFunctionName :: Maybe (Val Text)+  , _lambdaFunctionHandler :: Val Text+  , _lambdaFunctionMemorySize :: Maybe (Val Integer')+  , _lambdaFunctionRole :: Val Text+  , _lambdaFunctionRuntime :: Val Text+  , _lambdaFunctionTimeout :: Maybe (Val Integer')+  , _lambdaFunctionVpcConfig :: Maybe LambdaFunctionVPCConfig+  } deriving (Show, Generic)++instance ToJSON LambdaFunction where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 15, omitNothingFields = True }++instance FromJSON LambdaFunction where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 15, omitNothingFields = True }++-- | Constructor for 'LambdaFunction' containing required fields as arguments.+lambdaFunction+  :: LambdaFunctionCode -- ^ 'lfCode'+  -> Val Text -- ^ 'lfHandler'+  -> Val Text -- ^ 'lfRole'+  -> Val Text -- ^ 'lfRuntime'+  -> LambdaFunction+lambdaFunction codearg handlerarg rolearg runtimearg =+  LambdaFunction+  { _lambdaFunctionCode = codearg+  , _lambdaFunctionDescription = Nothing+  , _lambdaFunctionFunctionName = Nothing+  , _lambdaFunctionHandler = handlerarg+  , _lambdaFunctionMemorySize = Nothing+  , _lambdaFunctionRole = rolearg+  , _lambdaFunctionRuntime = runtimearg+  , _lambdaFunctionTimeout = Nothing+  , _lambdaFunctionVpcConfig = Nothing+  }++-- | The source code of your Lambda function. You can point to a file in an+-- Amazon Simple Storage Service (Amazon S3) bucket or specify your source+-- code as inline text.+lfCode :: Lens' LambdaFunction LambdaFunctionCode+lfCode = lens _lambdaFunctionCode (\s a -> s { _lambdaFunctionCode = a })++-- | A description of the function.+lfDescription :: Lens' LambdaFunction (Maybe (Val Text))+lfDescription = lens _lambdaFunctionDescription (\s a -> s { _lambdaFunctionDescription = a })++-- | A name for the function. If you don't specify a name, AWS CloudFormation+-- generates a unique physical ID and uses that ID for the function's name.+-- For more information, see Name Type. Important If you specify a name, you+-- cannot do updates that require this resource to be replaced. You can still+-- do updates that require no or some interruption. If you must replace the+-- resource, specify a new name.+lfFunctionName :: Lens' LambdaFunction (Maybe (Val Text))+lfFunctionName = lens _lambdaFunctionFunctionName (\s a -> s { _lambdaFunctionFunctionName = a })++-- | The name of the function (within your source code) that Lambda calls to+-- start running your code. For more information, see the Handler property in+-- the AWS Lambda Developer Guide. Note If you specify your source code as+-- inline text by specifying the ZipFile property within the Code property,+-- specify index.function_name as the handler.+lfHandler :: Lens' LambdaFunction (Val Text)+lfHandler = lens _lambdaFunctionHandler (\s a -> s { _lambdaFunctionHandler = a })++-- | The amount of memory, in MB, that is allocated to your Lambda function.+-- Lambda uses this value to proportionally allocate the amount of CPU power.+-- For more information, see Resource Model in the AWS Lambda Developer Guide.+-- Your function use case determines your CPU and memory requirements. For+-- example, a database operation might need less memory than an image+-- processing function. You must specify a value that is greater than or equal+-- to 128, and it must be a multiple of 64. You cannot specify a size larger+-- than 1536. The default value is 128 MB.+lfMemorySize :: Lens' LambdaFunction (Maybe (Val Integer'))+lfMemorySize = lens _lambdaFunctionMemorySize (\s a -> s { _lambdaFunctionMemorySize = a })++-- | The Amazon Resource Name (ARN) of the AWS Identity and Access Management+-- (IAM) execution role that Lambda assumes when it runs your code to access+-- AWS services.+lfRole :: Lens' LambdaFunction (Val Text)+lfRole = lens _lambdaFunctionRole (\s a -> s { _lambdaFunctionRole = a })++-- | The runtime environment for the Lambda function that you are uploading.+-- For valid values, see the Runtime property in the AWS Lambda Developer+-- Guide.+lfRuntime :: Lens' LambdaFunction (Val Text)+lfRuntime = lens _lambdaFunctionRuntime (\s a -> s { _lambdaFunctionRuntime = a })++-- | The function execution time (in seconds) after which Lambda terminates+-- the function. Because the execution time affects cost, set this value based+-- on the function's expected execution time. By default, Timeout is set to 3+-- seconds.+lfTimeout :: Lens' LambdaFunction (Maybe (Val Integer'))+lfTimeout = lens _lambdaFunctionTimeout (\s a -> s { _lambdaFunctionTimeout = a })++-- | If the Lambda function requires access to resources in a VPC, specify a+-- VPC configuration that Lambda uses to set up an elastic network interface+-- (ENI). The ENI enables your function to connect to other resources in your+-- VPC, but it doesn't provide public Internet access. If your function+-- requires Internet access (for example, to access AWS services that don't+-- have VPC endpoints), configure a Network Address Translation (NAT) instance+-- inside your VPC or use an Amazon Virtual Private Cloud (Amazon VPC) NAT+-- gateway. For more information, see NAT Gateways in the Amazon VPC User+-- Guide.+lfVpcConfig :: Lens' LambdaFunction (Maybe LambdaFunctionVPCConfig)+lfVpcConfig = lens _lambdaFunctionVpcConfig (\s a -> s { _lambdaFunctionVpcConfig = a })
+ library-gen/Stratosphere/Resources/LambdaPermission.hs view
@@ -0,0 +1,96 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::Lambda::Permission resource associates a policy statement with a+-- specific AWS Lambda (Lambda) function's access policy. The function policy+-- grants a specific AWS service or application permission to invoke the+-- function. For more information, see AddPermission in the AWS Lambda+-- Developer Guide.++module Stratosphere.Resources.LambdaPermission where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for LambdaPermission. See 'lambdaPermission'+-- for a more convenient constructor.+data LambdaPermission =+  LambdaPermission+  { _lambdaPermissionAction :: Val Text+  , _lambdaPermissionFunctionName :: Val Text+  , _lambdaPermissionPrincipal :: Val Text+  , _lambdaPermissionSourceAccount :: Maybe (Val Text)+  , _lambdaPermissionSourceArn :: Maybe (Val Text)+  } deriving (Show, Generic)++instance ToJSON LambdaPermission where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 17, omitNothingFields = True }++instance FromJSON LambdaPermission where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 17, omitNothingFields = True }++-- | Constructor for 'LambdaPermission' containing required fields as+-- arguments.+lambdaPermission+  :: Val Text -- ^ 'lpAction'+  -> Val Text -- ^ 'lpFunctionName'+  -> Val Text -- ^ 'lpPrincipal'+  -> LambdaPermission+lambdaPermission actionarg functionNamearg principalarg =+  LambdaPermission+  { _lambdaPermissionAction = actionarg+  , _lambdaPermissionFunctionName = functionNamearg+  , _lambdaPermissionPrincipal = principalarg+  , _lambdaPermissionSourceAccount = Nothing+  , _lambdaPermissionSourceArn = Nothing+  }++-- | The Lambda actions that you want to allow in this statement. For example,+-- you can specify lambda:CreateFunction to specify a certain action, or use a+-- wildcard (lambda:*) to grant permission to all Lambda actions. For a list+-- of actions, see Actions and Condition Context Keys for AWS Lambda in the+-- IAM User Guide.+lpAction :: Lens' LambdaPermission (Val Text)+lpAction = lens _lambdaPermissionAction (\s a -> s { _lambdaPermissionAction = a })++-- | The name (physical ID) or Amazon Resource Name (ARN) of the Lambda+-- function that you want to associate with this statement. Lambda adds this+-- statement to the function's access policy.+lpFunctionName :: Lens' LambdaPermission (Val Text)+lpFunctionName = lens _lambdaPermissionFunctionName (\s a -> s { _lambdaPermissionFunctionName = a })++-- | The entity for which you are granting permission to invoke the Lambda+-- function. This entity can be any valid AWS service principal, such as+-- s3.amazonaws.com or sns.amazonaws.com, or, if you are granting+-- cross-account permission, an AWS account ID. For example, you might want to+-- allow a custom application in another AWS account to push events to Lambda+-- by invoking your function.+lpPrincipal :: Lens' LambdaPermission (Val Text)+lpPrincipal = lens _lambdaPermissionPrincipal (\s a -> s { _lambdaPermissionPrincipal = a })++-- | The AWS account ID (without hyphens) of the source owner. For example, if+-- you specify an S3 bucket in the SourceArn property, this value is the+-- bucket owner's account ID. You can use this property to ensure that all+-- source principals are owned by a specific account. Important This property+-- is not supported by all event sources. For more information, see the+-- SourceAccount parameter for the AddPermission action in the AWS Lambda+-- Developer Guide.+lpSourceAccount :: Lens' LambdaPermission (Maybe (Val Text))+lpSourceAccount = lens _lambdaPermissionSourceAccount (\s a -> s { _lambdaPermissionSourceAccount = a })++-- | The ARN of a resource that is invoking your function. When granting+-- Amazon Simple Storage Service (Amazon S3) permission to invoke your+-- function, specify this property with the bucket ARN as its value. This+-- ensures that events generated only from the specified bucket, not just any+-- bucket from any AWS account that creates a mapping to your function, can+-- invoke the function. Important This property is not supported by all event+-- sources. For more information, see the SourceArn parameter for the+-- AddPermission action in the AWS Lambda Developer Guide.+lpSourceArn :: Lens' LambdaPermission (Maybe (Val Text))+lpSourceArn = lens _lambdaPermissionSourceArn (\s a -> s { _lambdaPermissionSourceArn = a })
+ library-gen/Stratosphere/Resources/LogGroup.hs view
@@ -0,0 +1,56 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::Logs::LogGroup resource creates an Amazon CloudWatch Logs log+-- group that defines common properties for log streams, such as their+-- retention and access control rules. Each log stream must belong to one log+-- group.++module Stratosphere.Resources.LogGroup where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for LogGroup. See 'logGroup' for a more+-- convenient constructor.+data LogGroup =+  LogGroup+  { _logGroupLogGroupName :: Maybe (Val Text)+  , _logGroupRetentionInDays :: Maybe (Val Integer')+  } deriving (Show, Generic)++instance ToJSON LogGroup where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 9, omitNothingFields = True }++instance FromJSON LogGroup where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 9, omitNothingFields = True }++-- | Constructor for 'LogGroup' containing required fields as arguments.+logGroup+  :: LogGroup+logGroup  =+  LogGroup+  { _logGroupLogGroupName = Nothing+  , _logGroupRetentionInDays = Nothing+  }++-- | A name for the log group. If you don't specify a name, AWS CloudFormation+-- generates a unique physical ID and uses that ID for the table name. For+-- more information, see Name Type. Important If you specify a name, you+-- cannot do updates that require this resource to be replaced. You can still+-- do updates that require no or some interruption. If you must replace the+-- resource, specify a new name.+lgLogGroupName :: Lens' LogGroup (Maybe (Val Text))+lgLogGroupName = lens _logGroupLogGroupName (\s a -> s { _logGroupLogGroupName = a })++-- | The number of days log events are kept in CloudWatch Logs. When a log+-- event expires, CloudWatch Logs automatically deletes it. For valid values,+-- see PutRetentionPolicy in the Amazon CloudWatch Logs API Reference.+lgRetentionInDays :: Lens' LogGroup (Maybe (Val Integer'))+lgRetentionInDays = lens _logGroupRetentionInDays (\s a -> s { _logGroupRetentionInDays = a })
+ library-gen/Stratosphere/Resources/LogStream.hs view
@@ -0,0 +1,52 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::Logs::LogStream resource creates an Amazon CloudWatch Logs log+-- stream in a log group. A log stream represents the sequence of events+-- coming from an application instance or resource that you are monitoring.+-- For more information, see Monitoring Log Files in the Amazon CloudWatch+-- Developer Guide.++module Stratosphere.Resources.LogStream where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+++-- | Full data type definition for LogStream. See 'logStream' for a more+-- convenient constructor.+data LogStream =+  LogStream+  { _logStreamLogGroupName :: Val Text+  , _logStreamLogStreamName :: Maybe (Val Text)+  } deriving (Show, Generic)++instance ToJSON LogStream where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 10, omitNothingFields = True }++instance FromJSON LogStream where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 10, omitNothingFields = True }++-- | Constructor for 'LogStream' containing required fields as arguments.+logStream+  :: Val Text -- ^ 'lsLogGroupName'+  -> LogStream+logStream logGroupNamearg =+  LogStream+  { _logStreamLogGroupName = logGroupNamearg+  , _logStreamLogStreamName = Nothing+  }++-- | The name of the log group where the log stream is created.+lsLogGroupName :: Lens' LogStream (Val Text)+lsLogGroupName = lens _logStreamLogGroupName (\s a -> s { _logStreamLogGroupName = a })++-- | The name of the log stream to create. The name must be unique within the+-- log group.+lsLogStreamName :: Lens' LogStream (Maybe (Val Text))+lsLogStreamName = lens _logStreamLogStreamName (\s a -> s { _logStreamLogStreamName = a })
library/Stratosphere/Types.hs view
@@ -1,13 +1,18 @@ {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}  -- | Module for hand-written types that are used in generated modules.  module Stratosphere.Types   ( CannedACL (..)+  , KinesisFirehoseS3CompressionFormat(..)+  , KinesisFirehoseElasticsearchS3BackupMode(..)+  , KinesisFirehoseNoEncryptionConfig(..)   ) where  import Data.Aeson+import Data.Text (unpack) import GHC.Generics  -- | Amazon S3 supports a set of predefined grants, known as canned ACLs. Each@@ -25,3 +30,68 @@   | PublicRead   | PublicReadWrite   deriving (Show, Read, Eq, Generic, FromJSON, ToJSON)+++-- | See:+-- http://docs.aws.amazon.com/firehose/latest/APIReference/API_S3DestinationConfiguration.html+data KinesisFirehoseS3CompressionFormat+  = KFS3Uncompressed+  | KFS3Gzip+  | KFS3Zip+  | KFS3Snappy+  deriving (Show, Read, Eq, Generic)+++instance ToJSON KinesisFirehoseS3CompressionFormat where+  toJSON KFS3Uncompressed = String "UNCOMPRESSED"+  toJSON KFS3Gzip         = String "GZIP"+  toJSON KFS3Zip          = String "ZIP"+  toJSON KFS3Snappy       = String "SNAPPY"+++instance FromJSON KinesisFirehoseS3CompressionFormat where+  parseJSON = withText "KinesisFirehoseS3CompressionFormat" parse+    where+      parse "UNCOMPRESSED" = pure KFS3Uncompressed+      parse "GZIP"         = pure KFS3Gzip+      parse "ZIP"          = pure KFS3Zip+      parse "SNAPPY"       = pure KFS3Snappy+      parse fmt            = fail ("Unexpected compression format " ++ unpack fmt)+++-- | See:+-- http://docs.aws.amazon.com/firehose/latest/APIReference/API_ElasticsearchDestinationConfiguration.html+data KinesisFirehoseElasticsearchS3BackupMode+  = KFS3FailedDocumentsOnly+  | KFS3AllDocuments+  deriving (Show, Read, Eq, Generic)+++instance ToJSON KinesisFirehoseElasticsearchS3BackupMode where+  toJSON KFS3FailedDocumentsOnly = String "FailedDocumentsOnly"+  toJSON KFS3AllDocuments        = String "AllDocuments"+++instance FromJSON KinesisFirehoseElasticsearchS3BackupMode where+  parseJSON = withText "KinesisFirehoseElasticsearchS3BackupMode" parse+    where+      parse "FailedDocumentsOnly" = pure KFS3FailedDocumentsOnly+      parse "AllDocuments"        = pure KFS3AllDocuments+      parse t                     = fail ("Unexpected S3 backup mode " ++ unpack t)+++-- | See:+-- http://docs.aws.amazon.com/firehose/latest/APIReference/API_EncryptionConfiguration.html+data KinesisFirehoseNoEncryptionConfig = KinesisFirehoseNoEncryptionConfig+     deriving (Show, Read, Eq, Generic)+++instance ToJSON KinesisFirehoseNoEncryptionConfig where+  toJSON _ = String "NoEncryption"+++instance FromJSON KinesisFirehoseNoEncryptionConfig where+  parseJSON = withText "KinesisFirehoseNoEncryptionConfig" parse+    where+      parse "NoEncryption" = pure KinesisFirehoseNoEncryptionConfig+      parse t              = fail ("Unexpected no encryption config value " ++ unpack t)
library/Stratosphere/Values.hs view
@@ -44,6 +44,7 @@  | Select Integer' (Val a)  | GetAZs (Val a)  | FindInMap (Val a) (Val a) (Val a) -- ^ Map name, top level key, and second level key+ | ImportValue T.Text -- ^ The account-and-region-unique exported name of the value to import  deriving instance (Show a) => Show (Val a) @@ -64,6 +65,7 @@   toJSON (GetAZs r) = object [("Fn::GetAZs", toJSON r)]   toJSON (FindInMap mapName topKey secondKey) =     object [("Fn::FindInMap", toJSON [toJSON mapName, toJSON topKey, toJSON secondKey])]+  toJSON (ImportValue t) = object [("Fn::ImportValue", toJSON t)]  mkFunc :: T.Text -> [Value] -> Value mkFunc name args = object [(name, Array $ fromList args)]@@ -85,6 +87,7 @@       [("Fn::FindInMap", o')] -> do         (mapName, topKey, secondKey) <- parseJSON o'         return (FindInMap mapName topKey secondKey)+      [("Fn::ImportValue", o')] -> ImportValue <$> parseJSON o'       [(n, o')] -> Literal <$> parseJSON (object [(n, o')])       os -> Literal <$> parseJSON (object os)   parseJSON v = Literal <$> parseJSON v
stratosphere.cabal view
@@ -3,7 +3,7 @@ -- see: https://github.com/sol/hpack  name:           stratosphere-version:        0.1.6+version:        0.2.0 synopsis:       EDSL for AWS CloudFormation description:    EDSL for AWS CloudFormation category:       AWS, Cloud@@ -25,6 +25,11 @@   type: git   location: https://github.com/frontrowed/stratosphere +flag library-only+  description: Don't compile examples+  manual: True+  default: True+ library   hs-source-dirs:       library@@ -55,6 +60,16 @@       Stratosphere.ResourceAttributes.UpdatePolicy       Stratosphere.ResourceProperties.AccessLoggingPolicy       Stratosphere.ResourceProperties.AliasTarget+      Stratosphere.ResourceProperties.APIGatewayDeploymentStageDescription+      Stratosphere.ResourceProperties.APIGatewayDeploymentStageDescriptionMethodSetting+      Stratosphere.ResourceProperties.ApiGatewayIntegration+      Stratosphere.ResourceProperties.ApiGatewayIntegrationResponse+      Stratosphere.ResourceProperties.ApiGatewayMethodResponse+      Stratosphere.ResourceProperties.ApiGatewayRestApiS3Location+      Stratosphere.ResourceProperties.ApiGatewayStageMethodSetting+      Stratosphere.ResourceProperties.ApiGatewayUsagePlanApiStage+      Stratosphere.ResourceProperties.ApiGatewayUsagePlanQuotaSettings+      Stratosphere.ResourceProperties.ApiGatewayUsagePlanThrottleSettings       Stratosphere.ResourceProperties.AppCookieStickinessPolicy       Stratosphere.ResourceProperties.AutoScalingBlockDeviceMapping       Stratosphere.ResourceProperties.AutoScalingEBSBlockDevice@@ -71,6 +86,17 @@       Stratosphere.ResourceProperties.ELBPolicy       Stratosphere.ResourceProperties.HealthCheck       Stratosphere.ResourceProperties.IAMPolicies+      Stratosphere.ResourceProperties.KinesisFirehoseBufferingHints+      Stratosphere.ResourceProperties.KinesisFirehoseCloudWatchLoggingOptions+      Stratosphere.ResourceProperties.KinesisFirehoseElasticsearchDestinationConfiguration+      Stratosphere.ResourceProperties.KinesisFirehoseElasticsearchRetryOptions+      Stratosphere.ResourceProperties.KinesisFirehoseRedshiftCopyCommand+      Stratosphere.ResourceProperties.KinesisFirehoseRedshiftDestinationConfiguration+      Stratosphere.ResourceProperties.KinesisFirehoseS3DestinationConfiguration+      Stratosphere.ResourceProperties.KinesisFirehoseS3EncryptionConfiguration+      Stratosphere.ResourceProperties.KinesisFirehoseS3KMSEncryptionConfig+      Stratosphere.ResourceProperties.LambdaFunctionCode+      Stratosphere.ResourceProperties.LambdaFunctionVPCConfig       Stratosphere.ResourceProperties.LBCookieStickinessPolicy       Stratosphere.ResourceProperties.ListenerProperty       Stratosphere.ResourceProperties.NameValuePair@@ -108,13 +134,24 @@       Stratosphere.ResourceProperties.UserLoginProfile       Stratosphere.Resources       Stratosphere.Resources.AccessKey+      Stratosphere.Resources.ApiGatewayAccount+      Stratosphere.Resources.ApiGatewayDeployment+      Stratosphere.Resources.ApiGatewayMethod+      Stratosphere.Resources.ApiGatewayModel+      Stratosphere.Resources.ApiGatewayResource+      Stratosphere.Resources.ApiGatewayRestApi+      Stratosphere.Resources.ApiGatewayStage+      Stratosphere.Resources.ApiGatewayUsagePlan       Stratosphere.Resources.AutoScalingGroup       Stratosphere.Resources.Bucket+      Stratosphere.Resources.CacheCluster+      Stratosphere.Resources.CacheSubnetGroup       Stratosphere.Resources.DBInstance       Stratosphere.Resources.DBParameterGroup       Stratosphere.Resources.DBSecurityGroup       Stratosphere.Resources.DBSecurityGroupIngress       Stratosphere.Resources.DBSubnetGroup+      Stratosphere.Resources.DeliveryStream       Stratosphere.Resources.EC2Instance       Stratosphere.Resources.EIP       Stratosphere.Resources.EIPAssociation@@ -122,9 +159,14 @@       Stratosphere.Resources.IAMRole       Stratosphere.Resources.InstanceProfile       Stratosphere.Resources.InternetGateway+      Stratosphere.Resources.KinesisStream+      Stratosphere.Resources.LambdaFunction+      Stratosphere.Resources.LambdaPermission       Stratosphere.Resources.LaunchConfiguration       Stratosphere.Resources.LifecycleHook       Stratosphere.Resources.LoadBalancer+      Stratosphere.Resources.LogGroup+      Stratosphere.Resources.LogStream       Stratosphere.Resources.ManagedPolicy       Stratosphere.Resources.NatGateway       Stratosphere.Resources.Policy@@ -151,6 +193,25 @@       Stratosphere.Resources.VPCGatewayAttachment   default-language: Haskell2010 +executable api-gateway-lambda+  main-is: api-gateway-lambda.hs+  hs-source-dirs:+      examples+  ghc-options: -Wall+  build-depends:+      base >= 4.8 && < 5+    , aeson >= 0.11+    , aeson-pretty >= 0.8+    , bytestring+    , lens >= 4.5+    , template-haskell >= 2.0+    , text >= 1.1+    , unordered-containers >= 0.2+    , stratosphere+  if flag(library-only)+    buildable: False+  default-language: Haskell2010+ executable auto-scaling-group   main-is: auto-scaling-group.hs   hs-source-dirs:@@ -166,6 +227,8 @@     , text >= 1.1     , unordered-containers >= 0.2     , stratosphere+  if flag(library-only)+    buildable: False   default-language: Haskell2010  executable ec2-with-eip@@ -183,6 +246,8 @@     , text >= 1.1     , unordered-containers >= 0.2     , stratosphere+  if flag(library-only)+    buildable: False   default-language: Haskell2010  executable rds-master-replica@@ -200,6 +265,46 @@     , text >= 1.1     , unordered-containers >= 0.2     , stratosphere+  if flag(library-only)+    buildable: False+  default-language: Haskell2010++executable s3-copy+  main-is: s3-copy.hs+  hs-source-dirs:+      examples+  ghc-options: -Wall+  build-depends:+      base >= 4.8 && < 5+    , aeson >= 0.11+    , aeson-pretty >= 0.8+    , bytestring+    , lens >= 4.5+    , template-haskell >= 2.0+    , text >= 1.1+    , unordered-containers >= 0.2+    , stratosphere+  if flag(library-only)+    buildable: False+  default-language: Haskell2010++executable simple-lambda+  main-is: simple-lambda.hs+  hs-source-dirs:+      examples+  ghc-options: -Wall+  build-depends:+      base >= 4.8 && < 5+    , aeson >= 0.11+    , aeson-pretty >= 0.8+    , bytestring+    , lens >= 4.5+    , template-haskell >= 2.0+    , text >= 1.1+    , unordered-containers >= 0.2+    , stratosphere+  if flag(library-only)+    buildable: False   default-language: Haskell2010  test-suite style