{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Outposts.Types
(
defaultService,
_AccessDeniedException,
_ConflictException,
_InternalServerException,
_NotFoundException,
_ServiceQuotaExceededException,
_ValidationException,
AddressType (..),
AssetState (..),
AssetType (..),
CatalogItemClass (..),
CatalogItemStatus (..),
ComputeAssetState (..),
FiberOpticCableType (..),
LineItemStatus (..),
MaximumSupportedWeightLbs (..),
OpticalStandard (..),
OrderStatus (..),
OrderType (..),
PaymentOption (..),
PaymentTerm (..),
PowerConnector (..),
PowerDrawKva (..),
PowerFeedDrop (..),
PowerPhase (..),
ShipmentCarrier (..),
SupportedHardwareType (..),
SupportedStorageEnum (..),
UplinkCount (..),
UplinkGbps (..),
Address (..),
newAddress,
address_addressLine2,
address_addressLine3,
address_contactName,
address_contactPhoneNumber,
address_districtOrCounty,
address_municipality,
address_addressLine1,
address_city,
address_stateOrRegion,
address_postalCode,
address_countryCode,
AssetInfo (..),
newAssetInfo,
assetInfo_assetId,
assetInfo_assetLocation,
assetInfo_assetType,
assetInfo_computeAttributes,
assetInfo_rackId,
AssetLocation (..),
newAssetLocation,
assetLocation_rackElevation,
CatalogItem (..),
newCatalogItem,
catalogItem_catalogItemId,
catalogItem_eC2Capacities,
catalogItem_itemStatus,
catalogItem_powerKva,
catalogItem_supportedStorage,
catalogItem_supportedUplinkGbps,
catalogItem_weightLbs,
ComputeAttributes (..),
newComputeAttributes,
computeAttributes_hostId,
computeAttributes_state,
ConnectionDetails (..),
newConnectionDetails,
connectionDetails_allowedIps,
connectionDetails_clientPublicKey,
connectionDetails_clientTunnelAddress,
connectionDetails_serverEndpoint,
connectionDetails_serverPublicKey,
connectionDetails_serverTunnelAddress,
EC2Capacity (..),
newEC2Capacity,
eC2Capacity_family,
eC2Capacity_maxSize,
eC2Capacity_quantity,
InstanceTypeItem (..),
newInstanceTypeItem,
instanceTypeItem_instanceType,
LineItem (..),
newLineItem,
lineItem_assetInformationList,
lineItem_catalogItemId,
lineItem_lineItemId,
lineItem_quantity,
lineItem_shipmentInformation,
lineItem_status,
LineItemAssetInformation (..),
newLineItemAssetInformation,
lineItemAssetInformation_assetId,
lineItemAssetInformation_macAddressList,
LineItemRequest (..),
newLineItemRequest,
lineItemRequest_catalogItemId,
lineItemRequest_quantity,
Order (..),
newOrder,
order_lineItems,
order_orderFulfilledDate,
order_orderId,
order_orderSubmissionDate,
order_outpostId,
order_paymentOption,
order_status,
OrderSummary (..),
newOrderSummary,
orderSummary_lineItemCountsByStatus,
orderSummary_orderFulfilledDate,
orderSummary_orderId,
orderSummary_orderSubmissionDate,
orderSummary_orderType,
orderSummary_outpostId,
orderSummary_status,
Outpost (..),
newOutpost,
outpost_availabilityZone,
outpost_availabilityZoneId,
outpost_description,
outpost_lifeCycleStatus,
outpost_name,
outpost_outpostArn,
outpost_outpostId,
outpost_ownerId,
outpost_siteArn,
outpost_siteId,
outpost_supportedHardwareType,
outpost_tags,
RackPhysicalProperties (..),
newRackPhysicalProperties,
rackPhysicalProperties_fiberOpticCableType,
rackPhysicalProperties_maximumSupportedWeightLbs,
rackPhysicalProperties_opticalStandard,
rackPhysicalProperties_powerConnector,
rackPhysicalProperties_powerDrawKva,
rackPhysicalProperties_powerFeedDrop,
rackPhysicalProperties_powerPhase,
rackPhysicalProperties_uplinkCount,
rackPhysicalProperties_uplinkGbps,
ShipmentInformation (..),
newShipmentInformation,
shipmentInformation_shipmentCarrier,
shipmentInformation_shipmentTrackingNumber,
Site (..),
newSite,
site_accountId,
site_description,
site_name,
site_notes,
site_operatingAddressCity,
site_operatingAddressCountryCode,
site_operatingAddressStateOrRegion,
site_rackPhysicalProperties,
site_siteArn,
site_siteId,
site_tags,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.Outposts.Types.Address
import Amazonka.Outposts.Types.AddressType
import Amazonka.Outposts.Types.AssetInfo
import Amazonka.Outposts.Types.AssetLocation
import Amazonka.Outposts.Types.AssetState
import Amazonka.Outposts.Types.AssetType
import Amazonka.Outposts.Types.CatalogItem
import Amazonka.Outposts.Types.CatalogItemClass
import Amazonka.Outposts.Types.CatalogItemStatus
import Amazonka.Outposts.Types.ComputeAssetState
import Amazonka.Outposts.Types.ComputeAttributes
import Amazonka.Outposts.Types.ConnectionDetails
import Amazonka.Outposts.Types.EC2Capacity
import Amazonka.Outposts.Types.FiberOpticCableType
import Amazonka.Outposts.Types.InstanceTypeItem
import Amazonka.Outposts.Types.LineItem
import Amazonka.Outposts.Types.LineItemAssetInformation
import Amazonka.Outposts.Types.LineItemRequest
import Amazonka.Outposts.Types.LineItemStatus
import Amazonka.Outposts.Types.MaximumSupportedWeightLbs
import Amazonka.Outposts.Types.OpticalStandard
import Amazonka.Outposts.Types.Order
import Amazonka.Outposts.Types.OrderStatus
import Amazonka.Outposts.Types.OrderSummary
import Amazonka.Outposts.Types.OrderType
import Amazonka.Outposts.Types.Outpost
import Amazonka.Outposts.Types.PaymentOption
import Amazonka.Outposts.Types.PaymentTerm
import Amazonka.Outposts.Types.PowerConnector
import Amazonka.Outposts.Types.PowerDrawKva
import Amazonka.Outposts.Types.PowerFeedDrop
import Amazonka.Outposts.Types.PowerPhase
import Amazonka.Outposts.Types.RackPhysicalProperties
import Amazonka.Outposts.Types.ShipmentCarrier
import Amazonka.Outposts.Types.ShipmentInformation
import Amazonka.Outposts.Types.Site
import Amazonka.Outposts.Types.SupportedHardwareType
import Amazonka.Outposts.Types.SupportedStorageEnum
import Amazonka.Outposts.Types.UplinkCount
import Amazonka.Outposts.Types.UplinkGbps
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
"Outposts",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"outposts",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"outposts",
$sel:version:Service :: ByteString
Core.version = ByteString
"2019-12-03",
$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
"Outposts",
$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
_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_AccessDeniedException :: forall a. AsError a => Fold a ServiceError
_AccessDeniedException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AccessDeniedException"
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
403
_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ConflictException :: forall a. AsError a => Fold a ServiceError
_ConflictException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ConflictException"
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
409
_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InternalServerException :: forall a. AsError a => Fold a ServiceError
_InternalServerException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InternalServerException"
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
500
_NotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_NotFoundException :: forall a. AsError a => Fold a ServiceError
_NotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"NotFoundException"
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
404
_ServiceQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ServiceQuotaExceededException :: forall a. AsError a => Fold a ServiceError
_ServiceQuotaExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ServiceQuotaExceededException"
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
402
_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ValidationException :: forall a. AsError a => Fold a ServiceError
_ValidationException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ValidationException"
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