{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.DirectConnect.Types
(
defaultService,
_DirectConnectClientException,
_DirectConnectServerException,
_DuplicateTagKeysException,
_TooManyTagsException,
AddressFamily (..),
BGPPeerState (..),
BGPStatus (..),
ConnectionState (..),
DirectConnectGatewayAssociationProposalState (..),
DirectConnectGatewayAssociationState (..),
DirectConnectGatewayAttachmentState (..),
DirectConnectGatewayAttachmentType (..),
DirectConnectGatewayState (..),
GatewayType (..),
HasLogicalRedundancy (..),
InterconnectState (..),
LagState (..),
LoaContentType (..),
NniPartnerType (..),
VirtualInterfaceState (..),
AssociatedGateway (..),
newAssociatedGateway,
associatedGateway_id,
associatedGateway_ownerAccount,
associatedGateway_region,
associatedGateway_type,
BGPPeer (..),
newBGPPeer,
bGPPeer_addressFamily,
bGPPeer_amazonAddress,
bGPPeer_asn,
bGPPeer_authKey,
bGPPeer_awsDeviceV2,
bGPPeer_awsLogicalDeviceId,
bGPPeer_bgpPeerId,
bGPPeer_bgpPeerState,
bGPPeer_bgpStatus,
bGPPeer_customerAddress,
Connection (..),
newConnection,
connection_awsDevice,
connection_awsDeviceV2,
connection_awsLogicalDeviceId,
connection_bandwidth,
connection_connectionId,
connection_connectionName,
connection_connectionState,
connection_encryptionMode,
connection_hasLogicalRedundancy,
connection_jumboFrameCapable,
connection_lagId,
connection_loaIssueTime,
connection_location,
connection_macSecCapable,
connection_macSecKeys,
connection_ownerAccount,
connection_partnerName,
connection_portEncryptionStatus,
connection_providerName,
connection_region,
connection_tags,
connection_vlan,
Connections (..),
newConnections,
connections_connections,
CustomerAgreement (..),
newCustomerAgreement,
customerAgreement_agreementName,
customerAgreement_status,
DirectConnectGateway (..),
newDirectConnectGateway,
directConnectGateway_amazonSideAsn,
directConnectGateway_directConnectGatewayId,
directConnectGateway_directConnectGatewayName,
directConnectGateway_directConnectGatewayState,
directConnectGateway_ownerAccount,
directConnectGateway_stateChangeError,
DirectConnectGatewayAssociation (..),
newDirectConnectGatewayAssociation,
directConnectGatewayAssociation_allowedPrefixesToDirectConnectGateway,
directConnectGatewayAssociation_associatedGateway,
directConnectGatewayAssociation_associationId,
directConnectGatewayAssociation_associationState,
directConnectGatewayAssociation_directConnectGatewayId,
directConnectGatewayAssociation_directConnectGatewayOwnerAccount,
directConnectGatewayAssociation_stateChangeError,
directConnectGatewayAssociation_virtualGatewayId,
directConnectGatewayAssociation_virtualGatewayOwnerAccount,
directConnectGatewayAssociation_virtualGatewayRegion,
DirectConnectGatewayAssociationProposal (..),
newDirectConnectGatewayAssociationProposal,
directConnectGatewayAssociationProposal_associatedGateway,
directConnectGatewayAssociationProposal_directConnectGatewayId,
directConnectGatewayAssociationProposal_directConnectGatewayOwnerAccount,
directConnectGatewayAssociationProposal_existingAllowedPrefixesToDirectConnectGateway,
directConnectGatewayAssociationProposal_proposalId,
directConnectGatewayAssociationProposal_proposalState,
directConnectGatewayAssociationProposal_requestedAllowedPrefixesToDirectConnectGateway,
DirectConnectGatewayAttachment (..),
newDirectConnectGatewayAttachment,
directConnectGatewayAttachment_attachmentState,
directConnectGatewayAttachment_attachmentType,
directConnectGatewayAttachment_directConnectGatewayId,
directConnectGatewayAttachment_stateChangeError,
directConnectGatewayAttachment_virtualInterfaceId,
directConnectGatewayAttachment_virtualInterfaceOwnerAccount,
directConnectGatewayAttachment_virtualInterfaceRegion,
Interconnect (..),
newInterconnect,
interconnect_awsDevice,
interconnect_awsDeviceV2,
interconnect_awsLogicalDeviceId,
interconnect_bandwidth,
interconnect_hasLogicalRedundancy,
interconnect_interconnectId,
interconnect_interconnectName,
interconnect_interconnectState,
interconnect_jumboFrameCapable,
interconnect_lagId,
interconnect_loaIssueTime,
interconnect_location,
interconnect_providerName,
interconnect_region,
interconnect_tags,
Lag (..),
newLag,
lag_allowsHostedConnections,
lag_awsDevice,
lag_awsDeviceV2,
lag_awsLogicalDeviceId,
lag_connections,
lag_connectionsBandwidth,
lag_encryptionMode,
lag_hasLogicalRedundancy,
lag_jumboFrameCapable,
lag_lagId,
lag_lagName,
lag_lagState,
lag_location,
lag_macSecCapable,
lag_macSecKeys,
lag_minimumLinks,
lag_numberOfConnections,
lag_ownerAccount,
lag_providerName,
lag_region,
lag_tags,
Location (..),
newLocation,
location_availableMacSecPortSpeeds,
location_availablePortSpeeds,
location_availableProviders,
location_locationCode,
location_locationName,
location_region,
MacSecKey (..),
newMacSecKey,
macSecKey_ckn,
macSecKey_secretARN,
macSecKey_startOn,
macSecKey_state,
NewBGPPeer (..),
newNewBGPPeer,
newBGPPeer_addressFamily,
newBGPPeer_amazonAddress,
newBGPPeer_asn,
newBGPPeer_authKey,
newBGPPeer_customerAddress,
NewPrivateVirtualInterface (..),
newNewPrivateVirtualInterface,
newPrivateVirtualInterface_addressFamily,
newPrivateVirtualInterface_amazonAddress,
newPrivateVirtualInterface_authKey,
newPrivateVirtualInterface_customerAddress,
newPrivateVirtualInterface_directConnectGatewayId,
newPrivateVirtualInterface_enableSiteLink,
newPrivateVirtualInterface_mtu,
newPrivateVirtualInterface_tags,
newPrivateVirtualInterface_virtualGatewayId,
newPrivateVirtualInterface_virtualInterfaceName,
newPrivateVirtualInterface_vlan,
newPrivateVirtualInterface_asn,
NewPrivateVirtualInterfaceAllocation (..),
newNewPrivateVirtualInterfaceAllocation,
newPrivateVirtualInterfaceAllocation_addressFamily,
newPrivateVirtualInterfaceAllocation_amazonAddress,
newPrivateVirtualInterfaceAllocation_authKey,
newPrivateVirtualInterfaceAllocation_customerAddress,
newPrivateVirtualInterfaceAllocation_mtu,
newPrivateVirtualInterfaceAllocation_tags,
newPrivateVirtualInterfaceAllocation_virtualInterfaceName,
newPrivateVirtualInterfaceAllocation_vlan,
newPrivateVirtualInterfaceAllocation_asn,
NewPublicVirtualInterface (..),
newNewPublicVirtualInterface,
newPublicVirtualInterface_addressFamily,
newPublicVirtualInterface_amazonAddress,
newPublicVirtualInterface_authKey,
newPublicVirtualInterface_customerAddress,
newPublicVirtualInterface_routeFilterPrefixes,
newPublicVirtualInterface_tags,
newPublicVirtualInterface_virtualInterfaceName,
newPublicVirtualInterface_vlan,
newPublicVirtualInterface_asn,
NewPublicVirtualInterfaceAllocation (..),
newNewPublicVirtualInterfaceAllocation,
newPublicVirtualInterfaceAllocation_addressFamily,
newPublicVirtualInterfaceAllocation_amazonAddress,
newPublicVirtualInterfaceAllocation_authKey,
newPublicVirtualInterfaceAllocation_customerAddress,
newPublicVirtualInterfaceAllocation_routeFilterPrefixes,
newPublicVirtualInterfaceAllocation_tags,
newPublicVirtualInterfaceAllocation_virtualInterfaceName,
newPublicVirtualInterfaceAllocation_vlan,
newPublicVirtualInterfaceAllocation_asn,
NewTransitVirtualInterface (..),
newNewTransitVirtualInterface,
newTransitVirtualInterface_addressFamily,
newTransitVirtualInterface_amazonAddress,
newTransitVirtualInterface_asn,
newTransitVirtualInterface_authKey,
newTransitVirtualInterface_customerAddress,
newTransitVirtualInterface_directConnectGatewayId,
newTransitVirtualInterface_enableSiteLink,
newTransitVirtualInterface_mtu,
newTransitVirtualInterface_tags,
newTransitVirtualInterface_virtualInterfaceName,
newTransitVirtualInterface_vlan,
NewTransitVirtualInterfaceAllocation (..),
newNewTransitVirtualInterfaceAllocation,
newTransitVirtualInterfaceAllocation_addressFamily,
newTransitVirtualInterfaceAllocation_amazonAddress,
newTransitVirtualInterfaceAllocation_asn,
newTransitVirtualInterfaceAllocation_authKey,
newTransitVirtualInterfaceAllocation_customerAddress,
newTransitVirtualInterfaceAllocation_mtu,
newTransitVirtualInterfaceAllocation_tags,
newTransitVirtualInterfaceAllocation_virtualInterfaceName,
newTransitVirtualInterfaceAllocation_vlan,
ResourceTag (..),
newResourceTag,
resourceTag_resourceArn,
resourceTag_tags,
RouteFilterPrefix (..),
newRouteFilterPrefix,
routeFilterPrefix_cidr,
RouterType (..),
newRouterType,
routerType_platform,
routerType_routerTypeIdentifier,
routerType_software,
routerType_vendor,
routerType_xsltTemplateName,
routerType_xsltTemplateNameForMacSec,
Tag (..),
newTag,
tag_value,
tag_key,
VirtualGateway (..),
newVirtualGateway,
virtualGateway_virtualGatewayId,
virtualGateway_virtualGatewayState,
VirtualInterface (..),
newVirtualInterface,
virtualInterface_addressFamily,
virtualInterface_amazonAddress,
virtualInterface_amazonSideAsn,
virtualInterface_asn,
virtualInterface_authKey,
virtualInterface_awsDeviceV2,
virtualInterface_awsLogicalDeviceId,
virtualInterface_bgpPeers,
virtualInterface_connectionId,
virtualInterface_customerAddress,
virtualInterface_customerRouterConfig,
virtualInterface_directConnectGatewayId,
virtualInterface_jumboFrameCapable,
virtualInterface_location,
virtualInterface_mtu,
virtualInterface_ownerAccount,
virtualInterface_region,
virtualInterface_routeFilterPrefixes,
virtualInterface_siteLinkEnabled,
virtualInterface_tags,
virtualInterface_virtualGatewayId,
virtualInterface_virtualInterfaceId,
virtualInterface_virtualInterfaceName,
virtualInterface_virtualInterfaceState,
virtualInterface_virtualInterfaceType,
virtualInterface_vlan,
VirtualInterfaceTestHistory (..),
newVirtualInterfaceTestHistory,
virtualInterfaceTestHistory_bgpPeers,
virtualInterfaceTestHistory_endTime,
virtualInterfaceTestHistory_ownerAccount,
virtualInterfaceTestHistory_startTime,
virtualInterfaceTestHistory_status,
virtualInterfaceTestHistory_testDurationInMinutes,
virtualInterfaceTestHistory_testId,
virtualInterfaceTestHistory_virtualInterfaceId,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.DirectConnect.Types.AddressFamily
import Amazonka.DirectConnect.Types.AssociatedGateway
import Amazonka.DirectConnect.Types.BGPPeer
import Amazonka.DirectConnect.Types.BGPPeerState
import Amazonka.DirectConnect.Types.BGPStatus
import Amazonka.DirectConnect.Types.Connection
import Amazonka.DirectConnect.Types.ConnectionState
import Amazonka.DirectConnect.Types.Connections
import Amazonka.DirectConnect.Types.CustomerAgreement
import Amazonka.DirectConnect.Types.DirectConnectGateway
import Amazonka.DirectConnect.Types.DirectConnectGatewayAssociation
import Amazonka.DirectConnect.Types.DirectConnectGatewayAssociationProposal
import Amazonka.DirectConnect.Types.DirectConnectGatewayAssociationProposalState
import Amazonka.DirectConnect.Types.DirectConnectGatewayAssociationState
import Amazonka.DirectConnect.Types.DirectConnectGatewayAttachment
import Amazonka.DirectConnect.Types.DirectConnectGatewayAttachmentState
import Amazonka.DirectConnect.Types.DirectConnectGatewayAttachmentType
import Amazonka.DirectConnect.Types.DirectConnectGatewayState
import Amazonka.DirectConnect.Types.GatewayType
import Amazonka.DirectConnect.Types.HasLogicalRedundancy
import Amazonka.DirectConnect.Types.Interconnect
import Amazonka.DirectConnect.Types.InterconnectState
import Amazonka.DirectConnect.Types.Lag
import Amazonka.DirectConnect.Types.LagState
import Amazonka.DirectConnect.Types.LoaContentType
import Amazonka.DirectConnect.Types.Location
import Amazonka.DirectConnect.Types.MacSecKey
import Amazonka.DirectConnect.Types.NewBGPPeer
import Amazonka.DirectConnect.Types.NewPrivateVirtualInterface
import Amazonka.DirectConnect.Types.NewPrivateVirtualInterfaceAllocation
import Amazonka.DirectConnect.Types.NewPublicVirtualInterface
import Amazonka.DirectConnect.Types.NewPublicVirtualInterfaceAllocation
import Amazonka.DirectConnect.Types.NewTransitVirtualInterface
import Amazonka.DirectConnect.Types.NewTransitVirtualInterfaceAllocation
import Amazonka.DirectConnect.Types.NniPartnerType
import Amazonka.DirectConnect.Types.ResourceTag
import Amazonka.DirectConnect.Types.RouteFilterPrefix
import Amazonka.DirectConnect.Types.RouterType
import Amazonka.DirectConnect.Types.Tag
import Amazonka.DirectConnect.Types.VirtualGateway
import Amazonka.DirectConnect.Types.VirtualInterface
import Amazonka.DirectConnect.Types.VirtualInterfaceState
import Amazonka.DirectConnect.Types.VirtualInterfaceTestHistory
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"DirectConnect",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"directconnect",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"directconnect",
$sel:version:Service :: ByteString
Core.version = ByteString
"2012-10-25",
$sel:s3AddressingStyle:Service :: S3AddressingStyle
Core.s3AddressingStyle = S3AddressingStyle
Core.S3AddressingStyleAuto,
$sel:endpoint:Service :: Region -> Endpoint
Core.endpoint = Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
$sel:timeout:Service :: Maybe Seconds
Core.timeout = forall a. a -> Maybe a
Prelude.Just Seconds
70,
$sel:check:Service :: Status -> Bool
Core.check = Status -> Bool
Core.statusSuccess,
$sel:error:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core.error = Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseJSONError Abbrev
"DirectConnect",
$sel:retry:Service :: Retry
Core.retry = Retry
retry
}
where
retry :: Retry
retry =
Core.Exponential
{ $sel:base:Exponential :: Double
Core.base = Double
5.0e-2,
$sel:growth:Exponential :: Int
Core.growth = Int
2,
$sel:attempts:Exponential :: Int
Core.attempts = Int
5,
$sel:check:Exponential :: ServiceError -> Maybe Text
Core.check = forall {a}. IsString a => ServiceError -> Maybe a
check
}
check :: ServiceError -> Maybe a
check ServiceError
e
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
ErrorCode
"ProvisionedThroughputExceededException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
| Bool
Prelude.otherwise = forall a. Maybe a
Prelude.Nothing
_DirectConnectClientException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_DirectConnectClientException :: forall a. AsError a => Fold a ServiceError
_DirectConnectClientException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"DirectConnectClientException"
_DirectConnectServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_DirectConnectServerException :: forall a. AsError a => Fold a ServiceError
_DirectConnectServerException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"DirectConnectServerException"
_DuplicateTagKeysException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_DuplicateTagKeysException :: forall a. AsError a => Fold a ServiceError
_DuplicateTagKeysException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"DuplicateTagKeysException"
_TooManyTagsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_TooManyTagsException :: forall a. AsError a => Fold a ServiceError
_TooManyTagsException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"TooManyTagsException"