{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.RedshiftServerLess.Types
(
defaultService,
_AccessDeniedException,
_ConflictException,
_InsufficientCapacityException,
_InternalServerException,
_InvalidPaginationException,
_ResourceNotFoundException,
_ServiceQuotaExceededException,
_ThrottlingException,
_TooManyTagsException,
_ValidationException,
LogExport (..),
NamespaceStatus (..),
SnapshotStatus (..),
UsageLimitBreachAction (..),
UsageLimitPeriod (..),
UsageLimitUsageType (..),
WorkgroupStatus (..),
ConfigParameter (..),
newConfigParameter,
configParameter_parameterKey,
configParameter_parameterValue,
Endpoint (..),
newEndpoint,
endpoint_address,
endpoint_port,
endpoint_vpcEndpoints,
EndpointAccess (..),
newEndpointAccess,
endpointAccess_address,
endpointAccess_endpointArn,
endpointAccess_endpointCreateTime,
endpointAccess_endpointName,
endpointAccess_endpointStatus,
endpointAccess_port,
endpointAccess_subnetIds,
endpointAccess_vpcEndpoint,
endpointAccess_vpcSecurityGroups,
endpointAccess_workgroupName,
Namespace (..),
newNamespace,
namespace_adminUsername,
namespace_creationDate,
namespace_dbName,
namespace_defaultIamRoleArn,
namespace_iamRoles,
namespace_kmsKeyId,
namespace_logExports,
namespace_namespaceArn,
namespace_namespaceId,
namespace_namespaceName,
namespace_status,
NetworkInterface (..),
newNetworkInterface,
networkInterface_availabilityZone,
networkInterface_networkInterfaceId,
networkInterface_privateIpAddress,
networkInterface_subnetId,
RecoveryPoint (..),
newRecoveryPoint,
recoveryPoint_namespaceArn,
recoveryPoint_namespaceName,
recoveryPoint_recoveryPointCreateTime,
recoveryPoint_recoveryPointId,
recoveryPoint_totalSizeInMegaBytes,
recoveryPoint_workgroupName,
ResourcePolicy (..),
newResourcePolicy,
resourcePolicy_policy,
resourcePolicy_resourceArn,
Snapshot (..),
newSnapshot,
snapshot_accountsWithProvisionedRestoreAccess,
snapshot_accountsWithRestoreAccess,
snapshot_actualIncrementalBackupSizeInMegaBytes,
snapshot_adminUsername,
snapshot_backupProgressInMegaBytes,
snapshot_currentBackupRateInMegaBytesPerSecond,
snapshot_elapsedTimeInSeconds,
snapshot_estimatedSecondsToCompletion,
snapshot_kmsKeyId,
snapshot_namespaceArn,
snapshot_namespaceName,
snapshot_ownerAccount,
snapshot_snapshotArn,
snapshot_snapshotCreateTime,
snapshot_snapshotName,
snapshot_snapshotRemainingDays,
snapshot_snapshotRetentionPeriod,
snapshot_snapshotRetentionStartTime,
snapshot_status,
snapshot_totalBackupSizeInMegaBytes,
TableRestoreStatus (..),
newTableRestoreStatus,
tableRestoreStatus_message,
tableRestoreStatus_namespaceName,
tableRestoreStatus_newTableName,
tableRestoreStatus_progressInMegaBytes,
tableRestoreStatus_requestTime,
tableRestoreStatus_snapshotName,
tableRestoreStatus_sourceDatabaseName,
tableRestoreStatus_sourceSchemaName,
tableRestoreStatus_sourceTableName,
tableRestoreStatus_status,
tableRestoreStatus_tableRestoreRequestId,
tableRestoreStatus_targetDatabaseName,
tableRestoreStatus_targetSchemaName,
tableRestoreStatus_totalDataInMegaBytes,
tableRestoreStatus_workgroupName,
Tag (..),
newTag,
tag_key,
tag_value,
UsageLimit (..),
newUsageLimit,
usageLimit_amount,
usageLimit_breachAction,
usageLimit_period,
usageLimit_resourceArn,
usageLimit_usageLimitArn,
usageLimit_usageLimitId,
usageLimit_usageType,
VpcEndpoint (..),
newVpcEndpoint,
vpcEndpoint_networkInterfaces,
vpcEndpoint_vpcEndpointId,
vpcEndpoint_vpcId,
VpcSecurityGroupMembership (..),
newVpcSecurityGroupMembership,
vpcSecurityGroupMembership_status,
vpcSecurityGroupMembership_vpcSecurityGroupId,
Workgroup (..),
newWorkgroup,
workgroup_baseCapacity,
workgroup_configParameters,
workgroup_creationDate,
workgroup_endpoint,
workgroup_enhancedVpcRouting,
workgroup_namespaceName,
workgroup_port,
workgroup_publiclyAccessible,
workgroup_securityGroupIds,
workgroup_status,
workgroup_subnetIds,
workgroup_workgroupArn,
workgroup_workgroupId,
workgroup_workgroupName,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RedshiftServerLess.Types.ConfigParameter
import Amazonka.RedshiftServerLess.Types.Endpoint
import Amazonka.RedshiftServerLess.Types.EndpointAccess
import Amazonka.RedshiftServerLess.Types.LogExport
import Amazonka.RedshiftServerLess.Types.Namespace
import Amazonka.RedshiftServerLess.Types.NamespaceStatus
import Amazonka.RedshiftServerLess.Types.NetworkInterface
import Amazonka.RedshiftServerLess.Types.RecoveryPoint
import Amazonka.RedshiftServerLess.Types.ResourcePolicy
import Amazonka.RedshiftServerLess.Types.Snapshot
import Amazonka.RedshiftServerLess.Types.SnapshotStatus
import Amazonka.RedshiftServerLess.Types.TableRestoreStatus
import Amazonka.RedshiftServerLess.Types.Tag
import Amazonka.RedshiftServerLess.Types.UsageLimit
import Amazonka.RedshiftServerLess.Types.UsageLimitBreachAction
import Amazonka.RedshiftServerLess.Types.UsageLimitPeriod
import Amazonka.RedshiftServerLess.Types.UsageLimitUsageType
import Amazonka.RedshiftServerLess.Types.VpcEndpoint
import Amazonka.RedshiftServerLess.Types.VpcSecurityGroupMembership
import Amazonka.RedshiftServerLess.Types.Workgroup
import Amazonka.RedshiftServerLess.Types.WorkgroupStatus
import qualified Amazonka.Sign.V4 as Sign
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"RedshiftServerLess",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"redshift-serverless",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"redshift-serverless",
$sel:version:Service :: ByteString
Core.version = ByteString
"2021-04-21",
$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
"RedshiftServerLess",
$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"
_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"
_InsufficientCapacityException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InsufficientCapacityException :: forall a. AsError a => Fold a ServiceError
_InsufficientCapacityException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InsufficientCapacityException"
_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"
_InvalidPaginationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
=
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidPaginationException"
_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ResourceNotFoundException :: forall a. AsError a => Fold a ServiceError
_ResourceNotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ResourceNotFoundException"
_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"
_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ThrottlingException :: forall a. AsError a => Fold a ServiceError
_ThrottlingException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ThrottlingException"
_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"
_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"