{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.ServiceCatalog.Types
(
serviceCatalog
, _InvalidParametersException
, _DuplicateResourceException
, _ResourceNotFoundException
, _LimitExceededException
, _ResourceInUseException
, AccessLevelFilterKey (..)
, PrincipalType (..)
, ProductSource (..)
, ProductType (..)
, ProductViewFilterBy (..)
, ProductViewSortBy (..)
, ProvisioningArtifactType (..)
, RecordStatus (..)
, RequestStatus (..)
, SortOrder (..)
, AccessLevelFilter
, accessLevelFilter
, alfValue
, alfKey
, ConstraintDetail
, constraintDetail
, cdConstraintId
, cdOwner
, cdType
, cdDescription
, ConstraintSummary
, constraintSummary
, csType
, csDescription
, LaunchPathSummary
, launchPathSummary
, lpsConstraintSummaries
, lpsName
, lpsId
, lpsTags
, ListRecordHistorySearchFilter
, listRecordHistorySearchFilter
, lrhsfValue
, lrhsfKey
, ParameterConstraints
, parameterConstraints
, pcAllowedValues
, PortfolioDetail
, portfolioDetail
, pdARN
, pdCreatedTime
, pdId
, pdDisplayName
, pdDescription
, pdProviderName
, Principal
, principal
, pPrincipalType
, pPrincipalARN
, ProductViewAggregationValue
, productViewAggregationValue
, pvavValue
, pvavApproximateCount
, ProductViewDetail
, productViewDetail
, pvdStatus
, pvdProductViewSummary
, pvdCreatedTime
, pvdProductARN
, ProductViewSummary
, productViewSummary
, pvsOwner
, pvsSupportURL
, pvsShortDescription
, pvsHasDefaultPath
, pvsDistributor
, pvsName
, pvsId
, pvsType
, pvsSupportEmail
, pvsProductId
, pvsSupportDescription
, ProvisionedProductDetail
, provisionedProductDetail
, ppdIdempotencyToken
, ppdStatus
, ppdARN
, ppdCreatedTime
, ppdStatusMessage
, ppdName
, ppdLastRecordId
, ppdId
, ppdType
, ProvisioningArtifact
, provisioningArtifact
, paCreatedTime
, paName
, paId
, paDescription
, ProvisioningArtifactDetail
, provisioningArtifactDetail
, padCreatedTime
, padName
, padId
, padType
, padDescription
, ProvisioningArtifactParameter
, provisioningArtifactParameter
, pIsNoEcho
, pParameterKey
, pParameterType
, pParameterConstraints
, pDefaultValue
, pDescription
, ProvisioningArtifactProperties
, provisioningArtifactProperties
, papName
, papType
, papDescription
, papInfo
, ProvisioningParameter
, provisioningParameter
, ppValue
, ppKey
, RecordDetail
, recordDetail
, rdStatus
, rdRecordTags
, rdProvisionedProductName
, rdProvisioningArtifactId
, rdCreatedTime
, rdRecordType
, rdRecordId
, rdProvisionedProductType
, rdUpdatedTime
, rdPathId
, rdProvisionedProductId
, rdRecordErrors
, rdProductId
, RecordError
, recordError
, reCode
, reDescription
, RecordOutput
, recordOutput
, roOutputValue
, roOutputKey
, roDescription
, RecordTag
, recordTag
, rtValue
, rtKey
, Tag
, tag
, tagKey
, tagValue
, UpdateProvisioningParameter
, updateProvisioningParameter
, uppValue
, uppKey
, uppUsePreviousValue
, UsageInstruction
, usageInstruction
, uiValue
, uiType
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.ServiceCatalog.Types.Product
import Network.AWS.ServiceCatalog.Types.Sum
import Network.AWS.Sign.V4
serviceCatalog :: Service
serviceCatalog =
Service
{ _svcAbbrev = "ServiceCatalog"
, _svcSigner = v4
, _svcPrefix = "servicecatalog"
, _svcVersion = "2015-12-10"
, _svcEndpoint = defaultEndpoint serviceCatalog
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "ServiceCatalog"
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| 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 (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
_InvalidParametersException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidParametersException =
_ServiceError . hasCode "InvalidParametersException"
_DuplicateResourceException :: AsError a => Getting (First ServiceError) a ServiceError
_DuplicateResourceException =
_ServiceError . hasCode "DuplicateResourceException"
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFoundException =
_ServiceError . hasCode "ResourceNotFoundException"
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
_LimitExceededException = _ServiceError . hasCode "LimitExceededException"
_ResourceInUseException :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceInUseException = _ServiceError . hasCode "ResourceInUseException"