packages feed

stratosphere 0.1.4 → 0.1.5

raw patch · 37 files changed

+2216/−153 lines, 37 files

Files

CHANGELOG.md view
@@ -1,5 +1,15 @@ # Change Log +## 0.1.5++* Added S3 buckets and bucket policies+* Added CloudTrail Trail (Thanks @timmytofu!)+* Added the `FindInMap` intrinsic function. (Thanks @MichaelXavier!)+* Added `SecurityGroupEgress` and `SecurityGroupIngress` rules. (Thanks+  @MichaelXavier!)+* Fixed type of ELB policy using the more specific `NameAndValue` type. (Thanks+  @MichaelXavier!)+ ## 0.1.4  * Added `UserName` property to the IAM User resource. (Thanks @timmytofu!)
library-gen/Stratosphere/ResourceProperties/ELBPolicy.hs view
@@ -15,13 +15,13 @@ import GHC.Generics  import Stratosphere.Values-+import Stratosphere.ResourceProperties.NameValuePair  -- | Full data type definition for ELBPolicy. See 'elbPolicy' for a more -- convenient constructor. data ELBPolicy =   ELBPolicy-  { _eLBPolicyAttributes :: Object+  { _eLBPolicyAttributes :: [NameValuePair]   , _eLBPolicyInstancePorts :: Maybe [Val Text]   , _eLBPolicyLoadBalancerPorts :: Maybe [Val Text]   , _eLBPolicyPolicyName :: Val Text@@ -36,7 +36,7 @@  -- | Constructor for 'ELBPolicy' containing required fields as arguments. elbPolicy-  :: Object -- ^ 'elbpAttributes'+  :: [NameValuePair] -- ^ 'elbpAttributes'   -> Val Text -- ^ 'elbpPolicyName'   -> Val Text -- ^ 'elbpPolicyType'   -> ELBPolicy@@ -51,7 +51,7 @@  -- | A list of arbitrary attributes for this policy. If you don't need to -- specify any policy attributes, specify an empty list ([]).-elbpAttributes :: Lens' ELBPolicy Object+elbpAttributes :: Lens' ELBPolicy [NameValuePair] elbpAttributes = lens _eLBPolicyAttributes (\s a -> s { _eLBPolicyAttributes = a })  -- | A list of instance ports for the policy. These are the ports associated
+ library-gen/Stratosphere/ResourceProperties/NameValuePair.hs view
@@ -0,0 +1,48 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | A pair of name and value. Used in ELB Attributes++module Stratosphere.ResourceProperties.NameValuePair 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 NameValuePair. See 'nameValuePair' for a+-- more convenient constructor.+data NameValuePair =+  NameValuePair+  { _nameValuePairName :: Val Text+  , _nameValuePairValue :: Val Text+  } deriving (Show, Generic)++instance ToJSON NameValuePair where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 14, omitNothingFields = True }++instance FromJSON NameValuePair where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 14, omitNothingFields = True }++-- | Constructor for 'NameValuePair' containing required fields as arguments.+nameValuePair+  :: Val Text -- ^ 'nvpName'+  -> Val Text -- ^ 'nvpValue'+  -> NameValuePair+nameValuePair namearg valuearg =+  NameValuePair+  { _nameValuePairName = namearg+  , _nameValuePairValue = valuearg+  }++-- | The name of an attribute+nvpName :: Lens' NameValuePair (Val Text)+nvpName = lens _nameValuePairName (\s a -> s { _nameValuePairName = a })++-- | The value of an attribute+nvpValue :: Lens' NameValuePair (Val Text)+nvpValue = lens _nameValuePairValue (\s a -> s { _nameValuePairValue = a })
+ library-gen/Stratosphere/ResourceProperties/S3CorsConfiguration.hs view
@@ -0,0 +1,43 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | Describes the cross-origin access configuration for objects in an+-- AWS::S3::Bucket resource.++module Stratosphere.ResourceProperties.S3CorsConfiguration where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.S3CorsConfigurationRule++-- | Full data type definition for S3CorsConfiguration. See+-- 's3CorsConfiguration' for a more convenient constructor.+data S3CorsConfiguration =+  S3CorsConfiguration+  { _s3CorsConfigurationCorsRules :: [S3CorsConfigurationRule]+  } deriving (Show, Generic)++instance ToJSON S3CorsConfiguration where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 20, omitNothingFields = True }++instance FromJSON S3CorsConfiguration where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 20, omitNothingFields = True }++-- | Constructor for 'S3CorsConfiguration' containing required fields as+-- arguments.+s3CorsConfiguration+  :: [S3CorsConfigurationRule] -- ^ 'sccCorsRules'+  -> S3CorsConfiguration+s3CorsConfiguration corsRulesarg =+  S3CorsConfiguration+  { _s3CorsConfigurationCorsRules = corsRulesarg+  }++-- | A set of origins and methods that you allow.+sccCorsRules :: Lens' S3CorsConfiguration [S3CorsConfigurationRule]+sccCorsRules = lens _s3CorsConfigurationCorsRules (\s a -> s { _s3CorsConfigurationCorsRules = a })
+ library-gen/Stratosphere/ResourceProperties/S3CorsConfigurationRule.hs view
@@ -0,0 +1,81 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | Describes cross-origin access rules for the Amazon S3 Cors Configuration+-- property.++module Stratosphere.ResourceProperties.S3CorsConfigurationRule 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 S3CorsConfigurationRule. See+-- 's3CorsConfigurationRule' for a more convenient constructor.+data S3CorsConfigurationRule =+  S3CorsConfigurationRule+  { _s3CorsConfigurationRuleAllowedHeaders :: Maybe [Val Text]+  , _s3CorsConfigurationRuleAllowedMethods :: [Val Text]+  , _s3CorsConfigurationRuleAllowedOrigins :: [Val Text]+  , _s3CorsConfigurationRuleExposedHeaders :: Maybe [Val Text]+  , _s3CorsConfigurationRuleId :: Maybe (Val Text)+  , _s3CorsConfigurationRuleMaxAge :: Maybe (Val Integer')+  } deriving (Show, Generic)++instance ToJSON S3CorsConfigurationRule where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 24, omitNothingFields = True }++instance FromJSON S3CorsConfigurationRule where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 24, omitNothingFields = True }++-- | Constructor for 'S3CorsConfigurationRule' containing required fields as+-- arguments.+s3CorsConfigurationRule+  :: [Val Text] -- ^ 'sccrAllowedMethods'+  -> [Val Text] -- ^ 'sccrAllowedOrigins'+  -> S3CorsConfigurationRule+s3CorsConfigurationRule allowedMethodsarg allowedOriginsarg =+  S3CorsConfigurationRule+  { _s3CorsConfigurationRuleAllowedHeaders = Nothing+  , _s3CorsConfigurationRuleAllowedMethods = allowedMethodsarg+  , _s3CorsConfigurationRuleAllowedOrigins = allowedOriginsarg+  , _s3CorsConfigurationRuleExposedHeaders = Nothing+  , _s3CorsConfigurationRuleId = Nothing+  , _s3CorsConfigurationRuleMaxAge = Nothing+  }++-- | Headers that are specified in the Access-Control-Request-Headers header.+-- These headers are allowed in a preflight OPTIONS request. In response to+-- any preflight OPTIONS request, Amazon S3 returns any requested headers that+-- are allowed.+sccrAllowedHeaders :: Lens' S3CorsConfigurationRule (Maybe [Val Text])+sccrAllowedHeaders = lens _s3CorsConfigurationRuleAllowedHeaders (\s a -> s { _s3CorsConfigurationRuleAllowedHeaders = a })++-- | An HTTP method that you allow the origin to execute. The valid values are+-- GET, PUT, HEAD, POST, and DELETE.+sccrAllowedMethods :: Lens' S3CorsConfigurationRule [Val Text]+sccrAllowedMethods = lens _s3CorsConfigurationRuleAllowedMethods (\s a -> s { _s3CorsConfigurationRuleAllowedMethods = a })++-- | An origin that you allow to send cross-domain requests.+sccrAllowedOrigins :: Lens' S3CorsConfigurationRule [Val Text]+sccrAllowedOrigins = lens _s3CorsConfigurationRuleAllowedOrigins (\s a -> s { _s3CorsConfigurationRuleAllowedOrigins = a })++-- | One or more headers in the response that are accessible to client+-- applications (for example, from a JavaScript XMLHttpRequest object).+sccrExposedHeaders :: Lens' S3CorsConfigurationRule (Maybe [Val Text])+sccrExposedHeaders = lens _s3CorsConfigurationRuleExposedHeaders (\s a -> s { _s3CorsConfigurationRuleExposedHeaders = a })++-- | A unique identifier for this rule. The value cannot be more than 255+-- characters.+sccrId :: Lens' S3CorsConfigurationRule (Maybe (Val Text))+sccrId = lens _s3CorsConfigurationRuleId (\s a -> s { _s3CorsConfigurationRuleId = a })++-- | The time in seconds that your browser is to cache the preflight response+-- for the specified resource.+sccrMaxAge :: Lens' S3CorsConfigurationRule (Maybe (Val Integer'))+sccrMaxAge = lens _s3CorsConfigurationRuleMaxAge (\s a -> s { _s3CorsConfigurationRuleMaxAge = a })
+ library-gen/Stratosphere/ResourceProperties/S3LifecycleConfiguration.hs view
@@ -0,0 +1,43 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | Describes the lifecycle configuration for objects in an AWS::S3::Bucket+-- resource.++module Stratosphere.ResourceProperties.S3LifecycleConfiguration where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.S3LifecycleRule++-- | Full data type definition for S3LifecycleConfiguration. See+-- 's3LifecycleConfiguration' for a more convenient constructor.+data S3LifecycleConfiguration =+  S3LifecycleConfiguration+  { _s3LifecycleConfigurationRules :: [S3LifecycleRule]+  } deriving (Show, Generic)++instance ToJSON S3LifecycleConfiguration where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 25, omitNothingFields = True }++instance FromJSON S3LifecycleConfiguration where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 25, omitNothingFields = True }++-- | Constructor for 'S3LifecycleConfiguration' containing required fields as+-- arguments.+s3LifecycleConfiguration+  :: [S3LifecycleRule] -- ^ 'slcRules'+  -> S3LifecycleConfiguration+s3LifecycleConfiguration rulesarg =+  S3LifecycleConfiguration+  { _s3LifecycleConfigurationRules = rulesarg+  }++-- | A lifecycle rule for individual objects in an S3 bucket.+slcRules :: Lens' S3LifecycleConfiguration [S3LifecycleRule]+slcRules = lens _s3LifecycleConfigurationRules (\s a -> s { _s3LifecycleConfigurationRules = a })
+ library-gen/Stratosphere/ResourceProperties/S3LifecycleRule.hs view
@@ -0,0 +1,131 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | Describes lifecycle rules for the Amazon S3 Lifecycle Configuration+-- property.++module Stratosphere.ResourceProperties.S3LifecycleRule where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.S3LifecycleRuleNoncurrentVersionTransition+import Stratosphere.ResourceProperties.S3LifecycleRuleTransition++-- | Full data type definition for S3LifecycleRule. See 's3LifecycleRule' for+-- a more convenient constructor.+data S3LifecycleRule =+  S3LifecycleRule+  { _s3LifecycleRuleExpirationDate :: Maybe (Val Text)+  , _s3LifecycleRuleExpirationInDays :: Maybe (Val Integer')+  , _s3LifecycleRuleId :: Maybe (Val Text)+  , _s3LifecycleRuleNoncurrentVersionExpirationInDays :: Maybe (Val Integer')+  , _s3LifecycleRuleNoncurrentVersionTransition :: Maybe S3LifecycleRuleNoncurrentVersionTransition+  , _s3LifecycleRuleNoncurrentVersionTransitions :: Maybe [S3LifecycleRuleNoncurrentVersionTransition]+  , _s3LifecycleRulePrefix :: Maybe (Val Text)+  , _s3LifecycleRuleStatus :: Val Text+  , _s3LifecycleRuleTransition :: Maybe S3LifecycleRuleTransition+  , _s3LifecycleRuleTransitions :: Maybe [S3LifecycleRuleTransition]+  } deriving (Show, Generic)++instance ToJSON S3LifecycleRule where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 16, omitNothingFields = True }++instance FromJSON S3LifecycleRule where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 16, omitNothingFields = True }++-- | Constructor for 'S3LifecycleRule' containing required fields as+-- arguments.+s3LifecycleRule+  :: Val Text -- ^ 'slrStatus'+  -> S3LifecycleRule+s3LifecycleRule statusarg =+  S3LifecycleRule+  { _s3LifecycleRuleExpirationDate = Nothing+  , _s3LifecycleRuleExpirationInDays = Nothing+  , _s3LifecycleRuleId = Nothing+  , _s3LifecycleRuleNoncurrentVersionExpirationInDays = Nothing+  , _s3LifecycleRuleNoncurrentVersionTransition = Nothing+  , _s3LifecycleRuleNoncurrentVersionTransitions = Nothing+  , _s3LifecycleRulePrefix = Nothing+  , _s3LifecycleRuleStatus = statusarg+  , _s3LifecycleRuleTransition = Nothing+  , _s3LifecycleRuleTransitions = Nothing+  }++-- | Indicates when objects are deleted from Amazon S3 and Amazon Glacier. The+-- date value must be in ISO 8601 format. The time is always midnight UTC. If+-- you specify an expiration and transition time, you must use the same time+-- unit for both properties (either in days or by date). The expiration time+-- must also be later than the transition time.+slrExpirationDate :: Lens' S3LifecycleRule (Maybe (Val Text))+slrExpirationDate = lens _s3LifecycleRuleExpirationDate (\s a -> s { _s3LifecycleRuleExpirationDate = a })++-- | Indicates the number of days after creation when objects are deleted from+-- Amazon S3 and Amazon Glacier. If you specify an expiration and transition+-- time, you must use the same time unit for both properties (either in days+-- or by date). The expiration time must also be later than the transition+-- time.+slrExpirationInDays :: Lens' S3LifecycleRule (Maybe (Val Integer'))+slrExpirationInDays = lens _s3LifecycleRuleExpirationInDays (\s a -> s { _s3LifecycleRuleExpirationInDays = a })++-- | A unique identifier for this rule. The value cannot be more than 255+-- characters.+slrId :: Lens' S3LifecycleRule (Maybe (Val Text))+slrId = lens _s3LifecycleRuleId (\s a -> s { _s3LifecycleRuleId = a })++-- | For buckets with versioning enabled (or suspended), specifies the time,+-- in days, between when a new version of the object is uploaded to the bucket+-- and when old versions of the object expire. When object versions expire,+-- Amazon S3 permanently deletes them. If you specify a transition and+-- expiration time, the expiration time must be later than the transition+-- time.+slrNoncurrentVersionExpirationInDays :: Lens' S3LifecycleRule (Maybe (Val Integer'))+slrNoncurrentVersionExpirationInDays = lens _s3LifecycleRuleNoncurrentVersionExpirationInDays (\s a -> s { _s3LifecycleRuleNoncurrentVersionExpirationInDays = a })++-- | For buckets with versioning enabled (or suspended), specifies when+-- non-current objects transition to a specified storage class. If you specify+-- a transition and expiration time, the expiration time must be later than+-- the transition time. If you specify this property, don't specify the+-- NoncurrentVersionTransitions property.+slrNoncurrentVersionTransition :: Lens' S3LifecycleRule (Maybe S3LifecycleRuleNoncurrentVersionTransition)+slrNoncurrentVersionTransition = lens _s3LifecycleRuleNoncurrentVersionTransition (\s a -> s { _s3LifecycleRuleNoncurrentVersionTransition = a })++-- | For buckets with versioning enabled (or suspended), one or more+-- transition rules that specify when non-current objects transition to a+-- specified storage class. If you specify a transition and expiration time,+-- the expiration time must be later than the transition time. If you specify+-- this property, don't specify the NoncurrentVersionTransition property.+slrNoncurrentVersionTransitions :: Lens' S3LifecycleRule (Maybe [S3LifecycleRuleNoncurrentVersionTransition])+slrNoncurrentVersionTransitions = lens _s3LifecycleRuleNoncurrentVersionTransitions (\s a -> s { _s3LifecycleRuleNoncurrentVersionTransitions = a })++-- | Object key prefix that identifies one or more objects to which this rule+-- applies.+slrPrefix :: Lens' S3LifecycleRule (Maybe (Val Text))+slrPrefix = lens _s3LifecycleRulePrefix (\s a -> s { _s3LifecycleRulePrefix = a })++-- | Specify either Enabled or Disabled. If you specify Enabled, Amazon S3+-- executes this rule as scheduled. If you specify Disabled, Amazon S3 ignores+-- this rule.+slrStatus :: Lens' S3LifecycleRule (Val Text)+slrStatus = lens _s3LifecycleRuleStatus (\s a -> s { _s3LifecycleRuleStatus = a })++-- | Specifies when an object transitions to a specified storage class. If you+-- specify an expiration and transition time, you must use the same time unit+-- for both properties (either in days or by date). The expiration time must+-- also be later than the transition time. If you specify this property, don't+-- specify the Transitions property.+slrTransition :: Lens' S3LifecycleRule (Maybe S3LifecycleRuleTransition)+slrTransition = lens _s3LifecycleRuleTransition (\s a -> s { _s3LifecycleRuleTransition = a })++-- | One or more transition rules that specify when an object transitions to a+-- specified storage class. If you specify an expiration and transition time,+-- you must use the same time unit for both properties (either in days or by+-- date). The expiration time must also be later than the transition time. If+-- you specify this property, don't specify the Transition property.+slrTransitions :: Lens' S3LifecycleRule (Maybe [S3LifecycleRuleTransition])+slrTransitions = lens _s3LifecycleRuleTransitions (\s a -> s { _s3LifecycleRuleTransitions = a })
+ library-gen/Stratosphere/ResourceProperties/S3LifecycleRuleNoncurrentVersionTransition.hs view
@@ -0,0 +1,56 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | NoncurrentVersionTransition is a property of the Amazon S3 Lifecycle Rule+-- property that describes when noncurrent objects transition to a specified+-- storage class.++module Stratosphere.ResourceProperties.S3LifecycleRuleNoncurrentVersionTransition 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 S3LifecycleRuleNoncurrentVersionTransition.+-- See 's3LifecycleRuleNoncurrentVersionTransition' for a more convenient+-- constructor.+data S3LifecycleRuleNoncurrentVersionTransition =+  S3LifecycleRuleNoncurrentVersionTransition+  { _s3LifecycleRuleNoncurrentVersionTransitionStorageClass :: Val Text+  , _s3LifecycleRuleNoncurrentVersionTransitionTransitionInDays :: Val Integer'+  } deriving (Show, Generic)++instance ToJSON S3LifecycleRuleNoncurrentVersionTransition where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 43, omitNothingFields = True }++instance FromJSON S3LifecycleRuleNoncurrentVersionTransition where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 43, omitNothingFields = True }++-- | Constructor for 'S3LifecycleRuleNoncurrentVersionTransition' containing+-- required fields as arguments.+s3LifecycleRuleNoncurrentVersionTransition+  :: Val Text -- ^ 'slrnvtStorageClass'+  -> Val Integer' -- ^ 'slrnvtTransitionInDays'+  -> S3LifecycleRuleNoncurrentVersionTransition+s3LifecycleRuleNoncurrentVersionTransition storageClassarg transitionInDaysarg =+  S3LifecycleRuleNoncurrentVersionTransition+  { _s3LifecycleRuleNoncurrentVersionTransitionStorageClass = storageClassarg+  , _s3LifecycleRuleNoncurrentVersionTransitionTransitionInDays = transitionInDaysarg+  }++-- | The storage class to which you want the object to transition, such as+-- GLACIER. For valid values, see the StorageClass request element of the PUT+-- Bucket lifecycle action in the Amazon Simple Storage Service API Reference.+slrnvtStorageClass :: Lens' S3LifecycleRuleNoncurrentVersionTransition (Val Text)+slrnvtStorageClass = lens _s3LifecycleRuleNoncurrentVersionTransitionStorageClass (\s a -> s { _s3LifecycleRuleNoncurrentVersionTransitionStorageClass = a })++-- | The number of days between the time that a new version of the object is+-- uploaded to the bucket and when old versions of the object are transitioned+-- to the specified storage class.+slrnvtTransitionInDays :: Lens' S3LifecycleRuleNoncurrentVersionTransition (Val Integer')+slrnvtTransitionInDays = lens _s3LifecycleRuleNoncurrentVersionTransitionTransitionInDays (\s a -> s { _s3LifecycleRuleNoncurrentVersionTransitionTransitionInDays = a })
+ library-gen/Stratosphere/ResourceProperties/S3LifecycleRuleTransition.hs view
@@ -0,0 +1,59 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | Describes when an object transitions to a specified storage class for the+-- Amazon S3 Lifecycle Rule property.++module Stratosphere.ResourceProperties.S3LifecycleRuleTransition 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 S3LifecycleRuleTransition. See+-- 's3LifecycleRuleTransition' for a more convenient constructor.+data S3LifecycleRuleTransition =+  S3LifecycleRuleTransition+  { _s3LifecycleRuleTransitionStorageClass :: Val Text+  , _s3LifecycleRuleTransitionTransitionDate :: Maybe (Val Text)+  , _s3LifecycleRuleTransitionTransitionInDays :: Maybe (Val Integer')+  } deriving (Show, Generic)++instance ToJSON S3LifecycleRuleTransition where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 26, omitNothingFields = True }++instance FromJSON S3LifecycleRuleTransition where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 26, omitNothingFields = True }++-- | Constructor for 'S3LifecycleRuleTransition' containing required fields as+-- arguments.+s3LifecycleRuleTransition+  :: Val Text -- ^ 'slrtStorageClass'+  -> S3LifecycleRuleTransition+s3LifecycleRuleTransition storageClassarg =+  S3LifecycleRuleTransition+  { _s3LifecycleRuleTransitionStorageClass = storageClassarg+  , _s3LifecycleRuleTransitionTransitionDate = Nothing+  , _s3LifecycleRuleTransitionTransitionInDays = Nothing+  }++-- | The storage class to which you want the object to transition, such as+-- GLACIER. For valid values, see the StorageClass request element of the PUT+-- Bucket lifecycle action in the Amazon Simple Storage Service API Reference.+slrtStorageClass :: Lens' S3LifecycleRuleTransition (Val Text)+slrtStorageClass = lens _s3LifecycleRuleTransitionStorageClass (\s a -> s { _s3LifecycleRuleTransitionStorageClass = a })++-- | Indicates when objects are transitioned to the specified storage class.+-- The date value must be in ISO 8601 format. The time is always midnight UTC.+slrtTransitionDate :: Lens' S3LifecycleRuleTransition (Maybe (Val Text))+slrtTransitionDate = lens _s3LifecycleRuleTransitionTransitionDate (\s a -> s { _s3LifecycleRuleTransitionTransitionDate = a })++-- | Indicates the number of days after creation when objects are transitioned+-- to the specified storage class.+slrtTransitionInDays :: Lens' S3LifecycleRuleTransition (Maybe (Val Integer'))+slrtTransitionInDays = lens _s3LifecycleRuleTransitionTransitionInDays (\s a -> s { _s3LifecycleRuleTransitionTransitionInDays = a })
+ library-gen/Stratosphere/ResourceProperties/S3LoggingConfiguration.hs view
@@ -0,0 +1,55 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | Describes where logs are stored and the prefix that Amazon S3 assigns to+-- all log object keys for an AWS::S3::Bucket resource. These logs track+-- requests to an Amazon S3 bucket. For more information, see PUT Bucket+-- logging in the Amazon Simple Storage Service API Reference.++module Stratosphere.ResourceProperties.S3LoggingConfiguration 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 S3LoggingConfiguration. See+-- 's3LoggingConfiguration' for a more convenient constructor.+data S3LoggingConfiguration =+  S3LoggingConfiguration+  { _s3LoggingConfigurationDestinationBucketName :: Maybe (Val Text)+  , _s3LoggingConfigurationLogFilePrefix :: Maybe (Val Text)+  } deriving (Show, Generic)++instance ToJSON S3LoggingConfiguration where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 23, omitNothingFields = True }++instance FromJSON S3LoggingConfiguration where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 23, omitNothingFields = True }++-- | Constructor for 'S3LoggingConfiguration' containing required fields as+-- arguments.+s3LoggingConfiguration+  :: S3LoggingConfiguration+s3LoggingConfiguration  =+  S3LoggingConfiguration+  { _s3LoggingConfigurationDestinationBucketName = Nothing+  , _s3LoggingConfigurationLogFilePrefix = Nothing+  }++-- | The name of an Amazon S3 bucket where Amazon S3 store server access log+-- files. You can store log files in any bucket that you own. By default, logs+-- are stored in the bucket where the LoggingConfiguration property is+-- defined.+slcDestinationBucketName :: Lens' S3LoggingConfiguration (Maybe (Val Text))+slcDestinationBucketName = lens _s3LoggingConfigurationDestinationBucketName (\s a -> s { _s3LoggingConfigurationDestinationBucketName = a })++-- | A prefix for the all log object keys. If you store log files from+-- multiple Amazon S3 buckets in a single bucket, you can use a prefix to+-- distinguish which log files came from which bucket.+slcLogFilePrefix :: Lens' S3LoggingConfiguration (Maybe (Val Text))+slcLogFilePrefix = lens _s3LoggingConfigurationLogFilePrefix (\s a -> s { _s3LoggingConfigurationLogFilePrefix = a })
+ library-gen/Stratosphere/ResourceProperties/S3NotificationConfiguration.hs view
@@ -0,0 +1,58 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | Describes the notification configuration for an AWS::S3::Bucket resource.++module Stratosphere.ResourceProperties.S3NotificationConfiguration where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.S3NotificationConfigurationLambdaConfiguration+import Stratosphere.ResourceProperties.S3NotificationConfigurationQueueConfiguration+import Stratosphere.ResourceProperties.S3NotificationConfigurationTopicConfiguration++-- | Full data type definition for S3NotificationConfiguration. See+-- 's3NotificationConfiguration' for a more convenient constructor.+data S3NotificationConfiguration =+  S3NotificationConfiguration+  { _s3NotificationConfigurationLambdaConfigurations :: Maybe [S3NotificationConfigurationLambdaConfiguration]+  , _s3NotificationConfigurationQueueConfigurations :: Maybe [S3NotificationConfigurationQueueConfiguration]+  , _s3NotificationConfigurationTopicConfigurations :: Maybe [S3NotificationConfigurationTopicConfiguration]+  } deriving (Show, Generic)++instance ToJSON S3NotificationConfiguration where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 28, omitNothingFields = True }++instance FromJSON S3NotificationConfiguration where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 28, omitNothingFields = True }++-- | Constructor for 'S3NotificationConfiguration' containing required fields+-- as arguments.+s3NotificationConfiguration+  :: S3NotificationConfiguration+s3NotificationConfiguration  =+  S3NotificationConfiguration+  { _s3NotificationConfigurationLambdaConfigurations = Nothing+  , _s3NotificationConfigurationQueueConfigurations = Nothing+  , _s3NotificationConfigurationTopicConfigurations = Nothing+  }++-- | The AWS Lambda functions to invoke and the events for which to invoke the+-- functions.+sncLambdaConfigurations :: Lens' S3NotificationConfiguration (Maybe [S3NotificationConfigurationLambdaConfiguration])+sncLambdaConfigurations = lens _s3NotificationConfigurationLambdaConfigurations (\s a -> s { _s3NotificationConfigurationLambdaConfigurations = a })++-- | The Amazon Simple Queue Service queues to publish messages to and the+-- events for which to publish messages.+sncQueueConfigurations :: Lens' S3NotificationConfiguration (Maybe [S3NotificationConfigurationQueueConfiguration])+sncQueueConfigurations = lens _s3NotificationConfigurationQueueConfigurations (\s a -> s { _s3NotificationConfigurationQueueConfigurations = a })++-- | The topic to which notifications are sent and the events for which+-- notification are generated.+sncTopicConfigurations :: Lens' S3NotificationConfiguration (Maybe [S3NotificationConfigurationTopicConfiguration])+sncTopicConfigurations = lens _s3NotificationConfigurationTopicConfigurations (\s a -> s { _s3NotificationConfigurationTopicConfigurations = a })
+ library-gen/Stratosphere/ResourceProperties/S3NotificationConfigurationConfigFilter.hs view
@@ -0,0 +1,47 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | Filter is a property of the LambdaConfigurations, QueueConfigurations,+-- and TopicConfigurations properties that describes the filtering rules that+-- determine the Amazon Simple Storage Service (Amazon S3) objects for which+-- to send notifications.++module Stratosphere.ResourceProperties.S3NotificationConfigurationConfigFilter where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.S3NotificationConfigurationConfigFilterS3Key++-- | Full data type definition for S3NotificationConfigurationConfigFilter.+-- See 's3NotificationConfigurationConfigFilter' for a more convenient+-- constructor.+data S3NotificationConfigurationConfigFilter =+  S3NotificationConfigurationConfigFilter+  { _s3NotificationConfigurationConfigFilterS3Key :: S3NotificationConfigurationConfigFilterS3Key+  } deriving (Show, Generic)++instance ToJSON S3NotificationConfigurationConfigFilter where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 40, omitNothingFields = True }++instance FromJSON S3NotificationConfigurationConfigFilter where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 40, omitNothingFields = True }++-- | Constructor for 'S3NotificationConfigurationConfigFilter' containing+-- required fields as arguments.+s3NotificationConfigurationConfigFilter+  :: S3NotificationConfigurationConfigFilterS3Key -- ^ 'snccfS3Key'+  -> S3NotificationConfigurationConfigFilter+s3NotificationConfigurationConfigFilter s3Keyarg =+  S3NotificationConfigurationConfigFilter+  { _s3NotificationConfigurationConfigFilterS3Key = s3Keyarg+  }++-- | Amazon S3 filtering rules that describe for which object key names to+-- send notifications.+snccfS3Key :: Lens' S3NotificationConfigurationConfigFilter S3NotificationConfigurationConfigFilterS3Key+snccfS3Key = lens _s3NotificationConfigurationConfigFilterS3Key (\s a -> s { _s3NotificationConfigurationConfigFilterS3Key = a })
+ library-gen/Stratosphere/ResourceProperties/S3NotificationConfigurationConfigFilterS3Key.hs view
@@ -0,0 +1,47 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | S3Key is a property of the Amazon S3 NotificationConfiguration Config+-- Filter property that specifies the key names of Amazon Simple Storage+-- Service (Amazon S3) objects for which to send notifications.++module Stratosphere.ResourceProperties.S3NotificationConfigurationConfigFilterS3Key where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.S3NotificationConfigurationConfigFilterS3KeyRules++-- | Full data type definition for+-- S3NotificationConfigurationConfigFilterS3Key. See+-- 's3NotificationConfigurationConfigFilterS3Key' for a more convenient+-- constructor.+data S3NotificationConfigurationConfigFilterS3Key =+  S3NotificationConfigurationConfigFilterS3Key+  { _s3NotificationConfigurationConfigFilterS3KeyRules :: [S3NotificationConfigurationConfigFilterS3KeyRules]+  } deriving (Show, Generic)++instance ToJSON S3NotificationConfigurationConfigFilterS3Key where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 45, omitNothingFields = True }++instance FromJSON S3NotificationConfigurationConfigFilterS3Key where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 45, omitNothingFields = True }++-- | Constructor for 'S3NotificationConfigurationConfigFilterS3Key' containing+-- required fields as arguments.+s3NotificationConfigurationConfigFilterS3Key+  :: [S3NotificationConfigurationConfigFilterS3KeyRules] -- ^ 'snccfskRules'+  -> S3NotificationConfigurationConfigFilterS3Key+s3NotificationConfigurationConfigFilterS3Key rulesarg =+  S3NotificationConfigurationConfigFilterS3Key+  { _s3NotificationConfigurationConfigFilterS3KeyRules = rulesarg+  }++-- | The object key name to filter on and whether to filter on the suffix or+-- prefix of the key name.+snccfskRules :: Lens' S3NotificationConfigurationConfigFilterS3Key [S3NotificationConfigurationConfigFilterS3KeyRules]+snccfskRules = lens _s3NotificationConfigurationConfigFilterS3KeyRules (\s a -> s { _s3NotificationConfigurationConfigFilterS3KeyRules = a })
+ library-gen/Stratosphere/ResourceProperties/S3NotificationConfigurationConfigFilterS3KeyRules.hs view
@@ -0,0 +1,56 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | Rules is a property of the Amazon S3 NotificationConfiguration Config+-- Filter S3Key property that describes the Amazon Simple Storage Service+-- (Amazon S3) object key name to filter on and whether to filter on the+-- suffix or prefix of the key name.++module Stratosphere.ResourceProperties.S3NotificationConfigurationConfigFilterS3KeyRules 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+-- S3NotificationConfigurationConfigFilterS3KeyRules. See+-- 's3NotificationConfigurationConfigFilterS3KeyRules' for a more convenient+-- constructor.+data S3NotificationConfigurationConfigFilterS3KeyRules =+  S3NotificationConfigurationConfigFilterS3KeyRules+  { _s3NotificationConfigurationConfigFilterS3KeyRulesName :: Val Text+  , _s3NotificationConfigurationConfigFilterS3KeyRulesValue :: Val Text+  } deriving (Show, Generic)++instance ToJSON S3NotificationConfigurationConfigFilterS3KeyRules where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 50, omitNothingFields = True }++instance FromJSON S3NotificationConfigurationConfigFilterS3KeyRules where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 50, omitNothingFields = True }++-- | Constructor for 'S3NotificationConfigurationConfigFilterS3KeyRules'+-- containing required fields as arguments.+s3NotificationConfigurationConfigFilterS3KeyRules+  :: Val Text -- ^ 'snccfskrName'+  -> Val Text -- ^ 'snccfskrValue'+  -> S3NotificationConfigurationConfigFilterS3KeyRules+s3NotificationConfigurationConfigFilterS3KeyRules namearg valuearg =+  S3NotificationConfigurationConfigFilterS3KeyRules+  { _s3NotificationConfigurationConfigFilterS3KeyRulesName = namearg+  , _s3NotificationConfigurationConfigFilterS3KeyRulesValue = valuearg+  }++-- | Whether the filter matches the prefix or suffix of object key names. For+-- valid values, see the Name request element of the PUT Bucket notification+-- action in the Amazon Simple Storage Service API Reference.+snccfskrName :: Lens' S3NotificationConfigurationConfigFilterS3KeyRules (Val Text)+snccfskrName = lens _s3NotificationConfigurationConfigFilterS3KeyRulesName (\s a -> s { _s3NotificationConfigurationConfigFilterS3KeyRulesName = a })++-- | The value that the filter searches for in object key names.+snccfskrValue :: Lens' S3NotificationConfigurationConfigFilterS3KeyRules (Val Text)+snccfskrValue = lens _s3NotificationConfigurationConfigFilterS3KeyRulesValue (\s a -> s { _s3NotificationConfigurationConfigFilterS3KeyRulesValue = a })
+ library-gen/Stratosphere/ResourceProperties/S3NotificationConfigurationLambdaConfiguration.hs view
@@ -0,0 +1,65 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | LambdaConfigurations is a property of the Amazon S3+-- NotificationConfiguration property that describes the AWS Lambda (Lambda)+-- functions to invoke and the events for which to invoke them.++module Stratosphere.ResourceProperties.S3NotificationConfigurationLambdaConfiguration where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.S3NotificationConfigurationConfigFilter++-- | Full data type definition for+-- S3NotificationConfigurationLambdaConfiguration. See+-- 's3NotificationConfigurationLambdaConfiguration' for a more convenient+-- constructor.+data S3NotificationConfigurationLambdaConfiguration =+  S3NotificationConfigurationLambdaConfiguration+  { _s3NotificationConfigurationLambdaConfigurationEvent :: Val Text+  , _s3NotificationConfigurationLambdaConfigurationFilter :: Maybe S3NotificationConfigurationConfigFilter+  , _s3NotificationConfigurationLambdaConfigurationFunction :: Val Text+  } deriving (Show, Generic)++instance ToJSON S3NotificationConfigurationLambdaConfiguration where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 47, omitNothingFields = True }++instance FromJSON S3NotificationConfigurationLambdaConfiguration where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 47, omitNothingFields = True }++-- | Constructor for 'S3NotificationConfigurationLambdaConfiguration'+-- containing required fields as arguments.+s3NotificationConfigurationLambdaConfiguration+  :: Val Text -- ^ 'snclcEvent'+  -> Val Text -- ^ 'snclcFunction'+  -> S3NotificationConfigurationLambdaConfiguration+s3NotificationConfigurationLambdaConfiguration eventarg functionarg =+  S3NotificationConfigurationLambdaConfiguration+  { _s3NotificationConfigurationLambdaConfigurationEvent = eventarg+  , _s3NotificationConfigurationLambdaConfigurationFilter = Nothing+  , _s3NotificationConfigurationLambdaConfigurationFunction = functionarg+  }++-- | The S3 bucket event for which to invoke the Lambda function. For more+-- information, see Supported Event Types in the Amazon Simple Storage Service+-- Developer Guide.+snclcEvent :: Lens' S3NotificationConfigurationLambdaConfiguration (Val Text)+snclcEvent = lens _s3NotificationConfigurationLambdaConfigurationEvent (\s a -> s { _s3NotificationConfigurationLambdaConfigurationEvent = a })++-- | The filtering rules that determine which objects invoke the Lambda+-- function. For example, you can create a filter so that only image files+-- with a .jpg extension invoke the function when they are added to the S3+-- bucket.+snclcFilter :: Lens' S3NotificationConfigurationLambdaConfiguration (Maybe S3NotificationConfigurationConfigFilter)+snclcFilter = lens _s3NotificationConfigurationLambdaConfigurationFilter (\s a -> s { _s3NotificationConfigurationLambdaConfigurationFilter = a })++-- | The Amazon Resource Name (ARN) of the Lambda function that Amazon S3+-- invokes when the specified event type occurs.+snclcFunction :: Lens' S3NotificationConfigurationLambdaConfiguration (Val Text)+snclcFunction = lens _s3NotificationConfigurationLambdaConfigurationFunction (\s a -> s { _s3NotificationConfigurationLambdaConfigurationFunction = a })
+ library-gen/Stratosphere/ResourceProperties/S3NotificationConfigurationQueueConfiguration.hs view
@@ -0,0 +1,66 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | QueueConfigurations is a property of the Amazon S3+-- NotificationConfiguration property that describes the S3 bucket events+-- about which you want to send messages to Amazon SQS and the queues to which+-- you want to send them.++module Stratosphere.ResourceProperties.S3NotificationConfigurationQueueConfiguration where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.S3NotificationConfigurationConfigFilter++-- | Full data type definition for+-- S3NotificationConfigurationQueueConfiguration. See+-- 's3NotificationConfigurationQueueConfiguration' for a more convenient+-- constructor.+data S3NotificationConfigurationQueueConfiguration =+  S3NotificationConfigurationQueueConfiguration+  { _s3NotificationConfigurationQueueConfigurationEvent :: Val Text+  , _s3NotificationConfigurationQueueConfigurationFilter :: Maybe S3NotificationConfigurationConfigFilter+  , _s3NotificationConfigurationQueueConfigurationQueue :: Val Text+  } deriving (Show, Generic)++instance ToJSON S3NotificationConfigurationQueueConfiguration where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 46, omitNothingFields = True }++instance FromJSON S3NotificationConfigurationQueueConfiguration where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 46, omitNothingFields = True }++-- | Constructor for 'S3NotificationConfigurationQueueConfiguration'+-- containing required fields as arguments.+s3NotificationConfigurationQueueConfiguration+  :: Val Text -- ^ 'sncqcEvent'+  -> Val Text -- ^ 'sncqcQueue'+  -> S3NotificationConfigurationQueueConfiguration+s3NotificationConfigurationQueueConfiguration eventarg queuearg =+  S3NotificationConfigurationQueueConfiguration+  { _s3NotificationConfigurationQueueConfigurationEvent = eventarg+  , _s3NotificationConfigurationQueueConfigurationFilter = Nothing+  , _s3NotificationConfigurationQueueConfigurationQueue = queuearg+  }++-- | The S3 bucket event about which you want to publish messages to Amazon+-- Simple Queue Service ( Amazon SQS). For more information, see Supported+-- Event Types in the Amazon Simple Storage Service Developer Guide.+sncqcEvent :: Lens' S3NotificationConfigurationQueueConfiguration (Val Text)+sncqcEvent = lens _s3NotificationConfigurationQueueConfigurationEvent (\s a -> s { _s3NotificationConfigurationQueueConfigurationEvent = a })++-- | The filtering rules that determine for which objects to send+-- notifications. For example, you can create a filter so that Amazon Simple+-- Storage Service (Amazon S3) sends notifications only when image files with+-- a .jpg extension are added to the bucket.+sncqcFilter :: Lens' S3NotificationConfigurationQueueConfiguration (Maybe S3NotificationConfigurationConfigFilter)+sncqcFilter = lens _s3NotificationConfigurationQueueConfigurationFilter (\s a -> s { _s3NotificationConfigurationQueueConfigurationFilter = a })++-- | The Amazon Resource Name (ARN) of the Amazon SQS queue that Amazon S3+-- publishes messages to when the specified event type occurs.+sncqcQueue :: Lens' S3NotificationConfigurationQueueConfiguration (Val Text)+sncqcQueue = lens _s3NotificationConfigurationQueueConfigurationQueue (\s a -> s { _s3NotificationConfigurationQueueConfigurationQueue = a })
+ library-gen/Stratosphere/ResourceProperties/S3NotificationConfigurationTopicConfiguration.hs view
@@ -0,0 +1,64 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | Describes the topic and events for the Amazon S3+-- NotificationConfiguration property.++module Stratosphere.ResourceProperties.S3NotificationConfigurationTopicConfiguration where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.S3NotificationConfigurationConfigFilter++-- | Full data type definition for+-- S3NotificationConfigurationTopicConfiguration. See+-- 's3NotificationConfigurationTopicConfiguration' for a more convenient+-- constructor.+data S3NotificationConfigurationTopicConfiguration =+  S3NotificationConfigurationTopicConfiguration+  { _s3NotificationConfigurationTopicConfigurationEvent :: Val Text+  , _s3NotificationConfigurationTopicConfigurationFilter :: Maybe S3NotificationConfigurationConfigFilter+  , _s3NotificationConfigurationTopicConfigurationTopic :: Val Text+  } deriving (Show, Generic)++instance ToJSON S3NotificationConfigurationTopicConfiguration where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 46, omitNothingFields = True }++instance FromJSON S3NotificationConfigurationTopicConfiguration where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 46, omitNothingFields = True }++-- | Constructor for 'S3NotificationConfigurationTopicConfiguration'+-- containing required fields as arguments.+s3NotificationConfigurationTopicConfiguration+  :: Val Text -- ^ 'snctcEvent'+  -> Val Text -- ^ 'snctcTopic'+  -> S3NotificationConfigurationTopicConfiguration+s3NotificationConfigurationTopicConfiguration eventarg topicarg =+  S3NotificationConfigurationTopicConfiguration+  { _s3NotificationConfigurationTopicConfigurationEvent = eventarg+  , _s3NotificationConfigurationTopicConfigurationFilter = Nothing+  , _s3NotificationConfigurationTopicConfigurationTopic = topicarg+  }++-- | The Amazon Simple Storage Service (Amazon S3) bucket event about which to+-- send notifications. For more information, see Supported Event Types in the+-- Amazon Simple Storage Service Developer Guide.+snctcEvent :: Lens' S3NotificationConfigurationTopicConfiguration (Val Text)+snctcEvent = lens _s3NotificationConfigurationTopicConfigurationEvent (\s a -> s { _s3NotificationConfigurationTopicConfigurationEvent = a })++-- | The filtering rules that determine for which objects to send+-- notifications. For example, you can create a filter so that Amazon Simple+-- Storage Service (Amazon S3) sends notifications only when image files with+-- a .jpg extension are added to the bucket.+snctcFilter :: Lens' S3NotificationConfigurationTopicConfiguration (Maybe S3NotificationConfigurationConfigFilter)+snctcFilter = lens _s3NotificationConfigurationTopicConfigurationFilter (\s a -> s { _s3NotificationConfigurationTopicConfigurationFilter = a })++-- | The Amazon SNS topic Amazon Resource Name (ARN) to which Amazon S3+-- reports the specified events.+snctcTopic :: Lens' S3NotificationConfigurationTopicConfiguration (Val Text)+snctcTopic = lens _s3NotificationConfigurationTopicConfigurationTopic (\s a -> s { _s3NotificationConfigurationTopicConfigurationTopic = a })
+ library-gen/Stratosphere/ResourceProperties/S3ReplicationConfiguration.hs view
@@ -0,0 +1,56 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | ReplicationConfiguration is a property of the AWS::S3::Bucket resource+-- that specifies replication rules and the AWS Identity and Access Management+-- (IAM) role Amazon Simple Storage Service (Amazon S3) uses to replicate+-- objects.++module Stratosphere.ResourceProperties.S3ReplicationConfiguration where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.S3ReplicationConfigurationRule++-- | Full data type definition for S3ReplicationConfiguration. See+-- 's3ReplicationConfiguration' for a more convenient constructor.+data S3ReplicationConfiguration =+  S3ReplicationConfiguration+  { _s3ReplicationConfigurationRole :: Val Text+  , _s3ReplicationConfigurationRules :: [S3ReplicationConfigurationRule]+  } deriving (Show, Generic)++instance ToJSON S3ReplicationConfiguration where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 27, omitNothingFields = True }++instance FromJSON S3ReplicationConfiguration where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 27, omitNothingFields = True }++-- | Constructor for 'S3ReplicationConfiguration' containing required fields+-- as arguments.+s3ReplicationConfiguration+  :: Val Text -- ^ 'srcRole'+  -> [S3ReplicationConfigurationRule] -- ^ 'srcRules'+  -> S3ReplicationConfiguration+s3ReplicationConfiguration rolearg rulesarg =+  S3ReplicationConfiguration+  { _s3ReplicationConfigurationRole = rolearg+  , _s3ReplicationConfigurationRules = rulesarg+  }++-- | The Amazon Resource Name (ARN) of an AWS Identity and Access Management+-- (IAM) role that Amazon S3 assumes when replicating objects. For more+-- information, see How to Set Up Cross-Region Replication in the Amazon+-- Simple Storage Service Developer Guide.+srcRole :: Lens' S3ReplicationConfiguration (Val Text)+srcRole = lens _s3ReplicationConfigurationRole (\s a -> s { _s3ReplicationConfigurationRole = a })++-- | A replication rule that specifies which objects to replicate and where+-- they are stored.+srcRules :: Lens' S3ReplicationConfiguration [S3ReplicationConfigurationRule]+srcRules = lens _s3ReplicationConfigurationRules (\s a -> s { _s3ReplicationConfigurationRules = a })
+ library-gen/Stratosphere/ResourceProperties/S3ReplicationConfigurationRule.hs view
@@ -0,0 +1,68 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | Rules is a property of the Amazon S3 ReplicationConfiguration property+-- that specifies which Amazon Simple Storage Service (Amazon S3) objects to+-- replicate and where to store them.++module Stratosphere.ResourceProperties.S3ReplicationConfigurationRule where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.S3ReplicationConfigurationRulesDestination++-- | Full data type definition for S3ReplicationConfigurationRule. See+-- 's3ReplicationConfigurationRule' for a more convenient constructor.+data S3ReplicationConfigurationRule =+  S3ReplicationConfigurationRule+  { _s3ReplicationConfigurationRuleDestination :: S3ReplicationConfigurationRulesDestination+  , _s3ReplicationConfigurationRuleId :: Maybe (Val Text)+  , _s3ReplicationConfigurationRulePrefix :: Val Text+  , _s3ReplicationConfigurationRuleStatus :: Val Text+  } deriving (Show, Generic)++instance ToJSON S3ReplicationConfigurationRule where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 31, omitNothingFields = True }++instance FromJSON S3ReplicationConfigurationRule where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 31, omitNothingFields = True }++-- | Constructor for 'S3ReplicationConfigurationRule' containing required+-- fields as arguments.+s3ReplicationConfigurationRule+  :: S3ReplicationConfigurationRulesDestination -- ^ 'srcrDestination'+  -> Val Text -- ^ 'srcrPrefix'+  -> Val Text -- ^ 'srcrStatus'+  -> S3ReplicationConfigurationRule+s3ReplicationConfigurationRule destinationarg prefixarg statusarg =+  S3ReplicationConfigurationRule+  { _s3ReplicationConfigurationRuleDestination = destinationarg+  , _s3ReplicationConfigurationRuleId = Nothing+  , _s3ReplicationConfigurationRulePrefix = prefixarg+  , _s3ReplicationConfigurationRuleStatus = statusarg+  }++-- | Defines the destination where Amazon S3 stores replicated objects.+srcrDestination :: Lens' S3ReplicationConfigurationRule S3ReplicationConfigurationRulesDestination+srcrDestination = lens _s3ReplicationConfigurationRuleDestination (\s a -> s { _s3ReplicationConfigurationRuleDestination = a })++-- | A unique identifier for the rule. If you don't specify a value, AWS+-- CloudFormation generates a random ID.+srcrId :: Lens' S3ReplicationConfigurationRule (Maybe (Val Text))+srcrId = lens _s3ReplicationConfigurationRuleId (\s a -> s { _s3ReplicationConfigurationRuleId = a })++-- | An object prefix. This rule applies to all Amazon S3 objects with this+-- prefix. To specify all objects in an S3 bucket, specify an empty string.+srcrPrefix :: Lens' S3ReplicationConfigurationRule (Val Text)+srcrPrefix = lens _s3ReplicationConfigurationRulePrefix (\s a -> s { _s3ReplicationConfigurationRulePrefix = a })++-- | Whether the rule is enabled. For valid values, see the Status element of+-- the PUT Bucket replication action in the Amazon Simple Storage Service API+-- Reference.+srcrStatus :: Lens' S3ReplicationConfigurationRule (Val Text)+srcrStatus = lens _s3ReplicationConfigurationRuleStatus (\s a -> s { _s3ReplicationConfigurationRuleStatus = a })
+ library-gen/Stratosphere/ResourceProperties/S3ReplicationConfigurationRulesDestination.hs view
@@ -0,0 +1,58 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | Destination is a property of the Amazon S3 ReplicationConfiguration Rules+-- property that specifies which Amazon Simple Storage Service (Amazon S3)+-- bucket to store replicated objects and their storage class.++module Stratosphere.ResourceProperties.S3ReplicationConfigurationRulesDestination 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 S3ReplicationConfigurationRulesDestination.+-- See 's3ReplicationConfigurationRulesDestination' for a more convenient+-- constructor.+data S3ReplicationConfigurationRulesDestination =+  S3ReplicationConfigurationRulesDestination+  { _s3ReplicationConfigurationRulesDestinationBucket :: Val Text+  , _s3ReplicationConfigurationRulesDestinationStorageClass :: Maybe (Val Text)+  } deriving (Show, Generic)++instance ToJSON S3ReplicationConfigurationRulesDestination where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 43, omitNothingFields = True }++instance FromJSON S3ReplicationConfigurationRulesDestination where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 43, omitNothingFields = True }++-- | Constructor for 'S3ReplicationConfigurationRulesDestination' containing+-- required fields as arguments.+s3ReplicationConfigurationRulesDestination+  :: Val Text -- ^ 'srcrdBucket'+  -> S3ReplicationConfigurationRulesDestination+s3ReplicationConfigurationRulesDestination bucketarg =+  S3ReplicationConfigurationRulesDestination+  { _s3ReplicationConfigurationRulesDestinationBucket = bucketarg+  , _s3ReplicationConfigurationRulesDestinationStorageClass = Nothing+  }++-- | The Amazon resource name (ARN) of an S3 bucket where Amazon S3 stores+-- replicated objects. This destination bucket must be in a different region+-- than your source bucket. If you have multiple rules in your replication+-- configuration, specify the same destination bucket for all of the rules.+srcrdBucket :: Lens' S3ReplicationConfigurationRulesDestination (Val Text)+srcrdBucket = lens _s3ReplicationConfigurationRulesDestinationBucket (\s a -> s { _s3ReplicationConfigurationRulesDestinationBucket = a })++-- | The storage class to use when replicating objects, such as standard or+-- reduced redundancy. By default, Amazon S3 uses the storage class of the+-- source object to create object replica. For valid values, see the+-- StorageClass element of the PUT Bucket replication action in the Amazon+-- Simple Storage Service API Reference.+srcrdStorageClass :: Lens' S3ReplicationConfigurationRulesDestination (Maybe (Val Text))+srcrdStorageClass = lens _s3ReplicationConfigurationRulesDestinationStorageClass (\s a -> s { _s3ReplicationConfigurationRulesDestinationStorageClass = a })
+ library-gen/Stratosphere/ResourceProperties/S3VersioningConfiguration.hs view
@@ -0,0 +1,45 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | Describes the versioning state of an AWS::S3::Bucket resource. For more+-- information, see PUT Bucket versioning in the Amazon Simple Storage Service+-- API Reference.++module Stratosphere.ResourceProperties.S3VersioningConfiguration 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 S3VersioningConfiguration. See+-- 's3VersioningConfiguration' for a more convenient constructor.+data S3VersioningConfiguration =+  S3VersioningConfiguration+  { _s3VersioningConfigurationStatus :: Val Text+  } deriving (Show, Generic)++instance ToJSON S3VersioningConfiguration where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 26, omitNothingFields = True }++instance FromJSON S3VersioningConfiguration where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 26, omitNothingFields = True }++-- | Constructor for 'S3VersioningConfiguration' containing required fields as+-- arguments.+s3VersioningConfiguration+  :: Val Text -- ^ 'svcStatus'+  -> S3VersioningConfiguration+s3VersioningConfiguration statusarg =+  S3VersioningConfiguration+  { _s3VersioningConfigurationStatus = statusarg+  }++-- | The versioning state of an Amazon S3 bucket. If you enable versioning,+-- you must suspend versioning to disable it.+svcStatus :: Lens' S3VersioningConfiguration (Val Text)+svcStatus = lens _s3VersioningConfigurationStatus (\s a -> s { _s3VersioningConfigurationStatus = a })
+ library-gen/Stratosphere/ResourceProperties/S3WebsiteConfiguration.hs view
@@ -0,0 +1,64 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | WebsiteConfiguration is an embedded property of the AWS::S3::Bucket+-- resource.++module Stratosphere.ResourceProperties.S3WebsiteConfiguration where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.S3WebsiteRedirectAllRequestsTo+import Stratosphere.ResourceProperties.S3WebsiteRoutingRules++-- | Full data type definition for S3WebsiteConfiguration. See+-- 's3WebsiteConfiguration' for a more convenient constructor.+data S3WebsiteConfiguration =+  S3WebsiteConfiguration+  { _s3WebsiteConfigurationErrorDocument :: Maybe (Val Text)+  , _s3WebsiteConfigurationIndexDocument :: Val Text+  , _s3WebsiteConfigurationRedirectAllRequestsTo :: Maybe S3WebsiteRedirectAllRequestsTo+  , _s3WebsiteConfigurationRoutingRules :: Maybe S3WebsiteRoutingRules+  } deriving (Show, Generic)++instance ToJSON S3WebsiteConfiguration where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 23, omitNothingFields = True }++instance FromJSON S3WebsiteConfiguration where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 23, omitNothingFields = True }++-- | Constructor for 'S3WebsiteConfiguration' containing required fields as+-- arguments.+s3WebsiteConfiguration+  :: Val Text -- ^ 'swcIndexDocument'+  -> S3WebsiteConfiguration+s3WebsiteConfiguration indexDocumentarg =+  S3WebsiteConfiguration+  { _s3WebsiteConfigurationErrorDocument = Nothing+  , _s3WebsiteConfigurationIndexDocument = indexDocumentarg+  , _s3WebsiteConfigurationRedirectAllRequestsTo = Nothing+  , _s3WebsiteConfigurationRoutingRules = Nothing+  }++-- | The name of the error document for the website.+swcErrorDocument :: Lens' S3WebsiteConfiguration (Maybe (Val Text))+swcErrorDocument = lens _s3WebsiteConfigurationErrorDocument (\s a -> s { _s3WebsiteConfigurationErrorDocument = a })++-- | The name of the index document for the website.+swcIndexDocument :: Lens' S3WebsiteConfiguration (Val Text)+swcIndexDocument = lens _s3WebsiteConfigurationIndexDocument (\s a -> s { _s3WebsiteConfigurationIndexDocument = a })++-- | The redirect behavior for every request to this bucket's website+-- endpoint. Important If you specify this property, you cannot specify any+-- other property.+swcRedirectAllRequestsTo :: Lens' S3WebsiteConfiguration (Maybe S3WebsiteRedirectAllRequestsTo)+swcRedirectAllRequestsTo = lens _s3WebsiteConfigurationRedirectAllRequestsTo (\s a -> s { _s3WebsiteConfigurationRedirectAllRequestsTo = a })++-- | Rules that define when a redirect is applied and the redirect behavior.+swcRoutingRules :: Lens' S3WebsiteConfiguration (Maybe S3WebsiteRoutingRules)+swcRoutingRules = lens _s3WebsiteConfigurationRoutingRules (\s a -> s { _s3WebsiteConfigurationRoutingRules = a })
+ library-gen/Stratosphere/ResourceProperties/S3WebsiteRedirectAllRequestsTo.hs view
@@ -0,0 +1,51 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The RedirectAllRequestsTo code is an embedded property of the Amazon S3+-- Website Configuration Property property that describes the redirect+-- behavior of all requests to a website endpoint of an Amazon S3 bucket.++module Stratosphere.ResourceProperties.S3WebsiteRedirectAllRequestsTo 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 S3WebsiteRedirectAllRequestsTo. See+-- 's3WebsiteRedirectAllRequestsTo' for a more convenient constructor.+data S3WebsiteRedirectAllRequestsTo =+  S3WebsiteRedirectAllRequestsTo+  { _s3WebsiteRedirectAllRequestsToHostName :: Val Text+  , _s3WebsiteRedirectAllRequestsToProtocol :: Maybe (Val Text)+  } deriving (Show, Generic)++instance ToJSON S3WebsiteRedirectAllRequestsTo where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 31, omitNothingFields = True }++instance FromJSON S3WebsiteRedirectAllRequestsTo where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 31, omitNothingFields = True }++-- | Constructor for 'S3WebsiteRedirectAllRequestsTo' containing required+-- fields as arguments.+s3WebsiteRedirectAllRequestsTo+  :: Val Text -- ^ 'swrartHostName'+  -> S3WebsiteRedirectAllRequestsTo+s3WebsiteRedirectAllRequestsTo hostNamearg =+  S3WebsiteRedirectAllRequestsTo+  { _s3WebsiteRedirectAllRequestsToHostName = hostNamearg+  , _s3WebsiteRedirectAllRequestsToProtocol = Nothing+  }++-- | Name of the host where requests are redirected.+swrartHostName :: Lens' S3WebsiteRedirectAllRequestsTo (Val Text)+swrartHostName = lens _s3WebsiteRedirectAllRequestsToHostName (\s a -> s { _s3WebsiteRedirectAllRequestsToHostName = a })++-- | Protocol to use (http or https) when redirecting requests. The default is+-- the protocol that is used in the original request.+swrartProtocol :: Lens' S3WebsiteRedirectAllRequestsTo (Maybe (Val Text))+swrartProtocol = lens _s3WebsiteRedirectAllRequestsToProtocol (\s a -> s { _s3WebsiteRedirectAllRequestsToProtocol = a })
+ library-gen/Stratosphere/ResourceProperties/S3WebsiteRedirectRule.hs view
@@ -0,0 +1,75 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The RedirectRule property is an embedded property of the Amazon S3+-- Website Configuration Routing Rules Property that describes how requests+-- are redirected. In the event of an error, you can specify a different error+-- code to return.++module Stratosphere.ResourceProperties.S3WebsiteRedirectRule 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 S3WebsiteRedirectRule. See+-- 's3WebsiteRedirectRule' for a more convenient constructor.+data S3WebsiteRedirectRule =+  S3WebsiteRedirectRule+  { _s3WebsiteRedirectRuleHostName :: Maybe (Val Text)+  , _s3WebsiteRedirectRuleHttpRedirectCode :: Maybe (Val Text)+  , _s3WebsiteRedirectRuleProtocol :: Maybe (Val Text)+  , _s3WebsiteRedirectRuleReplaceKeyPrefixWith :: Maybe (Val Text)+  , _s3WebsiteRedirectRuleReplaceKeyWith :: Maybe (Val Text)+  } deriving (Show, Generic)++instance ToJSON S3WebsiteRedirectRule where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 22, omitNothingFields = True }++instance FromJSON S3WebsiteRedirectRule where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 22, omitNothingFields = True }++-- | Constructor for 'S3WebsiteRedirectRule' containing required fields as+-- arguments.+s3WebsiteRedirectRule+  :: S3WebsiteRedirectRule+s3WebsiteRedirectRule  =+  S3WebsiteRedirectRule+  { _s3WebsiteRedirectRuleHostName = Nothing+  , _s3WebsiteRedirectRuleHttpRedirectCode = Nothing+  , _s3WebsiteRedirectRuleProtocol = Nothing+  , _s3WebsiteRedirectRuleReplaceKeyPrefixWith = Nothing+  , _s3WebsiteRedirectRuleReplaceKeyWith = Nothing+  }++-- | Name of the host where requests are redirected.+swrrHostName :: Lens' S3WebsiteRedirectRule (Maybe (Val Text))+swrrHostName = lens _s3WebsiteRedirectRuleHostName (\s a -> s { _s3WebsiteRedirectRuleHostName = a })++-- | The HTTP redirect code to use on the response.+swrrHttpRedirectCode :: Lens' S3WebsiteRedirectRule (Maybe (Val Text))+swrrHttpRedirectCode = lens _s3WebsiteRedirectRuleHttpRedirectCode (\s a -> s { _s3WebsiteRedirectRuleHttpRedirectCode = a })++-- | The protocol to use in the redirect request.+swrrProtocol :: Lens' S3WebsiteRedirectRule (Maybe (Val Text))+swrrProtocol = lens _s3WebsiteRedirectRuleProtocol (\s a -> s { _s3WebsiteRedirectRuleProtocol = a })++-- | The object key prefix to use in the redirect request. For example, to+-- redirect requests for all pages with the prefix docs/ (objects in the docs/+-- folder) to the documents/ prefix, you can set the KeyPrefixEquals property+-- in routing condition property to docs/, and set the ReplaceKeyPrefixWith+-- property to documents/. Important If you specify this property, you cannot+-- specify the ReplaceKeyWith property.+swrrReplaceKeyPrefixWith :: Lens' S3WebsiteRedirectRule (Maybe (Val Text))+swrrReplaceKeyPrefixWith = lens _s3WebsiteRedirectRuleReplaceKeyPrefixWith (\s a -> s { _s3WebsiteRedirectRuleReplaceKeyPrefixWith = a })++-- | The specific object key to use in the redirect request. For example,+-- redirect request to error.html. Important If you specify this property, you+-- cannot specify the ReplaceKeyPrefixWith property.+swrrReplaceKeyWith :: Lens' S3WebsiteRedirectRule (Maybe (Val Text))+swrrReplaceKeyWith = lens _s3WebsiteRedirectRuleReplaceKeyWith (\s a -> s { _s3WebsiteRedirectRuleReplaceKeyWith = a })
+ library-gen/Stratosphere/ResourceProperties/S3WebsiteRoutingRuleCondition.hs view
@@ -0,0 +1,54 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The RoutingRuleCondition property is an embedded property of the Amazon+-- S3 Website Configuration Routing Rules Property that describes a condition+-- that must be met for a redirect to apply.++module Stratosphere.ResourceProperties.S3WebsiteRoutingRuleCondition 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 S3WebsiteRoutingRuleCondition. See+-- 's3WebsiteRoutingRuleCondition' for a more convenient constructor.+data S3WebsiteRoutingRuleCondition =+  S3WebsiteRoutingRuleCondition+  { _s3WebsiteRoutingRuleConditionHttpErrorCodeReturnedEquals :: Maybe (Val Text)+  , _s3WebsiteRoutingRuleConditionKeyPrefixEquals :: Maybe (Val Text)+  } deriving (Show, Generic)++instance ToJSON S3WebsiteRoutingRuleCondition where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 30, omitNothingFields = True }++instance FromJSON S3WebsiteRoutingRuleCondition where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 30, omitNothingFields = True }++-- | Constructor for 'S3WebsiteRoutingRuleCondition' containing required+-- fields as arguments.+s3WebsiteRoutingRuleCondition+  :: S3WebsiteRoutingRuleCondition+s3WebsiteRoutingRuleCondition  =+  S3WebsiteRoutingRuleCondition+  { _s3WebsiteRoutingRuleConditionHttpErrorCodeReturnedEquals = Nothing+  , _s3WebsiteRoutingRuleConditionKeyPrefixEquals = Nothing+  }++-- | Applies this redirect if the error code equals this value in the event of+-- an error.+swrrcHttpErrorCodeReturnedEquals :: Lens' S3WebsiteRoutingRuleCondition (Maybe (Val Text))+swrrcHttpErrorCodeReturnedEquals = lens _s3WebsiteRoutingRuleConditionHttpErrorCodeReturnedEquals (\s a -> s { _s3WebsiteRoutingRuleConditionHttpErrorCodeReturnedEquals = a })++-- | The object key name prefix when the redirect is applied. For example, to+-- redirect requests for ExamplePage.html, set the key prefix to+-- ExamplePage.html. To redirect request for all pages with the prefix docs/,+-- set the key prefix to docs/, which identifies all objects in the docs/+-- folder.+swrrcKeyPrefixEquals :: Lens' S3WebsiteRoutingRuleCondition (Maybe (Val Text))+swrrcKeyPrefixEquals = lens _s3WebsiteRoutingRuleConditionKeyPrefixEquals (\s a -> s { _s3WebsiteRoutingRuleConditionKeyPrefixEquals = a })
+ library-gen/Stratosphere/ResourceProperties/S3WebsiteRoutingRules.hs view
@@ -0,0 +1,52 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The RoutingRules property is an embedded property of the Amazon S3+-- Website Configuration Property property. This property describes the+-- redirect behavior and when a redirect is applied.++module Stratosphere.ResourceProperties.S3WebsiteRoutingRules where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.S3WebsiteRedirectRule+import Stratosphere.ResourceProperties.S3WebsiteRoutingRuleCondition++-- | Full data type definition for S3WebsiteRoutingRules. See+-- 's3WebsiteRoutingRules' for a more convenient constructor.+data S3WebsiteRoutingRules =+  S3WebsiteRoutingRules+  { _s3WebsiteRoutingRulesRedirectRule :: S3WebsiteRedirectRule+  , _s3WebsiteRoutingRulesRoutingRuleCondition :: Maybe S3WebsiteRoutingRuleCondition+  } deriving (Show, Generic)++instance ToJSON S3WebsiteRoutingRules where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 22, omitNothingFields = True }++instance FromJSON S3WebsiteRoutingRules where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 22, omitNothingFields = True }++-- | Constructor for 'S3WebsiteRoutingRules' containing required fields as+-- arguments.+s3WebsiteRoutingRules+  :: S3WebsiteRedirectRule -- ^ 'swrrRedirectRule'+  -> S3WebsiteRoutingRules+s3WebsiteRoutingRules redirectRulearg =+  S3WebsiteRoutingRules+  { _s3WebsiteRoutingRulesRedirectRule = redirectRulearg+  , _s3WebsiteRoutingRulesRoutingRuleCondition = Nothing+  }++-- | Redirect requests to another host, to another page, or with another+-- protocol.+swrrRedirectRule :: Lens' S3WebsiteRoutingRules S3WebsiteRedirectRule+swrrRedirectRule = lens _s3WebsiteRoutingRulesRedirectRule (\s a -> s { _s3WebsiteRoutingRulesRedirectRule = a })++-- | Rules that define when a redirect is applied.+swrrRoutingRuleCondition :: Lens' S3WebsiteRoutingRules (Maybe S3WebsiteRoutingRuleCondition)+swrrRoutingRuleCondition = lens _s3WebsiteRoutingRulesRoutingRuleCondition (\s a -> s { _s3WebsiteRoutingRulesRoutingRuleCondition = a })
library-gen/Stratosphere/Resources.hs view
@@ -40,121 +40,155 @@ import GHC.Exts (IsList(..)) import GHC.Generics (Generic) -import Stratosphere.Resources.DBSecurityGroupIngress as X-import Stratosphere.Resources.Subnet as X+import Stratosphere.Resources.AccessKey as X+import Stratosphere.Resources.AutoScalingGroup as X+import Stratosphere.Resources.Bucket as X import Stratosphere.Resources.DBInstance as X-import Stratosphere.Resources.IAMRole as X-import Stratosphere.Resources.LifecycleHook as X-import Stratosphere.Resources.Group as X-import Stratosphere.Resources.DBSubnetGroup as X-import Stratosphere.Resources.SecurityGroup as X import Stratosphere.Resources.DBParameterGroup as X-import Stratosphere.Resources.Policy as X+import Stratosphere.Resources.DBSecurityGroup as X+import Stratosphere.Resources.DBSecurityGroupIngress as X+import Stratosphere.Resources.DBSubnetGroup as X import Stratosphere.Resources.EC2Instance as X-import Stratosphere.Resources.RouteTable as X+import Stratosphere.Resources.EIP as X import Stratosphere.Resources.EIPAssociation as X-import Stratosphere.Resources.InternetGateway as X+import Stratosphere.Resources.Group as X+import Stratosphere.Resources.IAMRole as X import Stratosphere.Resources.InstanceProfile as X-import Stratosphere.Resources.VPCGatewayAttachment as X-import Stratosphere.Resources.EIP as X-import Stratosphere.Resources.User as X-import Stratosphere.Resources.DBSecurityGroup as X+import Stratosphere.Resources.InternetGateway as X import Stratosphere.Resources.LaunchConfiguration as X-import Stratosphere.Resources.SubnetRouteTableAssociation as X-import Stratosphere.Resources.RecordSetGroup as X-import Stratosphere.Resources.Stack as X-import Stratosphere.Resources.ManagedPolicy as X-import Stratosphere.Resources.VPC as X-import Stratosphere.Resources.AccessKey as X+import Stratosphere.Resources.LifecycleHook as X import Stratosphere.Resources.LoadBalancer as X+import Stratosphere.Resources.ManagedPolicy as X+import Stratosphere.Resources.NatGateway as X+import Stratosphere.Resources.Policy as X+import Stratosphere.Resources.RecordSet as X+import Stratosphere.Resources.RecordSetGroup as X+import Stratosphere.Resources.Route as X+import Stratosphere.Resources.RouteTable as X+import Stratosphere.Resources.S3BucketPolicy as X import Stratosphere.Resources.ScalingPolicy as X-import Stratosphere.Resources.AutoScalingGroup as X import Stratosphere.Resources.ScheduledAction as X-import Stratosphere.Resources.Volume as X+import Stratosphere.Resources.SecurityGroup as X+import Stratosphere.Resources.SecurityGroupEgress as X+import Stratosphere.Resources.SecurityGroupIngress as X+import Stratosphere.Resources.Stack as X+import Stratosphere.Resources.Subnet as X+import Stratosphere.Resources.SubnetRouteTableAssociation as X+import Stratosphere.Resources.Trail as X+import Stratosphere.Resources.User as X import Stratosphere.Resources.UserToGroupAddition as X+import Stratosphere.Resources.VPC as X import Stratosphere.Resources.VPCEndpoint as X-import Stratosphere.Resources.RecordSet as X-import Stratosphere.Resources.Route as X-import Stratosphere.Resources.NatGateway as X+import Stratosphere.Resources.VPCGatewayAttachment as X+import Stratosphere.Resources.Volume as X import Stratosphere.Resources.VolumeAttachment as X +import Stratosphere.ResourceProperties.AccessLoggingPolicy as X+import Stratosphere.ResourceProperties.AliasTarget as X+import Stratosphere.ResourceProperties.AppCookieStickinessPolicy as X+import Stratosphere.ResourceProperties.AutoScalingBlockDeviceMapping as X+import Stratosphere.ResourceProperties.AutoScalingEBSBlockDevice as X+import Stratosphere.ResourceProperties.AutoScalingMetricsCollection as X+import Stratosphere.ResourceProperties.AutoScalingNotificationConfigurations as X+import Stratosphere.ResourceProperties.AutoScalingTags as X import Stratosphere.ResourceProperties.ConnectionDrainingPolicy as X-import Stratosphere.ResourceProperties.HealthCheck as X+import Stratosphere.ResourceProperties.ConnectionSettings as X+import Stratosphere.ResourceProperties.EBSBlockDevice as X+import Stratosphere.ResourceProperties.EC2BlockDeviceMapping as X+import Stratosphere.ResourceProperties.EC2MountPoint as X import Stratosphere.ResourceProperties.EC2SsmAssociationParameters as X+import Stratosphere.ResourceProperties.EC2SsmAssociations as X import Stratosphere.ResourceProperties.ELBPolicy as X-import Stratosphere.ResourceProperties.AutoScalingMetricsCollection as X+import Stratosphere.ResourceProperties.HealthCheck as X+import Stratosphere.ResourceProperties.IAMPolicies as X import Stratosphere.ResourceProperties.LBCookieStickinessPolicy as X-import Stratosphere.ResourceProperties.AliasTarget as X+import Stratosphere.ResourceProperties.ListenerProperty as X+import Stratosphere.ResourceProperties.NameValuePair as X import Stratosphere.ResourceProperties.NetworkInterface as X-import Stratosphere.ResourceProperties.SecurityGroupEgressRule as X-import Stratosphere.ResourceProperties.EC2BlockDeviceMapping as X-import Stratosphere.ResourceProperties.RecordSetGeoLocation as X-import Stratosphere.ResourceProperties.AutoScalingBlockDeviceMapping as X import Stratosphere.ResourceProperties.PrivateIpAddressSpecification as X-import Stratosphere.ResourceProperties.IAMPolicies as X-import Stratosphere.ResourceProperties.ListenerProperty as X-import Stratosphere.ResourceProperties.EC2SsmAssociations as X+import Stratosphere.ResourceProperties.RDSSecurityGroupRule as X+import Stratosphere.ResourceProperties.RecordSetGeoLocation as X import Stratosphere.ResourceProperties.ResourceTag as X-import Stratosphere.ResourceProperties.EC2MountPoint as X+import Stratosphere.ResourceProperties.S3CorsConfiguration as X+import Stratosphere.ResourceProperties.S3CorsConfigurationRule as X+import Stratosphere.ResourceProperties.S3LifecycleConfiguration as X+import Stratosphere.ResourceProperties.S3LifecycleRule as X+import Stratosphere.ResourceProperties.S3LifecycleRuleNoncurrentVersionTransition as X+import Stratosphere.ResourceProperties.S3LifecycleRuleTransition as X+import Stratosphere.ResourceProperties.S3LoggingConfiguration as X+import Stratosphere.ResourceProperties.S3NotificationConfiguration as X+import Stratosphere.ResourceProperties.S3NotificationConfigurationConfigFilter as X+import Stratosphere.ResourceProperties.S3NotificationConfigurationConfigFilterS3Key as X+import Stratosphere.ResourceProperties.S3NotificationConfigurationConfigFilterS3KeyRules as X+import Stratosphere.ResourceProperties.S3NotificationConfigurationLambdaConfiguration as X+import Stratosphere.ResourceProperties.S3NotificationConfigurationQueueConfiguration as X+import Stratosphere.ResourceProperties.S3NotificationConfigurationTopicConfiguration as X+import Stratosphere.ResourceProperties.S3ReplicationConfiguration as X+import Stratosphere.ResourceProperties.S3ReplicationConfigurationRule as X+import Stratosphere.ResourceProperties.S3ReplicationConfigurationRulesDestination as X+import Stratosphere.ResourceProperties.S3VersioningConfiguration as X+import Stratosphere.ResourceProperties.S3WebsiteConfiguration as X+import Stratosphere.ResourceProperties.S3WebsiteRedirectAllRequestsTo as X+import Stratosphere.ResourceProperties.S3WebsiteRedirectRule as X+import Stratosphere.ResourceProperties.S3WebsiteRoutingRuleCondition as X+import Stratosphere.ResourceProperties.S3WebsiteRoutingRules as X+import Stratosphere.ResourceProperties.SecurityGroupEgressRule as X import Stratosphere.ResourceProperties.SecurityGroupIngressRule as X-import Stratosphere.ResourceProperties.RDSSecurityGroupRule as X-import Stratosphere.ResourceProperties.EBSBlockDevice as X import Stratosphere.ResourceProperties.StepAdjustments as X-import Stratosphere.ResourceProperties.AccessLoggingPolicy as X-import Stratosphere.ResourceProperties.AutoScalingTags as X-import Stratosphere.ResourceProperties.AutoScalingEBSBlockDevice as X-import Stratosphere.ResourceProperties.AutoScalingNotificationConfigurations as X-import Stratosphere.ResourceProperties.AppCookieStickinessPolicy as X-import Stratosphere.ResourceProperties.ConnectionSettings as X import Stratosphere.ResourceProperties.UserLoginProfile as X -import Stratosphere.ResourceAttributes.ResourceSignal as X+import Stratosphere.ResourceAttributes.AutoScalingReplacingUpdate as X import Stratosphere.ResourceAttributes.AutoScalingRollingUpdate as X+import Stratosphere.ResourceAttributes.AutoScalingScheduledAction as X import Stratosphere.ResourceAttributes.CreationPolicy as X-import Stratosphere.ResourceAttributes.AutoScalingReplacingUpdate as X+import Stratosphere.ResourceAttributes.ResourceSignal as X import Stratosphere.ResourceAttributes.UpdatePolicy as X-import Stratosphere.ResourceAttributes.AutoScalingScheduledAction as X  import Stratosphere.Helpers import Stratosphere.Values  data ResourceProperties-  = DBSecurityGroupIngressProperties DBSecurityGroupIngress-  | SubnetProperties Subnet+  = AccessKeyProperties AccessKey+  | AutoScalingGroupProperties AutoScalingGroup+  | BucketProperties Bucket   | DBInstanceProperties DBInstance-  | IAMRoleProperties IAMRole-  | LifecycleHookProperties LifecycleHook-  | GroupProperties Group-  | DBSubnetGroupProperties DBSubnetGroup-  | SecurityGroupProperties SecurityGroup   | DBParameterGroupProperties DBParameterGroup-  | PolicyProperties Policy+  | DBSecurityGroupProperties DBSecurityGroup+  | DBSecurityGroupIngressProperties DBSecurityGroupIngress+  | DBSubnetGroupProperties DBSubnetGroup   | EC2InstanceProperties EC2Instance-  | RouteTableProperties RouteTable+  | EIPProperties EIP   | EIPAssociationProperties EIPAssociation-  | InternetGatewayProperties InternetGateway+  | GroupProperties Group+  | IAMRoleProperties IAMRole   | InstanceProfileProperties InstanceProfile-  | VPCGatewayAttachmentProperties VPCGatewayAttachment-  | EIPProperties EIP-  | UserProperties User-  | DBSecurityGroupProperties DBSecurityGroup+  | InternetGatewayProperties InternetGateway   | LaunchConfigurationProperties LaunchConfiguration-  | SubnetRouteTableAssociationProperties SubnetRouteTableAssociation-  | RecordSetGroupProperties RecordSetGroup-  | StackProperties Stack-  | ManagedPolicyProperties ManagedPolicy-  | VPCProperties VPC-  | AccessKeyProperties AccessKey+  | LifecycleHookProperties LifecycleHook   | LoadBalancerProperties LoadBalancer+  | ManagedPolicyProperties ManagedPolicy+  | NatGatewayProperties NatGateway+  | PolicyProperties Policy+  | RecordSetProperties RecordSet+  | RecordSetGroupProperties RecordSetGroup+  | RouteProperties Route+  | RouteTableProperties RouteTable+  | S3BucketPolicyProperties S3BucketPolicy   | ScalingPolicyProperties ScalingPolicy-  | AutoScalingGroupProperties AutoScalingGroup   | ScheduledActionProperties ScheduledAction-  | VolumeProperties Volume+  | SecurityGroupProperties SecurityGroup+  | SecurityGroupEgressProperties SecurityGroupEgress+  | SecurityGroupIngressProperties SecurityGroupIngress+  | StackProperties Stack+  | SubnetProperties Subnet+  | SubnetRouteTableAssociationProperties SubnetRouteTableAssociation+  | TrailProperties Trail+  | UserProperties User   | UserToGroupAdditionProperties UserToGroupAddition+  | VPCProperties VPC   | VPCEndpointProperties VPCEndpoint-  | RecordSetProperties RecordSet-  | RouteProperties Route-  | NatGatewayProperties NatGateway+  | VPCGatewayAttachmentProperties VPCGatewayAttachment+  | VolumeProperties Volume   | VolumeAttachmentProperties VolumeAttachment    deriving (Show)@@ -208,78 +242,88 @@     ]  resourcePropertiesJSON :: ResourceProperties -> [Pair]-resourcePropertiesJSON (DBSecurityGroupIngressProperties x) =-  [ "Type" .= ("AWS::RDS::DBSecurityGroupIngress" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (SubnetProperties x) =-  [ "Type" .= ("AWS::EC2::Subnet" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (AccessKeyProperties x) =+  [ "Type" .= ("AWS::IAM::AccessKey" :: 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 (DBInstanceProperties x) =   [ "Type" .= ("AWS::RDS::DBInstance" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (IAMRoleProperties x) =-  [ "Type" .= ("AWS::IAM::Role" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (LifecycleHookProperties x) =-  [ "Type" .= ("AWS::AutoScaling::LifecycleHook" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (GroupProperties x) =-  [ "Type" .= ("AWS::IAM::Group" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (DBSubnetGroupProperties x) =-  [ "Type" .= ("AWS::RDS::DBSubnetGroup" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (SecurityGroupProperties x) =-  [ "Type" .= ("AWS::EC2::SecurityGroup" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (DBParameterGroupProperties x) =   [ "Type" .= ("AWS::RDS::DBParameterGroup" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (PolicyProperties x) =-  [ "Type" .= ("AWS::IAM::Policy" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (DBSecurityGroupProperties x) =+  [ "Type" .= ("AWS::RDS::DBSecurityGroup" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (DBSecurityGroupIngressProperties x) =+  [ "Type" .= ("AWS::RDS::DBSecurityGroupIngress" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (DBSubnetGroupProperties x) =+  [ "Type" .= ("AWS::RDS::DBSubnetGroup" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (EC2InstanceProperties x) =   [ "Type" .= ("AWS::EC2::Instance" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (RouteTableProperties x) =-  [ "Type" .= ("AWS::EC2::RouteTable" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (EIPProperties x) =+  [ "Type" .= ("AWS::EC2::EIP" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (EIPAssociationProperties x) =   [ "Type" .= ("AWS::EC2::EIPAssociation" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (InternetGatewayProperties x) =-  [ "Type" .= ("AWS::EC2::InternetGateway" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (GroupProperties x) =+  [ "Type" .= ("AWS::IAM::Group" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (IAMRoleProperties x) =+  [ "Type" .= ("AWS::IAM::Role" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (InstanceProfileProperties x) =   [ "Type" .= ("AWS::IAM::InstanceProfile" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (VPCGatewayAttachmentProperties x) =-  [ "Type" .= ("AWS::EC2::VPCGatewayAttachment" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (EIPProperties x) =-  [ "Type" .= ("AWS::EC2::EIP" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (UserProperties x) =-  [ "Type" .= ("AWS::IAM::User" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (DBSecurityGroupProperties x) =-  [ "Type" .= ("AWS::RDS::DBSecurityGroup" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (InternetGatewayProperties x) =+  [ "Type" .= ("AWS::EC2::InternetGateway" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (LaunchConfigurationProperties x) =   [ "Type" .= ("AWS::AutoScaling::LaunchConfiguration" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (SubnetRouteTableAssociationProperties x) =-  [ "Type" .= ("AWS::EC2::SubnetRouteTableAssociation" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (RecordSetGroupProperties x) =-  [ "Type" .= ("AWS::Route53::RecordSetGroup" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (StackProperties x) =-  [ "Type" .= ("AWS::CloudFormation::Stack" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (ManagedPolicyProperties x) =-  [ "Type" .= ("AWS::IAM::ManagedPolicy" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (VPCProperties x) =-  [ "Type" .= ("AWS::EC2::VPC" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (AccessKeyProperties x) =-  [ "Type" .= ("AWS::IAM::AccessKey" :: 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 (ManagedPolicyProperties x) =+  [ "Type" .= ("AWS::IAM::ManagedPolicy" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (NatGatewayProperties x) =+  [ "Type" .= ("AWS::EC2::NatGateway" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (PolicyProperties x) =+  [ "Type" .= ("AWS::IAM::Policy" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (RecordSetProperties x) =+  [ "Type" .= ("AWS::Route53::RecordSet" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (RecordSetGroupProperties x) =+  [ "Type" .= ("AWS::Route53::RecordSetGroup" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (RouteProperties x) =+  [ "Type" .= ("AWS::EC2::Route" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (RouteTableProperties x) =+  [ "Type" .= ("AWS::EC2::RouteTable" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (S3BucketPolicyProperties x) =+  [ "Type" .= ("AWS::S3::BucketPolicy" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (ScalingPolicyProperties x) =   [ "Type" .= ("AWS::AutoScaling::ScalingPolicy" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (AutoScalingGroupProperties x) =-  [ "Type" .= ("AWS::AutoScaling::AutoScalingGroup" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (ScheduledActionProperties x) =   [ "Type" .= ("AWS::AutoScaling::ScheduledAction" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (VolumeProperties x) =-  [ "Type" .= ("AWS::EC2::Volume" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (SecurityGroupProperties x) =+  [ "Type" .= ("AWS::EC2::SecurityGroup" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (SecurityGroupEgressProperties x) =+  [ "Type" .= ("AWS::EC2::SecurityGroupEgress" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (SecurityGroupIngressProperties x) =+  [ "Type" .= ("AWS::EC2::SecurityGroupIngress" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (StackProperties x) =+  [ "Type" .= ("AWS::CloudFormation::Stack" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (SubnetProperties x) =+  [ "Type" .= ("AWS::EC2::Subnet" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (SubnetRouteTableAssociationProperties x) =+  [ "Type" .= ("AWS::EC2::SubnetRouteTableAssociation" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (TrailProperties x) =+  [ "Type" .= ("AWS::CloudTrail::Trail" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (UserProperties x) =+  [ "Type" .= ("AWS::IAM::User" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (UserToGroupAdditionProperties x) =   [ "Type" .= ("AWS::IAM::UserToGroupAddition" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (VPCProperties x) =+  [ "Type" .= ("AWS::EC2::VPC" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (VPCEndpointProperties x) =   [ "Type" .= ("AWS::EC2::VPCEndpoint" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (RecordSetProperties x) =-  [ "Type" .= ("AWS::Route53::RecordSet" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (RouteProperties x) =-  [ "Type" .= ("AWS::EC2::Route" :: String), "Properties" .= toJSON x]-resourcePropertiesJSON (NatGatewayProperties x) =-  [ "Type" .= ("AWS::EC2::NatGateway" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (VPCGatewayAttachmentProperties x) =+  [ "Type" .= ("AWS::EC2::VPCGatewayAttachment" :: String), "Properties" .= toJSON x]+resourcePropertiesJSON (VolumeProperties x) =+  [ "Type" .= ("AWS::EC2::Volume" :: String), "Properties" .= toJSON x] resourcePropertiesJSON (VolumeAttachmentProperties x) =   [ "Type" .= ("AWS::EC2::VolumeAttachment" :: String), "Properties" .= toJSON x] @@ -288,42 +332,47 @@ resourceFromJSON n o =     do type' <- o .: "Type" :: Parser String        props <- case type' of-         "AWS::RDS::DBSecurityGroupIngress" -> DBSecurityGroupIngressProperties <$> (o .: "Properties")-         "AWS::EC2::Subnet" -> SubnetProperties <$> (o .: "Properties")+         "AWS::IAM::AccessKey" -> AccessKeyProperties <$> (o .: "Properties")+         "AWS::AutoScaling::AutoScalingGroup" -> AutoScalingGroupProperties <$> (o .: "Properties")+         "AWS::S3::Bucket" -> BucketProperties <$> (o .: "Properties")          "AWS::RDS::DBInstance" -> DBInstanceProperties <$> (o .: "Properties")-         "AWS::IAM::Role" -> IAMRoleProperties <$> (o .: "Properties")-         "AWS::AutoScaling::LifecycleHook" -> LifecycleHookProperties <$> (o .: "Properties")-         "AWS::IAM::Group" -> GroupProperties <$> (o .: "Properties")-         "AWS::RDS::DBSubnetGroup" -> DBSubnetGroupProperties <$> (o .: "Properties")-         "AWS::EC2::SecurityGroup" -> SecurityGroupProperties <$> (o .: "Properties")          "AWS::RDS::DBParameterGroup" -> DBParameterGroupProperties <$> (o .: "Properties")-         "AWS::IAM::Policy" -> PolicyProperties <$> (o .: "Properties")+         "AWS::RDS::DBSecurityGroup" -> DBSecurityGroupProperties <$> (o .: "Properties")+         "AWS::RDS::DBSecurityGroupIngress" -> DBSecurityGroupIngressProperties <$> (o .: "Properties")+         "AWS::RDS::DBSubnetGroup" -> DBSubnetGroupProperties <$> (o .: "Properties")          "AWS::EC2::Instance" -> EC2InstanceProperties <$> (o .: "Properties")-         "AWS::EC2::RouteTable" -> RouteTableProperties <$> (o .: "Properties")+         "AWS::EC2::EIP" -> EIPProperties <$> (o .: "Properties")          "AWS::EC2::EIPAssociation" -> EIPAssociationProperties <$> (o .: "Properties")-         "AWS::EC2::InternetGateway" -> InternetGatewayProperties <$> (o .: "Properties")+         "AWS::IAM::Group" -> GroupProperties <$> (o .: "Properties")+         "AWS::IAM::Role" -> IAMRoleProperties <$> (o .: "Properties")          "AWS::IAM::InstanceProfile" -> InstanceProfileProperties <$> (o .: "Properties")-         "AWS::EC2::VPCGatewayAttachment" -> VPCGatewayAttachmentProperties <$> (o .: "Properties")-         "AWS::EC2::EIP" -> EIPProperties <$> (o .: "Properties")-         "AWS::IAM::User" -> UserProperties <$> (o .: "Properties")-         "AWS::RDS::DBSecurityGroup" -> DBSecurityGroupProperties <$> (o .: "Properties")+         "AWS::EC2::InternetGateway" -> InternetGatewayProperties <$> (o .: "Properties")          "AWS::AutoScaling::LaunchConfiguration" -> LaunchConfigurationProperties <$> (o .: "Properties")-         "AWS::EC2::SubnetRouteTableAssociation" -> SubnetRouteTableAssociationProperties <$> (o .: "Properties")-         "AWS::Route53::RecordSetGroup" -> RecordSetGroupProperties <$> (o .: "Properties")-         "AWS::CloudFormation::Stack" -> StackProperties <$> (o .: "Properties")-         "AWS::IAM::ManagedPolicy" -> ManagedPolicyProperties <$> (o .: "Properties")-         "AWS::EC2::VPC" -> VPCProperties <$> (o .: "Properties")-         "AWS::IAM::AccessKey" -> AccessKeyProperties <$> (o .: "Properties")+         "AWS::AutoScaling::LifecycleHook" -> LifecycleHookProperties <$> (o .: "Properties")          "AWS::ElasticLoadBalancing::LoadBalancer" -> LoadBalancerProperties <$> (o .: "Properties")+         "AWS::IAM::ManagedPolicy" -> ManagedPolicyProperties <$> (o .: "Properties")+         "AWS::EC2::NatGateway" -> NatGatewayProperties <$> (o .: "Properties")+         "AWS::IAM::Policy" -> PolicyProperties <$> (o .: "Properties")+         "AWS::Route53::RecordSet" -> RecordSetProperties <$> (o .: "Properties")+         "AWS::Route53::RecordSetGroup" -> RecordSetGroupProperties <$> (o .: "Properties")+         "AWS::EC2::Route" -> RouteProperties <$> (o .: "Properties")+         "AWS::EC2::RouteTable" -> RouteTableProperties <$> (o .: "Properties")+         "AWS::S3::BucketPolicy" -> S3BucketPolicyProperties <$> (o .: "Properties")          "AWS::AutoScaling::ScalingPolicy" -> ScalingPolicyProperties <$> (o .: "Properties")-         "AWS::AutoScaling::AutoScalingGroup" -> AutoScalingGroupProperties <$> (o .: "Properties")          "AWS::AutoScaling::ScheduledAction" -> ScheduledActionProperties <$> (o .: "Properties")-         "AWS::EC2::Volume" -> VolumeProperties <$> (o .: "Properties")+         "AWS::EC2::SecurityGroup" -> SecurityGroupProperties <$> (o .: "Properties")+         "AWS::EC2::SecurityGroupEgress" -> SecurityGroupEgressProperties <$> (o .: "Properties")+         "AWS::EC2::SecurityGroupIngress" -> SecurityGroupIngressProperties <$> (o .: "Properties")+         "AWS::CloudFormation::Stack" -> StackProperties <$> (o .: "Properties")+         "AWS::EC2::Subnet" -> SubnetProperties <$> (o .: "Properties")+         "AWS::EC2::SubnetRouteTableAssociation" -> SubnetRouteTableAssociationProperties <$> (o .: "Properties")+         "AWS::CloudTrail::Trail" -> TrailProperties <$> (o .: "Properties")+         "AWS::IAM::User" -> UserProperties <$> (o .: "Properties")          "AWS::IAM::UserToGroupAddition" -> UserToGroupAdditionProperties <$> (o .: "Properties")+         "AWS::EC2::VPC" -> VPCProperties <$> (o .: "Properties")          "AWS::EC2::VPCEndpoint" -> VPCEndpointProperties <$> (o .: "Properties")-         "AWS::Route53::RecordSet" -> RecordSetProperties <$> (o .: "Properties")-         "AWS::EC2::Route" -> RouteProperties <$> (o .: "Properties")-         "AWS::EC2::NatGateway" -> NatGatewayProperties <$> (o .: "Properties")+         "AWS::EC2::VPCGatewayAttachment" -> VPCGatewayAttachmentProperties <$> (o .: "Properties")+         "AWS::EC2::Volume" -> VolumeProperties <$> (o .: "Properties")          "AWS::EC2::VolumeAttachment" -> VolumeAttachmentProperties <$> (o .: "Properties")           _ -> fail $ "Unknown resource type: " ++ type'
+ library-gen/Stratosphere/Resources/Bucket.hs view
@@ -0,0 +1,125 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::S3::Bucket type creates an Amazon S3 bucket. You can set a+-- deletion policy for your bucket to control how AWS CloudFormation handles+-- the bucket when the stack is deleted. For Amazon S3 buckets, you can choose+-- to retain the bucket or to delete the bucket. For more information, see+-- DeletionPolicy Attribute.++module Stratosphere.Resources.Bucket where++import Control.Lens+import Data.Aeson+import Data.Aeson.Types+import Data.Text+import GHC.Generics++import Stratosphere.Values+import Stratosphere.ResourceProperties.ResourceTag+import Stratosphere.ResourceProperties.S3CorsConfiguration+import Stratosphere.ResourceProperties.S3LifecycleConfiguration+import Stratosphere.ResourceProperties.S3LoggingConfiguration+import Stratosphere.ResourceProperties.S3NotificationConfiguration+import Stratosphere.ResourceProperties.S3ReplicationConfiguration+import Stratosphere.ResourceProperties.S3VersioningConfiguration+import Stratosphere.ResourceProperties.S3WebsiteConfiguration+import Stratosphere.Types++-- | Full data type definition for Bucket. See 'bucket' for a more convenient+-- constructor.+data Bucket =+  Bucket+  { _bucketAccessControl :: Maybe CannedACL+  , _bucketBucketName :: Maybe (Val Text)+  , _bucketCorsConfiguration :: Maybe S3CorsConfiguration+  , _bucketLifecycleConfiguration :: Maybe S3LifecycleConfiguration+  , _bucketLoggingConfiguration :: Maybe S3LoggingConfiguration+  , _bucketNotificationConfiguration :: Maybe S3NotificationConfiguration+  , _bucketReplicationConfiguration :: Maybe S3ReplicationConfiguration+  , _bucketTags :: Maybe [ResourceTag]+  , _bucketVersioningConfiguration :: Maybe S3VersioningConfiguration+  , _bucketWebsiteConfiguration :: Maybe S3WebsiteConfiguration+  } deriving (Show, Generic)++instance ToJSON Bucket where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 7, omitNothingFields = True }++instance FromJSON Bucket where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 7, omitNothingFields = True }++-- | Constructor for 'Bucket' containing required fields as arguments.+bucket+  :: Bucket+bucket  =+  Bucket+  { _bucketAccessControl = Nothing+  , _bucketBucketName = Nothing+  , _bucketCorsConfiguration = Nothing+  , _bucketLifecycleConfiguration = Nothing+  , _bucketLoggingConfiguration = Nothing+  , _bucketNotificationConfiguration = Nothing+  , _bucketReplicationConfiguration = Nothing+  , _bucketTags = Nothing+  , _bucketVersioningConfiguration = Nothing+  , _bucketWebsiteConfiguration = Nothing+  }++-- | A canned access control list (ACL) that grants predefined permissions to+-- the bucket. For more information about canned ACLs, see Canned ACLs in the+-- Amazon S3 documentation.+bAccessControl :: Lens' Bucket (Maybe CannedACL)+bAccessControl = lens _bucketAccessControl (\s a -> s { _bucketAccessControl = a })++-- | A name for the bucket. If you don't specify a name, AWS CloudFormation+-- generates a unique physical ID and uses that ID for the bucket name. For+-- more information, see Name Type. The bucket name must contain only+-- lowercase letters, numbers, periods (.), and dashes (-). 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.+bBucketName :: Lens' Bucket (Maybe (Val Text))+bBucketName = lens _bucketBucketName (\s a -> s { _bucketBucketName = a })++-- | Rules that define cross-origin resource sharing of objects in this+-- bucket. For more information, see Enabling Cross-Origin Resource Sharing in+-- the Amazon Simple Storage Service Developer Guide.+bCorsConfiguration :: Lens' Bucket (Maybe S3CorsConfiguration)+bCorsConfiguration = lens _bucketCorsConfiguration (\s a -> s { _bucketCorsConfiguration = a })++-- | Rules that define how Amazon S3 manages objects during their lifetime.+-- For more information, see Object Lifecycle Management in the Amazon Simple+-- Storage Service Developer Guide.+bLifecycleConfiguration :: Lens' Bucket (Maybe S3LifecycleConfiguration)+bLifecycleConfiguration = lens _bucketLifecycleConfiguration (\s a -> s { _bucketLifecycleConfiguration = a })++-- | Settings that defines where logs are stored.+bLoggingConfiguration :: Lens' Bucket (Maybe S3LoggingConfiguration)+bLoggingConfiguration = lens _bucketLoggingConfiguration (\s a -> s { _bucketLoggingConfiguration = a })++-- | Configuration that defines how Amazon S3 handles bucket notifications.+bNotificationConfiguration :: Lens' Bucket (Maybe S3NotificationConfiguration)+bNotificationConfiguration = lens _bucketNotificationConfiguration (\s a -> s { _bucketNotificationConfiguration = a })++-- | Configuration for replicating objects in an S3 bucket. To enable+-- replication, you must also enable versioning by using the+-- VersioningConfiguration property. Amazon S3 can store replicated objects in+-- only one destination (S3 bucket). You cannot send replicated objects to+-- multiple S3 buckets.+bReplicationConfiguration :: Lens' Bucket (Maybe S3ReplicationConfiguration)+bReplicationConfiguration = lens _bucketReplicationConfiguration (\s a -> s { _bucketReplicationConfiguration = a })++-- | An arbitrary set of tags (key-value pairs) for this Amazon S3 bucket.+bTags :: Lens' Bucket (Maybe [ResourceTag])+bTags = lens _bucketTags (\s a -> s { _bucketTags = a })++-- | Enables multiple variants of all objects in this bucket. You might enable+-- versioning to prevent objects from being deleted or overwritten by mistake+-- or to archive objects so that you can retrieve previous versions of them.+bVersioningConfiguration :: Lens' Bucket (Maybe S3VersioningConfiguration)+bVersioningConfiguration = lens _bucketVersioningConfiguration (\s a -> s { _bucketVersioningConfiguration = a })++-- | Information used to configure the bucket as a static website. For more+-- information, see Hosting Websites on Amazon S3.+bWebsiteConfiguration :: Lens' Bucket (Maybe S3WebsiteConfiguration)+bWebsiteConfiguration = lens _bucketWebsiteConfiguration (\s a -> s { _bucketWebsiteConfiguration = a })
+ library-gen/Stratosphere/Resources/S3BucketPolicy.hs view
@@ -0,0 +1,52 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::S3::BucketPolicy type applies an Amazon S3 bucket policy to an+-- Amazon S3 bucket. AWS::S3::BucketPolicy Snippet: Declaring an Amazon S3+-- Bucket Policy++module Stratosphere.Resources.S3BucketPolicy 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 S3BucketPolicy. See 's3BucketPolicy' for a+-- more convenient constructor.+data S3BucketPolicy =+  S3BucketPolicy+  { _s3BucketPolicyBucket :: Val Text+  , _s3BucketPolicyPolicyDocument :: Object+  } deriving (Show, Generic)++instance ToJSON S3BucketPolicy where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 15, omitNothingFields = True }++instance FromJSON S3BucketPolicy where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 15, omitNothingFields = True }++-- | Constructor for 'S3BucketPolicy' containing required fields as arguments.+s3BucketPolicy+  :: Val Text -- ^ 'sbpBucket'+  -> Object -- ^ 'sbpPolicyDocument'+  -> S3BucketPolicy+s3BucketPolicy bucketarg policyDocumentarg =+  S3BucketPolicy+  { _s3BucketPolicyBucket = bucketarg+  , _s3BucketPolicyPolicyDocument = policyDocumentarg+  }++-- | The Amazon S3 bucket that the policy applies to.+sbpBucket :: Lens' S3BucketPolicy (Val Text)+sbpBucket = lens _s3BucketPolicyBucket (\s a -> s { _s3BucketPolicyBucket = a })++-- | A policy document containing permissions to add to the specified bucket.+-- For more information, see Access Policy Language Overview in the Amazon+-- Simple Storage Service Developer Guide.+sbpPolicyDocument :: Lens' S3BucketPolicy Object+sbpPolicyDocument = lens _s3BucketPolicyPolicyDocument (\s a -> s { _s3BucketPolicyPolicyDocument = a })
+ library-gen/Stratosphere/Resources/SecurityGroupEgress.hs view
@@ -0,0 +1,84 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::EC2::SecurityGroupEgress resource adds an egress rule to an+-- Amazon VPC security group.++module Stratosphere.Resources.SecurityGroupEgress 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 SecurityGroupEgress. See+-- 'securityGroupEgress' for a more convenient constructor.+data SecurityGroupEgress =+  SecurityGroupEgress+  { _securityGroupEgressCidrIp :: Maybe (Val Text)+  , _securityGroupEgressDestinationSecurityGroupId :: Maybe (Val Text)+  , _securityGroupEgressFromPort :: Val Integer'+  , _securityGroupEgressGroupId :: Val Text+  , _securityGroupEgressIpProtocol :: Val Text+  , _securityGroupEgressToPort :: Val Integer'+  } deriving (Show, Generic)++instance ToJSON SecurityGroupEgress where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 20, omitNothingFields = True }++instance FromJSON SecurityGroupEgress where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 20, omitNothingFields = True }++-- | Constructor for 'SecurityGroupEgress' containing required fields as+-- arguments.+securityGroupEgress+  :: Val Integer' -- ^ 'sgeFromPort'+  -> Val Text -- ^ 'sgeGroupId'+  -> Val Text -- ^ 'sgeIpProtocol'+  -> Val Integer' -- ^ 'sgeToPort'+  -> SecurityGroupEgress+securityGroupEgress fromPortarg groupIdarg ipProtocolarg toPortarg =+  SecurityGroupEgress+  { _securityGroupEgressCidrIp = Nothing+  , _securityGroupEgressDestinationSecurityGroupId = Nothing+  , _securityGroupEgressFromPort = fromPortarg+  , _securityGroupEgressGroupId = groupIdarg+  , _securityGroupEgressIpProtocol = ipProtocolarg+  , _securityGroupEgressToPort = toPortarg+  }++-- | CIDR range. Type: String+sgeCidrIp :: Lens' SecurityGroupEgress (Maybe (Val Text))+sgeCidrIp = lens _securityGroupEgressCidrIp (\s a -> s { _securityGroupEgressCidrIp = a })++-- | Specifies the group ID of the destination Amazon VPC security group.+-- Type: String+sgeDestinationSecurityGroupId :: Lens' SecurityGroupEgress (Maybe (Val Text))+sgeDestinationSecurityGroupId = lens _securityGroupEgressDestinationSecurityGroupId (\s a -> s { _securityGroupEgressDestinationSecurityGroupId = a })++-- | Start of port range for the TCP and UDP protocols, or an ICMP type+-- number. If you specify icmp for the IpProtocol property, you can specify -1+-- as a wildcard (i.e., any ICMP type number). Type: Integer+sgeFromPort :: Lens' SecurityGroupEgress (Val Integer')+sgeFromPort = lens _securityGroupEgressFromPort (\s a -> s { _securityGroupEgressFromPort = a })++-- | ID of the Amazon VPC security group to modify. This value can be a+-- reference to an AWS::EC2::SecurityGroup resource that has a valid VpcId+-- property or the ID of an existing Amazon VPC security group. Type: String+sgeGroupId :: Lens' SecurityGroupEgress (Val Text)+sgeGroupId = lens _securityGroupEgressGroupId (\s a -> s { _securityGroupEgressGroupId = a })++-- | IP protocol name or number. For valid values, see the IpProtocol+-- parameter in AuthorizeSecurityGroupIngress Type: String+sgeIpProtocol :: Lens' SecurityGroupEgress (Val Text)+sgeIpProtocol = lens _securityGroupEgressIpProtocol (\s a -> s { _securityGroupEgressIpProtocol = a })++-- | End of port range for the TCP and UDP protocols, or an ICMP code. If you+-- specify icmp for the IpProtocol property, you can specify -1 as a wildcard+-- (i.e., any ICMP code). Type: Integer+sgeToPort :: Lens' SecurityGroupEgress (Val Integer')+sgeToPort = lens _securityGroupEgressToPort (\s a -> s { _securityGroupEgressToPort = a })
+ library-gen/Stratosphere/Resources/SecurityGroupIngress.hs view
@@ -0,0 +1,107 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::EC2::SecurityGroupIngress resource adds an ingress rule to an+-- Amazon EC2 or Amazon VPC security group.++module Stratosphere.Resources.SecurityGroupIngress 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 SecurityGroupIngress. See+-- 'securityGroupIngress' for a more convenient constructor.+data SecurityGroupIngress =+  SecurityGroupIngress+  { _securityGroupIngressCidrIp :: Maybe (Val Text)+  , _securityGroupIngressFromPort :: Maybe (Val Integer')+  , _securityGroupIngressGroupId :: Maybe (Val Text)+  , _securityGroupIngressGroupName :: Maybe (Val Text)+  , _securityGroupIngressIpProtocol :: Val Text+  , _securityGroupIngressSourceSecurityGroupId :: Maybe (Val Text)+  , _securityGroupIngressSourceSecurityGroupName :: Maybe (Val Text)+  , _securityGroupIngressSourceSecurityGroupOwnerId :: Maybe (Val Text)+  , _securityGroupIngressToPort :: Maybe (Val Integer')+  } deriving (Show, Generic)++instance ToJSON SecurityGroupIngress where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 21, omitNothingFields = True }++instance FromJSON SecurityGroupIngress where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 21, omitNothingFields = True }++-- | Constructor for 'SecurityGroupIngress' containing required fields as+-- arguments.+securityGroupIngress+  :: Val Text -- ^ 'sgiIpProtocol'+  -> SecurityGroupIngress+securityGroupIngress ipProtocolarg =+  SecurityGroupIngress+  { _securityGroupIngressCidrIp = Nothing+  , _securityGroupIngressFromPort = Nothing+  , _securityGroupIngressGroupId = Nothing+  , _securityGroupIngressGroupName = Nothing+  , _securityGroupIngressIpProtocol = ipProtocolarg+  , _securityGroupIngressSourceSecurityGroupId = Nothing+  , _securityGroupIngressSourceSecurityGroupName = Nothing+  , _securityGroupIngressSourceSecurityGroupOwnerId = Nothing+  , _securityGroupIngressToPort = Nothing+  }++-- | Specifies a CIDR range. For an overview of CIDR ranges, go to the+-- Wikipedia Tutorial. Type: String+sgiCidrIp :: Lens' SecurityGroupIngress (Maybe (Val Text))+sgiCidrIp = lens _securityGroupIngressCidrIp (\s a -> s { _securityGroupIngressCidrIp = a })++-- | Start of port range for the TCP and UDP protocols, or an ICMP type+-- number. If you specify icmp for the IpProtocol property, you can specify -1+-- as a wildcard (i.e., any ICMP type number). Type: Integer+sgiFromPort :: Lens' SecurityGroupIngress (Maybe (Val Integer'))+sgiFromPort = lens _securityGroupIngressFromPort (\s a -> s { _securityGroupIngressFromPort = a })++-- | ID of the Amazon EC2 or VPC security group to modify. The group must+-- belong to your account. Type: String+sgiGroupId :: Lens' SecurityGroupIngress (Maybe (Val Text))+sgiGroupId = lens _securityGroupIngressGroupId (\s a -> s { _securityGroupIngressGroupId = a })++-- | Name of the Amazon EC2 security group (non-VPC security group) to modify.+-- This value can be a reference to an AWS::EC2::SecurityGroup resource or the+-- name of an existing Amazon EC2 security group. Type: String+sgiGroupName :: Lens' SecurityGroupIngress (Maybe (Val Text))+sgiGroupName = lens _securityGroupIngressGroupName (\s a -> s { _securityGroupIngressGroupName = a })++-- | IP protocol name or number. For valid values, see the IpProtocol+-- parameter in AuthorizeSecurityGroupIngress Type: String+sgiIpProtocol :: Lens' SecurityGroupIngress (Val Text)+sgiIpProtocol = lens _securityGroupIngressIpProtocol (\s a -> s { _securityGroupIngressIpProtocol = a })++-- | Specifies the ID of the source security group or uses the Ref intrinsic+-- function to refer to the logical ID of a security group defined in the same+-- template. Type: String+sgiSourceSecurityGroupId :: Lens' SecurityGroupIngress (Maybe (Val Text))+sgiSourceSecurityGroupId = lens _securityGroupIngressSourceSecurityGroupId (\s a -> s { _securityGroupIngressSourceSecurityGroupId = a })++-- | Specifies the name of the Amazon EC2 security group (non-VPC security+-- group) to allow access or uses the Ref intrinsic function to refer to the+-- logical name of a security group defined in the same template. For+-- instances in a VPC, specify the SourceSecurityGroupId property. Type:+-- String+sgiSourceSecurityGroupName :: Lens' SecurityGroupIngress (Maybe (Val Text))+sgiSourceSecurityGroupName = lens _securityGroupIngressSourceSecurityGroupName (\s a -> s { _securityGroupIngressSourceSecurityGroupName = a })++-- | Specifies the AWS Account ID of the owner of the Amazon EC2 security+-- group specified in the SourceSecurityGroupName property. Type: String+sgiSourceSecurityGroupOwnerId :: Lens' SecurityGroupIngress (Maybe (Val Text))+sgiSourceSecurityGroupOwnerId = lens _securityGroupIngressSourceSecurityGroupOwnerId (\s a -> s { _securityGroupIngressSourceSecurityGroupOwnerId = a })++-- | End of port range for the TCP and UDP protocols, or an ICMP code. If you+-- specify icmp for the IpProtocol property, you can specify -1 as a wildcard+-- (i.e., any ICMP code). Type: Integer+sgiToPort :: Lens' SecurityGroupIngress (Maybe (Val Integer'))+sgiToPort = lens _securityGroupIngressToPort (\s a -> s { _securityGroupIngressToPort = a })
+ library-gen/Stratosphere/Resources/Trail.hs view
@@ -0,0 +1,123 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}++-- | The AWS::CloudTrail::Trail resource creates a trail and specifies where+-- logs are published. An AWS CloudTrail (CloudTrail) trail can capture AWS+-- API calls made by your AWS account and publishes the logs to an Amazon S3+-- bucket. For more information, see What is AWS CloudTrail? in the AWS+-- CloudTrail User Guide.++module Stratosphere.Resources.Trail 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 Trail. See 'trail' for a more convenient+-- constructor.+data Trail =+  Trail+  { _trailCloudWatchLogsLogGroupArn :: Maybe (Val Text)+  , _trailCloudWatchLogsRoleArn :: Maybe (Val Text)+  , _trailEnableLogFileValidation :: Maybe (Val Bool)+  , _trailIncludeGlobalServiceEvents :: Maybe (Val Bool)+  , _trailIsLogging :: Val Bool+  , _trailIsMultiRegionTrail :: Maybe (Val Bool)+  , _trailKMSKeyId :: Maybe (Val Text)+  , _trailS3BucketName :: Val Text+  , _trailS3KeyPrefix :: Maybe (Val Text)+  , _trailSnsTopicName :: Maybe (Val Text)+  , _trailTags :: Maybe [ResourceTag]+  } deriving (Show, Generic)++instance ToJSON Trail where+  toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 6, omitNothingFields = True }++instance FromJSON Trail where+  parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 6, omitNothingFields = True }++-- | Constructor for 'Trail' containing required fields as arguments.+trail+  :: Val Bool -- ^ 'tIsLogging'+  -> Val Text -- ^ 'tS3BucketName'+  -> Trail+trail isLoggingarg s3BucketNamearg =+  Trail+  { _trailCloudWatchLogsLogGroupArn = Nothing+  , _trailCloudWatchLogsRoleArn = Nothing+  , _trailEnableLogFileValidation = Nothing+  , _trailIncludeGlobalServiceEvents = Nothing+  , _trailIsLogging = isLoggingarg+  , _trailIsMultiRegionTrail = Nothing+  , _trailKMSKeyId = Nothing+  , _trailS3BucketName = s3BucketNamearg+  , _trailS3KeyPrefix = Nothing+  , _trailSnsTopicName = Nothing+  , _trailTags = Nothing+  }++-- | The Amazon Resource Name (ARN) of a log group to which CloudTrail logs+-- will be delivered.+tCloudWatchLogsLogGroupArn :: Lens' Trail (Maybe (Val Text))+tCloudWatchLogsLogGroupArn = lens _trailCloudWatchLogsLogGroupArn (\s a -> s { _trailCloudWatchLogsLogGroupArn = a })++-- | The role ARN that Amazon CloudWatch Logs (CloudWatch Logs) assumes to+-- write logs to a log group. For more information, see Role Policy Document+-- for CloudTrail to Use CloudWatch Logs for Monitoring in the AWS CloudTrail+-- User Guide.+tCloudWatchLogsRoleArn :: Lens' Trail (Maybe (Val Text))+tCloudWatchLogsRoleArn = lens _trailCloudWatchLogsRoleArn (\s a -> s { _trailCloudWatchLogsRoleArn = a })++-- | Indicates whether CloudTrail validates the integrity of log files. By+-- default, AWS CloudFormation sets this value to false. When you disable log+-- file integrity validation, CloudTrail stops creating digest files. For more+-- information, see CreateTrail in the AWS CloudTrail API Reference.+tEnableLogFileValidation :: Lens' Trail (Maybe (Val Bool))+tEnableLogFileValidation = lens _trailEnableLogFileValidation (\s a -> s { _trailEnableLogFileValidation = a })++-- | Indicates whether the trail is publishing events from global services,+-- such as IAM, to the log files. By default, AWS CloudFormation sets this+-- value to false.+tIncludeGlobalServiceEvents :: Lens' Trail (Maybe (Val Bool))+tIncludeGlobalServiceEvents = lens _trailIncludeGlobalServiceEvents (\s a -> s { _trailIncludeGlobalServiceEvents = a })++-- | Indicates whether the CloudTrail trail is currently logging AWS API+-- calls.+tIsLogging :: Lens' Trail (Val Bool)+tIsLogging = lens _trailIsLogging (\s a -> s { _trailIsLogging = a })++-- | Indicates whether the CloudTrail trail is created in the region in which+-- you create the stack (false) or in all regions (true). By default, AWS+-- CloudFormation sets this value to false. For more information, see How Does+-- CloudTrail Behave Regionally and Globally? in the AWS CloudTrail User+-- Guide.+tIsMultiRegionTrail :: Lens' Trail (Maybe (Val Bool))+tIsMultiRegionTrail = lens _trailIsMultiRegionTrail (\s a -> s { _trailIsMultiRegionTrail = a })++-- | The AWS Key Management Service (AWS KMS) key ID that you want to use to+-- encrypt CloudTrail logs. You can specify an alias name (prefixed with+-- alias/), an alias ARN, a key ARN, or a globally unique identifier.+tKMSKeyId :: Lens' Trail (Maybe (Val Text))+tKMSKeyId = lens _trailKMSKeyId (\s a -> s { _trailKMSKeyId = a })++-- | The name of the Amazon S3 bucket where CloudTrail publishes log files.+tS3BucketName :: Lens' Trail (Val Text)+tS3BucketName = lens _trailS3BucketName (\s a -> s { _trailS3BucketName = a })++-- | An Amazon S3 object key prefix that precedes the name of all log files.+tS3KeyPrefix :: Lens' Trail (Maybe (Val Text))+tS3KeyPrefix = lens _trailS3KeyPrefix (\s a -> s { _trailS3KeyPrefix = a })++-- | The name of an Amazon SNS topic that is notified when new log files are+-- published.+tSnsTopicName :: Lens' Trail (Maybe (Val Text))+tSnsTopicName = lens _trailSnsTopicName (\s a -> s { _trailSnsTopicName = a })++-- | An arbitrary set of tags (key–value pairs) for this trail.+tTags :: Lens' Trail (Maybe [ResourceTag])+tTags = lens _trailTags (\s a -> s { _trailTags = a })
library/Stratosphere.hs view
@@ -21,6 +21,7 @@        , module Stratosphere.Resources        , module Stratosphere.Template        , module Stratosphere.Values+       , module Stratosphere.Types        , module Control.Lens        ) where @@ -30,6 +31,7 @@ import Stratosphere.Resources import Stratosphere.Template import Stratosphere.Values+import Stratosphere.Types  {-# ANN module "HLint: ignore Use import/export shortcut" #-} 
library/Stratosphere/Template.hs view
@@ -14,6 +14,7 @@        ( Template (..)        , template        , encodeTemplate+       , Mapping         -- Template lenses        , formatVersion
+ library/Stratosphere/Types.hs view
@@ -0,0 +1,27 @@+{-# LANGUAGE DeriveAnyClass #-}+{-# LANGUAGE DeriveGeneric #-}++-- | Module for hand-written types that are used in generated modules.++module Stratosphere.Types+  ( CannedACL (..)+  ) where++import Data.Aeson+import GHC.Generics++-- | Amazon S3 supports a set of predefined grants, known as canned ACLs. Each+-- canned ACL has a predefined a set of grantees and permissions. The following+-- table lists the set of canned ACLs and the associated predefined grants.+-- See:+-- http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl+data CannedACL+  = AuthenticatedRead+  | AwsExecRead+  | BucketOwnerRead+  | BucketOwnerFullControl+  | LogDeliveryWrite+  | Private+  | PublicRead+  | PublicReadWrite+  deriving (Show, Read, Eq, Generic, FromJSON, ToJSON)
library/Stratosphere/Values.hs view
@@ -43,6 +43,12 @@  | Join T.Text [Val a]  | Select Integer' (Val a)  | GetAZs (Val a)+ | FindInMap (Val a)+             -- ^ Map name+             (Val a)+             -- ^ Top level key+             (Val a)+             -- ^ Second level key  deriving instance (Show a) => Show (Val a) @@ -61,6 +67,8 @@   toJSON (Join d vs) = mkFunc "Fn::Join" [toJSON d, toJSON vs]   toJSON (Select i vs) = mkFunc "Fn::Select" [toJSON i, toJSON vs]   toJSON (GetAZs r) = object [("Fn::GetAZs", toJSON r)]+  toJSON (FindInMap mapName topKey secondKey) =+    object [("Fn::FindInMap", toJSON [toJSON mapName, toJSON topKey, toJSON secondKey])]  mkFunc :: T.Text -> [Value] -> Value mkFunc name args = object [(name, Array $ fromList args)]@@ -79,6 +87,9 @@       [("Fn::Join", o')] -> uncurry Join <$> parseJSON o'       [("Fn::Select", o')] -> uncurry Select <$> parseJSON o'       [("Fn::GetAZs", o')] -> GetAZs <$> parseJSON o'+      [("Fn::FindInMap", o')] -> do+        (mapName, topKey, secondKey) <- parseJSON o'+        return (FindInMap mapName topKey secondKey)       [(n, o')] -> Literal <$> parseJSON (object [(n, o')])       os -> Literal <$> parseJSON (object os)   parseJSON v = Literal <$> parseJSON v
stratosphere.cabal view
@@ -1,9 +1,9 @@--- This file has been generated from package.yaml by hpack version 0.14.1.+-- This file has been generated from package.yaml by hpack version 0.15.0. -- -- see: https://github.com/sol/hpack  name:           stratosphere-version:        0.1.4+version:        0.1.5 synopsis:       EDSL for AWS CloudFormation description:    EDSL for AWS CloudFormation category:       AWS, Cloud@@ -45,6 +45,7 @@       Stratosphere.Outputs       Stratosphere.Parameters       Stratosphere.Template+      Stratosphere.Types       Stratosphere.Values       Stratosphere.ResourceAttributes.AutoScalingReplacingUpdate       Stratosphere.ResourceAttributes.AutoScalingRollingUpdate@@ -72,11 +73,35 @@       Stratosphere.ResourceProperties.IAMPolicies       Stratosphere.ResourceProperties.LBCookieStickinessPolicy       Stratosphere.ResourceProperties.ListenerProperty+      Stratosphere.ResourceProperties.NameValuePair       Stratosphere.ResourceProperties.NetworkInterface       Stratosphere.ResourceProperties.PrivateIpAddressSpecification       Stratosphere.ResourceProperties.RDSSecurityGroupRule       Stratosphere.ResourceProperties.RecordSetGeoLocation       Stratosphere.ResourceProperties.ResourceTag+      Stratosphere.ResourceProperties.S3CorsConfiguration+      Stratosphere.ResourceProperties.S3CorsConfigurationRule+      Stratosphere.ResourceProperties.S3LifecycleConfiguration+      Stratosphere.ResourceProperties.S3LifecycleRule+      Stratosphere.ResourceProperties.S3LifecycleRuleNoncurrentVersionTransition+      Stratosphere.ResourceProperties.S3LifecycleRuleTransition+      Stratosphere.ResourceProperties.S3LoggingConfiguration+      Stratosphere.ResourceProperties.S3NotificationConfiguration+      Stratosphere.ResourceProperties.S3NotificationConfigurationConfigFilter+      Stratosphere.ResourceProperties.S3NotificationConfigurationConfigFilterS3Key+      Stratosphere.ResourceProperties.S3NotificationConfigurationConfigFilterS3KeyRules+      Stratosphere.ResourceProperties.S3NotificationConfigurationLambdaConfiguration+      Stratosphere.ResourceProperties.S3NotificationConfigurationQueueConfiguration+      Stratosphere.ResourceProperties.S3NotificationConfigurationTopicConfiguration+      Stratosphere.ResourceProperties.S3ReplicationConfiguration+      Stratosphere.ResourceProperties.S3ReplicationConfigurationRule+      Stratosphere.ResourceProperties.S3ReplicationConfigurationRulesDestination+      Stratosphere.ResourceProperties.S3VersioningConfiguration+      Stratosphere.ResourceProperties.S3WebsiteConfiguration+      Stratosphere.ResourceProperties.S3WebsiteRedirectAllRequestsTo+      Stratosphere.ResourceProperties.S3WebsiteRedirectRule+      Stratosphere.ResourceProperties.S3WebsiteRoutingRuleCondition+      Stratosphere.ResourceProperties.S3WebsiteRoutingRules       Stratosphere.ResourceProperties.SecurityGroupEgressRule       Stratosphere.ResourceProperties.SecurityGroupIngressRule       Stratosphere.ResourceProperties.StepAdjustments@@ -84,6 +109,7 @@       Stratosphere.Resources       Stratosphere.Resources.AccessKey       Stratosphere.Resources.AutoScalingGroup+      Stratosphere.Resources.Bucket       Stratosphere.Resources.DBInstance       Stratosphere.Resources.DBParameterGroup       Stratosphere.Resources.DBSecurityGroup@@ -106,12 +132,16 @@       Stratosphere.Resources.RecordSetGroup       Stratosphere.Resources.Route       Stratosphere.Resources.RouteTable+      Stratosphere.Resources.S3BucketPolicy       Stratosphere.Resources.ScalingPolicy       Stratosphere.Resources.ScheduledAction       Stratosphere.Resources.SecurityGroup+      Stratosphere.Resources.SecurityGroupEgress+      Stratosphere.Resources.SecurityGroupIngress       Stratosphere.Resources.Stack       Stratosphere.Resources.Subnet       Stratosphere.Resources.SubnetRouteTableAssociation+      Stratosphere.Resources.Trail       Stratosphere.Resources.User       Stratosphere.Resources.UserToGroupAddition       Stratosphere.Resources.Volume