{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.DirectConnect.Types
(
directConnect
, _DirectConnectClientException
, _DuplicateTagKeysException
, _TooManyTagsException
, _DirectConnectServerException
, AddressFamily (..)
, BGPPeerState (..)
, BGPStatus (..)
, ConnectionState (..)
, DirectConnectGatewayAssociationState (..)
, DirectConnectGatewayAttachmentState (..)
, DirectConnectGatewayState (..)
, InterconnectState (..)
, LagState (..)
, LoaContentType (..)
, VirtualInterfaceState (..)
, BGPPeer
, bgpPeer
, bpCustomerAddress
, bpAmazonAddress
, bpAddressFamily
, bpBgpStatus
, bpAsn
, bpAuthKey
, bpBgpPeerState
, Connection
, connection
, cLagId
, cVlan
, cLocation
, cAwsDevice
, cConnectionId
, cLoaIssueTime
, cPartnerName
, cConnectionName
, cBandwidth
, cOwnerAccount
, cRegion
, cConnectionState
, Connections
, connections
, cConnections
, DirectConnectGateway
, directConnectGateway
, dcgDirectConnectGatewayId
, dcgStateChangeError
, dcgAmazonSideASN
, dcgDirectConnectGatewayName
, dcgDirectConnectGatewayState
, dcgOwnerAccount
, DirectConnectGatewayAssociation
, directConnectGatewayAssociation
, dcgaVirtualGatewayId
, dcgaDirectConnectGatewayId
, dcgaVirtualGatewayOwnerAccount
, dcgaStateChangeError
, dcgaVirtualGatewayRegion
, dcgaAssociationState
, DirectConnectGatewayAttachment
, directConnectGatewayAttachment
, dDirectConnectGatewayId
, dAttachmentState
, dStateChangeError
, dVirtualInterfaceRegion
, dVirtualInterfaceOwnerAccount
, dVirtualInterfaceId
, Interconnect
, interconnect
, iLagId
, iInterconnectId
, iLocation
, iInterconnectName
, iAwsDevice
, iLoaIssueTime
, iBandwidth
, iInterconnectState
, iRegion
, Lag
, lag
, lagLagId
, lagConnectionsBandwidth
, lagMinimumLinks
, lagLagName
, lagLocation
, lagConnections
, lagAwsDevice
, lagAllowsHostedConnections
, lagNumberOfConnections
, lagLagState
, lagOwnerAccount
, lagRegion
, Location
, location
, lLocationName
, lLocationCode
, NewBGPPeer
, newBGPPeer
, nbpCustomerAddress
, nbpAmazonAddress
, nbpAddressFamily
, nbpAsn
, nbpAuthKey
, NewPrivateVirtualInterface
, newPrivateVirtualInterface
, nVirtualGatewayId
, nCustomerAddress
, nAmazonAddress
, nAddressFamily
, nDirectConnectGatewayId
, nAuthKey
, nVirtualInterfaceName
, nVlan
, nAsn
, NewPrivateVirtualInterfaceAllocation
, newPrivateVirtualInterfaceAllocation
, npviaCustomerAddress
, npviaAmazonAddress
, npviaAddressFamily
, npviaAuthKey
, npviaVirtualInterfaceName
, npviaVlan
, npviaAsn
, NewPublicVirtualInterface
, newPublicVirtualInterface
, npviRouteFilterPrefixes
, npviCustomerAddress
, npviAmazonAddress
, npviAddressFamily
, npviAuthKey
, npviVirtualInterfaceName
, npviVlan
, npviAsn
, NewPublicVirtualInterfaceAllocation
, newPublicVirtualInterfaceAllocation
, newRouteFilterPrefixes
, newCustomerAddress
, newAmazonAddress
, newAddressFamily
, newAuthKey
, newVirtualInterfaceName
, newVlan
, newAsn
, ResourceTag
, resourceTag
, rtResourceARN
, rtTags
, RouteFilterPrefix
, routeFilterPrefix
, rfpCidr
, Tag
, tag
, tagValue
, tagKey
, VirtualGateway
, virtualGateway
, vgVirtualGatewayId
, vgVirtualGatewayState
, VirtualInterface
, virtualInterface
, viBgpPeers
, viVirtualGatewayId
, viRouteFilterPrefixes
, viCustomerAddress
, viVlan
, viLocation
, viAmazonAddress
, viAddressFamily
, viVirtualInterfaceState
, viConnectionId
, viDirectConnectGatewayId
, viAmazonSideASN
, viVirtualInterfaceType
, viAsn
, viAuthKey
, viCustomerRouterConfig
, viOwnerAccount
, viVirtualInterfaceName
, viVirtualInterfaceId
) where
import Network.AWS.DirectConnect.Types.Product
import Network.AWS.DirectConnect.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Sign.V4
directConnect :: Service
directConnect =
Service
{ _svcAbbrev = "DirectConnect"
, _svcSigner = v4
, _svcPrefix = "directconnect"
, _svcVersion = "2012-10-25"
, _svcEndpoint = defaultEndpoint directConnect
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "DirectConnect"
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| has (hasCode "ThrottledException" . hasStatus 400) e =
Just "throttled_exception"
| has (hasStatus 429) e = Just "too_many_requests"
| has (hasCode "ThrottlingException" . hasStatus 400) e =
Just "throttling_exception"
| has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
| has (hasStatus 504) e = Just "gateway_timeout"
| has (hasCode "RequestThrottledException" . hasStatus 400) e =
Just "request_throttled_exception"
| has (hasStatus 502) e = Just "bad_gateway"
| has (hasStatus 503) e = Just "service_unavailable"
| has (hasStatus 500) e = Just "general_server_error"
| has (hasStatus 509) e = Just "limit_exceeded"
| otherwise = Nothing
_DirectConnectClientException :: AsError a => Getting (First ServiceError) a ServiceError
_DirectConnectClientException =
_MatchServiceError directConnect "DirectConnectClientException"
_DuplicateTagKeysException :: AsError a => Getting (First ServiceError) a ServiceError
_DuplicateTagKeysException =
_MatchServiceError directConnect "DuplicateTagKeysException"
_TooManyTagsException :: AsError a => Getting (First ServiceError) a ServiceError
_TooManyTagsException = _MatchServiceError directConnect "TooManyTagsException"
_DirectConnectServerException :: AsError a => Getting (First ServiceError) a ServiceError
_DirectConnectServerException =
_MatchServiceError directConnect "DirectConnectServerException"