{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.ELBv2.Types.Product where
import Network.AWS.ELBv2.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data Action = Action'
{ _aType :: !ActionTypeEnum
, _aTargetGroupARN :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
action
:: ActionTypeEnum
-> Text
-> Action
action pType_ pTargetGroupARN_ =
Action'
{ _aType = pType_
, _aTargetGroupARN = pTargetGroupARN_
}
aType :: Lens' Action ActionTypeEnum
aType = lens _aType (\ s a -> s{_aType = a});
aTargetGroupARN :: Lens' Action Text
aTargetGroupARN = lens _aTargetGroupARN (\ s a -> s{_aTargetGroupARN = a});
instance FromXML Action where
parseXML x
= Action' <$>
(x .@ "Type") <*> (x .@ "TargetGroupArn")
instance Hashable Action
instance NFData Action
instance ToQuery Action where
toQuery Action'{..}
= mconcat
["Type" =: _aType,
"TargetGroupArn" =: _aTargetGroupARN]
data AvailabilityZone = AvailabilityZone'
{ _azSubnetId :: !(Maybe Text)
, _azZoneName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
availabilityZone
:: AvailabilityZone
availabilityZone =
AvailabilityZone'
{ _azSubnetId = Nothing
, _azZoneName = Nothing
}
azSubnetId :: Lens' AvailabilityZone (Maybe Text)
azSubnetId = lens _azSubnetId (\ s a -> s{_azSubnetId = a});
azZoneName :: Lens' AvailabilityZone (Maybe Text)
azZoneName = lens _azZoneName (\ s a -> s{_azZoneName = a});
instance FromXML AvailabilityZone where
parseXML x
= AvailabilityZone' <$>
(x .@? "SubnetId") <*> (x .@? "ZoneName")
instance Hashable AvailabilityZone
instance NFData AvailabilityZone
newtype Certificate = Certificate'
{ _cCertificateARN :: Maybe Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
certificate
:: Certificate
certificate =
Certificate'
{ _cCertificateARN = Nothing
}
cCertificateARN :: Lens' Certificate (Maybe Text)
cCertificateARN = lens _cCertificateARN (\ s a -> s{_cCertificateARN = a});
instance FromXML Certificate where
parseXML x
= Certificate' <$> (x .@? "CertificateArn")
instance Hashable Certificate
instance NFData Certificate
instance ToQuery Certificate where
toQuery Certificate'{..}
= mconcat ["CertificateArn" =: _cCertificateARN]
data Cipher = Cipher'
{ _cPriority :: !(Maybe Int)
, _cName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
cipher
:: Cipher
cipher =
Cipher'
{ _cPriority = Nothing
, _cName = Nothing
}
cPriority :: Lens' Cipher (Maybe Int)
cPriority = lens _cPriority (\ s a -> s{_cPriority = a});
cName :: Lens' Cipher (Maybe Text)
cName = lens _cName (\ s a -> s{_cName = a});
instance FromXML Cipher where
parseXML x
= Cipher' <$> (x .@? "Priority") <*> (x .@? "Name")
instance Hashable Cipher
instance NFData Cipher
data Listener = Listener'
{ _lSSLPolicy :: !(Maybe Text)
, _lListenerARN :: !(Maybe Text)
, _lProtocol :: !(Maybe ProtocolEnum)
, _lDefaultActions :: !(Maybe [Action])
, _lCertificates :: !(Maybe [Certificate])
, _lLoadBalancerARN :: !(Maybe Text)
, _lPort :: !(Maybe Nat)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
listener
:: Listener
listener =
Listener'
{ _lSSLPolicy = Nothing
, _lListenerARN = Nothing
, _lProtocol = Nothing
, _lDefaultActions = Nothing
, _lCertificates = Nothing
, _lLoadBalancerARN = Nothing
, _lPort = Nothing
}
lSSLPolicy :: Lens' Listener (Maybe Text)
lSSLPolicy = lens _lSSLPolicy (\ s a -> s{_lSSLPolicy = a});
lListenerARN :: Lens' Listener (Maybe Text)
lListenerARN = lens _lListenerARN (\ s a -> s{_lListenerARN = a});
lProtocol :: Lens' Listener (Maybe ProtocolEnum)
lProtocol = lens _lProtocol (\ s a -> s{_lProtocol = a});
lDefaultActions :: Lens' Listener [Action]
lDefaultActions = lens _lDefaultActions (\ s a -> s{_lDefaultActions = a}) . _Default . _Coerce;
lCertificates :: Lens' Listener [Certificate]
lCertificates = lens _lCertificates (\ s a -> s{_lCertificates = a}) . _Default . _Coerce;
lLoadBalancerARN :: Lens' Listener (Maybe Text)
lLoadBalancerARN = lens _lLoadBalancerARN (\ s a -> s{_lLoadBalancerARN = a});
lPort :: Lens' Listener (Maybe Natural)
lPort = lens _lPort (\ s a -> s{_lPort = a}) . mapping _Nat;
instance FromXML Listener where
parseXML x
= Listener' <$>
(x .@? "SslPolicy") <*> (x .@? "ListenerArn") <*>
(x .@? "Protocol")
<*>
(x .@? "DefaultActions" .!@ mempty >>=
may (parseXMLList "member"))
<*>
(x .@? "Certificates" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "LoadBalancerArn")
<*> (x .@? "Port")
instance Hashable Listener
instance NFData Listener
data LoadBalancer = LoadBalancer'
{ _lbState :: !(Maybe LoadBalancerState)
, _lbSecurityGroups :: !(Maybe [Text])
, _lbLoadBalancerName :: !(Maybe Text)
, _lbCreatedTime :: !(Maybe ISO8601)
, _lbVPCId :: !(Maybe Text)
, _lbCanonicalHostedZoneId :: !(Maybe Text)
, _lbAvailabilityZones :: !(Maybe [AvailabilityZone])
, _lbLoadBalancerARN :: !(Maybe Text)
, _lbScheme :: !(Maybe LoadBalancerSchemeEnum)
, _lbType :: !(Maybe LoadBalancerTypeEnum)
, _lbDNSName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
loadBalancer
:: LoadBalancer
loadBalancer =
LoadBalancer'
{ _lbState = Nothing
, _lbSecurityGroups = Nothing
, _lbLoadBalancerName = Nothing
, _lbCreatedTime = Nothing
, _lbVPCId = Nothing
, _lbCanonicalHostedZoneId = Nothing
, _lbAvailabilityZones = Nothing
, _lbLoadBalancerARN = Nothing
, _lbScheme = Nothing
, _lbType = Nothing
, _lbDNSName = Nothing
}
lbState :: Lens' LoadBalancer (Maybe LoadBalancerState)
lbState = lens _lbState (\ s a -> s{_lbState = a});
lbSecurityGroups :: Lens' LoadBalancer [Text]
lbSecurityGroups = lens _lbSecurityGroups (\ s a -> s{_lbSecurityGroups = a}) . _Default . _Coerce;
lbLoadBalancerName :: Lens' LoadBalancer (Maybe Text)
lbLoadBalancerName = lens _lbLoadBalancerName (\ s a -> s{_lbLoadBalancerName = a});
lbCreatedTime :: Lens' LoadBalancer (Maybe UTCTime)
lbCreatedTime = lens _lbCreatedTime (\ s a -> s{_lbCreatedTime = a}) . mapping _Time;
lbVPCId :: Lens' LoadBalancer (Maybe Text)
lbVPCId = lens _lbVPCId (\ s a -> s{_lbVPCId = a});
lbCanonicalHostedZoneId :: Lens' LoadBalancer (Maybe Text)
lbCanonicalHostedZoneId = lens _lbCanonicalHostedZoneId (\ s a -> s{_lbCanonicalHostedZoneId = a});
lbAvailabilityZones :: Lens' LoadBalancer [AvailabilityZone]
lbAvailabilityZones = lens _lbAvailabilityZones (\ s a -> s{_lbAvailabilityZones = a}) . _Default . _Coerce;
lbLoadBalancerARN :: Lens' LoadBalancer (Maybe Text)
lbLoadBalancerARN = lens _lbLoadBalancerARN (\ s a -> s{_lbLoadBalancerARN = a});
lbScheme :: Lens' LoadBalancer (Maybe LoadBalancerSchemeEnum)
lbScheme = lens _lbScheme (\ s a -> s{_lbScheme = a});
lbType :: Lens' LoadBalancer (Maybe LoadBalancerTypeEnum)
lbType = lens _lbType (\ s a -> s{_lbType = a});
lbDNSName :: Lens' LoadBalancer (Maybe Text)
lbDNSName = lens _lbDNSName (\ s a -> s{_lbDNSName = a});
instance FromXML LoadBalancer where
parseXML x
= LoadBalancer' <$>
(x .@? "State") <*>
(x .@? "SecurityGroups" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "LoadBalancerName")
<*> (x .@? "CreatedTime")
<*> (x .@? "VpcId")
<*> (x .@? "CanonicalHostedZoneId")
<*>
(x .@? "AvailabilityZones" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "LoadBalancerArn")
<*> (x .@? "Scheme")
<*> (x .@? "Type")
<*> (x .@? "DNSName")
instance Hashable LoadBalancer
instance NFData LoadBalancer
data LoadBalancerAttribute = LoadBalancerAttribute'
{ _lbaValue :: !(Maybe Text)
, _lbaKey :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
loadBalancerAttribute
:: LoadBalancerAttribute
loadBalancerAttribute =
LoadBalancerAttribute'
{ _lbaValue = Nothing
, _lbaKey = Nothing
}
lbaValue :: Lens' LoadBalancerAttribute (Maybe Text)
lbaValue = lens _lbaValue (\ s a -> s{_lbaValue = a});
lbaKey :: Lens' LoadBalancerAttribute (Maybe Text)
lbaKey = lens _lbaKey (\ s a -> s{_lbaKey = a});
instance FromXML LoadBalancerAttribute where
parseXML x
= LoadBalancerAttribute' <$>
(x .@? "Value") <*> (x .@? "Key")
instance Hashable LoadBalancerAttribute
instance NFData LoadBalancerAttribute
instance ToQuery LoadBalancerAttribute where
toQuery LoadBalancerAttribute'{..}
= mconcat ["Value" =: _lbaValue, "Key" =: _lbaKey]
data LoadBalancerState = LoadBalancerState'
{ _lbsReason :: !(Maybe Text)
, _lbsCode :: !(Maybe LoadBalancerStateEnum)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
loadBalancerState
:: LoadBalancerState
loadBalancerState =
LoadBalancerState'
{ _lbsReason = Nothing
, _lbsCode = Nothing
}
lbsReason :: Lens' LoadBalancerState (Maybe Text)
lbsReason = lens _lbsReason (\ s a -> s{_lbsReason = a});
lbsCode :: Lens' LoadBalancerState (Maybe LoadBalancerStateEnum)
lbsCode = lens _lbsCode (\ s a -> s{_lbsCode = a});
instance FromXML LoadBalancerState where
parseXML x
= LoadBalancerState' <$>
(x .@? "Reason") <*> (x .@? "Code")
instance Hashable LoadBalancerState
instance NFData LoadBalancerState
newtype Matcher = Matcher'
{ _mHTTPCode :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
matcher
:: Text
-> Matcher
matcher pHTTPCode_ =
Matcher'
{ _mHTTPCode = pHTTPCode_
}
mHTTPCode :: Lens' Matcher Text
mHTTPCode = lens _mHTTPCode (\ s a -> s{_mHTTPCode = a});
instance FromXML Matcher where
parseXML x = Matcher' <$> (x .@ "HttpCode")
instance Hashable Matcher
instance NFData Matcher
instance ToQuery Matcher where
toQuery Matcher'{..}
= mconcat ["HttpCode" =: _mHTTPCode]
data Rule = Rule'
{ _rPriority :: !(Maybe Text)
, _rActions :: !(Maybe [Action])
, _rConditions :: !(Maybe [RuleCondition])
, _rRuleARN :: !(Maybe Text)
, _rIsDefault :: !(Maybe Bool)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
rule
:: Rule
rule =
Rule'
{ _rPriority = Nothing
, _rActions = Nothing
, _rConditions = Nothing
, _rRuleARN = Nothing
, _rIsDefault = Nothing
}
rPriority :: Lens' Rule (Maybe Text)
rPriority = lens _rPriority (\ s a -> s{_rPriority = a});
rActions :: Lens' Rule [Action]
rActions = lens _rActions (\ s a -> s{_rActions = a}) . _Default . _Coerce;
rConditions :: Lens' Rule [RuleCondition]
rConditions = lens _rConditions (\ s a -> s{_rConditions = a}) . _Default . _Coerce;
rRuleARN :: Lens' Rule (Maybe Text)
rRuleARN = lens _rRuleARN (\ s a -> s{_rRuleARN = a});
rIsDefault :: Lens' Rule (Maybe Bool)
rIsDefault = lens _rIsDefault (\ s a -> s{_rIsDefault = a});
instance FromXML Rule where
parseXML x
= Rule' <$>
(x .@? "Priority") <*>
(x .@? "Actions" .!@ mempty >>=
may (parseXMLList "member"))
<*>
(x .@? "Conditions" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "RuleArn")
<*> (x .@? "IsDefault")
instance Hashable Rule
instance NFData Rule
data RuleCondition = RuleCondition'
{ _rcField :: !(Maybe Text)
, _rcValues :: !(Maybe [Text])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
ruleCondition
:: RuleCondition
ruleCondition =
RuleCondition'
{ _rcField = Nothing
, _rcValues = Nothing
}
rcField :: Lens' RuleCondition (Maybe Text)
rcField = lens _rcField (\ s a -> s{_rcField = a});
rcValues :: Lens' RuleCondition [Text]
rcValues = lens _rcValues (\ s a -> s{_rcValues = a}) . _Default . _Coerce;
instance FromXML RuleCondition where
parseXML x
= RuleCondition' <$>
(x .@? "Field") <*>
(x .@? "Values" .!@ mempty >>=
may (parseXMLList "member"))
instance Hashable RuleCondition
instance NFData RuleCondition
instance ToQuery RuleCondition where
toQuery RuleCondition'{..}
= mconcat
["Field" =: _rcField,
"Values" =:
toQuery (toQueryList "member" <$> _rcValues)]
data RulePriorityPair = RulePriorityPair'
{ _rppPriority :: !(Maybe Nat)
, _rppRuleARN :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
rulePriorityPair
:: RulePriorityPair
rulePriorityPair =
RulePriorityPair'
{ _rppPriority = Nothing
, _rppRuleARN = Nothing
}
rppPriority :: Lens' RulePriorityPair (Maybe Natural)
rppPriority = lens _rppPriority (\ s a -> s{_rppPriority = a}) . mapping _Nat;
rppRuleARN :: Lens' RulePriorityPair (Maybe Text)
rppRuleARN = lens _rppRuleARN (\ s a -> s{_rppRuleARN = a});
instance Hashable RulePriorityPair
instance NFData RulePriorityPair
instance ToQuery RulePriorityPair where
toQuery RulePriorityPair'{..}
= mconcat
["Priority" =: _rppPriority,
"RuleArn" =: _rppRuleARN]
data SSLPolicy = SSLPolicy'
{ _spCiphers :: !(Maybe [Cipher])
, _spName :: !(Maybe Text)
, _spSSLProtocols :: !(Maybe [Text])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
sslPolicy
:: SSLPolicy
sslPolicy =
SSLPolicy'
{ _spCiphers = Nothing
, _spName = Nothing
, _spSSLProtocols = Nothing
}
spCiphers :: Lens' SSLPolicy [Cipher]
spCiphers = lens _spCiphers (\ s a -> s{_spCiphers = a}) . _Default . _Coerce;
spName :: Lens' SSLPolicy (Maybe Text)
spName = lens _spName (\ s a -> s{_spName = a});
spSSLProtocols :: Lens' SSLPolicy [Text]
spSSLProtocols = lens _spSSLProtocols (\ s a -> s{_spSSLProtocols = a}) . _Default . _Coerce;
instance FromXML SSLPolicy where
parseXML x
= SSLPolicy' <$>
(x .@? "Ciphers" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "Name")
<*>
(x .@? "SslProtocols" .!@ mempty >>=
may (parseXMLList "member"))
instance Hashable SSLPolicy
instance NFData SSLPolicy
data Tag = Tag'
{ _tagValue :: !(Maybe Text)
, _tagKey :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
tag
:: Text
-> Tag
tag pKey_ =
Tag'
{ _tagValue = Nothing
, _tagKey = pKey_
}
tagValue :: Lens' Tag (Maybe Text)
tagValue = lens _tagValue (\ s a -> s{_tagValue = a});
tagKey :: Lens' Tag Text
tagKey = lens _tagKey (\ s a -> s{_tagKey = a});
instance FromXML Tag where
parseXML x
= Tag' <$> (x .@? "Value") <*> (x .@ "Key")
instance Hashable Tag
instance NFData Tag
instance ToQuery Tag where
toQuery Tag'{..}
= mconcat ["Value" =: _tagValue, "Key" =: _tagKey]
data TagDescription = TagDescription'
{ _tdResourceARN :: !(Maybe Text)
, _tdTags :: !(Maybe (List1 Tag))
} deriving (Eq,Read,Show,Data,Typeable,Generic)
tagDescription
:: TagDescription
tagDescription =
TagDescription'
{ _tdResourceARN = Nothing
, _tdTags = Nothing
}
tdResourceARN :: Lens' TagDescription (Maybe Text)
tdResourceARN = lens _tdResourceARN (\ s a -> s{_tdResourceARN = a});
tdTags :: Lens' TagDescription (Maybe (NonEmpty Tag))
tdTags = lens _tdTags (\ s a -> s{_tdTags = a}) . mapping _List1;
instance FromXML TagDescription where
parseXML x
= TagDescription' <$>
(x .@? "ResourceArn") <*>
(x .@? "Tags" .!@ mempty >>=
may (parseXMLList1 "member"))
instance Hashable TagDescription
instance NFData TagDescription
data TargetDescription = TargetDescription'
{ _tdPort :: !(Maybe Nat)
, _tdId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
targetDescription
:: Text
-> TargetDescription
targetDescription pId_ =
TargetDescription'
{ _tdPort = Nothing
, _tdId = pId_
}
tdPort :: Lens' TargetDescription (Maybe Natural)
tdPort = lens _tdPort (\ s a -> s{_tdPort = a}) . mapping _Nat;
tdId :: Lens' TargetDescription Text
tdId = lens _tdId (\ s a -> s{_tdId = a});
instance FromXML TargetDescription where
parseXML x
= TargetDescription' <$>
(x .@? "Port") <*> (x .@ "Id")
instance Hashable TargetDescription
instance NFData TargetDescription
instance ToQuery TargetDescription where
toQuery TargetDescription'{..}
= mconcat ["Port" =: _tdPort, "Id" =: _tdId]
data TargetGroup = TargetGroup'
{ _tgMatcher :: !(Maybe Matcher)
, _tgHealthCheckPath :: !(Maybe Text)
, _tgUnhealthyThresholdCount :: !(Maybe Nat)
, _tgVPCId :: !(Maybe Text)
, _tgTargetGroupARN :: !(Maybe Text)
, _tgProtocol :: !(Maybe ProtocolEnum)
, _tgHealthCheckIntervalSeconds :: !(Maybe Nat)
, _tgHealthyThresholdCount :: !(Maybe Nat)
, _tgHealthCheckProtocol :: !(Maybe ProtocolEnum)
, _tgLoadBalancerARNs :: !(Maybe [Text])
, _tgHealthCheckTimeoutSeconds :: !(Maybe Nat)
, _tgHealthCheckPort :: !(Maybe Text)
, _tgTargetGroupName :: !(Maybe Text)
, _tgPort :: !(Maybe Nat)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
targetGroup
:: TargetGroup
targetGroup =
TargetGroup'
{ _tgMatcher = Nothing
, _tgHealthCheckPath = Nothing
, _tgUnhealthyThresholdCount = Nothing
, _tgVPCId = Nothing
, _tgTargetGroupARN = Nothing
, _tgProtocol = Nothing
, _tgHealthCheckIntervalSeconds = Nothing
, _tgHealthyThresholdCount = Nothing
, _tgHealthCheckProtocol = Nothing
, _tgLoadBalancerARNs = Nothing
, _tgHealthCheckTimeoutSeconds = Nothing
, _tgHealthCheckPort = Nothing
, _tgTargetGroupName = Nothing
, _tgPort = Nothing
}
tgMatcher :: Lens' TargetGroup (Maybe Matcher)
tgMatcher = lens _tgMatcher (\ s a -> s{_tgMatcher = a});
tgHealthCheckPath :: Lens' TargetGroup (Maybe Text)
tgHealthCheckPath = lens _tgHealthCheckPath (\ s a -> s{_tgHealthCheckPath = a});
tgUnhealthyThresholdCount :: Lens' TargetGroup (Maybe Natural)
tgUnhealthyThresholdCount = lens _tgUnhealthyThresholdCount (\ s a -> s{_tgUnhealthyThresholdCount = a}) . mapping _Nat;
tgVPCId :: Lens' TargetGroup (Maybe Text)
tgVPCId = lens _tgVPCId (\ s a -> s{_tgVPCId = a});
tgTargetGroupARN :: Lens' TargetGroup (Maybe Text)
tgTargetGroupARN = lens _tgTargetGroupARN (\ s a -> s{_tgTargetGroupARN = a});
tgProtocol :: Lens' TargetGroup (Maybe ProtocolEnum)
tgProtocol = lens _tgProtocol (\ s a -> s{_tgProtocol = a});
tgHealthCheckIntervalSeconds :: Lens' TargetGroup (Maybe Natural)
tgHealthCheckIntervalSeconds = lens _tgHealthCheckIntervalSeconds (\ s a -> s{_tgHealthCheckIntervalSeconds = a}) . mapping _Nat;
tgHealthyThresholdCount :: Lens' TargetGroup (Maybe Natural)
tgHealthyThresholdCount = lens _tgHealthyThresholdCount (\ s a -> s{_tgHealthyThresholdCount = a}) . mapping _Nat;
tgHealthCheckProtocol :: Lens' TargetGroup (Maybe ProtocolEnum)
tgHealthCheckProtocol = lens _tgHealthCheckProtocol (\ s a -> s{_tgHealthCheckProtocol = a});
tgLoadBalancerARNs :: Lens' TargetGroup [Text]
tgLoadBalancerARNs = lens _tgLoadBalancerARNs (\ s a -> s{_tgLoadBalancerARNs = a}) . _Default . _Coerce;
tgHealthCheckTimeoutSeconds :: Lens' TargetGroup (Maybe Natural)
tgHealthCheckTimeoutSeconds = lens _tgHealthCheckTimeoutSeconds (\ s a -> s{_tgHealthCheckTimeoutSeconds = a}) . mapping _Nat;
tgHealthCheckPort :: Lens' TargetGroup (Maybe Text)
tgHealthCheckPort = lens _tgHealthCheckPort (\ s a -> s{_tgHealthCheckPort = a});
tgTargetGroupName :: Lens' TargetGroup (Maybe Text)
tgTargetGroupName = lens _tgTargetGroupName (\ s a -> s{_tgTargetGroupName = a});
tgPort :: Lens' TargetGroup (Maybe Natural)
tgPort = lens _tgPort (\ s a -> s{_tgPort = a}) . mapping _Nat;
instance FromXML TargetGroup where
parseXML x
= TargetGroup' <$>
(x .@? "Matcher") <*> (x .@? "HealthCheckPath") <*>
(x .@? "UnhealthyThresholdCount")
<*> (x .@? "VpcId")
<*> (x .@? "TargetGroupArn")
<*> (x .@? "Protocol")
<*> (x .@? "HealthCheckIntervalSeconds")
<*> (x .@? "HealthyThresholdCount")
<*> (x .@? "HealthCheckProtocol")
<*>
(x .@? "LoadBalancerArns" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "HealthCheckTimeoutSeconds")
<*> (x .@? "HealthCheckPort")
<*> (x .@? "TargetGroupName")
<*> (x .@? "Port")
instance Hashable TargetGroup
instance NFData TargetGroup
data TargetGroupAttribute = TargetGroupAttribute'
{ _tgaValue :: !(Maybe Text)
, _tgaKey :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
targetGroupAttribute
:: TargetGroupAttribute
targetGroupAttribute =
TargetGroupAttribute'
{ _tgaValue = Nothing
, _tgaKey = Nothing
}
tgaValue :: Lens' TargetGroupAttribute (Maybe Text)
tgaValue = lens _tgaValue (\ s a -> s{_tgaValue = a});
tgaKey :: Lens' TargetGroupAttribute (Maybe Text)
tgaKey = lens _tgaKey (\ s a -> s{_tgaKey = a});
instance FromXML TargetGroupAttribute where
parseXML x
= TargetGroupAttribute' <$>
(x .@? "Value") <*> (x .@? "Key")
instance Hashable TargetGroupAttribute
instance NFData TargetGroupAttribute
instance ToQuery TargetGroupAttribute where
toQuery TargetGroupAttribute'{..}
= mconcat ["Value" =: _tgaValue, "Key" =: _tgaKey]
data TargetHealth = TargetHealth'
{ _thState :: !(Maybe TargetHealthStateEnum)
, _thReason :: !(Maybe TargetHealthReasonEnum)
, _thDescription :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
targetHealth
:: TargetHealth
targetHealth =
TargetHealth'
{ _thState = Nothing
, _thReason = Nothing
, _thDescription = Nothing
}
thState :: Lens' TargetHealth (Maybe TargetHealthStateEnum)
thState = lens _thState (\ s a -> s{_thState = a});
thReason :: Lens' TargetHealth (Maybe TargetHealthReasonEnum)
thReason = lens _thReason (\ s a -> s{_thReason = a});
thDescription :: Lens' TargetHealth (Maybe Text)
thDescription = lens _thDescription (\ s a -> s{_thDescription = a});
instance FromXML TargetHealth where
parseXML x
= TargetHealth' <$>
(x .@? "State") <*> (x .@? "Reason") <*>
(x .@? "Description")
instance Hashable TargetHealth
instance NFData TargetHealth
data TargetHealthDescription = TargetHealthDescription'
{ _thdTargetHealth :: !(Maybe TargetHealth)
, _thdHealthCheckPort :: !(Maybe Text)
, _thdTarget :: !(Maybe TargetDescription)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
targetHealthDescription
:: TargetHealthDescription
targetHealthDescription =
TargetHealthDescription'
{ _thdTargetHealth = Nothing
, _thdHealthCheckPort = Nothing
, _thdTarget = Nothing
}
thdTargetHealth :: Lens' TargetHealthDescription (Maybe TargetHealth)
thdTargetHealth = lens _thdTargetHealth (\ s a -> s{_thdTargetHealth = a});
thdHealthCheckPort :: Lens' TargetHealthDescription (Maybe Text)
thdHealthCheckPort = lens _thdHealthCheckPort (\ s a -> s{_thdHealthCheckPort = a});
thdTarget :: Lens' TargetHealthDescription (Maybe TargetDescription)
thdTarget = lens _thdTarget (\ s a -> s{_thdTarget = a});
instance FromXML TargetHealthDescription where
parseXML x
= TargetHealthDescription' <$>
(x .@? "TargetHealth") <*> (x .@? "HealthCheckPort")
<*> (x .@? "Target")
instance Hashable TargetHealthDescription
instance NFData TargetHealthDescription