module Network.AWS.EC2.Types
(
EC2
, RESTError
, ns
, ImageAttributeName (..)
, PermissionGroup (..)
, NetworkAclEntry
, networkAclEntry
, naeCidrBlock
, naeEgress
, naeIcmpTypeCode
, naePortRange
, naeProtocol
, naeRuleAction
, naeRuleNumber
, BlobAttributeValue
, blobAttributeValue
, bavValue
, ImportInstanceLaunchSpecification
, importInstanceLaunchSpecification
, iilsAdditionalInfo
, iilsArchitecture
, iilsGroupIds
, iilsGroupNames
, iilsInstanceInitiatedShutdownBehavior
, iilsInstanceType
, iilsMonitoring
, iilsPlacement
, iilsPrivateIpAddress
, iilsSubnetId
, iilsUserData
, Snapshot
, snapshot
, sDescription
, sEncrypted
, sOwnerAlias
, sOwnerId
, sProgress
, sSnapshotId
, sStartTime
, sState
, sTags
, sVolumeId
, sVolumeSize
, SpotInstanceStateFault
, spotInstanceStateFault
, sisfCode
, sisfMessage
, TagDescription
, tagDescription
, tdKey
, tdResourceId
, tdResourceType
, tdValue
, GroupIdentifier
, groupIdentifier
, giGroupId
, giGroupName
, VpnStaticRouteSource (..)
, ReservedInstancesListing
, reservedInstancesListing
, rilClientToken
, rilCreateDate
, rilInstanceCounts
, rilPriceSchedules
, rilReservedInstancesId
, rilReservedInstancesListingId
, rilStatus
, rilStatusMessage
, rilTags
, rilUpdateDate
, InstanceLifecycleType (..)
, VirtualizationType (..)
, NetworkInterfaceStatus (..)
, PlatformValues (..)
, CreateVolumePermission
, createVolumePermission
, cvpGroup
, cvpUserId
, NetworkInterfaceAttachmentChanges
, networkInterfaceAttachmentChanges
, niacAttachmentId
, niacDeleteOnTermination
, RecurringChargeFrequency (..)
, DhcpOptions
, dhcpOptions
, doDhcpConfigurations
, doDhcpOptionsId
, doTags
, InstanceNetworkInterfaceSpecification
, instanceNetworkInterfaceSpecification
, inisAssociatePublicIpAddress
, inisDeleteOnTermination
, inisDescription
, inisDeviceIndex
, inisGroups
, inisNetworkInterfaceId
, inisPrivateIpAddress
, inisPrivateIpAddresses
, inisSecondaryPrivateIpAddressCount
, inisSubnetId
, VolumeState (..)
, AttributeValue
, attributeValue
, avValue
, PrivateIpAddressSpecification
, privateIpAddressSpecification
, piasPrimary
, piasPrivateIpAddress
, Image
, image
, iArchitecture
, iBlockDeviceMappings
, iDescription
, iHypervisor
, iImageId
, iImageLocation
, iImageOwnerAlias
, iImageType
, iKernelId
, iName
, iOwnerId
, iPlatform
, iProductCodes
, iPublic
, iRamdiskId
, iRootDeviceName
, iRootDeviceType
, iSriovNetSupport
, iState
, iStateReason
, iTags
, iVirtualizationType
, DhcpConfiguration
, dhcpConfiguration
, dcKey
, dcValues
, Tag
, tag
, tagKey
, tagValue
, AccountAttributeName (..)
, NetworkInterfaceAttachment
, networkInterfaceAttachment
, niaAttachTime
, niaAttachmentId
, niaDeleteOnTermination
, niaDeviceIndex
, niaInstanceId
, niaInstanceOwnerId
, niaStatus
, RunInstancesMonitoringEnabled
, runInstancesMonitoringEnabled
, rimeEnabled
, VolumeStatusInfo
, volumeStatusInfo
, vsiDetails
, vsiStatus
, NetworkInterfaceAssociation
, networkInterfaceAssociation
, niaAllocationId
, niaAssociationId
, niaIpOwnerId
, niaPublicDnsName
, niaPublicIp
, CreateVolumePermissionModifications
, createVolumePermissionModifications
, cvpmAdd
, cvpmRemove
, VpcState (..)
, ResourceType (..)
, ReportStatusType (..)
, CurrencyCodeValues (..)
, IcmpTypeCode
, icmpTypeCode
, itcCode
, itcType
, InstanceCount
, instanceCount
, icInstanceCount
, icState
, ExportToS3Task
, exportToS3Task
, etstContainerFormat
, etstDiskImageFormat
, etstS3Bucket
, etstS3Key
, BlockDeviceMapping
, blockDeviceMapping
, bdmDeviceName
, bdmEbs
, bdmNoDevice
, bdmVirtualName
, ConversionTask
, conversionTask
, ctConversionTaskId
, ctExpirationTime
, ctImportInstance
, ctImportVolume
, ctState
, ctStatusMessage
, ctTags
, AttachmentStatus (..)
, RouteOrigin (..)
, ListingState (..)
, SpotPrice
, spotPrice
, spAvailabilityZone
, spInstanceType
, spProductDescription
, spSpotPrice
, spTimestamp
, InstanceMonitoring
, instanceMonitoring
, imInstanceId
, imMonitoring
, PriceScheduleSpecification
, priceScheduleSpecification
, pssCurrencyCode
, pssPrice
, pssTerm
, SpotInstanceStatus
, spotInstanceStatus
, sisCode
, sisMessage
, sisUpdateTime
, AvailabilityZoneState (..)
, SpotInstanceRequest
, spotInstanceRequest
, siAvailabilityZoneGroup
, siCreateTime
, siFault
, siInstanceId
, siLaunchGroup
, siLaunchSpecification
, siLaunchedAvailabilityZone
, siProductDescription
, siSpotInstanceRequestId
, siSpotPrice
, siState
, siStatus
, siTags
, siType
, siValidFrom
, siValidUntil
, LaunchSpecification
, launchSpecification
, lsAddressingType
, lsBlockDeviceMappings
, lsEbsOptimized
, lsIamInstanceProfile
, lsImageId
, lsInstanceType
, lsKernelId
, lsKeyName
, lsMonitoring
, lsNetworkInterfaces
, lsPlacement
, lsRamdiskId
, lsSecurityGroups
, lsSubnetId
, lsUserData
, VolumeStatusEvent
, volumeStatusEvent
, vseDescription
, vseEventId
, vseEventType
, vseNotAfter
, vseNotBefore
, Volume
, volume
, vAttachments
, vAvailabilityZone
, vCreateTime
, vEncrypted
, vIops
, vSize
, vSnapshotId
, vState
, vTags
, vVolumeId
, vVolumeType
, Reservation
, reservation
, rGroups
, rInstances
, rOwnerId
, rRequesterId
, rReservationId
, ImportInstanceVolumeDetailItem
, importInstanceVolumeDetailItem
, iivdiAvailabilityZone
, iivdiBytesConverted
, iivdiDescription
, iivdiImage
, iivdiStatus
, iivdiStatusMessage
, iivdiVolume
, SummaryStatus (..)
, ReservedInstancesModification
, reservedInstancesModification
, rimClientToken
, rimCreateDate
, rimEffectiveDate
, rimModificationResults
, rimReservedInstancesIds
, rimReservedInstancesModificationId
, rimStatus
, rimStatusMessage
, rimUpdateDate
, RuleAction (..)
, NetworkInterface
, networkInterface
, niAssociation
, niAttachment
, niAvailabilityZone
, niDescription
, niGroups
, niMacAddress
, niNetworkInterfaceId
, niOwnerId
, niPrivateDnsName
, niPrivateIpAddress
, niPrivateIpAddresses
, niRequesterId
, niRequesterManaged
, niSourceDestCheck
, niStatus
, niSubnetId
, niTagSet
, niVpcId
, TelemetryStatus (..)
, Subnet
, subnet
, s1AvailabilityZone
, s1AvailableIpAddressCount
, s1CidrBlock
, s1DefaultForAz
, s1MapPublicIpOnLaunch
, s1State
, s1SubnetId
, s1Tags
, s1VpcId
, KeyPairInfo
, keyPairInfo
, kpiKeyFingerprint
, kpiKeyName
, LaunchPermissionModifications
, launchPermissionModifications
, lpmAdd
, lpmRemove
, SnapshotState (..)
, InstanceNetworkInterfaceAssociation
, instanceNetworkInterfaceAssociation
, iniaIpOwnerId
, iniaPublicDnsName
, iniaPublicIp
, DiskImageDetail
, diskImageDetail
, didBytes
, didFormat
, didImportManifestUrl
, InstancePrivateIpAddress
, instancePrivateIpAddress
, ipiaAssociation
, ipiaPrimary
, ipiaPrivateDnsName
, ipiaPrivateIpAddress
, CancelledSpotInstanceRequest
, cancelledSpotInstanceRequest
, csiSpotInstanceRequestId
, csiState
, VpnConnectionOptionsSpecification
, vpnConnectionOptionsSpecification
, vcosStaticRoutesOnly
, Address
, address
, aAllocationId
, aAssociationId
, aDomain
, aInstanceId
, aNetworkInterfaceId
, aNetworkInterfaceOwnerId
, aPrivateIpAddress
, aPublicIp
, VolumeAttachmentState (..)
, LaunchPermission
, launchPermission
, lpGroup
, lpUserId
, RouteState (..)
, RouteTableAssociation
, routeTableAssociation
, rtaMain
, rtaRouteTableAssociationId
, rtaRouteTableId
, rtaSubnetId
, BundleTaskState (..)
, PortRange
, portRange
, prFrom
, prTo
, VpcAttributeName (..)
, ReservedInstancesConfiguration
, reservedInstancesConfiguration
, ricAvailabilityZone
, ricInstanceCount
, ricInstanceType
, ricPlatform
, VolumeStatusDetails
, volumeStatusDetails
, vsdName
, vsdStatus
, SpotInstanceState (..)
, VpnConnectionOptions
, vpnConnectionOptions
, vcoStaticRoutesOnly
, UserIdGroupPair
, userIdGroupPair
, uigpGroupId
, uigpGroupName
, uigpUserId
, InstanceStatusSummary
, instanceStatusSummary
, issDetails
, issStatus
, SpotPlacement
, spotPlacement
, sp1AvailabilityZone
, sp1GroupName
, EbsInstanceBlockDeviceSpecification
, ebsInstanceBlockDeviceSpecification
, eibdsDeleteOnTermination
, eibdsVolumeId
, NetworkAclAssociation
, networkAclAssociation
, naaNetworkAclAssociationId
, naaNetworkAclId
, naaSubnetId
, BundleTask
, bundleTask
, btBundleId
, btBundleTaskError
, btInstanceId
, btProgress
, btStartTime
, btState
, btStorage
, btUpdateTime
, InstanceStatusEvent
, instanceStatusEvent
, iseCode
, iseDescription
, iseNotAfter
, iseNotBefore
, InstanceType (..)
, Route
, route
, rDestinationCidrBlock
, rGatewayId
, rInstanceId
, rInstanceOwnerId
, rNetworkInterfaceId
, rOrigin
, rState
, rVpcPeeringConnectionId
, SpotDatafeedSubscription
, spotDatafeedSubscription
, sdsBucket
, sdsFault
, sdsOwnerId
, sdsPrefix
, sdsState
, Storage
, storage
, sS3
, SecurityGroup
, securityGroup
, sgDescription
, sgGroupId
, sgGroupName
, sgIpPermissions
, sgIpPermissionsEgress
, sgOwnerId
, sgTags
, sgVpcId
, CancelSpotInstanceRequestState (..)
, PlacementGroupState (..)
, ReservedInstancesModificationResult
, reservedInstancesModificationResult
, rimrReservedInstancesId
, rimrTargetConfiguration
, InstanceBlockDeviceMappingSpecification
, instanceBlockDeviceMappingSpecification
, ibdmsDeviceName
, ibdmsEbs
, ibdmsNoDevice
, ibdmsVirtualName
, ExportEnvironment (..)
, VolumeAttachment
, volumeAttachment
, vaAttachTime
, vaDeleteOnTermination
, vaDevice
, vaInstanceId
, vaState
, vaVolumeId
, CustomerGateway
, customerGateway
, cgBgpAsn
, cgCustomerGatewayId
, cgIpAddress
, cgState
, cgTags
, cgType
, EbsInstanceBlockDevice
, ebsInstanceBlockDevice
, eibdAttachTime
, eibdDeleteOnTermination
, eibdStatus
, eibdVolumeId
, ShutdownBehavior (..)
, DiskImageDescription
, diskImageDescription
, did1Checksum
, did1Format
, did1ImportManifestUrl
, did1Size
, DiskImageVolumeDescription
, diskImageVolumeDescription
, divdId
, divdSize
, Monitoring
, monitoring
, mState
, SubnetState (..)
, ContainerFormat (..)
, AvailabilityZoneMessage
, availabilityZoneMessage
, azmMessage
, VpcAttachment
, vpcAttachment
, va1State
, va1VpcId
, InstanceBlockDeviceMapping
, instanceBlockDeviceMapping
, ibdmDeviceName
, ibdmEbs
, StatusType (..)
, ExportToS3TaskSpecification
, exportToS3TaskSpecification
, etstsContainerFormat
, etstsDiskImageFormat
, etstsS3Bucket
, etstsS3Prefix
, NetworkInterfaceAttribute (..)
, ImageTypeValues (..)
, InstanceExportDetails
, instanceExportDetails
, iedInstanceId
, iedTargetEnvironment
, SnapshotAttributeName (..)
, AvailabilityZone
, availabilityZone
, azMessages
, azRegionName
, azState
, azZoneName
, VpnState (..)
, RouteTable
, routeTable
, rtAssociations
, rtPropagatingVgws
, rtRouteTableId
, rtRoutes
, rtTags
, rtVpcId
, HypervisorType (..)
, InstanceStatusDetails
, instanceStatusDetails
, isdImpairedSince
, isdName
, isdStatus
, IamInstanceProfile
, iamInstanceProfile
, iipArn
, iipId
, InternetGatewayAttachment
, internetGatewayAttachment
, igaState
, igaVpcId
, ReservedInstanceState (..)
, InstanceAttributeName (..)
, IpPermission
, ipPermission
, ipFromPort
, ipIpProtocol
, ipIpRanges
, ipToPort
, ipUserIdGroupPairs
, ConversionTaskState (..)
, DiskImage
, diskImage
, diDescription
, diImage
, diVolume
, Tenancy (..)
, VpcPeeringConnectionStateReason
, vpcPeeringConnectionStateReason
, vpcsrCode
, vpcsrMessage
, IamInstanceProfileSpecification
, iamInstanceProfileSpecification
, iipsArn
, iipsName
, ImportVolumeTaskDetails
, importVolumeTaskDetails
, ivtdAvailabilityZone
, ivtdBytesConverted
, ivtdDescription
, ivtdImage
, ivtdVolume
, PlacementStrategy (..)
, InstanceNetworkInterface
, instanceNetworkInterface
, iniAssociation
, iniAttachment
, iniDescription
, iniGroups
, iniMacAddress
, iniNetworkInterfaceId
, iniOwnerId
, iniPrivateDnsName
, iniPrivateIpAddress
, iniPrivateIpAddresses
, iniSourceDestCheck
, iniStatus
, iniSubnetId
, iniVpcId
, VolumeStatusAction
, volumeStatusAction
, vsaCode
, vsaDescription
, vsaEventId
, vsaEventType
, VpcPeeringConnectionVpcInfo
, vpcPeeringConnectionVpcInfo
, vpcviCidrBlock
, vpcviOwnerId
, vpcviVpcId
, ReservedInstanceLimitPrice
, reservedInstanceLimitPrice
, rilpAmount
, rilpCurrencyCode
, Vpc
, vpc
, vpcCidrBlock
, vpcDhcpOptionsId
, vpcInstanceTenancy
, vpcIsDefault
, vpcState
, vpcTags
, vpcVpcId
, InstanceStatus
, instanceStatus
, isAvailabilityZone
, isEvents
, isInstanceId
, isInstanceState
, isInstanceStatus
, isSystemStatus
, ArchitectureValues (..)
, ReportInstanceReasonCodes (..)
, EbsBlockDevice
, ebsBlockDevice
, ebdDeleteOnTermination
, ebdEncrypted
, ebdIops
, ebdSnapshotId
, ebdVolumeSize
, ebdVolumeType
, AccountAttribute
, accountAttribute
, aaAttributeName
, aaAttributeValues
, PriceSchedule
, priceSchedule
, psActive
, psCurrencyCode
, psPrice
, psTerm
, DeviceType (..)
, DomainType (..)
, Region
, region
, rEndpoint
, rRegionName
, PropagatingVgw
, propagatingVgw
, pvGatewayId
, OfferingTypeValues (..)
, VpnGateway
, vpnGateway
, vgAvailabilityZone
, vgState
, vgTags
, vgType
, vgVpcAttachments
, vgVpnGatewayId
, Filter
, filter'
, fName
, fValues
, VolumeType (..)
, InstanceStateChange
, instanceStateChange
, iscCurrentState
, iscInstanceId
, iscPreviousState
, NetworkAcl
, networkAcl
, naAssociations
, naEntries
, naIsDefault
, naNetworkAclId
, naTags
, naVpcId
, ImageState (..)
, GatewayType (..)
, InstanceNetworkInterfaceAttachment
, instanceNetworkInterfaceAttachment
, iniaAttachTime
, iniaAttachmentId
, iniaDeleteOnTermination
, iniaDeviceIndex
, iniaStatus
, AttributeBooleanValue
, attributeBooleanValue
, abvValue
, RecurringCharge
, recurringCharge
, rcAmount
, rcFrequency
, NewDhcpConfiguration
, newDhcpConfiguration
, ndcKey
, ndcValues
, StateReason
, stateReason
, srCode
, srMessage
, MonitoringState (..)
, ReservedInstancesId
, reservedInstancesId
, riiReservedInstancesId
, StatusName (..)
, InternetGateway
, internetGateway
, igAttachments
, igInternetGatewayId
, igTags
, VolumeStatusName (..)
, VolumeAttributeName (..)
, ImportInstanceTaskDetails
, importInstanceTaskDetails
, iitdDescription
, iitdInstanceId
, iitdPlatform
, iitdVolumes
, PlacementGroup
, placementGroup
, pgGroupName
, pgState
, pgStrategy
, ProductCode
, productCode
, pcProductCodeId
, pcProductCodeType
, ListingStatus (..)
, IpRange
, ipRange
, irCidrIp
, VolumeStatusInfoStatus (..)
, AccountAttributeValue
, accountAttributeValue
, aavAttributeValue
, RIProductDescription (..)
, ReservedInstancesOffering
, reservedInstancesOffering
, rioAvailabilityZone
, rioCurrencyCode
, rioDuration
, rioFixedPrice
, rioInstanceTenancy
, rioInstanceType
, rioMarketplace
, rioOfferingType
, rioPricingDetails
, rioProductDescription
, rioRecurringCharges
, rioReservedInstancesOfferingId
, rioUsagePrice
, ReservedInstances
, reservedInstances
, ri1AvailabilityZone
, ri1CurrencyCode
, ri1Duration
, ri1End
, ri1FixedPrice
, ri1InstanceCount
, ri1InstanceTenancy
, ri1InstanceType
, ri1OfferingType
, ri1ProductDescription
, ri1RecurringCharges
, ri1ReservedInstancesId
, ri1Start
, ri1State
, ri1Tags
, ri1UsagePrice
, DatafeedSubscriptionState (..)
, ExportTaskState (..)
, ProductCodeValues (..)
, VpnConnection
, vpnConnection
, vcCustomerGatewayConfiguration
, vcCustomerGatewayId
, vcOptions
, vcRoutes
, vcState
, vcTags
, vcType
, vcVgwTelemetry
, vcVpnConnectionId
, vcVpnGatewayId
, InstanceState
, instanceState
, isCode
, isName
, Placement
, placement
, pAvailabilityZone
, pGroupName
, pTenancy
, EventCode (..)
, SpotInstanceType (..)
, VpcPeeringConnection
, vpcPeeringConnection
, vpc1AccepterVpcInfo
, vpc1ExpirationTime
, vpc1RequesterVpcInfo
, vpc1Status
, vpc1Tags
, vpc1VpcPeeringConnectionId
, S3Storage
, s3Storage
, ssAWSAccessKeyId
, ssBucket
, ssPrefix
, ssUploadPolicy
, ssUploadPolicySignature
, VgwTelemetry
, vgwTelemetry
, vtAcceptedRouteCount
, vtLastStatusChange
, vtOutsideIpAddress
, vtStatus
, vtStatusMessage
, VpnStaticRoute
, vpnStaticRoute
, vsrDestinationCidrBlock
, vsrSource
, vsrState
, InstanceStateName (..)
, Instance
, instance'
, i1AmiLaunchIndex
, i1Architecture
, i1BlockDeviceMappings
, i1ClientToken
, i1EbsOptimized
, i1Hypervisor
, i1IamInstanceProfile
, i1ImageId
, i1InstanceId
, i1InstanceLifecycle
, i1InstanceType
, i1KernelId
, i1KeyName
, i1LaunchTime
, i1Monitoring
, i1NetworkInterfaces
, i1Placement
, i1Platform
, i1PrivateDnsName
, i1PrivateIpAddress
, i1ProductCodes
, i1PublicDnsName
, i1PublicIpAddress
, i1RamdiskId
, i1RootDeviceName
, i1RootDeviceType
, i1SecurityGroups
, i1SourceDestCheck
, i1SpotInstanceRequestId
, i1SriovNetSupport
, i1State
, i1StateReason
, i1StateTransitionReason
, i1SubnetId
, i1Tags
, i1VirtualizationType
, i1VpcId
, ExportTask
, exportTask
, etDescription
, etExportTaskId
, etExportToS3Task
, etInstanceExportDetails
, etState
, etStatusMessage
, ResetImageAttributeName (..)
, RequestSpotLaunchSpecification
, requestSpotLaunchSpecification
, rslsAddressingType
, rslsBlockDeviceMappings
, rslsEbsOptimized
, rslsIamInstanceProfile
, rslsImageId
, rslsInstanceType
, rslsKernelId
, rslsKeyName
, rslsMonitoring
, rslsNetworkInterfaces
, rslsPlacement
, rslsRamdiskId
, rslsSecurityGroupIds
, rslsSecurityGroups
, rslsSubnetId
, rslsUserData
, VolumeDetail
, volumeDetail
, vdSize
, PricingDetail
, pricingDetail
, pdCount
, pdPrice
, NetworkInterfacePrivateIpAddress
, networkInterfacePrivateIpAddress
, nipiaAssociation
, nipiaPrimary
, nipiaPrivateDnsName
, nipiaPrivateIpAddress
, DiskImageFormat (..)
, BundleTaskError
, bundleTaskError
, bteCode
, bteMessage
, VolumeStatusItem
, volumeStatusItem
, vsiActions
, vsiAvailabilityZone
, vsiEvents
, vsiVolumeId
, vsiVolumeStatus
, module Network.AWS.EC2.Internal
) where
import Network.AWS.Error
import Network.AWS.Prelude
import Network.AWS.Signing.V4
import Network.AWS.EC2.Internal
import qualified GHC.Exts
data EC2
instance AWSService EC2 where
type Sg EC2 = V4
type Er EC2 = RESTError
service = Service
{ _svcEndpoint = regional
, _svcAbbrev = "EC2"
, _svcPrefix = "ec2"
, _svcVersion = "2014-09-01"
, _svcTargetPrefix = Nothing
, _svcJSONVersion = Nothing
}
handle = restError statusSuccess
ns :: Text
ns = "http://ec2.amazonaws.com/doc/2014-09-01"
data ImageAttributeName
= ImageBlockDeviceMapping
| ImageDescription
| ImageKernel
| ImageLaunchPermission
| ImageProductCodes
| ImageRamdisk
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable ImageAttributeName
instance FromText ImageAttributeName where
parser = match "blockDeviceMapping" ImageBlockDeviceMapping
<|> match "description" ImageDescription
<|> match "kernel" ImageKernel
<|> match "launchPermission" ImageLaunchPermission
<|> match "productCodes" ImageProductCodes
<|> match "ramdisk" ImageRamdisk
instance ToText ImageAttributeName where
toText = \case
ImageBlockDeviceMapping -> "blockDeviceMapping"
ImageDescription -> "description"
ImageKernel -> "kernel"
ImageLaunchPermission -> "launchPermission"
ImageProductCodes -> "productCodes"
ImageRamdisk -> "ramdisk"
instance FromXML ImageAttributeName where
parseXML = parseXMLText "ImageAttributeName"
instance ToQuery ImageAttributeName where
toQuery = toQuery . toText
data PermissionGroup
= All
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable PermissionGroup
instance FromText PermissionGroup where
parser = match "all" All
instance ToText PermissionGroup where
toText All = "all"
instance FromXML PermissionGroup where
parseXML = parseXMLText "PermissionGroup"
instance ToQuery PermissionGroup where
toQuery = toQuery . toText
data NetworkAclEntry = NetworkAclEntry
{ _naeCidrBlock :: Maybe Text
, _naeEgress :: Maybe Bool
, _naeIcmpTypeCode :: Maybe IcmpTypeCode
, _naePortRange :: Maybe PortRange
, _naeProtocol :: Maybe Text
, _naeRuleAction :: Maybe Text
, _naeRuleNumber :: Maybe Int
} deriving (Eq, Show)
networkAclEntry :: NetworkAclEntry
networkAclEntry = NetworkAclEntry
{ _naeRuleNumber = Nothing
, _naeProtocol = Nothing
, _naeRuleAction = Nothing
, _naeEgress = Nothing
, _naeCidrBlock = Nothing
, _naeIcmpTypeCode = Nothing
, _naePortRange = Nothing
}
naeCidrBlock :: Lens' NetworkAclEntry (Maybe Text)
naeCidrBlock = lens _naeCidrBlock (\s a -> s { _naeCidrBlock = a })
naeEgress :: Lens' NetworkAclEntry (Maybe Bool)
naeEgress = lens _naeEgress (\s a -> s { _naeEgress = a })
naeIcmpTypeCode :: Lens' NetworkAclEntry (Maybe IcmpTypeCode)
naeIcmpTypeCode = lens _naeIcmpTypeCode (\s a -> s { _naeIcmpTypeCode = a })
naePortRange :: Lens' NetworkAclEntry (Maybe PortRange)
naePortRange = lens _naePortRange (\s a -> s { _naePortRange = a })
naeProtocol :: Lens' NetworkAclEntry (Maybe Text)
naeProtocol = lens _naeProtocol (\s a -> s { _naeProtocol = a })
naeRuleAction :: Lens' NetworkAclEntry (Maybe Text)
naeRuleAction = lens _naeRuleAction (\s a -> s { _naeRuleAction = a })
naeRuleNumber :: Lens' NetworkAclEntry (Maybe Int)
naeRuleNumber = lens _naeRuleNumber (\s a -> s { _naeRuleNumber = a })
instance FromXML NetworkAclEntry where
parseXML x = NetworkAclEntry
<$> x .@? "cidrBlock"
<*> x .@? "egress"
<*> x .@? "icmpTypeCode"
<*> x .@? "portRange"
<*> x .@? "protocol"
<*> x .@? "ruleAction"
<*> x .@? "ruleNumber"
instance ToQuery NetworkAclEntry where
toQuery NetworkAclEntry{..} = mconcat
[ "cidrBlock" =? _naeCidrBlock
, "egress" =? _naeEgress
, "icmpTypeCode" =? _naeIcmpTypeCode
, "portRange" =? _naePortRange
, "protocol" =? _naeProtocol
, "ruleAction" =? _naeRuleAction
, "ruleNumber" =? _naeRuleNumber
]
newtype BlobAttributeValue = BlobAttributeValue
{ _bavValue :: Maybe Base64
} deriving (Eq, Show)
blobAttributeValue :: BlobAttributeValue
blobAttributeValue = BlobAttributeValue
{ _bavValue = Nothing
}
bavValue :: Lens' BlobAttributeValue (Maybe Base64)
bavValue = lens _bavValue (\s a -> s { _bavValue = a })
instance FromXML BlobAttributeValue where
parseXML x = BlobAttributeValue
<$> x .@? "value"
instance ToQuery BlobAttributeValue where
toQuery BlobAttributeValue{..} = mconcat
[ "value" =? _bavValue
]
data ImportInstanceLaunchSpecification = ImportInstanceLaunchSpecification
{ _iilsAdditionalInfo :: Maybe Text
, _iilsArchitecture :: Maybe Text
, _iilsGroupIds :: List "SecurityGroupId" Text
, _iilsGroupNames :: List "SecurityGroup" Text
, _iilsInstanceInitiatedShutdownBehavior :: Maybe Text
, _iilsInstanceType :: Maybe Text
, _iilsMonitoring :: Maybe Bool
, _iilsPlacement :: Maybe Placement
, _iilsPrivateIpAddress :: Maybe Text
, _iilsSubnetId :: Maybe Text
, _iilsUserData :: Maybe Text
} deriving (Eq, Show)
importInstanceLaunchSpecification :: ImportInstanceLaunchSpecification
importInstanceLaunchSpecification = ImportInstanceLaunchSpecification
{ _iilsArchitecture = Nothing
, _iilsGroupNames = mempty
, _iilsGroupIds = mempty
, _iilsAdditionalInfo = Nothing
, _iilsUserData = Nothing
, _iilsInstanceType = Nothing
, _iilsPlacement = Nothing
, _iilsMonitoring = Nothing
, _iilsSubnetId = Nothing
, _iilsInstanceInitiatedShutdownBehavior = Nothing
, _iilsPrivateIpAddress = Nothing
}
iilsAdditionalInfo :: Lens' ImportInstanceLaunchSpecification (Maybe Text)
iilsAdditionalInfo =
lens _iilsAdditionalInfo (\s a -> s { _iilsAdditionalInfo = a })
iilsArchitecture :: Lens' ImportInstanceLaunchSpecification (Maybe Text)
iilsArchitecture = lens _iilsArchitecture (\s a -> s { _iilsArchitecture = a })
iilsGroupIds :: Lens' ImportInstanceLaunchSpecification [Text]
iilsGroupIds = lens _iilsGroupIds (\s a -> s { _iilsGroupIds = a }) . _List
iilsGroupNames :: Lens' ImportInstanceLaunchSpecification [Text]
iilsGroupNames = lens _iilsGroupNames (\s a -> s { _iilsGroupNames = a }) . _List
iilsInstanceInitiatedShutdownBehavior :: Lens' ImportInstanceLaunchSpecification (Maybe Text)
iilsInstanceInitiatedShutdownBehavior =
lens _iilsInstanceInitiatedShutdownBehavior
(\s a -> s { _iilsInstanceInitiatedShutdownBehavior = a })
iilsInstanceType :: Lens' ImportInstanceLaunchSpecification (Maybe Text)
iilsInstanceType = lens _iilsInstanceType (\s a -> s { _iilsInstanceType = a })
iilsMonitoring :: Lens' ImportInstanceLaunchSpecification (Maybe Bool)
iilsMonitoring = lens _iilsMonitoring (\s a -> s { _iilsMonitoring = a })
iilsPlacement :: Lens' ImportInstanceLaunchSpecification (Maybe Placement)
iilsPlacement = lens _iilsPlacement (\s a -> s { _iilsPlacement = a })
iilsPrivateIpAddress :: Lens' ImportInstanceLaunchSpecification (Maybe Text)
iilsPrivateIpAddress =
lens _iilsPrivateIpAddress (\s a -> s { _iilsPrivateIpAddress = a })
iilsSubnetId :: Lens' ImportInstanceLaunchSpecification (Maybe Text)
iilsSubnetId = lens _iilsSubnetId (\s a -> s { _iilsSubnetId = a })
iilsUserData :: Lens' ImportInstanceLaunchSpecification (Maybe Text)
iilsUserData = lens _iilsUserData (\s a -> s { _iilsUserData = a })
instance FromXML ImportInstanceLaunchSpecification where
parseXML x = ImportInstanceLaunchSpecification
<$> x .@? "additionalInfo"
<*> x .@? "architecture"
<*> x .@ "GroupId"
<*> x .@ "GroupName"
<*> x .@? "instanceInitiatedShutdownBehavior"
<*> x .@? "instanceType"
<*> x .@? "monitoring"
<*> x .@? "placement"
<*> x .@? "privateIpAddress"
<*> x .@? "subnetId"
<*> x .@? "userData"
instance ToQuery ImportInstanceLaunchSpecification where
toQuery ImportInstanceLaunchSpecification{..} = mconcat
[ "additionalInfo" =? _iilsAdditionalInfo
, "architecture" =? _iilsArchitecture
, "GroupId" =? _iilsGroupIds
, "GroupName" =? _iilsGroupNames
, "instanceInitiatedShutdownBehavior" =? _iilsInstanceInitiatedShutdownBehavior
, "instanceType" =? _iilsInstanceType
, "monitoring" =? _iilsMonitoring
, "placement" =? _iilsPlacement
, "privateIpAddress" =? _iilsPrivateIpAddress
, "subnetId" =? _iilsSubnetId
, "userData" =? _iilsUserData
]
data Snapshot = Snapshot
{ _sDescription :: Maybe Text
, _sEncrypted :: Maybe Bool
, _sOwnerAlias :: Maybe Text
, _sOwnerId :: Maybe Text
, _sProgress :: Maybe Text
, _sSnapshotId :: Maybe Text
, _sStartTime :: Maybe RFC822
, _sState :: Maybe Text
, _sTags :: List "item" Tag
, _sVolumeId :: Maybe Text
, _sVolumeSize :: Maybe Int
} deriving (Eq, Show)
snapshot :: Snapshot
snapshot = Snapshot
{ _sSnapshotId = Nothing
, _sVolumeId = Nothing
, _sState = Nothing
, _sStartTime = Nothing
, _sProgress = Nothing
, _sOwnerId = Nothing
, _sDescription = Nothing
, _sVolumeSize = Nothing
, _sOwnerAlias = Nothing
, _sTags = mempty
, _sEncrypted = Nothing
}
sDescription :: Lens' Snapshot (Maybe Text)
sDescription = lens _sDescription (\s a -> s { _sDescription = a })
sEncrypted :: Lens' Snapshot (Maybe Bool)
sEncrypted = lens _sEncrypted (\s a -> s { _sEncrypted = a })
sOwnerAlias :: Lens' Snapshot (Maybe Text)
sOwnerAlias = lens _sOwnerAlias (\s a -> s { _sOwnerAlias = a })
sOwnerId :: Lens' Snapshot (Maybe Text)
sOwnerId = lens _sOwnerId (\s a -> s { _sOwnerId = a })
sProgress :: Lens' Snapshot (Maybe Text)
sProgress = lens _sProgress (\s a -> s { _sProgress = a })
sSnapshotId :: Lens' Snapshot (Maybe Text)
sSnapshotId = lens _sSnapshotId (\s a -> s { _sSnapshotId = a })
sStartTime :: Lens' Snapshot (Maybe UTCTime)
sStartTime = lens _sStartTime (\s a -> s { _sStartTime = a }) . mapping _Time
sState :: Lens' Snapshot (Maybe Text)
sState = lens _sState (\s a -> s { _sState = a })
sTags :: Lens' Snapshot [Tag]
sTags = lens _sTags (\s a -> s { _sTags = a }) . _List
sVolumeId :: Lens' Snapshot (Maybe Text)
sVolumeId = lens _sVolumeId (\s a -> s { _sVolumeId = a })
sVolumeSize :: Lens' Snapshot (Maybe Int)
sVolumeSize = lens _sVolumeSize (\s a -> s { _sVolumeSize = a })
instance FromXML Snapshot where
parseXML x = Snapshot
<$> x .@? "description"
<*> x .@? "encrypted"
<*> x .@? "ownerAlias"
<*> x .@? "ownerId"
<*> x .@? "progress"
<*> x .@? "snapshotId"
<*> x .@? "startTime"
<*> x .@? "status"
<*> x .@ "tagSet"
<*> x .@? "volumeId"
<*> x .@? "volumeSize"
instance ToQuery Snapshot where
toQuery Snapshot{..} = mconcat
[ "description" =? _sDescription
, "encrypted" =? _sEncrypted
, "ownerAlias" =? _sOwnerAlias
, "ownerId" =? _sOwnerId
, "progress" =? _sProgress
, "snapshotId" =? _sSnapshotId
, "startTime" =? _sStartTime
, "status" =? _sState
, "tagSet" =? _sTags
, "volumeId" =? _sVolumeId
, "volumeSize" =? _sVolumeSize
]
data SpotInstanceStateFault = SpotInstanceStateFault
{ _sisfCode :: Maybe Text
, _sisfMessage :: Maybe Text
} deriving (Eq, Ord, Show)
spotInstanceStateFault :: SpotInstanceStateFault
spotInstanceStateFault = SpotInstanceStateFault
{ _sisfCode = Nothing
, _sisfMessage = Nothing
}
sisfCode :: Lens' SpotInstanceStateFault (Maybe Text)
sisfCode = lens _sisfCode (\s a -> s { _sisfCode = a })
sisfMessage :: Lens' SpotInstanceStateFault (Maybe Text)
sisfMessage = lens _sisfMessage (\s a -> s { _sisfMessage = a })
instance FromXML SpotInstanceStateFault where
parseXML x = SpotInstanceStateFault
<$> x .@? "code"
<*> x .@? "message"
instance ToQuery SpotInstanceStateFault where
toQuery SpotInstanceStateFault{..} = mconcat
[ "code" =? _sisfCode
, "message" =? _sisfMessage
]
data TagDescription = TagDescription
{ _tdKey :: Text
, _tdResourceId :: Text
, _tdResourceType :: Text
, _tdValue :: Text
} deriving (Eq, Ord, Show)
tagDescription :: Text
-> Text
-> Text
-> Text
-> TagDescription
tagDescription p1 p2 p3 p4 = TagDescription
{ _tdResourceId = p1
, _tdResourceType = p2
, _tdKey = p3
, _tdValue = p4
}
tdKey :: Lens' TagDescription Text
tdKey = lens _tdKey (\s a -> s { _tdKey = a })
tdResourceId :: Lens' TagDescription Text
tdResourceId = lens _tdResourceId (\s a -> s { _tdResourceId = a })
tdResourceType :: Lens' TagDescription Text
tdResourceType = lens _tdResourceType (\s a -> s { _tdResourceType = a })
tdValue :: Lens' TagDescription Text
tdValue = lens _tdValue (\s a -> s { _tdValue = a })
instance FromXML TagDescription where
parseXML x = TagDescription
<$> x .@ "key"
<*> x .@ "resourceId"
<*> x .@ "resourceType"
<*> x .@ "value"
instance ToQuery TagDescription where
toQuery TagDescription{..} = mconcat
[ "key" =? _tdKey
, "resourceId" =? _tdResourceId
, "resourceType" =? _tdResourceType
, "value" =? _tdValue
]
data GroupIdentifier = GroupIdentifier
{ _giGroupId :: Maybe Text
, _giGroupName :: Maybe Text
} deriving (Eq, Ord, Show)
groupIdentifier :: GroupIdentifier
groupIdentifier = GroupIdentifier
{ _giGroupName = Nothing
, _giGroupId = Nothing
}
giGroupId :: Lens' GroupIdentifier (Maybe Text)
giGroupId = lens _giGroupId (\s a -> s { _giGroupId = a })
giGroupName :: Lens' GroupIdentifier (Maybe Text)
giGroupName = lens _giGroupName (\s a -> s { _giGroupName = a })
instance FromXML GroupIdentifier where
parseXML x = GroupIdentifier
<$> x .@? "groupId"
<*> x .@? "groupName"
instance ToQuery GroupIdentifier where
toQuery GroupIdentifier{..} = mconcat
[ "groupId" =? _giGroupId
, "groupName" =? _giGroupName
]
data VpnStaticRouteSource
= Static
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable VpnStaticRouteSource
instance FromText VpnStaticRouteSource where
parser = match "Static" Static
instance ToText VpnStaticRouteSource where
toText Static = "Static"
instance FromXML VpnStaticRouteSource where
parseXML = parseXMLText "VpnStaticRouteSource"
instance ToQuery VpnStaticRouteSource where
toQuery = toQuery . toText
data ReservedInstancesListing = ReservedInstancesListing
{ _rilClientToken :: Maybe Text
, _rilCreateDate :: Maybe RFC822
, _rilInstanceCounts :: List "item" InstanceCount
, _rilPriceSchedules :: List "item" PriceSchedule
, _rilReservedInstancesId :: Maybe Text
, _rilReservedInstancesListingId :: Maybe Text
, _rilStatus :: Maybe Text
, _rilStatusMessage :: Maybe Text
, _rilTags :: List "item" Tag
, _rilUpdateDate :: Maybe RFC822
} deriving (Eq, Show)
reservedInstancesListing :: ReservedInstancesListing
reservedInstancesListing = ReservedInstancesListing
{ _rilReservedInstancesListingId = Nothing
, _rilReservedInstancesId = Nothing
, _rilCreateDate = Nothing
, _rilUpdateDate = Nothing
, _rilStatus = Nothing
, _rilStatusMessage = Nothing
, _rilInstanceCounts = mempty
, _rilPriceSchedules = mempty
, _rilTags = mempty
, _rilClientToken = Nothing
}
rilClientToken :: Lens' ReservedInstancesListing (Maybe Text)
rilClientToken = lens _rilClientToken (\s a -> s { _rilClientToken = a })
rilCreateDate :: Lens' ReservedInstancesListing (Maybe UTCTime)
rilCreateDate = lens _rilCreateDate (\s a -> s { _rilCreateDate = a }) . mapping _Time
rilInstanceCounts :: Lens' ReservedInstancesListing [InstanceCount]
rilInstanceCounts =
lens _rilInstanceCounts (\s a -> s { _rilInstanceCounts = a })
. _List
rilPriceSchedules :: Lens' ReservedInstancesListing [PriceSchedule]
rilPriceSchedules =
lens _rilPriceSchedules (\s a -> s { _rilPriceSchedules = a })
. _List
rilReservedInstancesId :: Lens' ReservedInstancesListing (Maybe Text)
rilReservedInstancesId =
lens _rilReservedInstancesId (\s a -> s { _rilReservedInstancesId = a })
rilReservedInstancesListingId :: Lens' ReservedInstancesListing (Maybe Text)
rilReservedInstancesListingId =
lens _rilReservedInstancesListingId
(\s a -> s { _rilReservedInstancesListingId = a })
rilStatus :: Lens' ReservedInstancesListing (Maybe Text)
rilStatus = lens _rilStatus (\s a -> s { _rilStatus = a })
rilStatusMessage :: Lens' ReservedInstancesListing (Maybe Text)
rilStatusMessage = lens _rilStatusMessage (\s a -> s { _rilStatusMessage = a })
rilTags :: Lens' ReservedInstancesListing [Tag]
rilTags = lens _rilTags (\s a -> s { _rilTags = a }) . _List
rilUpdateDate :: Lens' ReservedInstancesListing (Maybe UTCTime)
rilUpdateDate = lens _rilUpdateDate (\s a -> s { _rilUpdateDate = a }) . mapping _Time
instance FromXML ReservedInstancesListing where
parseXML x = ReservedInstancesListing
<$> x .@? "clientToken"
<*> x .@? "createDate"
<*> x .@ "instanceCounts"
<*> x .@ "priceSchedules"
<*> x .@? "reservedInstancesId"
<*> x .@? "reservedInstancesListingId"
<*> x .@? "status"
<*> x .@? "statusMessage"
<*> x .@ "tagSet"
<*> x .@? "updateDate"
instance ToQuery ReservedInstancesListing where
toQuery ReservedInstancesListing{..} = mconcat
[ "clientToken" =? _rilClientToken
, "createDate" =? _rilCreateDate
, "instanceCounts" =? _rilInstanceCounts
, "priceSchedules" =? _rilPriceSchedules
, "reservedInstancesId" =? _rilReservedInstancesId
, "reservedInstancesListingId" =? _rilReservedInstancesListingId
, "status" =? _rilStatus
, "statusMessage" =? _rilStatusMessage
, "tagSet" =? _rilTags
, "updateDate" =? _rilUpdateDate
]
data InstanceLifecycleType
= Spot
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable InstanceLifecycleType
instance FromText InstanceLifecycleType where
parser = match "spot" Spot
instance ToText InstanceLifecycleType where
toText Spot = "spot"
instance FromXML InstanceLifecycleType where
parseXML = parseXMLText "InstanceLifecycleType"
instance ToQuery InstanceLifecycleType where
toQuery = toQuery . toText
data VirtualizationType
= Hvm
| Paravirtual
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable VirtualizationType
instance FromText VirtualizationType where
parser = match "hvm" Hvm
<|> match "paravirtual" Paravirtual
instance ToText VirtualizationType where
toText = \case
Hvm -> "hvm"
Paravirtual -> "paravirtual"
instance FromXML VirtualizationType where
parseXML = parseXMLText "VirtualizationType"
instance ToQuery VirtualizationType where
toQuery = toQuery . toText
data NetworkInterfaceStatus
= Attaching
| Available
| Detaching
| InUse
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable NetworkInterfaceStatus
instance FromText NetworkInterfaceStatus where
parser = match "attaching" Attaching
<|> match "available" Available
<|> match "detaching" Detaching
<|> match "in-use" InUse
instance ToText NetworkInterfaceStatus where
toText = \case
Attaching -> "attaching"
Available -> "available"
Detaching -> "detaching"
InUse -> "in-use"
instance FromXML NetworkInterfaceStatus where
parseXML = parseXMLText "NetworkInterfaceStatus"
instance ToQuery NetworkInterfaceStatus where
toQuery = toQuery . toText
data PlatformValues
= Windows
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable PlatformValues
instance FromText PlatformValues where
parser = match "Windows" Windows
instance ToText PlatformValues where
toText Windows = "Windows"
instance FromXML PlatformValues where
parseXML = parseXMLText "PlatformValues"
instance ToQuery PlatformValues where
toQuery = toQuery . toText
data CreateVolumePermission = CreateVolumePermission
{ _cvpGroup :: Maybe Text
, _cvpUserId :: Maybe Text
} deriving (Eq, Ord, Show)
createVolumePermission :: CreateVolumePermission
createVolumePermission = CreateVolumePermission
{ _cvpUserId = Nothing
, _cvpGroup = Nothing
}
cvpGroup :: Lens' CreateVolumePermission (Maybe Text)
cvpGroup = lens _cvpGroup (\s a -> s { _cvpGroup = a })
cvpUserId :: Lens' CreateVolumePermission (Maybe Text)
cvpUserId = lens _cvpUserId (\s a -> s { _cvpUserId = a })
instance FromXML CreateVolumePermission where
parseXML x = CreateVolumePermission
<$> x .@? "group"
<*> x .@? "userId"
instance ToQuery CreateVolumePermission where
toQuery CreateVolumePermission{..} = mconcat
[ "group" =? _cvpGroup
, "userId" =? _cvpUserId
]
data NetworkInterfaceAttachmentChanges = NetworkInterfaceAttachmentChanges
{ _niacAttachmentId :: Maybe Text
, _niacDeleteOnTermination :: Maybe Bool
} deriving (Eq, Ord, Show)
networkInterfaceAttachmentChanges :: NetworkInterfaceAttachmentChanges
networkInterfaceAttachmentChanges = NetworkInterfaceAttachmentChanges
{ _niacAttachmentId = Nothing
, _niacDeleteOnTermination = Nothing
}
niacAttachmentId :: Lens' NetworkInterfaceAttachmentChanges (Maybe Text)
niacAttachmentId = lens _niacAttachmentId (\s a -> s { _niacAttachmentId = a })
niacDeleteOnTermination :: Lens' NetworkInterfaceAttachmentChanges (Maybe Bool)
niacDeleteOnTermination =
lens _niacDeleteOnTermination (\s a -> s { _niacDeleteOnTermination = a })
instance FromXML NetworkInterfaceAttachmentChanges where
parseXML x = NetworkInterfaceAttachmentChanges
<$> x .@? "attachmentId"
<*> x .@? "deleteOnTermination"
instance ToQuery NetworkInterfaceAttachmentChanges where
toQuery NetworkInterfaceAttachmentChanges{..} = mconcat
[ "attachmentId" =? _niacAttachmentId
, "deleteOnTermination" =? _niacDeleteOnTermination
]
data RecurringChargeFrequency
= Hourly
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable RecurringChargeFrequency
instance FromText RecurringChargeFrequency where
parser = match "Hourly" Hourly
instance ToText RecurringChargeFrequency where
toText Hourly = "Hourly"
instance FromXML RecurringChargeFrequency where
parseXML = parseXMLText "RecurringChargeFrequency"
instance ToQuery RecurringChargeFrequency where
toQuery = toQuery . toText
data DhcpOptions = DhcpOptions
{ _doDhcpConfigurations :: List "item" DhcpConfiguration
, _doDhcpOptionsId :: Maybe Text
, _doTags :: List "item" Tag
} deriving (Eq, Show)
dhcpOptions :: DhcpOptions
dhcpOptions = DhcpOptions
{ _doDhcpOptionsId = Nothing
, _doDhcpConfigurations = mempty
, _doTags = mempty
}
doDhcpConfigurations :: Lens' DhcpOptions [DhcpConfiguration]
doDhcpConfigurations =
lens _doDhcpConfigurations (\s a -> s { _doDhcpConfigurations = a })
. _List
doDhcpOptionsId :: Lens' DhcpOptions (Maybe Text)
doDhcpOptionsId = lens _doDhcpOptionsId (\s a -> s { _doDhcpOptionsId = a })
doTags :: Lens' DhcpOptions [Tag]
doTags = lens _doTags (\s a -> s { _doTags = a }) . _List
instance FromXML DhcpOptions where
parseXML x = DhcpOptions
<$> x .@ "dhcpConfigurationSet"
<*> x .@? "dhcpOptionsId"
<*> x .@ "tagSet"
instance ToQuery DhcpOptions where
toQuery DhcpOptions{..} = mconcat
[ "dhcpConfigurationSet" =? _doDhcpConfigurations
, "dhcpOptionsId" =? _doDhcpOptionsId
, "tagSet" =? _doTags
]
data InstanceNetworkInterfaceSpecification = InstanceNetworkInterfaceSpecification
{ _inisAssociatePublicIpAddress :: Maybe Bool
, _inisDeleteOnTermination :: Maybe Bool
, _inisDescription :: Maybe Text
, _inisDeviceIndex :: Maybe Int
, _inisGroups :: List "SecurityGroupId" Text
, _inisNetworkInterfaceId :: Maybe Text
, _inisPrivateIpAddress :: Maybe Text
, _inisPrivateIpAddresses :: List "item" PrivateIpAddressSpecification
, _inisSecondaryPrivateIpAddressCount :: Maybe Int
, _inisSubnetId :: Maybe Text
} deriving (Eq, Show)
instanceNetworkInterfaceSpecification :: InstanceNetworkInterfaceSpecification
instanceNetworkInterfaceSpecification = InstanceNetworkInterfaceSpecification
{ _inisNetworkInterfaceId = Nothing
, _inisDeviceIndex = Nothing
, _inisSubnetId = Nothing
, _inisDescription = Nothing
, _inisPrivateIpAddress = Nothing
, _inisGroups = mempty
, _inisDeleteOnTermination = Nothing
, _inisPrivateIpAddresses = mempty
, _inisSecondaryPrivateIpAddressCount = Nothing
, _inisAssociatePublicIpAddress = Nothing
}
inisAssociatePublicIpAddress :: Lens' InstanceNetworkInterfaceSpecification (Maybe Bool)
inisAssociatePublicIpAddress =
lens _inisAssociatePublicIpAddress
(\s a -> s { _inisAssociatePublicIpAddress = a })
inisDeleteOnTermination :: Lens' InstanceNetworkInterfaceSpecification (Maybe Bool)
inisDeleteOnTermination =
lens _inisDeleteOnTermination (\s a -> s { _inisDeleteOnTermination = a })
inisDescription :: Lens' InstanceNetworkInterfaceSpecification (Maybe Text)
inisDescription = lens _inisDescription (\s a -> s { _inisDescription = a })
inisDeviceIndex :: Lens' InstanceNetworkInterfaceSpecification (Maybe Int)
inisDeviceIndex = lens _inisDeviceIndex (\s a -> s { _inisDeviceIndex = a })
inisGroups :: Lens' InstanceNetworkInterfaceSpecification [Text]
inisGroups = lens _inisGroups (\s a -> s { _inisGroups = a }) . _List
inisNetworkInterfaceId :: Lens' InstanceNetworkInterfaceSpecification (Maybe Text)
inisNetworkInterfaceId =
lens _inisNetworkInterfaceId (\s a -> s { _inisNetworkInterfaceId = a })
inisPrivateIpAddress :: Lens' InstanceNetworkInterfaceSpecification (Maybe Text)
inisPrivateIpAddress =
lens _inisPrivateIpAddress (\s a -> s { _inisPrivateIpAddress = a })
inisPrivateIpAddresses :: Lens' InstanceNetworkInterfaceSpecification [PrivateIpAddressSpecification]
inisPrivateIpAddresses =
lens _inisPrivateIpAddresses (\s a -> s { _inisPrivateIpAddresses = a })
. _List
inisSecondaryPrivateIpAddressCount :: Lens' InstanceNetworkInterfaceSpecification (Maybe Int)
inisSecondaryPrivateIpAddressCount =
lens _inisSecondaryPrivateIpAddressCount
(\s a -> s { _inisSecondaryPrivateIpAddressCount = a })
inisSubnetId :: Lens' InstanceNetworkInterfaceSpecification (Maybe Text)
inisSubnetId = lens _inisSubnetId (\s a -> s { _inisSubnetId = a })
instance FromXML InstanceNetworkInterfaceSpecification where
parseXML x = InstanceNetworkInterfaceSpecification
<$> x .@? "associatePublicIpAddress"
<*> x .@? "deleteOnTermination"
<*> x .@? "description"
<*> x .@? "deviceIndex"
<*> x .@ "SecurityGroupId"
<*> x .@? "networkInterfaceId"
<*> x .@? "privateIpAddress"
<*> x .@ "privateIpAddressesSet"
<*> x .@? "secondaryPrivateIpAddressCount"
<*> x .@? "subnetId"
instance ToQuery InstanceNetworkInterfaceSpecification where
toQuery InstanceNetworkInterfaceSpecification{..} = mconcat
[ "associatePublicIpAddress" =? _inisAssociatePublicIpAddress
, "deleteOnTermination" =? _inisDeleteOnTermination
, "description" =? _inisDescription
, "deviceIndex" =? _inisDeviceIndex
, "SecurityGroupId" =? _inisGroups
, "networkInterfaceId" =? _inisNetworkInterfaceId
, "privateIpAddress" =? _inisPrivateIpAddress
, "privateIpAddressesSet" =? _inisPrivateIpAddresses
, "secondaryPrivateIpAddressCount" =? _inisSecondaryPrivateIpAddressCount
, "subnetId" =? _inisSubnetId
]
data VolumeState
= VSAvailable
| VSCreating
| VSDeleted
| VSDeleting
| VSError
| VSInUse
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable VolumeState
instance FromText VolumeState where
parser = match "available" VSAvailable
<|> match "creating" VSCreating
<|> match "deleted" VSDeleted
<|> match "deleting" VSDeleting
<|> match "error" VSError
<|> match "in-use" VSInUse
instance ToText VolumeState where
toText = \case
VSAvailable -> "available"
VSCreating -> "creating"
VSDeleted -> "deleted"
VSDeleting -> "deleting"
VSError -> "error"
VSInUse -> "in-use"
instance FromXML VolumeState where
parseXML = parseXMLText "VolumeState"
instance ToQuery VolumeState where
toQuery = toQuery . toText
newtype AttributeValue = AttributeValue
{ _avValue :: Maybe Text
} deriving (Eq, Ord, Show, Monoid)
attributeValue :: AttributeValue
attributeValue = AttributeValue
{ _avValue = Nothing
}
avValue :: Lens' AttributeValue (Maybe Text)
avValue = lens _avValue (\s a -> s { _avValue = a })
instance FromXML AttributeValue where
parseXML x = AttributeValue
<$> x .@? "value"
instance ToQuery AttributeValue where
toQuery AttributeValue{..} = mconcat
[ "value" =? _avValue
]
data PrivateIpAddressSpecification = PrivateIpAddressSpecification
{ _piasPrimary :: Maybe Bool
, _piasPrivateIpAddress :: Text
} deriving (Eq, Ord, Show)
privateIpAddressSpecification :: Text
-> PrivateIpAddressSpecification
privateIpAddressSpecification p1 = PrivateIpAddressSpecification
{ _piasPrivateIpAddress = p1
, _piasPrimary = Nothing
}
piasPrimary :: Lens' PrivateIpAddressSpecification (Maybe Bool)
piasPrimary = lens _piasPrimary (\s a -> s { _piasPrimary = a })
piasPrivateIpAddress :: Lens' PrivateIpAddressSpecification Text
piasPrivateIpAddress =
lens _piasPrivateIpAddress (\s a -> s { _piasPrivateIpAddress = a })
instance FromXML PrivateIpAddressSpecification where
parseXML x = PrivateIpAddressSpecification
<$> x .@? "primary"
<*> x .@ "privateIpAddress"
instance ToQuery PrivateIpAddressSpecification where
toQuery PrivateIpAddressSpecification{..} = mconcat
[ "primary" =? _piasPrimary
, "privateIpAddress" =? _piasPrivateIpAddress
]
data Image = Image
{ _iArchitecture :: Text
, _iBlockDeviceMappings :: List "item" BlockDeviceMapping
, _iDescription :: Maybe Text
, _iHypervisor :: Text
, _iImageId :: Text
, _iImageLocation :: Text
, _iImageOwnerAlias :: Maybe Text
, _iImageType :: Text
, _iKernelId :: Maybe Text
, _iName :: Text
, _iOwnerId :: Text
, _iPlatform :: Maybe Text
, _iProductCodes :: List "item" ProductCode
, _iPublic :: Bool
, _iRamdiskId :: Maybe Text
, _iRootDeviceName :: Maybe Text
, _iRootDeviceType :: Text
, _iSriovNetSupport :: Maybe Text
, _iState :: Text
, _iStateReason :: Maybe StateReason
, _iTags :: List "item" Tag
, _iVirtualizationType :: Text
} deriving (Eq, Show)
image :: Text
-> Text
-> Text
-> Text
-> Bool
-> Text
-> Text
-> Text
-> Text
-> Text
-> Text
-> Image
image p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 = Image
{ _iImageId = p1
, _iImageLocation = p2
, _iState = p3
, _iOwnerId = p4
, _iPublic = p5
, _iArchitecture = p6
, _iImageType = p7
, _iName = p8
, _iRootDeviceType = p9
, _iVirtualizationType = p10
, _iHypervisor = p11
, _iProductCodes = mempty
, _iKernelId = Nothing
, _iRamdiskId = Nothing
, _iPlatform = Nothing
, _iSriovNetSupport = Nothing
, _iStateReason = Nothing
, _iImageOwnerAlias = Nothing
, _iDescription = Nothing
, _iRootDeviceName = Nothing
, _iBlockDeviceMappings = mempty
, _iTags = mempty
}
iArchitecture :: Lens' Image Text
iArchitecture = lens _iArchitecture (\s a -> s { _iArchitecture = a })
iBlockDeviceMappings :: Lens' Image [BlockDeviceMapping]
iBlockDeviceMappings =
lens _iBlockDeviceMappings (\s a -> s { _iBlockDeviceMappings = a })
. _List
iDescription :: Lens' Image (Maybe Text)
iDescription = lens _iDescription (\s a -> s { _iDescription = a })
iHypervisor :: Lens' Image Text
iHypervisor = lens _iHypervisor (\s a -> s { _iHypervisor = a })
iImageId :: Lens' Image Text
iImageId = lens _iImageId (\s a -> s { _iImageId = a })
iImageLocation :: Lens' Image Text
iImageLocation = lens _iImageLocation (\s a -> s { _iImageLocation = a })
iImageOwnerAlias :: Lens' Image (Maybe Text)
iImageOwnerAlias = lens _iImageOwnerAlias (\s a -> s { _iImageOwnerAlias = a })
iImageType :: Lens' Image Text
iImageType = lens _iImageType (\s a -> s { _iImageType = a })
iKernelId :: Lens' Image (Maybe Text)
iKernelId = lens _iKernelId (\s a -> s { _iKernelId = a })
iName :: Lens' Image Text
iName = lens _iName (\s a -> s { _iName = a })
iOwnerId :: Lens' Image Text
iOwnerId = lens _iOwnerId (\s a -> s { _iOwnerId = a })
iPlatform :: Lens' Image (Maybe Text)
iPlatform = lens _iPlatform (\s a -> s { _iPlatform = a })
iProductCodes :: Lens' Image [ProductCode]
iProductCodes = lens _iProductCodes (\s a -> s { _iProductCodes = a }) . _List
iPublic :: Lens' Image Bool
iPublic = lens _iPublic (\s a -> s { _iPublic = a })
iRamdiskId :: Lens' Image (Maybe Text)
iRamdiskId = lens _iRamdiskId (\s a -> s { _iRamdiskId = a })
iRootDeviceName :: Lens' Image (Maybe Text)
iRootDeviceName = lens _iRootDeviceName (\s a -> s { _iRootDeviceName = a })
iRootDeviceType :: Lens' Image Text
iRootDeviceType = lens _iRootDeviceType (\s a -> s { _iRootDeviceType = a })
iSriovNetSupport :: Lens' Image (Maybe Text)
iSriovNetSupport = lens _iSriovNetSupport (\s a -> s { _iSriovNetSupport = a })
iState :: Lens' Image Text
iState = lens _iState (\s a -> s { _iState = a })
iStateReason :: Lens' Image (Maybe StateReason)
iStateReason = lens _iStateReason (\s a -> s { _iStateReason = a })
iTags :: Lens' Image [Tag]
iTags = lens _iTags (\s a -> s { _iTags = a }) . _List
iVirtualizationType :: Lens' Image Text
iVirtualizationType =
lens _iVirtualizationType (\s a -> s { _iVirtualizationType = a })
instance FromXML Image where
parseXML x = Image
<$> x .@ "architecture"
<*> x .@ "blockDeviceMapping"
<*> x .@? "description"
<*> x .@ "hypervisor"
<*> x .@ "imageId"
<*> x .@ "imageLocation"
<*> x .@? "imageOwnerAlias"
<*> x .@ "imageType"
<*> x .@? "kernelId"
<*> x .@ "name"
<*> x .@ "imageOwnerId"
<*> x .@? "platform"
<*> x .@ "productCodes"
<*> x .@ "isPublic"
<*> x .@? "ramdiskId"
<*> x .@? "rootDeviceName"
<*> x .@ "rootDeviceType"
<*> x .@? "sriovNetSupport"
<*> x .@ "imageState"
<*> x .@? "stateReason"
<*> x .@ "tagSet"
<*> x .@ "virtualizationType"
instance ToQuery Image where
toQuery Image{..} = mconcat
[ "architecture" =? _iArchitecture
, "blockDeviceMapping" =? _iBlockDeviceMappings
, "description" =? _iDescription
, "hypervisor" =? _iHypervisor
, "imageId" =? _iImageId
, "imageLocation" =? _iImageLocation
, "imageOwnerAlias" =? _iImageOwnerAlias
, "imageType" =? _iImageType
, "kernelId" =? _iKernelId
, "name" =? _iName
, "imageOwnerId" =? _iOwnerId
, "platform" =? _iPlatform
, "productCodes" =? _iProductCodes
, "isPublic" =? _iPublic
, "ramdiskId" =? _iRamdiskId
, "rootDeviceName" =? _iRootDeviceName
, "rootDeviceType" =? _iRootDeviceType
, "sriovNetSupport" =? _iSriovNetSupport
, "imageState" =? _iState
, "stateReason" =? _iStateReason
, "tagSet" =? _iTags
, "virtualizationType" =? _iVirtualizationType
]
data DhcpConfiguration = DhcpConfiguration
{ _dcKey :: Maybe Text
, _dcValues :: List "item" AttributeValue
} deriving (Eq, Show)
dhcpConfiguration :: DhcpConfiguration
dhcpConfiguration = DhcpConfiguration
{ _dcKey = Nothing
, _dcValues = mempty
}
dcKey :: Lens' DhcpConfiguration (Maybe Text)
dcKey = lens _dcKey (\s a -> s { _dcKey = a })
dcValues :: Lens' DhcpConfiguration [AttributeValue]
dcValues = lens _dcValues (\s a -> s { _dcValues = a }) . _List
instance FromXML DhcpConfiguration where
parseXML x = DhcpConfiguration
<$> x .@? "key"
<*> x .@ "valueSet"
instance ToQuery DhcpConfiguration where
toQuery DhcpConfiguration{..} = mconcat
[ "key" =? _dcKey
, "valueSet" =? _dcValues
]
data Tag = Tag
{ _tagKey :: Text
, _tagValue :: Text
} deriving (Eq, Ord, Show)
tag :: Text
-> Text
-> Tag
tag p1 p2 = Tag
{ _tagKey = p1
, _tagValue = p2
}
tagKey :: Lens' Tag Text
tagKey = lens _tagKey (\s a -> s { _tagKey = a })
tagValue :: Lens' Tag Text
tagValue = lens _tagValue (\s a -> s { _tagValue = a })
instance FromXML Tag where
parseXML x = Tag
<$> x .@ "key"
<*> x .@ "value"
instance ToQuery Tag where
toQuery Tag{..} = mconcat
[ "key" =? _tagKey
, "value" =? _tagValue
]
data AccountAttributeName
= DefaultVpc
| SupportedPlatforms
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable AccountAttributeName
instance FromText AccountAttributeName where
parser = match "default-vpc" DefaultVpc
<|> match "supported-platforms" SupportedPlatforms
instance ToText AccountAttributeName where
toText = \case
DefaultVpc -> "default-vpc"
SupportedPlatforms -> "supported-platforms"
instance FromXML AccountAttributeName where
parseXML = parseXMLText "AccountAttributeName"
instance ToQuery AccountAttributeName where
toQuery = toQuery . toText
data NetworkInterfaceAttachment = NetworkInterfaceAttachment
{ _niaAttachTime :: Maybe RFC822
, _niaAttachmentId :: Maybe Text
, _niaDeleteOnTermination :: Maybe Bool
, _niaDeviceIndex :: Maybe Int
, _niaInstanceId :: Maybe Text
, _niaInstanceOwnerId :: Maybe Text
, _niaStatus :: Maybe Text
} deriving (Eq, Ord, Show)
networkInterfaceAttachment :: NetworkInterfaceAttachment
networkInterfaceAttachment = NetworkInterfaceAttachment
{ _niaAttachmentId = Nothing
, _niaInstanceId = Nothing
, _niaInstanceOwnerId = Nothing
, _niaDeviceIndex = Nothing
, _niaStatus = Nothing
, _niaAttachTime = Nothing
, _niaDeleteOnTermination = Nothing
}
niaAttachTime :: Lens' NetworkInterfaceAttachment (Maybe UTCTime)
niaAttachTime = lens _niaAttachTime (\s a -> s { _niaAttachTime = a }) . mapping _Time
niaAttachmentId :: Lens' NetworkInterfaceAttachment (Maybe Text)
niaAttachmentId = lens _niaAttachmentId (\s a -> s { _niaAttachmentId = a })
niaDeleteOnTermination :: Lens' NetworkInterfaceAttachment (Maybe Bool)
niaDeleteOnTermination =
lens _niaDeleteOnTermination (\s a -> s { _niaDeleteOnTermination = a })
niaDeviceIndex :: Lens' NetworkInterfaceAttachment (Maybe Int)
niaDeviceIndex = lens _niaDeviceIndex (\s a -> s { _niaDeviceIndex = a })
niaInstanceId :: Lens' NetworkInterfaceAttachment (Maybe Text)
niaInstanceId = lens _niaInstanceId (\s a -> s { _niaInstanceId = a })
niaInstanceOwnerId :: Lens' NetworkInterfaceAttachment (Maybe Text)
niaInstanceOwnerId =
lens _niaInstanceOwnerId (\s a -> s { _niaInstanceOwnerId = a })
niaStatus :: Lens' NetworkInterfaceAttachment (Maybe Text)
niaStatus = lens _niaStatus (\s a -> s { _niaStatus = a })
instance FromXML NetworkInterfaceAttachment where
parseXML x = NetworkInterfaceAttachment
<$> x .@? "attachTime"
<*> x .@? "attachmentId"
<*> x .@? "deleteOnTermination"
<*> x .@? "deviceIndex"
<*> x .@? "instanceId"
<*> x .@? "instanceOwnerId"
<*> x .@? "status"
instance ToQuery NetworkInterfaceAttachment where
toQuery NetworkInterfaceAttachment{..} = mconcat
[ "attachTime" =? _niaAttachTime
, "attachmentId" =? _niaAttachmentId
, "deleteOnTermination" =? _niaDeleteOnTermination
, "deviceIndex" =? _niaDeviceIndex
, "instanceId" =? _niaInstanceId
, "instanceOwnerId" =? _niaInstanceOwnerId
, "status" =? _niaStatus
]
newtype RunInstancesMonitoringEnabled = RunInstancesMonitoringEnabled
{ _rimeEnabled :: Bool
} deriving (Eq, Ord, Show, Enum)
runInstancesMonitoringEnabled :: Bool
-> RunInstancesMonitoringEnabled
runInstancesMonitoringEnabled p1 = RunInstancesMonitoringEnabled
{ _rimeEnabled = p1
}
rimeEnabled :: Lens' RunInstancesMonitoringEnabled Bool
rimeEnabled = lens _rimeEnabled (\s a -> s { _rimeEnabled = a })
instance FromXML RunInstancesMonitoringEnabled where
parseXML x = RunInstancesMonitoringEnabled
<$> x .@ "enabled"
instance ToQuery RunInstancesMonitoringEnabled where
toQuery RunInstancesMonitoringEnabled{..} = mconcat
[ "enabled" =? _rimeEnabled
]
data VolumeStatusInfo = VolumeStatusInfo
{ _vsiDetails :: List "item" VolumeStatusDetails
, _vsiStatus :: Maybe Text
} deriving (Eq, Show)
volumeStatusInfo :: VolumeStatusInfo
volumeStatusInfo = VolumeStatusInfo
{ _vsiStatus = Nothing
, _vsiDetails = mempty
}
vsiDetails :: Lens' VolumeStatusInfo [VolumeStatusDetails]
vsiDetails = lens _vsiDetails (\s a -> s { _vsiDetails = a }) . _List
vsiStatus :: Lens' VolumeStatusInfo (Maybe Text)
vsiStatus = lens _vsiStatus (\s a -> s { _vsiStatus = a })
instance FromXML VolumeStatusInfo where
parseXML x = VolumeStatusInfo
<$> x .@ "details"
<*> x .@? "status"
instance ToQuery VolumeStatusInfo where
toQuery VolumeStatusInfo{..} = mconcat
[ "details" =? _vsiDetails
, "status" =? _vsiStatus
]
data NetworkInterfaceAssociation = NetworkInterfaceAssociation
{ _niaAllocationId :: Maybe Text
, _niaAssociationId :: Maybe Text
, _niaIpOwnerId :: Maybe Text
, _niaPublicDnsName :: Maybe Text
, _niaPublicIp :: Maybe Text
} deriving (Eq, Ord, Show)
networkInterfaceAssociation :: NetworkInterfaceAssociation
networkInterfaceAssociation = NetworkInterfaceAssociation
{ _niaPublicIp = Nothing
, _niaPublicDnsName = Nothing
, _niaIpOwnerId = Nothing
, _niaAllocationId = Nothing
, _niaAssociationId = Nothing
}
niaAllocationId :: Lens' NetworkInterfaceAssociation (Maybe Text)
niaAllocationId = lens _niaAllocationId (\s a -> s { _niaAllocationId = a })
niaAssociationId :: Lens' NetworkInterfaceAssociation (Maybe Text)
niaAssociationId = lens _niaAssociationId (\s a -> s { _niaAssociationId = a })
niaIpOwnerId :: Lens' NetworkInterfaceAssociation (Maybe Text)
niaIpOwnerId = lens _niaIpOwnerId (\s a -> s { _niaIpOwnerId = a })
niaPublicDnsName :: Lens' NetworkInterfaceAssociation (Maybe Text)
niaPublicDnsName = lens _niaPublicDnsName (\s a -> s { _niaPublicDnsName = a })
niaPublicIp :: Lens' NetworkInterfaceAssociation (Maybe Text)
niaPublicIp = lens _niaPublicIp (\s a -> s { _niaPublicIp = a })
instance FromXML NetworkInterfaceAssociation where
parseXML x = NetworkInterfaceAssociation
<$> x .@? "allocationId"
<*> x .@? "associationId"
<*> x .@? "ipOwnerId"
<*> x .@? "publicDnsName"
<*> x .@? "publicIp"
instance ToQuery NetworkInterfaceAssociation where
toQuery NetworkInterfaceAssociation{..} = mconcat
[ "allocationId" =? _niaAllocationId
, "associationId" =? _niaAssociationId
, "ipOwnerId" =? _niaIpOwnerId
, "publicDnsName" =? _niaPublicDnsName
, "publicIp" =? _niaPublicIp
]
data CreateVolumePermissionModifications = CreateVolumePermissionModifications
{ _cvpmAdd :: List "item" CreateVolumePermission
, _cvpmRemove :: List "item" CreateVolumePermission
} deriving (Eq, Show)
createVolumePermissionModifications :: CreateVolumePermissionModifications
createVolumePermissionModifications = CreateVolumePermissionModifications
{ _cvpmAdd = mempty
, _cvpmRemove = mempty
}
cvpmAdd :: Lens' CreateVolumePermissionModifications [CreateVolumePermission]
cvpmAdd = lens _cvpmAdd (\s a -> s { _cvpmAdd = a }) . _List
cvpmRemove :: Lens' CreateVolumePermissionModifications [CreateVolumePermission]
cvpmRemove = lens _cvpmRemove (\s a -> s { _cvpmRemove = a }) . _List
instance FromXML CreateVolumePermissionModifications where
parseXML x = CreateVolumePermissionModifications
<$> x .@ "Add"
<*> x .@ "Remove"
instance ToQuery CreateVolumePermissionModifications where
toQuery CreateVolumePermissionModifications{..} = mconcat
[ "Add" =? _cvpmAdd
, "Remove" =? _cvpmRemove
]
data VpcState
= VpcStateAvailable
| VpcStatePending
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable VpcState
instance FromText VpcState where
parser = match "available" VpcStateAvailable
<|> match "pending" VpcStatePending
instance ToText VpcState where
toText = \case
VpcStateAvailable -> "available"
VpcStatePending -> "pending"
instance FromXML VpcState where
parseXML = parseXMLText "VpcState"
instance ToQuery VpcState where
toQuery = toQuery . toText
data ResourceType
= RTCustomerGateway
| RTDhcpOptions
| RTImage
| RTInstance'
| RTInternetGateway
| RTNetworkAcl
| RTNetworkInterface
| RTReservedInstances
| RTRouteTable
| RTSecurityGroup
| RTSnapshot
| RTSpotInstancesRequest
| RTSubnet
| RTVolume
| RTVpc
| RTVpnConnection
| RTVpnGateway
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable ResourceType
instance FromText ResourceType where
parser = match "customer-gateway" RTCustomerGateway
<|> match "dhcp-options" RTDhcpOptions
<|> match "image" RTImage
<|> match "instance" RTInstance'
<|> match "internet-gateway" RTInternetGateway
<|> match "network-acl" RTNetworkAcl
<|> match "network-interface" RTNetworkInterface
<|> match "reserved-instances" RTReservedInstances
<|> match "route-table" RTRouteTable
<|> match "security-group" RTSecurityGroup
<|> match "snapshot" RTSnapshot
<|> match "spot-instances-request" RTSpotInstancesRequest
<|> match "subnet" RTSubnet
<|> match "volume" RTVolume
<|> match "vpc" RTVpc
<|> match "vpn-connection" RTVpnConnection
<|> match "vpn-gateway" RTVpnGateway
instance ToText ResourceType where
toText = \case
RTCustomerGateway -> "customer-gateway"
RTDhcpOptions -> "dhcp-options"
RTImage -> "image"
RTInstance' -> "instance"
RTInternetGateway -> "internet-gateway"
RTNetworkAcl -> "network-acl"
RTNetworkInterface -> "network-interface"
RTReservedInstances -> "reserved-instances"
RTRouteTable -> "route-table"
RTSecurityGroup -> "security-group"
RTSnapshot -> "snapshot"
RTSpotInstancesRequest -> "spot-instances-request"
RTSubnet -> "subnet"
RTVolume -> "volume"
RTVpc -> "vpc"
RTVpnConnection -> "vpn-connection"
RTVpnGateway -> "vpn-gateway"
instance FromXML ResourceType where
parseXML = parseXMLText "ResourceType"
instance ToQuery ResourceType where
toQuery = toQuery . toText
data ReportStatusType
= Impaired
| Ok
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable ReportStatusType
instance FromText ReportStatusType where
parser = match "impaired" Impaired
<|> match "ok" Ok
instance ToText ReportStatusType where
toText = \case
Impaired -> "impaired"
Ok -> "ok"
instance FromXML ReportStatusType where
parseXML = parseXMLText "ReportStatusType"
instance ToQuery ReportStatusType where
toQuery = toQuery . toText
data CurrencyCodeValues
= Usd
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable CurrencyCodeValues
instance FromText CurrencyCodeValues where
parser = match "USD" Usd
instance ToText CurrencyCodeValues where
toText Usd = "USD"
instance FromXML CurrencyCodeValues where
parseXML = parseXMLText "CurrencyCodeValues"
instance ToQuery CurrencyCodeValues where
toQuery = toQuery . toText
data IcmpTypeCode = IcmpTypeCode
{ _itcCode :: Maybe Int
, _itcType :: Maybe Int
} deriving (Eq, Ord, Show)
icmpTypeCode :: IcmpTypeCode
icmpTypeCode = IcmpTypeCode
{ _itcType = Nothing
, _itcCode = Nothing
}
itcCode :: Lens' IcmpTypeCode (Maybe Int)
itcCode = lens _itcCode (\s a -> s { _itcCode = a })
itcType :: Lens' IcmpTypeCode (Maybe Int)
itcType = lens _itcType (\s a -> s { _itcType = a })
instance FromXML IcmpTypeCode where
parseXML x = IcmpTypeCode
<$> x .@? "code"
<*> x .@? "type"
instance ToQuery IcmpTypeCode where
toQuery IcmpTypeCode{..} = mconcat
[ "code" =? _itcCode
, "type" =? _itcType
]
data InstanceCount = InstanceCount
{ _icInstanceCount :: Maybe Int
, _icState :: Maybe Text
} deriving (Eq, Ord, Show)
instanceCount :: InstanceCount
instanceCount = InstanceCount
{ _icState = Nothing
, _icInstanceCount = Nothing
}
icInstanceCount :: Lens' InstanceCount (Maybe Int)
icInstanceCount = lens _icInstanceCount (\s a -> s { _icInstanceCount = a })
icState :: Lens' InstanceCount (Maybe Text)
icState = lens _icState (\s a -> s { _icState = a })
instance FromXML InstanceCount where
parseXML x = InstanceCount
<$> x .@? "instanceCount"
<*> x .@? "state"
instance ToQuery InstanceCount where
toQuery InstanceCount{..} = mconcat
[ "instanceCount" =? _icInstanceCount
, "state" =? _icState
]
data ExportToS3Task = ExportToS3Task
{ _etstContainerFormat :: Maybe Text
, _etstDiskImageFormat :: Maybe Text
, _etstS3Bucket :: Maybe Text
, _etstS3Key :: Maybe Text
} deriving (Eq, Ord, Show)
exportToS3Task :: ExportToS3Task
exportToS3Task = ExportToS3Task
{ _etstDiskImageFormat = Nothing
, _etstContainerFormat = Nothing
, _etstS3Bucket = Nothing
, _etstS3Key = Nothing
}
etstContainerFormat :: Lens' ExportToS3Task (Maybe Text)
etstContainerFormat =
lens _etstContainerFormat (\s a -> s { _etstContainerFormat = a })
etstDiskImageFormat :: Lens' ExportToS3Task (Maybe Text)
etstDiskImageFormat =
lens _etstDiskImageFormat (\s a -> s { _etstDiskImageFormat = a })
etstS3Bucket :: Lens' ExportToS3Task (Maybe Text)
etstS3Bucket = lens _etstS3Bucket (\s a -> s { _etstS3Bucket = a })
etstS3Key :: Lens' ExportToS3Task (Maybe Text)
etstS3Key = lens _etstS3Key (\s a -> s { _etstS3Key = a })
instance FromXML ExportToS3Task where
parseXML x = ExportToS3Task
<$> x .@? "containerFormat"
<*> x .@? "diskImageFormat"
<*> x .@? "s3Bucket"
<*> x .@? "s3Key"
instance ToQuery ExportToS3Task where
toQuery ExportToS3Task{..} = mconcat
[ "containerFormat" =? _etstContainerFormat
, "diskImageFormat" =? _etstDiskImageFormat
, "s3Bucket" =? _etstS3Bucket
, "s3Key" =? _etstS3Key
]
data BlockDeviceMapping = BlockDeviceMapping
{ _bdmDeviceName :: Text
, _bdmEbs :: Maybe EbsBlockDevice
, _bdmNoDevice :: Maybe Text
, _bdmVirtualName :: Maybe Text
} deriving (Eq, Show)
blockDeviceMapping :: Text
-> BlockDeviceMapping
blockDeviceMapping p1 = BlockDeviceMapping
{ _bdmDeviceName = p1
, _bdmVirtualName = Nothing
, _bdmEbs = Nothing
, _bdmNoDevice = Nothing
}
bdmDeviceName :: Lens' BlockDeviceMapping Text
bdmDeviceName = lens _bdmDeviceName (\s a -> s { _bdmDeviceName = a })
bdmEbs :: Lens' BlockDeviceMapping (Maybe EbsBlockDevice)
bdmEbs = lens _bdmEbs (\s a -> s { _bdmEbs = a })
bdmNoDevice :: Lens' BlockDeviceMapping (Maybe Text)
bdmNoDevice = lens _bdmNoDevice (\s a -> s { _bdmNoDevice = a })
bdmVirtualName :: Lens' BlockDeviceMapping (Maybe Text)
bdmVirtualName = lens _bdmVirtualName (\s a -> s { _bdmVirtualName = a })
instance FromXML BlockDeviceMapping where
parseXML x = BlockDeviceMapping
<$> x .@ "deviceName"
<*> x .@? "ebs"
<*> x .@? "noDevice"
<*> x .@? "virtualName"
instance ToQuery BlockDeviceMapping where
toQuery BlockDeviceMapping{..} = mconcat
[ "deviceName" =? _bdmDeviceName
, "ebs" =? _bdmEbs
, "noDevice" =? _bdmNoDevice
, "virtualName" =? _bdmVirtualName
]
data ConversionTask = ConversionTask
{ _ctConversionTaskId :: Text
, _ctExpirationTime :: Maybe Text
, _ctImportInstance :: Maybe ImportInstanceTaskDetails
, _ctImportVolume :: Maybe ImportVolumeTaskDetails
, _ctState :: Text
, _ctStatusMessage :: Maybe Text
, _ctTags :: List "item" Tag
} deriving (Eq, Show)
conversionTask :: Text
-> Text
-> ConversionTask
conversionTask p1 p2 = ConversionTask
{ _ctConversionTaskId = p1
, _ctState = p2
, _ctExpirationTime = Nothing
, _ctImportInstance = Nothing
, _ctImportVolume = Nothing
, _ctStatusMessage = Nothing
, _ctTags = mempty
}
ctConversionTaskId :: Lens' ConversionTask Text
ctConversionTaskId =
lens _ctConversionTaskId (\s a -> s { _ctConversionTaskId = a })
ctExpirationTime :: Lens' ConversionTask (Maybe Text)
ctExpirationTime = lens _ctExpirationTime (\s a -> s { _ctExpirationTime = a })
ctImportInstance :: Lens' ConversionTask (Maybe ImportInstanceTaskDetails)
ctImportInstance = lens _ctImportInstance (\s a -> s { _ctImportInstance = a })
ctImportVolume :: Lens' ConversionTask (Maybe ImportVolumeTaskDetails)
ctImportVolume = lens _ctImportVolume (\s a -> s { _ctImportVolume = a })
ctState :: Lens' ConversionTask Text
ctState = lens _ctState (\s a -> s { _ctState = a })
ctStatusMessage :: Lens' ConversionTask (Maybe Text)
ctStatusMessage = lens _ctStatusMessage (\s a -> s { _ctStatusMessage = a })
ctTags :: Lens' ConversionTask [Tag]
ctTags = lens _ctTags (\s a -> s { _ctTags = a }) . _List
instance FromXML ConversionTask where
parseXML x = ConversionTask
<$> x .@ "conversionTaskId"
<*> x .@? "expirationTime"
<*> x .@? "importInstance"
<*> x .@? "importVolume"
<*> x .@ "state"
<*> x .@? "statusMessage"
<*> x .@ "tagSet"
instance ToQuery ConversionTask where
toQuery ConversionTask{..} = mconcat
[ "conversionTaskId" =? _ctConversionTaskId
, "expirationTime" =? _ctExpirationTime
, "importInstance" =? _ctImportInstance
, "importVolume" =? _ctImportVolume
, "state" =? _ctState
, "statusMessage" =? _ctStatusMessage
, "tagSet" =? _ctTags
]
data AttachmentStatus
= ASAttached
| ASAttaching
| ASDetached
| ASDetaching
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable AttachmentStatus
instance FromText AttachmentStatus where
parser = match "attached" ASAttached
<|> match "attaching" ASAttaching
<|> match "detached" ASDetached
<|> match "detaching" ASDetaching
instance ToText AttachmentStatus where
toText = \case
ASAttached -> "attached"
ASAttaching -> "attaching"
ASDetached -> "detached"
ASDetaching -> "detaching"
instance FromXML AttachmentStatus where
parseXML = parseXMLText "AttachmentStatus"
instance ToQuery AttachmentStatus where
toQuery = toQuery . toText
data RouteOrigin
= OriginCreateRoute
| OriginCreateRouteTable
| OriginEnableVgwRoutePropagation
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable RouteOrigin
instance FromText RouteOrigin where
parser = match "CreateRoute" OriginCreateRoute
<|> match "CreateRouteTable" OriginCreateRouteTable
<|> match "EnableVgwRoutePropagation" OriginEnableVgwRoutePropagation
instance ToText RouteOrigin where
toText = \case
OriginCreateRoute -> "CreateRoute"
OriginCreateRouteTable -> "CreateRouteTable"
OriginEnableVgwRoutePropagation -> "EnableVgwRoutePropagation"
instance FromXML RouteOrigin where
parseXML = parseXMLText "RouteOrigin"
instance ToQuery RouteOrigin where
toQuery = toQuery . toText
data ListingState
= LSAvailable
| LSCancelled
| LSPending
| LSSold
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable ListingState
instance FromText ListingState where
parser = match "available" LSAvailable
<|> match "cancelled" LSCancelled
<|> match "pending" LSPending
<|> match "sold" LSSold
instance ToText ListingState where
toText = \case
LSAvailable -> "available"
LSCancelled -> "cancelled"
LSPending -> "pending"
LSSold -> "sold"
instance FromXML ListingState where
parseXML = parseXMLText "ListingState"
instance ToQuery ListingState where
toQuery = toQuery . toText
data SpotPrice = SpotPrice
{ _spAvailabilityZone :: Maybe Text
, _spInstanceType :: Maybe Text
, _spProductDescription :: Maybe Text
, _spSpotPrice :: Maybe Text
, _spTimestamp :: Maybe RFC822
} deriving (Eq, Ord, Show)
spotPrice :: SpotPrice
spotPrice = SpotPrice
{ _spInstanceType = Nothing
, _spProductDescription = Nothing
, _spSpotPrice = Nothing
, _spTimestamp = Nothing
, _spAvailabilityZone = Nothing
}
spAvailabilityZone :: Lens' SpotPrice (Maybe Text)
spAvailabilityZone =
lens _spAvailabilityZone (\s a -> s { _spAvailabilityZone = a })
spInstanceType :: Lens' SpotPrice (Maybe Text)
spInstanceType = lens _spInstanceType (\s a -> s { _spInstanceType = a })
spProductDescription :: Lens' SpotPrice (Maybe Text)
spProductDescription =
lens _spProductDescription (\s a -> s { _spProductDescription = a })
spSpotPrice :: Lens' SpotPrice (Maybe Text)
spSpotPrice = lens _spSpotPrice (\s a -> s { _spSpotPrice = a })
spTimestamp :: Lens' SpotPrice (Maybe UTCTime)
spTimestamp = lens _spTimestamp (\s a -> s { _spTimestamp = a }) . mapping _Time
instance FromXML SpotPrice where
parseXML x = SpotPrice
<$> x .@? "availabilityZone"
<*> x .@? "instanceType"
<*> x .@? "productDescription"
<*> x .@? "spotPrice"
<*> x .@? "timestamp"
instance ToQuery SpotPrice where
toQuery SpotPrice{..} = mconcat
[ "availabilityZone" =? _spAvailabilityZone
, "instanceType" =? _spInstanceType
, "productDescription" =? _spProductDescription
, "spotPrice" =? _spSpotPrice
, "timestamp" =? _spTimestamp
]
data InstanceMonitoring = InstanceMonitoring
{ _imInstanceId :: Maybe Text
, _imMonitoring :: Maybe Monitoring
} deriving (Eq, Show)
instanceMonitoring :: InstanceMonitoring
instanceMonitoring = InstanceMonitoring
{ _imInstanceId = Nothing
, _imMonitoring = Nothing
}
imInstanceId :: Lens' InstanceMonitoring (Maybe Text)
imInstanceId = lens _imInstanceId (\s a -> s { _imInstanceId = a })
imMonitoring :: Lens' InstanceMonitoring (Maybe Monitoring)
imMonitoring = lens _imMonitoring (\s a -> s { _imMonitoring = a })
instance FromXML InstanceMonitoring where
parseXML x = InstanceMonitoring
<$> x .@? "instanceId"
<*> x .@? "monitoring"
instance ToQuery InstanceMonitoring where
toQuery InstanceMonitoring{..} = mconcat
[ "instanceId" =? _imInstanceId
, "monitoring" =? _imMonitoring
]
data PriceScheduleSpecification = PriceScheduleSpecification
{ _pssCurrencyCode :: Maybe Text
, _pssPrice :: Maybe Double
, _pssTerm :: Maybe Integer
} deriving (Eq, Ord, Show)
priceScheduleSpecification :: PriceScheduleSpecification
priceScheduleSpecification = PriceScheduleSpecification
{ _pssTerm = Nothing
, _pssPrice = Nothing
, _pssCurrencyCode = Nothing
}
pssCurrencyCode :: Lens' PriceScheduleSpecification (Maybe Text)
pssCurrencyCode = lens _pssCurrencyCode (\s a -> s { _pssCurrencyCode = a })
pssPrice :: Lens' PriceScheduleSpecification (Maybe Double)
pssPrice = lens _pssPrice (\s a -> s { _pssPrice = a })
pssTerm :: Lens' PriceScheduleSpecification (Maybe Integer)
pssTerm = lens _pssTerm (\s a -> s { _pssTerm = a })
instance FromXML PriceScheduleSpecification where
parseXML x = PriceScheduleSpecification
<$> x .@? "currencyCode"
<*> x .@? "price"
<*> x .@? "term"
instance ToQuery PriceScheduleSpecification where
toQuery PriceScheduleSpecification{..} = mconcat
[ "currencyCode" =? _pssCurrencyCode
, "price" =? _pssPrice
, "term" =? _pssTerm
]
data SpotInstanceStatus = SpotInstanceStatus
{ _sisCode :: Maybe Text
, _sisMessage :: Maybe Text
, _sisUpdateTime :: Maybe RFC822
} deriving (Eq, Ord, Show)
spotInstanceStatus :: SpotInstanceStatus
spotInstanceStatus = SpotInstanceStatus
{ _sisCode = Nothing
, _sisUpdateTime = Nothing
, _sisMessage = Nothing
}
sisCode :: Lens' SpotInstanceStatus (Maybe Text)
sisCode = lens _sisCode (\s a -> s { _sisCode = a })
sisMessage :: Lens' SpotInstanceStatus (Maybe Text)
sisMessage = lens _sisMessage (\s a -> s { _sisMessage = a })
sisUpdateTime :: Lens' SpotInstanceStatus (Maybe UTCTime)
sisUpdateTime = lens _sisUpdateTime (\s a -> s { _sisUpdateTime = a }) . mapping _Time
instance FromXML SpotInstanceStatus where
parseXML x = SpotInstanceStatus
<$> x .@? "code"
<*> x .@? "message"
<*> x .@? "updateTime"
instance ToQuery SpotInstanceStatus where
toQuery SpotInstanceStatus{..} = mconcat
[ "code" =? _sisCode
, "message" =? _sisMessage
, "updateTime" =? _sisUpdateTime
]
data AvailabilityZoneState
= AZSAvailable
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable AvailabilityZoneState
instance FromText AvailabilityZoneState where
parser = match "available" AZSAvailable
instance ToText AvailabilityZoneState where
toText AZSAvailable = "available"
instance FromXML AvailabilityZoneState where
parseXML = parseXMLText "AvailabilityZoneState"
instance ToQuery AvailabilityZoneState where
toQuery = toQuery . toText
data SpotInstanceRequest = SpotInstanceRequest
{ _siAvailabilityZoneGroup :: Maybe Text
, _siCreateTime :: Maybe RFC822
, _siFault :: Maybe SpotInstanceStateFault
, _siInstanceId :: Maybe Text
, _siLaunchGroup :: Maybe Text
, _siLaunchSpecification :: Maybe LaunchSpecification
, _siLaunchedAvailabilityZone :: Maybe Text
, _siProductDescription :: Maybe Text
, _siSpotInstanceRequestId :: Maybe Text
, _siSpotPrice :: Maybe Text
, _siState :: Maybe Text
, _siStatus :: Maybe SpotInstanceStatus
, _siTags :: List "item" Tag
, _siType :: Maybe Text
, _siValidFrom :: Maybe RFC822
, _siValidUntil :: Maybe RFC822
} deriving (Eq, Show)
spotInstanceRequest :: SpotInstanceRequest
spotInstanceRequest = SpotInstanceRequest
{ _siSpotInstanceRequestId = Nothing
, _siSpotPrice = Nothing
, _siType = Nothing
, _siState = Nothing
, _siFault = Nothing
, _siStatus = Nothing
, _siValidFrom = Nothing
, _siValidUntil = Nothing
, _siLaunchGroup = Nothing
, _siAvailabilityZoneGroup = Nothing
, _siLaunchSpecification = Nothing
, _siInstanceId = Nothing
, _siCreateTime = Nothing
, _siProductDescription = Nothing
, _siTags = mempty
, _siLaunchedAvailabilityZone = Nothing
}
siAvailabilityZoneGroup :: Lens' SpotInstanceRequest (Maybe Text)
siAvailabilityZoneGroup =
lens _siAvailabilityZoneGroup (\s a -> s { _siAvailabilityZoneGroup = a })
siCreateTime :: Lens' SpotInstanceRequest (Maybe UTCTime)
siCreateTime = lens _siCreateTime (\s a -> s { _siCreateTime = a }) . mapping _Time
siFault :: Lens' SpotInstanceRequest (Maybe SpotInstanceStateFault)
siFault = lens _siFault (\s a -> s { _siFault = a })
siInstanceId :: Lens' SpotInstanceRequest (Maybe Text)
siInstanceId = lens _siInstanceId (\s a -> s { _siInstanceId = a })
siLaunchGroup :: Lens' SpotInstanceRequest (Maybe Text)
siLaunchGroup = lens _siLaunchGroup (\s a -> s { _siLaunchGroup = a })
siLaunchSpecification :: Lens' SpotInstanceRequest (Maybe LaunchSpecification)
siLaunchSpecification =
lens _siLaunchSpecification (\s a -> s { _siLaunchSpecification = a })
siLaunchedAvailabilityZone :: Lens' SpotInstanceRequest (Maybe Text)
siLaunchedAvailabilityZone =
lens _siLaunchedAvailabilityZone
(\s a -> s { _siLaunchedAvailabilityZone = a })
siProductDescription :: Lens' SpotInstanceRequest (Maybe Text)
siProductDescription =
lens _siProductDescription (\s a -> s { _siProductDescription = a })
siSpotInstanceRequestId :: Lens' SpotInstanceRequest (Maybe Text)
siSpotInstanceRequestId =
lens _siSpotInstanceRequestId (\s a -> s { _siSpotInstanceRequestId = a })
siSpotPrice :: Lens' SpotInstanceRequest (Maybe Text)
siSpotPrice = lens _siSpotPrice (\s a -> s { _siSpotPrice = a })
siState :: Lens' SpotInstanceRequest (Maybe Text)
siState = lens _siState (\s a -> s { _siState = a })
siStatus :: Lens' SpotInstanceRequest (Maybe SpotInstanceStatus)
siStatus = lens _siStatus (\s a -> s { _siStatus = a })
siTags :: Lens' SpotInstanceRequest [Tag]
siTags = lens _siTags (\s a -> s { _siTags = a }) . _List
siType :: Lens' SpotInstanceRequest (Maybe Text)
siType = lens _siType (\s a -> s { _siType = a })
siValidFrom :: Lens' SpotInstanceRequest (Maybe UTCTime)
siValidFrom = lens _siValidFrom (\s a -> s { _siValidFrom = a }) . mapping _Time
siValidUntil :: Lens' SpotInstanceRequest (Maybe UTCTime)
siValidUntil = lens _siValidUntil (\s a -> s { _siValidUntil = a }) . mapping _Time
instance FromXML SpotInstanceRequest where
parseXML x = SpotInstanceRequest
<$> x .@? "availabilityZoneGroup"
<*> x .@? "createTime"
<*> x .@? "fault"
<*> x .@? "instanceId"
<*> x .@? "launchGroup"
<*> x .@? "launchSpecification"
<*> x .@? "launchedAvailabilityZone"
<*> x .@? "productDescription"
<*> x .@? "spotInstanceRequestId"
<*> x .@? "spotPrice"
<*> x .@? "state"
<*> x .@? "status"
<*> x .@ "tagSet"
<*> x .@? "type"
<*> x .@? "validFrom"
<*> x .@? "validUntil"
instance ToQuery SpotInstanceRequest where
toQuery SpotInstanceRequest{..} = mconcat
[ "availabilityZoneGroup" =? _siAvailabilityZoneGroup
, "createTime" =? _siCreateTime
, "fault" =? _siFault
, "instanceId" =? _siInstanceId
, "launchGroup" =? _siLaunchGroup
, "launchSpecification" =? _siLaunchSpecification
, "launchedAvailabilityZone" =? _siLaunchedAvailabilityZone
, "productDescription" =? _siProductDescription
, "spotInstanceRequestId" =? _siSpotInstanceRequestId
, "spotPrice" =? _siSpotPrice
, "state" =? _siState
, "status" =? _siStatus
, "tagSet" =? _siTags
, "type" =? _siType
, "validFrom" =? _siValidFrom
, "validUntil" =? _siValidUntil
]
data LaunchSpecification = LaunchSpecification
{ _lsAddressingType :: Maybe Text
, _lsBlockDeviceMappings :: List "item" BlockDeviceMapping
, _lsEbsOptimized :: Maybe Bool
, _lsIamInstanceProfile :: Maybe IamInstanceProfileSpecification
, _lsImageId :: Maybe Text
, _lsInstanceType :: Maybe Text
, _lsKernelId :: Maybe Text
, _lsKeyName :: Maybe Text
, _lsMonitoring :: Maybe RunInstancesMonitoringEnabled
, _lsNetworkInterfaces :: List "item" InstanceNetworkInterfaceSpecification
, _lsPlacement :: Maybe SpotPlacement
, _lsRamdiskId :: Maybe Text
, _lsSecurityGroups :: List "item" GroupIdentifier
, _lsSubnetId :: Maybe Text
, _lsUserData :: Maybe Text
} deriving (Eq, Show)
launchSpecification :: LaunchSpecification
launchSpecification = LaunchSpecification
{ _lsImageId = Nothing
, _lsKeyName = Nothing
, _lsSecurityGroups = mempty
, _lsUserData = Nothing
, _lsAddressingType = Nothing
, _lsInstanceType = Nothing
, _lsPlacement = Nothing
, _lsKernelId = Nothing
, _lsRamdiskId = Nothing
, _lsBlockDeviceMappings = mempty
, _lsSubnetId = Nothing
, _lsNetworkInterfaces = mempty
, _lsIamInstanceProfile = Nothing
, _lsEbsOptimized = Nothing
, _lsMonitoring = Nothing
}
lsAddressingType :: Lens' LaunchSpecification (Maybe Text)
lsAddressingType = lens _lsAddressingType (\s a -> s { _lsAddressingType = a })
lsBlockDeviceMappings :: Lens' LaunchSpecification [BlockDeviceMapping]
lsBlockDeviceMappings =
lens _lsBlockDeviceMappings (\s a -> s { _lsBlockDeviceMappings = a })
. _List
lsEbsOptimized :: Lens' LaunchSpecification (Maybe Bool)
lsEbsOptimized = lens _lsEbsOptimized (\s a -> s { _lsEbsOptimized = a })
lsIamInstanceProfile :: Lens' LaunchSpecification (Maybe IamInstanceProfileSpecification)
lsIamInstanceProfile =
lens _lsIamInstanceProfile (\s a -> s { _lsIamInstanceProfile = a })
lsImageId :: Lens' LaunchSpecification (Maybe Text)
lsImageId = lens _lsImageId (\s a -> s { _lsImageId = a })
lsInstanceType :: Lens' LaunchSpecification (Maybe Text)
lsInstanceType = lens _lsInstanceType (\s a -> s { _lsInstanceType = a })
lsKernelId :: Lens' LaunchSpecification (Maybe Text)
lsKernelId = lens _lsKernelId (\s a -> s { _lsKernelId = a })
lsKeyName :: Lens' LaunchSpecification (Maybe Text)
lsKeyName = lens _lsKeyName (\s a -> s { _lsKeyName = a })
lsMonitoring :: Lens' LaunchSpecification (Maybe RunInstancesMonitoringEnabled)
lsMonitoring = lens _lsMonitoring (\s a -> s { _lsMonitoring = a })
lsNetworkInterfaces :: Lens' LaunchSpecification [InstanceNetworkInterfaceSpecification]
lsNetworkInterfaces =
lens _lsNetworkInterfaces (\s a -> s { _lsNetworkInterfaces = a })
. _List
lsPlacement :: Lens' LaunchSpecification (Maybe SpotPlacement)
lsPlacement = lens _lsPlacement (\s a -> s { _lsPlacement = a })
lsRamdiskId :: Lens' LaunchSpecification (Maybe Text)
lsRamdiskId = lens _lsRamdiskId (\s a -> s { _lsRamdiskId = a })
lsSecurityGroups :: Lens' LaunchSpecification [GroupIdentifier]
lsSecurityGroups = lens _lsSecurityGroups (\s a -> s { _lsSecurityGroups = a }) . _List
lsSubnetId :: Lens' LaunchSpecification (Maybe Text)
lsSubnetId = lens _lsSubnetId (\s a -> s { _lsSubnetId = a })
lsUserData :: Lens' LaunchSpecification (Maybe Text)
lsUserData = lens _lsUserData (\s a -> s { _lsUserData = a })
instance FromXML LaunchSpecification where
parseXML x = LaunchSpecification
<$> x .@? "addressingType"
<*> x .@ "blockDeviceMapping"
<*> x .@? "ebsOptimized"
<*> x .@? "iamInstanceProfile"
<*> x .@? "imageId"
<*> x .@? "instanceType"
<*> x .@? "kernelId"
<*> x .@? "keyName"
<*> x .@? "monitoring"
<*> x .@ "networkInterfaceSet"
<*> x .@? "placement"
<*> x .@? "ramdiskId"
<*> x .@ "groupSet"
<*> x .@? "subnetId"
<*> x .@? "userData"
instance ToQuery LaunchSpecification where
toQuery LaunchSpecification{..} = mconcat
[ "addressingType" =? _lsAddressingType
, "blockDeviceMapping" =? _lsBlockDeviceMappings
, "ebsOptimized" =? _lsEbsOptimized
, "iamInstanceProfile" =? _lsIamInstanceProfile
, "imageId" =? _lsImageId
, "instanceType" =? _lsInstanceType
, "kernelId" =? _lsKernelId
, "keyName" =? _lsKeyName
, "monitoring" =? _lsMonitoring
, "networkInterfaceSet" =? _lsNetworkInterfaces
, "placement" =? _lsPlacement
, "ramdiskId" =? _lsRamdiskId
, "groupSet" =? _lsSecurityGroups
, "subnetId" =? _lsSubnetId
, "userData" =? _lsUserData
]
data VolumeStatusEvent = VolumeStatusEvent
{ _vseDescription :: Maybe Text
, _vseEventId :: Maybe Text
, _vseEventType :: Maybe Text
, _vseNotAfter :: Maybe RFC822
, _vseNotBefore :: Maybe RFC822
} deriving (Eq, Ord, Show)
volumeStatusEvent :: VolumeStatusEvent
volumeStatusEvent = VolumeStatusEvent
{ _vseEventType = Nothing
, _vseDescription = Nothing
, _vseNotBefore = Nothing
, _vseNotAfter = Nothing
, _vseEventId = Nothing
}
vseDescription :: Lens' VolumeStatusEvent (Maybe Text)
vseDescription = lens _vseDescription (\s a -> s { _vseDescription = a })
vseEventId :: Lens' VolumeStatusEvent (Maybe Text)
vseEventId = lens _vseEventId (\s a -> s { _vseEventId = a })
vseEventType :: Lens' VolumeStatusEvent (Maybe Text)
vseEventType = lens _vseEventType (\s a -> s { _vseEventType = a })
vseNotAfter :: Lens' VolumeStatusEvent (Maybe UTCTime)
vseNotAfter = lens _vseNotAfter (\s a -> s { _vseNotAfter = a }) . mapping _Time
vseNotBefore :: Lens' VolumeStatusEvent (Maybe UTCTime)
vseNotBefore = lens _vseNotBefore (\s a -> s { _vseNotBefore = a }) . mapping _Time
instance FromXML VolumeStatusEvent where
parseXML x = VolumeStatusEvent
<$> x .@? "description"
<*> x .@? "eventId"
<*> x .@? "eventType"
<*> x .@? "notAfter"
<*> x .@? "notBefore"
instance ToQuery VolumeStatusEvent where
toQuery VolumeStatusEvent{..} = mconcat
[ "description" =? _vseDescription
, "eventId" =? _vseEventId
, "eventType" =? _vseEventType
, "notAfter" =? _vseNotAfter
, "notBefore" =? _vseNotBefore
]
data Volume = Volume
{ _vAttachments :: List "item" VolumeAttachment
, _vAvailabilityZone :: Maybe Text
, _vCreateTime :: Maybe RFC822
, _vEncrypted :: Maybe Bool
, _vIops :: Maybe Int
, _vSize :: Maybe Int
, _vSnapshotId :: Maybe Text
, _vState :: Maybe Text
, _vTags :: List "item" Tag
, _vVolumeId :: Maybe Text
, _vVolumeType :: Maybe Text
} deriving (Eq, Show)
volume :: Volume
volume = Volume
{ _vVolumeId = Nothing
, _vSize = Nothing
, _vSnapshotId = Nothing
, _vAvailabilityZone = Nothing
, _vState = Nothing
, _vCreateTime = Nothing
, _vAttachments = mempty
, _vTags = mempty
, _vVolumeType = Nothing
, _vIops = Nothing
, _vEncrypted = Nothing
}
vAttachments :: Lens' Volume [VolumeAttachment]
vAttachments = lens _vAttachments (\s a -> s { _vAttachments = a }) . _List
vAvailabilityZone :: Lens' Volume (Maybe Text)
vAvailabilityZone =
lens _vAvailabilityZone (\s a -> s { _vAvailabilityZone = a })
vCreateTime :: Lens' Volume (Maybe UTCTime)
vCreateTime = lens _vCreateTime (\s a -> s { _vCreateTime = a }) . mapping _Time
vEncrypted :: Lens' Volume (Maybe Bool)
vEncrypted = lens _vEncrypted (\s a -> s { _vEncrypted = a })
vIops :: Lens' Volume (Maybe Int)
vIops = lens _vIops (\s a -> s { _vIops = a })
vSize :: Lens' Volume (Maybe Int)
vSize = lens _vSize (\s a -> s { _vSize = a })
vSnapshotId :: Lens' Volume (Maybe Text)
vSnapshotId = lens _vSnapshotId (\s a -> s { _vSnapshotId = a })
vState :: Lens' Volume (Maybe Text)
vState = lens _vState (\s a -> s { _vState = a })
vTags :: Lens' Volume [Tag]
vTags = lens _vTags (\s a -> s { _vTags = a }) . _List
vVolumeId :: Lens' Volume (Maybe Text)
vVolumeId = lens _vVolumeId (\s a -> s { _vVolumeId = a })
vVolumeType :: Lens' Volume (Maybe Text)
vVolumeType = lens _vVolumeType (\s a -> s { _vVolumeType = a })
instance FromXML Volume where
parseXML x = Volume
<$> x .@ "attachmentSet"
<*> x .@? "availabilityZone"
<*> x .@? "createTime"
<*> x .@? "encrypted"
<*> x .@? "iops"
<*> x .@? "size"
<*> x .@? "snapshotId"
<*> x .@? "status"
<*> x .@ "tagSet"
<*> x .@? "volumeId"
<*> x .@? "volumeType"
instance ToQuery Volume where
toQuery Volume{..} = mconcat
[ "attachmentSet" =? _vAttachments
, "availabilityZone" =? _vAvailabilityZone
, "createTime" =? _vCreateTime
, "encrypted" =? _vEncrypted
, "iops" =? _vIops
, "size" =? _vSize
, "snapshotId" =? _vSnapshotId
, "status" =? _vState
, "tagSet" =? _vTags
, "volumeId" =? _vVolumeId
, "volumeType" =? _vVolumeType
]
data Reservation = Reservation
{ _rGroups :: List "item" GroupIdentifier
, _rInstances :: List "item" Instance
, _rOwnerId :: Maybe Text
, _rRequesterId :: Maybe Text
, _rReservationId :: Maybe Text
} deriving (Eq, Show)
reservation :: Reservation
reservation = Reservation
{ _rReservationId = Nothing
, _rOwnerId = Nothing
, _rRequesterId = Nothing
, _rGroups = mempty
, _rInstances = mempty
}
rGroups :: Lens' Reservation [GroupIdentifier]
rGroups = lens _rGroups (\s a -> s { _rGroups = a }) . _List
rInstances :: Lens' Reservation [Instance]
rInstances = lens _rInstances (\s a -> s { _rInstances = a }) . _List
rOwnerId :: Lens' Reservation (Maybe Text)
rOwnerId = lens _rOwnerId (\s a -> s { _rOwnerId = a })
rRequesterId :: Lens' Reservation (Maybe Text)
rRequesterId = lens _rRequesterId (\s a -> s { _rRequesterId = a })
rReservationId :: Lens' Reservation (Maybe Text)
rReservationId = lens _rReservationId (\s a -> s { _rReservationId = a })
instance FromXML Reservation where
parseXML x = Reservation
<$> x .@ "groupSet"
<*> x .@ "instancesSet"
<*> x .@? "ownerId"
<*> x .@? "requesterId"
<*> x .@? "reservationId"
instance ToQuery Reservation where
toQuery Reservation{..} = mconcat
[ "groupSet" =? _rGroups
, "instancesSet" =? _rInstances
, "ownerId" =? _rOwnerId
, "requesterId" =? _rRequesterId
, "reservationId" =? _rReservationId
]
data ImportInstanceVolumeDetailItem = ImportInstanceVolumeDetailItem
{ _iivdiAvailabilityZone :: Text
, _iivdiBytesConverted :: Integer
, _iivdiDescription :: Maybe Text
, _iivdiImage :: DiskImageDescription
, _iivdiStatus :: Text
, _iivdiStatusMessage :: Maybe Text
, _iivdiVolume :: DiskImageVolumeDescription
} deriving (Eq, Show)
importInstanceVolumeDetailItem :: Integer
-> Text
-> DiskImageDescription
-> DiskImageVolumeDescription
-> Text
-> ImportInstanceVolumeDetailItem
importInstanceVolumeDetailItem p1 p2 p3 p4 p5 = ImportInstanceVolumeDetailItem
{ _iivdiBytesConverted = p1
, _iivdiAvailabilityZone = p2
, _iivdiImage = p3
, _iivdiVolume = p4
, _iivdiStatus = p5
, _iivdiStatusMessage = Nothing
, _iivdiDescription = Nothing
}
iivdiAvailabilityZone :: Lens' ImportInstanceVolumeDetailItem Text
iivdiAvailabilityZone =
lens _iivdiAvailabilityZone (\s a -> s { _iivdiAvailabilityZone = a })
iivdiBytesConverted :: Lens' ImportInstanceVolumeDetailItem Integer
iivdiBytesConverted =
lens _iivdiBytesConverted (\s a -> s { _iivdiBytesConverted = a })
iivdiDescription :: Lens' ImportInstanceVolumeDetailItem (Maybe Text)
iivdiDescription = lens _iivdiDescription (\s a -> s { _iivdiDescription = a })
iivdiImage :: Lens' ImportInstanceVolumeDetailItem DiskImageDescription
iivdiImage = lens _iivdiImage (\s a -> s { _iivdiImage = a })
iivdiStatus :: Lens' ImportInstanceVolumeDetailItem Text
iivdiStatus = lens _iivdiStatus (\s a -> s { _iivdiStatus = a })
iivdiStatusMessage :: Lens' ImportInstanceVolumeDetailItem (Maybe Text)
iivdiStatusMessage =
lens _iivdiStatusMessage (\s a -> s { _iivdiStatusMessage = a })
iivdiVolume :: Lens' ImportInstanceVolumeDetailItem DiskImageVolumeDescription
iivdiVolume = lens _iivdiVolume (\s a -> s { _iivdiVolume = a })
instance FromXML ImportInstanceVolumeDetailItem where
parseXML x = ImportInstanceVolumeDetailItem
<$> x .@ "availabilityZone"
<*> x .@ "bytesConverted"
<*> x .@? "description"
<*> x .@ "image"
<*> x .@ "status"
<*> x .@? "statusMessage"
<*> x .@ "volume"
instance ToQuery ImportInstanceVolumeDetailItem where
toQuery ImportInstanceVolumeDetailItem{..} = mconcat
[ "availabilityZone" =? _iivdiAvailabilityZone
, "bytesConverted" =? _iivdiBytesConverted
, "description" =? _iivdiDescription
, "image" =? _iivdiImage
, "status" =? _iivdiStatus
, "statusMessage" =? _iivdiStatusMessage
, "volume" =? _iivdiVolume
]
data SummaryStatus
= SSImpaired
| SSInsufficientData
| SSNotApplicable
| SSOk
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable SummaryStatus
instance FromText SummaryStatus where
parser = match "impaired" SSImpaired
<|> match "insufficient-data" SSInsufficientData
<|> match "not-applicable" SSNotApplicable
<|> match "ok" SSOk
instance ToText SummaryStatus where
toText = \case
SSImpaired -> "impaired"
SSInsufficientData -> "insufficient-data"
SSNotApplicable -> "not-applicable"
SSOk -> "ok"
instance FromXML SummaryStatus where
parseXML = parseXMLText "SummaryStatus"
instance ToQuery SummaryStatus where
toQuery = toQuery . toText
data ReservedInstancesModification = ReservedInstancesModification
{ _rimClientToken :: Maybe Text
, _rimCreateDate :: Maybe RFC822
, _rimEffectiveDate :: Maybe RFC822
, _rimModificationResults :: List "item" ReservedInstancesModificationResult
, _rimReservedInstancesIds :: List "item" ReservedInstancesId
, _rimReservedInstancesModificationId :: Maybe Text
, _rimStatus :: Maybe Text
, _rimStatusMessage :: Maybe Text
, _rimUpdateDate :: Maybe RFC822
} deriving (Eq, Show)
reservedInstancesModification :: ReservedInstancesModification
reservedInstancesModification = ReservedInstancesModification
{ _rimReservedInstancesModificationId = Nothing
, _rimReservedInstancesIds = mempty
, _rimModificationResults = mempty
, _rimCreateDate = Nothing
, _rimUpdateDate = Nothing
, _rimEffectiveDate = Nothing
, _rimStatus = Nothing
, _rimStatusMessage = Nothing
, _rimClientToken = Nothing
}
rimClientToken :: Lens' ReservedInstancesModification (Maybe Text)
rimClientToken = lens _rimClientToken (\s a -> s { _rimClientToken = a })
rimCreateDate :: Lens' ReservedInstancesModification (Maybe UTCTime)
rimCreateDate = lens _rimCreateDate (\s a -> s { _rimCreateDate = a }) . mapping _Time
rimEffectiveDate :: Lens' ReservedInstancesModification (Maybe UTCTime)
rimEffectiveDate = lens _rimEffectiveDate (\s a -> s { _rimEffectiveDate = a }) . mapping _Time
rimModificationResults :: Lens' ReservedInstancesModification [ReservedInstancesModificationResult]
rimModificationResults =
lens _rimModificationResults (\s a -> s { _rimModificationResults = a })
. _List
rimReservedInstancesIds :: Lens' ReservedInstancesModification [ReservedInstancesId]
rimReservedInstancesIds =
lens _rimReservedInstancesIds (\s a -> s { _rimReservedInstancesIds = a })
. _List
rimReservedInstancesModificationId :: Lens' ReservedInstancesModification (Maybe Text)
rimReservedInstancesModificationId =
lens _rimReservedInstancesModificationId
(\s a -> s { _rimReservedInstancesModificationId = a })
rimStatus :: Lens' ReservedInstancesModification (Maybe Text)
rimStatus = lens _rimStatus (\s a -> s { _rimStatus = a })
rimStatusMessage :: Lens' ReservedInstancesModification (Maybe Text)
rimStatusMessage = lens _rimStatusMessage (\s a -> s { _rimStatusMessage = a })
rimUpdateDate :: Lens' ReservedInstancesModification (Maybe UTCTime)
rimUpdateDate = lens _rimUpdateDate (\s a -> s { _rimUpdateDate = a }) . mapping _Time
instance FromXML ReservedInstancesModification where
parseXML x = ReservedInstancesModification
<$> x .@? "clientToken"
<*> x .@? "createDate"
<*> x .@? "effectiveDate"
<*> x .@ "modificationResultSet"
<*> x .@ "reservedInstancesSet"
<*> x .@? "reservedInstancesModificationId"
<*> x .@? "status"
<*> x .@? "statusMessage"
<*> x .@? "updateDate"
instance ToQuery ReservedInstancesModification where
toQuery ReservedInstancesModification{..} = mconcat
[ "clientToken" =? _rimClientToken
, "createDate" =? _rimCreateDate
, "effectiveDate" =? _rimEffectiveDate
, "modificationResultSet" =? _rimModificationResults
, "reservedInstancesSet" =? _rimReservedInstancesIds
, "reservedInstancesModificationId" =? _rimReservedInstancesModificationId
, "status" =? _rimStatus
, "statusMessage" =? _rimStatusMessage
, "updateDate" =? _rimUpdateDate
]
data RuleAction
= Allow
| Deny
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable RuleAction
instance FromText RuleAction where
parser = match "allow" Allow
<|> match "deny" Deny
instance ToText RuleAction where
toText = \case
Allow -> "allow"
Deny -> "deny"
instance FromXML RuleAction where
parseXML = parseXMLText "RuleAction"
instance ToQuery RuleAction where
toQuery = toQuery . toText
data NetworkInterface = NetworkInterface
{ _niAssociation :: Maybe NetworkInterfaceAssociation
, _niAttachment :: Maybe NetworkInterfaceAttachment
, _niAvailabilityZone :: Maybe Text
, _niDescription :: Maybe Text
, _niGroups :: List "item" GroupIdentifier
, _niMacAddress :: Maybe Text
, _niNetworkInterfaceId :: Maybe Text
, _niOwnerId :: Maybe Text
, _niPrivateDnsName :: Maybe Text
, _niPrivateIpAddress :: Maybe Text
, _niPrivateIpAddresses :: List "item" NetworkInterfacePrivateIpAddress
, _niRequesterId :: Maybe Text
, _niRequesterManaged :: Maybe Bool
, _niSourceDestCheck :: Maybe Bool
, _niStatus :: Maybe Text
, _niSubnetId :: Maybe Text
, _niTagSet :: List "item" Tag
, _niVpcId :: Maybe Text
} deriving (Eq, Show)
networkInterface :: NetworkInterface
networkInterface = NetworkInterface
{ _niNetworkInterfaceId = Nothing
, _niSubnetId = Nothing
, _niVpcId = Nothing
, _niAvailabilityZone = Nothing
, _niDescription = Nothing
, _niOwnerId = Nothing
, _niRequesterId = Nothing
, _niRequesterManaged = Nothing
, _niStatus = Nothing
, _niMacAddress = Nothing
, _niPrivateIpAddress = Nothing
, _niPrivateDnsName = Nothing
, _niSourceDestCheck = Nothing
, _niGroups = mempty
, _niAttachment = Nothing
, _niAssociation = Nothing
, _niTagSet = mempty
, _niPrivateIpAddresses = mempty
}
niAssociation :: Lens' NetworkInterface (Maybe NetworkInterfaceAssociation)
niAssociation = lens _niAssociation (\s a -> s { _niAssociation = a })
niAttachment :: Lens' NetworkInterface (Maybe NetworkInterfaceAttachment)
niAttachment = lens _niAttachment (\s a -> s { _niAttachment = a })
niAvailabilityZone :: Lens' NetworkInterface (Maybe Text)
niAvailabilityZone =
lens _niAvailabilityZone (\s a -> s { _niAvailabilityZone = a })
niDescription :: Lens' NetworkInterface (Maybe Text)
niDescription = lens _niDescription (\s a -> s { _niDescription = a })
niGroups :: Lens' NetworkInterface [GroupIdentifier]
niGroups = lens _niGroups (\s a -> s { _niGroups = a }) . _List
niMacAddress :: Lens' NetworkInterface (Maybe Text)
niMacAddress = lens _niMacAddress (\s a -> s { _niMacAddress = a })
niNetworkInterfaceId :: Lens' NetworkInterface (Maybe Text)
niNetworkInterfaceId =
lens _niNetworkInterfaceId (\s a -> s { _niNetworkInterfaceId = a })
niOwnerId :: Lens' NetworkInterface (Maybe Text)
niOwnerId = lens _niOwnerId (\s a -> s { _niOwnerId = a })
niPrivateDnsName :: Lens' NetworkInterface (Maybe Text)
niPrivateDnsName = lens _niPrivateDnsName (\s a -> s { _niPrivateDnsName = a })
niPrivateIpAddress :: Lens' NetworkInterface (Maybe Text)
niPrivateIpAddress =
lens _niPrivateIpAddress (\s a -> s { _niPrivateIpAddress = a })
niPrivateIpAddresses :: Lens' NetworkInterface [NetworkInterfacePrivateIpAddress]
niPrivateIpAddresses =
lens _niPrivateIpAddresses (\s a -> s { _niPrivateIpAddresses = a })
. _List
niRequesterId :: Lens' NetworkInterface (Maybe Text)
niRequesterId = lens _niRequesterId (\s a -> s { _niRequesterId = a })
niRequesterManaged :: Lens' NetworkInterface (Maybe Bool)
niRequesterManaged =
lens _niRequesterManaged (\s a -> s { _niRequesterManaged = a })
niSourceDestCheck :: Lens' NetworkInterface (Maybe Bool)
niSourceDestCheck =
lens _niSourceDestCheck (\s a -> s { _niSourceDestCheck = a })
niStatus :: Lens' NetworkInterface (Maybe Text)
niStatus = lens _niStatus (\s a -> s { _niStatus = a })
niSubnetId :: Lens' NetworkInterface (Maybe Text)
niSubnetId = lens _niSubnetId (\s a -> s { _niSubnetId = a })
niTagSet :: Lens' NetworkInterface [Tag]
niTagSet = lens _niTagSet (\s a -> s { _niTagSet = a }) . _List
niVpcId :: Lens' NetworkInterface (Maybe Text)
niVpcId = lens _niVpcId (\s a -> s { _niVpcId = a })
instance FromXML NetworkInterface where
parseXML x = NetworkInterface
<$> x .@? "association"
<*> x .@? "attachment"
<*> x .@? "availabilityZone"
<*> x .@? "description"
<*> x .@ "groupSet"
<*> x .@? "macAddress"
<*> x .@? "networkInterfaceId"
<*> x .@? "ownerId"
<*> x .@? "privateDnsName"
<*> x .@? "privateIpAddress"
<*> x .@ "privateIpAddressesSet"
<*> x .@? "requesterId"
<*> x .@? "requesterManaged"
<*> x .@? "sourceDestCheck"
<*> x .@? "status"
<*> x .@? "subnetId"
<*> x .@ "tagSet"
<*> x .@? "vpcId"
instance ToQuery NetworkInterface where
toQuery NetworkInterface{..} = mconcat
[ "association" =? _niAssociation
, "attachment" =? _niAttachment
, "availabilityZone" =? _niAvailabilityZone
, "description" =? _niDescription
, "groupSet" =? _niGroups
, "macAddress" =? _niMacAddress
, "networkInterfaceId" =? _niNetworkInterfaceId
, "ownerId" =? _niOwnerId
, "privateDnsName" =? _niPrivateDnsName
, "privateIpAddress" =? _niPrivateIpAddress
, "privateIpAddressesSet" =? _niPrivateIpAddresses
, "requesterId" =? _niRequesterId
, "requesterManaged" =? _niRequesterManaged
, "sourceDestCheck" =? _niSourceDestCheck
, "status" =? _niStatus
, "subnetId" =? _niSubnetId
, "tagSet" =? _niTagSet
, "vpcId" =? _niVpcId
]
data TelemetryStatus
= Down
| Up
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable TelemetryStatus
instance FromText TelemetryStatus where
parser = match "DOWN" Down
<|> match "UP" Up
instance ToText TelemetryStatus where
toText = \case
Down -> "DOWN"
Up -> "UP"
instance FromXML TelemetryStatus where
parseXML = parseXMLText "TelemetryStatus"
instance ToQuery TelemetryStatus where
toQuery = toQuery . toText
data Subnet = Subnet
{ _s1AvailabilityZone :: Maybe Text
, _s1AvailableIpAddressCount :: Maybe Int
, _s1CidrBlock :: Maybe Text
, _s1DefaultForAz :: Maybe Bool
, _s1MapPublicIpOnLaunch :: Maybe Bool
, _s1State :: Maybe Text
, _s1SubnetId :: Maybe Text
, _s1Tags :: List "item" Tag
, _s1VpcId :: Maybe Text
} deriving (Eq, Show)
subnet :: Subnet
subnet = Subnet
{ _s1SubnetId = Nothing
, _s1State = Nothing
, _s1VpcId = Nothing
, _s1CidrBlock = Nothing
, _s1AvailableIpAddressCount = Nothing
, _s1AvailabilityZone = Nothing
, _s1DefaultForAz = Nothing
, _s1MapPublicIpOnLaunch = Nothing
, _s1Tags = mempty
}
s1AvailabilityZone :: Lens' Subnet (Maybe Text)
s1AvailabilityZone =
lens _s1AvailabilityZone (\s a -> s { _s1AvailabilityZone = a })
s1AvailableIpAddressCount :: Lens' Subnet (Maybe Int)
s1AvailableIpAddressCount =
lens _s1AvailableIpAddressCount
(\s a -> s { _s1AvailableIpAddressCount = a })
s1CidrBlock :: Lens' Subnet (Maybe Text)
s1CidrBlock = lens _s1CidrBlock (\s a -> s { _s1CidrBlock = a })
s1DefaultForAz :: Lens' Subnet (Maybe Bool)
s1DefaultForAz = lens _s1DefaultForAz (\s a -> s { _s1DefaultForAz = a })
s1MapPublicIpOnLaunch :: Lens' Subnet (Maybe Bool)
s1MapPublicIpOnLaunch =
lens _s1MapPublicIpOnLaunch (\s a -> s { _s1MapPublicIpOnLaunch = a })
s1State :: Lens' Subnet (Maybe Text)
s1State = lens _s1State (\s a -> s { _s1State = a })
s1SubnetId :: Lens' Subnet (Maybe Text)
s1SubnetId = lens _s1SubnetId (\s a -> s { _s1SubnetId = a })
s1Tags :: Lens' Subnet [Tag]
s1Tags = lens _s1Tags (\s a -> s { _s1Tags = a }) . _List
s1VpcId :: Lens' Subnet (Maybe Text)
s1VpcId = lens _s1VpcId (\s a -> s { _s1VpcId = a })
instance FromXML Subnet where
parseXML x = Subnet
<$> x .@? "availabilityZone"
<*> x .@? "availableIpAddressCount"
<*> x .@? "cidrBlock"
<*> x .@? "defaultForAz"
<*> x .@? "mapPublicIpOnLaunch"
<*> x .@? "state"
<*> x .@? "subnetId"
<*> x .@ "tagSet"
<*> x .@? "vpcId"
instance ToQuery Subnet where
toQuery Subnet{..} = mconcat
[ "availabilityZone" =? _s1AvailabilityZone
, "availableIpAddressCount" =? _s1AvailableIpAddressCount
, "cidrBlock" =? _s1CidrBlock
, "defaultForAz" =? _s1DefaultForAz
, "mapPublicIpOnLaunch" =? _s1MapPublicIpOnLaunch
, "state" =? _s1State
, "subnetId" =? _s1SubnetId
, "tagSet" =? _s1Tags
, "vpcId" =? _s1VpcId
]
data KeyPairInfo = KeyPairInfo
{ _kpiKeyFingerprint :: Maybe Text
, _kpiKeyName :: Maybe Text
} deriving (Eq, Ord, Show)
keyPairInfo :: KeyPairInfo
keyPairInfo = KeyPairInfo
{ _kpiKeyName = Nothing
, _kpiKeyFingerprint = Nothing
}
kpiKeyFingerprint :: Lens' KeyPairInfo (Maybe Text)
kpiKeyFingerprint =
lens _kpiKeyFingerprint (\s a -> s { _kpiKeyFingerprint = a })
kpiKeyName :: Lens' KeyPairInfo (Maybe Text)
kpiKeyName = lens _kpiKeyName (\s a -> s { _kpiKeyName = a })
instance FromXML KeyPairInfo where
parseXML x = KeyPairInfo
<$> x .@? "keyFingerprint"
<*> x .@? "keyName"
instance ToQuery KeyPairInfo where
toQuery KeyPairInfo{..} = mconcat
[ "keyFingerprint" =? _kpiKeyFingerprint
, "keyName" =? _kpiKeyName
]
data LaunchPermissionModifications = LaunchPermissionModifications
{ _lpmAdd :: List "item" LaunchPermission
, _lpmRemove :: List "item" LaunchPermission
} deriving (Eq, Show)
launchPermissionModifications :: LaunchPermissionModifications
launchPermissionModifications = LaunchPermissionModifications
{ _lpmAdd = mempty
, _lpmRemove = mempty
}
lpmAdd :: Lens' LaunchPermissionModifications [LaunchPermission]
lpmAdd = lens _lpmAdd (\s a -> s { _lpmAdd = a }) . _List
lpmRemove :: Lens' LaunchPermissionModifications [LaunchPermission]
lpmRemove = lens _lpmRemove (\s a -> s { _lpmRemove = a }) . _List
instance FromXML LaunchPermissionModifications where
parseXML x = LaunchPermissionModifications
<$> x .@ "Add"
<*> x .@ "Remove"
instance ToQuery LaunchPermissionModifications where
toQuery LaunchPermissionModifications{..} = mconcat
[ "Add" =? _lpmAdd
, "Remove" =? _lpmRemove
]
data SnapshotState
= Completed
| Error
| Pending
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable SnapshotState
instance FromText SnapshotState where
parser = match "completed" Completed
<|> match "error" Error
<|> match "pending" Pending
instance ToText SnapshotState where
toText = \case
Completed -> "completed"
Error -> "error"
Pending -> "pending"
instance FromXML SnapshotState where
parseXML = parseXMLText "SnapshotState"
instance ToQuery SnapshotState where
toQuery = toQuery . toText
data InstanceNetworkInterfaceAssociation = InstanceNetworkInterfaceAssociation
{ _iniaIpOwnerId :: Maybe Text
, _iniaPublicDnsName :: Maybe Text
, _iniaPublicIp :: Maybe Text
} deriving (Eq, Ord, Show)
instanceNetworkInterfaceAssociation :: InstanceNetworkInterfaceAssociation
instanceNetworkInterfaceAssociation = InstanceNetworkInterfaceAssociation
{ _iniaPublicIp = Nothing
, _iniaPublicDnsName = Nothing
, _iniaIpOwnerId = Nothing
}
iniaIpOwnerId :: Lens' InstanceNetworkInterfaceAssociation (Maybe Text)
iniaIpOwnerId = lens _iniaIpOwnerId (\s a -> s { _iniaIpOwnerId = a })
iniaPublicDnsName :: Lens' InstanceNetworkInterfaceAssociation (Maybe Text)
iniaPublicDnsName =
lens _iniaPublicDnsName (\s a -> s { _iniaPublicDnsName = a })
iniaPublicIp :: Lens' InstanceNetworkInterfaceAssociation (Maybe Text)
iniaPublicIp = lens _iniaPublicIp (\s a -> s { _iniaPublicIp = a })
instance FromXML InstanceNetworkInterfaceAssociation where
parseXML x = InstanceNetworkInterfaceAssociation
<$> x .@? "ipOwnerId"
<*> x .@? "publicDnsName"
<*> x .@? "publicIp"
instance ToQuery InstanceNetworkInterfaceAssociation where
toQuery InstanceNetworkInterfaceAssociation{..} = mconcat
[ "ipOwnerId" =? _iniaIpOwnerId
, "publicDnsName" =? _iniaPublicDnsName
, "publicIp" =? _iniaPublicIp
]
data DiskImageDetail = DiskImageDetail
{ _didBytes :: Integer
, _didFormat :: Text
, _didImportManifestUrl :: Text
} deriving (Eq, Ord, Show)
diskImageDetail :: Text
-> Integer
-> Text
-> DiskImageDetail
diskImageDetail p1 p2 p3 = DiskImageDetail
{ _didFormat = p1
, _didBytes = p2
, _didImportManifestUrl = p3
}
didBytes :: Lens' DiskImageDetail Integer
didBytes = lens _didBytes (\s a -> s { _didBytes = a })
didFormat :: Lens' DiskImageDetail Text
didFormat = lens _didFormat (\s a -> s { _didFormat = a })
didImportManifestUrl :: Lens' DiskImageDetail Text
didImportManifestUrl =
lens _didImportManifestUrl (\s a -> s { _didImportManifestUrl = a })
instance FromXML DiskImageDetail where
parseXML x = DiskImageDetail
<$> x .@ "bytes"
<*> x .@ "format"
<*> x .@ "importManifestUrl"
instance ToQuery DiskImageDetail where
toQuery DiskImageDetail{..} = mconcat
[ "bytes" =? _didBytes
, "format" =? _didFormat
, "importManifestUrl" =? _didImportManifestUrl
]
data InstancePrivateIpAddress = InstancePrivateIpAddress
{ _ipiaAssociation :: Maybe InstanceNetworkInterfaceAssociation
, _ipiaPrimary :: Maybe Bool
, _ipiaPrivateDnsName :: Maybe Text
, _ipiaPrivateIpAddress :: Maybe Text
} deriving (Eq, Show)
instancePrivateIpAddress :: InstancePrivateIpAddress
instancePrivateIpAddress = InstancePrivateIpAddress
{ _ipiaPrivateIpAddress = Nothing
, _ipiaPrivateDnsName = Nothing
, _ipiaPrimary = Nothing
, _ipiaAssociation = Nothing
}
ipiaAssociation :: Lens' InstancePrivateIpAddress (Maybe InstanceNetworkInterfaceAssociation)
ipiaAssociation = lens _ipiaAssociation (\s a -> s { _ipiaAssociation = a })
ipiaPrimary :: Lens' InstancePrivateIpAddress (Maybe Bool)
ipiaPrimary = lens _ipiaPrimary (\s a -> s { _ipiaPrimary = a })
ipiaPrivateDnsName :: Lens' InstancePrivateIpAddress (Maybe Text)
ipiaPrivateDnsName =
lens _ipiaPrivateDnsName (\s a -> s { _ipiaPrivateDnsName = a })
ipiaPrivateIpAddress :: Lens' InstancePrivateIpAddress (Maybe Text)
ipiaPrivateIpAddress =
lens _ipiaPrivateIpAddress (\s a -> s { _ipiaPrivateIpAddress = a })
instance FromXML InstancePrivateIpAddress where
parseXML x = InstancePrivateIpAddress
<$> x .@? "association"
<*> x .@? "primary"
<*> x .@? "privateDnsName"
<*> x .@? "privateIpAddress"
instance ToQuery InstancePrivateIpAddress where
toQuery InstancePrivateIpAddress{..} = mconcat
[ "association" =? _ipiaAssociation
, "primary" =? _ipiaPrimary
, "privateDnsName" =? _ipiaPrivateDnsName
, "privateIpAddress" =? _ipiaPrivateIpAddress
]
data CancelledSpotInstanceRequest = CancelledSpotInstanceRequest
{ _csiSpotInstanceRequestId :: Maybe Text
, _csiState :: Maybe Text
} deriving (Eq, Ord, Show)
cancelledSpotInstanceRequest :: CancelledSpotInstanceRequest
cancelledSpotInstanceRequest = CancelledSpotInstanceRequest
{ _csiSpotInstanceRequestId = Nothing
, _csiState = Nothing
}
csiSpotInstanceRequestId :: Lens' CancelledSpotInstanceRequest (Maybe Text)
csiSpotInstanceRequestId =
lens _csiSpotInstanceRequestId
(\s a -> s { _csiSpotInstanceRequestId = a })
csiState :: Lens' CancelledSpotInstanceRequest (Maybe Text)
csiState = lens _csiState (\s a -> s { _csiState = a })
instance FromXML CancelledSpotInstanceRequest where
parseXML x = CancelledSpotInstanceRequest
<$> x .@? "spotInstanceRequestId"
<*> x .@? "state"
instance ToQuery CancelledSpotInstanceRequest where
toQuery CancelledSpotInstanceRequest{..} = mconcat
[ "spotInstanceRequestId" =? _csiSpotInstanceRequestId
, "state" =? _csiState
]
newtype VpnConnectionOptionsSpecification = VpnConnectionOptionsSpecification
{ _vcosStaticRoutesOnly :: Maybe Bool
} deriving (Eq, Ord, Show)
vpnConnectionOptionsSpecification :: VpnConnectionOptionsSpecification
vpnConnectionOptionsSpecification = VpnConnectionOptionsSpecification
{ _vcosStaticRoutesOnly = Nothing
}
vcosStaticRoutesOnly :: Lens' VpnConnectionOptionsSpecification (Maybe Bool)
vcosStaticRoutesOnly =
lens _vcosStaticRoutesOnly (\s a -> s { _vcosStaticRoutesOnly = a })
instance FromXML VpnConnectionOptionsSpecification where
parseXML x = VpnConnectionOptionsSpecification
<$> x .@? "staticRoutesOnly"
instance ToQuery VpnConnectionOptionsSpecification where
toQuery VpnConnectionOptionsSpecification{..} = mconcat
[ "staticRoutesOnly" =? _vcosStaticRoutesOnly
]
data Address = Address
{ _aAllocationId :: Maybe Text
, _aAssociationId :: Maybe Text
, _aDomain :: Maybe Text
, _aInstanceId :: Maybe Text
, _aNetworkInterfaceId :: Maybe Text
, _aNetworkInterfaceOwnerId :: Maybe Text
, _aPrivateIpAddress :: Maybe Text
, _aPublicIp :: Maybe Text
} deriving (Eq, Ord, Show)
address :: Address
address = Address
{ _aInstanceId = Nothing
, _aPublicIp = Nothing
, _aAllocationId = Nothing
, _aAssociationId = Nothing
, _aDomain = Nothing
, _aNetworkInterfaceId = Nothing
, _aNetworkInterfaceOwnerId = Nothing
, _aPrivateIpAddress = Nothing
}
aAllocationId :: Lens' Address (Maybe Text)
aAllocationId = lens _aAllocationId (\s a -> s { _aAllocationId = a })
aAssociationId :: Lens' Address (Maybe Text)
aAssociationId = lens _aAssociationId (\s a -> s { _aAssociationId = a })
aDomain :: Lens' Address (Maybe Text)
aDomain = lens _aDomain (\s a -> s { _aDomain = a })
aInstanceId :: Lens' Address (Maybe Text)
aInstanceId = lens _aInstanceId (\s a -> s { _aInstanceId = a })
aNetworkInterfaceId :: Lens' Address (Maybe Text)
aNetworkInterfaceId =
lens _aNetworkInterfaceId (\s a -> s { _aNetworkInterfaceId = a })
aNetworkInterfaceOwnerId :: Lens' Address (Maybe Text)
aNetworkInterfaceOwnerId =
lens _aNetworkInterfaceOwnerId
(\s a -> s { _aNetworkInterfaceOwnerId = a })
aPrivateIpAddress :: Lens' Address (Maybe Text)
aPrivateIpAddress =
lens _aPrivateIpAddress (\s a -> s { _aPrivateIpAddress = a })
aPublicIp :: Lens' Address (Maybe Text)
aPublicIp = lens _aPublicIp (\s a -> s { _aPublicIp = a })
instance FromXML Address where
parseXML x = Address
<$> x .@? "allocationId"
<*> x .@? "associationId"
<*> x .@? "domain"
<*> x .@? "instanceId"
<*> x .@? "networkInterfaceId"
<*> x .@? "networkInterfaceOwnerId"
<*> x .@? "privateIpAddress"
<*> x .@? "publicIp"
instance ToQuery Address where
toQuery Address{..} = mconcat
[ "allocationId" =? _aAllocationId
, "associationId" =? _aAssociationId
, "domain" =? _aDomain
, "instanceId" =? _aInstanceId
, "networkInterfaceId" =? _aNetworkInterfaceId
, "networkInterfaceOwnerId" =? _aNetworkInterfaceOwnerId
, "privateIpAddress" =? _aPrivateIpAddress
, "publicIp" =? _aPublicIp
]
data VolumeAttachmentState
= VASAttached
| VASAttaching
| VASDetached
| VASDetaching
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable VolumeAttachmentState
instance FromText VolumeAttachmentState where
parser = match "attached" VASAttached
<|> match "attaching" VASAttaching
<|> match "detached" VASDetached
<|> match "detaching" VASDetaching
instance ToText VolumeAttachmentState where
toText = \case
VASAttached -> "attached"
VASAttaching -> "attaching"
VASDetached -> "detached"
VASDetaching -> "detaching"
instance FromXML VolumeAttachmentState where
parseXML = parseXMLText "VolumeAttachmentState"
instance ToQuery VolumeAttachmentState where
toQuery = toQuery . toText
data LaunchPermission = LaunchPermission
{ _lpGroup :: Maybe Text
, _lpUserId :: Maybe Text
} deriving (Eq, Ord, Show)
launchPermission :: LaunchPermission
launchPermission = LaunchPermission
{ _lpUserId = Nothing
, _lpGroup = Nothing
}
lpGroup :: Lens' LaunchPermission (Maybe Text)
lpGroup = lens _lpGroup (\s a -> s { _lpGroup = a })
lpUserId :: Lens' LaunchPermission (Maybe Text)
lpUserId = lens _lpUserId (\s a -> s { _lpUserId = a })
instance FromXML LaunchPermission where
parseXML x = LaunchPermission
<$> x .@? "group"
<*> x .@? "userId"
instance ToQuery LaunchPermission where
toQuery LaunchPermission{..} = mconcat
[ "group" =? _lpGroup
, "userId" =? _lpUserId
]
data RouteState
= Active
| Blackhole
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable RouteState
instance FromText RouteState where
parser = match "active" Active
<|> match "blackhole" Blackhole
instance ToText RouteState where
toText = \case
Active -> "active"
Blackhole -> "blackhole"
instance FromXML RouteState where
parseXML = parseXMLText "RouteState"
instance ToQuery RouteState where
toQuery = toQuery . toText
data RouteTableAssociation = RouteTableAssociation
{ _rtaMain :: Maybe Bool
, _rtaRouteTableAssociationId :: Maybe Text
, _rtaRouteTableId :: Maybe Text
, _rtaSubnetId :: Maybe Text
} deriving (Eq, Ord, Show)
routeTableAssociation :: RouteTableAssociation
routeTableAssociation = RouteTableAssociation
{ _rtaRouteTableAssociationId = Nothing
, _rtaRouteTableId = Nothing
, _rtaSubnetId = Nothing
, _rtaMain = Nothing
}
rtaMain :: Lens' RouteTableAssociation (Maybe Bool)
rtaMain = lens _rtaMain (\s a -> s { _rtaMain = a })
rtaRouteTableAssociationId :: Lens' RouteTableAssociation (Maybe Text)
rtaRouteTableAssociationId =
lens _rtaRouteTableAssociationId
(\s a -> s { _rtaRouteTableAssociationId = a })
rtaRouteTableId :: Lens' RouteTableAssociation (Maybe Text)
rtaRouteTableId = lens _rtaRouteTableId (\s a -> s { _rtaRouteTableId = a })
rtaSubnetId :: Lens' RouteTableAssociation (Maybe Text)
rtaSubnetId = lens _rtaSubnetId (\s a -> s { _rtaSubnetId = a })
instance FromXML RouteTableAssociation where
parseXML x = RouteTableAssociation
<$> x .@? "main"
<*> x .@? "routeTableAssociationId"
<*> x .@? "routeTableId"
<*> x .@? "subnetId"
instance ToQuery RouteTableAssociation where
toQuery RouteTableAssociation{..} = mconcat
[ "main" =? _rtaMain
, "routeTableAssociationId" =? _rtaRouteTableAssociationId
, "routeTableId" =? _rtaRouteTableId
, "subnetId" =? _rtaSubnetId
]
data BundleTaskState
= BTSBundling
| BTSCancelling
| BTSComplete
| BTSFailed
| BTSPending
| BTSStoring
| BTSWaitingForShutdown
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable BundleTaskState
instance FromText BundleTaskState where
parser = match "bundling" BTSBundling
<|> match "cancelling" BTSCancelling
<|> match "complete" BTSComplete
<|> match "failed" BTSFailed
<|> match "pending" BTSPending
<|> match "storing" BTSStoring
<|> match "waiting-for-shutdown" BTSWaitingForShutdown
instance ToText BundleTaskState where
toText = \case
BTSBundling -> "bundling"
BTSCancelling -> "cancelling"
BTSComplete -> "complete"
BTSFailed -> "failed"
BTSPending -> "pending"
BTSStoring -> "storing"
BTSWaitingForShutdown -> "waiting-for-shutdown"
instance FromXML BundleTaskState where
parseXML = parseXMLText "BundleTaskState"
instance ToQuery BundleTaskState where
toQuery = toQuery . toText
data PortRange = PortRange
{ _prFrom :: Maybe Int
, _prTo :: Maybe Int
} deriving (Eq, Ord, Show)
portRange :: PortRange
portRange = PortRange
{ _prFrom = Nothing
, _prTo = Nothing
}
prFrom :: Lens' PortRange (Maybe Int)
prFrom = lens _prFrom (\s a -> s { _prFrom = a })
prTo :: Lens' PortRange (Maybe Int)
prTo = lens _prTo (\s a -> s { _prTo = a })
instance FromXML PortRange where
parseXML x = PortRange
<$> x .@? "from"
<*> x .@? "to"
instance ToQuery PortRange where
toQuery PortRange{..} = mconcat
[ "from" =? _prFrom
, "to" =? _prTo
]
data VpcAttributeName
= EnableDnsHostnames
| EnableDnsSupport
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable VpcAttributeName
instance FromText VpcAttributeName where
parser = match "enableDnsHostnames" EnableDnsHostnames
<|> match "enableDnsSupport" EnableDnsSupport
instance ToText VpcAttributeName where
toText = \case
EnableDnsHostnames -> "enableDnsHostnames"
EnableDnsSupport -> "enableDnsSupport"
instance FromXML VpcAttributeName where
parseXML = parseXMLText "VpcAttributeName"
instance ToQuery VpcAttributeName where
toQuery = toQuery . toText
data ReservedInstancesConfiguration = ReservedInstancesConfiguration
{ _ricAvailabilityZone :: Maybe Text
, _ricInstanceCount :: Maybe Int
, _ricInstanceType :: Maybe Text
, _ricPlatform :: Maybe Text
} deriving (Eq, Ord, Show)
reservedInstancesConfiguration :: ReservedInstancesConfiguration
reservedInstancesConfiguration = ReservedInstancesConfiguration
{ _ricAvailabilityZone = Nothing
, _ricPlatform = Nothing
, _ricInstanceCount = Nothing
, _ricInstanceType = Nothing
}
ricAvailabilityZone :: Lens' ReservedInstancesConfiguration (Maybe Text)
ricAvailabilityZone =
lens _ricAvailabilityZone (\s a -> s { _ricAvailabilityZone = a })
ricInstanceCount :: Lens' ReservedInstancesConfiguration (Maybe Int)
ricInstanceCount = lens _ricInstanceCount (\s a -> s { _ricInstanceCount = a })
ricInstanceType :: Lens' ReservedInstancesConfiguration (Maybe Text)
ricInstanceType = lens _ricInstanceType (\s a -> s { _ricInstanceType = a })
ricPlatform :: Lens' ReservedInstancesConfiguration (Maybe Text)
ricPlatform = lens _ricPlatform (\s a -> s { _ricPlatform = a })
instance FromXML ReservedInstancesConfiguration where
parseXML x = ReservedInstancesConfiguration
<$> x .@? "availabilityZone"
<*> x .@? "instanceCount"
<*> x .@? "instanceType"
<*> x .@? "platform"
instance ToQuery ReservedInstancesConfiguration where
toQuery ReservedInstancesConfiguration{..} = mconcat
[ "availabilityZone" =? _ricAvailabilityZone
, "instanceCount" =? _ricInstanceCount
, "instanceType" =? _ricInstanceType
, "platform" =? _ricPlatform
]
data VolumeStatusDetails = VolumeStatusDetails
{ _vsdName :: Maybe Text
, _vsdStatus :: Maybe Text
} deriving (Eq, Ord, Show)
volumeStatusDetails :: VolumeStatusDetails
volumeStatusDetails = VolumeStatusDetails
{ _vsdName = Nothing
, _vsdStatus = Nothing
}
vsdName :: Lens' VolumeStatusDetails (Maybe Text)
vsdName = lens _vsdName (\s a -> s { _vsdName = a })
vsdStatus :: Lens' VolumeStatusDetails (Maybe Text)
vsdStatus = lens _vsdStatus (\s a -> s { _vsdStatus = a })
instance FromXML VolumeStatusDetails where
parseXML x = VolumeStatusDetails
<$> x .@? "name"
<*> x .@? "status"
instance ToQuery VolumeStatusDetails where
toQuery VolumeStatusDetails{..} = mconcat
[ "name" =? _vsdName
, "status" =? _vsdStatus
]
data SpotInstanceState
= SISActive
| SISCancelled
| SISClosed
| SISFailed
| SISOpen
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable SpotInstanceState
instance FromText SpotInstanceState where
parser = match "active" SISActive
<|> match "cancelled" SISCancelled
<|> match "closed" SISClosed
<|> match "failed" SISFailed
<|> match "open" SISOpen
instance ToText SpotInstanceState where
toText = \case
SISActive -> "active"
SISCancelled -> "cancelled"
SISClosed -> "closed"
SISFailed -> "failed"
SISOpen -> "open"
instance FromXML SpotInstanceState where
parseXML = parseXMLText "SpotInstanceState"
instance ToQuery SpotInstanceState where
toQuery = toQuery . toText
newtype VpnConnectionOptions = VpnConnectionOptions
{ _vcoStaticRoutesOnly :: Maybe Bool
} deriving (Eq, Ord, Show)
vpnConnectionOptions :: VpnConnectionOptions
vpnConnectionOptions = VpnConnectionOptions
{ _vcoStaticRoutesOnly = Nothing
}
vcoStaticRoutesOnly :: Lens' VpnConnectionOptions (Maybe Bool)
vcoStaticRoutesOnly =
lens _vcoStaticRoutesOnly (\s a -> s { _vcoStaticRoutesOnly = a })
instance FromXML VpnConnectionOptions where
parseXML x = VpnConnectionOptions
<$> x .@? "staticRoutesOnly"
instance ToQuery VpnConnectionOptions where
toQuery VpnConnectionOptions{..} = mconcat
[ "staticRoutesOnly" =? _vcoStaticRoutesOnly
]
data UserIdGroupPair = UserIdGroupPair
{ _uigpGroupId :: Maybe Text
, _uigpGroupName :: Maybe Text
, _uigpUserId :: Maybe Text
} deriving (Eq, Ord, Show)
userIdGroupPair :: UserIdGroupPair
userIdGroupPair = UserIdGroupPair
{ _uigpUserId = Nothing
, _uigpGroupName = Nothing
, _uigpGroupId = Nothing
}
uigpGroupId :: Lens' UserIdGroupPair (Maybe Text)
uigpGroupId = lens _uigpGroupId (\s a -> s { _uigpGroupId = a })
uigpGroupName :: Lens' UserIdGroupPair (Maybe Text)
uigpGroupName = lens _uigpGroupName (\s a -> s { _uigpGroupName = a })
uigpUserId :: Lens' UserIdGroupPair (Maybe Text)
uigpUserId = lens _uigpUserId (\s a -> s { _uigpUserId = a })
instance FromXML UserIdGroupPair where
parseXML x = UserIdGroupPair
<$> x .@? "groupId"
<*> x .@? "groupName"
<*> x .@? "userId"
instance ToQuery UserIdGroupPair where
toQuery UserIdGroupPair{..} = mconcat
[ "groupId" =? _uigpGroupId
, "groupName" =? _uigpGroupName
, "userId" =? _uigpUserId
]
data InstanceStatusSummary = InstanceStatusSummary
{ _issDetails :: List "item" InstanceStatusDetails
, _issStatus :: Maybe Text
} deriving (Eq, Show)
instanceStatusSummary :: InstanceStatusSummary
instanceStatusSummary = InstanceStatusSummary
{ _issStatus = Nothing
, _issDetails = mempty
}
issDetails :: Lens' InstanceStatusSummary [InstanceStatusDetails]
issDetails = lens _issDetails (\s a -> s { _issDetails = a }) . _List
issStatus :: Lens' InstanceStatusSummary (Maybe Text)
issStatus = lens _issStatus (\s a -> s { _issStatus = a })
instance FromXML InstanceStatusSummary where
parseXML x = InstanceStatusSummary
<$> x .@ "details"
<*> x .@? "status"
instance ToQuery InstanceStatusSummary where
toQuery InstanceStatusSummary{..} = mconcat
[ "details" =? _issDetails
, "status" =? _issStatus
]
data SpotPlacement = SpotPlacement
{ _sp1AvailabilityZone :: Maybe Text
, _sp1GroupName :: Maybe Text
} deriving (Eq, Ord, Show)
spotPlacement :: SpotPlacement
spotPlacement = SpotPlacement
{ _sp1AvailabilityZone = Nothing
, _sp1GroupName = Nothing
}
sp1AvailabilityZone :: Lens' SpotPlacement (Maybe Text)
sp1AvailabilityZone =
lens _sp1AvailabilityZone (\s a -> s { _sp1AvailabilityZone = a })
sp1GroupName :: Lens' SpotPlacement (Maybe Text)
sp1GroupName = lens _sp1GroupName (\s a -> s { _sp1GroupName = a })
instance FromXML SpotPlacement where
parseXML x = SpotPlacement
<$> x .@? "availabilityZone"
<*> x .@? "groupName"
instance ToQuery SpotPlacement where
toQuery SpotPlacement{..} = mconcat
[ "availabilityZone" =? _sp1AvailabilityZone
, "groupName" =? _sp1GroupName
]
data EbsInstanceBlockDeviceSpecification = EbsInstanceBlockDeviceSpecification
{ _eibdsDeleteOnTermination :: Maybe Bool
, _eibdsVolumeId :: Maybe Text
} deriving (Eq, Ord, Show)
ebsInstanceBlockDeviceSpecification :: EbsInstanceBlockDeviceSpecification
ebsInstanceBlockDeviceSpecification = EbsInstanceBlockDeviceSpecification
{ _eibdsVolumeId = Nothing
, _eibdsDeleteOnTermination = Nothing
}
eibdsDeleteOnTermination :: Lens' EbsInstanceBlockDeviceSpecification (Maybe Bool)
eibdsDeleteOnTermination =
lens _eibdsDeleteOnTermination
(\s a -> s { _eibdsDeleteOnTermination = a })
eibdsVolumeId :: Lens' EbsInstanceBlockDeviceSpecification (Maybe Text)
eibdsVolumeId = lens _eibdsVolumeId (\s a -> s { _eibdsVolumeId = a })
instance FromXML EbsInstanceBlockDeviceSpecification where
parseXML x = EbsInstanceBlockDeviceSpecification
<$> x .@? "deleteOnTermination"
<*> x .@? "volumeId"
instance ToQuery EbsInstanceBlockDeviceSpecification where
toQuery EbsInstanceBlockDeviceSpecification{..} = mconcat
[ "deleteOnTermination" =? _eibdsDeleteOnTermination
, "volumeId" =? _eibdsVolumeId
]
data NetworkAclAssociation = NetworkAclAssociation
{ _naaNetworkAclAssociationId :: Maybe Text
, _naaNetworkAclId :: Maybe Text
, _naaSubnetId :: Maybe Text
} deriving (Eq, Ord, Show)
networkAclAssociation :: NetworkAclAssociation
networkAclAssociation = NetworkAclAssociation
{ _naaNetworkAclAssociationId = Nothing
, _naaNetworkAclId = Nothing
, _naaSubnetId = Nothing
}
naaNetworkAclAssociationId :: Lens' NetworkAclAssociation (Maybe Text)
naaNetworkAclAssociationId =
lens _naaNetworkAclAssociationId
(\s a -> s { _naaNetworkAclAssociationId = a })
naaNetworkAclId :: Lens' NetworkAclAssociation (Maybe Text)
naaNetworkAclId = lens _naaNetworkAclId (\s a -> s { _naaNetworkAclId = a })
naaSubnetId :: Lens' NetworkAclAssociation (Maybe Text)
naaSubnetId = lens _naaSubnetId (\s a -> s { _naaSubnetId = a })
instance FromXML NetworkAclAssociation where
parseXML x = NetworkAclAssociation
<$> x .@? "networkAclAssociationId"
<*> x .@? "networkAclId"
<*> x .@? "subnetId"
instance ToQuery NetworkAclAssociation where
toQuery NetworkAclAssociation{..} = mconcat
[ "networkAclAssociationId" =? _naaNetworkAclAssociationId
, "networkAclId" =? _naaNetworkAclId
, "subnetId" =? _naaSubnetId
]
data BundleTask = BundleTask
{ _btBundleId :: Maybe Text
, _btBundleTaskError :: Maybe BundleTaskError
, _btInstanceId :: Maybe Text
, _btProgress :: Maybe Text
, _btStartTime :: Maybe RFC822
, _btState :: Maybe Text
, _btStorage :: Maybe Storage
, _btUpdateTime :: Maybe RFC822
} deriving (Eq, Show)
bundleTask :: BundleTask
bundleTask = BundleTask
{ _btInstanceId = Nothing
, _btBundleId = Nothing
, _btState = Nothing
, _btStartTime = Nothing
, _btUpdateTime = Nothing
, _btStorage = Nothing
, _btProgress = Nothing
, _btBundleTaskError = Nothing
}
btBundleId :: Lens' BundleTask (Maybe Text)
btBundleId = lens _btBundleId (\s a -> s { _btBundleId = a })
btBundleTaskError :: Lens' BundleTask (Maybe BundleTaskError)
btBundleTaskError =
lens _btBundleTaskError (\s a -> s { _btBundleTaskError = a })
btInstanceId :: Lens' BundleTask (Maybe Text)
btInstanceId = lens _btInstanceId (\s a -> s { _btInstanceId = a })
btProgress :: Lens' BundleTask (Maybe Text)
btProgress = lens _btProgress (\s a -> s { _btProgress = a })
btStartTime :: Lens' BundleTask (Maybe UTCTime)
btStartTime = lens _btStartTime (\s a -> s { _btStartTime = a }) . mapping _Time
btState :: Lens' BundleTask (Maybe Text)
btState = lens _btState (\s a -> s { _btState = a })
btStorage :: Lens' BundleTask (Maybe Storage)
btStorage = lens _btStorage (\s a -> s { _btStorage = a })
btUpdateTime :: Lens' BundleTask (Maybe UTCTime)
btUpdateTime = lens _btUpdateTime (\s a -> s { _btUpdateTime = a }) . mapping _Time
instance FromXML BundleTask where
parseXML x = BundleTask
<$> x .@? "bundleId"
<*> x .@? "error"
<*> x .@? "instanceId"
<*> x .@? "progress"
<*> x .@? "startTime"
<*> x .@? "state"
<*> x .@? "storage"
<*> x .@? "updateTime"
instance ToQuery BundleTask where
toQuery BundleTask{..} = mconcat
[ "bundleId" =? _btBundleId
, "error" =? _btBundleTaskError
, "instanceId" =? _btInstanceId
, "progress" =? _btProgress
, "startTime" =? _btStartTime
, "state" =? _btState
, "storage" =? _btStorage
, "updateTime" =? _btUpdateTime
]
data InstanceStatusEvent = InstanceStatusEvent
{ _iseCode :: Maybe Text
, _iseDescription :: Maybe Text
, _iseNotAfter :: Maybe RFC822
, _iseNotBefore :: Maybe RFC822
} deriving (Eq, Ord, Show)
instanceStatusEvent :: InstanceStatusEvent
instanceStatusEvent = InstanceStatusEvent
{ _iseCode = Nothing
, _iseDescription = Nothing
, _iseNotBefore = Nothing
, _iseNotAfter = Nothing
}
iseCode :: Lens' InstanceStatusEvent (Maybe Text)
iseCode = lens _iseCode (\s a -> s { _iseCode = a })
iseDescription :: Lens' InstanceStatusEvent (Maybe Text)
iseDescription = lens _iseDescription (\s a -> s { _iseDescription = a })
iseNotAfter :: Lens' InstanceStatusEvent (Maybe UTCTime)
iseNotAfter = lens _iseNotAfter (\s a -> s { _iseNotAfter = a }) . mapping _Time
iseNotBefore :: Lens' InstanceStatusEvent (Maybe UTCTime)
iseNotBefore = lens _iseNotBefore (\s a -> s { _iseNotBefore = a }) . mapping _Time
instance FromXML InstanceStatusEvent where
parseXML x = InstanceStatusEvent
<$> x .@? "code"
<*> x .@? "description"
<*> x .@? "notAfter"
<*> x .@? "notBefore"
instance ToQuery InstanceStatusEvent where
toQuery InstanceStatusEvent{..} = mconcat
[ "code" =? _iseCode
, "description" =? _iseDescription
, "notAfter" =? _iseNotAfter
, "notBefore" =? _iseNotBefore
]
data InstanceType
= C1Medium
| C1XLarge
| C32XLarge
| C34XLarge
| C38XLarge
| C3Large
| C3XLarge
| Cc14XLarge
| Cc28XLarge
| Cg14XLarge
| Cr18XLarge
| G22XLarge
| Hi14XLarge
| Hs18XLarge
| I22XLarge
| I24XLarge
| I28XLarge
| I2XLarge
| M1Large
| M1Medium
| M1Small
| M1XLarge
| M22XLarge
| M24XLarge
| M2XLarge
| M32XLarge
| M3Large
| M3Medium
| M3XLarge
| R32XLarge
| R34XLarge
| R38XLarge
| R3Large
| R3XLarge
| T1Micro
| T2Medium
| T2Micro
| T2Small
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable InstanceType
instance FromText InstanceType where
parser = match "c1.medium" C1Medium
<|> match "c1.xlarge" C1XLarge
<|> match "c3.2xlarge" C32XLarge
<|> match "c3.4xlarge" C34XLarge
<|> match "c3.8xlarge" C38XLarge
<|> match "c3.large" C3Large
<|> match "c3.xlarge" C3XLarge
<|> match "cc1.4xlarge" Cc14XLarge
<|> match "cc2.8xlarge" Cc28XLarge
<|> match "cg1.4xlarge" Cg14XLarge
<|> match "cr1.8xlarge" Cr18XLarge
<|> match "g2.2xlarge" G22XLarge
<|> match "hi1.4xlarge" Hi14XLarge
<|> match "hs1.8xlarge" Hs18XLarge
<|> match "i2.2xlarge" I22XLarge
<|> match "i2.4xlarge" I24XLarge
<|> match "i2.8xlarge" I28XLarge
<|> match "i2.xlarge" I2XLarge
<|> match "m1.large" M1Large
<|> match "m1.medium" M1Medium
<|> match "m1.small" M1Small
<|> match "m1.xlarge" M1XLarge
<|> match "m2.2xlarge" M22XLarge
<|> match "m2.4xlarge" M24XLarge
<|> match "m2.xlarge" M2XLarge
<|> match "m3.2xlarge" M32XLarge
<|> match "m3.large" M3Large
<|> match "m3.medium" M3Medium
<|> match "m3.xlarge" M3XLarge
<|> match "r3.2xlarge" R32XLarge
<|> match "r3.4xlarge" R34XLarge
<|> match "r3.8xlarge" R38XLarge
<|> match "r3.large" R3Large
<|> match "r3.xlarge" R3XLarge
<|> match "t1.micro" T1Micro
<|> match "t2.medium" T2Medium
<|> match "t2.micro" T2Micro
<|> match "t2.small" T2Small
instance ToText InstanceType where
toText = \case
C1Medium -> "c1.medium"
C1XLarge -> "c1.xlarge"
C32XLarge -> "c3.2xlarge"
C34XLarge -> "c3.4xlarge"
C38XLarge -> "c3.8xlarge"
C3Large -> "c3.large"
C3XLarge -> "c3.xlarge"
Cc14XLarge -> "cc1.4xlarge"
Cc28XLarge -> "cc2.8xlarge"
Cg14XLarge -> "cg1.4xlarge"
Cr18XLarge -> "cr1.8xlarge"
G22XLarge -> "g2.2xlarge"
Hi14XLarge -> "hi1.4xlarge"
Hs18XLarge -> "hs1.8xlarge"
I22XLarge -> "i2.2xlarge"
I24XLarge -> "i2.4xlarge"
I28XLarge -> "i2.8xlarge"
I2XLarge -> "i2.xlarge"
M1Large -> "m1.large"
M1Medium -> "m1.medium"
M1Small -> "m1.small"
M1XLarge -> "m1.xlarge"
M22XLarge -> "m2.2xlarge"
M24XLarge -> "m2.4xlarge"
M2XLarge -> "m2.xlarge"
M32XLarge -> "m3.2xlarge"
M3Large -> "m3.large"
M3Medium -> "m3.medium"
M3XLarge -> "m3.xlarge"
R32XLarge -> "r3.2xlarge"
R34XLarge -> "r3.4xlarge"
R38XLarge -> "r3.8xlarge"
R3Large -> "r3.large"
R3XLarge -> "r3.xlarge"
T1Micro -> "t1.micro"
T2Medium -> "t2.medium"
T2Micro -> "t2.micro"
T2Small -> "t2.small"
instance FromXML InstanceType where
parseXML = parseXMLText "InstanceType"
instance ToQuery InstanceType where
toQuery = toQuery . toText
data Route = Route
{ _rDestinationCidrBlock :: Maybe Text
, _rGatewayId :: Maybe Text
, _rInstanceId :: Maybe Text
, _rInstanceOwnerId :: Maybe Text
, _rNetworkInterfaceId :: Maybe Text
, _rOrigin :: Maybe Text
, _rState :: Maybe Text
, _rVpcPeeringConnectionId :: Maybe Text
} deriving (Eq, Ord, Show)
route :: Route
route = Route
{ _rDestinationCidrBlock = Nothing
, _rGatewayId = Nothing
, _rInstanceId = Nothing
, _rInstanceOwnerId = Nothing
, _rNetworkInterfaceId = Nothing
, _rVpcPeeringConnectionId = Nothing
, _rState = Nothing
, _rOrigin = Nothing
}
rDestinationCidrBlock :: Lens' Route (Maybe Text)
rDestinationCidrBlock =
lens _rDestinationCidrBlock (\s a -> s { _rDestinationCidrBlock = a })
rGatewayId :: Lens' Route (Maybe Text)
rGatewayId = lens _rGatewayId (\s a -> s { _rGatewayId = a })
rInstanceId :: Lens' Route (Maybe Text)
rInstanceId = lens _rInstanceId (\s a -> s { _rInstanceId = a })
rInstanceOwnerId :: Lens' Route (Maybe Text)
rInstanceOwnerId = lens _rInstanceOwnerId (\s a -> s { _rInstanceOwnerId = a })
rNetworkInterfaceId :: Lens' Route (Maybe Text)
rNetworkInterfaceId =
lens _rNetworkInterfaceId (\s a -> s { _rNetworkInterfaceId = a })
rOrigin :: Lens' Route (Maybe Text)
rOrigin = lens _rOrigin (\s a -> s { _rOrigin = a })
rState :: Lens' Route (Maybe Text)
rState = lens _rState (\s a -> s { _rState = a })
rVpcPeeringConnectionId :: Lens' Route (Maybe Text)
rVpcPeeringConnectionId =
lens _rVpcPeeringConnectionId (\s a -> s { _rVpcPeeringConnectionId = a })
instance FromXML Route where
parseXML x = Route
<$> x .@? "destinationCidrBlock"
<*> x .@? "gatewayId"
<*> x .@? "instanceId"
<*> x .@? "instanceOwnerId"
<*> x .@? "networkInterfaceId"
<*> x .@? "origin"
<*> x .@? "state"
<*> x .@? "vpcPeeringConnectionId"
instance ToQuery Route where
toQuery Route{..} = mconcat
[ "destinationCidrBlock" =? _rDestinationCidrBlock
, "gatewayId" =? _rGatewayId
, "instanceId" =? _rInstanceId
, "instanceOwnerId" =? _rInstanceOwnerId
, "networkInterfaceId" =? _rNetworkInterfaceId
, "origin" =? _rOrigin
, "state" =? _rState
, "vpcPeeringConnectionId" =? _rVpcPeeringConnectionId
]
data SpotDatafeedSubscription = SpotDatafeedSubscription
{ _sdsBucket :: Maybe Text
, _sdsFault :: Maybe SpotInstanceStateFault
, _sdsOwnerId :: Maybe Text
, _sdsPrefix :: Maybe Text
, _sdsState :: Maybe Text
} deriving (Eq, Show)
spotDatafeedSubscription :: SpotDatafeedSubscription
spotDatafeedSubscription = SpotDatafeedSubscription
{ _sdsOwnerId = Nothing
, _sdsBucket = Nothing
, _sdsPrefix = Nothing
, _sdsState = Nothing
, _sdsFault = Nothing
}
sdsBucket :: Lens' SpotDatafeedSubscription (Maybe Text)
sdsBucket = lens _sdsBucket (\s a -> s { _sdsBucket = a })
sdsFault :: Lens' SpotDatafeedSubscription (Maybe SpotInstanceStateFault)
sdsFault = lens _sdsFault (\s a -> s { _sdsFault = a })
sdsOwnerId :: Lens' SpotDatafeedSubscription (Maybe Text)
sdsOwnerId = lens _sdsOwnerId (\s a -> s { _sdsOwnerId = a })
sdsPrefix :: Lens' SpotDatafeedSubscription (Maybe Text)
sdsPrefix = lens _sdsPrefix (\s a -> s { _sdsPrefix = a })
sdsState :: Lens' SpotDatafeedSubscription (Maybe Text)
sdsState = lens _sdsState (\s a -> s { _sdsState = a })
instance FromXML SpotDatafeedSubscription where
parseXML x = SpotDatafeedSubscription
<$> x .@? "bucket"
<*> x .@? "fault"
<*> x .@? "ownerId"
<*> x .@? "prefix"
<*> x .@? "state"
instance ToQuery SpotDatafeedSubscription where
toQuery SpotDatafeedSubscription{..} = mconcat
[ "bucket" =? _sdsBucket
, "fault" =? _sdsFault
, "ownerId" =? _sdsOwnerId
, "prefix" =? _sdsPrefix
, "state" =? _sdsState
]
newtype Storage = Storage
{ _sS3 :: Maybe S3Storage
} deriving (Eq, Show)
storage :: Storage
storage = Storage
{ _sS3 = Nothing
}
sS3 :: Lens' Storage (Maybe S3Storage)
sS3 = lens _sS3 (\s a -> s { _sS3 = a })
instance FromXML Storage where
parseXML x = Storage
<$> x .@? "S3"
instance ToQuery Storage where
toQuery Storage{..} = mconcat
[ "S3" =? _sS3
]
data SecurityGroup = SecurityGroup
{ _sgDescription :: Text
, _sgGroupId :: Text
, _sgGroupName :: Text
, _sgIpPermissions :: List "item" IpPermission
, _sgIpPermissionsEgress :: List "item" IpPermission
, _sgOwnerId :: Text
, _sgTags :: List "item" Tag
, _sgVpcId :: Maybe Text
} deriving (Eq, Show)
securityGroup :: Text
-> Text
-> Text
-> Text
-> SecurityGroup
securityGroup p1 p2 p3 p4 = SecurityGroup
{ _sgOwnerId = p1
, _sgGroupName = p2
, _sgGroupId = p3
, _sgDescription = p4
, _sgIpPermissions = mempty
, _sgIpPermissionsEgress = mempty
, _sgVpcId = Nothing
, _sgTags = mempty
}
sgDescription :: Lens' SecurityGroup Text
sgDescription = lens _sgDescription (\s a -> s { _sgDescription = a })
sgGroupId :: Lens' SecurityGroup Text
sgGroupId = lens _sgGroupId (\s a -> s { _sgGroupId = a })
sgGroupName :: Lens' SecurityGroup Text
sgGroupName = lens _sgGroupName (\s a -> s { _sgGroupName = a })
sgIpPermissions :: Lens' SecurityGroup [IpPermission]
sgIpPermissions = lens _sgIpPermissions (\s a -> s { _sgIpPermissions = a }) . _List
sgIpPermissionsEgress :: Lens' SecurityGroup [IpPermission]
sgIpPermissionsEgress =
lens _sgIpPermissionsEgress (\s a -> s { _sgIpPermissionsEgress = a })
. _List
sgOwnerId :: Lens' SecurityGroup Text
sgOwnerId = lens _sgOwnerId (\s a -> s { _sgOwnerId = a })
sgTags :: Lens' SecurityGroup [Tag]
sgTags = lens _sgTags (\s a -> s { _sgTags = a }) . _List
sgVpcId :: Lens' SecurityGroup (Maybe Text)
sgVpcId = lens _sgVpcId (\s a -> s { _sgVpcId = a })
instance FromXML SecurityGroup where
parseXML x = SecurityGroup
<$> x .@ "groupDescription"
<*> x .@ "groupId"
<*> x .@ "groupName"
<*> x .@ "ipPermissions"
<*> x .@ "ipPermissionsEgress"
<*> x .@ "ownerId"
<*> x .@ "tagSet"
<*> x .@? "vpcId"
instance ToQuery SecurityGroup where
toQuery SecurityGroup{..} = mconcat
[ "groupDescription" =? _sgDescription
, "groupId" =? _sgGroupId
, "groupName" =? _sgGroupName
, "ipPermissions" =? _sgIpPermissions
, "ipPermissionsEgress" =? _sgIpPermissionsEgress
, "ownerId" =? _sgOwnerId
, "tagSet" =? _sgTags
, "vpcId" =? _sgVpcId
]
data CancelSpotInstanceRequestState
= CSIRSActive
| CSIRSCancelled
| CSIRSClosed
| CSIRSCompleted
| CSIRSOpen
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable CancelSpotInstanceRequestState
instance FromText CancelSpotInstanceRequestState where
parser = match "active" CSIRSActive
<|> match "cancelled" CSIRSCancelled
<|> match "closed" CSIRSClosed
<|> match "completed" CSIRSCompleted
<|> match "open" CSIRSOpen
instance ToText CancelSpotInstanceRequestState where
toText = \case
CSIRSActive -> "active"
CSIRSCancelled -> "cancelled"
CSIRSClosed -> "closed"
CSIRSCompleted -> "completed"
CSIRSOpen -> "open"
instance FromXML CancelSpotInstanceRequestState where
parseXML = parseXMLText "CancelSpotInstanceRequestState"
instance ToQuery CancelSpotInstanceRequestState where
toQuery = toQuery . toText
data PlacementGroupState
= PGSAvailable
| PGSDeleted
| PGSDeleting
| PGSPending
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable PlacementGroupState
instance FromText PlacementGroupState where
parser = match "available" PGSAvailable
<|> match "deleted" PGSDeleted
<|> match "deleting" PGSDeleting
<|> match "pending" PGSPending
instance ToText PlacementGroupState where
toText = \case
PGSAvailable -> "available"
PGSDeleted -> "deleted"
PGSDeleting -> "deleting"
PGSPending -> "pending"
instance FromXML PlacementGroupState where
parseXML = parseXMLText "PlacementGroupState"
instance ToQuery PlacementGroupState where
toQuery = toQuery . toText
data ReservedInstancesModificationResult = ReservedInstancesModificationResult
{ _rimrReservedInstancesId :: Maybe Text
, _rimrTargetConfiguration :: Maybe ReservedInstancesConfiguration
} deriving (Eq, Show)
reservedInstancesModificationResult :: ReservedInstancesModificationResult
reservedInstancesModificationResult = ReservedInstancesModificationResult
{ _rimrReservedInstancesId = Nothing
, _rimrTargetConfiguration = Nothing
}
rimrReservedInstancesId :: Lens' ReservedInstancesModificationResult (Maybe Text)
rimrReservedInstancesId =
lens _rimrReservedInstancesId (\s a -> s { _rimrReservedInstancesId = a })
rimrTargetConfiguration :: Lens' ReservedInstancesModificationResult (Maybe ReservedInstancesConfiguration)
rimrTargetConfiguration =
lens _rimrTargetConfiguration (\s a -> s { _rimrTargetConfiguration = a })
instance FromXML ReservedInstancesModificationResult where
parseXML x = ReservedInstancesModificationResult
<$> x .@? "reservedInstancesId"
<*> x .@? "targetConfiguration"
instance ToQuery ReservedInstancesModificationResult where
toQuery ReservedInstancesModificationResult{..} = mconcat
[ "reservedInstancesId" =? _rimrReservedInstancesId
, "targetConfiguration" =? _rimrTargetConfiguration
]
data InstanceBlockDeviceMappingSpecification = InstanceBlockDeviceMappingSpecification
{ _ibdmsDeviceName :: Maybe Text
, _ibdmsEbs :: Maybe EbsInstanceBlockDeviceSpecification
, _ibdmsNoDevice :: Maybe Text
, _ibdmsVirtualName :: Maybe Text
} deriving (Eq, Show)
instanceBlockDeviceMappingSpecification :: InstanceBlockDeviceMappingSpecification
instanceBlockDeviceMappingSpecification = InstanceBlockDeviceMappingSpecification
{ _ibdmsDeviceName = Nothing
, _ibdmsEbs = Nothing
, _ibdmsVirtualName = Nothing
, _ibdmsNoDevice = Nothing
}
ibdmsDeviceName :: Lens' InstanceBlockDeviceMappingSpecification (Maybe Text)
ibdmsDeviceName = lens _ibdmsDeviceName (\s a -> s { _ibdmsDeviceName = a })
ibdmsEbs :: Lens' InstanceBlockDeviceMappingSpecification (Maybe EbsInstanceBlockDeviceSpecification)
ibdmsEbs = lens _ibdmsEbs (\s a -> s { _ibdmsEbs = a })
ibdmsNoDevice :: Lens' InstanceBlockDeviceMappingSpecification (Maybe Text)
ibdmsNoDevice = lens _ibdmsNoDevice (\s a -> s { _ibdmsNoDevice = a })
ibdmsVirtualName :: Lens' InstanceBlockDeviceMappingSpecification (Maybe Text)
ibdmsVirtualName = lens _ibdmsVirtualName (\s a -> s { _ibdmsVirtualName = a })
instance FromXML InstanceBlockDeviceMappingSpecification where
parseXML x = InstanceBlockDeviceMappingSpecification
<$> x .@? "deviceName"
<*> x .@? "ebs"
<*> x .@? "noDevice"
<*> x .@? "virtualName"
instance ToQuery InstanceBlockDeviceMappingSpecification where
toQuery InstanceBlockDeviceMappingSpecification{..} = mconcat
[ "deviceName" =? _ibdmsDeviceName
, "ebs" =? _ibdmsEbs
, "noDevice" =? _ibdmsNoDevice
, "virtualName" =? _ibdmsVirtualName
]
data ExportEnvironment
= Citrix
| Microsoft
| Vmware
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable ExportEnvironment
instance FromText ExportEnvironment where
parser = match "citrix" Citrix
<|> match "microsoft" Microsoft
<|> match "vmware" Vmware
instance ToText ExportEnvironment where
toText = \case
Citrix -> "citrix"
Microsoft -> "microsoft"
Vmware -> "vmware"
instance FromXML ExportEnvironment where
parseXML = parseXMLText "ExportEnvironment"
instance ToQuery ExportEnvironment where
toQuery = toQuery . toText
data VolumeAttachment = VolumeAttachment
{ _vaAttachTime :: Maybe RFC822
, _vaDeleteOnTermination :: Maybe Bool
, _vaDevice :: Maybe Text
, _vaInstanceId :: Maybe Text
, _vaState :: Maybe Text
, _vaVolumeId :: Maybe Text
} deriving (Eq, Ord, Show)
volumeAttachment :: VolumeAttachment
volumeAttachment = VolumeAttachment
{ _vaVolumeId = Nothing
, _vaInstanceId = Nothing
, _vaDevice = Nothing
, _vaState = Nothing
, _vaAttachTime = Nothing
, _vaDeleteOnTermination = Nothing
}
vaAttachTime :: Lens' VolumeAttachment (Maybe UTCTime)
vaAttachTime = lens _vaAttachTime (\s a -> s { _vaAttachTime = a }) . mapping _Time
vaDeleteOnTermination :: Lens' VolumeAttachment (Maybe Bool)
vaDeleteOnTermination =
lens _vaDeleteOnTermination (\s a -> s { _vaDeleteOnTermination = a })
vaDevice :: Lens' VolumeAttachment (Maybe Text)
vaDevice = lens _vaDevice (\s a -> s { _vaDevice = a })
vaInstanceId :: Lens' VolumeAttachment (Maybe Text)
vaInstanceId = lens _vaInstanceId (\s a -> s { _vaInstanceId = a })
vaState :: Lens' VolumeAttachment (Maybe Text)
vaState = lens _vaState (\s a -> s { _vaState = a })
vaVolumeId :: Lens' VolumeAttachment (Maybe Text)
vaVolumeId = lens _vaVolumeId (\s a -> s { _vaVolumeId = a })
instance FromXML VolumeAttachment where
parseXML x = VolumeAttachment
<$> x .@? "attachTime"
<*> x .@? "deleteOnTermination"
<*> x .@? "device"
<*> x .@? "instanceId"
<*> x .@? "status"
<*> x .@? "volumeId"
instance ToQuery VolumeAttachment where
toQuery VolumeAttachment{..} = mconcat
[ "attachTime" =? _vaAttachTime
, "deleteOnTermination" =? _vaDeleteOnTermination
, "device" =? _vaDevice
, "instanceId" =? _vaInstanceId
, "status" =? _vaState
, "volumeId" =? _vaVolumeId
]
data CustomerGateway = CustomerGateway
{ _cgBgpAsn :: Maybe Text
, _cgCustomerGatewayId :: Maybe Text
, _cgIpAddress :: Maybe Text
, _cgState :: Maybe Text
, _cgTags :: List "item" Tag
, _cgType :: Maybe Text
} deriving (Eq, Show)
customerGateway :: CustomerGateway
customerGateway = CustomerGateway
{ _cgCustomerGatewayId = Nothing
, _cgState = Nothing
, _cgType = Nothing
, _cgIpAddress = Nothing
, _cgBgpAsn = Nothing
, _cgTags = mempty
}
cgBgpAsn :: Lens' CustomerGateway (Maybe Text)
cgBgpAsn = lens _cgBgpAsn (\s a -> s { _cgBgpAsn = a })
cgCustomerGatewayId :: Lens' CustomerGateway (Maybe Text)
cgCustomerGatewayId =
lens _cgCustomerGatewayId (\s a -> s { _cgCustomerGatewayId = a })
cgIpAddress :: Lens' CustomerGateway (Maybe Text)
cgIpAddress = lens _cgIpAddress (\s a -> s { _cgIpAddress = a })
cgState :: Lens' CustomerGateway (Maybe Text)
cgState = lens _cgState (\s a -> s { _cgState = a })
cgTags :: Lens' CustomerGateway [Tag]
cgTags = lens _cgTags (\s a -> s { _cgTags = a }) . _List
cgType :: Lens' CustomerGateway (Maybe Text)
cgType = lens _cgType (\s a -> s { _cgType = a })
instance FromXML CustomerGateway where
parseXML x = CustomerGateway
<$> x .@? "bgpAsn"
<*> x .@? "customerGatewayId"
<*> x .@? "ipAddress"
<*> x .@? "state"
<*> x .@ "tagSet"
<*> x .@? "type"
instance ToQuery CustomerGateway where
toQuery CustomerGateway{..} = mconcat
[ "bgpAsn" =? _cgBgpAsn
, "customerGatewayId" =? _cgCustomerGatewayId
, "ipAddress" =? _cgIpAddress
, "state" =? _cgState
, "tagSet" =? _cgTags
, "type" =? _cgType
]
data EbsInstanceBlockDevice = EbsInstanceBlockDevice
{ _eibdAttachTime :: Maybe RFC822
, _eibdDeleteOnTermination :: Maybe Bool
, _eibdStatus :: Maybe Text
, _eibdVolumeId :: Maybe Text
} deriving (Eq, Ord, Show)
ebsInstanceBlockDevice :: EbsInstanceBlockDevice
ebsInstanceBlockDevice = EbsInstanceBlockDevice
{ _eibdVolumeId = Nothing
, _eibdStatus = Nothing
, _eibdAttachTime = Nothing
, _eibdDeleteOnTermination = Nothing
}
eibdAttachTime :: Lens' EbsInstanceBlockDevice (Maybe UTCTime)
eibdAttachTime = lens _eibdAttachTime (\s a -> s { _eibdAttachTime = a }) . mapping _Time
eibdDeleteOnTermination :: Lens' EbsInstanceBlockDevice (Maybe Bool)
eibdDeleteOnTermination =
lens _eibdDeleteOnTermination (\s a -> s { _eibdDeleteOnTermination = a })
eibdStatus :: Lens' EbsInstanceBlockDevice (Maybe Text)
eibdStatus = lens _eibdStatus (\s a -> s { _eibdStatus = a })
eibdVolumeId :: Lens' EbsInstanceBlockDevice (Maybe Text)
eibdVolumeId = lens _eibdVolumeId (\s a -> s { _eibdVolumeId = a })
instance FromXML EbsInstanceBlockDevice where
parseXML x = EbsInstanceBlockDevice
<$> x .@? "attachTime"
<*> x .@? "deleteOnTermination"
<*> x .@? "status"
<*> x .@? "volumeId"
instance ToQuery EbsInstanceBlockDevice where
toQuery EbsInstanceBlockDevice{..} = mconcat
[ "attachTime" =? _eibdAttachTime
, "deleteOnTermination" =? _eibdDeleteOnTermination
, "status" =? _eibdStatus
, "volumeId" =? _eibdVolumeId
]
data ShutdownBehavior
= Stop
| Terminate
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable ShutdownBehavior
instance FromText ShutdownBehavior where
parser = match "stop" Stop
<|> match "terminate" Terminate
instance ToText ShutdownBehavior where
toText = \case
Stop -> "stop"
Terminate -> "terminate"
instance FromXML ShutdownBehavior where
parseXML = parseXMLText "ShutdownBehavior"
instance ToQuery ShutdownBehavior where
toQuery = toQuery . toText
data DiskImageDescription = DiskImageDescription
{ _did1Checksum :: Maybe Text
, _did1Format :: Text
, _did1ImportManifestUrl :: Text
, _did1Size :: Integer
} deriving (Eq, Ord, Show)
diskImageDescription :: Text
-> Integer
-> Text
-> DiskImageDescription
diskImageDescription p1 p2 p3 = DiskImageDescription
{ _did1Format = p1
, _did1Size = p2
, _did1ImportManifestUrl = p3
, _did1Checksum = Nothing
}
did1Checksum :: Lens' DiskImageDescription (Maybe Text)
did1Checksum = lens _did1Checksum (\s a -> s { _did1Checksum = a })
did1Format :: Lens' DiskImageDescription Text
did1Format = lens _did1Format (\s a -> s { _did1Format = a })
did1ImportManifestUrl :: Lens' DiskImageDescription Text
did1ImportManifestUrl =
lens _did1ImportManifestUrl (\s a -> s { _did1ImportManifestUrl = a })
did1Size :: Lens' DiskImageDescription Integer
did1Size = lens _did1Size (\s a -> s { _did1Size = a })
instance FromXML DiskImageDescription where
parseXML x = DiskImageDescription
<$> x .@? "checksum"
<*> x .@ "format"
<*> x .@ "importManifestUrl"
<*> x .@ "size"
instance ToQuery DiskImageDescription where
toQuery DiskImageDescription{..} = mconcat
[ "checksum" =? _did1Checksum
, "format" =? _did1Format
, "importManifestUrl" =? _did1ImportManifestUrl
, "size" =? _did1Size
]
data DiskImageVolumeDescription = DiskImageVolumeDescription
{ _divdId :: Text
, _divdSize :: Maybe Integer
} deriving (Eq, Ord, Show)
diskImageVolumeDescription :: Text
-> DiskImageVolumeDescription
diskImageVolumeDescription p1 = DiskImageVolumeDescription
{ _divdId = p1
, _divdSize = Nothing
}
divdId :: Lens' DiskImageVolumeDescription Text
divdId = lens _divdId (\s a -> s { _divdId = a })
divdSize :: Lens' DiskImageVolumeDescription (Maybe Integer)
divdSize = lens _divdSize (\s a -> s { _divdSize = a })
instance FromXML DiskImageVolumeDescription where
parseXML x = DiskImageVolumeDescription
<$> x .@ "id"
<*> x .@? "size"
instance ToQuery DiskImageVolumeDescription where
toQuery DiskImageVolumeDescription{..} = mconcat
[ "id" =? _divdId
, "size" =? _divdSize
]
newtype Monitoring = Monitoring
{ _mState :: Maybe Text
} deriving (Eq, Ord, Show, Monoid)
monitoring :: Monitoring
monitoring = Monitoring
{ _mState = Nothing
}
mState :: Lens' Monitoring (Maybe Text)
mState = lens _mState (\s a -> s { _mState = a })
instance FromXML Monitoring where
parseXML x = Monitoring
<$> x .@? "state"
instance ToQuery Monitoring where
toQuery Monitoring{..} = mconcat
[ "state" =? _mState
]
data SubnetState
= SSAvailable
| SSPending
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable SubnetState
instance FromText SubnetState where
parser = match "available" SSAvailable
<|> match "pending" SSPending
instance ToText SubnetState where
toText = \case
SSAvailable -> "available"
SSPending -> "pending"
instance FromXML SubnetState where
parseXML = parseXMLText "SubnetState"
instance ToQuery SubnetState where
toQuery = toQuery . toText
data ContainerFormat
= Ova
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable ContainerFormat
instance FromText ContainerFormat where
parser = match "ova" Ova
instance ToText ContainerFormat where
toText Ova = "ova"
instance FromXML ContainerFormat where
parseXML = parseXMLText "ContainerFormat"
instance ToQuery ContainerFormat where
toQuery = toQuery . toText
newtype AvailabilityZoneMessage = AvailabilityZoneMessage
{ _azmMessage :: Maybe Text
} deriving (Eq, Ord, Show, Monoid)
availabilityZoneMessage :: AvailabilityZoneMessage
availabilityZoneMessage = AvailabilityZoneMessage
{ _azmMessage = Nothing
}
azmMessage :: Lens' AvailabilityZoneMessage (Maybe Text)
azmMessage = lens _azmMessage (\s a -> s { _azmMessage = a })
instance FromXML AvailabilityZoneMessage where
parseXML x = AvailabilityZoneMessage
<$> x .@? "message"
instance ToQuery AvailabilityZoneMessage where
toQuery AvailabilityZoneMessage{..} = mconcat
[ "message" =? _azmMessage
]
data VpcAttachment = VpcAttachment
{ _va1State :: Maybe Text
, _va1VpcId :: Maybe Text
} deriving (Eq, Ord, Show)
vpcAttachment :: VpcAttachment
vpcAttachment = VpcAttachment
{ _va1VpcId = Nothing
, _va1State = Nothing
}
va1State :: Lens' VpcAttachment (Maybe Text)
va1State = lens _va1State (\s a -> s { _va1State = a })
va1VpcId :: Lens' VpcAttachment (Maybe Text)
va1VpcId = lens _va1VpcId (\s a -> s { _va1VpcId = a })
instance FromXML VpcAttachment where
parseXML x = VpcAttachment
<$> x .@? "state"
<*> x .@? "vpcId"
instance ToQuery VpcAttachment where
toQuery VpcAttachment{..} = mconcat
[ "state" =? _va1State
, "vpcId" =? _va1VpcId
]
data InstanceBlockDeviceMapping = InstanceBlockDeviceMapping
{ _ibdmDeviceName :: Maybe Text
, _ibdmEbs :: Maybe EbsInstanceBlockDevice
} deriving (Eq, Show)
instanceBlockDeviceMapping :: InstanceBlockDeviceMapping
instanceBlockDeviceMapping = InstanceBlockDeviceMapping
{ _ibdmDeviceName = Nothing
, _ibdmEbs = Nothing
}
ibdmDeviceName :: Lens' InstanceBlockDeviceMapping (Maybe Text)
ibdmDeviceName = lens _ibdmDeviceName (\s a -> s { _ibdmDeviceName = a })
ibdmEbs :: Lens' InstanceBlockDeviceMapping (Maybe EbsInstanceBlockDevice)
ibdmEbs = lens _ibdmEbs (\s a -> s { _ibdmEbs = a })
instance FromXML InstanceBlockDeviceMapping where
parseXML x = InstanceBlockDeviceMapping
<$> x .@? "deviceName"
<*> x .@? "ebs"
instance ToQuery InstanceBlockDeviceMapping where
toQuery InstanceBlockDeviceMapping{..} = mconcat
[ "deviceName" =? _ibdmDeviceName
, "ebs" =? _ibdmEbs
]
data StatusType
= Failed
| InsufficientData
| Passed
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable StatusType
instance FromText StatusType where
parser = match "failed" Failed
<|> match "insufficient-data" InsufficientData
<|> match "passed" Passed
instance ToText StatusType where
toText = \case
Failed -> "failed"
InsufficientData -> "insufficient-data"
Passed -> "passed"
instance FromXML StatusType where
parseXML = parseXMLText "StatusType"
instance ToQuery StatusType where
toQuery = toQuery . toText
data ExportToS3TaskSpecification = ExportToS3TaskSpecification
{ _etstsContainerFormat :: Maybe Text
, _etstsDiskImageFormat :: Maybe Text
, _etstsS3Bucket :: Maybe Text
, _etstsS3Prefix :: Maybe Text
} deriving (Eq, Ord, Show)
exportToS3TaskSpecification :: ExportToS3TaskSpecification
exportToS3TaskSpecification = ExportToS3TaskSpecification
{ _etstsDiskImageFormat = Nothing
, _etstsContainerFormat = Nothing
, _etstsS3Bucket = Nothing
, _etstsS3Prefix = Nothing
}
etstsContainerFormat :: Lens' ExportToS3TaskSpecification (Maybe Text)
etstsContainerFormat =
lens _etstsContainerFormat (\s a -> s { _etstsContainerFormat = a })
etstsDiskImageFormat :: Lens' ExportToS3TaskSpecification (Maybe Text)
etstsDiskImageFormat =
lens _etstsDiskImageFormat (\s a -> s { _etstsDiskImageFormat = a })
etstsS3Bucket :: Lens' ExportToS3TaskSpecification (Maybe Text)
etstsS3Bucket = lens _etstsS3Bucket (\s a -> s { _etstsS3Bucket = a })
etstsS3Prefix :: Lens' ExportToS3TaskSpecification (Maybe Text)
etstsS3Prefix = lens _etstsS3Prefix (\s a -> s { _etstsS3Prefix = a })
instance FromXML ExportToS3TaskSpecification where
parseXML x = ExportToS3TaskSpecification
<$> x .@? "containerFormat"
<*> x .@? "diskImageFormat"
<*> x .@? "s3Bucket"
<*> x .@? "s3Prefix"
instance ToQuery ExportToS3TaskSpecification where
toQuery ExportToS3TaskSpecification{..} = mconcat
[ "containerFormat" =? _etstsContainerFormat
, "diskImageFormat" =? _etstsDiskImageFormat
, "s3Bucket" =? _etstsS3Bucket
, "s3Prefix" =? _etstsS3Prefix
]
data NetworkInterfaceAttribute
= Attachment
| Description
| GroupSet
| SourceDestCheck
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable NetworkInterfaceAttribute
instance FromText NetworkInterfaceAttribute where
parser = match "attachment" Attachment
<|> match "description" Description
<|> match "groupSet" GroupSet
<|> match "sourceDestCheck" SourceDestCheck
instance ToText NetworkInterfaceAttribute where
toText = \case
Attachment -> "attachment"
Description -> "description"
GroupSet -> "groupSet"
SourceDestCheck -> "sourceDestCheck"
instance FromXML NetworkInterfaceAttribute where
parseXML = parseXMLText "NetworkInterfaceAttribute"
instance ToQuery NetworkInterfaceAttribute where
toQuery = toQuery . toText
data ImageTypeValues
= Kernel
| Machine
| Ramdisk
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable ImageTypeValues
instance FromText ImageTypeValues where
parser = match "kernel" Kernel
<|> match "machine" Machine
<|> match "ramdisk" Ramdisk
instance ToText ImageTypeValues where
toText = \case
Kernel -> "kernel"
Machine -> "machine"
Ramdisk -> "ramdisk"
instance FromXML ImageTypeValues where
parseXML = parseXMLText "ImageTypeValues"
instance ToQuery ImageTypeValues where
toQuery = toQuery . toText
data InstanceExportDetails = InstanceExportDetails
{ _iedInstanceId :: Maybe Text
, _iedTargetEnvironment :: Maybe Text
} deriving (Eq, Ord, Show)
instanceExportDetails :: InstanceExportDetails
instanceExportDetails = InstanceExportDetails
{ _iedInstanceId = Nothing
, _iedTargetEnvironment = Nothing
}
iedInstanceId :: Lens' InstanceExportDetails (Maybe Text)
iedInstanceId = lens _iedInstanceId (\s a -> s { _iedInstanceId = a })
iedTargetEnvironment :: Lens' InstanceExportDetails (Maybe Text)
iedTargetEnvironment =
lens _iedTargetEnvironment (\s a -> s { _iedTargetEnvironment = a })
instance FromXML InstanceExportDetails where
parseXML x = InstanceExportDetails
<$> x .@? "instanceId"
<*> x .@? "targetEnvironment"
instance ToQuery InstanceExportDetails where
toQuery InstanceExportDetails{..} = mconcat
[ "instanceId" =? _iedInstanceId
, "targetEnvironment" =? _iedTargetEnvironment
]
data SnapshotAttributeName
= SANCreateVolumePermission
| SANProductCodes
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable SnapshotAttributeName
instance FromText SnapshotAttributeName where
parser = match "createVolumePermission" SANCreateVolumePermission
<|> match "productCodes" SANProductCodes
instance ToText SnapshotAttributeName where
toText = \case
SANCreateVolumePermission -> "createVolumePermission"
SANProductCodes -> "productCodes"
instance FromXML SnapshotAttributeName where
parseXML = parseXMLText "SnapshotAttributeName"
instance ToQuery SnapshotAttributeName where
toQuery = toQuery . toText
data AvailabilityZone = AvailabilityZone
{ _azMessages :: List "item" AvailabilityZoneMessage
, _azRegionName :: Maybe Text
, _azState :: Maybe Text
, _azZoneName :: Maybe Text
} deriving (Eq, Show)
availabilityZone :: AvailabilityZone
availabilityZone = AvailabilityZone
{ _azZoneName = Nothing
, _azState = Nothing
, _azRegionName = Nothing
, _azMessages = mempty
}
azMessages :: Lens' AvailabilityZone [AvailabilityZoneMessage]
azMessages = lens _azMessages (\s a -> s { _azMessages = a }) . _List
azRegionName :: Lens' AvailabilityZone (Maybe Text)
azRegionName = lens _azRegionName (\s a -> s { _azRegionName = a })
azState :: Lens' AvailabilityZone (Maybe Text)
azState = lens _azState (\s a -> s { _azState = a })
azZoneName :: Lens' AvailabilityZone (Maybe Text)
azZoneName = lens _azZoneName (\s a -> s { _azZoneName = a })
instance FromXML AvailabilityZone where
parseXML x = AvailabilityZone
<$> x .@ "messageSet"
<*> x .@? "regionName"
<*> x .@? "zoneState"
<*> x .@? "zoneName"
instance ToQuery AvailabilityZone where
toQuery AvailabilityZone{..} = mconcat
[ "messageSet" =? _azMessages
, "regionName" =? _azRegionName
, "zoneState" =? _azState
, "zoneName" =? _azZoneName
]
data VpnState
= VpnStateAvailable
| VpnStateDeleted
| VpnStateDeleting
| VpnStatePending
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable VpnState
instance FromText VpnState where
parser = match "available" VpnStateAvailable
<|> match "deleted" VpnStateDeleted
<|> match "deleting" VpnStateDeleting
<|> match "pending" VpnStatePending
instance ToText VpnState where
toText = \case
VpnStateAvailable -> "available"
VpnStateDeleted -> "deleted"
VpnStateDeleting -> "deleting"
VpnStatePending -> "pending"
instance FromXML VpnState where
parseXML = parseXMLText "VpnState"
instance ToQuery VpnState where
toQuery = toQuery . toText
data RouteTable = RouteTable
{ _rtAssociations :: List "item" RouteTableAssociation
, _rtPropagatingVgws :: List "item" PropagatingVgw
, _rtRouteTableId :: Maybe Text
, _rtRoutes :: List "item" Route
, _rtTags :: List "item" Tag
, _rtVpcId :: Maybe Text
} deriving (Eq, Show)
routeTable :: RouteTable
routeTable = RouteTable
{ _rtRouteTableId = Nothing
, _rtVpcId = Nothing
, _rtRoutes = mempty
, _rtAssociations = mempty
, _rtTags = mempty
, _rtPropagatingVgws = mempty
}
rtAssociations :: Lens' RouteTable [RouteTableAssociation]
rtAssociations = lens _rtAssociations (\s a -> s { _rtAssociations = a }) . _List
rtPropagatingVgws :: Lens' RouteTable [PropagatingVgw]
rtPropagatingVgws =
lens _rtPropagatingVgws (\s a -> s { _rtPropagatingVgws = a })
. _List
rtRouteTableId :: Lens' RouteTable (Maybe Text)
rtRouteTableId = lens _rtRouteTableId (\s a -> s { _rtRouteTableId = a })
rtRoutes :: Lens' RouteTable [Route]
rtRoutes = lens _rtRoutes (\s a -> s { _rtRoutes = a }) . _List
rtTags :: Lens' RouteTable [Tag]
rtTags = lens _rtTags (\s a -> s { _rtTags = a }) . _List
rtVpcId :: Lens' RouteTable (Maybe Text)
rtVpcId = lens _rtVpcId (\s a -> s { _rtVpcId = a })
instance FromXML RouteTable where
parseXML x = RouteTable
<$> x .@ "associationSet"
<*> x .@ "propagatingVgwSet"
<*> x .@? "routeTableId"
<*> x .@ "routeSet"
<*> x .@ "tagSet"
<*> x .@? "vpcId"
instance ToQuery RouteTable where
toQuery RouteTable{..} = mconcat
[ "associationSet" =? _rtAssociations
, "propagatingVgwSet" =? _rtPropagatingVgws
, "routeTableId" =? _rtRouteTableId
, "routeSet" =? _rtRoutes
, "tagSet" =? _rtTags
, "vpcId" =? _rtVpcId
]
data HypervisorType
= Ovm
| Xen
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable HypervisorType
instance FromText HypervisorType where
parser = match "ovm" Ovm
<|> match "xen" Xen
instance ToText HypervisorType where
toText = \case
Ovm -> "ovm"
Xen -> "xen"
instance FromXML HypervisorType where
parseXML = parseXMLText "HypervisorType"
instance ToQuery HypervisorType where
toQuery = toQuery . toText
data InstanceStatusDetails = InstanceStatusDetails
{ _isdImpairedSince :: Maybe RFC822
, _isdName :: Maybe Text
, _isdStatus :: Maybe Text
} deriving (Eq, Ord, Show)
instanceStatusDetails :: InstanceStatusDetails
instanceStatusDetails = InstanceStatusDetails
{ _isdName = Nothing
, _isdStatus = Nothing
, _isdImpairedSince = Nothing
}
isdImpairedSince :: Lens' InstanceStatusDetails (Maybe UTCTime)
isdImpairedSince = lens _isdImpairedSince (\s a -> s { _isdImpairedSince = a }) . mapping _Time
isdName :: Lens' InstanceStatusDetails (Maybe Text)
isdName = lens _isdName (\s a -> s { _isdName = a })
isdStatus :: Lens' InstanceStatusDetails (Maybe Text)
isdStatus = lens _isdStatus (\s a -> s { _isdStatus = a })
instance FromXML InstanceStatusDetails where
parseXML x = InstanceStatusDetails
<$> x .@? "impairedSince"
<*> x .@? "name"
<*> x .@? "status"
instance ToQuery InstanceStatusDetails where
toQuery InstanceStatusDetails{..} = mconcat
[ "impairedSince" =? _isdImpairedSince
, "name" =? _isdName
, "status" =? _isdStatus
]
data IamInstanceProfile = IamInstanceProfile
{ _iipArn :: Maybe Text
, _iipId :: Maybe Text
} deriving (Eq, Ord, Show)
iamInstanceProfile :: IamInstanceProfile
iamInstanceProfile = IamInstanceProfile
{ _iipArn = Nothing
, _iipId = Nothing
}
iipArn :: Lens' IamInstanceProfile (Maybe Text)
iipArn = lens _iipArn (\s a -> s { _iipArn = a })
iipId :: Lens' IamInstanceProfile (Maybe Text)
iipId = lens _iipId (\s a -> s { _iipId = a })
instance FromXML IamInstanceProfile where
parseXML x = IamInstanceProfile
<$> x .@? "arn"
<*> x .@? "id"
instance ToQuery IamInstanceProfile where
toQuery IamInstanceProfile{..} = mconcat
[ "arn" =? _iipArn
, "id" =? _iipId
]
data InternetGatewayAttachment = InternetGatewayAttachment
{ _igaState :: Text
, _igaVpcId :: Text
} deriving (Eq, Ord, Show)
internetGatewayAttachment :: Text
-> Text
-> InternetGatewayAttachment
internetGatewayAttachment p1 p2 = InternetGatewayAttachment
{ _igaVpcId = p1
, _igaState = p2
}
igaState :: Lens' InternetGatewayAttachment Text
igaState = lens _igaState (\s a -> s { _igaState = a })
igaVpcId :: Lens' InternetGatewayAttachment Text
igaVpcId = lens _igaVpcId (\s a -> s { _igaVpcId = a })
instance FromXML InternetGatewayAttachment where
parseXML x = InternetGatewayAttachment
<$> x .@ "state"
<*> x .@ "vpcId"
instance ToQuery InternetGatewayAttachment where
toQuery InternetGatewayAttachment{..} = mconcat
[ "state" =? _igaState
, "vpcId" =? _igaVpcId
]
data ReservedInstanceState
= RISActive
| RISPaymentFailed
| RISPaymentPending
| RISRetired
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable ReservedInstanceState
instance FromText ReservedInstanceState where
parser = match "active" RISActive
<|> match "payment-failed" RISPaymentFailed
<|> match "payment-pending" RISPaymentPending
<|> match "retired" RISRetired
instance ToText ReservedInstanceState where
toText = \case
RISActive -> "active"
RISPaymentFailed -> "payment-failed"
RISPaymentPending -> "payment-pending"
RISRetired -> "retired"
instance FromXML ReservedInstanceState where
parseXML = parseXMLText "ReservedInstanceState"
instance ToQuery ReservedInstanceState where
toQuery = toQuery . toText
data InstanceAttributeName
= IANInstanceBlockDeviceMapping
| IANInstanceDisableApiTermination
| IANInstanceEbsOptimized
| IANInstanceGroupSet
| IANInstanceInstanceInitiatedShutdownBehavior
| IANInstanceInstanceType
| IANInstanceKernel
| IANInstanceProductCodes
| IANInstanceRamdisk
| IANInstanceRootDeviceName
| IANInstanceSourceDestCheck
| IANInstanceSriovNetSupport
| IANInstanceUserData
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable InstanceAttributeName
instance FromText InstanceAttributeName where
parser = match "blockDeviceMapping" IANInstanceBlockDeviceMapping
<|> match "disableApiTermination" IANInstanceDisableApiTermination
<|> match "ebsOptimized" IANInstanceEbsOptimized
<|> match "groupSet" IANInstanceGroupSet
<|> match "instanceInitiatedShutdownBehavior" IANInstanceInstanceInitiatedShutdownBehavior
<|> match "instanceType" IANInstanceInstanceType
<|> match "kernel" IANInstanceKernel
<|> match "productCodes" IANInstanceProductCodes
<|> match "ramdisk" IANInstanceRamdisk
<|> match "rootDeviceName" IANInstanceRootDeviceName
<|> match "sourceDestCheck" IANInstanceSourceDestCheck
<|> match "sriovNetSupport" IANInstanceSriovNetSupport
<|> match "userData" IANInstanceUserData
instance ToText InstanceAttributeName where
toText = \case
IANInstanceBlockDeviceMapping -> "blockDeviceMapping"
IANInstanceDisableApiTermination -> "disableApiTermination"
IANInstanceEbsOptimized -> "ebsOptimized"
IANInstanceGroupSet -> "groupSet"
IANInstanceInstanceInitiatedShutdownBehavior -> "instanceInitiatedShutdownBehavior"
IANInstanceInstanceType -> "instanceType"
IANInstanceKernel -> "kernel"
IANInstanceProductCodes -> "productCodes"
IANInstanceRamdisk -> "ramdisk"
IANInstanceRootDeviceName -> "rootDeviceName"
IANInstanceSourceDestCheck -> "sourceDestCheck"
IANInstanceSriovNetSupport -> "sriovNetSupport"
IANInstanceUserData -> "userData"
instance FromXML InstanceAttributeName where
parseXML = parseXMLText "InstanceAttributeName"
instance ToQuery InstanceAttributeName where
toQuery = toQuery . toText
data IpPermission = IpPermission
{ _ipFromPort :: Int
, _ipIpProtocol :: Text
, _ipIpRanges :: List "item" IpRange
, _ipToPort :: Int
, _ipUserIdGroupPairs :: List "item" UserIdGroupPair
} deriving (Eq, Show)
ipPermission :: Text
-> Int
-> Int
-> IpPermission
ipPermission p1 p2 p3 = IpPermission
{ _ipIpProtocol = p1
, _ipFromPort = p2
, _ipToPort = p3
, _ipUserIdGroupPairs = mempty
, _ipIpRanges = mempty
}
ipFromPort :: Lens' IpPermission Int
ipFromPort = lens _ipFromPort (\s a -> s { _ipFromPort = a })
ipIpProtocol :: Lens' IpPermission Text
ipIpProtocol = lens _ipIpProtocol (\s a -> s { _ipIpProtocol = a })
ipIpRanges :: Lens' IpPermission [IpRange]
ipIpRanges = lens _ipIpRanges (\s a -> s { _ipIpRanges = a }) . _List
ipToPort :: Lens' IpPermission Int
ipToPort = lens _ipToPort (\s a -> s { _ipToPort = a })
ipUserIdGroupPairs :: Lens' IpPermission [UserIdGroupPair]
ipUserIdGroupPairs =
lens _ipUserIdGroupPairs (\s a -> s { _ipUserIdGroupPairs = a })
. _List
instance FromXML IpPermission where
parseXML x = IpPermission
<$> x .@ "fromPort"
<*> x .@ "ipProtocol"
<*> x .@ "ipRanges"
<*> x .@ "toPort"
<*> x .@ "groups"
instance ToQuery IpPermission where
toQuery IpPermission{..} = mconcat
[ "fromPort" =? _ipFromPort
, "ipProtocol" =? _ipIpProtocol
, "ipRanges" =? _ipIpRanges
, "toPort" =? _ipToPort
, "groups" =? _ipUserIdGroupPairs
]
data ConversionTaskState
= CTSActive
| CTSCancelled
| CTSCancelling
| CTSCompleted
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable ConversionTaskState
instance FromText ConversionTaskState where
parser = match "active" CTSActive
<|> match "cancelled" CTSCancelled
<|> match "cancelling" CTSCancelling
<|> match "completed" CTSCompleted
instance ToText ConversionTaskState where
toText = \case
CTSActive -> "active"
CTSCancelled -> "cancelled"
CTSCancelling -> "cancelling"
CTSCompleted -> "completed"
instance FromXML ConversionTaskState where
parseXML = parseXMLText "ConversionTaskState"
instance ToQuery ConversionTaskState where
toQuery = toQuery . toText
data DiskImage = DiskImage
{ _diDescription :: Maybe Text
, _diImage :: Maybe DiskImageDetail
, _diVolume :: Maybe VolumeDetail
} deriving (Eq, Show)
diskImage :: DiskImage
diskImage = DiskImage
{ _diImage = Nothing
, _diDescription = Nothing
, _diVolume = Nothing
}
diDescription :: Lens' DiskImage (Maybe Text)
diDescription = lens _diDescription (\s a -> s { _diDescription = a })
diImage :: Lens' DiskImage (Maybe DiskImageDetail)
diImage = lens _diImage (\s a -> s { _diImage = a })
diVolume :: Lens' DiskImage (Maybe VolumeDetail)
diVolume = lens _diVolume (\s a -> s { _diVolume = a })
instance FromXML DiskImage where
parseXML x = DiskImage
<$> x .@? "Description"
<*> x .@? "Image"
<*> x .@? "Volume"
instance ToQuery DiskImage where
toQuery DiskImage{..} = mconcat
[ "Description" =? _diDescription
, "Image" =? _diImage
, "Volume" =? _diVolume
]
data Tenancy
= Dedicated
| Default'
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable Tenancy
instance FromText Tenancy where
parser = match "dedicated" Dedicated
<|> match "default" Default'
instance ToText Tenancy where
toText = \case
Dedicated -> "dedicated"
Default' -> "default"
instance FromXML Tenancy where
parseXML = parseXMLText "Tenancy"
instance ToQuery Tenancy where
toQuery = toQuery . toText
data VpcPeeringConnectionStateReason = VpcPeeringConnectionStateReason
{ _vpcsrCode :: Maybe Text
, _vpcsrMessage :: Maybe Text
} deriving (Eq, Ord, Show)
vpcPeeringConnectionStateReason :: VpcPeeringConnectionStateReason
vpcPeeringConnectionStateReason = VpcPeeringConnectionStateReason
{ _vpcsrCode = Nothing
, _vpcsrMessage = Nothing
}
vpcsrCode :: Lens' VpcPeeringConnectionStateReason (Maybe Text)
vpcsrCode = lens _vpcsrCode (\s a -> s { _vpcsrCode = a })
vpcsrMessage :: Lens' VpcPeeringConnectionStateReason (Maybe Text)
vpcsrMessage = lens _vpcsrMessage (\s a -> s { _vpcsrMessage = a })
instance FromXML VpcPeeringConnectionStateReason where
parseXML x = VpcPeeringConnectionStateReason
<$> x .@? "code"
<*> x .@? "message"
instance ToQuery VpcPeeringConnectionStateReason where
toQuery VpcPeeringConnectionStateReason{..} = mconcat
[ "code" =? _vpcsrCode
, "message" =? _vpcsrMessage
]
data IamInstanceProfileSpecification = IamInstanceProfileSpecification
{ _iipsArn :: Maybe Text
, _iipsName :: Maybe Text
} deriving (Eq, Ord, Show)
iamInstanceProfileSpecification :: IamInstanceProfileSpecification
iamInstanceProfileSpecification = IamInstanceProfileSpecification
{ _iipsArn = Nothing
, _iipsName = Nothing
}
iipsArn :: Lens' IamInstanceProfileSpecification (Maybe Text)
iipsArn = lens _iipsArn (\s a -> s { _iipsArn = a })
iipsName :: Lens' IamInstanceProfileSpecification (Maybe Text)
iipsName = lens _iipsName (\s a -> s { _iipsName = a })
instance FromXML IamInstanceProfileSpecification where
parseXML x = IamInstanceProfileSpecification
<$> x .@? "arn"
<*> x .@? "name"
instance ToQuery IamInstanceProfileSpecification where
toQuery IamInstanceProfileSpecification{..} = mconcat
[ "arn" =? _iipsArn
, "name" =? _iipsName
]
data ImportVolumeTaskDetails = ImportVolumeTaskDetails
{ _ivtdAvailabilityZone :: Text
, _ivtdBytesConverted :: Integer
, _ivtdDescription :: Maybe Text
, _ivtdImage :: DiskImageDescription
, _ivtdVolume :: DiskImageVolumeDescription
} deriving (Eq, Show)
importVolumeTaskDetails :: Integer
-> Text
-> DiskImageDescription
-> DiskImageVolumeDescription
-> ImportVolumeTaskDetails
importVolumeTaskDetails p1 p2 p3 p4 = ImportVolumeTaskDetails
{ _ivtdBytesConverted = p1
, _ivtdAvailabilityZone = p2
, _ivtdImage = p3
, _ivtdVolume = p4
, _ivtdDescription = Nothing
}
ivtdAvailabilityZone :: Lens' ImportVolumeTaskDetails Text
ivtdAvailabilityZone =
lens _ivtdAvailabilityZone (\s a -> s { _ivtdAvailabilityZone = a })
ivtdBytesConverted :: Lens' ImportVolumeTaskDetails Integer
ivtdBytesConverted =
lens _ivtdBytesConverted (\s a -> s { _ivtdBytesConverted = a })
ivtdDescription :: Lens' ImportVolumeTaskDetails (Maybe Text)
ivtdDescription = lens _ivtdDescription (\s a -> s { _ivtdDescription = a })
ivtdImage :: Lens' ImportVolumeTaskDetails DiskImageDescription
ivtdImage = lens _ivtdImage (\s a -> s { _ivtdImage = a })
ivtdVolume :: Lens' ImportVolumeTaskDetails DiskImageVolumeDescription
ivtdVolume = lens _ivtdVolume (\s a -> s { _ivtdVolume = a })
instance FromXML ImportVolumeTaskDetails where
parseXML x = ImportVolumeTaskDetails
<$> x .@ "availabilityZone"
<*> x .@ "bytesConverted"
<*> x .@? "description"
<*> x .@ "image"
<*> x .@ "volume"
instance ToQuery ImportVolumeTaskDetails where
toQuery ImportVolumeTaskDetails{..} = mconcat
[ "availabilityZone" =? _ivtdAvailabilityZone
, "bytesConverted" =? _ivtdBytesConverted
, "description" =? _ivtdDescription
, "image" =? _ivtdImage
, "volume" =? _ivtdVolume
]
data PlacementStrategy
= Cluster
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable PlacementStrategy
instance FromText PlacementStrategy where
parser = match "cluster" Cluster
instance ToText PlacementStrategy where
toText Cluster = "cluster"
instance FromXML PlacementStrategy where
parseXML = parseXMLText "PlacementStrategy"
instance ToQuery PlacementStrategy where
toQuery = toQuery . toText
data InstanceNetworkInterface = InstanceNetworkInterface
{ _iniAssociation :: Maybe InstanceNetworkInterfaceAssociation
, _iniAttachment :: Maybe InstanceNetworkInterfaceAttachment
, _iniDescription :: Maybe Text
, _iniGroups :: List "item" GroupIdentifier
, _iniMacAddress :: Maybe Text
, _iniNetworkInterfaceId :: Maybe Text
, _iniOwnerId :: Maybe Text
, _iniPrivateDnsName :: Maybe Text
, _iniPrivateIpAddress :: Maybe Text
, _iniPrivateIpAddresses :: List "item" InstancePrivateIpAddress
, _iniSourceDestCheck :: Maybe Bool
, _iniStatus :: Maybe Text
, _iniSubnetId :: Maybe Text
, _iniVpcId :: Maybe Text
} deriving (Eq, Show)
instanceNetworkInterface :: InstanceNetworkInterface
instanceNetworkInterface = InstanceNetworkInterface
{ _iniNetworkInterfaceId = Nothing
, _iniSubnetId = Nothing
, _iniVpcId = Nothing
, _iniDescription = Nothing
, _iniOwnerId = Nothing
, _iniStatus = Nothing
, _iniMacAddress = Nothing
, _iniPrivateIpAddress = Nothing
, _iniPrivateDnsName = Nothing
, _iniSourceDestCheck = Nothing
, _iniGroups = mempty
, _iniAttachment = Nothing
, _iniAssociation = Nothing
, _iniPrivateIpAddresses = mempty
}
iniAssociation :: Lens' InstanceNetworkInterface (Maybe InstanceNetworkInterfaceAssociation)
iniAssociation = lens _iniAssociation (\s a -> s { _iniAssociation = a })
iniAttachment :: Lens' InstanceNetworkInterface (Maybe InstanceNetworkInterfaceAttachment)
iniAttachment = lens _iniAttachment (\s a -> s { _iniAttachment = a })
iniDescription :: Lens' InstanceNetworkInterface (Maybe Text)
iniDescription = lens _iniDescription (\s a -> s { _iniDescription = a })
iniGroups :: Lens' InstanceNetworkInterface [GroupIdentifier]
iniGroups = lens _iniGroups (\s a -> s { _iniGroups = a }) . _List
iniMacAddress :: Lens' InstanceNetworkInterface (Maybe Text)
iniMacAddress = lens _iniMacAddress (\s a -> s { _iniMacAddress = a })
iniNetworkInterfaceId :: Lens' InstanceNetworkInterface (Maybe Text)
iniNetworkInterfaceId =
lens _iniNetworkInterfaceId (\s a -> s { _iniNetworkInterfaceId = a })
iniOwnerId :: Lens' InstanceNetworkInterface (Maybe Text)
iniOwnerId = lens _iniOwnerId (\s a -> s { _iniOwnerId = a })
iniPrivateDnsName :: Lens' InstanceNetworkInterface (Maybe Text)
iniPrivateDnsName =
lens _iniPrivateDnsName (\s a -> s { _iniPrivateDnsName = a })
iniPrivateIpAddress :: Lens' InstanceNetworkInterface (Maybe Text)
iniPrivateIpAddress =
lens _iniPrivateIpAddress (\s a -> s { _iniPrivateIpAddress = a })
iniPrivateIpAddresses :: Lens' InstanceNetworkInterface [InstancePrivateIpAddress]
iniPrivateIpAddresses =
lens _iniPrivateIpAddresses (\s a -> s { _iniPrivateIpAddresses = a })
. _List
iniSourceDestCheck :: Lens' InstanceNetworkInterface (Maybe Bool)
iniSourceDestCheck =
lens _iniSourceDestCheck (\s a -> s { _iniSourceDestCheck = a })
iniStatus :: Lens' InstanceNetworkInterface (Maybe Text)
iniStatus = lens _iniStatus (\s a -> s { _iniStatus = a })
iniSubnetId :: Lens' InstanceNetworkInterface (Maybe Text)
iniSubnetId = lens _iniSubnetId (\s a -> s { _iniSubnetId = a })
iniVpcId :: Lens' InstanceNetworkInterface (Maybe Text)
iniVpcId = lens _iniVpcId (\s a -> s { _iniVpcId = a })
instance FromXML InstanceNetworkInterface where
parseXML x = InstanceNetworkInterface
<$> x .@? "association"
<*> x .@? "attachment"
<*> x .@? "description"
<*> x .@ "groupSet"
<*> x .@? "macAddress"
<*> x .@? "networkInterfaceId"
<*> x .@? "ownerId"
<*> x .@? "privateDnsName"
<*> x .@? "privateIpAddress"
<*> x .@ "privateIpAddressesSet"
<*> x .@? "sourceDestCheck"
<*> x .@? "status"
<*> x .@? "subnetId"
<*> x .@? "vpcId"
instance ToQuery InstanceNetworkInterface where
toQuery InstanceNetworkInterface{..} = mconcat
[ "association" =? _iniAssociation
, "attachment" =? _iniAttachment
, "description" =? _iniDescription
, "groupSet" =? _iniGroups
, "macAddress" =? _iniMacAddress
, "networkInterfaceId" =? _iniNetworkInterfaceId
, "ownerId" =? _iniOwnerId
, "privateDnsName" =? _iniPrivateDnsName
, "privateIpAddress" =? _iniPrivateIpAddress
, "privateIpAddressesSet" =? _iniPrivateIpAddresses
, "sourceDestCheck" =? _iniSourceDestCheck
, "status" =? _iniStatus
, "subnetId" =? _iniSubnetId
, "vpcId" =? _iniVpcId
]
data VolumeStatusAction = VolumeStatusAction
{ _vsaCode :: Maybe Text
, _vsaDescription :: Maybe Text
, _vsaEventId :: Maybe Text
, _vsaEventType :: Maybe Text
} deriving (Eq, Ord, Show)
volumeStatusAction :: VolumeStatusAction
volumeStatusAction = VolumeStatusAction
{ _vsaCode = Nothing
, _vsaDescription = Nothing
, _vsaEventType = Nothing
, _vsaEventId = Nothing
}
vsaCode :: Lens' VolumeStatusAction (Maybe Text)
vsaCode = lens _vsaCode (\s a -> s { _vsaCode = a })
vsaDescription :: Lens' VolumeStatusAction (Maybe Text)
vsaDescription = lens _vsaDescription (\s a -> s { _vsaDescription = a })
vsaEventId :: Lens' VolumeStatusAction (Maybe Text)
vsaEventId = lens _vsaEventId (\s a -> s { _vsaEventId = a })
vsaEventType :: Lens' VolumeStatusAction (Maybe Text)
vsaEventType = lens _vsaEventType (\s a -> s { _vsaEventType = a })
instance FromXML VolumeStatusAction where
parseXML x = VolumeStatusAction
<$> x .@? "code"
<*> x .@? "description"
<*> x .@? "eventId"
<*> x .@? "eventType"
instance ToQuery VolumeStatusAction where
toQuery VolumeStatusAction{..} = mconcat
[ "code" =? _vsaCode
, "description" =? _vsaDescription
, "eventId" =? _vsaEventId
, "eventType" =? _vsaEventType
]
data VpcPeeringConnectionVpcInfo = VpcPeeringConnectionVpcInfo
{ _vpcviCidrBlock :: Maybe Text
, _vpcviOwnerId :: Maybe Text
, _vpcviVpcId :: Maybe Text
} deriving (Eq, Ord, Show)
vpcPeeringConnectionVpcInfo :: VpcPeeringConnectionVpcInfo
vpcPeeringConnectionVpcInfo = VpcPeeringConnectionVpcInfo
{ _vpcviCidrBlock = Nothing
, _vpcviOwnerId = Nothing
, _vpcviVpcId = Nothing
}
vpcviCidrBlock :: Lens' VpcPeeringConnectionVpcInfo (Maybe Text)
vpcviCidrBlock = lens _vpcviCidrBlock (\s a -> s { _vpcviCidrBlock = a })
vpcviOwnerId :: Lens' VpcPeeringConnectionVpcInfo (Maybe Text)
vpcviOwnerId = lens _vpcviOwnerId (\s a -> s { _vpcviOwnerId = a })
vpcviVpcId :: Lens' VpcPeeringConnectionVpcInfo (Maybe Text)
vpcviVpcId = lens _vpcviVpcId (\s a -> s { _vpcviVpcId = a })
instance FromXML VpcPeeringConnectionVpcInfo where
parseXML x = VpcPeeringConnectionVpcInfo
<$> x .@? "cidrBlock"
<*> x .@? "ownerId"
<*> x .@? "vpcId"
instance ToQuery VpcPeeringConnectionVpcInfo where
toQuery VpcPeeringConnectionVpcInfo{..} = mconcat
[ "cidrBlock" =? _vpcviCidrBlock
, "ownerId" =? _vpcviOwnerId
, "vpcId" =? _vpcviVpcId
]
data ReservedInstanceLimitPrice = ReservedInstanceLimitPrice
{ _rilpAmount :: Maybe Double
, _rilpCurrencyCode :: Maybe Text
} deriving (Eq, Ord, Show)
reservedInstanceLimitPrice :: ReservedInstanceLimitPrice
reservedInstanceLimitPrice = ReservedInstanceLimitPrice
{ _rilpAmount = Nothing
, _rilpCurrencyCode = Nothing
}
rilpAmount :: Lens' ReservedInstanceLimitPrice (Maybe Double)
rilpAmount = lens _rilpAmount (\s a -> s { _rilpAmount = a })
rilpCurrencyCode :: Lens' ReservedInstanceLimitPrice (Maybe Text)
rilpCurrencyCode = lens _rilpCurrencyCode (\s a -> s { _rilpCurrencyCode = a })
instance FromXML ReservedInstanceLimitPrice where
parseXML x = ReservedInstanceLimitPrice
<$> x .@? "amount"
<*> x .@? "currencyCode"
instance ToQuery ReservedInstanceLimitPrice where
toQuery ReservedInstanceLimitPrice{..} = mconcat
[ "amount" =? _rilpAmount
, "currencyCode" =? _rilpCurrencyCode
]
data Vpc = Vpc
{ _vpcCidrBlock :: Maybe Text
, _vpcDhcpOptionsId :: Maybe Text
, _vpcInstanceTenancy :: Maybe Text
, _vpcIsDefault :: Maybe Bool
, _vpcState :: Maybe Text
, _vpcTags :: List "item" Tag
, _vpcVpcId :: Maybe Text
} deriving (Eq, Show)
vpc :: Vpc
vpc = Vpc
{ _vpcVpcId = Nothing
, _vpcState = Nothing
, _vpcCidrBlock = Nothing
, _vpcDhcpOptionsId = Nothing
, _vpcTags = mempty
, _vpcInstanceTenancy = Nothing
, _vpcIsDefault = Nothing
}
vpcCidrBlock :: Lens' Vpc (Maybe Text)
vpcCidrBlock = lens _vpcCidrBlock (\s a -> s { _vpcCidrBlock = a })
vpcDhcpOptionsId :: Lens' Vpc (Maybe Text)
vpcDhcpOptionsId = lens _vpcDhcpOptionsId (\s a -> s { _vpcDhcpOptionsId = a })
vpcInstanceTenancy :: Lens' Vpc (Maybe Text)
vpcInstanceTenancy =
lens _vpcInstanceTenancy (\s a -> s { _vpcInstanceTenancy = a })
vpcIsDefault :: Lens' Vpc (Maybe Bool)
vpcIsDefault = lens _vpcIsDefault (\s a -> s { _vpcIsDefault = a })
vpcState :: Lens' Vpc (Maybe Text)
vpcState = lens _vpcState (\s a -> s { _vpcState = a })
vpcTags :: Lens' Vpc [Tag]
vpcTags = lens _vpcTags (\s a -> s { _vpcTags = a }) . _List
vpcVpcId :: Lens' Vpc (Maybe Text)
vpcVpcId = lens _vpcVpcId (\s a -> s { _vpcVpcId = a })
instance FromXML Vpc where
parseXML x = Vpc
<$> x .@? "cidrBlock"
<*> x .@? "dhcpOptionsId"
<*> x .@? "instanceTenancy"
<*> x .@? "isDefault"
<*> x .@? "state"
<*> x .@ "tagSet"
<*> x .@? "vpcId"
instance ToQuery Vpc where
toQuery Vpc{..} = mconcat
[ "cidrBlock" =? _vpcCidrBlock
, "dhcpOptionsId" =? _vpcDhcpOptionsId
, "instanceTenancy" =? _vpcInstanceTenancy
, "isDefault" =? _vpcIsDefault
, "state" =? _vpcState
, "tagSet" =? _vpcTags
, "vpcId" =? _vpcVpcId
]
data InstanceStatus = InstanceStatus
{ _isAvailabilityZone :: Maybe Text
, _isEvents :: List "item" InstanceStatusEvent
, _isInstanceId :: Maybe Text
, _isInstanceState :: Maybe InstanceState
, _isInstanceStatus :: Maybe InstanceStatusSummary
, _isSystemStatus :: Maybe InstanceStatusSummary
} deriving (Eq, Show)
instanceStatus :: InstanceStatus
instanceStatus = InstanceStatus
{ _isInstanceId = Nothing
, _isAvailabilityZone = Nothing
, _isEvents = mempty
, _isInstanceState = Nothing
, _isSystemStatus = Nothing
, _isInstanceStatus = Nothing
}
isAvailabilityZone :: Lens' InstanceStatus (Maybe Text)
isAvailabilityZone =
lens _isAvailabilityZone (\s a -> s { _isAvailabilityZone = a })
isEvents :: Lens' InstanceStatus [InstanceStatusEvent]
isEvents = lens _isEvents (\s a -> s { _isEvents = a }) . _List
isInstanceId :: Lens' InstanceStatus (Maybe Text)
isInstanceId = lens _isInstanceId (\s a -> s { _isInstanceId = a })
isInstanceState :: Lens' InstanceStatus (Maybe InstanceState)
isInstanceState = lens _isInstanceState (\s a -> s { _isInstanceState = a })
isInstanceStatus :: Lens' InstanceStatus (Maybe InstanceStatusSummary)
isInstanceStatus = lens _isInstanceStatus (\s a -> s { _isInstanceStatus = a })
isSystemStatus :: Lens' InstanceStatus (Maybe InstanceStatusSummary)
isSystemStatus = lens _isSystemStatus (\s a -> s { _isSystemStatus = a })
instance FromXML InstanceStatus where
parseXML x = InstanceStatus
<$> x .@? "availabilityZone"
<*> x .@ "eventsSet"
<*> x .@? "instanceId"
<*> x .@? "instanceState"
<*> x .@? "instanceStatus"
<*> x .@? "systemStatus"
instance ToQuery InstanceStatus where
toQuery InstanceStatus{..} = mconcat
[ "availabilityZone" =? _isAvailabilityZone
, "eventsSet" =? _isEvents
, "instanceId" =? _isInstanceId
, "instanceState" =? _isInstanceState
, "instanceStatus" =? _isInstanceStatus
, "systemStatus" =? _isSystemStatus
]
data ArchitectureValues
= I386
| X8664
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable ArchitectureValues
instance FromText ArchitectureValues where
parser = match "i386" I386
<|> match "x86_64" X8664
instance ToText ArchitectureValues where
toText = \case
I386 -> "i386"
X8664 -> "x86_64"
instance FromXML ArchitectureValues where
parseXML = parseXMLText "ArchitectureValues"
instance ToQuery ArchitectureValues where
toQuery = toQuery . toText
data ReportInstanceReasonCodes
= InstanceStuckInState
| NotAcceptingCredentials
| Other
| PasswordNotAvailable
| PerformanceEbsVolume
| PerformanceInstanceStore
| PerformanceNetwork
| PerformanceOther
| Unresponsive
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable ReportInstanceReasonCodes
instance FromText ReportInstanceReasonCodes where
parser = match "instance-stuck-in-state" InstanceStuckInState
<|> match "not-accepting-credentials" NotAcceptingCredentials
<|> match "other" Other
<|> match "password-not-available" PasswordNotAvailable
<|> match "performance-ebs-volume" PerformanceEbsVolume
<|> match "performance-instance-store" PerformanceInstanceStore
<|> match "performance-network" PerformanceNetwork
<|> match "performance-other" PerformanceOther
<|> match "unresponsive" Unresponsive
instance ToText ReportInstanceReasonCodes where
toText = \case
InstanceStuckInState -> "instance-stuck-in-state"
NotAcceptingCredentials -> "not-accepting-credentials"
Other -> "other"
PasswordNotAvailable -> "password-not-available"
PerformanceEbsVolume -> "performance-ebs-volume"
PerformanceInstanceStore -> "performance-instance-store"
PerformanceNetwork -> "performance-network"
PerformanceOther -> "performance-other"
Unresponsive -> "unresponsive"
instance FromXML ReportInstanceReasonCodes where
parseXML = parseXMLText "ReportInstanceReasonCodes"
instance ToQuery ReportInstanceReasonCodes where
toQuery = toQuery . toText
data EbsBlockDevice = EbsBlockDevice
{ _ebdDeleteOnTermination :: Maybe Bool
, _ebdEncrypted :: Maybe Bool
, _ebdIops :: Maybe Int
, _ebdSnapshotId :: Maybe Text
, _ebdVolumeSize :: Maybe Int
, _ebdVolumeType :: Maybe Text
} deriving (Eq, Ord, Show)
ebsBlockDevice :: EbsBlockDevice
ebsBlockDevice = EbsBlockDevice
{ _ebdSnapshotId = Nothing
, _ebdVolumeSize = Nothing
, _ebdDeleteOnTermination = Nothing
, _ebdVolumeType = Nothing
, _ebdIops = Nothing
, _ebdEncrypted = Nothing
}
ebdDeleteOnTermination :: Lens' EbsBlockDevice (Maybe Bool)
ebdDeleteOnTermination =
lens _ebdDeleteOnTermination (\s a -> s { _ebdDeleteOnTermination = a })
ebdEncrypted :: Lens' EbsBlockDevice (Maybe Bool)
ebdEncrypted = lens _ebdEncrypted (\s a -> s { _ebdEncrypted = a })
ebdIops :: Lens' EbsBlockDevice (Maybe Int)
ebdIops = lens _ebdIops (\s a -> s { _ebdIops = a })
ebdSnapshotId :: Lens' EbsBlockDevice (Maybe Text)
ebdSnapshotId = lens _ebdSnapshotId (\s a -> s { _ebdSnapshotId = a })
ebdVolumeSize :: Lens' EbsBlockDevice (Maybe Int)
ebdVolumeSize = lens _ebdVolumeSize (\s a -> s { _ebdVolumeSize = a })
ebdVolumeType :: Lens' EbsBlockDevice (Maybe Text)
ebdVolumeType = lens _ebdVolumeType (\s a -> s { _ebdVolumeType = a })
instance FromXML EbsBlockDevice where
parseXML x = EbsBlockDevice
<$> x .@? "deleteOnTermination"
<*> x .@? "encrypted"
<*> x .@? "iops"
<*> x .@? "snapshotId"
<*> x .@? "volumeSize"
<*> x .@? "volumeType"
instance ToQuery EbsBlockDevice where
toQuery EbsBlockDevice{..} = mconcat
[ "deleteOnTermination" =? _ebdDeleteOnTermination
, "encrypted" =? _ebdEncrypted
, "iops" =? _ebdIops
, "snapshotId" =? _ebdSnapshotId
, "volumeSize" =? _ebdVolumeSize
, "volumeType" =? _ebdVolumeType
]
data AccountAttribute = AccountAttribute
{ _aaAttributeName :: Maybe Text
, _aaAttributeValues :: List "item" AccountAttributeValue
} deriving (Eq, Show)
accountAttribute :: AccountAttribute
accountAttribute = AccountAttribute
{ _aaAttributeName = Nothing
, _aaAttributeValues = mempty
}
aaAttributeName :: Lens' AccountAttribute (Maybe Text)
aaAttributeName = lens _aaAttributeName (\s a -> s { _aaAttributeName = a })
aaAttributeValues :: Lens' AccountAttribute [AccountAttributeValue]
aaAttributeValues =
lens _aaAttributeValues (\s a -> s { _aaAttributeValues = a })
. _List
instance FromXML AccountAttribute where
parseXML x = AccountAttribute
<$> x .@? "attributeName"
<*> x .@ "attributeValueSet"
instance ToQuery AccountAttribute where
toQuery AccountAttribute{..} = mconcat
[ "attributeName" =? _aaAttributeName
, "attributeValueSet" =? _aaAttributeValues
]
data PriceSchedule = PriceSchedule
{ _psActive :: Maybe Bool
, _psCurrencyCode :: Maybe Text
, _psPrice :: Maybe Double
, _psTerm :: Maybe Integer
} deriving (Eq, Ord, Show)
priceSchedule :: PriceSchedule
priceSchedule = PriceSchedule
{ _psTerm = Nothing
, _psPrice = Nothing
, _psCurrencyCode = Nothing
, _psActive = Nothing
}
psActive :: Lens' PriceSchedule (Maybe Bool)
psActive = lens _psActive (\s a -> s { _psActive = a })
psCurrencyCode :: Lens' PriceSchedule (Maybe Text)
psCurrencyCode = lens _psCurrencyCode (\s a -> s { _psCurrencyCode = a })
psPrice :: Lens' PriceSchedule (Maybe Double)
psPrice = lens _psPrice (\s a -> s { _psPrice = a })
psTerm :: Lens' PriceSchedule (Maybe Integer)
psTerm = lens _psTerm (\s a -> s { _psTerm = a })
instance FromXML PriceSchedule where
parseXML x = PriceSchedule
<$> x .@? "active"
<*> x .@? "currencyCode"
<*> x .@? "price"
<*> x .@? "term"
instance ToQuery PriceSchedule where
toQuery PriceSchedule{..} = mconcat
[ "active" =? _psActive
, "currencyCode" =? _psCurrencyCode
, "price" =? _psPrice
, "term" =? _psTerm
]
data DeviceType
= Ebs
| InstanceStore
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable DeviceType
instance FromText DeviceType where
parser = match "ebs" Ebs
<|> match "instance-store" InstanceStore
instance ToText DeviceType where
toText = \case
Ebs -> "ebs"
InstanceStore -> "instance-store"
instance FromXML DeviceType where
parseXML = parseXMLText "DeviceType"
instance ToQuery DeviceType where
toQuery = toQuery . toText
data DomainType
= DTStandard
| DTVpc
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable DomainType
instance FromText DomainType where
parser = match "standard" DTStandard
<|> match "vpc" DTVpc
instance ToText DomainType where
toText = \case
DTStandard -> "standard"
DTVpc -> "vpc"
instance FromXML DomainType where
parseXML = parseXMLText "DomainType"
instance ToQuery DomainType where
toQuery = toQuery . toText
data Region = Region
{ _rEndpoint :: Maybe Text
, _rRegionName :: Maybe Text
} deriving (Eq, Ord, Show)
region :: Region
region = Region
{ _rRegionName = Nothing
, _rEndpoint = Nothing
}
rEndpoint :: Lens' Region (Maybe Text)
rEndpoint = lens _rEndpoint (\s a -> s { _rEndpoint = a })
rRegionName :: Lens' Region (Maybe Text)
rRegionName = lens _rRegionName (\s a -> s { _rRegionName = a })
instance FromXML Region where
parseXML x = Region
<$> x .@? "regionEndpoint"
<*> x .@? "regionName"
instance ToQuery Region where
toQuery Region{..} = mconcat
[ "regionEndpoint" =? _rEndpoint
, "regionName" =? _rRegionName
]
newtype PropagatingVgw = PropagatingVgw
{ _pvGatewayId :: Maybe Text
} deriving (Eq, Ord, Show, Monoid)
propagatingVgw :: PropagatingVgw
propagatingVgw = PropagatingVgw
{ _pvGatewayId = Nothing
}
pvGatewayId :: Lens' PropagatingVgw (Maybe Text)
pvGatewayId = lens _pvGatewayId (\s a -> s { _pvGatewayId = a })
instance FromXML PropagatingVgw where
parseXML x = PropagatingVgw
<$> x .@? "gatewayId"
instance ToQuery PropagatingVgw where
toQuery PropagatingVgw{..} = mconcat
[ "gatewayId" =? _pvGatewayId
]
data OfferingTypeValues
= HeavyUtilization
| LightUtilization
| MediumUtilization
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable OfferingTypeValues
instance FromText OfferingTypeValues where
parser = match "Heavy Utilization" HeavyUtilization
<|> match "Light Utilization" LightUtilization
<|> match "Medium Utilization" MediumUtilization
instance ToText OfferingTypeValues where
toText = \case
HeavyUtilization -> "Heavy Utilization"
LightUtilization -> "Light Utilization"
MediumUtilization -> "Medium Utilization"
instance FromXML OfferingTypeValues where
parseXML = parseXMLText "OfferingTypeValues"
instance ToQuery OfferingTypeValues where
toQuery = toQuery . toText
data VpnGateway = VpnGateway
{ _vgAvailabilityZone :: Maybe Text
, _vgState :: Maybe Text
, _vgTags :: List "item" Tag
, _vgType :: Maybe Text
, _vgVpcAttachments :: List "item" VpcAttachment
, _vgVpnGatewayId :: Maybe Text
} deriving (Eq, Show)
vpnGateway :: VpnGateway
vpnGateway = VpnGateway
{ _vgVpnGatewayId = Nothing
, _vgState = Nothing
, _vgType = Nothing
, _vgAvailabilityZone = Nothing
, _vgVpcAttachments = mempty
, _vgTags = mempty
}
vgAvailabilityZone :: Lens' VpnGateway (Maybe Text)
vgAvailabilityZone =
lens _vgAvailabilityZone (\s a -> s { _vgAvailabilityZone = a })
vgState :: Lens' VpnGateway (Maybe Text)
vgState = lens _vgState (\s a -> s { _vgState = a })
vgTags :: Lens' VpnGateway [Tag]
vgTags = lens _vgTags (\s a -> s { _vgTags = a }) . _List
vgType :: Lens' VpnGateway (Maybe Text)
vgType = lens _vgType (\s a -> s { _vgType = a })
vgVpcAttachments :: Lens' VpnGateway [VpcAttachment]
vgVpcAttachments = lens _vgVpcAttachments (\s a -> s { _vgVpcAttachments = a }) . _List
vgVpnGatewayId :: Lens' VpnGateway (Maybe Text)
vgVpnGatewayId = lens _vgVpnGatewayId (\s a -> s { _vgVpnGatewayId = a })
instance FromXML VpnGateway where
parseXML x = VpnGateway
<$> x .@? "availabilityZone"
<*> x .@? "state"
<*> x .@ "tagSet"
<*> x .@? "type"
<*> x .@ "attachments"
<*> x .@? "vpnGatewayId"
instance ToQuery VpnGateway where
toQuery VpnGateway{..} = mconcat
[ "availabilityZone" =? _vgAvailabilityZone
, "state" =? _vgState
, "tagSet" =? _vgTags
, "type" =? _vgType
, "attachments" =? _vgVpcAttachments
, "vpnGatewayId" =? _vgVpnGatewayId
]
data Filter = Filter
{ _fName :: Text
, _fValues :: List "item" Text
} deriving (Eq, Ord, Show)
filter' :: Text
-> Filter
filter' p1 = Filter
{ _fName = p1
, _fValues = mempty
}
fName :: Lens' Filter Text
fName = lens _fName (\s a -> s { _fName = a })
fValues :: Lens' Filter [Text]
fValues = lens _fValues (\s a -> s { _fValues = a }) . _List
instance FromXML Filter where
parseXML x = Filter
<$> x .@ "Name"
<*> x .@ "Value"
instance ToQuery Filter where
toQuery Filter{..} = mconcat
[ "Name" =? _fName
, "Value" =? _fValues
]
data VolumeType
= Gp2
| Io1
| Standard
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable VolumeType
instance FromText VolumeType where
parser = match "gp2" Gp2
<|> match "io1" Io1
<|> match "standard" Standard
instance ToText VolumeType where
toText = \case
Gp2 -> "gp2"
Io1 -> "io1"
Standard -> "standard"
instance FromXML VolumeType where
parseXML = parseXMLText "VolumeType"
instance ToQuery VolumeType where
toQuery = toQuery . toText
data InstanceStateChange = InstanceStateChange
{ _iscCurrentState :: Maybe InstanceState
, _iscInstanceId :: Maybe Text
, _iscPreviousState :: Maybe InstanceState
} deriving (Eq, Show)
instanceStateChange :: InstanceStateChange
instanceStateChange = InstanceStateChange
{ _iscInstanceId = Nothing
, _iscCurrentState = Nothing
, _iscPreviousState = Nothing
}
iscCurrentState :: Lens' InstanceStateChange (Maybe InstanceState)
iscCurrentState = lens _iscCurrentState (\s a -> s { _iscCurrentState = a })
iscInstanceId :: Lens' InstanceStateChange (Maybe Text)
iscInstanceId = lens _iscInstanceId (\s a -> s { _iscInstanceId = a })
iscPreviousState :: Lens' InstanceStateChange (Maybe InstanceState)
iscPreviousState = lens _iscPreviousState (\s a -> s { _iscPreviousState = a })
instance FromXML InstanceStateChange where
parseXML x = InstanceStateChange
<$> x .@? "currentState"
<*> x .@? "instanceId"
<*> x .@? "previousState"
instance ToQuery InstanceStateChange where
toQuery InstanceStateChange{..} = mconcat
[ "currentState" =? _iscCurrentState
, "instanceId" =? _iscInstanceId
, "previousState" =? _iscPreviousState
]
data NetworkAcl = NetworkAcl
{ _naAssociations :: List "item" NetworkAclAssociation
, _naEntries :: List "item" NetworkAclEntry
, _naIsDefault :: Maybe Bool
, _naNetworkAclId :: Maybe Text
, _naTags :: List "item" Tag
, _naVpcId :: Maybe Text
} deriving (Eq, Show)
networkAcl :: NetworkAcl
networkAcl = NetworkAcl
{ _naNetworkAclId = Nothing
, _naVpcId = Nothing
, _naIsDefault = Nothing
, _naEntries = mempty
, _naAssociations = mempty
, _naTags = mempty
}
naAssociations :: Lens' NetworkAcl [NetworkAclAssociation]
naAssociations = lens _naAssociations (\s a -> s { _naAssociations = a }) . _List
naEntries :: Lens' NetworkAcl [NetworkAclEntry]
naEntries = lens _naEntries (\s a -> s { _naEntries = a }) . _List
naIsDefault :: Lens' NetworkAcl (Maybe Bool)
naIsDefault = lens _naIsDefault (\s a -> s { _naIsDefault = a })
naNetworkAclId :: Lens' NetworkAcl (Maybe Text)
naNetworkAclId = lens _naNetworkAclId (\s a -> s { _naNetworkAclId = a })
naTags :: Lens' NetworkAcl [Tag]
naTags = lens _naTags (\s a -> s { _naTags = a }) . _List
naVpcId :: Lens' NetworkAcl (Maybe Text)
naVpcId = lens _naVpcId (\s a -> s { _naVpcId = a })
instance FromXML NetworkAcl where
parseXML x = NetworkAcl
<$> x .@ "associationSet"
<*> x .@ "entrySet"
<*> x .@? "default"
<*> x .@? "networkAclId"
<*> x .@ "tagSet"
<*> x .@? "vpcId"
instance ToQuery NetworkAcl where
toQuery NetworkAcl{..} = mconcat
[ "associationSet" =? _naAssociations
, "entrySet" =? _naEntries
, "default" =? _naIsDefault
, "networkAclId" =? _naNetworkAclId
, "tagSet" =? _naTags
, "vpcId" =? _naVpcId
]
data ImageState
= ISAvailable
| ISDeregistered
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable ImageState
instance FromText ImageState where
parser = match "available" ISAvailable
<|> match "deregistered" ISDeregistered
instance ToText ImageState where
toText = \case
ISAvailable -> "available"
ISDeregistered -> "deregistered"
instance FromXML ImageState where
parseXML = parseXMLText "ImageState"
instance ToQuery ImageState where
toQuery = toQuery . toText
data GatewayType
= Ipsec1
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable GatewayType
instance FromText GatewayType where
parser = match "ipsec.1" Ipsec1
instance ToText GatewayType where
toText Ipsec1 = "ipsec.1"
instance FromXML GatewayType where
parseXML = parseXMLText "GatewayType"
instance ToQuery GatewayType where
toQuery = toQuery . toText
data InstanceNetworkInterfaceAttachment = InstanceNetworkInterfaceAttachment
{ _iniaAttachTime :: Maybe RFC822
, _iniaAttachmentId :: Maybe Text
, _iniaDeleteOnTermination :: Maybe Bool
, _iniaDeviceIndex :: Maybe Int
, _iniaStatus :: Maybe Text
} deriving (Eq, Ord, Show)
instanceNetworkInterfaceAttachment :: InstanceNetworkInterfaceAttachment
instanceNetworkInterfaceAttachment = InstanceNetworkInterfaceAttachment
{ _iniaAttachmentId = Nothing
, _iniaDeviceIndex = Nothing
, _iniaStatus = Nothing
, _iniaAttachTime = Nothing
, _iniaDeleteOnTermination = Nothing
}
iniaAttachTime :: Lens' InstanceNetworkInterfaceAttachment (Maybe UTCTime)
iniaAttachTime = lens _iniaAttachTime (\s a -> s { _iniaAttachTime = a }) . mapping _Time
iniaAttachmentId :: Lens' InstanceNetworkInterfaceAttachment (Maybe Text)
iniaAttachmentId = lens _iniaAttachmentId (\s a -> s { _iniaAttachmentId = a })
iniaDeleteOnTermination :: Lens' InstanceNetworkInterfaceAttachment (Maybe Bool)
iniaDeleteOnTermination =
lens _iniaDeleteOnTermination (\s a -> s { _iniaDeleteOnTermination = a })
iniaDeviceIndex :: Lens' InstanceNetworkInterfaceAttachment (Maybe Int)
iniaDeviceIndex = lens _iniaDeviceIndex (\s a -> s { _iniaDeviceIndex = a })
iniaStatus :: Lens' InstanceNetworkInterfaceAttachment (Maybe Text)
iniaStatus = lens _iniaStatus (\s a -> s { _iniaStatus = a })
instance FromXML InstanceNetworkInterfaceAttachment where
parseXML x = InstanceNetworkInterfaceAttachment
<$> x .@? "attachTime"
<*> x .@? "attachmentId"
<*> x .@? "deleteOnTermination"
<*> x .@? "deviceIndex"
<*> x .@? "status"
instance ToQuery InstanceNetworkInterfaceAttachment where
toQuery InstanceNetworkInterfaceAttachment{..} = mconcat
[ "attachTime" =? _iniaAttachTime
, "attachmentId" =? _iniaAttachmentId
, "deleteOnTermination" =? _iniaDeleteOnTermination
, "deviceIndex" =? _iniaDeviceIndex
, "status" =? _iniaStatus
]
newtype AttributeBooleanValue = AttributeBooleanValue
{ _abvValue :: Maybe Bool
} deriving (Eq, Ord, Show)
attributeBooleanValue :: AttributeBooleanValue
attributeBooleanValue = AttributeBooleanValue
{ _abvValue = Nothing
}
abvValue :: Lens' AttributeBooleanValue (Maybe Bool)
abvValue = lens _abvValue (\s a -> s { _abvValue = a })
instance FromXML AttributeBooleanValue where
parseXML x = AttributeBooleanValue
<$> x .@? "value"
instance ToQuery AttributeBooleanValue where
toQuery AttributeBooleanValue{..} = mconcat
[ "value" =? _abvValue
]
data RecurringCharge = RecurringCharge
{ _rcAmount :: Maybe Double
, _rcFrequency :: Maybe Text
} deriving (Eq, Ord, Show)
recurringCharge :: RecurringCharge
recurringCharge = RecurringCharge
{ _rcFrequency = Nothing
, _rcAmount = Nothing
}
rcAmount :: Lens' RecurringCharge (Maybe Double)
rcAmount = lens _rcAmount (\s a -> s { _rcAmount = a })
rcFrequency :: Lens' RecurringCharge (Maybe Text)
rcFrequency = lens _rcFrequency (\s a -> s { _rcFrequency = a })
instance FromXML RecurringCharge where
parseXML x = RecurringCharge
<$> x .@? "amount"
<*> x .@? "frequency"
instance ToQuery RecurringCharge where
toQuery RecurringCharge{..} = mconcat
[ "amount" =? _rcAmount
, "frequency" =? _rcFrequency
]
data NewDhcpConfiguration = NewDhcpConfiguration
{ _ndcKey :: Maybe Text
, _ndcValues :: List "item" Text
} deriving (Eq, Ord, Show)
newDhcpConfiguration :: NewDhcpConfiguration
newDhcpConfiguration = NewDhcpConfiguration
{ _ndcKey = Nothing
, _ndcValues = mempty
}
ndcKey :: Lens' NewDhcpConfiguration (Maybe Text)
ndcKey = lens _ndcKey (\s a -> s { _ndcKey = a })
ndcValues :: Lens' NewDhcpConfiguration [Text]
ndcValues = lens _ndcValues (\s a -> s { _ndcValues = a }) . _List
instance FromXML NewDhcpConfiguration where
parseXML x = NewDhcpConfiguration
<$> x .@? "key"
<*> x .@ "Value"
instance ToQuery NewDhcpConfiguration where
toQuery NewDhcpConfiguration{..} = mconcat
[ "key" =? _ndcKey
, "Value" =? _ndcValues
]
data StateReason = StateReason
{ _srCode :: Maybe Text
, _srMessage :: Maybe Text
} deriving (Eq, Ord, Show)
stateReason :: StateReason
stateReason = StateReason
{ _srCode = Nothing
, _srMessage = Nothing
}
srCode :: Lens' StateReason (Maybe Text)
srCode = lens _srCode (\s a -> s { _srCode = a })
srMessage :: Lens' StateReason (Maybe Text)
srMessage = lens _srMessage (\s a -> s { _srMessage = a })
instance FromXML StateReason where
parseXML x = StateReason
<$> x .@? "code"
<*> x .@? "message"
instance ToQuery StateReason where
toQuery StateReason{..} = mconcat
[ "code" =? _srCode
, "message" =? _srMessage
]
data MonitoringState
= MSDisabled
| MSEnabled
| MSPending
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable MonitoringState
instance FromText MonitoringState where
parser = match "disabled" MSDisabled
<|> match "enabled" MSEnabled
<|> match "pending" MSPending
instance ToText MonitoringState where
toText = \case
MSDisabled -> "disabled"
MSEnabled -> "enabled"
MSPending -> "pending"
instance FromXML MonitoringState where
parseXML = parseXMLText "MonitoringState"
instance ToQuery MonitoringState where
toQuery = toQuery . toText
newtype ReservedInstancesId = ReservedInstancesId
{ _riiReservedInstancesId :: Maybe Text
} deriving (Eq, Ord, Show, Monoid)
reservedInstancesId :: ReservedInstancesId
reservedInstancesId = ReservedInstancesId
{ _riiReservedInstancesId = Nothing
}
riiReservedInstancesId :: Lens' ReservedInstancesId (Maybe Text)
riiReservedInstancesId =
lens _riiReservedInstancesId (\s a -> s { _riiReservedInstancesId = a })
instance FromXML ReservedInstancesId where
parseXML x = ReservedInstancesId
<$> x .@? "reservedInstancesId"
instance ToQuery ReservedInstancesId where
toQuery ReservedInstancesId{..} = mconcat
[ "reservedInstancesId" =? _riiReservedInstancesId
]
data StatusName
= Reachability
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable StatusName
instance FromText StatusName where
parser = match "reachability" Reachability
instance ToText StatusName where
toText Reachability = "reachability"
instance FromXML StatusName where
parseXML = parseXMLText "StatusName"
instance ToQuery StatusName where
toQuery = toQuery . toText
data InternetGateway = InternetGateway
{ _igAttachments :: List "item" InternetGatewayAttachment
, _igInternetGatewayId :: Text
, _igTags :: List "item" Tag
} deriving (Eq, Show)
internetGateway :: Text
-> InternetGateway
internetGateway p1 = InternetGateway
{ _igInternetGatewayId = p1
, _igAttachments = mempty
, _igTags = mempty
}
igAttachments :: Lens' InternetGateway [InternetGatewayAttachment]
igAttachments = lens _igAttachments (\s a -> s { _igAttachments = a }) . _List
igInternetGatewayId :: Lens' InternetGateway Text
igInternetGatewayId =
lens _igInternetGatewayId (\s a -> s { _igInternetGatewayId = a })
igTags :: Lens' InternetGateway [Tag]
igTags = lens _igTags (\s a -> s { _igTags = a }) . _List
instance FromXML InternetGateway where
parseXML x = InternetGateway
<$> x .@ "attachmentSet"
<*> x .@ "internetGatewayId"
<*> x .@ "tagSet"
instance ToQuery InternetGateway where
toQuery InternetGateway{..} = mconcat
[ "attachmentSet" =? _igAttachments
, "internetGatewayId" =? _igInternetGatewayId
, "tagSet" =? _igTags
]
data VolumeStatusName
= IoEnabled
| IoPerformance
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable VolumeStatusName
instance FromText VolumeStatusName where
parser = match "io-enabled" IoEnabled
<|> match "io-performance" IoPerformance
instance ToText VolumeStatusName where
toText = \case
IoEnabled -> "io-enabled"
IoPerformance -> "io-performance"
instance FromXML VolumeStatusName where
parseXML = parseXMLText "VolumeStatusName"
instance ToQuery VolumeStatusName where
toQuery = toQuery . toText
data VolumeAttributeName
= AutoEnableIO
| ProductCodes
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable VolumeAttributeName
instance FromText VolumeAttributeName where
parser = match "autoEnableIO" AutoEnableIO
<|> match "productCodes" ProductCodes
instance ToText VolumeAttributeName where
toText = \case
AutoEnableIO -> "autoEnableIO"
ProductCodes -> "productCodes"
instance FromXML VolumeAttributeName where
parseXML = parseXMLText "VolumeAttributeName"
instance ToQuery VolumeAttributeName where
toQuery = toQuery . toText
data ImportInstanceTaskDetails = ImportInstanceTaskDetails
{ _iitdDescription :: Maybe Text
, _iitdInstanceId :: Maybe Text
, _iitdPlatform :: Maybe Text
, _iitdVolumes :: List "item" ImportInstanceVolumeDetailItem
} deriving (Eq, Show)
importInstanceTaskDetails :: ImportInstanceTaskDetails
importInstanceTaskDetails = ImportInstanceTaskDetails
{ _iitdVolumes = mempty
, _iitdInstanceId = Nothing
, _iitdPlatform = Nothing
, _iitdDescription = Nothing
}
iitdDescription :: Lens' ImportInstanceTaskDetails (Maybe Text)
iitdDescription = lens _iitdDescription (\s a -> s { _iitdDescription = a })
iitdInstanceId :: Lens' ImportInstanceTaskDetails (Maybe Text)
iitdInstanceId = lens _iitdInstanceId (\s a -> s { _iitdInstanceId = a })
iitdPlatform :: Lens' ImportInstanceTaskDetails (Maybe Text)
iitdPlatform = lens _iitdPlatform (\s a -> s { _iitdPlatform = a })
iitdVolumes :: Lens' ImportInstanceTaskDetails [ImportInstanceVolumeDetailItem]
iitdVolumes = lens _iitdVolumes (\s a -> s { _iitdVolumes = a }) . _List
instance FromXML ImportInstanceTaskDetails where
parseXML x = ImportInstanceTaskDetails
<$> x .@? "description"
<*> x .@? "instanceId"
<*> x .@? "platform"
<*> x .@ "volumes"
instance ToQuery ImportInstanceTaskDetails where
toQuery ImportInstanceTaskDetails{..} = mconcat
[ "description" =? _iitdDescription
, "instanceId" =? _iitdInstanceId
, "platform" =? _iitdPlatform
, "volumes" =? _iitdVolumes
]
data PlacementGroup = PlacementGroup
{ _pgGroupName :: Maybe Text
, _pgState :: Maybe Text
, _pgStrategy :: Maybe Text
} deriving (Eq, Ord, Show)
placementGroup :: PlacementGroup
placementGroup = PlacementGroup
{ _pgGroupName = Nothing
, _pgStrategy = Nothing
, _pgState = Nothing
}
pgGroupName :: Lens' PlacementGroup (Maybe Text)
pgGroupName = lens _pgGroupName (\s a -> s { _pgGroupName = a })
pgState :: Lens' PlacementGroup (Maybe Text)
pgState = lens _pgState (\s a -> s { _pgState = a })
pgStrategy :: Lens' PlacementGroup (Maybe Text)
pgStrategy = lens _pgStrategy (\s a -> s { _pgStrategy = a })
instance FromXML PlacementGroup where
parseXML x = PlacementGroup
<$> x .@? "groupName"
<*> x .@? "state"
<*> x .@? "strategy"
instance ToQuery PlacementGroup where
toQuery PlacementGroup{..} = mconcat
[ "groupName" =? _pgGroupName
, "state" =? _pgState
, "strategy" =? _pgStrategy
]
data ProductCode = ProductCode
{ _pcProductCodeId :: Maybe Text
, _pcProductCodeType :: Maybe Text
} deriving (Eq, Ord, Show)
productCode :: ProductCode
productCode = ProductCode
{ _pcProductCodeId = Nothing
, _pcProductCodeType = Nothing
}
pcProductCodeId :: Lens' ProductCode (Maybe Text)
pcProductCodeId = lens _pcProductCodeId (\s a -> s { _pcProductCodeId = a })
pcProductCodeType :: Lens' ProductCode (Maybe Text)
pcProductCodeType =
lens _pcProductCodeType (\s a -> s { _pcProductCodeType = a })
instance FromXML ProductCode where
parseXML x = ProductCode
<$> x .@? "productCode"
<*> x .@? "type"
instance ToQuery ProductCode where
toQuery ProductCode{..} = mconcat
[ "productCode" =? _pcProductCodeId
, "type" =? _pcProductCodeType
]
data ListingStatus
= ListingStatusActive
| ListingStatusCancelled
| ListingStatusClosed
| ListingStatusPending
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable ListingStatus
instance FromText ListingStatus where
parser = match "active" ListingStatusActive
<|> match "cancelled" ListingStatusCancelled
<|> match "closed" ListingStatusClosed
<|> match "pending" ListingStatusPending
instance ToText ListingStatus where
toText = \case
ListingStatusActive -> "active"
ListingStatusCancelled -> "cancelled"
ListingStatusClosed -> "closed"
ListingStatusPending -> "pending"
instance FromXML ListingStatus where
parseXML = parseXMLText "ListingStatus"
instance ToQuery ListingStatus where
toQuery = toQuery . toText
newtype IpRange = IpRange
{ _irCidrIp :: Text
} deriving (Eq, Ord, Show, Monoid, IsString)
ipRange :: Text
-> IpRange
ipRange p1 = IpRange
{ _irCidrIp = p1
}
irCidrIp :: Lens' IpRange Text
irCidrIp = lens _irCidrIp (\s a -> s { _irCidrIp = a })
instance FromXML IpRange where
parseXML x = IpRange
<$> x .@ "cidrIp"
instance ToQuery IpRange where
toQuery IpRange{..} = mconcat
[ "cidrIp" =? _irCidrIp
]
data VolumeStatusInfoStatus
= VSISImpaired
| VSISInsufficientData
| VSISOk
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable VolumeStatusInfoStatus
instance FromText VolumeStatusInfoStatus where
parser = match "impaired" VSISImpaired
<|> match "insufficient-data" VSISInsufficientData
<|> match "ok" VSISOk
instance ToText VolumeStatusInfoStatus where
toText = \case
VSISImpaired -> "impaired"
VSISInsufficientData -> "insufficient-data"
VSISOk -> "ok"
instance FromXML VolumeStatusInfoStatus where
parseXML = parseXMLText "VolumeStatusInfoStatus"
instance ToQuery VolumeStatusInfoStatus where
toQuery = toQuery . toText
newtype AccountAttributeValue = AccountAttributeValue
{ _aavAttributeValue :: Maybe Text
} deriving (Eq, Ord, Show, Monoid)
accountAttributeValue :: AccountAttributeValue
accountAttributeValue = AccountAttributeValue
{ _aavAttributeValue = Nothing
}
aavAttributeValue :: Lens' AccountAttributeValue (Maybe Text)
aavAttributeValue =
lens _aavAttributeValue (\s a -> s { _aavAttributeValue = a })
instance FromXML AccountAttributeValue where
parseXML x = AccountAttributeValue
<$> x .@? "attributeValue"
instance ToQuery AccountAttributeValue where
toQuery AccountAttributeValue{..} = mconcat
[ "attributeValue" =? _aavAttributeValue
]
data RIProductDescription
= RIPDLinuxUNIX
| RIPDLinuxUNIXAmazonVPC
| RIPDWindows
| RIPDWindowsAmazonVPC
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable RIProductDescription
instance FromText RIProductDescription where
parser = match "Linux/UNIX" RIPDLinuxUNIX
<|> match "Linux/UNIX (Amazon VPC)" RIPDLinuxUNIXAmazonVPC
<|> match "Windows" RIPDWindows
<|> match "Windows (Amazon VPC)" RIPDWindowsAmazonVPC
instance ToText RIProductDescription where
toText = \case
RIPDLinuxUNIX -> "Linux/UNIX"
RIPDLinuxUNIXAmazonVPC -> "Linux/UNIX (Amazon VPC)"
RIPDWindows -> "Windows"
RIPDWindowsAmazonVPC -> "Windows (Amazon VPC)"
instance FromXML RIProductDescription where
parseXML = parseXMLText "RIProductDescription"
instance ToQuery RIProductDescription where
toQuery = toQuery . toText
data ReservedInstancesOffering = ReservedInstancesOffering
{ _rioAvailabilityZone :: Maybe Text
, _rioCurrencyCode :: Maybe Text
, _rioDuration :: Maybe Integer
, _rioFixedPrice :: Maybe Double
, _rioInstanceTenancy :: Maybe Text
, _rioInstanceType :: Maybe Text
, _rioMarketplace :: Maybe Bool
, _rioOfferingType :: Maybe Text
, _rioPricingDetails :: List "item" PricingDetail
, _rioProductDescription :: Maybe Text
, _rioRecurringCharges :: List "item" RecurringCharge
, _rioReservedInstancesOfferingId :: Maybe Text
, _rioUsagePrice :: Maybe Double
} deriving (Eq, Show)
reservedInstancesOffering :: ReservedInstancesOffering
reservedInstancesOffering = ReservedInstancesOffering
{ _rioReservedInstancesOfferingId = Nothing
, _rioInstanceType = Nothing
, _rioAvailabilityZone = Nothing
, _rioDuration = Nothing
, _rioUsagePrice = Nothing
, _rioFixedPrice = Nothing
, _rioProductDescription = Nothing
, _rioInstanceTenancy = Nothing
, _rioCurrencyCode = Nothing
, _rioOfferingType = Nothing
, _rioRecurringCharges = mempty
, _rioMarketplace = Nothing
, _rioPricingDetails = mempty
}
rioAvailabilityZone :: Lens' ReservedInstancesOffering (Maybe Text)
rioAvailabilityZone =
lens _rioAvailabilityZone (\s a -> s { _rioAvailabilityZone = a })
rioCurrencyCode :: Lens' ReservedInstancesOffering (Maybe Text)
rioCurrencyCode = lens _rioCurrencyCode (\s a -> s { _rioCurrencyCode = a })
rioDuration :: Lens' ReservedInstancesOffering (Maybe Integer)
rioDuration = lens _rioDuration (\s a -> s { _rioDuration = a })
rioFixedPrice :: Lens' ReservedInstancesOffering (Maybe Double)
rioFixedPrice = lens _rioFixedPrice (\s a -> s { _rioFixedPrice = a })
rioInstanceTenancy :: Lens' ReservedInstancesOffering (Maybe Text)
rioInstanceTenancy =
lens _rioInstanceTenancy (\s a -> s { _rioInstanceTenancy = a })
rioInstanceType :: Lens' ReservedInstancesOffering (Maybe Text)
rioInstanceType = lens _rioInstanceType (\s a -> s { _rioInstanceType = a })
rioMarketplace :: Lens' ReservedInstancesOffering (Maybe Bool)
rioMarketplace = lens _rioMarketplace (\s a -> s { _rioMarketplace = a })
rioOfferingType :: Lens' ReservedInstancesOffering (Maybe Text)
rioOfferingType = lens _rioOfferingType (\s a -> s { _rioOfferingType = a })
rioPricingDetails :: Lens' ReservedInstancesOffering [PricingDetail]
rioPricingDetails =
lens _rioPricingDetails (\s a -> s { _rioPricingDetails = a })
. _List
rioProductDescription :: Lens' ReservedInstancesOffering (Maybe Text)
rioProductDescription =
lens _rioProductDescription (\s a -> s { _rioProductDescription = a })
rioRecurringCharges :: Lens' ReservedInstancesOffering [RecurringCharge]
rioRecurringCharges =
lens _rioRecurringCharges (\s a -> s { _rioRecurringCharges = a })
. _List
rioReservedInstancesOfferingId :: Lens' ReservedInstancesOffering (Maybe Text)
rioReservedInstancesOfferingId =
lens _rioReservedInstancesOfferingId
(\s a -> s { _rioReservedInstancesOfferingId = a })
rioUsagePrice :: Lens' ReservedInstancesOffering (Maybe Double)
rioUsagePrice = lens _rioUsagePrice (\s a -> s { _rioUsagePrice = a })
instance FromXML ReservedInstancesOffering where
parseXML x = ReservedInstancesOffering
<$> x .@? "availabilityZone"
<*> x .@? "currencyCode"
<*> x .@? "duration"
<*> x .@? "fixedPrice"
<*> x .@? "instanceTenancy"
<*> x .@? "instanceType"
<*> x .@? "marketplace"
<*> x .@? "offeringType"
<*> x .@ "pricingDetailsSet"
<*> x .@? "productDescription"
<*> x .@ "recurringCharges"
<*> x .@? "reservedInstancesOfferingId"
<*> x .@? "usagePrice"
instance ToQuery ReservedInstancesOffering where
toQuery ReservedInstancesOffering{..} = mconcat
[ "availabilityZone" =? _rioAvailabilityZone
, "currencyCode" =? _rioCurrencyCode
, "duration" =? _rioDuration
, "fixedPrice" =? _rioFixedPrice
, "instanceTenancy" =? _rioInstanceTenancy
, "instanceType" =? _rioInstanceType
, "marketplace" =? _rioMarketplace
, "offeringType" =? _rioOfferingType
, "pricingDetailsSet" =? _rioPricingDetails
, "productDescription" =? _rioProductDescription
, "recurringCharges" =? _rioRecurringCharges
, "reservedInstancesOfferingId" =? _rioReservedInstancesOfferingId
, "usagePrice" =? _rioUsagePrice
]
data ReservedInstances = ReservedInstances
{ _ri1AvailabilityZone :: Maybe Text
, _ri1CurrencyCode :: Maybe Text
, _ri1Duration :: Maybe Integer
, _ri1End :: Maybe RFC822
, _ri1FixedPrice :: Maybe Double
, _ri1InstanceCount :: Maybe Int
, _ri1InstanceTenancy :: Maybe Text
, _ri1InstanceType :: Maybe Text
, _ri1OfferingType :: Maybe Text
, _ri1ProductDescription :: Maybe Text
, _ri1RecurringCharges :: List "item" RecurringCharge
, _ri1ReservedInstancesId :: Maybe Text
, _ri1Start :: Maybe RFC822
, _ri1State :: Maybe Text
, _ri1Tags :: List "item" Tag
, _ri1UsagePrice :: Maybe Double
} deriving (Eq, Show)
reservedInstances :: ReservedInstances
reservedInstances = ReservedInstances
{ _ri1ReservedInstancesId = Nothing
, _ri1InstanceType = Nothing
, _ri1AvailabilityZone = Nothing
, _ri1Start = Nothing
, _ri1End = Nothing
, _ri1Duration = Nothing
, _ri1UsagePrice = Nothing
, _ri1FixedPrice = Nothing
, _ri1InstanceCount = Nothing
, _ri1ProductDescription = Nothing
, _ri1State = Nothing
, _ri1Tags = mempty
, _ri1InstanceTenancy = Nothing
, _ri1CurrencyCode = Nothing
, _ri1OfferingType = Nothing
, _ri1RecurringCharges = mempty
}
ri1AvailabilityZone :: Lens' ReservedInstances (Maybe Text)
ri1AvailabilityZone =
lens _ri1AvailabilityZone (\s a -> s { _ri1AvailabilityZone = a })
ri1CurrencyCode :: Lens' ReservedInstances (Maybe Text)
ri1CurrencyCode = lens _ri1CurrencyCode (\s a -> s { _ri1CurrencyCode = a })
ri1Duration :: Lens' ReservedInstances (Maybe Integer)
ri1Duration = lens _ri1Duration (\s a -> s { _ri1Duration = a })
ri1End :: Lens' ReservedInstances (Maybe UTCTime)
ri1End = lens _ri1End (\s a -> s { _ri1End = a }) . mapping _Time
ri1FixedPrice :: Lens' ReservedInstances (Maybe Double)
ri1FixedPrice = lens _ri1FixedPrice (\s a -> s { _ri1FixedPrice = a })
ri1InstanceCount :: Lens' ReservedInstances (Maybe Int)
ri1InstanceCount = lens _ri1InstanceCount (\s a -> s { _ri1InstanceCount = a })
ri1InstanceTenancy :: Lens' ReservedInstances (Maybe Text)
ri1InstanceTenancy =
lens _ri1InstanceTenancy (\s a -> s { _ri1InstanceTenancy = a })
ri1InstanceType :: Lens' ReservedInstances (Maybe Text)
ri1InstanceType = lens _ri1InstanceType (\s a -> s { _ri1InstanceType = a })
ri1OfferingType :: Lens' ReservedInstances (Maybe Text)
ri1OfferingType = lens _ri1OfferingType (\s a -> s { _ri1OfferingType = a })
ri1ProductDescription :: Lens' ReservedInstances (Maybe Text)
ri1ProductDescription =
lens _ri1ProductDescription (\s a -> s { _ri1ProductDescription = a })
ri1RecurringCharges :: Lens' ReservedInstances [RecurringCharge]
ri1RecurringCharges =
lens _ri1RecurringCharges (\s a -> s { _ri1RecurringCharges = a })
. _List
ri1ReservedInstancesId :: Lens' ReservedInstances (Maybe Text)
ri1ReservedInstancesId =
lens _ri1ReservedInstancesId (\s a -> s { _ri1ReservedInstancesId = a })
ri1Start :: Lens' ReservedInstances (Maybe UTCTime)
ri1Start = lens _ri1Start (\s a -> s { _ri1Start = a }) . mapping _Time
ri1State :: Lens' ReservedInstances (Maybe Text)
ri1State = lens _ri1State (\s a -> s { _ri1State = a })
ri1Tags :: Lens' ReservedInstances [Tag]
ri1Tags = lens _ri1Tags (\s a -> s { _ri1Tags = a }) . _List
ri1UsagePrice :: Lens' ReservedInstances (Maybe Double)
ri1UsagePrice = lens _ri1UsagePrice (\s a -> s { _ri1UsagePrice = a })
instance FromXML ReservedInstances where
parseXML x = ReservedInstances
<$> x .@? "availabilityZone"
<*> x .@? "currencyCode"
<*> x .@? "duration"
<*> x .@? "end"
<*> x .@? "fixedPrice"
<*> x .@? "instanceCount"
<*> x .@? "instanceTenancy"
<*> x .@? "instanceType"
<*> x .@? "offeringType"
<*> x .@? "productDescription"
<*> x .@ "recurringCharges"
<*> x .@? "reservedInstancesId"
<*> x .@? "start"
<*> x .@? "state"
<*> x .@ "tagSet"
<*> x .@? "usagePrice"
instance ToQuery ReservedInstances where
toQuery ReservedInstances{..} = mconcat
[ "availabilityZone" =? _ri1AvailabilityZone
, "currencyCode" =? _ri1CurrencyCode
, "duration" =? _ri1Duration
, "end" =? _ri1End
, "fixedPrice" =? _ri1FixedPrice
, "instanceCount" =? _ri1InstanceCount
, "instanceTenancy" =? _ri1InstanceTenancy
, "instanceType" =? _ri1InstanceType
, "offeringType" =? _ri1OfferingType
, "productDescription" =? _ri1ProductDescription
, "recurringCharges" =? _ri1RecurringCharges
, "reservedInstancesId" =? _ri1ReservedInstancesId
, "start" =? _ri1Start
, "state" =? _ri1State
, "tagSet" =? _ri1Tags
, "usagePrice" =? _ri1UsagePrice
]
data DatafeedSubscriptionState
= DSSActive
| DSSInactive
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable DatafeedSubscriptionState
instance FromText DatafeedSubscriptionState where
parser = match "Active" DSSActive
<|> match "Inactive" DSSInactive
instance ToText DatafeedSubscriptionState where
toText = \case
DSSActive -> "Active"
DSSInactive -> "Inactive"
instance FromXML DatafeedSubscriptionState where
parseXML = parseXMLText "DatafeedSubscriptionState"
instance ToQuery DatafeedSubscriptionState where
toQuery = toQuery . toText
data ExportTaskState
= ETSActive
| ETSCancelled
| ETSCancelling
| ETSCompleted
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable ExportTaskState
instance FromText ExportTaskState where
parser = match "active" ETSActive
<|> match "cancelled" ETSCancelled
<|> match "cancelling" ETSCancelling
<|> match "completed" ETSCompleted
instance ToText ExportTaskState where
toText = \case
ETSActive -> "active"
ETSCancelled -> "cancelled"
ETSCancelling -> "cancelling"
ETSCompleted -> "completed"
instance FromXML ExportTaskState where
parseXML = parseXMLText "ExportTaskState"
instance ToQuery ExportTaskState where
toQuery = toQuery . toText
data ProductCodeValues
= Devpay
| Marketplace
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable ProductCodeValues
instance FromText ProductCodeValues where
parser = match "devpay" Devpay
<|> match "marketplace" Marketplace
instance ToText ProductCodeValues where
toText = \case
Devpay -> "devpay"
Marketplace -> "marketplace"
instance FromXML ProductCodeValues where
parseXML = parseXMLText "ProductCodeValues"
instance ToQuery ProductCodeValues where
toQuery = toQuery . toText
data VpnConnection = VpnConnection
{ _vcCustomerGatewayConfiguration :: Maybe Text
, _vcCustomerGatewayId :: Maybe Text
, _vcOptions :: Maybe VpnConnectionOptions
, _vcRoutes :: List "item" VpnStaticRoute
, _vcState :: Maybe Text
, _vcTags :: List "item" Tag
, _vcType :: Maybe Text
, _vcVgwTelemetry :: List "item" VgwTelemetry
, _vcVpnConnectionId :: Maybe Text
, _vcVpnGatewayId :: Maybe Text
} deriving (Eq, Show)
vpnConnection :: VpnConnection
vpnConnection = VpnConnection
{ _vcVpnConnectionId = Nothing
, _vcState = Nothing
, _vcCustomerGatewayConfiguration = Nothing
, _vcType = Nothing
, _vcCustomerGatewayId = Nothing
, _vcVpnGatewayId = Nothing
, _vcTags = mempty
, _vcVgwTelemetry = mempty
, _vcOptions = Nothing
, _vcRoutes = mempty
}
vcCustomerGatewayConfiguration :: Lens' VpnConnection (Maybe Text)
vcCustomerGatewayConfiguration =
lens _vcCustomerGatewayConfiguration
(\s a -> s { _vcCustomerGatewayConfiguration = a })
vcCustomerGatewayId :: Lens' VpnConnection (Maybe Text)
vcCustomerGatewayId =
lens _vcCustomerGatewayId (\s a -> s { _vcCustomerGatewayId = a })
vcOptions :: Lens' VpnConnection (Maybe VpnConnectionOptions)
vcOptions = lens _vcOptions (\s a -> s { _vcOptions = a })
vcRoutes :: Lens' VpnConnection [VpnStaticRoute]
vcRoutes = lens _vcRoutes (\s a -> s { _vcRoutes = a }) . _List
vcState :: Lens' VpnConnection (Maybe Text)
vcState = lens _vcState (\s a -> s { _vcState = a })
vcTags :: Lens' VpnConnection [Tag]
vcTags = lens _vcTags (\s a -> s { _vcTags = a }) . _List
vcType :: Lens' VpnConnection (Maybe Text)
vcType = lens _vcType (\s a -> s { _vcType = a })
vcVgwTelemetry :: Lens' VpnConnection [VgwTelemetry]
vcVgwTelemetry = lens _vcVgwTelemetry (\s a -> s { _vcVgwTelemetry = a }) . _List
vcVpnConnectionId :: Lens' VpnConnection (Maybe Text)
vcVpnConnectionId =
lens _vcVpnConnectionId (\s a -> s { _vcVpnConnectionId = a })
vcVpnGatewayId :: Lens' VpnConnection (Maybe Text)
vcVpnGatewayId = lens _vcVpnGatewayId (\s a -> s { _vcVpnGatewayId = a })
instance FromXML VpnConnection where
parseXML x = VpnConnection
<$> x .@? "customerGatewayConfiguration"
<*> x .@? "customerGatewayId"
<*> x .@? "options"
<*> x .@ "routes"
<*> x .@? "state"
<*> x .@ "tagSet"
<*> x .@? "type"
<*> x .@ "vgwTelemetry"
<*> x .@? "vpnConnectionId"
<*> x .@? "vpnGatewayId"
instance ToQuery VpnConnection where
toQuery VpnConnection{..} = mconcat
[ "customerGatewayConfiguration" =? _vcCustomerGatewayConfiguration
, "customerGatewayId" =? _vcCustomerGatewayId
, "options" =? _vcOptions
, "routes" =? _vcRoutes
, "state" =? _vcState
, "tagSet" =? _vcTags
, "type" =? _vcType
, "vgwTelemetry" =? _vcVgwTelemetry
, "vpnConnectionId" =? _vcVpnConnectionId
, "vpnGatewayId" =? _vcVpnGatewayId
]
data InstanceState = InstanceState
{ _isCode :: Int
, _isName :: Text
} deriving (Eq, Ord, Show)
instanceState :: Int
-> Text
-> InstanceState
instanceState p1 p2 = InstanceState
{ _isCode = p1
, _isName = p2
}
isCode :: Lens' InstanceState Int
isCode = lens _isCode (\s a -> s { _isCode = a })
isName :: Lens' InstanceState Text
isName = lens _isName (\s a -> s { _isName = a })
instance FromXML InstanceState where
parseXML x = InstanceState
<$> x .@ "code"
<*> x .@ "name"
instance ToQuery InstanceState where
toQuery InstanceState{..} = mconcat
[ "code" =? _isCode
, "name" =? _isName
]
data Placement = Placement
{ _pAvailabilityZone :: Maybe Text
, _pGroupName :: Maybe Text
, _pTenancy :: Maybe Text
} deriving (Eq, Ord, Show)
placement :: Placement
placement = Placement
{ _pAvailabilityZone = Nothing
, _pGroupName = Nothing
, _pTenancy = Nothing
}
pAvailabilityZone :: Lens' Placement (Maybe Text)
pAvailabilityZone =
lens _pAvailabilityZone (\s a -> s { _pAvailabilityZone = a })
pGroupName :: Lens' Placement (Maybe Text)
pGroupName = lens _pGroupName (\s a -> s { _pGroupName = a })
pTenancy :: Lens' Placement (Maybe Text)
pTenancy = lens _pTenancy (\s a -> s { _pTenancy = a })
instance FromXML Placement where
parseXML x = Placement
<$> x .@? "availabilityZone"
<*> x .@? "groupName"
<*> x .@? "tenancy"
instance ToQuery Placement where
toQuery Placement{..} = mconcat
[ "availabilityZone" =? _pAvailabilityZone
, "groupName" =? _pGroupName
, "tenancy" =? _pTenancy
]
data EventCode
= InstanceReboot
| InstanceRetirement
| InstanceStop
| SystemMaintenance
| SystemReboot
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable EventCode
instance FromText EventCode where
parser = match "instance-reboot" InstanceReboot
<|> match "instance-retirement" InstanceRetirement
<|> match "instance-stop" InstanceStop
<|> match "system-maintenance" SystemMaintenance
<|> match "system-reboot" SystemReboot
instance ToText EventCode where
toText = \case
InstanceReboot -> "instance-reboot"
InstanceRetirement -> "instance-retirement"
InstanceStop -> "instance-stop"
SystemMaintenance -> "system-maintenance"
SystemReboot -> "system-reboot"
instance FromXML EventCode where
parseXML = parseXMLText "EventCode"
instance ToQuery EventCode where
toQuery = toQuery . toText
data SpotInstanceType
= OneTime
| Persistent
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable SpotInstanceType
instance FromText SpotInstanceType where
parser = match "one-time" OneTime
<|> match "persistent" Persistent
instance ToText SpotInstanceType where
toText = \case
OneTime -> "one-time"
Persistent -> "persistent"
instance FromXML SpotInstanceType where
parseXML = parseXMLText "SpotInstanceType"
instance ToQuery SpotInstanceType where
toQuery = toQuery . toText
data VpcPeeringConnection = VpcPeeringConnection
{ _vpc1AccepterVpcInfo :: Maybe VpcPeeringConnectionVpcInfo
, _vpc1ExpirationTime :: Maybe RFC822
, _vpc1RequesterVpcInfo :: Maybe VpcPeeringConnectionVpcInfo
, _vpc1Status :: Maybe VpcPeeringConnectionStateReason
, _vpc1Tags :: List "item" Tag
, _vpc1VpcPeeringConnectionId :: Maybe Text
} deriving (Eq, Show)
vpcPeeringConnection :: VpcPeeringConnection
vpcPeeringConnection = VpcPeeringConnection
{ _vpc1AccepterVpcInfo = Nothing
, _vpc1ExpirationTime = Nothing
, _vpc1RequesterVpcInfo = Nothing
, _vpc1Status = Nothing
, _vpc1Tags = mempty
, _vpc1VpcPeeringConnectionId = Nothing
}
vpc1AccepterVpcInfo :: Lens' VpcPeeringConnection (Maybe VpcPeeringConnectionVpcInfo)
vpc1AccepterVpcInfo =
lens _vpc1AccepterVpcInfo (\s a -> s { _vpc1AccepterVpcInfo = a })
vpc1ExpirationTime :: Lens' VpcPeeringConnection (Maybe UTCTime)
vpc1ExpirationTime =
lens _vpc1ExpirationTime (\s a -> s { _vpc1ExpirationTime = a })
. mapping _Time
vpc1RequesterVpcInfo :: Lens' VpcPeeringConnection (Maybe VpcPeeringConnectionVpcInfo)
vpc1RequesterVpcInfo =
lens _vpc1RequesterVpcInfo (\s a -> s { _vpc1RequesterVpcInfo = a })
vpc1Status :: Lens' VpcPeeringConnection (Maybe VpcPeeringConnectionStateReason)
vpc1Status = lens _vpc1Status (\s a -> s { _vpc1Status = a })
vpc1Tags :: Lens' VpcPeeringConnection [Tag]
vpc1Tags = lens _vpc1Tags (\s a -> s { _vpc1Tags = a }) . _List
vpc1VpcPeeringConnectionId :: Lens' VpcPeeringConnection (Maybe Text)
vpc1VpcPeeringConnectionId =
lens _vpc1VpcPeeringConnectionId
(\s a -> s { _vpc1VpcPeeringConnectionId = a })
instance FromXML VpcPeeringConnection where
parseXML x = VpcPeeringConnection
<$> x .@? "accepterVpcInfo"
<*> x .@? "expirationTime"
<*> x .@? "requesterVpcInfo"
<*> x .@? "status"
<*> x .@ "tagSet"
<*> x .@? "vpcPeeringConnectionId"
instance ToQuery VpcPeeringConnection where
toQuery VpcPeeringConnection{..} = mconcat
[ "accepterVpcInfo" =? _vpc1AccepterVpcInfo
, "expirationTime" =? _vpc1ExpirationTime
, "requesterVpcInfo" =? _vpc1RequesterVpcInfo
, "status" =? _vpc1Status
, "tagSet" =? _vpc1Tags
, "vpcPeeringConnectionId" =? _vpc1VpcPeeringConnectionId
]
data S3Storage = S3Storage
{ _ssAWSAccessKeyId :: Maybe Text
, _ssBucket :: Maybe Text
, _ssPrefix :: Maybe Text
, _ssUploadPolicy :: Maybe Base64
, _ssUploadPolicySignature :: Maybe Text
} deriving (Eq, Show)
s3Storage :: S3Storage
s3Storage = S3Storage
{ _ssBucket = Nothing
, _ssPrefix = Nothing
, _ssAWSAccessKeyId = Nothing
, _ssUploadPolicy = Nothing
, _ssUploadPolicySignature = Nothing
}
ssAWSAccessKeyId :: Lens' S3Storage (Maybe Text)
ssAWSAccessKeyId = lens _ssAWSAccessKeyId (\s a -> s { _ssAWSAccessKeyId = a })
ssBucket :: Lens' S3Storage (Maybe Text)
ssBucket = lens _ssBucket (\s a -> s { _ssBucket = a })
ssPrefix :: Lens' S3Storage (Maybe Text)
ssPrefix = lens _ssPrefix (\s a -> s { _ssPrefix = a })
ssUploadPolicy :: Lens' S3Storage (Maybe Base64)
ssUploadPolicy = lens _ssUploadPolicy (\s a -> s { _ssUploadPolicy = a })
ssUploadPolicySignature :: Lens' S3Storage (Maybe Text)
ssUploadPolicySignature =
lens _ssUploadPolicySignature (\s a -> s { _ssUploadPolicySignature = a })
instance FromXML S3Storage where
parseXML x = S3Storage
<$> x .@? "AWSAccessKeyId"
<*> x .@? "bucket"
<*> x .@? "prefix"
<*> x .@? "uploadPolicy"
<*> x .@? "uploadPolicySignature"
instance ToQuery S3Storage where
toQuery S3Storage{..} = mconcat
[ "AWSAccessKeyId" =? _ssAWSAccessKeyId
, "bucket" =? _ssBucket
, "prefix" =? _ssPrefix
, "uploadPolicy" =? _ssUploadPolicy
, "uploadPolicySignature" =? _ssUploadPolicySignature
]
data VgwTelemetry = VgwTelemetry
{ _vtAcceptedRouteCount :: Maybe Int
, _vtLastStatusChange :: Maybe RFC822
, _vtOutsideIpAddress :: Maybe Text
, _vtStatus :: Maybe Text
, _vtStatusMessage :: Maybe Text
} deriving (Eq, Ord, Show)
vgwTelemetry :: VgwTelemetry
vgwTelemetry = VgwTelemetry
{ _vtOutsideIpAddress = Nothing
, _vtStatus = Nothing
, _vtLastStatusChange = Nothing
, _vtStatusMessage = Nothing
, _vtAcceptedRouteCount = Nothing
}
vtAcceptedRouteCount :: Lens' VgwTelemetry (Maybe Int)
vtAcceptedRouteCount =
lens _vtAcceptedRouteCount (\s a -> s { _vtAcceptedRouteCount = a })
vtLastStatusChange :: Lens' VgwTelemetry (Maybe UTCTime)
vtLastStatusChange =
lens _vtLastStatusChange (\s a -> s { _vtLastStatusChange = a })
. mapping _Time
vtOutsideIpAddress :: Lens' VgwTelemetry (Maybe Text)
vtOutsideIpAddress =
lens _vtOutsideIpAddress (\s a -> s { _vtOutsideIpAddress = a })
vtStatus :: Lens' VgwTelemetry (Maybe Text)
vtStatus = lens _vtStatus (\s a -> s { _vtStatus = a })
vtStatusMessage :: Lens' VgwTelemetry (Maybe Text)
vtStatusMessage = lens _vtStatusMessage (\s a -> s { _vtStatusMessage = a })
instance FromXML VgwTelemetry where
parseXML x = VgwTelemetry
<$> x .@? "acceptedRouteCount"
<*> x .@? "lastStatusChange"
<*> x .@? "outsideIpAddress"
<*> x .@? "status"
<*> x .@? "statusMessage"
instance ToQuery VgwTelemetry where
toQuery VgwTelemetry{..} = mconcat
[ "acceptedRouteCount" =? _vtAcceptedRouteCount
, "lastStatusChange" =? _vtLastStatusChange
, "outsideIpAddress" =? _vtOutsideIpAddress
, "status" =? _vtStatus
, "statusMessage" =? _vtStatusMessage
]
data VpnStaticRoute = VpnStaticRoute
{ _vsrDestinationCidrBlock :: Maybe Text
, _vsrSource :: Maybe Text
, _vsrState :: Maybe Text
} deriving (Eq, Ord, Show)
vpnStaticRoute :: VpnStaticRoute
vpnStaticRoute = VpnStaticRoute
{ _vsrDestinationCidrBlock = Nothing
, _vsrSource = Nothing
, _vsrState = Nothing
}
vsrDestinationCidrBlock :: Lens' VpnStaticRoute (Maybe Text)
vsrDestinationCidrBlock =
lens _vsrDestinationCidrBlock (\s a -> s { _vsrDestinationCidrBlock = a })
vsrSource :: Lens' VpnStaticRoute (Maybe Text)
vsrSource = lens _vsrSource (\s a -> s { _vsrSource = a })
vsrState :: Lens' VpnStaticRoute (Maybe Text)
vsrState = lens _vsrState (\s a -> s { _vsrState = a })
instance FromXML VpnStaticRoute where
parseXML x = VpnStaticRoute
<$> x .@? "destinationCidrBlock"
<*> x .@? "source"
<*> x .@? "state"
instance ToQuery VpnStaticRoute where
toQuery VpnStaticRoute{..} = mconcat
[ "destinationCidrBlock" =? _vsrDestinationCidrBlock
, "source" =? _vsrSource
, "state" =? _vsrState
]
data InstanceStateName
= ISNPending
| ISNRunning
| ISNShuttingDown
| ISNStopped
| ISNStopping
| ISNTerminated
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable InstanceStateName
instance FromText InstanceStateName where
parser = match "pending" ISNPending
<|> match "running" ISNRunning
<|> match "shutting-down" ISNShuttingDown
<|> match "stopped" ISNStopped
<|> match "stopping" ISNStopping
<|> match "terminated" ISNTerminated
instance ToText InstanceStateName where
toText = \case
ISNPending -> "pending"
ISNRunning -> "running"
ISNShuttingDown -> "shutting-down"
ISNStopped -> "stopped"
ISNStopping -> "stopping"
ISNTerminated -> "terminated"
instance FromXML InstanceStateName where
parseXML = parseXMLText "InstanceStateName"
instance ToQuery InstanceStateName where
toQuery = toQuery . toText
data Instance = Instance
{ _i1AmiLaunchIndex :: Maybe Int
, _i1Architecture :: Maybe Text
, _i1BlockDeviceMappings :: List "item" InstanceBlockDeviceMapping
, _i1ClientToken :: Maybe Text
, _i1EbsOptimized :: Maybe Bool
, _i1Hypervisor :: Maybe Text
, _i1IamInstanceProfile :: Maybe IamInstanceProfile
, _i1ImageId :: Maybe Text
, _i1InstanceId :: Maybe Text
, _i1InstanceLifecycle :: Maybe Text
, _i1InstanceType :: Maybe Text
, _i1KernelId :: Maybe Text
, _i1KeyName :: Maybe Text
, _i1LaunchTime :: Maybe RFC822
, _i1Monitoring :: Maybe Monitoring
, _i1NetworkInterfaces :: List "item" InstanceNetworkInterface
, _i1Placement :: Maybe Placement
, _i1Platform :: Maybe Text
, _i1PrivateDnsName :: Maybe Text
, _i1PrivateIpAddress :: Maybe Text
, _i1ProductCodes :: List "item" ProductCode
, _i1PublicDnsName :: Maybe Text
, _i1PublicIpAddress :: Maybe Text
, _i1RamdiskId :: Maybe Text
, _i1RootDeviceName :: Maybe Text
, _i1RootDeviceType :: Maybe Text
, _i1SecurityGroups :: List "item" GroupIdentifier
, _i1SourceDestCheck :: Maybe Bool
, _i1SpotInstanceRequestId :: Maybe Text
, _i1SriovNetSupport :: Maybe Text
, _i1State :: Maybe InstanceState
, _i1StateReason :: Maybe StateReason
, _i1StateTransitionReason :: Maybe Text
, _i1SubnetId :: Maybe Text
, _i1Tags :: List "item" Tag
, _i1VirtualizationType :: Maybe Text
, _i1VpcId :: Maybe Text
} deriving (Eq, Show)
instance' :: Instance
instance' = Instance
{ _i1InstanceId = Nothing
, _i1ImageId = Nothing
, _i1State = Nothing
, _i1PrivateDnsName = Nothing
, _i1PublicDnsName = Nothing
, _i1StateTransitionReason = Nothing
, _i1KeyName = Nothing
, _i1AmiLaunchIndex = Nothing
, _i1ProductCodes = mempty
, _i1InstanceType = Nothing
, _i1LaunchTime = Nothing
, _i1Placement = Nothing
, _i1KernelId = Nothing
, _i1RamdiskId = Nothing
, _i1Platform = Nothing
, _i1Monitoring = Nothing
, _i1SubnetId = Nothing
, _i1VpcId = Nothing
, _i1PrivateIpAddress = Nothing
, _i1PublicIpAddress = Nothing
, _i1StateReason = Nothing
, _i1Architecture = Nothing
, _i1RootDeviceType = Nothing
, _i1RootDeviceName = Nothing
, _i1BlockDeviceMappings = mempty
, _i1VirtualizationType = Nothing
, _i1InstanceLifecycle = Nothing
, _i1SpotInstanceRequestId = Nothing
, _i1ClientToken = Nothing
, _i1Tags = mempty
, _i1SecurityGroups = mempty
, _i1SourceDestCheck = Nothing
, _i1Hypervisor = Nothing
, _i1NetworkInterfaces = mempty
, _i1IamInstanceProfile = Nothing
, _i1EbsOptimized = Nothing
, _i1SriovNetSupport = Nothing
}
i1AmiLaunchIndex :: Lens' Instance (Maybe Int)
i1AmiLaunchIndex = lens _i1AmiLaunchIndex (\s a -> s { _i1AmiLaunchIndex = a })
i1Architecture :: Lens' Instance (Maybe Text)
i1Architecture = lens _i1Architecture (\s a -> s { _i1Architecture = a })
i1BlockDeviceMappings :: Lens' Instance [InstanceBlockDeviceMapping]
i1BlockDeviceMappings =
lens _i1BlockDeviceMappings (\s a -> s { _i1BlockDeviceMappings = a })
. _List
i1ClientToken :: Lens' Instance (Maybe Text)
i1ClientToken = lens _i1ClientToken (\s a -> s { _i1ClientToken = a })
i1EbsOptimized :: Lens' Instance (Maybe Bool)
i1EbsOptimized = lens _i1EbsOptimized (\s a -> s { _i1EbsOptimized = a })
i1Hypervisor :: Lens' Instance (Maybe Text)
i1Hypervisor = lens _i1Hypervisor (\s a -> s { _i1Hypervisor = a })
i1IamInstanceProfile :: Lens' Instance (Maybe IamInstanceProfile)
i1IamInstanceProfile =
lens _i1IamInstanceProfile (\s a -> s { _i1IamInstanceProfile = a })
i1ImageId :: Lens' Instance (Maybe Text)
i1ImageId = lens _i1ImageId (\s a -> s { _i1ImageId = a })
i1InstanceId :: Lens' Instance (Maybe Text)
i1InstanceId = lens _i1InstanceId (\s a -> s { _i1InstanceId = a })
i1InstanceLifecycle :: Lens' Instance (Maybe Text)
i1InstanceLifecycle =
lens _i1InstanceLifecycle (\s a -> s { _i1InstanceLifecycle = a })
i1InstanceType :: Lens' Instance (Maybe Text)
i1InstanceType = lens _i1InstanceType (\s a -> s { _i1InstanceType = a })
i1KernelId :: Lens' Instance (Maybe Text)
i1KernelId = lens _i1KernelId (\s a -> s { _i1KernelId = a })
i1KeyName :: Lens' Instance (Maybe Text)
i1KeyName = lens _i1KeyName (\s a -> s { _i1KeyName = a })
i1LaunchTime :: Lens' Instance (Maybe UTCTime)
i1LaunchTime = lens _i1LaunchTime (\s a -> s { _i1LaunchTime = a }) . mapping _Time
i1Monitoring :: Lens' Instance (Maybe Monitoring)
i1Monitoring = lens _i1Monitoring (\s a -> s { _i1Monitoring = a })
i1NetworkInterfaces :: Lens' Instance [InstanceNetworkInterface]
i1NetworkInterfaces =
lens _i1NetworkInterfaces (\s a -> s { _i1NetworkInterfaces = a })
. _List
i1Placement :: Lens' Instance (Maybe Placement)
i1Placement = lens _i1Placement (\s a -> s { _i1Placement = a })
i1Platform :: Lens' Instance (Maybe Text)
i1Platform = lens _i1Platform (\s a -> s { _i1Platform = a })
i1PrivateDnsName :: Lens' Instance (Maybe Text)
i1PrivateDnsName = lens _i1PrivateDnsName (\s a -> s { _i1PrivateDnsName = a })
i1PrivateIpAddress :: Lens' Instance (Maybe Text)
i1PrivateIpAddress =
lens _i1PrivateIpAddress (\s a -> s { _i1PrivateIpAddress = a })
i1ProductCodes :: Lens' Instance [ProductCode]
i1ProductCodes = lens _i1ProductCodes (\s a -> s { _i1ProductCodes = a }) . _List
i1PublicDnsName :: Lens' Instance (Maybe Text)
i1PublicDnsName = lens _i1PublicDnsName (\s a -> s { _i1PublicDnsName = a })
i1PublicIpAddress :: Lens' Instance (Maybe Text)
i1PublicIpAddress =
lens _i1PublicIpAddress (\s a -> s { _i1PublicIpAddress = a })
i1RamdiskId :: Lens' Instance (Maybe Text)
i1RamdiskId = lens _i1RamdiskId (\s a -> s { _i1RamdiskId = a })
i1RootDeviceName :: Lens' Instance (Maybe Text)
i1RootDeviceName = lens _i1RootDeviceName (\s a -> s { _i1RootDeviceName = a })
i1RootDeviceType :: Lens' Instance (Maybe Text)
i1RootDeviceType = lens _i1RootDeviceType (\s a -> s { _i1RootDeviceType = a })
i1SecurityGroups :: Lens' Instance [GroupIdentifier]
i1SecurityGroups = lens _i1SecurityGroups (\s a -> s { _i1SecurityGroups = a }) . _List
i1SourceDestCheck :: Lens' Instance (Maybe Bool)
i1SourceDestCheck =
lens _i1SourceDestCheck (\s a -> s { _i1SourceDestCheck = a })
i1SpotInstanceRequestId :: Lens' Instance (Maybe Text)
i1SpotInstanceRequestId =
lens _i1SpotInstanceRequestId (\s a -> s { _i1SpotInstanceRequestId = a })
i1SriovNetSupport :: Lens' Instance (Maybe Text)
i1SriovNetSupport =
lens _i1SriovNetSupport (\s a -> s { _i1SriovNetSupport = a })
i1State :: Lens' Instance (Maybe InstanceState)
i1State = lens _i1State (\s a -> s { _i1State = a })
i1StateReason :: Lens' Instance (Maybe StateReason)
i1StateReason = lens _i1StateReason (\s a -> s { _i1StateReason = a })
i1StateTransitionReason :: Lens' Instance (Maybe Text)
i1StateTransitionReason =
lens _i1StateTransitionReason (\s a -> s { _i1StateTransitionReason = a })
i1SubnetId :: Lens' Instance (Maybe Text)
i1SubnetId = lens _i1SubnetId (\s a -> s { _i1SubnetId = a })
i1Tags :: Lens' Instance [Tag]
i1Tags = lens _i1Tags (\s a -> s { _i1Tags = a }) . _List
i1VirtualizationType :: Lens' Instance (Maybe Text)
i1VirtualizationType =
lens _i1VirtualizationType (\s a -> s { _i1VirtualizationType = a })
i1VpcId :: Lens' Instance (Maybe Text)
i1VpcId = lens _i1VpcId (\s a -> s { _i1VpcId = a })
instance FromXML Instance where
parseXML x = Instance
<$> x .@? "amiLaunchIndex"
<*> x .@? "architecture"
<*> x .@ "blockDeviceMapping"
<*> x .@? "clientToken"
<*> x .@? "ebsOptimized"
<*> x .@? "hypervisor"
<*> x .@? "iamInstanceProfile"
<*> x .@? "imageId"
<*> x .@? "instanceId"
<*> x .@? "instanceLifecycle"
<*> x .@? "instanceType"
<*> x .@? "kernelId"
<*> x .@? "keyName"
<*> x .@? "launchTime"
<*> x .@? "monitoring"
<*> x .@ "networkInterfaceSet"
<*> x .@? "placement"
<*> x .@? "platform"
<*> x .@? "privateDnsName"
<*> x .@? "privateIpAddress"
<*> x .@ "productCodes"
<*> x .@? "dnsName"
<*> x .@? "ipAddress"
<*> x .@? "ramdiskId"
<*> x .@? "rootDeviceName"
<*> x .@? "rootDeviceType"
<*> x .@ "groupSet"
<*> x .@? "sourceDestCheck"
<*> x .@? "spotInstanceRequestId"
<*> x .@? "sriovNetSupport"
<*> x .@? "instanceState"
<*> x .@? "stateReason"
<*> x .@? "reason"
<*> x .@? "subnetId"
<*> x .@ "tagSet"
<*> x .@? "virtualizationType"
<*> x .@? "vpcId"
instance ToQuery Instance where
toQuery Instance{..} = mconcat
[ "amiLaunchIndex" =? _i1AmiLaunchIndex
, "architecture" =? _i1Architecture
, "blockDeviceMapping" =? _i1BlockDeviceMappings
, "clientToken" =? _i1ClientToken
, "ebsOptimized" =? _i1EbsOptimized
, "hypervisor" =? _i1Hypervisor
, "iamInstanceProfile" =? _i1IamInstanceProfile
, "imageId" =? _i1ImageId
, "instanceId" =? _i1InstanceId
, "instanceLifecycle" =? _i1InstanceLifecycle
, "instanceType" =? _i1InstanceType
, "kernelId" =? _i1KernelId
, "keyName" =? _i1KeyName
, "launchTime" =? _i1LaunchTime
, "monitoring" =? _i1Monitoring
, "networkInterfaceSet" =? _i1NetworkInterfaces
, "placement" =? _i1Placement
, "platform" =? _i1Platform
, "privateDnsName" =? _i1PrivateDnsName
, "privateIpAddress" =? _i1PrivateIpAddress
, "productCodes" =? _i1ProductCodes
, "dnsName" =? _i1PublicDnsName
, "ipAddress" =? _i1PublicIpAddress
, "ramdiskId" =? _i1RamdiskId
, "rootDeviceName" =? _i1RootDeviceName
, "rootDeviceType" =? _i1RootDeviceType
, "groupSet" =? _i1SecurityGroups
, "sourceDestCheck" =? _i1SourceDestCheck
, "spotInstanceRequestId" =? _i1SpotInstanceRequestId
, "sriovNetSupport" =? _i1SriovNetSupport
, "instanceState" =? _i1State
, "stateReason" =? _i1StateReason
, "reason" =? _i1StateTransitionReason
, "subnetId" =? _i1SubnetId
, "tagSet" =? _i1Tags
, "virtualizationType" =? _i1VirtualizationType
, "vpcId" =? _i1VpcId
]
data ExportTask = ExportTask
{ _etDescription :: Maybe Text
, _etExportTaskId :: Maybe Text
, _etExportToS3Task :: Maybe ExportToS3Task
, _etInstanceExportDetails :: Maybe InstanceExportDetails
, _etState :: Maybe Text
, _etStatusMessage :: Maybe Text
} deriving (Eq, Show)
exportTask :: ExportTask
exportTask = ExportTask
{ _etExportTaskId = Nothing
, _etDescription = Nothing
, _etState = Nothing
, _etStatusMessage = Nothing
, _etInstanceExportDetails = Nothing
, _etExportToS3Task = Nothing
}
etDescription :: Lens' ExportTask (Maybe Text)
etDescription = lens _etDescription (\s a -> s { _etDescription = a })
etExportTaskId :: Lens' ExportTask (Maybe Text)
etExportTaskId = lens _etExportTaskId (\s a -> s { _etExportTaskId = a })
etExportToS3Task :: Lens' ExportTask (Maybe ExportToS3Task)
etExportToS3Task = lens _etExportToS3Task (\s a -> s { _etExportToS3Task = a })
etInstanceExportDetails :: Lens' ExportTask (Maybe InstanceExportDetails)
etInstanceExportDetails =
lens _etInstanceExportDetails (\s a -> s { _etInstanceExportDetails = a })
etState :: Lens' ExportTask (Maybe Text)
etState = lens _etState (\s a -> s { _etState = a })
etStatusMessage :: Lens' ExportTask (Maybe Text)
etStatusMessage = lens _etStatusMessage (\s a -> s { _etStatusMessage = a })
instance FromXML ExportTask where
parseXML x = ExportTask
<$> x .@? "description"
<*> x .@? "exportTaskId"
<*> x .@? "exportToS3"
<*> x .@? "instanceExport"
<*> x .@? "state"
<*> x .@? "statusMessage"
instance ToQuery ExportTask where
toQuery ExportTask{..} = mconcat
[ "description" =? _etDescription
, "exportTaskId" =? _etExportTaskId
, "exportToS3" =? _etExportToS3Task
, "instanceExport" =? _etInstanceExportDetails
, "state" =? _etState
, "statusMessage" =? _etStatusMessage
]
data ResetImageAttributeName
= RIANLaunchPermission
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable ResetImageAttributeName
instance FromText ResetImageAttributeName where
parser = match "launchPermission" RIANLaunchPermission
instance ToText ResetImageAttributeName where
toText RIANLaunchPermission = "launchPermission"
instance FromXML ResetImageAttributeName where
parseXML = parseXMLText "ResetImageAttributeName"
instance ToQuery ResetImageAttributeName where
toQuery = toQuery . toText
data RequestSpotLaunchSpecification = RequestSpotLaunchSpecification
{ _rslsAddressingType :: Maybe Text
, _rslsBlockDeviceMappings :: List "item" BlockDeviceMapping
, _rslsEbsOptimized :: Maybe Bool
, _rslsIamInstanceProfile :: Maybe IamInstanceProfileSpecification
, _rslsImageId :: Maybe Text
, _rslsInstanceType :: Maybe Text
, _rslsKernelId :: Maybe Text
, _rslsKeyName :: Maybe Text
, _rslsMonitoring :: Maybe RunInstancesMonitoringEnabled
, _rslsNetworkInterfaces :: List "item" InstanceNetworkInterfaceSpecification
, _rslsPlacement :: Maybe SpotPlacement
, _rslsRamdiskId :: Maybe Text
, _rslsSecurityGroupIds :: List "item" Text
, _rslsSecurityGroups :: List "item" Text
, _rslsSubnetId :: Maybe Text
, _rslsUserData :: Maybe Text
} deriving (Eq, Show)
requestSpotLaunchSpecification :: RequestSpotLaunchSpecification
requestSpotLaunchSpecification = RequestSpotLaunchSpecification
{ _rslsImageId = Nothing
, _rslsKeyName = Nothing
, _rslsSecurityGroups = mempty
, _rslsUserData = Nothing
, _rslsAddressingType = Nothing
, _rslsInstanceType = Nothing
, _rslsPlacement = Nothing
, _rslsKernelId = Nothing
, _rslsRamdiskId = Nothing
, _rslsBlockDeviceMappings = mempty
, _rslsSubnetId = Nothing
, _rslsNetworkInterfaces = mempty
, _rslsIamInstanceProfile = Nothing
, _rslsEbsOptimized = Nothing
, _rslsMonitoring = Nothing
, _rslsSecurityGroupIds = mempty
}
rslsAddressingType :: Lens' RequestSpotLaunchSpecification (Maybe Text)
rslsAddressingType =
lens _rslsAddressingType (\s a -> s { _rslsAddressingType = a })
rslsBlockDeviceMappings :: Lens' RequestSpotLaunchSpecification [BlockDeviceMapping]
rslsBlockDeviceMappings =
lens _rslsBlockDeviceMappings (\s a -> s { _rslsBlockDeviceMappings = a })
. _List
rslsEbsOptimized :: Lens' RequestSpotLaunchSpecification (Maybe Bool)
rslsEbsOptimized = lens _rslsEbsOptimized (\s a -> s { _rslsEbsOptimized = a })
rslsIamInstanceProfile :: Lens' RequestSpotLaunchSpecification (Maybe IamInstanceProfileSpecification)
rslsIamInstanceProfile =
lens _rslsIamInstanceProfile (\s a -> s { _rslsIamInstanceProfile = a })
rslsImageId :: Lens' RequestSpotLaunchSpecification (Maybe Text)
rslsImageId = lens _rslsImageId (\s a -> s { _rslsImageId = a })
rslsInstanceType :: Lens' RequestSpotLaunchSpecification (Maybe Text)
rslsInstanceType = lens _rslsInstanceType (\s a -> s { _rslsInstanceType = a })
rslsKernelId :: Lens' RequestSpotLaunchSpecification (Maybe Text)
rslsKernelId = lens _rslsKernelId (\s a -> s { _rslsKernelId = a })
rslsKeyName :: Lens' RequestSpotLaunchSpecification (Maybe Text)
rslsKeyName = lens _rslsKeyName (\s a -> s { _rslsKeyName = a })
rslsMonitoring :: Lens' RequestSpotLaunchSpecification (Maybe RunInstancesMonitoringEnabled)
rslsMonitoring = lens _rslsMonitoring (\s a -> s { _rslsMonitoring = a })
rslsNetworkInterfaces :: Lens' RequestSpotLaunchSpecification [InstanceNetworkInterfaceSpecification]
rslsNetworkInterfaces =
lens _rslsNetworkInterfaces (\s a -> s { _rslsNetworkInterfaces = a })
. _List
rslsPlacement :: Lens' RequestSpotLaunchSpecification (Maybe SpotPlacement)
rslsPlacement = lens _rslsPlacement (\s a -> s { _rslsPlacement = a })
rslsRamdiskId :: Lens' RequestSpotLaunchSpecification (Maybe Text)
rslsRamdiskId = lens _rslsRamdiskId (\s a -> s { _rslsRamdiskId = a })
rslsSecurityGroupIds :: Lens' RequestSpotLaunchSpecification [Text]
rslsSecurityGroupIds =
lens _rslsSecurityGroupIds (\s a -> s { _rslsSecurityGroupIds = a })
. _List
rslsSecurityGroups :: Lens' RequestSpotLaunchSpecification [Text]
rslsSecurityGroups =
lens _rslsSecurityGroups (\s a -> s { _rslsSecurityGroups = a })
. _List
rslsSubnetId :: Lens' RequestSpotLaunchSpecification (Maybe Text)
rslsSubnetId = lens _rslsSubnetId (\s a -> s { _rslsSubnetId = a })
rslsUserData :: Lens' RequestSpotLaunchSpecification (Maybe Text)
rslsUserData = lens _rslsUserData (\s a -> s { _rslsUserData = a })
instance FromXML RequestSpotLaunchSpecification where
parseXML x = RequestSpotLaunchSpecification
<$> x .@? "addressingType"
<*> x .@ "blockDeviceMapping"
<*> x .@? "ebsOptimized"
<*> x .@? "iamInstanceProfile"
<*> x .@? "imageId"
<*> x .@? "instanceType"
<*> x .@? "kernelId"
<*> x .@? "keyName"
<*> x .@? "monitoring"
<*> x .@ "NetworkInterface"
<*> x .@? "placement"
<*> x .@? "ramdiskId"
<*> x .@ "SecurityGroupId"
<*> x .@ "SecurityGroup"
<*> x .@? "subnetId"
<*> x .@? "userData"
instance ToQuery RequestSpotLaunchSpecification where
toQuery RequestSpotLaunchSpecification{..} = mconcat
[ "addressingType" =? _rslsAddressingType
, "blockDeviceMapping" =? _rslsBlockDeviceMappings
, "ebsOptimized" =? _rslsEbsOptimized
, "iamInstanceProfile" =? _rslsIamInstanceProfile
, "imageId" =? _rslsImageId
, "instanceType" =? _rslsInstanceType
, "kernelId" =? _rslsKernelId
, "keyName" =? _rslsKeyName
, "monitoring" =? _rslsMonitoring
, "NetworkInterface" =? _rslsNetworkInterfaces
, "placement" =? _rslsPlacement
, "ramdiskId" =? _rslsRamdiskId
, "SecurityGroupId" =? _rslsSecurityGroupIds
, "SecurityGroup" =? _rslsSecurityGroups
, "subnetId" =? _rslsSubnetId
, "userData" =? _rslsUserData
]
newtype VolumeDetail = VolumeDetail
{ _vdSize :: Integer
} deriving (Eq, Ord, Show, Enum, Num, Integral, Real)
volumeDetail :: Integer
-> VolumeDetail
volumeDetail p1 = VolumeDetail
{ _vdSize = p1
}
vdSize :: Lens' VolumeDetail Integer
vdSize = lens _vdSize (\s a -> s { _vdSize = a })
instance FromXML VolumeDetail where
parseXML x = VolumeDetail
<$> x .@ "size"
instance ToQuery VolumeDetail where
toQuery VolumeDetail{..} = mconcat
[ "size" =? _vdSize
]
data PricingDetail = PricingDetail
{ _pdCount :: Maybe Int
, _pdPrice :: Maybe Double
} deriving (Eq, Ord, Show)
pricingDetail :: PricingDetail
pricingDetail = PricingDetail
{ _pdPrice = Nothing
, _pdCount = Nothing
}
pdCount :: Lens' PricingDetail (Maybe Int)
pdCount = lens _pdCount (\s a -> s { _pdCount = a })
pdPrice :: Lens' PricingDetail (Maybe Double)
pdPrice = lens _pdPrice (\s a -> s { _pdPrice = a })
instance FromXML PricingDetail where
parseXML x = PricingDetail
<$> x .@? "count"
<*> x .@? "price"
instance ToQuery PricingDetail where
toQuery PricingDetail{..} = mconcat
[ "count" =? _pdCount
, "price" =? _pdPrice
]
data NetworkInterfacePrivateIpAddress = NetworkInterfacePrivateIpAddress
{ _nipiaAssociation :: Maybe NetworkInterfaceAssociation
, _nipiaPrimary :: Maybe Bool
, _nipiaPrivateDnsName :: Maybe Text
, _nipiaPrivateIpAddress :: Maybe Text
} deriving (Eq, Show)
networkInterfacePrivateIpAddress :: NetworkInterfacePrivateIpAddress
networkInterfacePrivateIpAddress = NetworkInterfacePrivateIpAddress
{ _nipiaPrivateIpAddress = Nothing
, _nipiaPrivateDnsName = Nothing
, _nipiaPrimary = Nothing
, _nipiaAssociation = Nothing
}
nipiaAssociation :: Lens' NetworkInterfacePrivateIpAddress (Maybe NetworkInterfaceAssociation)
nipiaAssociation = lens _nipiaAssociation (\s a -> s { _nipiaAssociation = a })
nipiaPrimary :: Lens' NetworkInterfacePrivateIpAddress (Maybe Bool)
nipiaPrimary = lens _nipiaPrimary (\s a -> s { _nipiaPrimary = a })
nipiaPrivateDnsName :: Lens' NetworkInterfacePrivateIpAddress (Maybe Text)
nipiaPrivateDnsName =
lens _nipiaPrivateDnsName (\s a -> s { _nipiaPrivateDnsName = a })
nipiaPrivateIpAddress :: Lens' NetworkInterfacePrivateIpAddress (Maybe Text)
nipiaPrivateIpAddress =
lens _nipiaPrivateIpAddress (\s a -> s { _nipiaPrivateIpAddress = a })
instance FromXML NetworkInterfacePrivateIpAddress where
parseXML x = NetworkInterfacePrivateIpAddress
<$> x .@? "association"
<*> x .@? "primary"
<*> x .@? "privateDnsName"
<*> x .@? "privateIpAddress"
instance ToQuery NetworkInterfacePrivateIpAddress where
toQuery NetworkInterfacePrivateIpAddress{..} = mconcat
[ "association" =? _nipiaAssociation
, "primary" =? _nipiaPrimary
, "privateDnsName" =? _nipiaPrivateDnsName
, "privateIpAddress" =? _nipiaPrivateIpAddress
]
data DiskImageFormat
= Raw
| Vhd
| Vmdk
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable DiskImageFormat
instance FromText DiskImageFormat where
parser = match "RAW" Raw
<|> match "VHD" Vhd
<|> match "VMDK" Vmdk
instance ToText DiskImageFormat where
toText = \case
Raw -> "RAW"
Vhd -> "VHD"
Vmdk -> "VMDK"
instance FromXML DiskImageFormat where
parseXML = parseXMLText "DiskImageFormat"
instance ToQuery DiskImageFormat where
toQuery = toQuery . toText
data BundleTaskError = BundleTaskError
{ _bteCode :: Maybe Text
, _bteMessage :: Maybe Text
} deriving (Eq, Ord, Show)
bundleTaskError :: BundleTaskError
bundleTaskError = BundleTaskError
{ _bteCode = Nothing
, _bteMessage = Nothing
}
bteCode :: Lens' BundleTaskError (Maybe Text)
bteCode = lens _bteCode (\s a -> s { _bteCode = a })
bteMessage :: Lens' BundleTaskError (Maybe Text)
bteMessage = lens _bteMessage (\s a -> s { _bteMessage = a })
instance FromXML BundleTaskError where
parseXML x = BundleTaskError
<$> x .@? "code"
<*> x .@? "message"
instance ToQuery BundleTaskError where
toQuery BundleTaskError{..} = mconcat
[ "code" =? _bteCode
, "message" =? _bteMessage
]
data VolumeStatusItem = VolumeStatusItem
{ _vsiActions :: List "item" VolumeStatusAction
, _vsiAvailabilityZone :: Maybe Text
, _vsiEvents :: List "item" VolumeStatusEvent
, _vsiVolumeId :: Maybe Text
, _vsiVolumeStatus :: Maybe VolumeStatusInfo
} deriving (Eq, Show)
volumeStatusItem :: VolumeStatusItem
volumeStatusItem = VolumeStatusItem
{ _vsiVolumeId = Nothing
, _vsiAvailabilityZone = Nothing
, _vsiVolumeStatus = Nothing
, _vsiEvents = mempty
, _vsiActions = mempty
}
vsiActions :: Lens' VolumeStatusItem [VolumeStatusAction]
vsiActions = lens _vsiActions (\s a -> s { _vsiActions = a }) . _List
vsiAvailabilityZone :: Lens' VolumeStatusItem (Maybe Text)
vsiAvailabilityZone =
lens _vsiAvailabilityZone (\s a -> s { _vsiAvailabilityZone = a })
vsiEvents :: Lens' VolumeStatusItem [VolumeStatusEvent]
vsiEvents = lens _vsiEvents (\s a -> s { _vsiEvents = a }) . _List
vsiVolumeId :: Lens' VolumeStatusItem (Maybe Text)
vsiVolumeId = lens _vsiVolumeId (\s a -> s { _vsiVolumeId = a })
vsiVolumeStatus :: Lens' VolumeStatusItem (Maybe VolumeStatusInfo)
vsiVolumeStatus = lens _vsiVolumeStatus (\s a -> s { _vsiVolumeStatus = a })
instance FromXML VolumeStatusItem where
parseXML x = VolumeStatusItem
<$> x .@ "actionsSet"
<*> x .@? "availabilityZone"
<*> x .@ "eventsSet"
<*> x .@? "volumeId"
<*> x .@? "volumeStatus"
instance ToQuery VolumeStatusItem where
toQuery VolumeStatusItem{..} = mconcat
[ "actionsSet" =? _vsiActions
, "availabilityZone" =? _vsiAvailabilityZone
, "eventsSet" =? _vsiEvents
, "volumeId" =? _vsiVolumeId
, "volumeStatus" =? _vsiVolumeStatus
]