{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.OpsWorks.Types
(
defaultService,
_ResourceNotFoundException,
_ValidationException,
AppAttributesKeys (..),
AppType (..),
Architecture (..),
AutoScalingType (..),
CloudWatchLogsEncoding (..),
CloudWatchLogsInitialPosition (..),
CloudWatchLogsTimeZone (..),
DeploymentCommandName (..),
LayerAttributesKeys (..),
LayerType (..),
RootDeviceType (..),
SourceType (..),
StackAttributesKeys (..),
VirtualizationType (..),
VolumeType (..),
AgentVersion (..),
newAgentVersion,
agentVersion_configurationManager,
agentVersion_version,
App (..),
newApp,
app_appId,
app_appSource,
app_attributes,
app_createdAt,
app_dataSources,
app_description,
app_domains,
app_enableSsl,
app_environment,
app_name,
app_shortname,
app_sslConfiguration,
app_stackId,
app_type,
AutoScalingThresholds (..),
newAutoScalingThresholds,
autoScalingThresholds_alarms,
autoScalingThresholds_cpuThreshold,
autoScalingThresholds_ignoreMetricsTime,
autoScalingThresholds_instanceCount,
autoScalingThresholds_loadThreshold,
autoScalingThresholds_memoryThreshold,
autoScalingThresholds_thresholdsWaitTime,
BlockDeviceMapping (..),
newBlockDeviceMapping,
blockDeviceMapping_deviceName,
blockDeviceMapping_ebs,
blockDeviceMapping_noDevice,
blockDeviceMapping_virtualName,
ChefConfiguration (..),
newChefConfiguration,
chefConfiguration_berkshelfVersion,
chefConfiguration_manageBerkshelf,
CloudWatchLogsConfiguration (..),
newCloudWatchLogsConfiguration,
cloudWatchLogsConfiguration_enabled,
cloudWatchLogsConfiguration_logStreams,
CloudWatchLogsLogStream (..),
newCloudWatchLogsLogStream,
cloudWatchLogsLogStream_batchCount,
cloudWatchLogsLogStream_batchSize,
cloudWatchLogsLogStream_bufferDuration,
cloudWatchLogsLogStream_datetimeFormat,
cloudWatchLogsLogStream_encoding,
cloudWatchLogsLogStream_file,
cloudWatchLogsLogStream_fileFingerprintLines,
cloudWatchLogsLogStream_initialPosition,
cloudWatchLogsLogStream_logGroupName,
cloudWatchLogsLogStream_multiLineStartPattern,
cloudWatchLogsLogStream_timeZone,
Command (..),
newCommand,
command_acknowledgedAt,
command_commandId,
command_completedAt,
command_createdAt,
command_deploymentId,
command_exitCode,
command_instanceId,
command_logUrl,
command_status,
command_type,
DataSource (..),
newDataSource,
dataSource_arn,
dataSource_databaseName,
dataSource_type,
Deployment (..),
newDeployment,
deployment_appId,
deployment_command,
deployment_comment,
deployment_completedAt,
deployment_createdAt,
deployment_customJson,
deployment_deploymentId,
deployment_duration,
deployment_iamUserArn,
deployment_instanceIds,
deployment_stackId,
deployment_status,
DeploymentCommand (..),
newDeploymentCommand,
deploymentCommand_args,
deploymentCommand_name,
EbsBlockDevice (..),
newEbsBlockDevice,
ebsBlockDevice_deleteOnTermination,
ebsBlockDevice_iops,
ebsBlockDevice_snapshotId,
ebsBlockDevice_volumeSize,
ebsBlockDevice_volumeType,
EcsCluster (..),
newEcsCluster,
ecsCluster_ecsClusterArn,
ecsCluster_ecsClusterName,
ecsCluster_registeredAt,
ecsCluster_stackId,
ElasticIp (..),
newElasticIp,
elasticIp_domain,
elasticIp_instanceId,
elasticIp_ip,
elasticIp_name,
elasticIp_region,
ElasticLoadBalancer (..),
newElasticLoadBalancer,
elasticLoadBalancer_availabilityZones,
elasticLoadBalancer_dnsName,
elasticLoadBalancer_ec2InstanceIds,
elasticLoadBalancer_elasticLoadBalancerName,
elasticLoadBalancer_layerId,
elasticLoadBalancer_region,
elasticLoadBalancer_stackId,
elasticLoadBalancer_subnetIds,
elasticLoadBalancer_vpcId,
EnvironmentVariable (..),
newEnvironmentVariable,
environmentVariable_secure,
environmentVariable_key,
environmentVariable_value,
Instance (..),
newInstance,
instance_agentVersion,
instance_amiId,
instance_architecture,
instance_arn,
instance_autoScalingType,
instance_availabilityZone,
instance_blockDeviceMappings,
instance_createdAt,
instance_ebsOptimized,
instance_ec2InstanceId,
instance_ecsClusterArn,
instance_ecsContainerInstanceArn,
instance_elasticIp,
instance_hostname,
instance_infrastructureClass,
instance_installUpdatesOnBoot,
instance_instanceId,
instance_instanceProfileArn,
instance_instanceType,
instance_lastServiceErrorId,
instance_layerIds,
instance_os,
instance_platform,
instance_privateDns,
instance_privateIp,
instance_publicDns,
instance_publicIp,
instance_registeredBy,
instance_reportedAgentVersion,
instance_reportedOs,
instance_rootDeviceType,
instance_rootDeviceVolumeId,
instance_securityGroupIds,
instance_sshHostDsaKeyFingerprint,
instance_sshHostRsaKeyFingerprint,
instance_sshKeyName,
instance_stackId,
instance_status,
instance_subnetId,
instance_tenancy,
instance_virtualizationType,
InstanceIdentity (..),
newInstanceIdentity,
instanceIdentity_document,
instanceIdentity_signature,
InstancesCount (..),
newInstancesCount,
instancesCount_assigning,
instancesCount_booting,
instancesCount_connectionLost,
instancesCount_deregistering,
instancesCount_online,
instancesCount_pending,
instancesCount_rebooting,
instancesCount_registered,
instancesCount_registering,
instancesCount_requested,
instancesCount_runningSetup,
instancesCount_setupFailed,
instancesCount_shuttingDown,
instancesCount_startFailed,
instancesCount_stopFailed,
instancesCount_stopped,
instancesCount_stopping,
instancesCount_terminated,
instancesCount_terminating,
instancesCount_unassigning,
Layer (..),
newLayer,
layer_arn,
layer_attributes,
layer_autoAssignElasticIps,
layer_autoAssignPublicIps,
layer_cloudWatchLogsConfiguration,
layer_createdAt,
layer_customInstanceProfileArn,
layer_customJson,
layer_customRecipes,
layer_customSecurityGroupIds,
layer_defaultRecipes,
layer_defaultSecurityGroupNames,
layer_enableAutoHealing,
layer_installUpdatesOnBoot,
layer_layerId,
layer_lifecycleEventConfiguration,
layer_name,
layer_packages,
layer_shortname,
layer_stackId,
layer_type,
layer_useEbsOptimizedInstances,
layer_volumeConfigurations,
LifecycleEventConfiguration (..),
newLifecycleEventConfiguration,
lifecycleEventConfiguration_shutdown,
LoadBasedAutoScalingConfiguration (..),
newLoadBasedAutoScalingConfiguration,
loadBasedAutoScalingConfiguration_downScaling,
loadBasedAutoScalingConfiguration_enable,
loadBasedAutoScalingConfiguration_layerId,
loadBasedAutoScalingConfiguration_upScaling,
OperatingSystem (..),
newOperatingSystem,
operatingSystem_configurationManagers,
operatingSystem_id,
operatingSystem_name,
operatingSystem_reportedName,
operatingSystem_reportedVersion,
operatingSystem_supported,
operatingSystem_type,
OperatingSystemConfigurationManager (..),
newOperatingSystemConfigurationManager,
operatingSystemConfigurationManager_name,
operatingSystemConfigurationManager_version,
Permission (..),
newPermission,
permission_allowSsh,
permission_allowSudo,
permission_iamUserArn,
permission_level,
permission_stackId,
RaidArray (..),
newRaidArray,
raidArray_availabilityZone,
raidArray_createdAt,
raidArray_device,
raidArray_instanceId,
raidArray_iops,
raidArray_mountPoint,
raidArray_name,
raidArray_numberOfDisks,
raidArray_raidArrayId,
raidArray_raidLevel,
raidArray_size,
raidArray_stackId,
raidArray_volumeType,
RdsDbInstance (..),
newRdsDbInstance,
rdsDbInstance_address,
rdsDbInstance_dbInstanceIdentifier,
rdsDbInstance_dbPassword,
rdsDbInstance_dbUser,
rdsDbInstance_engine,
rdsDbInstance_missingOnRds,
rdsDbInstance_rdsDbInstanceArn,
rdsDbInstance_region,
rdsDbInstance_stackId,
Recipes (..),
newRecipes,
recipes_configure,
recipes_deploy,
recipes_setup,
recipes_shutdown,
recipes_undeploy,
ReportedOs (..),
newReportedOs,
reportedOs_family,
reportedOs_name,
reportedOs_version,
SelfUserProfile (..),
newSelfUserProfile,
selfUserProfile_iamUserArn,
selfUserProfile_name,
selfUserProfile_sshPublicKey,
selfUserProfile_sshUsername,
ServiceError (..),
newServiceError,
serviceError_createdAt,
serviceError_instanceId,
serviceError_message,
serviceError_serviceErrorId,
serviceError_stackId,
serviceError_type,
ShutdownEventConfiguration (..),
newShutdownEventConfiguration,
shutdownEventConfiguration_delayUntilElbConnectionsDrained,
shutdownEventConfiguration_executionTimeout,
Source (..),
newSource,
source_password,
source_revision,
source_sshKey,
source_type,
source_url,
source_username,
SslConfiguration (..),
newSslConfiguration,
sslConfiguration_certificate,
sslConfiguration_chain,
sslConfiguration_privateKey,
Stack (..),
newStack,
stack_agentVersion,
stack_arn,
stack_attributes,
stack_chefConfiguration,
stack_configurationManager,
stack_createdAt,
stack_customCookbooksSource,
stack_customJson,
stack_defaultAvailabilityZone,
stack_defaultInstanceProfileArn,
stack_defaultOs,
stack_defaultRootDeviceType,
stack_defaultSshKeyName,
stack_defaultSubnetId,
stack_hostnameTheme,
stack_name,
stack_region,
stack_serviceRoleArn,
stack_stackId,
stack_useCustomCookbooks,
stack_useOpsworksSecurityGroups,
stack_vpcId,
StackConfigurationManager (..),
newStackConfigurationManager,
stackConfigurationManager_name,
stackConfigurationManager_version,
StackSummary (..),
newStackSummary,
stackSummary_appsCount,
stackSummary_arn,
stackSummary_instancesCount,
stackSummary_layersCount,
stackSummary_name,
stackSummary_stackId,
TemporaryCredential (..),
newTemporaryCredential,
temporaryCredential_instanceId,
temporaryCredential_password,
temporaryCredential_username,
temporaryCredential_validForInMinutes,
TimeBasedAutoScalingConfiguration (..),
newTimeBasedAutoScalingConfiguration,
timeBasedAutoScalingConfiguration_autoScalingSchedule,
timeBasedAutoScalingConfiguration_instanceId,
UserProfile (..),
newUserProfile,
userProfile_allowSelfManagement,
userProfile_iamUserArn,
userProfile_name,
userProfile_sshPublicKey,
userProfile_sshUsername,
Volume (..),
newVolume,
volume_availabilityZone,
volume_device,
volume_ec2VolumeId,
volume_encrypted,
volume_instanceId,
volume_iops,
volume_mountPoint,
volume_name,
volume_raidArrayId,
volume_region,
volume_size,
volume_status,
volume_volumeId,
volume_volumeType,
VolumeConfiguration (..),
newVolumeConfiguration,
volumeConfiguration_encrypted,
volumeConfiguration_iops,
volumeConfiguration_raidLevel,
volumeConfiguration_volumeType,
volumeConfiguration_mountPoint,
volumeConfiguration_numberOfDisks,
volumeConfiguration_size,
WeeklyAutoScalingSchedule (..),
newWeeklyAutoScalingSchedule,
weeklyAutoScalingSchedule_friday,
weeklyAutoScalingSchedule_monday,
weeklyAutoScalingSchedule_saturday,
weeklyAutoScalingSchedule_sunday,
weeklyAutoScalingSchedule_thursday,
weeklyAutoScalingSchedule_tuesday,
weeklyAutoScalingSchedule_wednesday,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.OpsWorks.Types.AgentVersion
import Amazonka.OpsWorks.Types.App
import Amazonka.OpsWorks.Types.AppAttributesKeys
import Amazonka.OpsWorks.Types.AppType
import Amazonka.OpsWorks.Types.Architecture
import Amazonka.OpsWorks.Types.AutoScalingThresholds
import Amazonka.OpsWorks.Types.AutoScalingType
import Amazonka.OpsWorks.Types.BlockDeviceMapping
import Amazonka.OpsWorks.Types.ChefConfiguration
import Amazonka.OpsWorks.Types.CloudWatchLogsConfiguration
import Amazonka.OpsWorks.Types.CloudWatchLogsEncoding
import Amazonka.OpsWorks.Types.CloudWatchLogsInitialPosition
import Amazonka.OpsWorks.Types.CloudWatchLogsLogStream
import Amazonka.OpsWorks.Types.CloudWatchLogsTimeZone
import Amazonka.OpsWorks.Types.Command
import Amazonka.OpsWorks.Types.DataSource
import Amazonka.OpsWorks.Types.Deployment
import Amazonka.OpsWorks.Types.DeploymentCommand
import Amazonka.OpsWorks.Types.DeploymentCommandName
import Amazonka.OpsWorks.Types.EbsBlockDevice
import Amazonka.OpsWorks.Types.EcsCluster
import Amazonka.OpsWorks.Types.ElasticIp
import Amazonka.OpsWorks.Types.ElasticLoadBalancer
import Amazonka.OpsWorks.Types.EnvironmentVariable
import Amazonka.OpsWorks.Types.Instance
import Amazonka.OpsWorks.Types.InstanceIdentity
import Amazonka.OpsWorks.Types.InstancesCount
import Amazonka.OpsWorks.Types.Layer
import Amazonka.OpsWorks.Types.LayerAttributesKeys
import Amazonka.OpsWorks.Types.LayerType
import Amazonka.OpsWorks.Types.LifecycleEventConfiguration
import Amazonka.OpsWorks.Types.LoadBasedAutoScalingConfiguration
import Amazonka.OpsWorks.Types.OperatingSystem
import Amazonka.OpsWorks.Types.OperatingSystemConfigurationManager
import Amazonka.OpsWorks.Types.Permission
import Amazonka.OpsWorks.Types.RaidArray
import Amazonka.OpsWorks.Types.RdsDbInstance
import Amazonka.OpsWorks.Types.Recipes
import Amazonka.OpsWorks.Types.ReportedOs
import Amazonka.OpsWorks.Types.RootDeviceType
import Amazonka.OpsWorks.Types.SelfUserProfile
import Amazonka.OpsWorks.Types.ServiceError
import Amazonka.OpsWorks.Types.ShutdownEventConfiguration
import Amazonka.OpsWorks.Types.Source
import Amazonka.OpsWorks.Types.SourceType
import Amazonka.OpsWorks.Types.SslConfiguration
import Amazonka.OpsWorks.Types.Stack
import Amazonka.OpsWorks.Types.StackAttributesKeys
import Amazonka.OpsWorks.Types.StackConfigurationManager
import Amazonka.OpsWorks.Types.StackSummary
import Amazonka.OpsWorks.Types.TemporaryCredential
import Amazonka.OpsWorks.Types.TimeBasedAutoScalingConfiguration
import Amazonka.OpsWorks.Types.UserProfile
import Amazonka.OpsWorks.Types.VirtualizationType
import Amazonka.OpsWorks.Types.Volume
import Amazonka.OpsWorks.Types.VolumeConfiguration
import Amazonka.OpsWorks.Types.VolumeType
import Amazonka.OpsWorks.Types.WeeklyAutoScalingSchedule
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
"OpsWorks",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"opsworks",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"opsworks",
$sel:version:Service :: ByteString
Core.version = ByteString
"2013-02-18",
$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
"OpsWorks",
$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
_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"
_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"