module Network.AWS.DirectConnect.Types
(
directConnect
, _DirectConnectClientException
, _DirectConnectServerException
, ConnectionState (..)
, InterconnectState (..)
, VirtualInterfaceState (..)
, Connection
, connection
, cVlan
, cLocation
, cConnectionId
, cPartnerName
, cConnectionName
, cBandwidth
, cOwnerAccount
, cRegion
, cConnectionState
, Connections
, connections
, cConnections
, Interconnect
, interconnect
, iInterconnectId
, iLocation
, iInterconnectName
, iBandwidth
, iInterconnectState
, iRegion
, Location
, location
, lLocationName
, lLocationCode
, NewPrivateVirtualInterface
, newPrivateVirtualInterface
, nCustomerAddress
, nAmazonAddress
, nAuthKey
, nVirtualInterfaceName
, nVlan
, nAsn
, nVirtualGatewayId
, NewPrivateVirtualInterfaceAllocation
, newPrivateVirtualInterfaceAllocation
, npviaCustomerAddress
, npviaAmazonAddress
, npviaAuthKey
, npviaVirtualInterfaceName
, npviaVlan
, npviaAsn
, NewPublicVirtualInterface
, newPublicVirtualInterface
, npviAuthKey
, npviVirtualInterfaceName
, npviVlan
, npviAsn
, npviAmazonAddress
, npviCustomerAddress
, npviRouteFilterPrefixes
, NewPublicVirtualInterfaceAllocation
, newPublicVirtualInterfaceAllocation
, newAuthKey
, newVirtualInterfaceName
, newVlan
, newAsn
, newAmazonAddress
, newCustomerAddress
, newRouteFilterPrefixes
, RouteFilterPrefix
, routeFilterPrefix
, rfpCidr
, VirtualGateway
, virtualGateway
, vgVirtualGatewayId
, vgVirtualGatewayState
, VirtualInterface
, virtualInterface
, viVirtualGatewayId
, viRouteFilterPrefixes
, viCustomerAddress
, viVlan
, viLocation
, viAmazonAddress
, viVirtualInterfaceState
, viConnectionId
, viVirtualInterfaceType
, viAsn
, viAuthKey
, viCustomerRouterConfig
, viOwnerAccount
, viVirtualInterfaceName
, viVirtualInterfaceId
) where
import Network.AWS.DirectConnect.Types.Product
import Network.AWS.DirectConnect.Types.Sum
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
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| has (hasCode "ThrottlingException" . hasStatus 400) e =
Just "throttling_exception"
| has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
| 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 =
_ServiceError . hasCode "DirectConnectClientException"
_DirectConnectServerException :: AsError a => Getting (First ServiceError) a ServiceError
_DirectConnectServerException =
_ServiceError . hasCode "DirectConnectServerException"