module Stratosphere.Resources.EC2Instance where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
import Stratosphere.ResourceProperties.EC2BlockDeviceMapping
import Stratosphere.ResourceProperties.NetworkInterface
import Stratosphere.ResourceProperties.EC2SsmAssociations
import Stratosphere.ResourceProperties.ResourceTag
import Stratosphere.ResourceProperties.EC2MountPoint
data EC2Instance =
EC2Instance
{ _eC2InstanceAvailabilityZone :: Maybe (Val Text)
, _eC2InstanceBlockDeviceMappings :: Maybe [EC2BlockDeviceMapping]
, _eC2InstanceDisableApiTermination :: Maybe (Val Bool')
, _eC2InstanceEbsOptimized :: Maybe (Val Bool')
, _eC2InstanceIamInstanceProfile :: Maybe (Val Text)
, _eC2InstanceImageId :: Val Text
, _eC2InstanceInstanceInitiatedShutdownBehavior :: Maybe (Val Text)
, _eC2InstanceInstanceType :: Maybe (Val Text)
, _eC2InstanceKernelId :: Maybe (Val Text)
, _eC2InstanceKeyName :: Maybe (Val Text)
, _eC2InstanceMonitoring :: Maybe (Val Bool')
, _eC2InstanceNetworkInterfaces :: Maybe [NetworkInterface]
, _eC2InstancePlacementGroupName :: Maybe (Val Text)
, _eC2InstancePrivateIpAddress :: Maybe (Val Text)
, _eC2InstanceRamdiskId :: Maybe (Val Text)
, _eC2InstanceSecurityGroupIds :: Maybe [Val Text]
, _eC2InstanceSecurityGroups :: Maybe [Val Text]
, _eC2InstanceSourceDestCheck :: Maybe (Val Bool')
, _eC2InstanceSsmAssociations :: Maybe [EC2SsmAssociations]
, _eC2InstanceSubnetId :: Maybe (Val Text)
, _eC2InstanceTags :: Maybe [ResourceTag]
, _eC2InstanceTenancy :: Maybe (Val Text)
, _eC2InstanceUserData :: Maybe (Val Text)
, _eC2InstanceVolumes :: Maybe [EC2MountPoint]
, _eC2InstanceAdditionalInfo :: Maybe (Val Text)
} deriving (Show, Generic)
instance ToJSON EC2Instance where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 12, omitNothingFields = True }
instance FromJSON EC2Instance where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 12, omitNothingFields = True }
ec2Instance
:: Val Text
-> EC2Instance
ec2Instance imageIdarg =
EC2Instance
{ _eC2InstanceAvailabilityZone = Nothing
, _eC2InstanceBlockDeviceMappings = Nothing
, _eC2InstanceDisableApiTermination = Nothing
, _eC2InstanceEbsOptimized = Nothing
, _eC2InstanceIamInstanceProfile = Nothing
, _eC2InstanceImageId = imageIdarg
, _eC2InstanceInstanceInitiatedShutdownBehavior = Nothing
, _eC2InstanceInstanceType = Nothing
, _eC2InstanceKernelId = Nothing
, _eC2InstanceKeyName = Nothing
, _eC2InstanceMonitoring = Nothing
, _eC2InstanceNetworkInterfaces = Nothing
, _eC2InstancePlacementGroupName = Nothing
, _eC2InstancePrivateIpAddress = Nothing
, _eC2InstanceRamdiskId = Nothing
, _eC2InstanceSecurityGroupIds = Nothing
, _eC2InstanceSecurityGroups = Nothing
, _eC2InstanceSourceDestCheck = Nothing
, _eC2InstanceSsmAssociations = Nothing
, _eC2InstanceSubnetId = Nothing
, _eC2InstanceTags = Nothing
, _eC2InstanceTenancy = Nothing
, _eC2InstanceUserData = Nothing
, _eC2InstanceVolumes = Nothing
, _eC2InstanceAdditionalInfo = Nothing
}
eciAvailabilityZone :: Lens' EC2Instance (Maybe (Val Text))
eciAvailabilityZone = lens _eC2InstanceAvailabilityZone (\s a -> s { _eC2InstanceAvailabilityZone = a })
eciBlockDeviceMappings :: Lens' EC2Instance (Maybe [EC2BlockDeviceMapping])
eciBlockDeviceMappings = lens _eC2InstanceBlockDeviceMappings (\s a -> s { _eC2InstanceBlockDeviceMappings = a })
eciDisableApiTermination :: Lens' EC2Instance (Maybe (Val Bool'))
eciDisableApiTermination = lens _eC2InstanceDisableApiTermination (\s a -> s { _eC2InstanceDisableApiTermination = a })
eciEbsOptimized :: Lens' EC2Instance (Maybe (Val Bool'))
eciEbsOptimized = lens _eC2InstanceEbsOptimized (\s a -> s { _eC2InstanceEbsOptimized = a })
eciIamInstanceProfile :: Lens' EC2Instance (Maybe (Val Text))
eciIamInstanceProfile = lens _eC2InstanceIamInstanceProfile (\s a -> s { _eC2InstanceIamInstanceProfile = a })
eciImageId :: Lens' EC2Instance (Val Text)
eciImageId = lens _eC2InstanceImageId (\s a -> s { _eC2InstanceImageId = a })
eciInstanceInitiatedShutdownBehavior :: Lens' EC2Instance (Maybe (Val Text))
eciInstanceInitiatedShutdownBehavior = lens _eC2InstanceInstanceInitiatedShutdownBehavior (\s a -> s { _eC2InstanceInstanceInitiatedShutdownBehavior = a })
eciInstanceType :: Lens' EC2Instance (Maybe (Val Text))
eciInstanceType = lens _eC2InstanceInstanceType (\s a -> s { _eC2InstanceInstanceType = a })
eciKernelId :: Lens' EC2Instance (Maybe (Val Text))
eciKernelId = lens _eC2InstanceKernelId (\s a -> s { _eC2InstanceKernelId = a })
eciKeyName :: Lens' EC2Instance (Maybe (Val Text))
eciKeyName = lens _eC2InstanceKeyName (\s a -> s { _eC2InstanceKeyName = a })
eciMonitoring :: Lens' EC2Instance (Maybe (Val Bool'))
eciMonitoring = lens _eC2InstanceMonitoring (\s a -> s { _eC2InstanceMonitoring = a })
eciNetworkInterfaces :: Lens' EC2Instance (Maybe [NetworkInterface])
eciNetworkInterfaces = lens _eC2InstanceNetworkInterfaces (\s a -> s { _eC2InstanceNetworkInterfaces = a })
eciPlacementGroupName :: Lens' EC2Instance (Maybe (Val Text))
eciPlacementGroupName = lens _eC2InstancePlacementGroupName (\s a -> s { _eC2InstancePlacementGroupName = a })
eciPrivateIpAddress :: Lens' EC2Instance (Maybe (Val Text))
eciPrivateIpAddress = lens _eC2InstancePrivateIpAddress (\s a -> s { _eC2InstancePrivateIpAddress = a })
eciRamdiskId :: Lens' EC2Instance (Maybe (Val Text))
eciRamdiskId = lens _eC2InstanceRamdiskId (\s a -> s { _eC2InstanceRamdiskId = a })
eciSecurityGroupIds :: Lens' EC2Instance (Maybe [Val Text])
eciSecurityGroupIds = lens _eC2InstanceSecurityGroupIds (\s a -> s { _eC2InstanceSecurityGroupIds = a })
eciSecurityGroups :: Lens' EC2Instance (Maybe [Val Text])
eciSecurityGroups = lens _eC2InstanceSecurityGroups (\s a -> s { _eC2InstanceSecurityGroups = a })
eciSourceDestCheck :: Lens' EC2Instance (Maybe (Val Bool'))
eciSourceDestCheck = lens _eC2InstanceSourceDestCheck (\s a -> s { _eC2InstanceSourceDestCheck = a })
eciSsmAssociations :: Lens' EC2Instance (Maybe [EC2SsmAssociations])
eciSsmAssociations = lens _eC2InstanceSsmAssociations (\s a -> s { _eC2InstanceSsmAssociations = a })
eciSubnetId :: Lens' EC2Instance (Maybe (Val Text))
eciSubnetId = lens _eC2InstanceSubnetId (\s a -> s { _eC2InstanceSubnetId = a })
eciTags :: Lens' EC2Instance (Maybe [ResourceTag])
eciTags = lens _eC2InstanceTags (\s a -> s { _eC2InstanceTags = a })
eciTenancy :: Lens' EC2Instance (Maybe (Val Text))
eciTenancy = lens _eC2InstanceTenancy (\s a -> s { _eC2InstanceTenancy = a })
eciUserData :: Lens' EC2Instance (Maybe (Val Text))
eciUserData = lens _eC2InstanceUserData (\s a -> s { _eC2InstanceUserData = a })
eciVolumes :: Lens' EC2Instance (Maybe [EC2MountPoint])
eciVolumes = lens _eC2InstanceVolumes (\s a -> s { _eC2InstanceVolumes = a })
eciAdditionalInfo :: Lens' EC2Instance (Maybe (Val Text))
eciAdditionalInfo = lens _eC2InstanceAdditionalInfo (\s a -> s { _eC2InstanceAdditionalInfo = a })