summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrendanHay <>2017-11-15 08:23:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2017-11-15 08:23:00 (GMT)
commit88c1cf010a4a9dbe956b1bfa8f504edd17861bf1 (patch)
tree5e1dd55e8efcba27820acf8fd6387224a25a1f51
parent72a1c7a956c758cf494f01547430005895ea9b63 (diff)
version 1.5.01.5.0
-rw-r--r--README.md2
-rw-r--r--amazonka-application-autoscaling.cabal30
-rw-r--r--fixture/DeleteScheduledAction.yaml10
-rw-r--r--fixture/DeleteScheduledActionResponse.proto0
-rw-r--r--fixture/DescribeScheduledActions.yaml10
-rw-r--r--fixture/DescribeScheduledActionsResponse.proto0
-rw-r--r--fixture/PutScheduledAction.yaml10
-rw-r--r--fixture/PutScheduledActionResponse.proto0
-rw-r--r--gen/Network/AWS/ApplicationAutoScaling.hs120
-rw-r--r--gen/Network/AWS/ApplicationAutoScaling/DeleteScalingPolicy.hs64
-rw-r--r--gen/Network/AWS/ApplicationAutoScaling/DeleteScheduledAction.hs161
-rw-r--r--gen/Network/AWS/ApplicationAutoScaling/DeregisterScalableTarget.hs59
-rw-r--r--gen/Network/AWS/ApplicationAutoScaling/DescribeScalableTargets.hs82
-rw-r--r--gen/Network/AWS/ApplicationAutoScaling/DescribeScalingActivities.hs163
-rw-r--r--gen/Network/AWS/ApplicationAutoScaling/DescribeScalingPolicies.hs90
-rw-r--r--gen/Network/AWS/ApplicationAutoScaling/DescribeScheduledActions.hs206
-rw-r--r--gen/Network/AWS/ApplicationAutoScaling/PutScalingPolicy.hs111
-rw-r--r--gen/Network/AWS/ApplicationAutoScaling/PutScheduledAction.hs207
-rw-r--r--gen/Network/AWS/ApplicationAutoScaling/RegisterScalableTarget.hs72
-rw-r--r--gen/Network/AWS/ApplicationAutoScaling/Types.hs160
-rw-r--r--gen/Network/AWS/ApplicationAutoScaling/Types/Product.hs826
-rw-r--r--gen/Network/AWS/ApplicationAutoScaling/Types/Sum.hs175
-rw-r--r--gen/Network/AWS/ApplicationAutoScaling/Waiters.hs12
-rw-r--r--test/Main.hs4
-rw-r--r--test/Test/AWS/Gen/ApplicationAutoScaling.hs62
25 files changed, 2043 insertions, 593 deletions
diff --git a/README.md b/README.md
index d6f296a..9ba1c90 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
## Version
-`1.4.5`
+`1.5.0`
## Description
diff --git a/amazonka-application-autoscaling.cabal b/amazonka-application-autoscaling.cabal
index 49bafa5..6977f65 100644
--- a/amazonka-application-autoscaling.cabal
+++ b/amazonka-application-autoscaling.cabal
@@ -1,13 +1,13 @@
name: amazonka-application-autoscaling
-version: 1.4.5
+version: 1.5.0
synopsis: Amazon Application Auto Scaling SDK.
homepage: https://github.com/brendanhay/amazonka
bug-reports: https://github.com/brendanhay/amazonka/issues
-license: OtherLicense
+license: MPL-2.0
license-file: LICENSE
author: Brendan Hay
-maintainer: Brendan Hay <brendan.g.hay@gmail.com>
-copyright: Copyright (c) 2013-2016 Brendan Hay
+maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+copyright: Copyright (c) 2013-2017 Brendan Hay
category: Network, AWS, Cloud, Distributed Computing
build-type: Simple
cabal-version: >= 1.10
@@ -29,23 +29,31 @@ description:
to get started.
source-repository head
- type: git
- location: git://github.com/brendanhay/amazonka.git
+ type: git
+ location: git://github.com/brendanhay/amazonka.git
+ subdir: amazonka-application-autoscaling
library
default-language: Haskell2010
hs-source-dirs: src gen
- ghc-options: -Wall
+ ghc-options:
+ -Wall
+ -fwarn-incomplete-uni-patterns
+ -fwarn-incomplete-record-updates
+ -funbox-strict-fields
exposed-modules:
Network.AWS.ApplicationAutoScaling
, Network.AWS.ApplicationAutoScaling.DeleteScalingPolicy
+ , Network.AWS.ApplicationAutoScaling.DeleteScheduledAction
, Network.AWS.ApplicationAutoScaling.DeregisterScalableTarget
, Network.AWS.ApplicationAutoScaling.DescribeScalableTargets
, Network.AWS.ApplicationAutoScaling.DescribeScalingActivities
, Network.AWS.ApplicationAutoScaling.DescribeScalingPolicies
+ , Network.AWS.ApplicationAutoScaling.DescribeScheduledActions
, Network.AWS.ApplicationAutoScaling.PutScalingPolicy
+ , Network.AWS.ApplicationAutoScaling.PutScheduledAction
, Network.AWS.ApplicationAutoScaling.RegisterScalableTarget
, Network.AWS.ApplicationAutoScaling.Types
, Network.AWS.ApplicationAutoScaling.Waiters
@@ -55,7 +63,7 @@ library
, Network.AWS.ApplicationAutoScaling.Types.Sum
build-depends:
- amazonka-core == 1.4.5.*
+ amazonka-core == 1.5.0.*
, base >= 4.7 && < 5
test-suite amazonka-application-autoscaling-test
@@ -75,9 +83,9 @@ test-suite amazonka-application-autoscaling-test
, Test.AWS.ApplicationAutoScaling.Internal
build-depends:
- amazonka-core == 1.4.5.*
- , amazonka-test == 1.4.5.*
- , amazonka-application-autoscaling == 1.4.5.*
+ amazonka-core == 1.5.0.*
+ , amazonka-test == 1.5.0.*
+ , amazonka-application-autoscaling
, base
, bytestring
, tasty
diff --git a/fixture/DeleteScheduledAction.yaml b/fixture/DeleteScheduledAction.yaml
new file mode 100644
index 0000000..e42859f
--- /dev/null
+++ b/fixture/DeleteScheduledAction.yaml
@@ -0,0 +1,10 @@
+---
+method: POST
+headers:
+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/autoscaling/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?
+ Host: autoscaling.us-east-1.amazonaws.com
+ Content-Type: application/x-www-form-urlencoded; charset=utf-8
+ X-Amz-Content-SHA256: abcdef
+ X-Amz-Date: 20091028T223200Z
+body:
+ ''
diff --git a/fixture/DeleteScheduledActionResponse.proto b/fixture/DeleteScheduledActionResponse.proto
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/fixture/DeleteScheduledActionResponse.proto
diff --git a/fixture/DescribeScheduledActions.yaml b/fixture/DescribeScheduledActions.yaml
new file mode 100644
index 0000000..e42859f
--- /dev/null
+++ b/fixture/DescribeScheduledActions.yaml
@@ -0,0 +1,10 @@
+---
+method: POST
+headers:
+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/autoscaling/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?
+ Host: autoscaling.us-east-1.amazonaws.com
+ Content-Type: application/x-www-form-urlencoded; charset=utf-8
+ X-Amz-Content-SHA256: abcdef
+ X-Amz-Date: 20091028T223200Z
+body:
+ ''
diff --git a/fixture/DescribeScheduledActionsResponse.proto b/fixture/DescribeScheduledActionsResponse.proto
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/fixture/DescribeScheduledActionsResponse.proto
diff --git a/fixture/PutScheduledAction.yaml b/fixture/PutScheduledAction.yaml
new file mode 100644
index 0000000..e42859f
--- /dev/null
+++ b/fixture/PutScheduledAction.yaml
@@ -0,0 +1,10 @@
+---
+method: POST
+headers:
+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/autoscaling/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?
+ Host: autoscaling.us-east-1.amazonaws.com
+ Content-Type: application/x-www-form-urlencoded; charset=utf-8
+ X-Amz-Content-SHA256: abcdef
+ X-Amz-Date: 20091028T223200Z
+body:
+ ''
diff --git a/fixture/PutScheduledActionResponse.proto b/fixture/PutScheduledActionResponse.proto
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/fixture/PutScheduledActionResponse.proto
diff --git a/gen/Network/AWS/ApplicationAutoScaling.hs b/gen/Network/AWS/ApplicationAutoScaling.hs
index 3255430..ff456f4 100644
--- a/gen/Network/AWS/ApplicationAutoScaling.hs
+++ b/gen/Network/AWS/ApplicationAutoScaling.hs
@@ -5,13 +5,13 @@
-- |
-- Module : Network.AWS.ApplicationAutoScaling
--- Copyright : (c) 2013-2016 Brendan Hay
+-- Copyright : (c) 2013-2017 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
--- With Application Auto Scaling, you can automatically scale your AWS resources. The experience similar to that of <https://aws.amazon.com/autoscaling/ Auto Scaling> . You can use Application Auto Scaling to accomplish the following tasks:
+-- With Application Auto Scaling, you can automatically scale your AWS resources. The experience is similar to that of <https://aws.amazon.com/autoscaling/ Auto Scaling> . You can use Application Auto Scaling to accomplish the following tasks:
--
--
-- * Define scaling policies to automatically scale your AWS resources
@@ -30,6 +30,10 @@
--
-- * Amazon EMR clusters. For more information, see <http://docs.aws.amazon.com/ElasticMapReduce/latest/ManagementGuide/emr-automatic-scaling.html Using Automatic Scaling in Amazon EMR> in the /Amazon EMR Management Guide/ .
--
+-- * AppStream 2.0 fleets. For more information, see <http://docs.aws.amazon.com/appstream2/latest/developerguide/autoscaling.html Fleet Auto Scaling for Amazon AppStream 2.0> in the /Amazon AppStream 2.0 Developer Guide/ .
+--
+-- * Provisioned read and write capacity for Amazon DynamoDB tables and global secondary indexes. For more information, see <http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/AutoScaling.html Managing Throughput Capacity Automatically with DynamoDB Auto Scaling> in the /Amazon DynamoDB Developer Guide/ .
+--
--
--
-- For a list of supported regions, see <http://docs.aws.amazon.com/general/latest/gr/rande.html#as-app_region AWS Regions and Endpoints: Application Auto Scaling> in the /AWS General Reference/ .
@@ -81,6 +85,15 @@ module Network.AWS.ApplicationAutoScaling
-- ** DescribeScalingPolicies (Paginated)
, module Network.AWS.ApplicationAutoScaling.DescribeScalingPolicies
+ -- ** PutScheduledAction
+ , module Network.AWS.ApplicationAutoScaling.PutScheduledAction
+
+ -- ** DeleteScheduledAction
+ , module Network.AWS.ApplicationAutoScaling.DeleteScheduledAction
+
+ -- ** DescribeScheduledActions
+ , module Network.AWS.ApplicationAutoScaling.DescribeScheduledActions
+
-- ** DescribeScalableTargets (Paginated)
, module Network.AWS.ApplicationAutoScaling.DescribeScalableTargets
@@ -98,6 +111,12 @@ module Network.AWS.ApplicationAutoScaling
-- ** MetricAggregationType
, MetricAggregationType (..)
+ -- ** MetricStatistic
+ , MetricStatistic (..)
+
+ -- ** MetricType
+ , MetricType (..)
+
-- ** PolicyType
, PolicyType (..)
@@ -116,6 +135,27 @@ module Network.AWS.ApplicationAutoScaling
, aAlarmName
, aAlarmARN
+ -- ** CustomizedMetricSpecification
+ , CustomizedMetricSpecification
+ , customizedMetricSpecification
+ , cmsDimensions
+ , cmsUnit
+ , cmsMetricName
+ , cmsNamespace
+ , cmsStatistic
+
+ -- ** MetricDimension
+ , MetricDimension
+ , metricDimension
+ , mdName
+ , mdValue
+
+ -- ** PredefinedMetricSpecification
+ , PredefinedMetricSpecification
+ , predefinedMetricSpecification
+ , pmsResourceLabel
+ , pmsPredefinedMetricType
+
-- ** ScalableTarget
, ScalableTarget
, scalableTarget
@@ -127,24 +167,31 @@ module Network.AWS.ApplicationAutoScaling
, stRoleARN
, stCreationTime
+ -- ** ScalableTargetAction
+ , ScalableTargetAction
+ , scalableTargetAction
+ , staMaxCapacity
+ , staMinCapacity
+
-- ** ScalingActivity
, ScalingActivity
, scalingActivity
- , saStatusMessage
- , saEndTime
- , saDetails
- , saActivityId
- , saServiceNamespace
- , saResourceId
- , saScalableDimension
- , saDescription
- , saCause
- , saStartTime
- , saStatusCode
+ , sStatusMessage
+ , sEndTime
+ , sDetails
+ , sActivityId
+ , sServiceNamespace
+ , sResourceId
+ , sScalableDimension
+ , sDescription
+ , sCause
+ , sStartTime
+ , sStatusCode
-- ** ScalingPolicy
, ScalingPolicy
, scalingPolicy
+ , spTargetTrackingScalingPolicyConfiguration
, spStepScalingPolicyConfiguration
, spAlarms
, spPolicyARN
@@ -155,6 +202,20 @@ module Network.AWS.ApplicationAutoScaling
, spPolicyType
, spCreationTime
+ -- ** ScheduledAction
+ , ScheduledAction
+ , scheduledAction
+ , saScalableDimension
+ , saStartTime
+ , saEndTime
+ , saScalableTargetAction
+ , saScheduledActionName
+ , saScheduledActionARN
+ , saServiceNamespace
+ , saSchedule
+ , saResourceId
+ , saCreationTime
+
-- ** StepAdjustment
, StepAdjustment
, stepAdjustment
@@ -170,17 +231,30 @@ module Network.AWS.ApplicationAutoScaling
, sspcCooldown
, sspcMetricAggregationType
, sspcMinAdjustmentMagnitude
+
+ -- ** TargetTrackingScalingPolicyConfiguration
+ , TargetTrackingScalingPolicyConfiguration
+ , targetTrackingScalingPolicyConfiguration
+ , ttspcPredefinedMetricSpecification
+ , ttspcScaleInCooldown
+ , ttspcCustomizedMetricSpecification
+ , ttspcDisableScaleIn
+ , ttspcScaleOutCooldown
+ , ttspcTargetValue
) where
-import Network.AWS.ApplicationAutoScaling.DeleteScalingPolicy
-import Network.AWS.ApplicationAutoScaling.DeregisterScalableTarget
-import Network.AWS.ApplicationAutoScaling.DescribeScalableTargets
-import Network.AWS.ApplicationAutoScaling.DescribeScalingActivities
-import Network.AWS.ApplicationAutoScaling.DescribeScalingPolicies
-import Network.AWS.ApplicationAutoScaling.PutScalingPolicy
-import Network.AWS.ApplicationAutoScaling.RegisterScalableTarget
-import Network.AWS.ApplicationAutoScaling.Types
-import Network.AWS.ApplicationAutoScaling.Waiters
+import Network.AWS.ApplicationAutoScaling.DeleteScalingPolicy
+import Network.AWS.ApplicationAutoScaling.DeleteScheduledAction
+import Network.AWS.ApplicationAutoScaling.DeregisterScalableTarget
+import Network.AWS.ApplicationAutoScaling.DescribeScalableTargets
+import Network.AWS.ApplicationAutoScaling.DescribeScalingActivities
+import Network.AWS.ApplicationAutoScaling.DescribeScalingPolicies
+import Network.AWS.ApplicationAutoScaling.DescribeScheduledActions
+import Network.AWS.ApplicationAutoScaling.PutScalingPolicy
+import Network.AWS.ApplicationAutoScaling.PutScheduledAction
+import Network.AWS.ApplicationAutoScaling.RegisterScalableTarget
+import Network.AWS.ApplicationAutoScaling.Types
+import Network.AWS.ApplicationAutoScaling.Waiters
{- $errors
Error matchers are designed for use with the functions provided by
diff --git a/gen/Network/AWS/ApplicationAutoScaling/DeleteScalingPolicy.hs b/gen/Network/AWS/ApplicationAutoScaling/DeleteScalingPolicy.hs
index 1a35875..255c68b 100644
--- a/gen/Network/AWS/ApplicationAutoScaling/DeleteScalingPolicy.hs
+++ b/gen/Network/AWS/ApplicationAutoScaling/DeleteScalingPolicy.hs
@@ -12,9 +12,9 @@
-- |
-- Module : Network.AWS.ApplicationAutoScaling.DeleteScalingPolicy
--- Copyright : (c) 2013-2016 Brendan Hay
+-- Copyright : (c) 2013-2017 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
@@ -43,20 +43,21 @@ module Network.AWS.ApplicationAutoScaling.DeleteScalingPolicy
, dsprsResponseStatus
) where
-import Network.AWS.ApplicationAutoScaling.Types
-import Network.AWS.ApplicationAutoScaling.Types.Product
-import Network.AWS.Lens
-import Network.AWS.Prelude
-import Network.AWS.Request
-import Network.AWS.Response
+import Network.AWS.ApplicationAutoScaling.Types
+import Network.AWS.ApplicationAutoScaling.Types.Product
+import Network.AWS.Lens
+import Network.AWS.Prelude
+import Network.AWS.Request
+import Network.AWS.Response
-- | /See:/ 'deleteScalingPolicy' smart constructor.
data DeleteScalingPolicy = DeleteScalingPolicy'
- { _dspPolicyName :: !Text
- , _dspServiceNamespace :: !ServiceNamespace
- , _dspResourceId :: !Text
- , _dspScalableDimension :: !ScalableDimension
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _dspPolicyName :: !Text
+ , _dspServiceNamespace :: !ServiceNamespace
+ , _dspResourceId :: !Text
+ , _dspScalableDimension :: !ScalableDimension
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'DeleteScalingPolicy' with the minimum fields required to make a request.
--
@@ -66,9 +67,9 @@ data DeleteScalingPolicy = DeleteScalingPolicy'
--
-- * 'dspServiceNamespace' - The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
--
--- * 'dspResourceId' - The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
+-- * 'dspResourceId' - The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
--
--- * 'dspScalableDimension' - The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
+-- * 'dspScalableDimension' - The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
deleteScalingPolicy
:: Text -- ^ 'dspPolicyName'
-> ServiceNamespace -- ^ 'dspServiceNamespace'
@@ -76,12 +77,13 @@ deleteScalingPolicy
-> ScalableDimension -- ^ 'dspScalableDimension'
-> DeleteScalingPolicy
deleteScalingPolicy pPolicyName_ pServiceNamespace_ pResourceId_ pScalableDimension_ =
- DeleteScalingPolicy'
- { _dspPolicyName = pPolicyName_
- , _dspServiceNamespace = pServiceNamespace_
- , _dspResourceId = pResourceId_
- , _dspScalableDimension = pScalableDimension_
- }
+ DeleteScalingPolicy'
+ { _dspPolicyName = pPolicyName_
+ , _dspServiceNamespace = pServiceNamespace_
+ , _dspResourceId = pResourceId_
+ , _dspScalableDimension = pScalableDimension_
+ }
+
-- | The name of the scaling policy.
dspPolicyName :: Lens' DeleteScalingPolicy Text
@@ -91,11 +93,11 @@ dspPolicyName = lens _dspPolicyName (\ s a -> s{_dspPolicyName = a});
dspServiceNamespace :: Lens' DeleteScalingPolicy ServiceNamespace
dspServiceNamespace = lens _dspServiceNamespace (\ s a -> s{_dspServiceNamespace = a});
--- | The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
+-- | The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
dspResourceId :: Lens' DeleteScalingPolicy Text
dspResourceId = lens _dspResourceId (\ s a -> s{_dspResourceId = a});
--- | The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
+-- | The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
dspScalableDimension :: Lens' DeleteScalingPolicy ScalableDimension
dspScalableDimension = lens _dspScalableDimension (\ s a -> s{_dspScalableDimension = a});
@@ -108,9 +110,9 @@ instance AWSRequest DeleteScalingPolicy where
(\ s h x ->
DeleteScalingPolicyResponse' <$> (pure (fromEnum s)))
-instance Hashable DeleteScalingPolicy
+instance Hashable DeleteScalingPolicy where
-instance NFData DeleteScalingPolicy
+instance NFData DeleteScalingPolicy where
instance ToHeaders DeleteScalingPolicy where
toHeaders
@@ -139,8 +141,9 @@ instance ToQuery DeleteScalingPolicy where
-- | /See:/ 'deleteScalingPolicyResponse' smart constructor.
newtype DeleteScalingPolicyResponse = DeleteScalingPolicyResponse'
- { _dsprsResponseStatus :: Int
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _dsprsResponseStatus :: Int
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'DeleteScalingPolicyResponse' with the minimum fields required to make a request.
--
@@ -151,12 +154,11 @@ deleteScalingPolicyResponse
:: Int -- ^ 'dsprsResponseStatus'
-> DeleteScalingPolicyResponse
deleteScalingPolicyResponse pResponseStatus_ =
- DeleteScalingPolicyResponse'
- { _dsprsResponseStatus = pResponseStatus_
- }
+ DeleteScalingPolicyResponse' {_dsprsResponseStatus = pResponseStatus_}
+
-- | -- | The response status code.
dsprsResponseStatus :: Lens' DeleteScalingPolicyResponse Int
dsprsResponseStatus = lens _dsprsResponseStatus (\ s a -> s{_dsprsResponseStatus = a});
-instance NFData DeleteScalingPolicyResponse
+instance NFData DeleteScalingPolicyResponse where
diff --git a/gen/Network/AWS/ApplicationAutoScaling/DeleteScheduledAction.hs b/gen/Network/AWS/ApplicationAutoScaling/DeleteScheduledAction.hs
new file mode 100644
index 0000000..81012eb
--- /dev/null
+++ b/gen/Network/AWS/ApplicationAutoScaling/DeleteScheduledAction.hs
@@ -0,0 +1,161 @@
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE TypeFamilies #-}
+
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
+{-# OPTIONS_GHC -fno-warn-unused-matches #-}
+
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
+-- Module : Network.AWS.ApplicationAutoScaling.DeleteScheduledAction
+-- Copyright : (c) 2013-2017 Brendan Hay
+-- License : Mozilla Public License, v. 2.0.
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+-- Stability : auto-generated
+-- Portability : non-portable (GHC extensions)
+--
+-- Deletes the specified Application Auto Scaling scheduled action.
+--
+--
+module Network.AWS.ApplicationAutoScaling.DeleteScheduledAction
+ (
+ -- * Creating a Request
+ deleteScheduledAction
+ , DeleteScheduledAction
+ -- * Request Lenses
+ , dsaScalableDimension
+ , dsaServiceNamespace
+ , dsaScheduledActionName
+ , dsaResourceId
+
+ -- * Destructuring the Response
+ , deleteScheduledActionResponse
+ , DeleteScheduledActionResponse
+ -- * Response Lenses
+ , delrsResponseStatus
+ ) where
+
+import Network.AWS.ApplicationAutoScaling.Types
+import Network.AWS.ApplicationAutoScaling.Types.Product
+import Network.AWS.Lens
+import Network.AWS.Prelude
+import Network.AWS.Request
+import Network.AWS.Response
+
+-- | /See:/ 'deleteScheduledAction' smart constructor.
+data DeleteScheduledAction = DeleteScheduledAction'
+ { _dsaScalableDimension :: !(Maybe ScalableDimension)
+ , _dsaServiceNamespace :: !ServiceNamespace
+ , _dsaScheduledActionName :: !Text
+ , _dsaResourceId :: !Text
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
+
+-- | Creates a value of 'DeleteScheduledAction' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'dsaScalableDimension' - The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
+--
+-- * 'dsaServiceNamespace' - The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
+--
+-- * 'dsaScheduledActionName' - The name of the scheduled action.
+--
+-- * 'dsaResourceId' - The identifier of the resource associated with the scheduled action. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
+deleteScheduledAction
+ :: ServiceNamespace -- ^ 'dsaServiceNamespace'
+ -> Text -- ^ 'dsaScheduledActionName'
+ -> Text -- ^ 'dsaResourceId'
+ -> DeleteScheduledAction
+deleteScheduledAction pServiceNamespace_ pScheduledActionName_ pResourceId_ =
+ DeleteScheduledAction'
+ { _dsaScalableDimension = Nothing
+ , _dsaServiceNamespace = pServiceNamespace_
+ , _dsaScheduledActionName = pScheduledActionName_
+ , _dsaResourceId = pResourceId_
+ }
+
+
+-- | The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
+dsaScalableDimension :: Lens' DeleteScheduledAction (Maybe ScalableDimension)
+dsaScalableDimension = lens _dsaScalableDimension (\ s a -> s{_dsaScalableDimension = a});
+
+-- | The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
+dsaServiceNamespace :: Lens' DeleteScheduledAction ServiceNamespace
+dsaServiceNamespace = lens _dsaServiceNamespace (\ s a -> s{_dsaServiceNamespace = a});
+
+-- | The name of the scheduled action.
+dsaScheduledActionName :: Lens' DeleteScheduledAction Text
+dsaScheduledActionName = lens _dsaScheduledActionName (\ s a -> s{_dsaScheduledActionName = a});
+
+-- | The identifier of the resource associated with the scheduled action. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
+dsaResourceId :: Lens' DeleteScheduledAction Text
+dsaResourceId = lens _dsaResourceId (\ s a -> s{_dsaResourceId = a});
+
+instance AWSRequest DeleteScheduledAction where
+ type Rs DeleteScheduledAction =
+ DeleteScheduledActionResponse
+ request = postJSON applicationAutoScaling
+ response
+ = receiveEmpty
+ (\ s h x ->
+ DeleteScheduledActionResponse' <$>
+ (pure (fromEnum s)))
+
+instance Hashable DeleteScheduledAction where
+
+instance NFData DeleteScheduledAction where
+
+instance ToHeaders DeleteScheduledAction where
+ toHeaders
+ = const
+ (mconcat
+ ["X-Amz-Target" =#
+ ("AnyScaleFrontendService.DeleteScheduledAction" ::
+ ByteString),
+ "Content-Type" =#
+ ("application/x-amz-json-1.1" :: ByteString)])
+
+instance ToJSON DeleteScheduledAction where
+ toJSON DeleteScheduledAction'{..}
+ = object
+ (catMaybes
+ [("ScalableDimension" .=) <$> _dsaScalableDimension,
+ Just ("ServiceNamespace" .= _dsaServiceNamespace),
+ Just
+ ("ScheduledActionName" .= _dsaScheduledActionName),
+ Just ("ResourceId" .= _dsaResourceId)])
+
+instance ToPath DeleteScheduledAction where
+ toPath = const "/"
+
+instance ToQuery DeleteScheduledAction where
+ toQuery = const mempty
+
+-- | /See:/ 'deleteScheduledActionResponse' smart constructor.
+newtype DeleteScheduledActionResponse = DeleteScheduledActionResponse'
+ { _delrsResponseStatus :: Int
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
+
+-- | Creates a value of 'DeleteScheduledActionResponse' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'delrsResponseStatus' - -- | The response status code.
+deleteScheduledActionResponse
+ :: Int -- ^ 'delrsResponseStatus'
+ -> DeleteScheduledActionResponse
+deleteScheduledActionResponse pResponseStatus_ =
+ DeleteScheduledActionResponse' {_delrsResponseStatus = pResponseStatus_}
+
+
+-- | -- | The response status code.
+delrsResponseStatus :: Lens' DeleteScheduledActionResponse Int
+delrsResponseStatus = lens _delrsResponseStatus (\ s a -> s{_delrsResponseStatus = a});
+
+instance NFData DeleteScheduledActionResponse where
diff --git a/gen/Network/AWS/ApplicationAutoScaling/DeregisterScalableTarget.hs b/gen/Network/AWS/ApplicationAutoScaling/DeregisterScalableTarget.hs
index 6d66db5..f5af171 100644
--- a/gen/Network/AWS/ApplicationAutoScaling/DeregisterScalableTarget.hs
+++ b/gen/Network/AWS/ApplicationAutoScaling/DeregisterScalableTarget.hs
@@ -12,9 +12,9 @@
-- |
-- Module : Network.AWS.ApplicationAutoScaling.DeregisterScalableTarget
--- Copyright : (c) 2013-2016 Brendan Hay
+-- Copyright : (c) 2013-2017 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
@@ -42,19 +42,20 @@ module Network.AWS.ApplicationAutoScaling.DeregisterScalableTarget
, dstrsResponseStatus
) where
-import Network.AWS.ApplicationAutoScaling.Types
-import Network.AWS.ApplicationAutoScaling.Types.Product
-import Network.AWS.Lens
-import Network.AWS.Prelude
-import Network.AWS.Request
-import Network.AWS.Response
+import Network.AWS.ApplicationAutoScaling.Types
+import Network.AWS.ApplicationAutoScaling.Types.Product
+import Network.AWS.Lens
+import Network.AWS.Prelude
+import Network.AWS.Request
+import Network.AWS.Response
-- | /See:/ 'deregisterScalableTarget' smart constructor.
data DeregisterScalableTarget = DeregisterScalableTarget'
- { _derServiceNamespace :: !ServiceNamespace
- , _derResourceId :: !Text
- , _derScalableDimension :: !ScalableDimension
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _derServiceNamespace :: !ServiceNamespace
+ , _derResourceId :: !Text
+ , _derScalableDimension :: !ScalableDimension
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'DeregisterScalableTarget' with the minimum fields required to make a request.
--
@@ -62,30 +63,31 @@ data DeregisterScalableTarget = DeregisterScalableTarget'
--
-- * 'derServiceNamespace' - The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
--
--- * 'derResourceId' - The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
+-- * 'derResourceId' - The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
--
--- * 'derScalableDimension' - The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
+-- * 'derScalableDimension' - The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
deregisterScalableTarget
:: ServiceNamespace -- ^ 'derServiceNamespace'
-> Text -- ^ 'derResourceId'
-> ScalableDimension -- ^ 'derScalableDimension'
-> DeregisterScalableTarget
deregisterScalableTarget pServiceNamespace_ pResourceId_ pScalableDimension_ =
- DeregisterScalableTarget'
- { _derServiceNamespace = pServiceNamespace_
- , _derResourceId = pResourceId_
- , _derScalableDimension = pScalableDimension_
- }
+ DeregisterScalableTarget'
+ { _derServiceNamespace = pServiceNamespace_
+ , _derResourceId = pResourceId_
+ , _derScalableDimension = pScalableDimension_
+ }
+
-- | The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
derServiceNamespace :: Lens' DeregisterScalableTarget ServiceNamespace
derServiceNamespace = lens _derServiceNamespace (\ s a -> s{_derServiceNamespace = a});
--- | The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
+-- | The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
derResourceId :: Lens' DeregisterScalableTarget Text
derResourceId = lens _derResourceId (\ s a -> s{_derResourceId = a});
--- | The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
+-- | The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
derScalableDimension :: Lens' DeregisterScalableTarget ScalableDimension
derScalableDimension = lens _derScalableDimension (\ s a -> s{_derScalableDimension = a});
@@ -99,9 +101,9 @@ instance AWSRequest DeregisterScalableTarget where
DeregisterScalableTargetResponse' <$>
(pure (fromEnum s)))
-instance Hashable DeregisterScalableTarget
+instance Hashable DeregisterScalableTarget where
-instance NFData DeregisterScalableTarget
+instance NFData DeregisterScalableTarget where
instance ToHeaders DeregisterScalableTarget where
toHeaders
@@ -129,8 +131,9 @@ instance ToQuery DeregisterScalableTarget where
-- | /See:/ 'deregisterScalableTargetResponse' smart constructor.
newtype DeregisterScalableTargetResponse = DeregisterScalableTargetResponse'
- { _dstrsResponseStatus :: Int
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _dstrsResponseStatus :: Int
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'DeregisterScalableTargetResponse' with the minimum fields required to make a request.
--
@@ -141,12 +144,12 @@ deregisterScalableTargetResponse
:: Int -- ^ 'dstrsResponseStatus'
-> DeregisterScalableTargetResponse
deregisterScalableTargetResponse pResponseStatus_ =
- DeregisterScalableTargetResponse'
- { _dstrsResponseStatus = pResponseStatus_
- }
+ DeregisterScalableTargetResponse' {_dstrsResponseStatus = pResponseStatus_}
+
-- | -- | The response status code.
dstrsResponseStatus :: Lens' DeregisterScalableTargetResponse Int
dstrsResponseStatus = lens _dstrsResponseStatus (\ s a -> s{_dstrsResponseStatus = a});
instance NFData DeregisterScalableTargetResponse
+ where
diff --git a/gen/Network/AWS/ApplicationAutoScaling/DescribeScalableTargets.hs b/gen/Network/AWS/ApplicationAutoScaling/DescribeScalableTargets.hs
index f385fb9..11c6535 100644
--- a/gen/Network/AWS/ApplicationAutoScaling/DescribeScalableTargets.hs
+++ b/gen/Network/AWS/ApplicationAutoScaling/DescribeScalableTargets.hs
@@ -12,9 +12,9 @@
-- |
-- Module : Network.AWS.ApplicationAutoScaling.DescribeScalableTargets
--- Copyright : (c) 2013-2016 Brendan Hay
+-- Copyright : (c) 2013-2017 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
@@ -48,30 +48,31 @@ module Network.AWS.ApplicationAutoScaling.DescribeScalableTargets
, dstsrsResponseStatus
) where
-import Network.AWS.ApplicationAutoScaling.Types
-import Network.AWS.ApplicationAutoScaling.Types.Product
-import Network.AWS.Lens
-import Network.AWS.Pager
-import Network.AWS.Prelude
-import Network.AWS.Request
-import Network.AWS.Response
+import Network.AWS.ApplicationAutoScaling.Types
+import Network.AWS.ApplicationAutoScaling.Types.Product
+import Network.AWS.Lens
+import Network.AWS.Pager
+import Network.AWS.Prelude
+import Network.AWS.Request
+import Network.AWS.Response
-- | /See:/ 'describeScalableTargets' smart constructor.
data DescribeScalableTargets = DescribeScalableTargets'
- { _dstResourceIds :: !(Maybe [Text])
- , _dstScalableDimension :: !(Maybe ScalableDimension)
- , _dstNextToken :: !(Maybe Text)
- , _dstMaxResults :: !(Maybe Int)
- , _dstServiceNamespace :: !ServiceNamespace
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _dstResourceIds :: !(Maybe [Text])
+ , _dstScalableDimension :: !(Maybe ScalableDimension)
+ , _dstNextToken :: !(Maybe Text)
+ , _dstMaxResults :: !(Maybe Int)
+ , _dstServiceNamespace :: !ServiceNamespace
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'DescribeScalableTargets' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
--- * 'dstResourceIds' - The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. If you specify a scalable dimension, you must also specify a resource ID. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
+-- * 'dstResourceIds' - The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. If you specify a scalable dimension, you must also specify a resource ID. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
--
--- * 'dstScalableDimension' - The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
+-- * 'dstScalableDimension' - The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
--
-- * 'dstNextToken' - The token for the next set of results.
--
@@ -82,19 +83,20 @@ describeScalableTargets
:: ServiceNamespace -- ^ 'dstServiceNamespace'
-> DescribeScalableTargets
describeScalableTargets pServiceNamespace_ =
- DescribeScalableTargets'
- { _dstResourceIds = Nothing
- , _dstScalableDimension = Nothing
- , _dstNextToken = Nothing
- , _dstMaxResults = Nothing
- , _dstServiceNamespace = pServiceNamespace_
- }
-
--- | The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. If you specify a scalable dimension, you must also specify a resource ID. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
+ DescribeScalableTargets'
+ { _dstResourceIds = Nothing
+ , _dstScalableDimension = Nothing
+ , _dstNextToken = Nothing
+ , _dstMaxResults = Nothing
+ , _dstServiceNamespace = pServiceNamespace_
+ }
+
+
+-- | The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. If you specify a scalable dimension, you must also specify a resource ID. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
dstResourceIds :: Lens' DescribeScalableTargets [Text]
dstResourceIds = lens _dstResourceIds (\ s a -> s{_dstResourceIds = a}) . _Default . _Coerce;
--- | The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
+-- | The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
dstScalableDimension :: Lens' DescribeScalableTargets (Maybe ScalableDimension)
dstScalableDimension = lens _dstScalableDimension (\ s a -> s{_dstScalableDimension = a});
@@ -129,9 +131,9 @@ instance AWSRequest DescribeScalableTargets where
(x .?> "ScalableTargets" .!@ mempty)
<*> (pure (fromEnum s)))
-instance Hashable DescribeScalableTargets
+instance Hashable DescribeScalableTargets where
-instance NFData DescribeScalableTargets
+instance NFData DescribeScalableTargets where
instance ToHeaders DescribeScalableTargets where
toHeaders
@@ -161,10 +163,11 @@ instance ToQuery DescribeScalableTargets where
-- | /See:/ 'describeScalableTargetsResponse' smart constructor.
data DescribeScalableTargetsResponse = DescribeScalableTargetsResponse'
- { _dstsrsNextToken :: !(Maybe Text)
- , _dstsrsScalableTargets :: !(Maybe [ScalableTarget])
- , _dstsrsResponseStatus :: !Int
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _dstsrsNextToken :: !(Maybe Text)
+ , _dstsrsScalableTargets :: !(Maybe [ScalableTarget])
+ , _dstsrsResponseStatus :: !Int
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'DescribeScalableTargetsResponse' with the minimum fields required to make a request.
--
@@ -179,11 +182,12 @@ describeScalableTargetsResponse
:: Int -- ^ 'dstsrsResponseStatus'
-> DescribeScalableTargetsResponse
describeScalableTargetsResponse pResponseStatus_ =
- DescribeScalableTargetsResponse'
- { _dstsrsNextToken = Nothing
- , _dstsrsScalableTargets = Nothing
- , _dstsrsResponseStatus = pResponseStatus_
- }
+ DescribeScalableTargetsResponse'
+ { _dstsrsNextToken = Nothing
+ , _dstsrsScalableTargets = Nothing
+ , _dstsrsResponseStatus = pResponseStatus_
+ }
+
-- | The token required to get the next set of results. This value is @null@ if there are no more results to return.
dstsrsNextToken :: Lens' DescribeScalableTargetsResponse (Maybe Text)
@@ -197,4 +201,4 @@ dstsrsScalableTargets = lens _dstsrsScalableTargets (\ s a -> s{_dstsrsScalableT
dstsrsResponseStatus :: Lens' DescribeScalableTargetsResponse Int
dstsrsResponseStatus = lens _dstsrsResponseStatus (\ s a -> s{_dstsrsResponseStatus = a});
-instance NFData DescribeScalableTargetsResponse
+instance NFData DescribeScalableTargetsResponse where
diff --git a/gen/Network/AWS/ApplicationAutoScaling/DescribeScalingActivities.hs b/gen/Network/AWS/ApplicationAutoScaling/DescribeScalingActivities.hs
index 4ae9e41..875f01e 100644
--- a/gen/Network/AWS/ApplicationAutoScaling/DescribeScalingActivities.hs
+++ b/gen/Network/AWS/ApplicationAutoScaling/DescribeScalingActivities.hs
@@ -12,9 +12,9 @@
-- |
-- Module : Network.AWS.ApplicationAutoScaling.DescribeScalingActivities
--- Copyright : (c) 2013-2016 Brendan Hay
+-- Copyright : (c) 2013-2017 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
@@ -33,89 +33,91 @@ module Network.AWS.ApplicationAutoScaling.DescribeScalingActivities
describeScalingActivities
, DescribeScalingActivities
-- * Request Lenses
- , dsaScalableDimension
- , dsaResourceId
- , dsaNextToken
- , dsaMaxResults
- , dsaServiceNamespace
+ , desScalableDimension
+ , desResourceId
+ , desNextToken
+ , desMaxResults
+ , desServiceNamespace
-- * Destructuring the Response
, describeScalingActivitiesResponse
, DescribeScalingActivitiesResponse
-- * Response Lenses
- , dsarsScalingActivities
- , dsarsNextToken
- , dsarsResponseStatus
+ , dsasrsScalingActivities
+ , dsasrsNextToken
+ , dsasrsResponseStatus
) where
-import Network.AWS.ApplicationAutoScaling.Types
-import Network.AWS.ApplicationAutoScaling.Types.Product
-import Network.AWS.Lens
-import Network.AWS.Pager
-import Network.AWS.Prelude
-import Network.AWS.Request
-import Network.AWS.Response
+import Network.AWS.ApplicationAutoScaling.Types
+import Network.AWS.ApplicationAutoScaling.Types.Product
+import Network.AWS.Lens
+import Network.AWS.Pager
+import Network.AWS.Prelude
+import Network.AWS.Request
+import Network.AWS.Response
-- | /See:/ 'describeScalingActivities' smart constructor.
data DescribeScalingActivities = DescribeScalingActivities'
- { _dsaScalableDimension :: !(Maybe ScalableDimension)
- , _dsaResourceId :: !(Maybe Text)
- , _dsaNextToken :: !(Maybe Text)
- , _dsaMaxResults :: !(Maybe Int)
- , _dsaServiceNamespace :: !ServiceNamespace
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _desScalableDimension :: !(Maybe ScalableDimension)
+ , _desResourceId :: !(Maybe Text)
+ , _desNextToken :: !(Maybe Text)
+ , _desMaxResults :: !(Maybe Int)
+ , _desServiceNamespace :: !ServiceNamespace
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'DescribeScalingActivities' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
--- * 'dsaScalableDimension' - The scalable dimension. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
+-- * 'desScalableDimension' - The scalable dimension. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
--
--- * 'dsaResourceId' - The identifier of the resource associated with the scaling activity. This string consists of the resource type and unique identifier. If you specify a scalable dimension, you must also specify a resource ID. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
+-- * 'desResourceId' - The identifier of the resource associated with the scaling activity. This string consists of the resource type and unique identifier. If you specify a scalable dimension, you must also specify a resource ID. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
--
--- * 'dsaNextToken' - The token for the next set of results.
+-- * 'desNextToken' - The token for the next set of results.
--
--- * 'dsaMaxResults' - The maximum number of scalable target results. This value can be between 1 and 50. The default value is 50. If this parameter is used, the operation returns up to @MaxResults@ results at a time, along with a @NextToken@ value. To get the next set of results, include the @NextToken@ value in a subsequent call. If this parameter is not used, the operation returns up to 50 results and a @NextToken@ value, if applicable.
+-- * 'desMaxResults' - The maximum number of scalable target results. This value can be between 1 and 50. The default value is 50. If this parameter is used, the operation returns up to @MaxResults@ results at a time, along with a @NextToken@ value. To get the next set of results, include the @NextToken@ value in a subsequent call. If this parameter is not used, the operation returns up to 50 results and a @NextToken@ value, if applicable.
--
--- * 'dsaServiceNamespace' - The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
+-- * 'desServiceNamespace' - The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
describeScalingActivities
- :: ServiceNamespace -- ^ 'dsaServiceNamespace'
+ :: ServiceNamespace -- ^ 'desServiceNamespace'
-> DescribeScalingActivities
describeScalingActivities pServiceNamespace_ =
- DescribeScalingActivities'
- { _dsaScalableDimension = Nothing
- , _dsaResourceId = Nothing
- , _dsaNextToken = Nothing
- , _dsaMaxResults = Nothing
- , _dsaServiceNamespace = pServiceNamespace_
- }
-
--- | The scalable dimension. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
-dsaScalableDimension :: Lens' DescribeScalingActivities (Maybe ScalableDimension)
-dsaScalableDimension = lens _dsaScalableDimension (\ s a -> s{_dsaScalableDimension = a});
-
--- | The identifier of the resource associated with the scaling activity. This string consists of the resource type and unique identifier. If you specify a scalable dimension, you must also specify a resource ID. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
-dsaResourceId :: Lens' DescribeScalingActivities (Maybe Text)
-dsaResourceId = lens _dsaResourceId (\ s a -> s{_dsaResourceId = a});
+ DescribeScalingActivities'
+ { _desScalableDimension = Nothing
+ , _desResourceId = Nothing
+ , _desNextToken = Nothing
+ , _desMaxResults = Nothing
+ , _desServiceNamespace = pServiceNamespace_
+ }
+
+
+-- | The scalable dimension. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
+desScalableDimension :: Lens' DescribeScalingActivities (Maybe ScalableDimension)
+desScalableDimension = lens _desScalableDimension (\ s a -> s{_desScalableDimension = a});
+
+-- | The identifier of the resource associated with the scaling activity. This string consists of the resource type and unique identifier. If you specify a scalable dimension, you must also specify a resource ID. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
+desResourceId :: Lens' DescribeScalingActivities (Maybe Text)
+desResourceId = lens _desResourceId (\ s a -> s{_desResourceId = a});
-- | The token for the next set of results.
-dsaNextToken :: Lens' DescribeScalingActivities (Maybe Text)
-dsaNextToken = lens _dsaNextToken (\ s a -> s{_dsaNextToken = a});
+desNextToken :: Lens' DescribeScalingActivities (Maybe Text)
+desNextToken = lens _desNextToken (\ s a -> s{_desNextToken = a});
-- | The maximum number of scalable target results. This value can be between 1 and 50. The default value is 50. If this parameter is used, the operation returns up to @MaxResults@ results at a time, along with a @NextToken@ value. To get the next set of results, include the @NextToken@ value in a subsequent call. If this parameter is not used, the operation returns up to 50 results and a @NextToken@ value, if applicable.
-dsaMaxResults :: Lens' DescribeScalingActivities (Maybe Int)
-dsaMaxResults = lens _dsaMaxResults (\ s a -> s{_dsaMaxResults = a});
+desMaxResults :: Lens' DescribeScalingActivities (Maybe Int)
+desMaxResults = lens _desMaxResults (\ s a -> s{_desMaxResults = a});
-- | The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
-dsaServiceNamespace :: Lens' DescribeScalingActivities ServiceNamespace
-dsaServiceNamespace = lens _dsaServiceNamespace (\ s a -> s{_dsaServiceNamespace = a});
+desServiceNamespace :: Lens' DescribeScalingActivities ServiceNamespace
+desServiceNamespace = lens _desServiceNamespace (\ s a -> s{_desServiceNamespace = a});
instance AWSPager DescribeScalingActivities where
page rq rs
- | stop (rs ^. dsarsNextToken) = Nothing
- | stop (rs ^. dsarsScalingActivities) = Nothing
+ | stop (rs ^. dsasrsNextToken) = Nothing
+ | stop (rs ^. dsasrsScalingActivities) = Nothing
| otherwise =
- Just $ rq & dsaNextToken .~ rs ^. dsarsNextToken
+ Just $ rq & desNextToken .~ rs ^. dsasrsNextToken
instance AWSRequest DescribeScalingActivities where
type Rs DescribeScalingActivities =
@@ -129,9 +131,9 @@ instance AWSRequest DescribeScalingActivities where
(x .?> "NextToken")
<*> (pure (fromEnum s)))
-instance Hashable DescribeScalingActivities
+instance Hashable DescribeScalingActivities where
-instance NFData DescribeScalingActivities
+instance NFData DescribeScalingActivities where
instance ToHeaders DescribeScalingActivities where
toHeaders
@@ -147,11 +149,11 @@ instance ToJSON DescribeScalingActivities where
toJSON DescribeScalingActivities'{..}
= object
(catMaybes
- [("ScalableDimension" .=) <$> _dsaScalableDimension,
- ("ResourceId" .=) <$> _dsaResourceId,
- ("NextToken" .=) <$> _dsaNextToken,
- ("MaxResults" .=) <$> _dsaMaxResults,
- Just ("ServiceNamespace" .= _dsaServiceNamespace)])
+ [("ScalableDimension" .=) <$> _desScalableDimension,
+ ("ResourceId" .=) <$> _desResourceId,
+ ("NextToken" .=) <$> _desNextToken,
+ ("MaxResults" .=) <$> _desMaxResults,
+ Just ("ServiceNamespace" .= _desServiceNamespace)])
instance ToPath DescribeScalingActivities where
toPath = const "/"
@@ -161,40 +163,43 @@ instance ToQuery DescribeScalingActivities where
-- | /See:/ 'describeScalingActivitiesResponse' smart constructor.
data DescribeScalingActivitiesResponse = DescribeScalingActivitiesResponse'
- { _dsarsScalingActivities :: !(Maybe [ScalingActivity])
- , _dsarsNextToken :: !(Maybe Text)
- , _dsarsResponseStatus :: !Int
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _dsasrsScalingActivities :: !(Maybe [ScalingActivity])
+ , _dsasrsNextToken :: !(Maybe Text)
+ , _dsasrsResponseStatus :: !Int
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'DescribeScalingActivitiesResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
--- * 'dsarsScalingActivities' - A list of scaling activity objects.
+-- * 'dsasrsScalingActivities' - A list of scaling activity objects.
--
--- * 'dsarsNextToken' - The token required to get the next set of results. This value is @null@ if there are no more results to return.
+-- * 'dsasrsNextToken' - The token required to get the next set of results. This value is @null@ if there are no more results to return.
--
--- * 'dsarsResponseStatus' - -- | The response status code.
+-- * 'dsasrsResponseStatus' - -- | The response status code.
describeScalingActivitiesResponse
- :: Int -- ^ 'dsarsResponseStatus'
+ :: Int -- ^ 'dsasrsResponseStatus'
-> DescribeScalingActivitiesResponse
describeScalingActivitiesResponse pResponseStatus_ =
- DescribeScalingActivitiesResponse'
- { _dsarsScalingActivities = Nothing
- , _dsarsNextToken = Nothing
- , _dsarsResponseStatus = pResponseStatus_
- }
+ DescribeScalingActivitiesResponse'
+ { _dsasrsScalingActivities = Nothing
+ , _dsasrsNextToken = Nothing
+ , _dsasrsResponseStatus = pResponseStatus_
+ }
+
-- | A list of scaling activity objects.
-dsarsScalingActivities :: Lens' DescribeScalingActivitiesResponse [ScalingActivity]
-dsarsScalingActivities = lens _dsarsScalingActivities (\ s a -> s{_dsarsScalingActivities = a}) . _Default . _Coerce;
+dsasrsScalingActivities :: Lens' DescribeScalingActivitiesResponse [ScalingActivity]
+dsasrsScalingActivities = lens _dsasrsScalingActivities (\ s a -> s{_dsasrsScalingActivities = a}) . _Default . _Coerce;
-- | The token required to get the next set of results. This value is @null@ if there are no more results to return.
-dsarsNextToken :: Lens' DescribeScalingActivitiesResponse (Maybe Text)
-dsarsNextToken = lens _dsarsNextToken (\ s a -> s{_dsarsNextToken = a});
+dsasrsNextToken :: Lens' DescribeScalingActivitiesResponse (Maybe Text)
+dsasrsNextToken = lens _dsasrsNextToken (\ s a -> s{_dsasrsNextToken = a});
-- | -- | The response status code.
-dsarsResponseStatus :: Lens' DescribeScalingActivitiesResponse Int
-dsarsResponseStatus = lens _dsarsResponseStatus (\ s a -> s{_dsarsResponseStatus = a});
+dsasrsResponseStatus :: Lens' DescribeScalingActivitiesResponse Int
+dsasrsResponseStatus = lens _dsasrsResponseStatus (\ s a -> s{_dsasrsResponseStatus = a});
instance NFData DescribeScalingActivitiesResponse
+ where
diff --git a/gen/Network/AWS/ApplicationAutoScaling/DescribeScalingPolicies.hs b/gen/Network/AWS/ApplicationAutoScaling/DescribeScalingPolicies.hs
index 44442bc..58b3732 100644
--- a/gen/Network/AWS/ApplicationAutoScaling/DescribeScalingPolicies.hs
+++ b/gen/Network/AWS/ApplicationAutoScaling/DescribeScalingPolicies.hs
@@ -12,13 +12,13 @@
-- |
-- Module : Network.AWS.ApplicationAutoScaling.DescribeScalingPolicies
--- Copyright : (c) 2013-2016 Brendan Hay
+-- Copyright : (c) 2013-2017 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
--- Provides descriptive information about the scaling policies in the specified namespace.
+-- Describes the scaling policies for the specified service namespace.
--
--
-- You can filter the results using the @ResourceId@ , @ScalableDimension@ , and @PolicyNames@ parameters.
@@ -49,23 +49,24 @@ module Network.AWS.ApplicationAutoScaling.DescribeScalingPolicies
, drsResponseStatus
) where
-import Network.AWS.ApplicationAutoScaling.Types
-import Network.AWS.ApplicationAutoScaling.Types.Product
-import Network.AWS.Lens
-import Network.AWS.Pager
-import Network.AWS.Prelude
-import Network.AWS.Request
-import Network.AWS.Response
+import Network.AWS.ApplicationAutoScaling.Types
+import Network.AWS.ApplicationAutoScaling.Types.Product
+import Network.AWS.Lens
+import Network.AWS.Pager
+import Network.AWS.Prelude
+import Network.AWS.Request
+import Network.AWS.Response
-- | /See:/ 'describeScalingPolicies' smart constructor.
data DescribeScalingPolicies = DescribeScalingPolicies'
- { _dPolicyNames :: !(Maybe [Text])
- , _dScalableDimension :: !(Maybe ScalableDimension)
- , _dResourceId :: !(Maybe Text)
- , _dNextToken :: !(Maybe Text)
- , _dMaxResults :: !(Maybe Int)
- , _dServiceNamespace :: !ServiceNamespace
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _dPolicyNames :: !(Maybe [Text])
+ , _dScalableDimension :: !(Maybe ScalableDimension)
+ , _dResourceId :: !(Maybe Text)
+ , _dNextToken :: !(Maybe Text)
+ , _dMaxResults :: !(Maybe Int)
+ , _dServiceNamespace :: !ServiceNamespace
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'DescribeScalingPolicies' with the minimum fields required to make a request.
--
@@ -73,9 +74,9 @@ data DescribeScalingPolicies = DescribeScalingPolicies'
--
-- * 'dPolicyNames' - The names of the scaling policies to describe.
--
--- * 'dScalableDimension' - The scalable dimension. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
+-- * 'dScalableDimension' - The scalable dimension. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
--
--- * 'dResourceId' - The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier. If you specify a scalable dimension, you must also specify a resource ID. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
+-- * 'dResourceId' - The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier. If you specify a scalable dimension, you must also specify a resource ID. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
--
-- * 'dNextToken' - The token for the next set of results.
--
@@ -86,24 +87,25 @@ describeScalingPolicies
:: ServiceNamespace -- ^ 'dServiceNamespace'
-> DescribeScalingPolicies
describeScalingPolicies pServiceNamespace_ =
- DescribeScalingPolicies'
- { _dPolicyNames = Nothing
- , _dScalableDimension = Nothing
- , _dResourceId = Nothing
- , _dNextToken = Nothing
- , _dMaxResults = Nothing
- , _dServiceNamespace = pServiceNamespace_
- }
+ DescribeScalingPolicies'
+ { _dPolicyNames = Nothing
+ , _dScalableDimension = Nothing
+ , _dResourceId = Nothing
+ , _dNextToken = Nothing
+ , _dMaxResults = Nothing
+ , _dServiceNamespace = pServiceNamespace_
+ }
+
-- | The names of the scaling policies to describe.
dPolicyNames :: Lens' DescribeScalingPolicies [Text]
dPolicyNames = lens _dPolicyNames (\ s a -> s{_dPolicyNames = a}) . _Default . _Coerce;
--- | The scalable dimension. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
+-- | The scalable dimension. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
dScalableDimension :: Lens' DescribeScalingPolicies (Maybe ScalableDimension)
dScalableDimension = lens _dScalableDimension (\ s a -> s{_dScalableDimension = a});
--- | The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier. If you specify a scalable dimension, you must also specify a resource ID. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
+-- | The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier. If you specify a scalable dimension, you must also specify a resource ID. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
dResourceId :: Lens' DescribeScalingPolicies (Maybe Text)
dResourceId = lens _dResourceId (\ s a -> s{_dResourceId = a});
@@ -138,9 +140,9 @@ instance AWSRequest DescribeScalingPolicies where
(x .?> "ScalingPolicies" .!@ mempty)
<*> (pure (fromEnum s)))
-instance Hashable DescribeScalingPolicies
+instance Hashable DescribeScalingPolicies where
-instance NFData DescribeScalingPolicies
+instance NFData DescribeScalingPolicies where
instance ToHeaders DescribeScalingPolicies where
toHeaders
@@ -171,10 +173,11 @@ instance ToQuery DescribeScalingPolicies where
-- | /See:/ 'describeScalingPoliciesResponse' smart constructor.
data DescribeScalingPoliciesResponse = DescribeScalingPoliciesResponse'
- { _drsNextToken :: !(Maybe Text)
- , _drsScalingPolicies :: !(Maybe [ScalingPolicy])
- , _drsResponseStatus :: !Int
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _drsNextToken :: !(Maybe Text)
+ , _drsScalingPolicies :: !(Maybe [ScalingPolicy])
+ , _drsResponseStatus :: !Int
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'DescribeScalingPoliciesResponse' with the minimum fields required to make a request.
--
@@ -182,24 +185,25 @@ data DescribeScalingPoliciesResponse = DescribeScalingPoliciesResponse'
--
-- * 'drsNextToken' - The token required to get the next set of results. This value is @null@ if there are no more results to return.
--
--- * 'drsScalingPolicies' - A list of scaling policy objects.
+-- * 'drsScalingPolicies' - Information about the scaling policies.
--
-- * 'drsResponseStatus' - -- | The response status code.
describeScalingPoliciesResponse
:: Int -- ^ 'drsResponseStatus'
-> DescribeScalingPoliciesResponse
describeScalingPoliciesResponse pResponseStatus_ =
- DescribeScalingPoliciesResponse'
- { _drsNextToken = Nothing
- , _drsScalingPolicies = Nothing
- , _drsResponseStatus = pResponseStatus_
- }
+ DescribeScalingPoliciesResponse'
+ { _drsNextToken = Nothing
+ , _drsScalingPolicies = Nothing
+ , _drsResponseStatus = pResponseStatus_
+ }
+
-- | The token required to get the next set of results. This value is @null@ if there are no more results to return.
drsNextToken :: Lens' DescribeScalingPoliciesResponse (Maybe Text)
drsNextToken = lens _drsNextToken (\ s a -> s{_drsNextToken = a});
--- | A list of scaling policy objects.
+-- | Information about the scaling policies.
drsScalingPolicies :: Lens' DescribeScalingPoliciesResponse [ScalingPolicy]
drsScalingPolicies = lens _drsScalingPolicies (\ s a -> s{_drsScalingPolicies = a}) . _Default . _Coerce;
@@ -207,4 +211,4 @@ drsScalingPolicies = lens _drsScalingPolicies (\ s a -> s{_drsScalingPolicies =
drsResponseStatus :: Lens' DescribeScalingPoliciesResponse Int
drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a});
-instance NFData DescribeScalingPoliciesResponse
+instance NFData DescribeScalingPoliciesResponse where
diff --git a/gen/Network/AWS/ApplicationAutoScaling/DescribeScheduledActions.hs b/gen/Network/AWS/ApplicationAutoScaling/DescribeScheduledActions.hs
new file mode 100644
index 0000000..9f894f5
--- /dev/null
+++ b/gen/Network/AWS/ApplicationAutoScaling/DescribeScheduledActions.hs
@@ -0,0 +1,206 @@
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE TypeFamilies #-}
+
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
+{-# OPTIONS_GHC -fno-warn-unused-matches #-}
+
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
+-- Module : Network.AWS.ApplicationAutoScaling.DescribeScheduledActions
+-- Copyright : (c) 2013-2017 Brendan Hay
+-- License : Mozilla Public License, v. 2.0.
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+-- Stability : auto-generated
+-- Portability : non-portable (GHC extensions)
+--
+-- Describes the scheduled actions for the specified service namespace.
+--
+--
+-- You can filter the results using the @ResourceId@ , @ScalableDimension@ , and @ScheduledActionNames@ parameters.
+--
+-- To create a scheduled action or update an existing one, see 'PutScheduledAction' . If you are no longer using a scheduled action, you can delete it using 'DeleteScheduledAction' .
+--
+module Network.AWS.ApplicationAutoScaling.DescribeScheduledActions
+ (
+ -- * Creating a Request
+ describeScheduledActions
+ , DescribeScheduledActions
+ -- * Request Lenses
+ , dsasScalableDimension
+ , dsasResourceId
+ , dsasNextToken
+ , dsasScheduledActionNames
+ , dsasMaxResults
+ , dsasServiceNamespace
+
+ -- * Destructuring the Response
+ , describeScheduledActionsResponse
+ , DescribeScheduledActionsResponse
+ -- * Response Lenses
+ , dsarsNextToken
+ , dsarsScheduledActions
+ , dsarsResponseStatus
+ ) where
+
+import Network.AWS.ApplicationAutoScaling.Types
+import Network.AWS.ApplicationAutoScaling.Types.Product
+import Network.AWS.Lens
+import Network.AWS.Prelude
+import Network.AWS.Request
+import Network.AWS.Response
+
+-- | /See:/ 'describeScheduledActions' smart constructor.
+data DescribeScheduledActions = DescribeScheduledActions'
+ { _dsasScalableDimension :: !(Maybe ScalableDimension)
+ , _dsasResourceId :: !(Maybe Text)
+ , _dsasNextToken :: !(Maybe Text)
+ , _dsasScheduledActionNames :: !(Maybe [Text])
+ , _dsasMaxResults :: !(Maybe Int)
+ , _dsasServiceNamespace :: !ServiceNamespace
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
+
+-- | Creates a value of 'DescribeScheduledActions' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'dsasScalableDimension' - The scalable dimension. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
+--
+-- * 'dsasResourceId' - The identifier of the resource associated with the scheduled action. This string consists of the resource type and unique identifier. If you specify a scalable dimension, you must also specify a resource ID. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
+--
+-- * 'dsasNextToken' - The token for the next set of results.
+--
+-- * 'dsasScheduledActionNames' - The names of the scheduled actions to describe.
+--
+-- * 'dsasMaxResults' - The maximum number of scalable target results. This value can be between 1 and 50. The default value is 50. If this parameter is used, the operation returns up to @MaxResults@ results at a time, along with a @NextToken@ value. To get the next set of results, include the @NextToken@ value in a subsequent call. If this parameter is not used, the operation returns up to 50 results and a @NextToken@ value, if applicable.
+--
+-- * 'dsasServiceNamespace' - The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
+describeScheduledActions
+ :: ServiceNamespace -- ^ 'dsasServiceNamespace'
+ -> DescribeScheduledActions
+describeScheduledActions pServiceNamespace_ =
+ DescribeScheduledActions'
+ { _dsasScalableDimension = Nothing
+ , _dsasResourceId = Nothing
+ , _dsasNextToken = Nothing
+ , _dsasScheduledActionNames = Nothing
+ , _dsasMaxResults = Nothing
+ , _dsasServiceNamespace = pServiceNamespace_
+ }
+
+
+-- | The scalable dimension. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
+dsasScalableDimension :: Lens' DescribeScheduledActions (Maybe ScalableDimension)
+dsasScalableDimension = lens _dsasScalableDimension (\ s a -> s{_dsasScalableDimension = a});
+
+-- | The identifier of the resource associated with the scheduled action. This string consists of the resource type and unique identifier. If you specify a scalable dimension, you must also specify a resource ID. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
+dsasResourceId :: Lens' DescribeScheduledActions (Maybe Text)
+dsasResourceId = lens _dsasResourceId (\ s a -> s{_dsasResourceId = a});
+
+-- | The token for the next set of results.
+dsasNextToken :: Lens' DescribeScheduledActions (Maybe Text)
+dsasNextToken = lens _dsasNextToken (\ s a -> s{_dsasNextToken = a});
+
+-- | The names of the scheduled actions to describe.
+dsasScheduledActionNames :: Lens' DescribeScheduledActions [Text]
+dsasScheduledActionNames = lens _dsasScheduledActionNames (\ s a -> s{_dsasScheduledActionNames = a}) . _Default . _Coerce;
+
+-- | The maximum number of scalable target results. This value can be between 1 and 50. The default value is 50. If this parameter is used, the operation returns up to @MaxResults@ results at a time, along with a @NextToken@ value. To get the next set of results, include the @NextToken@ value in a subsequent call. If this parameter is not used, the operation returns up to 50 results and a @NextToken@ value, if applicable.
+dsasMaxResults :: Lens' DescribeScheduledActions (Maybe Int)
+dsasMaxResults = lens _dsasMaxResults (\ s a -> s{_dsasMaxResults = a});
+
+-- | The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
+dsasServiceNamespace :: Lens' DescribeScheduledActions ServiceNamespace
+dsasServiceNamespace = lens _dsasServiceNamespace (\ s a -> s{_dsasServiceNamespace = a});
+
+instance AWSRequest DescribeScheduledActions where
+ type Rs DescribeScheduledActions =
+ DescribeScheduledActionsResponse
+ request = postJSON applicationAutoScaling
+ response
+ = receiveJSON
+ (\ s h x ->
+ DescribeScheduledActionsResponse' <$>
+ (x .?> "NextToken") <*>
+ (x .?> "ScheduledActions" .!@ mempty)
+ <*> (pure (fromEnum s)))
+
+instance Hashable DescribeScheduledActions where
+
+instance NFData DescribeScheduledActions where
+
+instance ToHeaders DescribeScheduledActions where
+ toHeaders
+ = const
+ (mconcat
+ ["X-Amz-Target" =#
+ ("AnyScaleFrontendService.DescribeScheduledActions"
+ :: ByteString),
+ "Content-Type" =#
+ ("application/x-amz-json-1.1" :: ByteString)])
+
+instance ToJSON DescribeScheduledActions where
+ toJSON DescribeScheduledActions'{..}
+ = object
+ (catMaybes
+ [("ScalableDimension" .=) <$> _dsasScalableDimension,
+ ("ResourceId" .=) <$> _dsasResourceId,
+ ("NextToken" .=) <$> _dsasNextToken,
+ ("ScheduledActionNames" .=) <$>
+ _dsasScheduledActionNames,
+ ("MaxResults" .=) <$> _dsasMaxResults,
+ Just ("ServiceNamespace" .= _dsasServiceNamespace)])
+
+instance ToPath DescribeScheduledActions where
+ toPath = const "/"
+
+instance ToQuery DescribeScheduledActions where
+ toQuery = const mempty
+
+-- | /See:/ 'describeScheduledActionsResponse' smart constructor.
+data DescribeScheduledActionsResponse = DescribeScheduledActionsResponse'
+ { _dsarsNextToken :: !(Maybe Text)
+ , _dsarsScheduledActions :: !(Maybe [ScheduledAction])
+ , _dsarsResponseStatus :: !Int
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
+
+-- | Creates a value of 'DescribeScheduledActionsResponse' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'dsarsNextToken' - The token required to get the next set of results. This value is @null@ if there are no more results to return.
+--
+-- * 'dsarsScheduledActions' - Information about the scheduled actions.
+--
+-- * 'dsarsResponseStatus' - -- | The response status code.
+describeScheduledActionsResponse
+ :: Int -- ^ 'dsarsResponseStatus'
+ -> DescribeScheduledActionsResponse
+describeScheduledActionsResponse pResponseStatus_ =
+ DescribeScheduledActionsResponse'
+ { _dsarsNextToken = Nothing
+ , _dsarsScheduledActions = Nothing
+ , _dsarsResponseStatus = pResponseStatus_
+ }
+
+
+-- | The token required to get the next set of results. This value is @null@ if there are no more results to return.
+dsarsNextToken :: Lens' DescribeScheduledActionsResponse (Maybe Text)
+dsarsNextToken = lens _dsarsNextToken (\ s a -> s{_dsarsNextToken = a});
+
+-- | Information about the scheduled actions.
+dsarsScheduledActions :: Lens' DescribeScheduledActionsResponse [ScheduledAction]
+dsarsScheduledActions = lens _dsarsScheduledActions (\ s a -> s{_dsarsScheduledActions = a}) . _Default . _Coerce;
+
+-- | -- | The response status code.
+dsarsResponseStatus :: Lens' DescribeScheduledActionsResponse Int
+dsarsResponseStatus = lens _dsarsResponseStatus (\ s a -> s{_dsarsResponseStatus = a});
+
+instance NFData DescribeScheduledActionsResponse
+ where
diff --git a/gen/Network/AWS/ApplicationAutoScaling/PutScalingPolicy.hs b/gen/Network/AWS/ApplicationAutoScaling/PutScalingPolicy.hs
index a9e1d13..8c8b284 100644
--- a/gen/Network/AWS/ApplicationAutoScaling/PutScalingPolicy.hs
+++ b/gen/Network/AWS/ApplicationAutoScaling/PutScalingPolicy.hs
@@ -12,9 +12,9 @@
-- |
-- Module : Network.AWS.ApplicationAutoScaling.PutScalingPolicy
--- Copyright : (c) 2013-2016 Brendan Hay
+-- Copyright : (c) 2013-2017 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
@@ -34,6 +34,7 @@ module Network.AWS.ApplicationAutoScaling.PutScalingPolicy
, PutScalingPolicy
-- * Request Lenses
, pspPolicyType
+ , pspTargetTrackingScalingPolicyConfiguration
, pspStepScalingPolicyConfiguration
, pspPolicyName
, pspServiceNamespace
@@ -44,42 +45,47 @@ module Network.AWS.ApplicationAutoScaling.PutScalingPolicy
, putScalingPolicyResponse
, PutScalingPolicyResponse
-- * Response Lenses
+ , psprsAlarms
, psprsResponseStatus
, psprsPolicyARN
) where
-import Network.AWS.ApplicationAutoScaling.Types
-import Network.AWS.ApplicationAutoScaling.Types.Product
-import Network.AWS.Lens
-import Network.AWS.Prelude
-import Network.AWS.Request
-import Network.AWS.Response
+import Network.AWS.ApplicationAutoScaling.Types
+import Network.AWS.ApplicationAutoScaling.Types.Product
+import Network.AWS.Lens
+import Network.AWS.Prelude
+import Network.AWS.Request
+import Network.AWS.Response
-- | /See:/ 'putScalingPolicy' smart constructor.
data PutScalingPolicy = PutScalingPolicy'
- { _pspPolicyType :: !(Maybe PolicyType)
- , _pspStepScalingPolicyConfiguration :: !(Maybe StepScalingPolicyConfiguration)
- , _pspPolicyName :: !Text
- , _pspServiceNamespace :: !ServiceNamespace
- , _pspResourceId :: !Text
- , _pspScalableDimension :: !ScalableDimension
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _pspPolicyType :: !(Maybe PolicyType)
+ , _pspTargetTrackingScalingPolicyConfiguration :: !(Maybe TargetTrackingScalingPolicyConfiguration)
+ , _pspStepScalingPolicyConfiguration :: !(Maybe StepScalingPolicyConfiguration)
+ , _pspPolicyName :: !Text
+ , _pspServiceNamespace :: !ServiceNamespace
+ , _pspResourceId :: !Text
+ , _pspScalableDimension :: !ScalableDimension
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'PutScalingPolicy' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
--- * 'pspPolicyType' - The policy type. If you are creating a new policy, this parameter is required. If you are updating a policy, this parameter is not required.
+-- * 'pspPolicyType' - The policy type. If you are creating a new policy, this parameter is required. If you are updating a policy, this parameter is not required. For DynamoDB, only @TargetTrackingScaling@ is supported. For any other service, only @StepScaling@ is supported.
+--
+-- * 'pspTargetTrackingScalingPolicyConfiguration' - A target tracking policy. This parameter is required if you are creating a new policy and the policy type is @TargetTrackingScaling@ .
--
--- * 'pspStepScalingPolicyConfiguration' - The configuration for the step scaling policy. If you are creating a new policy, this parameter is required. If you are updating a policy, this parameter is not required. For more information, see 'StepScalingPolicyConfiguration' and 'StepAdjustment' .
+-- * 'pspStepScalingPolicyConfiguration' - A step scaling policy. This parameter is required if you are creating a policy and the policy type is @StepScaling@ .
--
-- * 'pspPolicyName' - The name of the scaling policy.
--
-- * 'pspServiceNamespace' - The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
--
--- * 'pspResourceId' - The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
+-- * 'pspResourceId' - The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
--
--- * 'pspScalableDimension' - The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
+-- * 'pspScalableDimension' - The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
putScalingPolicy
:: Text -- ^ 'pspPolicyName'
-> ServiceNamespace -- ^ 'pspServiceNamespace'
@@ -87,20 +93,26 @@ putScalingPolicy
-> ScalableDimension -- ^ 'pspScalableDimension'
-> PutScalingPolicy
putScalingPolicy pPolicyName_ pServiceNamespace_ pResourceId_ pScalableDimension_ =
- PutScalingPolicy'
- { _pspPolicyType = Nothing
- , _pspStepScalingPolicyConfiguration = Nothing
- , _pspPolicyName = pPolicyName_
- , _pspServiceNamespace = pServiceNamespace_
- , _pspResourceId = pResourceId_
- , _pspScalableDimension = pScalableDimension_
- }
-
--- | The policy type. If you are creating a new policy, this parameter is required. If you are updating a policy, this parameter is not required.
+ PutScalingPolicy'
+ { _pspPolicyType = Nothing
+ , _pspTargetTrackingScalingPolicyConfiguration = Nothing
+ , _pspStepScalingPolicyConfiguration = Nothing
+ , _pspPolicyName = pPolicyName_
+ , _pspServiceNamespace = pServiceNamespace_
+ , _pspResourceId = pResourceId_
+ , _pspScalableDimension = pScalableDimension_
+ }
+
+
+-- | The policy type. If you are creating a new policy, this parameter is required. If you are updating a policy, this parameter is not required. For DynamoDB, only @TargetTrackingScaling@ is supported. For any other service, only @StepScaling@ is supported.
pspPolicyType :: Lens' PutScalingPolicy (Maybe PolicyType)
pspPolicyType = lens _pspPolicyType (\ s a -> s{_pspPolicyType = a});
--- | The configuration for the step scaling policy. If you are creating a new policy, this parameter is required. If you are updating a policy, this parameter is not required. For more information, see 'StepScalingPolicyConfiguration' and 'StepAdjustment' .
+-- | A target tracking policy. This parameter is required if you are creating a new policy and the policy type is @TargetTrackingScaling@ .
+pspTargetTrackingScalingPolicyConfiguration :: Lens' PutScalingPolicy (Maybe TargetTrackingScalingPolicyConfiguration)
+pspTargetTrackingScalingPolicyConfiguration = lens _pspTargetTrackingScalingPolicyConfiguration (\ s a -> s{_pspTargetTrackingScalingPolicyConfiguration = a});
+
+-- | A step scaling policy. This parameter is required if you are creating a policy and the policy type is @StepScaling@ .
pspStepScalingPolicyConfiguration :: Lens' PutScalingPolicy (Maybe StepScalingPolicyConfiguration)
pspStepScalingPolicyConfiguration = lens _pspStepScalingPolicyConfiguration (\ s a -> s{_pspStepScalingPolicyConfiguration = a});
@@ -112,11 +124,11 @@ pspPolicyName = lens _pspPolicyName (\ s a -> s{_pspPolicyName = a});
pspServiceNamespace :: Lens' PutScalingPolicy ServiceNamespace
pspServiceNamespace = lens _pspServiceNamespace (\ s a -> s{_pspServiceNamespace = a});
--- | The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
+-- | The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
pspResourceId :: Lens' PutScalingPolicy Text
pspResourceId = lens _pspResourceId (\ s a -> s{_pspResourceId = a});
--- | The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
+-- | The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
pspScalableDimension :: Lens' PutScalingPolicy ScalableDimension
pspScalableDimension = lens _pspScalableDimension (\ s a -> s{_pspScalableDimension = a});
@@ -127,11 +139,12 @@ instance AWSRequest PutScalingPolicy where
= receiveJSON
(\ s h x ->
PutScalingPolicyResponse' <$>
- (pure (fromEnum s)) <*> (x .:> "PolicyARN"))
+ (x .?> "Alarms" .!@ mempty) <*> (pure (fromEnum s))
+ <*> (x .:> "PolicyARN"))
-instance Hashable PutScalingPolicy
+instance Hashable PutScalingPolicy where
-instance NFData PutScalingPolicy
+instance NFData PutScalingPolicy where
instance ToHeaders PutScalingPolicy where
toHeaders
@@ -148,6 +161,8 @@ instance ToJSON PutScalingPolicy where
= object
(catMaybes
[("PolicyType" .=) <$> _pspPolicyType,
+ ("TargetTrackingScalingPolicyConfiguration" .=) <$>
+ _pspTargetTrackingScalingPolicyConfiguration,
("StepScalingPolicyConfiguration" .=) <$>
_pspStepScalingPolicyConfiguration,
Just ("PolicyName" .= _pspPolicyName),
@@ -163,14 +178,18 @@ instance ToQuery PutScalingPolicy where
-- | /See:/ 'putScalingPolicyResponse' smart constructor.
data PutScalingPolicyResponse = PutScalingPolicyResponse'
- { _psprsResponseStatus :: !Int
- , _psprsPolicyARN :: !Text
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _psprsAlarms :: !(Maybe [Alarm])
+ , _psprsResponseStatus :: !Int
+ , _psprsPolicyARN :: !Text
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'PutScalingPolicyResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
+-- * 'psprsAlarms' - The CloudWatch alarms created for the target tracking policy.
+--
-- * 'psprsResponseStatus' - -- | The response status code.
--
-- * 'psprsPolicyARN' - The Amazon Resource Name (ARN) of the resulting scaling policy.
@@ -179,10 +198,16 @@ putScalingPolicyResponse
-> Text -- ^ 'psprsPolicyARN'
-> PutScalingPolicyResponse
putScalingPolicyResponse pResponseStatus_ pPolicyARN_ =
- PutScalingPolicyResponse'
- { _psprsResponseStatus = pResponseStatus_
- , _psprsPolicyARN = pPolicyARN_
- }
+ PutScalingPolicyResponse'
+ { _psprsAlarms = Nothing
+ , _psprsResponseStatus = pResponseStatus_
+ , _psprsPolicyARN = pPolicyARN_
+ }
+
+
+-- | The CloudWatch alarms created for the target tracking policy.
+psprsAlarms :: Lens' PutScalingPolicyResponse [Alarm]
+psprsAlarms = lens _psprsAlarms (\ s a -> s{_psprsAlarms = a}) . _Default . _Coerce;
-- | -- | The response status code.
psprsResponseStatus :: Lens' PutScalingPolicyResponse Int
@@ -192,4 +217,4 @@ psprsResponseStatus = lens _psprsResponseStatus (\ s a -> s{_psprsResponseStatus
psprsPolicyARN :: Lens' PutScalingPolicyResponse Text
psprsPolicyARN = lens _psprsPolicyARN (\ s a -> s{_psprsPolicyARN = a});
-instance NFData PutScalingPolicyResponse
+instance NFData PutScalingPolicyResponse where
diff --git a/gen/Network/AWS/ApplicationAutoScaling/PutScheduledAction.hs b/gen/Network/AWS/ApplicationAutoScaling/PutScheduledAction.hs
new file mode 100644
index 0000000..ca15dd7
--- /dev/null
+++ b/gen/Network/AWS/ApplicationAutoScaling/PutScheduledAction.hs
@@ -0,0 +1,207 @@
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE TypeFamilies #-}
+
+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
+{-# OPTIONS_GHC -fno-warn-unused-matches #-}
+
+-- Derived from AWS service descriptions, licensed under Apache 2.0.
+
+-- |
+-- Module : Network.AWS.ApplicationAutoScaling.PutScheduledAction
+-- Copyright : (c) 2013-2017 Brendan Hay
+-- License : Mozilla Public License, v. 2.0.
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+-- Stability : auto-generated
+-- Portability : non-portable (GHC extensions)
+--
+-- Creates or updates a scheduled action for an Application Auto Scaling scalable target.
+--
+--
+-- Each scalable target is identified by a service namespace, resource ID, and scalable dimension. A scheduled action applies to the scalable target identified by those three attributes. You cannot create a scheduled action without first registering a scalable target using 'RegisterScalableTarget' .
+--
+-- To update an action, specify its name and the parameters that you want to change. If you don't specify start and end times, the old values are deleted. Any other parameters that you don't specify are not changed by this update request.
+--
+-- You can view the scheduled actions using 'DescribeScheduledActions' . If you are no longer using a scheduled action, you can delete it using 'DeleteScheduledAction' .
+--
+module Network.AWS.ApplicationAutoScaling.PutScheduledAction
+ (
+ -- * Creating a Request
+ putScheduledAction
+ , PutScheduledAction
+ -- * Request Lenses
+ , psaScalableDimension
+ , psaStartTime
+ , psaSchedule
+ , psaEndTime
+ , psaScalableTargetAction
+ , psaServiceNamespace
+ , psaScheduledActionName
+ , psaResourceId
+
+ -- * Destructuring the Response
+ , putScheduledActionResponse
+ , PutScheduledActionResponse
+ -- * Response Lenses
+ , psarsResponseStatus
+ ) where
+
+import Network.AWS.ApplicationAutoScaling.Types
+import Network.AWS.ApplicationAutoScaling.Types.Product
+import Network.AWS.Lens
+import Network.AWS.Prelude
+import Network.AWS.Request
+import Network.AWS.Response
+
+-- | /See:/ 'putScheduledAction' smart constructor.
+data PutScheduledAction = PutScheduledAction'
+ { _psaScalableDimension :: !(Maybe ScalableDimension)
+ , _psaStartTime :: !(Maybe POSIX)
+ , _psaSchedule :: !(Maybe Text)
+ , _psaEndTime :: !(Maybe POSIX)
+ , _psaScalableTargetAction :: !(Maybe ScalableTargetAction)
+ , _psaServiceNamespace :: !ServiceNamespace
+ , _psaScheduledActionName :: !Text
+ , _psaResourceId :: !Text
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
+
+-- | Creates a value of 'PutScheduledAction' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'psaScalableDimension' - The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
+--
+-- * 'psaStartTime' - The date and time for the scheduled action to start.
+--
+-- * 'psaSchedule' - The schedule for this action. The following formats are supported: * At expressions - @at(/yyyy/ -/mm/ -/dd/ T/hh/ :/mm/ :/ss/ )@ * Rate expressions - @rate(/value/ /unit/ )@ * Cron expressions - @cron(/fields/ )@ At expressions are useful for one-time schedules. Specify the time, in UTC. For rate expressions, /value/ is a positive integer and /unit/ is @minute@ | @minutes@ | @hour@ | @hours@ | @day@ | @days@ . For more information about cron expressions, see <https://en.wikipedia.org/wiki/Cron Cron> .
+--
+-- * 'psaEndTime' - The date and time for the scheduled action to end.
+--
+-- * 'psaScalableTargetAction' - The new minimum and maximum capacity. You can set both values or just one. During the scheduled time, if the current capacity is below the minimum capacity, Application Auto Scaling scales out to the minimum capacity. If the current capacity is above the maximum capacity, Application Auto Scaling scales in to the maximum capacity.
+--
+-- * 'psaServiceNamespace' - The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
+--
+-- * 'psaScheduledActionName' - The name of the scheduled action.
+--
+-- * 'psaResourceId' - The identifier of the resource associated with the scheduled action. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
+putScheduledAction
+ :: ServiceNamespace -- ^ 'psaServiceNamespace'
+ -> Text -- ^ 'psaScheduledActionName'
+ -> Text -- ^ 'psaResourceId'
+ -> PutScheduledAction
+putScheduledAction pServiceNamespace_ pScheduledActionName_ pResourceId_ =
+ PutScheduledAction'
+ { _psaScalableDimension = Nothing
+ , _psaStartTime = Nothing
+ , _psaSchedule = Nothing
+ , _psaEndTime = Nothing
+ , _psaScalableTargetAction = Nothing
+ , _psaServiceNamespace = pServiceNamespace_
+ , _psaScheduledActionName = pScheduledActionName_
+ , _psaResourceId = pResourceId_
+ }
+
+
+-- | The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
+psaScalableDimension :: Lens' PutScheduledAction (Maybe ScalableDimension)
+psaScalableDimension = lens _psaScalableDimension (\ s a -> s{_psaScalableDimension = a});
+
+-- | The date and time for the scheduled action to start.
+psaStartTime :: Lens' PutScheduledAction (Maybe UTCTime)
+psaStartTime = lens _psaStartTime (\ s a -> s{_psaStartTime = a}) . mapping _Time;
+
+-- | The schedule for this action. The following formats are supported: * At expressions - @at(/yyyy/ -/mm/ -/dd/ T/hh/ :/mm/ :/ss/ )@ * Rate expressions - @rate(/value/ /unit/ )@ * Cron expressions - @cron(/fields/ )@ At expressions are useful for one-time schedules. Specify the time, in UTC. For rate expressions, /value/ is a positive integer and /unit/ is @minute@ | @minutes@ | @hour@ | @hours@ | @day@ | @days@ . For more information about cron expressions, see <https://en.wikipedia.org/wiki/Cron Cron> .
+psaSchedule :: Lens' PutScheduledAction (Maybe Text)
+psaSchedule = lens _psaSchedule (\ s a -> s{_psaSchedule = a});
+
+-- | The date and time for the scheduled action to end.
+psaEndTime :: Lens' PutScheduledAction (Maybe UTCTime)
+psaEndTime = lens _psaEndTime (\ s a -> s{_psaEndTime = a}) . mapping _Time;
+
+-- | The new minimum and maximum capacity. You can set both values or just one. During the scheduled time, if the current capacity is below the minimum capacity, Application Auto Scaling scales out to the minimum capacity. If the current capacity is above the maximum capacity, Application Auto Scaling scales in to the maximum capacity.
+psaScalableTargetAction :: Lens' PutScheduledAction (Maybe ScalableTargetAction)
+psaScalableTargetAction = lens _psaScalableTargetAction (\ s a -> s{_psaScalableTargetAction = a});
+
+-- | The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
+psaServiceNamespace :: Lens' PutScheduledAction ServiceNamespace
+psaServiceNamespace = lens _psaServiceNamespace (\ s a -> s{_psaServiceNamespace = a});
+
+-- | The name of the scheduled action.
+psaScheduledActionName :: Lens' PutScheduledAction Text
+psaScheduledActionName = lens _psaScheduledActionName (\ s a -> s{_psaScheduledActionName = a});
+
+-- | The identifier of the resource associated with the scheduled action. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
+psaResourceId :: Lens' PutScheduledAction Text
+psaResourceId = lens _psaResourceId (\ s a -> s{_psaResourceId = a});
+
+instance AWSRequest PutScheduledAction where
+ type Rs PutScheduledAction =
+ PutScheduledActionResponse
+ request = postJSON applicationAutoScaling
+ response
+ = receiveEmpty
+ (\ s h x ->
+ PutScheduledActionResponse' <$> (pure (fromEnum s)))
+
+instance Hashable PutScheduledAction where
+
+instance NFData PutScheduledAction where
+
+instance ToHeaders PutScheduledAction where
+ toHeaders
+ = const
+ (mconcat
+ ["X-Amz-Target" =#
+ ("AnyScaleFrontendService.PutScheduledAction" ::
+ ByteString),
+ "Content-Type" =#
+ ("application/x-amz-json-1.1" :: ByteString)])
+
+instance ToJSON PutScheduledAction where
+ toJSON PutScheduledAction'{..}
+ = object
+ (catMaybes
+ [("ScalableDimension" .=) <$> _psaScalableDimension,
+ ("StartTime" .=) <$> _psaStartTime,
+ ("Schedule" .=) <$> _psaSchedule,
+ ("EndTime" .=) <$> _psaEndTime,
+ ("ScalableTargetAction" .=) <$>
+ _psaScalableTargetAction,
+ Just ("ServiceNamespace" .= _psaServiceNamespace),
+ Just
+ ("ScheduledActionName" .= _psaScheduledActionName),
+ Just ("ResourceId" .= _psaResourceId)])
+
+instance ToPath PutScheduledAction where
+ toPath = const "/"
+
+instance ToQuery PutScheduledAction where
+ toQuery = const mempty
+
+-- | /See:/ 'putScheduledActionResponse' smart constructor.
+newtype PutScheduledActionResponse = PutScheduledActionResponse'
+ { _psarsResponseStatus :: Int
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
+
+-- | Creates a value of 'PutScheduledActionResponse' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'psarsResponseStatus' - -- | The response status code.
+putScheduledActionResponse
+ :: Int -- ^ 'psarsResponseStatus'
+ -> PutScheduledActionResponse
+putScheduledActionResponse pResponseStatus_ =
+ PutScheduledActionResponse' {_psarsResponseStatus = pResponseStatus_}
+
+
+-- | -- | The response status code.
+psarsResponseStatus :: Lens' PutScheduledActionResponse Int
+psarsResponseStatus = lens _psarsResponseStatus (\ s a -> s{_psarsResponseStatus = a});
+
+instance NFData PutScheduledActionResponse where
diff --git a/gen/Network/AWS/ApplicationAutoScaling/RegisterScalableTarget.hs b/gen/Network/AWS/ApplicationAutoScaling/RegisterScalableTarget.hs
index 94208b7..b00204c 100644
--- a/gen/Network/AWS/ApplicationAutoScaling/RegisterScalableTarget.hs
+++ b/gen/Network/AWS/ApplicationAutoScaling/RegisterScalableTarget.hs
@@ -12,9 +12,9 @@
-- |
-- Module : Network.AWS.ApplicationAutoScaling.RegisterScalableTarget
--- Copyright : (c) 2013-2016 Brendan Hay
+-- Copyright : (c) 2013-2017 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
@@ -43,22 +43,23 @@ module Network.AWS.ApplicationAutoScaling.RegisterScalableTarget
, rstrsResponseStatus
) where
-import Network.AWS.ApplicationAutoScaling.Types
-import Network.AWS.ApplicationAutoScaling.Types.Product
-import Network.AWS.Lens
-import Network.AWS.Prelude
-import Network.AWS.Request
-import Network.AWS.Response
+import Network.AWS.ApplicationAutoScaling.Types
+import Network.AWS.ApplicationAutoScaling.Types.Product
+import Network.AWS.Lens
+import Network.AWS.Prelude
+import Network.AWS.Request
+import Network.AWS.Response
-- | /See:/ 'registerScalableTarget' smart constructor.
data RegisterScalableTarget = RegisterScalableTarget'
- { _rstMaxCapacity :: !(Maybe Int)
- , _rstMinCapacity :: !(Maybe Int)
- , _rstRoleARN :: !(Maybe Text)
- , _rstServiceNamespace :: !ServiceNamespace
- , _rstResourceId :: !Text
- , _rstScalableDimension :: !ScalableDimension
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _rstMaxCapacity :: !(Maybe Int)
+ , _rstMinCapacity :: !(Maybe Int)
+ , _rstRoleARN :: !(Maybe Text)
+ , _rstServiceNamespace :: !ServiceNamespace
+ , _rstResourceId :: !Text
+ , _rstScalableDimension :: !ScalableDimension
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'RegisterScalableTarget' with the minimum fields required to make a request.
--
@@ -72,23 +73,24 @@ data RegisterScalableTarget = RegisterScalableTarget'
--
-- * 'rstServiceNamespace' - The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
--
--- * 'rstResourceId' - The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
+-- * 'rstResourceId' - The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
--
--- * 'rstScalableDimension' - The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
+-- * 'rstScalableDimension' - The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
registerScalableTarget
:: ServiceNamespace -- ^ 'rstServiceNamespace'
-> Text -- ^ 'rstResourceId'
-> ScalableDimension -- ^ 'rstScalableDimension'
-> RegisterScalableTarget
registerScalableTarget pServiceNamespace_ pResourceId_ pScalableDimension_ =
- RegisterScalableTarget'
- { _rstMaxCapacity = Nothing
- , _rstMinCapacity = Nothing
- , _rstRoleARN = Nothing
- , _rstServiceNamespace = pServiceNamespace_
- , _rstResourceId = pResourceId_
- , _rstScalableDimension = pScalableDimension_
- }
+ RegisterScalableTarget'
+ { _rstMaxCapacity = Nothing
+ , _rstMinCapacity = Nothing
+ , _rstRoleARN = Nothing
+ , _rstServiceNamespace = pServiceNamespace_
+ , _rstResourceId = pResourceId_
+ , _rstScalableDimension = pScalableDimension_
+ }
+
-- | The maximum value to scale to in response to a scale out event. This parameter is required if you are registering a scalable target and optional if you are updating one.
rstMaxCapacity :: Lens' RegisterScalableTarget (Maybe Int)
@@ -106,11 +108,11 @@ rstRoleARN = lens _rstRoleARN (\ s a -> s{_rstRoleARN = a});
rstServiceNamespace :: Lens' RegisterScalableTarget ServiceNamespace
rstServiceNamespace = lens _rstServiceNamespace (\ s a -> s{_rstServiceNamespace = a});
--- | The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
+-- | The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
rstResourceId :: Lens' RegisterScalableTarget Text
rstResourceId = lens _rstResourceId (\ s a -> s{_rstResourceId = a});
--- | The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
+-- | The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
rstScalableDimension :: Lens' RegisterScalableTarget ScalableDimension
rstScalableDimension = lens _rstScalableDimension (\ s a -> s{_rstScalableDimension = a});
@@ -124,9 +126,9 @@ instance AWSRequest RegisterScalableTarget where
RegisterScalableTargetResponse' <$>
(pure (fromEnum s)))
-instance Hashable RegisterScalableTarget
+instance Hashable RegisterScalableTarget where
-instance NFData RegisterScalableTarget
+instance NFData RegisterScalableTarget where
instance ToHeaders RegisterScalableTarget where
toHeaders
@@ -157,8 +159,9 @@ instance ToQuery RegisterScalableTarget where
-- | /See:/ 'registerScalableTargetResponse' smart constructor.
newtype RegisterScalableTargetResponse = RegisterScalableTargetResponse'
- { _rstrsResponseStatus :: Int
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _rstrsResponseStatus :: Int
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'RegisterScalableTargetResponse' with the minimum fields required to make a request.
--
@@ -169,12 +172,11 @@ registerScalableTargetResponse
:: Int -- ^ 'rstrsResponseStatus'
-> RegisterScalableTargetResponse
registerScalableTargetResponse pResponseStatus_ =
- RegisterScalableTargetResponse'
- { _rstrsResponseStatus = pResponseStatus_
- }
+ RegisterScalableTargetResponse' {_rstrsResponseStatus = pResponseStatus_}
+
-- | -- | The response status code.
rstrsResponseStatus :: Lens' RegisterScalableTargetResponse Int
rstrsResponseStatus = lens _rstrsResponseStatus (\ s a -> s{_rstrsResponseStatus = a});
-instance NFData RegisterScalableTargetResponse
+instance NFData RegisterScalableTargetResponse where
diff --git a/gen/Network/AWS/ApplicationAutoScaling/Types.hs b/gen/Network/AWS/ApplicationAutoScaling/Types.hs
index 1edfddf..c055378 100644
--- a/gen/Network/AWS/ApplicationAutoScaling/Types.hs
+++ b/gen/Network/AWS/ApplicationAutoScaling/Types.hs
@@ -4,9 +4,9 @@
-- |
-- Module : Network.AWS.ApplicationAutoScaling.Types
--- Copyright : (c) 2013-2016 Brendan Hay
+-- Copyright : (c) 2013-2017 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
@@ -30,6 +30,12 @@ module Network.AWS.ApplicationAutoScaling.Types
-- * MetricAggregationType
, MetricAggregationType (..)
+ -- * MetricStatistic
+ , MetricStatistic (..)
+
+ -- * MetricType
+ , MetricType (..)
+
-- * PolicyType
, PolicyType (..)
@@ -48,6 +54,27 @@ module Network.AWS.ApplicationAutoScaling.Types
, aAlarmName
, aAlarmARN
+ -- * CustomizedMetricSpecification
+ , CustomizedMetricSpecification
+ , customizedMetricSpecification
+ , cmsDimensions
+ , cmsUnit
+ , cmsMetricName
+ , cmsNamespace
+ , cmsStatistic
+
+ -- * MetricDimension
+ , MetricDimension
+ , metricDimension
+ , mdName
+ , mdValue
+
+ -- * PredefinedMetricSpecification
+ , PredefinedMetricSpecification
+ , predefinedMetricSpecification
+ , pmsResourceLabel
+ , pmsPredefinedMetricType
+
-- * ScalableTarget
, ScalableTarget
, scalableTarget
@@ -59,24 +86,31 @@ module Network.AWS.ApplicationAutoScaling.Types
, stRoleARN
, stCreationTime
+ -- * ScalableTargetAction
+ , ScalableTargetAction
+ , scalableTargetAction
+ , staMaxCapacity
+ , staMinCapacity
+
-- * ScalingActivity
, ScalingActivity
, scalingActivity
- , saStatusMessage
- , saEndTime
- , saDetails
- , saActivityId
- , saServiceNamespace
- , saResourceId
- , saScalableDimension
- , saDescription
- , saCause
- , saStartTime
- , saStatusCode
+ , sStatusMessage
+ , sEndTime
+ , sDetails
+ , sActivityId
+ , sServiceNamespace
+ , sResourceId
+ , sScalableDimension
+ , sDescription
+ , sCause
+ , sStartTime
+ , sStatusCode
-- * ScalingPolicy
, ScalingPolicy
, scalingPolicy
+ , spTargetTrackingScalingPolicyConfiguration
, spStepScalingPolicyConfiguration
, spAlarms
, spPolicyARN
@@ -87,6 +121,20 @@ module Network.AWS.ApplicationAutoScaling.Types
, spPolicyType
, spCreationTime
+ -- * ScheduledAction
+ , ScheduledAction
+ , scheduledAction
+ , saScalableDimension
+ , saStartTime
+ , saEndTime
+ , saScalableTargetAction
+ , saScheduledActionName
+ , saScheduledActionARN
+ , saServiceNamespace
+ , saSchedule
+ , saResourceId
+ , saCreationTime
+
-- * StepAdjustment
, StepAdjustment
, stepAdjustment
@@ -102,40 +150,52 @@ module Network.AWS.ApplicationAutoScaling.Types
, sspcCooldown
, sspcMetricAggregationType
, sspcMinAdjustmentMagnitude
+
+ -- * TargetTrackingScalingPolicyConfiguration
+ , TargetTrackingScalingPolicyConfiguration
+ , targetTrackingScalingPolicyConfiguration
+ , ttspcPredefinedMetricSpecification
+ , ttspcScaleInCooldown
+ , ttspcCustomizedMetricSpecification
+ , ttspcDisableScaleIn
+ , ttspcScaleOutCooldown
+ , ttspcTargetValue
) where
-import Network.AWS.ApplicationAutoScaling.Types.Product
-import Network.AWS.ApplicationAutoScaling.Types.Sum
-import Network.AWS.Lens
-import Network.AWS.Prelude
-import Network.AWS.Sign.V4
+import Network.AWS.ApplicationAutoScaling.Types.Product
+import Network.AWS.ApplicationAutoScaling.Types.Sum
+import Network.AWS.Lens
+import Network.AWS.Prelude
+import Network.AWS.Sign.V4
-- | API version @2016-02-06@ of the Amazon Application Auto Scaling SDK configuration.
applicationAutoScaling :: Service
applicationAutoScaling =
- Service
- { _svcAbbrev = "ApplicationAutoScaling"
- , _svcSigner = v4
- , _svcPrefix = "autoscaling"
- , _svcVersion = "2016-02-06"
- , _svcEndpoint = defaultEndpoint applicationAutoScaling
- , _svcTimeout = Just 70
- , _svcCheck = statusSuccess
- , _svcError = parseJSONError "ApplicationAutoScaling"
- , _svcRetry = retry
- }
+ Service
+ { _svcAbbrev = "ApplicationAutoScaling"
+ , _svcSigner = v4
+ , _svcPrefix = "autoscaling"
+ , _svcVersion = "2016-02-06"
+ , _svcEndpoint = defaultEndpoint applicationAutoScaling
+ , _svcTimeout = Just 70
+ , _svcCheck = statusSuccess
+ , _svcError = parseJSONError "ApplicationAutoScaling"
+ , _svcRetry = retry
+ }
where
retry =
- Exponential
- { _retryBase = 5.0e-2
- , _retryGrowth = 2
- , _retryAttempts = 5
- , _retryCheck = check
- }
+ 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"
+ 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"
@@ -144,47 +204,59 @@ applicationAutoScaling =
| has (hasStatus 509) e = Just "limit_exceeded"
| otherwise = Nothing
+
-- | An exception was thrown for a validation issue. Review the available parameters for the API request.
--
--
_ValidationException :: AsError a => Getting (First ServiceError) a ServiceError
-_ValidationException = _ServiceError . hasCode "ValidationException"
+_ValidationException =
+ _MatchServiceError applicationAutoScaling "ValidationException"
+
--- | Failed access to resources caused an exception. This exception currently only applies to 'DescribeScalingPolicies' . It is thrown when Application Auto Scaling is unable to retrieve the alarms associated with a scaling policy due to a client error, for example, if the role ARN specified for a scalable target does not have the proper permissions to call the CloudWatch <http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html DescribeAlarms> API operation on behalf of your account.
+-- | Failed access to resources caused an exception. This exception is thrown when Application Auto Scaling is unable to retrieve the alarms associated with a scaling policy due to a client error, for example, if the role ARN specified for a scalable target does not have permission to call the CloudWatch <http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html DescribeAlarms> API operation on behalf of your account.
--
--
_FailedResourceAccessException :: AsError a => Getting (First ServiceError) a ServiceError
_FailedResourceAccessException =
- _ServiceError . hasCode "FailedResourceAccessException"
+ _MatchServiceError applicationAutoScaling "FailedResourceAccessException"
+
-- | The next token supplied was invalid.
--
--
_InvalidNextTokenException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidNextTokenException =
- _ServiceError . hasCode "InvalidNextTokenException"
+ _MatchServiceError applicationAutoScaling "InvalidNextTokenException"
+
-- | Concurrent updates caused an exception, for example, if you request an update to an Application Auto Scaling resource that already has a pending update.
--
--
_ConcurrentUpdateException :: AsError a => Getting (First ServiceError) a ServiceError
_ConcurrentUpdateException =
- _ServiceError . hasCode "ConcurrentUpdateException"
+ _MatchServiceError applicationAutoScaling "ConcurrentUpdateException"
+
-- | The service encountered an internal error.
--
--
_InternalServiceException :: AsError a => Getting (First ServiceError) a ServiceError
-_InternalServiceException = _ServiceError . hasCode "InternalServiceException"
+_InternalServiceException =
+ _MatchServiceError applicationAutoScaling "InternalServiceException"
+
-- | The specified object could not be found. For any @Put@ or @Register@ API operation, which depends on the existence of a scalable target, this exception is thrown if the scalable target with the specified service namespace, resource ID, and scalable dimension does not exist. For any @Delete@ or @Deregister@ API operation, this exception is thrown if the resource that is to be deleted or deregistered cannot be found.
--
--
_ObjectNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
-_ObjectNotFoundException = _ServiceError . hasCode "ObjectNotFoundException"
+_ObjectNotFoundException =
+ _MatchServiceError applicationAutoScaling "ObjectNotFoundException"
+
-- | Your account exceeded a limit. This exception is thrown when a per-account resource limit is exceeded. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_as-app Application Auto Scaling Limits> .
--
--
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
-_LimitExceededException = _ServiceError . hasCode "LimitExceededException"
+_LimitExceededException =
+ _MatchServiceError applicationAutoScaling "LimitExceededException"
+
diff --git a/gen/Network/AWS/ApplicationAutoScaling/Types/Product.hs b/gen/Network/AWS/ApplicationAutoScaling/Types/Product.hs
index 2e9f2ed..991cc96 100644
--- a/gen/Network/AWS/ApplicationAutoScaling/Types/Product.hs
+++ b/gen/Network/AWS/ApplicationAutoScaling/Types/Product.hs
@@ -9,17 +9,17 @@
-- |
-- Module : Network.AWS.ApplicationAutoScaling.Types.Product
--- Copyright : (c) 2013-2016 Brendan Hay
+-- Copyright : (c) 2013-2017 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
module Network.AWS.ApplicationAutoScaling.Types.Product where
-import Network.AWS.ApplicationAutoScaling.Types.Sum
-import Network.AWS.Lens
-import Network.AWS.Prelude
+import Network.AWS.ApplicationAutoScaling.Types.Sum
+import Network.AWS.Lens
+import Network.AWS.Prelude
-- | Represents a CloudWatch alarm associated with a scaling policy.
--
@@ -27,9 +27,10 @@ import Network.AWS.Prelude
--
-- /See:/ 'alarm' smart constructor.
data Alarm = Alarm'
- { _aAlarmName :: !Text
- , _aAlarmARN :: !Text
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _aAlarmName :: !Text
+ , _aAlarmARN :: !Text
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'Alarm' with the minimum fields required to make a request.
--
@@ -43,10 +44,8 @@ alarm
-> Text -- ^ 'aAlarmARN'
-> Alarm
alarm pAlarmName_ pAlarmARN_ =
- Alarm'
- { _aAlarmName = pAlarmName_
- , _aAlarmARN = pAlarmARN_
- }
+ Alarm' {_aAlarmName = pAlarmName_, _aAlarmARN = pAlarmARN_}
+
-- | The name of the alarm.
aAlarmName :: Lens' Alarm Text
@@ -62,9 +61,204 @@ instance FromJSON Alarm where
(\ x ->
Alarm' <$> (x .: "AlarmName") <*> (x .: "AlarmARN"))
-instance Hashable Alarm
+instance Hashable Alarm where
+
+instance NFData Alarm where
+
+-- | Configures a customized metric for a target tracking policy.
+--
+--
+--
+-- /See:/ 'customizedMetricSpecification' smart constructor.
+data CustomizedMetricSpecification = CustomizedMetricSpecification'
+ { _cmsDimensions :: !(Maybe [MetricDimension])
+ , _cmsUnit :: !(Maybe Text)
+ , _cmsMetricName :: !Text
+ , _cmsNamespace :: !Text
+ , _cmsStatistic :: !MetricStatistic
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
+
+-- | Creates a value of 'CustomizedMetricSpecification' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'cmsDimensions' - The dimensions of the metric.
+--
+-- * 'cmsUnit' - The unit of the metric.
+--
+-- * 'cmsMetricName' - The name of the metric.
+--
+-- * 'cmsNamespace' - The namespace of the metric.
+--
+-- * 'cmsStatistic' - The statistic of the metric.
+customizedMetricSpecification
+ :: Text -- ^ 'cmsMetricName'
+ -> Text -- ^ 'cmsNamespace'
+ -> MetricStatistic -- ^ 'cmsStatistic'
+ -> CustomizedMetricSpecification
+customizedMetricSpecification pMetricName_ pNamespace_ pStatistic_ =
+ CustomizedMetricSpecification'
+ { _cmsDimensions = Nothing
+ , _cmsUnit = Nothing
+ , _cmsMetricName = pMetricName_
+ , _cmsNamespace = pNamespace_
+ , _cmsStatistic = pStatistic_
+ }
+
+
+-- | The dimensions of the metric.
+cmsDimensions :: Lens' CustomizedMetricSpecification [MetricDimension]
+cmsDimensions = lens _cmsDimensions (\ s a -> s{_cmsDimensions = a}) . _Default . _Coerce;
+
+-- | The unit of the metric.
+cmsUnit :: Lens' CustomizedMetricSpecification (Maybe Text)
+cmsUnit = lens _cmsUnit (\ s a -> s{_cmsUnit = a});
+
+-- | The name of the metric.
+cmsMetricName :: Lens' CustomizedMetricSpecification Text
+cmsMetricName = lens _cmsMetricName (\ s a -> s{_cmsMetricName = a});
+
+-- | The namespace of the metric.
+cmsNamespace :: Lens' CustomizedMetricSpecification Text
+cmsNamespace = lens _cmsNamespace (\ s a -> s{_cmsNamespace = a});
+
+-- | The statistic of the metric.
+cmsStatistic :: Lens' CustomizedMetricSpecification MetricStatistic
+cmsStatistic = lens _cmsStatistic (\ s a -> s{_cmsStatistic = a});
+
+instance FromJSON CustomizedMetricSpecification where
+ parseJSON
+ = withObject "CustomizedMetricSpecification"
+ (\ x ->
+ CustomizedMetricSpecification' <$>
+ (x .:? "Dimensions" .!= mempty) <*> (x .:? "Unit")
+ <*> (x .: "MetricName")
+ <*> (x .: "Namespace")
+ <*> (x .: "Statistic"))
+
+instance Hashable CustomizedMetricSpecification where
+
+instance NFData CustomizedMetricSpecification where
+
+instance ToJSON CustomizedMetricSpecification where
+ toJSON CustomizedMetricSpecification'{..}
+ = object
+ (catMaybes
+ [("Dimensions" .=) <$> _cmsDimensions,
+ ("Unit" .=) <$> _cmsUnit,
+ Just ("MetricName" .= _cmsMetricName),
+ Just ("Namespace" .= _cmsNamespace),
+ Just ("Statistic" .= _cmsStatistic)])
+
+-- | Describes the dimension of a metric.
+--
+--
+--
+-- /See:/ 'metricDimension' smart constructor.
+data MetricDimension = MetricDimension'
+ { _mdName :: !Text
+ , _mdValue :: !Text
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
+
+-- | Creates a value of 'MetricDimension' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'mdName' - The name of the dimension.
+--
+-- * 'mdValue' - The value of the dimension.
+metricDimension
+ :: Text -- ^ 'mdName'
+ -> Text -- ^ 'mdValue'
+ -> MetricDimension
+metricDimension pName_ pValue_ =
+ MetricDimension' {_mdName = pName_, _mdValue = pValue_}
+
+
+-- | The name of the dimension.
+mdName :: Lens' MetricDimension Text
+mdName = lens _mdName (\ s a -> s{_mdName = a});
+
+-- | The value of the dimension.
+mdValue :: Lens' MetricDimension Text
+mdValue = lens _mdValue (\ s a -> s{_mdValue = a});
+
+instance FromJSON MetricDimension where
+ parseJSON
+ = withObject "MetricDimension"
+ (\ x ->
+ MetricDimension' <$>
+ (x .: "Name") <*> (x .: "Value"))
+
+instance Hashable MetricDimension where
-instance NFData Alarm
+instance NFData MetricDimension where
+
+instance ToJSON MetricDimension where
+ toJSON MetricDimension'{..}
+ = object
+ (catMaybes
+ [Just ("Name" .= _mdName),
+ Just ("Value" .= _mdValue)])
+
+-- | Configures a predefined metric for a target tracking policy.
+--
+--
+--
+-- /See:/ 'predefinedMetricSpecification' smart constructor.
+data PredefinedMetricSpecification = PredefinedMetricSpecification'
+ { _pmsResourceLabel :: !(Maybe Text)
+ , _pmsPredefinedMetricType :: !MetricType
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
+
+-- | Creates a value of 'PredefinedMetricSpecification' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'pmsResourceLabel' - Reserved for future use.
+--
+-- * 'pmsPredefinedMetricType' - The metric type.
+predefinedMetricSpecification
+ :: MetricType -- ^ 'pmsPredefinedMetricType'
+ -> PredefinedMetricSpecification
+predefinedMetricSpecification pPredefinedMetricType_ =
+ PredefinedMetricSpecification'
+ { _pmsResourceLabel = Nothing
+ , _pmsPredefinedMetricType = pPredefinedMetricType_
+ }
+
+
+-- | Reserved for future use.
+pmsResourceLabel :: Lens' PredefinedMetricSpecification (Maybe Text)
+pmsResourceLabel = lens _pmsResourceLabel (\ s a -> s{_pmsResourceLabel = a});
+
+-- | The metric type.
+pmsPredefinedMetricType :: Lens' PredefinedMetricSpecification MetricType
+pmsPredefinedMetricType = lens _pmsPredefinedMetricType (\ s a -> s{_pmsPredefinedMetricType = a});
+
+instance FromJSON PredefinedMetricSpecification where
+ parseJSON
+ = withObject "PredefinedMetricSpecification"
+ (\ x ->
+ PredefinedMetricSpecification' <$>
+ (x .:? "ResourceLabel") <*>
+ (x .: "PredefinedMetricType"))
+
+instance Hashable PredefinedMetricSpecification where
+
+instance NFData PredefinedMetricSpecification where
+
+instance ToJSON PredefinedMetricSpecification where
+ toJSON PredefinedMetricSpecification'{..}
+ = object
+ (catMaybes
+ [("ResourceLabel" .=) <$> _pmsResourceLabel,
+ Just
+ ("PredefinedMetricType" .=
+ _pmsPredefinedMetricType)])
-- | Represents a scalable target.
--
@@ -72,14 +266,15 @@ instance NFData Alarm
--
-- /See:/ 'scalableTarget' smart constructor.
data ScalableTarget = ScalableTarget'
- { _stServiceNamespace :: !ServiceNamespace
- , _stResourceId :: !Text
- , _stScalableDimension :: !ScalableDimension
- , _stMinCapacity :: !Int
- , _stMaxCapacity :: !Int
- , _stRoleARN :: !Text
- , _stCreationTime :: !POSIX
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _stServiceNamespace :: !ServiceNamespace
+ , _stResourceId :: !Text
+ , _stScalableDimension :: !ScalableDimension
+ , _stMinCapacity :: !Int
+ , _stMaxCapacity :: !Int
+ , _stRoleARN :: !Text
+ , _stCreationTime :: !POSIX
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'ScalableTarget' with the minimum fields required to make a request.
--
@@ -87,9 +282,9 @@ data ScalableTarget = ScalableTarget'
--
-- * 'stServiceNamespace' - The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
--
--- * 'stResourceId' - The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
+-- * 'stResourceId' - The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
--
--- * 'stScalableDimension' - The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
+-- * 'stScalableDimension' - The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
--
-- * 'stMinCapacity' - The minimum value to scale to in response to a scale in event.
--
@@ -108,25 +303,26 @@ scalableTarget
-> UTCTime -- ^ 'stCreationTime'
-> ScalableTarget
scalableTarget pServiceNamespace_ pResourceId_ pScalableDimension_ pMinCapacity_ pMaxCapacity_ pRoleARN_ pCreationTime_ =
- ScalableTarget'
- { _stServiceNamespace = pServiceNamespace_
- , _stResourceId = pResourceId_
- , _stScalableDimension = pScalableDimension_
- , _stMinCapacity = pMinCapacity_
- , _stMaxCapacity = pMaxCapacity_
- , _stRoleARN = pRoleARN_
- , _stCreationTime = _Time # pCreationTime_
- }
+ ScalableTarget'
+ { _stServiceNamespace = pServiceNamespace_
+ , _stResourceId = pResourceId_
+ , _stScalableDimension = pScalableDimension_
+ , _stMinCapacity = pMinCapacity_
+ , _stMaxCapacity = pMaxCapacity_
+ , _stRoleARN = pRoleARN_
+ , _stCreationTime = _Time # pCreationTime_
+ }
+
-- | The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
stServiceNamespace :: Lens' ScalableTarget ServiceNamespace
stServiceNamespace = lens _stServiceNamespace (\ s a -> s{_stServiceNamespace = a});
--- | The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
+-- | The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
stResourceId :: Lens' ScalableTarget Text
stResourceId = lens _stResourceId (\ s a -> s{_stResourceId = a});
--- | The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
+-- | The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
stScalableDimension :: Lens' ScalableTarget ScalableDimension
stScalableDimension = lens _stScalableDimension (\ s a -> s{_stScalableDimension = a});
@@ -158,9 +354,59 @@ instance FromJSON ScalableTarget where
<*> (x .: "RoleARN")
<*> (x .: "CreationTime"))
-instance Hashable ScalableTarget
+instance Hashable ScalableTarget where
+
+instance NFData ScalableTarget where
+
+-- | Represents the minimum and maximum capacity for a scheduled action.
+--
+--
+--
+-- /See:/ 'scalableTargetAction' smart constructor.
+data ScalableTargetAction = ScalableTargetAction'
+ { _staMaxCapacity :: !(Maybe Int)
+ , _staMinCapacity :: !(Maybe Int)
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
-instance NFData ScalableTarget
+
+-- | Creates a value of 'ScalableTargetAction' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'staMaxCapacity' - The maximum capacity.
+--
+-- * 'staMinCapacity' - The minimum capacity.
+scalableTargetAction
+ :: ScalableTargetAction
+scalableTargetAction =
+ ScalableTargetAction' {_staMaxCapacity = Nothing, _staMinCapacity = Nothing}
+
+
+-- | The maximum capacity.
+staMaxCapacity :: Lens' ScalableTargetAction (Maybe Int)
+staMaxCapacity = lens _staMaxCapacity (\ s a -> s{_staMaxCapacity = a});
+
+-- | The minimum capacity.
+staMinCapacity :: Lens' ScalableTargetAction (Maybe Int)
+staMinCapacity = lens _staMinCapacity (\ s a -> s{_staMinCapacity = a});
+
+instance FromJSON ScalableTargetAction where
+ parseJSON
+ = withObject "ScalableTargetAction"
+ (\ x ->
+ ScalableTargetAction' <$>
+ (x .:? "MaxCapacity") <*> (x .:? "MinCapacity"))
+
+instance Hashable ScalableTargetAction where
+
+instance NFData ScalableTargetAction where
+
+instance ToJSON ScalableTargetAction where
+ toJSON ScalableTargetAction'{..}
+ = object
+ (catMaybes
+ [("MaxCapacity" .=) <$> _staMaxCapacity,
+ ("MinCapacity" .=) <$> _staMinCapacity])
-- | Represents a scaling activity.
--
@@ -168,112 +414,114 @@ instance NFData ScalableTarget
--
-- /See:/ 'scalingActivity' smart constructor.
data ScalingActivity = ScalingActivity'
- { _saStatusMessage :: !(Maybe Text)
- , _saEndTime :: !(Maybe POSIX)
- , _saDetails :: !(Maybe Text)
- , _saActivityId :: !Text
- , _saServiceNamespace :: !ServiceNamespace
- , _saResourceId :: !Text
- , _saScalableDimension :: !ScalableDimension
- , _saDescription :: !Text
- , _saCause :: !Text
- , _saStartTime :: !POSIX
- , _saStatusCode :: !ScalingActivityStatusCode
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _sStatusMessage :: !(Maybe Text)
+ , _sEndTime :: !(Maybe POSIX)
+ , _sDetails :: !(Maybe Text)
+ , _sActivityId :: !Text
+ , _sServiceNamespace :: !ServiceNamespace
+ , _sResourceId :: !Text
+ , _sScalableDimension :: !ScalableDimension
+ , _sDescription :: !Text
+ , _sCause :: !Text
+ , _sStartTime :: !POSIX
+ , _sStatusCode :: !ScalingActivityStatusCode
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'ScalingActivity' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
--- * 'saStatusMessage' - A simple message about the current status of the scaling activity.
+-- * 'sStatusMessage' - A simple message about the current status of the scaling activity.
--
--- * 'saEndTime' - The Unix timestamp for when the scaling activity ended.
+-- * 'sEndTime' - The Unix timestamp for when the scaling activity ended.
--
--- * 'saDetails' - The details about the scaling activity.
+-- * 'sDetails' - The details about the scaling activity.
--
--- * 'saActivityId' - The unique identifier of the scaling activity.
+-- * 'sActivityId' - The unique identifier of the scaling activity.
--
--- * 'saServiceNamespace' - The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
+-- * 'sServiceNamespace' - The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
--
--- * 'saResourceId' - The identifier of the resource associated with the scaling activity. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
+-- * 'sResourceId' - The identifier of the resource associated with the scaling activity. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
--
--- * 'saScalableDimension' - The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
+-- * 'sScalableDimension' - The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
--
--- * 'saDescription' - A simple description of what action the scaling activity intends to accomplish.
+-- * 'sDescription' - A simple description of what action the scaling activity intends to accomplish.
--
--- * 'saCause' - A simple description of what caused the scaling activity to happen.
+-- * 'sCause' - A simple description of what caused the scaling activity to happen.
--
--- * 'saStartTime' - The Unix timestamp for when the scaling activity began.
+-- * 'sStartTime' - The Unix timestamp for when the scaling activity began.
--
--- * 'saStatusCode' - Indicates the status of the scaling activity.
+-- * 'sStatusCode' - Indicates the status of the scaling activity.
scalingActivity
- :: Text -- ^ 'saActivityId'
- -> ServiceNamespace -- ^ 'saServiceNamespace'
- -> Text -- ^ 'saResourceId'
- -> ScalableDimension -- ^ 'saScalableDimension'
- -> Text -- ^ 'saDescription'
- -> Text -- ^ 'saCause'
- -> UTCTime -- ^ 'saStartTime'
- -> ScalingActivityStatusCode -- ^ 'saStatusCode'
+ :: Text -- ^ 'sActivityId'
+ -> ServiceNamespace -- ^ 'sServiceNamespace'
+ -> Text -- ^ 'sResourceId'
+ -> ScalableDimension -- ^ 'sScalableDimension'
+ -> Text -- ^ 'sDescription'
+ -> Text -- ^ 'sCause'
+ -> UTCTime -- ^ 'sStartTime'
+ -> ScalingActivityStatusCode -- ^ 'sStatusCode'
-> ScalingActivity
scalingActivity pActivityId_ pServiceNamespace_ pResourceId_ pScalableDimension_ pDescription_ pCause_ pStartTime_ pStatusCode_ =
- ScalingActivity'
- { _saStatusMessage = Nothing
- , _saEndTime = Nothing
- , _saDetails = Nothing
- , _saActivityId = pActivityId_
- , _saServiceNamespace = pServiceNamespace_
- , _saResourceId = pResourceId_
- , _saScalableDimension = pScalableDimension_
- , _saDescription = pDescription_
- , _saCause = pCause_
- , _saStartTime = _Time # pStartTime_
- , _saStatusCode = pStatusCode_
- }
+ ScalingActivity'
+ { _sStatusMessage = Nothing
+ , _sEndTime = Nothing
+ , _sDetails = Nothing
+ , _sActivityId = pActivityId_
+ , _sServiceNamespace = pServiceNamespace_
+ , _sResourceId = pResourceId_
+ , _sScalableDimension = pScalableDimension_
+ , _sDescription = pDescription_
+ , _sCause = pCause_
+ , _sStartTime = _Time # pStartTime_
+ , _sStatusCode = pStatusCode_
+ }
+
-- | A simple message about the current status of the scaling activity.
-saStatusMessage :: Lens' ScalingActivity (Maybe Text)
-saStatusMessage = lens _saStatusMessage (\ s a -> s{_saStatusMessage = a});
+sStatusMessage :: Lens' ScalingActivity (Maybe Text)
+sStatusMessage = lens _sStatusMessage (\ s a -> s{_sStatusMessage = a});
-- | The Unix timestamp for when the scaling activity ended.
-saEndTime :: Lens' ScalingActivity (Maybe UTCTime)
-saEndTime = lens _saEndTime (\ s a -> s{_saEndTime = a}) . mapping _Time;
+sEndTime :: Lens' ScalingActivity (Maybe UTCTime)
+sEndTime = lens _sEndTime (\ s a -> s{_sEndTime = a}) . mapping _Time;
-- | The details about the scaling activity.
-saDetails :: Lens' ScalingActivity (Maybe Text)
-saDetails = lens _saDetails (\ s a -> s{_saDetails = a});
+sDetails :: Lens' ScalingActivity (Maybe Text)
+sDetails = lens _sDetails (\ s a -> s{_sDetails = a});
-- | The unique identifier of the scaling activity.
-saActivityId :: Lens' ScalingActivity Text
-saActivityId = lens _saActivityId (\ s a -> s{_saActivityId = a});
+sActivityId :: Lens' ScalingActivity Text
+sActivityId = lens _sActivityId (\ s a -> s{_sActivityId = a});
-- | The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
-saServiceNamespace :: Lens' ScalingActivity ServiceNamespace
-saServiceNamespace = lens _saServiceNamespace (\ s a -> s{_saServiceNamespace = a});
+sServiceNamespace :: Lens' ScalingActivity ServiceNamespace
+sServiceNamespace = lens _sServiceNamespace (\ s a -> s{_sServiceNamespace = a});
--- | The identifier of the resource associated with the scaling activity. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
-saResourceId :: Lens' ScalingActivity Text
-saResourceId = lens _saResourceId (\ s a -> s{_saResourceId = a});
+-- | The identifier of the resource associated with the scaling activity. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
+sResourceId :: Lens' ScalingActivity Text
+sResourceId = lens _sResourceId (\ s a -> s{_sResourceId = a});
--- | The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
-saScalableDimension :: Lens' ScalingActivity ScalableDimension
-saScalableDimension = lens _saScalableDimension (\ s a -> s{_saScalableDimension = a});
+-- | The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
+sScalableDimension :: Lens' ScalingActivity ScalableDimension
+sScalableDimension = lens _sScalableDimension (\ s a -> s{_sScalableDimension = a});
-- | A simple description of what action the scaling activity intends to accomplish.
-saDescription :: Lens' ScalingActivity Text
-saDescription = lens _saDescription (\ s a -> s{_saDescription = a});
+sDescription :: Lens' ScalingActivity Text
+sDescription = lens _sDescription (\ s a -> s{_sDescription = a});
-- | A simple description of what caused the scaling activity to happen.
-saCause :: Lens' ScalingActivity Text
-saCause = lens _saCause (\ s a -> s{_saCause = a});
+sCause :: Lens' ScalingActivity Text
+sCause = lens _sCause (\ s a -> s{_sCause = a});
-- | The Unix timestamp for when the scaling activity began.
-saStartTime :: Lens' ScalingActivity UTCTime
-saStartTime = lens _saStartTime (\ s a -> s{_saStartTime = a}) . _Time;
+sStartTime :: Lens' ScalingActivity UTCTime
+sStartTime = lens _sStartTime (\ s a -> s{_sStartTime = a}) . _Time;
-- | Indicates the status of the scaling activity.
-saStatusCode :: Lens' ScalingActivity ScalingActivityStatusCode
-saStatusCode = lens _saStatusCode (\ s a -> s{_saStatusCode = a});
+sStatusCode :: Lens' ScalingActivity ScalingActivityStatusCode
+sStatusCode = lens _sStatusCode (\ s a -> s{_sStatusCode = a});
instance FromJSON ScalingActivity where
parseJSON
@@ -291,9 +539,9 @@ instance FromJSON ScalingActivity where
<*> (x .: "StartTime")
<*> (x .: "StatusCode"))
-instance Hashable ScalingActivity
+instance Hashable ScalingActivity where
-instance NFData ScalingActivity
+instance NFData ScalingActivity where
-- | Represents a scaling policy.
--
@@ -301,22 +549,26 @@ instance NFData ScalingActivity
--
-- /See:/ 'scalingPolicy' smart constructor.
data ScalingPolicy = ScalingPolicy'
- { _spStepScalingPolicyConfiguration :: !(Maybe StepScalingPolicyConfiguration)
- , _spAlarms :: !(Maybe [Alarm])
- , _spPolicyARN :: !Text
- , _spPolicyName :: !Text
- , _spServiceNamespace :: !ServiceNamespace
- , _spResourceId :: !Text
- , _spScalableDimension :: !ScalableDimension
- , _spPolicyType :: !PolicyType
- , _spCreationTime :: !POSIX
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _spTargetTrackingScalingPolicyConfiguration :: !(Maybe TargetTrackingScalingPolicyConfiguration)
+ , _spStepScalingPolicyConfiguration :: !(Maybe StepScalingPolicyConfiguration)
+ , _spAlarms :: !(Maybe [Alarm])
+ , _spPolicyARN :: !Text
+ , _spPolicyName :: !Text
+ , _spServiceNamespace :: !ServiceNamespace
+ , _spResourceId :: !Text
+ , _spScalableDimension :: !ScalableDimension
+ , _spPolicyType :: !PolicyType
+ , _spCreationTime :: !POSIX
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'ScalingPolicy' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
--- * 'spStepScalingPolicyConfiguration' - The configuration for the step scaling policy.
+-- * 'spTargetTrackingScalingPolicyConfiguration' - A target tracking policy.
+--
+-- * 'spStepScalingPolicyConfiguration' - A step scaling policy.
--
-- * 'spAlarms' - The CloudWatch alarms associated with the scaling policy.
--
@@ -326,9 +578,9 @@ data ScalingPolicy = ScalingPolicy'
--
-- * 'spServiceNamespace' - The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
--
--- * 'spResourceId' - The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
+-- * 'spResourceId' - The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
--
--- * 'spScalableDimension' - The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
+-- * 'spScalableDimension' - The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
--
-- * 'spPolicyType' - The scaling policy type.
--
@@ -343,19 +595,25 @@ scalingPolicy
-> UTCTime -- ^ 'spCreationTime'
-> ScalingPolicy
scalingPolicy pPolicyARN_ pPolicyName_ pServiceNamespace_ pResourceId_ pScalableDimension_ pPolicyType_ pCreationTime_ =
- ScalingPolicy'
- { _spStepScalingPolicyConfiguration = Nothing
- , _spAlarms = Nothing
- , _spPolicyARN = pPolicyARN_
- , _spPolicyName = pPolicyName_
- , _spServiceNamespace = pServiceNamespace_
- , _spResourceId = pResourceId_
- , _spScalableDimension = pScalableDimension_
- , _spPolicyType = pPolicyType_
- , _spCreationTime = _Time # pCreationTime_
- }
-
--- | The configuration for the step scaling policy.
+ ScalingPolicy'
+ { _spTargetTrackingScalingPolicyConfiguration = Nothing
+ , _spStepScalingPolicyConfiguration = Nothing
+ , _spAlarms = Nothing
+ , _spPolicyARN = pPolicyARN_
+ , _spPolicyName = pPolicyName_
+ , _spServiceNamespace = pServiceNamespace_
+ , _spResourceId = pResourceId_
+ , _spScalableDimension = pScalableDimension_
+ , _spPolicyType = pPolicyType_
+ , _spCreationTime = _Time # pCreationTime_
+ }
+
+
+-- | A target tracking policy.
+spTargetTrackingScalingPolicyConfiguration :: Lens' ScalingPolicy (Maybe TargetTrackingScalingPolicyConfiguration)
+spTargetTrackingScalingPolicyConfiguration = lens _spTargetTrackingScalingPolicyConfiguration (\ s a -> s{_spTargetTrackingScalingPolicyConfiguration = a});
+
+-- | A step scaling policy.
spStepScalingPolicyConfiguration :: Lens' ScalingPolicy (Maybe StepScalingPolicyConfiguration)
spStepScalingPolicyConfiguration = lens _spStepScalingPolicyConfiguration (\ s a -> s{_spStepScalingPolicyConfiguration = a});
@@ -375,11 +633,11 @@ spPolicyName = lens _spPolicyName (\ s a -> s{_spPolicyName = a});
spServiceNamespace :: Lens' ScalingPolicy ServiceNamespace
spServiceNamespace = lens _spServiceNamespace (\ s a -> s{_spServiceNamespace = a});
--- | The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ .
+-- | The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
spResourceId :: Lens' ScalingPolicy Text
spResourceId = lens _spResourceId (\ s a -> s{_spResourceId = a});
--- | The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group.
+-- | The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
spScalableDimension :: Lens' ScalingPolicy ScalableDimension
spScalableDimension = lens _spScalableDimension (\ s a -> s{_spScalableDimension = a});
@@ -396,8 +654,9 @@ instance FromJSON ScalingPolicy where
= withObject "ScalingPolicy"
(\ x ->
ScalingPolicy' <$>
- (x .:? "StepScalingPolicyConfiguration") <*>
- (x .:? "Alarms" .!= mempty)
+ (x .:? "TargetTrackingScalingPolicyConfiguration")
+ <*> (x .:? "StepScalingPolicyConfiguration")
+ <*> (x .:? "Alarms" .!= mempty)
<*> (x .: "PolicyARN")
<*> (x .: "PolicyName")
<*> (x .: "ServiceNamespace")
@@ -406,9 +665,133 @@ instance FromJSON ScalingPolicy where
<*> (x .: "PolicyType")
<*> (x .: "CreationTime"))
-instance Hashable ScalingPolicy
+instance Hashable ScalingPolicy where
+
+instance NFData ScalingPolicy where
+
+-- | Represents a scheduled action.
+--
+--
+--
+-- /See:/ 'scheduledAction' smart constructor.
+data ScheduledAction = ScheduledAction'
+ { _saScalableDimension :: !(Maybe ScalableDimension)
+ , _saStartTime :: !(Maybe POSIX)
+ , _saEndTime :: !(Maybe POSIX)
+ , _saScalableTargetAction :: !(Maybe ScalableTargetAction)
+ , _saScheduledActionName :: !Text
+ , _saScheduledActionARN :: !Text
+ , _saServiceNamespace :: !ServiceNamespace
+ , _saSchedule :: !Text
+ , _saResourceId :: !Text
+ , _saCreationTime :: !POSIX
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
+
+-- | Creates a value of 'ScheduledAction' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'saScalableDimension' - The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
+--
+-- * 'saStartTime' - The date and time that the action is scheduled to begin.
+--
+-- * 'saEndTime' - The date and time that the action is scheduled to end.
+--
+-- * 'saScalableTargetAction' - The new minimum and maximum capacity. You can set both values or just one. During the scheduled time, if the current capacity is below the minimum capacity, Application Auto Scaling scales out to the minimum capacity. If the current capacity is above the maximum capacity, Application Auto Scaling scales in to the maximum capacity.
+--
+-- * 'saScheduledActionName' - The name of the scheduled action.
+--
+-- * 'saScheduledActionARN' - The Amazon Resource Name (ARN) of the scheduled action.
+--
+-- * 'saServiceNamespace' - The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
+--
+-- * 'saSchedule' - The schedule for this action. The following formats are supported: * At expressions - @at(/yyyy/ -/mm/ -/dd/ T/hh/ :/mm/ :/ss/ )@ * Rate expressions - @rate(/value/ /unit/ )@ * Cron expressions - @cron(/fields/ )@ At expressions are useful for one-time schedules. Specify the time, in UTC. For rate expressions, /value/ is a positive integer and /unit/ is @minute@ | @minutes@ | @hour@ | @hours@ | @day@ | @days@ . For more information about cron expressions, see <https://en.wikipedia.org/wiki/Cron Cron> .
+--
+-- * 'saResourceId' - The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
+--
+-- * 'saCreationTime' - The date and time that the scheduled action was created.
+scheduledAction
+ :: Text -- ^ 'saScheduledActionName'
+ -> Text -- ^ 'saScheduledActionARN'
+ -> ServiceNamespace -- ^ 'saServiceNamespace'
+ -> Text -- ^ 'saSchedule'
+ -> Text -- ^ 'saResourceId'
+ -> UTCTime -- ^ 'saCreationTime'
+ -> ScheduledAction
+scheduledAction pScheduledActionName_ pScheduledActionARN_ pServiceNamespace_ pSchedule_ pResourceId_ pCreationTime_ =
+ ScheduledAction'
+ { _saScalableDimension = Nothing
+ , _saStartTime = Nothing
+ , _saEndTime = Nothing
+ , _saScalableTargetAction = Nothing
+ , _saScheduledActionName = pScheduledActionName_
+ , _saScheduledActionARN = pScheduledActionARN_
+ , _saServiceNamespace = pServiceNamespace_
+ , _saSchedule = pSchedule_
+ , _saResourceId = pResourceId_
+ , _saCreationTime = _Time # pCreationTime_
+ }
+
+
+-- | The scalable dimension. This string consists of the service namespace, resource type, and scaling property. * @ecs:service:DesiredCount@ - The desired task count of an ECS service. * @ec2:spot-fleet-request:TargetCapacity@ - The target capacity of a Spot fleet request. * @elasticmapreduce:instancegroup:InstanceCount@ - The instance count of an EMR Instance Group. * @appstream:fleet:DesiredCapacity@ - The desired capacity of an AppStream 2.0 fleet. * @dynamodb:table:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB table. * @dynamodb:table:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB table. * @dynamodb:index:ReadCapacityUnits@ - The provisioned read capacity for a DynamoDB global secondary index. * @dynamodb:index:WriteCapacityUnits@ - The provisioned write capacity for a DynamoDB global secondary index.
+saScalableDimension :: Lens' ScheduledAction (Maybe ScalableDimension)
+saScalableDimension = lens _saScalableDimension (\ s a -> s{_saScalableDimension = a});
+
+-- | The date and time that the action is scheduled to begin.
+saStartTime :: Lens' ScheduledAction (Maybe UTCTime)
+saStartTime = lens _saStartTime (\ s a -> s{_saStartTime = a}) . mapping _Time;
+
+-- | The date and time that the action is scheduled to end.
+saEndTime :: Lens' ScheduledAction (Maybe UTCTime)
+saEndTime = lens _saEndTime (\ s a -> s{_saEndTime = a}) . mapping _Time;
+
+-- | The new minimum and maximum capacity. You can set both values or just one. During the scheduled time, if the current capacity is below the minimum capacity, Application Auto Scaling scales out to the minimum capacity. If the current capacity is above the maximum capacity, Application Auto Scaling scales in to the maximum capacity.
+saScalableTargetAction :: Lens' ScheduledAction (Maybe ScalableTargetAction)
+saScalableTargetAction = lens _saScalableTargetAction (\ s a -> s{_saScalableTargetAction = a});
+
+-- | The name of the scheduled action.
+saScheduledActionName :: Lens' ScheduledAction Text
+saScheduledActionName = lens _saScheduledActionName (\ s a -> s{_saScheduledActionName = a});
+
+-- | The Amazon Resource Name (ARN) of the scheduled action.
+saScheduledActionARN :: Lens' ScheduledAction Text
+saScheduledActionARN = lens _saScheduledActionARN (\ s a -> s{_saScheduledActionARN = a});
+
+-- | The namespace of the AWS service. For more information, see <http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces AWS Service Namespaces> in the /Amazon Web Services General Reference/ .
+saServiceNamespace :: Lens' ScheduledAction ServiceNamespace
+saServiceNamespace = lens _saServiceNamespace (\ s a -> s{_saServiceNamespace = a});
+
+-- | The schedule for this action. The following formats are supported: * At expressions - @at(/yyyy/ -/mm/ -/dd/ T/hh/ :/mm/ :/ss/ )@ * Rate expressions - @rate(/value/ /unit/ )@ * Cron expressions - @cron(/fields/ )@ At expressions are useful for one-time schedules. Specify the time, in UTC. For rate expressions, /value/ is a positive integer and /unit/ is @minute@ | @minutes@ | @hour@ | @hours@ | @day@ | @days@ . For more information about cron expressions, see <https://en.wikipedia.org/wiki/Cron Cron> .
+saSchedule :: Lens' ScheduledAction Text
+saSchedule = lens _saSchedule (\ s a -> s{_saSchedule = a});
+
+-- | The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier. * ECS service - The resource type is @service@ and the unique identifier is the cluster name and service name. Example: @service/default/sample-webapp@ . * Spot fleet request - The resource type is @spot-fleet-request@ and the unique identifier is the Spot fleet request ID. Example: @spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE@ . * EMR cluster - The resource type is @instancegroup@ and the unique identifier is the cluster ID and instance group ID. Example: @instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0@ . * AppStream 2.0 fleet - The resource type is @fleet@ and the unique identifier is the fleet name. Example: @fleet/sample-fleet@ . * DynamoDB table - The resource type is @table@ and the unique identifier is the resource ID. Example: @table/my-table@ . * DynamoDB global secondary index - The resource type is @index@ and the unique identifier is the resource ID. Example: @table/my-table/index/my-table-index@ .
+saResourceId :: Lens' ScheduledAction Text
+saResourceId = lens _saResourceId (\ s a -> s{_saResourceId = a});
+
+-- | The date and time that the scheduled action was created.
+saCreationTime :: Lens' ScheduledAction UTCTime
+saCreationTime = lens _saCreationTime (\ s a -> s{_saCreationTime = a}) . _Time;
+
+instance FromJSON ScheduledAction where
+ parseJSON
+ = withObject "ScheduledAction"
+ (\ x ->
+ ScheduledAction' <$>
+ (x .:? "ScalableDimension") <*> (x .:? "StartTime")
+ <*> (x .:? "EndTime")
+ <*> (x .:? "ScalableTargetAction")
+ <*> (x .: "ScheduledActionName")
+ <*> (x .: "ScheduledActionARN")
+ <*> (x .: "ServiceNamespace")
+ <*> (x .: "Schedule")
+ <*> (x .: "ResourceId")
+ <*> (x .: "CreationTime"))
+
+instance Hashable ScheduledAction where
-instance NFData ScalingPolicy
+instance NFData ScheduledAction where
-- | Represents a step adjustment for a 'StepScalingPolicyConfiguration' . Describes an adjustment based on the difference between the value of the aggregated CloudWatch metric and the breach threshold that you've defined for the alarm.
--
@@ -436,10 +819,11 @@ instance NFData ScalingPolicy
--
-- /See:/ 'stepAdjustment' smart constructor.
data StepAdjustment = StepAdjustment'
- { _saMetricIntervalLowerBound :: !(Maybe Double)
- , _saMetricIntervalUpperBound :: !(Maybe Double)
- , _saScalingAdjustment :: !Int
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _saMetricIntervalLowerBound :: !(Maybe Double)
+ , _saMetricIntervalUpperBound :: !(Maybe Double)
+ , _saScalingAdjustment :: !Int
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'StepAdjustment' with the minimum fields required to make a request.
--
@@ -454,11 +838,12 @@ stepAdjustment
:: Int -- ^ 'saScalingAdjustment'
-> StepAdjustment
stepAdjustment pScalingAdjustment_ =
- StepAdjustment'
- { _saMetricIntervalLowerBound = Nothing
- , _saMetricIntervalUpperBound = Nothing
- , _saScalingAdjustment = pScalingAdjustment_
- }
+ StepAdjustment'
+ { _saMetricIntervalLowerBound = Nothing
+ , _saMetricIntervalUpperBound = Nothing
+ , _saScalingAdjustment = pScalingAdjustment_
+ }
+
-- | The lower bound for the difference between the alarm threshold and the CloudWatch metric. If the metric value is above the breach threshold, the lower bound is inclusive (the metric must be greater than or equal to the threshold plus the lower bound). Otherwise, it is exclusive (the metric must be greater than the threshold plus the lower bound). A null value indicates negative infinity.
saMetricIntervalLowerBound :: Lens' StepAdjustment (Maybe Double)
@@ -481,9 +866,9 @@ instance FromJSON StepAdjustment where
(x .:? "MetricIntervalUpperBound")
<*> (x .: "ScalingAdjustment"))
-instance Hashable StepAdjustment
+instance Hashable StepAdjustment where
-instance NFData StepAdjustment
+instance NFData StepAdjustment where
instance ToJSON StepAdjustment where
toJSON StepAdjustment'{..}
@@ -501,12 +886,13 @@ instance ToJSON StepAdjustment where
--
-- /See:/ 'stepScalingPolicyConfiguration' smart constructor.
data StepScalingPolicyConfiguration = StepScalingPolicyConfiguration'
- { _sspcStepAdjustments :: !(Maybe [StepAdjustment])
- , _sspcAdjustmentType :: !(Maybe AdjustmentType)
- , _sspcCooldown :: !(Maybe Int)
- , _sspcMetricAggregationType :: !(Maybe MetricAggregationType)
- , _sspcMinAdjustmentMagnitude :: !(Maybe Int)
- } deriving (Eq,Read,Show,Data,Typeable,Generic)
+ { _sspcStepAdjustments :: !(Maybe [StepAdjustment])
+ , _sspcAdjustmentType :: !(Maybe AdjustmentType)
+ , _sspcCooldown :: !(Maybe Int)
+ , _sspcMetricAggregationType :: !(Maybe MetricAggregationType)
+ , _sspcMinAdjustmentMagnitude :: !(Maybe Int)
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
-- | Creates a value of 'StepScalingPolicyConfiguration' with the minimum fields required to make a request.
--
@@ -516,7 +902,7 @@ data StepScalingPolicyConfiguration = StepScalingPolicyConfiguration'
--
-- * 'sspcAdjustmentType' - The adjustment type, which specifies how the @ScalingAdjustment@ parameter in a 'StepAdjustment' is interpreted.
--
--- * 'sspcCooldown' - The amount of time, in seconds, after a scaling activity completes where previous trigger-related scaling activities can influence future scaling events. For scale out policies, while @Cooldown@ is in effect, the capacity that has been added by the previous scale out event that initiated the @Cooldown@ is calculated as part of the desired capacity for the next scale out. The intention is to continuously (but not excessively) scale out. For example, an alarm triggers a step scaling policy to scale out an Amazon ECS service by 2 tasks, the scaling activity completes successfully, and a @Cooldown@ period of 5 minutes starts. During the @Cooldown@ period, if the alarm triggers the same policy again but at a more aggressive step adjustment to scale out the service by 3 tasks, the 2 tasks that were added in the previous scale out event are considered part of that capacity and only 1 additional task is added to the desired count. For scale in policies, the @Cooldown@ period is used to block subsequent scale in requests until it has expired. The intention is to scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during the @Cooldown@ period after a scale-in, Application Auto Scaling scales out your scalable target immediately.
+-- * 'sspcCooldown' - The amount of time, in seconds, after a scaling activity completes where previous trigger-related scaling activities can influence future scaling events. For scale out policies, while the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. The intention is to continuously (but not excessively) scale out. For example, an alarm triggers a step scaling policy to scale out an Amazon ECS service by 2 tasks, the scaling activity completes successfully, and a cooldown period of 5 minutes starts. During the Cooldown period, if the alarm triggers the same policy again but at a more aggressive step adjustment to scale out the service by 3 tasks, the 2 tasks that were added in the previous scale out event are considered part of that capacity and only 1 additional task is added to the desired count. For scale in policies, the cooldown period is used to block subsequent scale in requests until it has expired. The intention is to scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, Application Auto Scaling scales out your scalable target immediately.
--
-- * 'sspcMetricAggregationType' - The aggregation type for the CloudWatch metrics. Valid values are @Minimum@ , @Maximum@ , and @Average@ .
--
@@ -524,13 +910,14 @@ data StepScalingPolicyConfiguration = StepScalingPolicyConfiguration'
stepScalingPolicyConfiguration
:: StepScalingPolicyConfiguration
stepScalingPolicyConfiguration =
- StepScalingPolicyConfiguration'
- { _sspcStepAdjustments = Nothing
- , _sspcAdjustmentType = Nothing
- , _sspcCooldown = Nothing
- , _sspcMetricAggregationType = Nothing
- , _sspcMinAdjustmentMagnitude = Nothing
- }
+ StepScalingPolicyConfiguration'
+ { _sspcStepAdjustments = Nothing
+ , _sspcAdjustmentType = Nothing
+ , _sspcCooldown = Nothing
+ , _sspcMetricAggregationType = Nothing
+ , _sspcMinAdjustmentMagnitude = Nothing
+ }
+
-- | A set of adjustments that enable you to scale based on the size of the alarm breach.
sspcStepAdjustments :: Lens' StepScalingPolicyConfiguration [StepAdjustment]
@@ -540,7 +927,7 @@ sspcStepAdjustments = lens _sspcStepAdjustments (\ s a -> s{_sspcStepAdjustments
sspcAdjustmentType :: Lens' StepScalingPolicyConfiguration (Maybe AdjustmentType)
sspcAdjustmentType = lens _sspcAdjustmentType (\ s a -> s{_sspcAdjustmentType = a});
--- | The amount of time, in seconds, after a scaling activity completes where previous trigger-related scaling activities can influence future scaling events. For scale out policies, while @Cooldown@ is in effect, the capacity that has been added by the previous scale out event that initiated the @Cooldown@ is calculated as part of the desired capacity for the next scale out. The intention is to continuously (but not excessively) scale out. For example, an alarm triggers a step scaling policy to scale out an Amazon ECS service by 2 tasks, the scaling activity completes successfully, and a @Cooldown@ period of 5 minutes starts. During the @Cooldown@ period, if the alarm triggers the same policy again but at a more aggressive step adjustment to scale out the service by 3 tasks, the 2 tasks that were added in the previous scale out event are considered part of that capacity and only 1 additional task is added to the desired count. For scale in policies, the @Cooldown@ period is used to block subsequent scale in requests until it has expired. The intention is to scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during the @Cooldown@ period after a scale-in, Application Auto Scaling scales out your scalable target immediately.
+-- | The amount of time, in seconds, after a scaling activity completes where previous trigger-related scaling activities can influence future scaling events. For scale out policies, while the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. The intention is to continuously (but not excessively) scale out. For example, an alarm triggers a step scaling policy to scale out an Amazon ECS service by 2 tasks, the scaling activity completes successfully, and a cooldown period of 5 minutes starts. During the Cooldown period, if the alarm triggers the same policy again but at a more aggressive step adjustment to scale out the service by 3 tasks, the 2 tasks that were added in the previous scale out event are considered part of that capacity and only 1 additional task is added to the desired count. For scale in policies, the cooldown period is used to block subsequent scale in requests until it has expired. The intention is to scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, Application Auto Scaling scales out your scalable target immediately.
sspcCooldown :: Lens' StepScalingPolicyConfiguration (Maybe Int)
sspcCooldown = lens _sspcCooldown (\ s a -> s{_sspcCooldown = a});
@@ -565,8 +952,9 @@ instance FromJSON StepScalingPolicyConfiguration
<*> (x .:? "MinAdjustmentMagnitude"))
instance Hashable StepScalingPolicyConfiguration
+ where
-instance NFData StepScalingPolicyConfiguration
+instance NFData StepScalingPolicyConfiguration where
instance ToJSON StepScalingPolicyConfiguration where
toJSON StepScalingPolicyConfiguration'{..}
@@ -579,3 +967,109 @@ instance ToJSON StepScalingPolicyConfiguration where
_sspcMetricAggregationType,
("MinAdjustmentMagnitude" .=) <$>
_sspcMinAdjustmentMagnitude])
+
+-- | Represents a target tracking scaling policy configuration.
+--
+--
+--
+-- /See:/ 'targetTrackingScalingPolicyConfiguration' smart constructor.
+data TargetTrackingScalingPolicyConfiguration = TargetTrackingScalingPolicyConfiguration'
+ { _ttspcPredefinedMetricSpecification :: !(Maybe PredefinedMetricSpecification)
+ , _ttspcScaleInCooldown :: !(Maybe Int)
+ , _ttspcCustomizedMetricSpecification :: !(Maybe CustomizedMetricSpecification)
+ , _ttspcDisableScaleIn :: !(Maybe Bool)
+ , _ttspcScaleOutCooldown :: !(Maybe Int)
+ , _ttspcTargetValue :: !Double
+ } deriving (Eq, Read, Show, Data, Typeable, Generic)
+
+
+-- | Creates a value of 'TargetTrackingScalingPolicyConfiguration' with the minimum fields required to make a request.
+--
+-- Use one of the following lenses to modify other fields as desired:
+--
+-- * 'ttspcPredefinedMetricSpecification' - A predefined metric.
+--
+-- * 'ttspcScaleInCooldown' - The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. The intention is to scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, Application Auto Scaling scales out your scalable target immediately.
+--
+-- * 'ttspcCustomizedMetricSpecification' - Reserved for future use.
+--
+-- * 'ttspcDisableScaleIn' - Indicates whether scale in by the target tracking policy is disabled. If the value is @true@ , scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is @false@ .
+--
+-- * 'ttspcScaleOutCooldown' - The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. The intention is to continuously (but not excessively) scale out.
+--
+-- * 'ttspcTargetValue' - The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2).
+targetTrackingScalingPolicyConfiguration
+ :: Double -- ^ 'ttspcTargetValue'
+ -> TargetTrackingScalingPolicyConfiguration
+targetTrackingScalingPolicyConfiguration pTargetValue_ =
+ TargetTrackingScalingPolicyConfiguration'
+ { _ttspcPredefinedMetricSpecification = Nothing
+ , _ttspcScaleInCooldown = Nothing
+ , _ttspcCustomizedMetricSpecification = Nothing
+ , _ttspcDisableScaleIn = Nothing
+ , _ttspcScaleOutCooldown = Nothing
+ , _ttspcTargetValue = pTargetValue_
+ }
+
+
+-- | A predefined metric.
+ttspcPredefinedMetricSpecification :: Lens' TargetTrackingScalingPolicyConfiguration (Maybe PredefinedMetricSpecification)
+ttspcPredefinedMetricSpecification = lens _ttspcPredefinedMetricSpecification (\ s a -> s{_ttspcPredefinedMetricSpecification = a});
+
+-- | The amount of time, in seconds, after a scale in activity completes before another scale in activity can start. The cooldown period is used to block subsequent scale in requests until it has expired. The intention is to scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during the cooldown period after a scale-in, Application Auto Scaling scales out your scalable target immediately.
+ttspcScaleInCooldown :: Lens' TargetTrackingScalingPolicyConfiguration (Maybe Int)
+ttspcScaleInCooldown = lens _ttspcScaleInCooldown (\ s a -> s{_ttspcScaleInCooldown = a});
+
+-- | Reserved for future use.
+ttspcCustomizedMetricSpecification :: Lens' TargetTrackingScalingPolicyConfiguration (Maybe CustomizedMetricSpecification)
+ttspcCustomizedMetricSpecification = lens _ttspcCustomizedMetricSpecification (\ s a -> s{_ttspcCustomizedMetricSpecification = a});
+
+-- | Indicates whether scale in by the target tracking policy is disabled. If the value is @true@ , scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource. The default value is @false@ .
+ttspcDisableScaleIn :: Lens' TargetTrackingScalingPolicyConfiguration (Maybe Bool)
+ttspcDisableScaleIn = lens _ttspcDisableScaleIn (\ s a -> s{_ttspcDisableScaleIn = a});
+
+-- | The amount of time, in seconds, after a scale out activity completes before another scale out activity can start. While the cooldown period is in effect, the capacity that has been added by the previous scale out event that initiated the cooldown is calculated as part of the desired capacity for the next scale out. The intention is to continuously (but not excessively) scale out.
+ttspcScaleOutCooldown :: Lens' TargetTrackingScalingPolicyConfiguration (Maybe Int)
+ttspcScaleOutCooldown = lens _ttspcScaleOutCooldown (\ s a -> s{_ttspcScaleOutCooldown = a});
+
+-- | The target value for the metric. The range is 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2).
+ttspcTargetValue :: Lens' TargetTrackingScalingPolicyConfiguration Double
+ttspcTargetValue = lens _ttspcTargetValue (\ s a -> s{_ttspcTargetValue = a});
+
+instance FromJSON
+ TargetTrackingScalingPolicyConfiguration
+ where
+ parseJSON
+ = withObject
+ "TargetTrackingScalingPolicyConfiguration"
+ (\ x ->
+ TargetTrackingScalingPolicyConfiguration' <$>
+ (x .:? "PredefinedMetricSpecification") <*>
+ (x .:? "ScaleInCooldown")
+ <*> (x .:? "CustomizedMetricSpecification")
+ <*> (x .:? "DisableScaleIn")
+ <*> (x .:? "ScaleOutCooldown")
+ <*> (x .: "TargetValue"))
+
+instance Hashable
+ TargetTrackingScalingPolicyConfiguration
+ where
+
+instance NFData
+ TargetTrackingScalingPolicyConfiguration
+ where
+
+instance ToJSON
+ TargetTrackingScalingPolicyConfiguration
+ where
+ toJSON TargetTrackingScalingPolicyConfiguration'{..}
+ = object
+ (catMaybes
+ [("PredefinedMetricSpecification" .=) <$>
+ _ttspcPredefinedMetricSpecification,
+ ("ScaleInCooldown" .=) <$> _ttspcScaleInCooldown,
+ ("CustomizedMetricSpecification" .=) <$>
+ _ttspcCustomizedMetricSpecification,
+ ("DisableScaleIn" .=) <$> _ttspcDisableScaleIn,
+ ("ScaleOutCooldown" .=) <$> _ttspcScaleOutCooldown,
+ Just ("TargetValue" .= _ttspcTargetValue)])
diff --git a/gen/Network/AWS/ApplicationAutoScaling/Types/Sum.hs b/gen/Network/AWS/ApplicationAutoScaling/Types/Sum.hs
index 98b1edc..2354c4f 100644
--- a/gen/Network/AWS/ApplicationAutoScaling/Types/Sum.hs
+++ b/gen/Network/AWS/ApplicationAutoScaling/Types/Sum.hs
@@ -9,21 +9,22 @@
-- |
-- Module : Network.AWS.ApplicationAutoScaling.Types.Sum
--- Copyright : (c) 2013-2016 Brendan Hay
+-- Copyright : (c) 2013-2017 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
module Network.AWS.ApplicationAutoScaling.Types.Sum where
-import Network.AWS.Prelude
+import Network.AWS.Prelude
data AdjustmentType
- = ChangeInCapacity
- | ExactCapacity
- | PercentChangeInCapacity
- deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)
+ = ChangeInCapacity
+ | ExactCapacity
+ | PercentChangeInCapacity
+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)
+
instance FromText AdjustmentType where
parser = takeLowerText >>= \case
@@ -52,24 +53,25 @@ instance FromJSON AdjustmentType where
parseJSON = parseJSONText "AdjustmentType"
data MetricAggregationType
- = Average
- | Maximum
- | Minimum
- deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)
+ = MATAverage
+ | MATMaximum
+ | MATMinimum
+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)
+
instance FromText MetricAggregationType where
parser = takeLowerText >>= \case
- "average" -> pure Average
- "maximum" -> pure Maximum
- "minimum" -> pure Minimum
+ "average" -> pure MATAverage
+ "maximum" -> pure MATMaximum
+ "minimum" -> pure MATMinimum
e -> fromTextError $ "Failure parsing MetricAggregationType from value: '" <> e
<> "'. Accepted values: average, maximum, minimum"
instance ToText MetricAggregationType where
toText = \case
- Average -> "Average"
- Maximum -> "Maximum"
- Minimum -> "Minimum"
+ MATAverage -> "Average"
+ MATMaximum -> "Maximum"
+ MATMinimum -> "Minimum"
instance Hashable MetricAggregationType
instance NFData MetricAggregationType
@@ -83,19 +85,92 @@ instance ToJSON MetricAggregationType where
instance FromJSON MetricAggregationType where
parseJSON = parseJSONText "MetricAggregationType"
-data PolicyType =
- StepScaling
- deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)
+data MetricStatistic
+ = Average
+ | Maximum
+ | Minimum
+ | SampleCount
+ | Sum
+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)
+
+
+instance FromText MetricStatistic where
+ parser = takeLowerText >>= \case
+ "average" -> pure Average
+ "maximum" -> pure Maximum
+ "minimum" -> pure Minimum
+ "samplecount" -> pure SampleCount
+ "sum" -> pure Sum
+ e -> fromTextError $ "Failure parsing MetricStatistic from value: '" <> e
+ <> "'. Accepted values: average, maximum, minimum, samplecount, sum"
+
+instance ToText MetricStatistic where
+ toText = \case
+ Average -> "Average"
+ Maximum -> "Maximum"
+ Minimum -> "Minimum"
+ SampleCount -> "SampleCount"
+ Sum -> "Sum"
+
+instance Hashable MetricStatistic
+instance NFData MetricStatistic
+instance ToByteString MetricStatistic
+instance ToQuery MetricStatistic
+instance ToHeader MetricStatistic
+
+instance ToJSON MetricStatistic where
+ toJSON = toJSONText
+
+instance FromJSON MetricStatistic where
+ parseJSON = parseJSONText "MetricStatistic"
+
+data MetricType
+ = DynamoDBReadCapacityUtilization
+ | DynamoDBWriteCapacityUtilization
+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)
+
+
+instance FromText MetricType where
+ parser = takeLowerText >>= \case
+ "dynamodbreadcapacityutilization" -> pure DynamoDBReadCapacityUtilization
+ "dynamodbwritecapacityutilization" -> pure DynamoDBWriteCapacityUtilization
+ e -> fromTextError $ "Failure parsing MetricType from value: '" <> e
+ <> "'. Accepted values: dynamodbreadcapacityutilization, dynamodbwritecapacityutilization"
+
+instance ToText MetricType where
+ toText = \case
+ DynamoDBReadCapacityUtilization -> "DynamoDBReadCapacityUtilization"
+ DynamoDBWriteCapacityUtilization -> "DynamoDBWriteCapacityUtilization"
+
+instance Hashable MetricType
+instance NFData MetricType
+instance ToByteString MetricType
+instance ToQuery MetricType
+instance ToHeader MetricType
+
+instance ToJSON MetricType where
+ toJSON = toJSONText
+
+instance FromJSON MetricType where
+ parseJSON = parseJSONText "MetricType"
+
+data PolicyType
+ = StepScaling
+ | TargetTrackingScaling
+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)
+
instance FromText PolicyType where
parser = takeLowerText >>= \case
"stepscaling" -> pure StepScaling
+ "targettrackingscaling" -> pure TargetTrackingScaling
e -> fromTextError $ "Failure parsing PolicyType from value: '" <> e
- <> "'. Accepted values: stepscaling"
+ <> "'. Accepted values: stepscaling, targettrackingscaling"
instance ToText PolicyType where
toText = \case
StepScaling -> "StepScaling"
+ TargetTrackingScaling -> "TargetTrackingScaling"
instance Hashable PolicyType
instance NFData PolicyType
@@ -110,21 +185,37 @@ instance FromJSON PolicyType where
parseJSON = parseJSONText "PolicyType"
data ScalableDimension
- = EC2SpotFleetRequestTargetCapacity
- | EcsServiceDesiredCount
- | ElasticmapreduceInstancegroupInstanceCount
- deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)
+ = AppstreamFleetDesiredCapacity
+ | DynamodbIndexReadCapacityUnits
+ | DynamodbIndexWriteCapacityUnits
+ | DynamodbTableReadCapacityUnits
+ | DynamodbTableWriteCapacityUnits
+ | EC2SpotFleetRequestTargetCapacity
+ | EcsServiceDesiredCount
+ | ElasticmapreduceInstancegroupInstanceCount
+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)
+
instance FromText ScalableDimension where
parser = takeLowerText >>= \case
+ "appstream:fleet:desiredcapacity" -> pure AppstreamFleetDesiredCapacity
+ "dynamodb:index:readcapacityunits" -> pure DynamodbIndexReadCapacityUnits
+ "dynamodb:index:writecapacityunits" -> pure DynamodbIndexWriteCapacityUnits
+ "dynamodb:table:readcapacityunits" -> pure DynamodbTableReadCapacityUnits
+ "dynamodb:table:writecapacityunits" -> pure DynamodbTableWriteCapacityUnits
"ec2:spot-fleet-request:targetcapacity" -> pure EC2SpotFleetRequestTargetCapacity
"ecs:service:desiredcount" -> pure EcsServiceDesiredCount
"elasticmapreduce:instancegroup:instancecount" -> pure ElasticmapreduceInstancegroupInstanceCount
e -> fromTextError $ "Failure parsing ScalableDimension from value: '" <> e
- <> "'. Accepted values: ec2:spot-fleet-request:targetcapacity, ecs:service:desiredcount, elasticmapreduce:instancegroup:instancecount"
+ <> "'. Accepted values: appstream:fleet:desiredcapacity, dynamodb:index:readcapacityunits, dynamodb:index:writecapacityunits, dynamodb:table:readcapacityunits, dynamodb:table:writecapacityunits, ec2:spot-fleet-request:targetcapacity, ecs:service:desiredcount, elasticmapreduce:instancegroup:instancecount"
instance ToText ScalableDimension where
toText = \case
+ AppstreamFleetDesiredCapacity -> "appstream:fleet:DesiredCapacity"
+ DynamodbIndexReadCapacityUnits -> "dynamodb:index:ReadCapacityUnits"
+ DynamodbIndexWriteCapacityUnits -> "dynamodb:index:WriteCapacityUnits"
+ DynamodbTableReadCapacityUnits -> "dynamodb:table:ReadCapacityUnits"
+ DynamodbTableWriteCapacityUnits -> "dynamodb:table:WriteCapacityUnits"
EC2SpotFleetRequestTargetCapacity -> "ec2:spot-fleet-request:TargetCapacity"
EcsServiceDesiredCount -> "ecs:service:DesiredCount"
ElasticmapreduceInstancegroupInstanceCount -> "elasticmapreduce:instancegroup:InstanceCount"
@@ -142,13 +233,14 @@ instance FromJSON ScalableDimension where
parseJSON = parseJSONText "ScalableDimension"
data ScalingActivityStatusCode
- = Failed
- | InProgress
- | Overridden
- | Pending
- | Successful
- | Unfulfilled
- deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)
+ = Failed
+ | InProgress
+ | Overridden
+ | Pending
+ | Successful
+ | Unfulfilled
+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)
+
instance FromText ScalingActivityStatusCode where
parser = takeLowerText >>= \case
@@ -180,21 +272,28 @@ instance FromJSON ScalingActivityStatusCode where
parseJSON = parseJSONText "ScalingActivityStatusCode"
data ServiceNamespace
- = EC2
- | Ecs
- | Elasticmapreduce
- deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)
+ = Appstream
+ | Dynamodb
+ | EC2
+ | Ecs
+ | Elasticmapreduce
+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)
+
instance FromText ServiceNamespace where
parser = takeLowerText >>= \case
+ "appstream" -> pure Appstream
+ "dynamodb" -> pure Dynamodb
"ec2" -> pure EC2
"ecs" -> pure Ecs
"elasticmapreduce" -> pure Elasticmapreduce
e -> fromTextError $ "Failure parsing ServiceNamespace from value: '" <> e
- <> "'. Accepted values: ec2, ecs, elasticmapreduce"
+ <> "'. Accepted values: appstream, dynamodb, ec2, ecs, elasticmapreduce"
instance ToText ServiceNamespace where
toText = \case
+ Appstream -> "appstream"
+ Dynamodb -> "dynamodb"
EC2 -> "ec2"
Ecs -> "ecs"
Elasticmapreduce -> "elasticmapreduce"
diff --git a/gen/Network/AWS/ApplicationAutoScaling/Waiters.hs b/gen/Network/AWS/ApplicationAutoScaling/Waiters.hs
index 61686b1..8f5b1c5 100644
--- a/gen/Network/AWS/ApplicationAutoScaling/Waiters.hs
+++ b/gen/Network/AWS/ApplicationAutoScaling/Waiters.hs
@@ -7,15 +7,15 @@
-- |
-- Module : Network.AWS.ApplicationAutoScaling.Waiters
--- Copyright : (c) 2013-2016 Brendan Hay
+-- Copyright : (c) 2013-2017 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
module Network.AWS.ApplicationAutoScaling.Waiters where
-import Network.AWS.ApplicationAutoScaling.Types
-import Network.AWS.Lens
-import Network.AWS.Prelude
-import Network.AWS.Waiter
+import Network.AWS.ApplicationAutoScaling.Types
+import Network.AWS.Lens
+import Network.AWS.Prelude
+import Network.AWS.Waiter
diff --git a/test/Main.hs b/test/Main.hs
index 8c5510d..bb64fd8 100644
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -2,9 +2,9 @@
-- |
-- Module : Main
--- Copyright : (c) 2013-2016 Brendan Hay
+-- Copyright : (c) 2013-2017 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
diff --git a/test/Test/AWS/Gen/ApplicationAutoScaling.hs b/test/Test/AWS/Gen/ApplicationAutoScaling.hs
index b3192e5..3f205c8 100644
--- a/test/Test/AWS/Gen/ApplicationAutoScaling.hs
+++ b/test/Test/AWS/Gen/ApplicationAutoScaling.hs
@@ -5,20 +5,20 @@
-- |
-- Module : Test.AWS.Gen.ApplicationAutoScaling
--- Copyright : (c) 2013-2016 Brendan Hay
+-- Copyright : (c) 2013-2017 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
--- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
module Test.AWS.Gen.ApplicationAutoScaling where
import Data.Proxy
+import Network.AWS.ApplicationAutoScaling
+import Test.AWS.ApplicationAutoScaling.Internal
import Test.AWS.Fixture
import Test.AWS.Prelude
import Test.Tasty
-import Network.AWS.ApplicationAutoScaling
-import Test.AWS.ApplicationAutoScaling.Internal
-- Auto-generated: the actual test selection needs to be manually placed into
-- the top-level so that real test data can be incrementally added.
@@ -40,6 +40,15 @@ import Test.AWS.ApplicationAutoScaling.Internal
-- , requestDescribeScalingPolicies $
-- describeScalingPolicies
--
+-- , requestPutScheduledAction $
+-- putScheduledAction
+--
+-- , requestDeleteScheduledAction $
+-- deleteScheduledAction
+--
+-- , requestDescribeScheduledActions $
+-- describeScheduledActions
+--
-- , requestDescribeScalableTargets $
-- describeScalableTargets
--
@@ -64,6 +73,15 @@ import Test.AWS.ApplicationAutoScaling.Internal
-- , responseDescribeScalingPolicies $
-- describeScalingPoliciesResponse
--
+-- , responsePutScheduledAction $
+-- putScheduledActionResponse
+--
+-- , responseDeleteScheduledAction $
+-- deleteScheduledActionResponse
+--
+-- , responseDescribeScheduledActions $
+-- describeScheduledActionsResponse
+--
-- , responseDescribeScalableTargets $
-- describeScalableTargetsResponse
--
@@ -98,6 +116,21 @@ requestDescribeScalingPolicies = req
"DescribeScalingPolicies"
"fixture/DescribeScalingPolicies.yaml"
+requestPutScheduledAction :: PutScheduledAction -> TestTree
+requestPutScheduledAction = req
+ "PutScheduledAction"
+ "fixture/PutScheduledAction.yaml"
+
+requestDeleteScheduledAction :: DeleteScheduledAction -> TestTree
+requestDeleteScheduledAction = req
+ "DeleteScheduledAction"
+ "fixture/DeleteScheduledAction.yaml"
+
+requestDescribeScheduledActions :: DescribeScheduledActions -> TestTree
+requestDescribeScheduledActions = req
+ "DescribeScheduledActions"
+ "fixture/DescribeScheduledActions.yaml"
+
requestDescribeScalableTargets :: DescribeScalableTargets -> TestTree
requestDescribeScalableTargets = req
"DescribeScalableTargets"
@@ -143,6 +176,27 @@ responseDescribeScalingPolicies = res
applicationAutoScaling
(Proxy :: Proxy DescribeScalingPolicies)
+responsePutScheduledAction :: PutScheduledActionResponse -> TestTree
+responsePutScheduledAction = res
+ "PutScheduledActionResponse"
+ "fixture/PutScheduledActionResponse.proto"
+ applicationAutoScaling
+ (Proxy :: Proxy PutScheduledAction)
+
+responseDeleteScheduledAction :: DeleteScheduledActionResponse -> TestTree
+responseDeleteScheduledAction = res
+ "DeleteScheduledActionResponse"
+ "fixture/DeleteScheduledActionResponse.proto"
+ applicationAutoScaling
+ (Proxy :: Proxy DeleteScheduledAction)
+
+responseDescribeScheduledActions :: DescribeScheduledActionsResponse -> TestTree
+responseDescribeScheduledActions = res
+ "DescribeScheduledActionsResponse"
+ "fixture/DescribeScheduledActionsResponse.proto"
+ applicationAutoScaling
+ (Proxy :: Proxy DescribeScheduledActions)
+
responseDescribeScalableTargets :: DescribeScalableTargetsResponse -> TestTree
responseDescribeScalableTargets = res
"DescribeScalableTargetsResponse"