{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.SageMaker.Types
(
sageMaker
, _ResourceLimitExceeded
, _ResourceInUse
, _ResourceNotFound
, CompressionType (..)
, DirectInternetAccess (..)
, EndpointConfigSortKey (..)
, EndpointSortKey (..)
, EndpointStatus (..)
, InstanceType (..)
, ModelSortKey (..)
, NotebookInstanceLifecycleConfigSortKey (..)
, NotebookInstanceLifecycleConfigSortOrder (..)
, NotebookInstanceSortKey (..)
, NotebookInstanceSortOrder (..)
, NotebookInstanceStatus (..)
, OrderKey (..)
, ProductionVariantInstanceType (..)
, RecordWrapper (..)
, S3DataDistribution (..)
, S3DataType (..)
, SecondaryStatus (..)
, SortBy (..)
, SortOrder (..)
, TrainingInputMode (..)
, TrainingInstanceType (..)
, TrainingJobStatus (..)
, AlgorithmSpecification
, algorithmSpecification
, asTrainingImage
, asTrainingInputMode
, Channel
, channel
, cRecordWrapperType
, cCompressionType
, cContentType
, cChannelName
, cDataSource
, ContainerDefinition
, containerDefinition
, cdModelDataURL
, cdEnvironment
, cdContainerHostname
, cdImage
, DataSource
, dataSource
, dsS3DataSource
, DesiredWeightAndCapacity
, desiredWeightAndCapacity
, dwacDesiredInstanceCount
, dwacDesiredWeight
, dwacVariantName
, EndpointConfigSummary
, endpointConfigSummary
, ecsEndpointConfigName
, ecsEndpointConfigARN
, ecsCreationTime
, EndpointSummary
, endpointSummary
, esEndpointName
, esEndpointARN
, esCreationTime
, esLastModifiedTime
, esEndpointStatus
, ModelArtifacts
, modelArtifacts
, maS3ModelArtifacts
, ModelSummary
, modelSummary
, msModelName
, msModelARN
, msCreationTime
, NotebookInstanceLifecycleConfigSummary
, notebookInstanceLifecycleConfigSummary
, nilcsCreationTime
, nilcsLastModifiedTime
, nilcsNotebookInstanceLifecycleConfigName
, nilcsNotebookInstanceLifecycleConfigARN
, NotebookInstanceLifecycleHook
, notebookInstanceLifecycleHook
, nilhContent
, NotebookInstanceSummary
, notebookInstanceSummary
, nisCreationTime
, nisURL
, nisLastModifiedTime
, nisInstanceType
, nisNotebookInstanceStatus
, nisNotebookInstanceLifecycleConfigName
, nisNotebookInstanceName
, nisNotebookInstanceARN
, OutputDataConfig
, outputDataConfig
, odcKMSKeyId
, odcS3OutputPath
, ProductionVariant
, productionVariant
, pvInitialVariantWeight
, pvVariantName
, pvModelName
, pvInitialInstanceCount
, pvInstanceType
, ProductionVariantSummary
, productionVariantSummary
, pvsDesiredInstanceCount
, pvsDesiredWeight
, pvsCurrentWeight
, pvsCurrentInstanceCount
, pvsVariantName
, ResourceConfig
, resourceConfig
, rcVolumeKMSKeyId
, rcInstanceType
, rcInstanceCount
, rcVolumeSizeInGB
, S3DataSource
, s3DataSource
, sdsS3DataDistributionType
, sdsS3DataType
, sdsS3URI
, StoppingCondition
, stoppingCondition
, scMaxRuntimeInSeconds
, Tag
, tag
, tagKey
, tagValue
, TrainingJobSummary
, trainingJobSummary
, tjsTrainingEndTime
, tjsLastModifiedTime
, tjsTrainingJobName
, tjsTrainingJobARN
, tjsCreationTime
, tjsTrainingJobStatus
, VPCConfig
, vpcConfig
, vcSecurityGroupIds
, vcSubnets
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.SageMaker.Types.Product
import Network.AWS.SageMaker.Types.Sum
import Network.AWS.Sign.V4
sageMaker :: Service
sageMaker =
Service
{ _svcAbbrev = "SageMaker"
, _svcSigner = v4
, _svcPrefix = "sagemaker"
, _svcVersion = "2017-07-24"
, _svcEndpoint = defaultEndpoint sageMaker
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "SageMaker"
, _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
_ResourceLimitExceeded :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceLimitExceeded = _MatchServiceError sageMaker "ResourceLimitExceeded"
_ResourceInUse :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceInUse = _MatchServiceError sageMaker "ResourceInUse"
_ResourceNotFound :: AsError a => Getting (First ServiceError) a ServiceError
_ResourceNotFound = _MatchServiceError sageMaker "ResourceNotFound"