amazonka-application-autoscaling (empty) → 1.4.2
raw patch · 34 files changed
+3457/−0 lines, 34 filesdep +amazonka-application-autoscalingdep +amazonka-coredep +amazonka-testsetup-changed
Dependencies added: amazonka-application-autoscaling, amazonka-core, amazonka-test, base, bytestring, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +58/−0
- Setup.hs +2/−0
- amazonka-application-autoscaling.cabal +104/−0
- fixture/DeleteScalingPolicy.yaml +0/−0
- fixture/DeleteScalingPolicyResponse.proto +0/−0
- fixture/DeregisterScalableTarget.yaml +0/−0
- fixture/DeregisterScalableTargetResponse.proto +0/−0
- fixture/DescribeScalableTargets.yaml +0/−0
- fixture/DescribeScalableTargetsResponse.proto +0/−0
- fixture/DescribeScalingActivities.yaml +0/−0
- fixture/DescribeScalingActivitiesResponse.proto +0/−0
- fixture/DescribeScalingPolicies.yaml +0/−0
- fixture/DescribeScalingPoliciesResponse.proto +0/−0
- fixture/PutScalingPolicy.yaml +0/−0
- fixture/PutScalingPolicyResponse.proto +0/−0
- fixture/RegisterScalableTarget.yaml +0/−0
- fixture/RegisterScalableTargetResponse.proto +0/−0
- gen/Network/AWS/ApplicationAutoScaling.hs +208/−0
- gen/Network/AWS/ApplicationAutoScaling/DeleteScalingPolicy.hs +174/−0
- gen/Network/AWS/ApplicationAutoScaling/DeregisterScalableTarget.hs +161/−0
- gen/Network/AWS/ApplicationAutoScaling/DescribeScalableTargets.hs +217/−0
- gen/Network/AWS/ApplicationAutoScaling/DescribeScalingActivities.hs +218/−0
- gen/Network/AWS/ApplicationAutoScaling/DescribeScalingPolicies.hs +227/−0
- gen/Network/AWS/ApplicationAutoScaling/PutScalingPolicy.hs +215/−0
- gen/Network/AWS/ApplicationAutoScaling/RegisterScalableTarget.hs +207/−0
- gen/Network/AWS/ApplicationAutoScaling/Types.hs +195/−0
- gen/Network/AWS/ApplicationAutoScaling/Types/Product.hs +653/−0
- gen/Network/AWS/ApplicationAutoScaling/Types/Sum.hs +200/−0
- gen/Network/AWS/ApplicationAutoScaling/Waiters.hs +21/−0
- test/Main.hs +21/−0
- test/Test/AWS/ApplicationAutoScaling.hs +27/−0
- test/Test/AWS/ApplicationAutoScaling/Internal.hs +17/−0
- test/Test/AWS/Gen/ApplicationAutoScaling.hs +165/−0
+ LICENSE view
@@ -0,0 +1,367 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+ means each individual or legal entity that creates, contributes to+ the creation of, or owns Covered Software.++1.2. "Contributor Version"+ means the combination of the Contributions of others (if any) used+ by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+ means Covered Software of a particular Contributor.++1.4. "Covered Software"+ means Source Code Form to which the initial Contributor has attached+ the notice in Exhibit A, the Executable Form of such Source Code+ Form, and Modifications of such Source Code Form, in each case+ including portions thereof.++1.5. "Incompatible With Secondary Licenses"+ means++ (a) that the initial Contributor has attached the notice described+ in Exhibit B to the Covered Software; or++ (b) that the Covered Software was made available under the terms of+ version 1.1 or earlier of the License, but not also under the+ terms of a Secondary License.++1.6. "Executable Form"+ means any form of the work other than Source Code Form.++1.7. "Larger Work"+ means a work that combines Covered Software with other material, in+ a separate file or files, that is not Covered Software.++1.8. "License"+ means this document.++1.9. "Licensable"+ means having the right to grant, to the maximum extent possible,+ whether at the time of the initial grant or subsequently, any and+ all of the rights conveyed by this License.++1.10. "Modifications"+ means any of the following:++ (a) any file in Source Code Form that results from an addition to,+ deletion from, or modification of the contents of Covered+ Software; or++ (b) any new file in Source Code Form that contains any Covered+ Software.++1.11. "Patent Claims" of a Contributor+ means any patent claim(s), including without limitation, method,+ process, and apparatus claims, in any patent Licensable by such+ Contributor that would be infringed, but for the grant of the+ License, by the making, using, selling, offering for sale, having+ made, import, or transfer of either its Contributions or its+ Contributor Version.++1.12. "Secondary License"+ means either the GNU General Public License, Version 2.0, the GNU+ Lesser General Public License, Version 2.1, the GNU Affero General+ Public License, Version 3.0, or any later versions of those+ licenses.++1.13. "Source Code Form"+ means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+ means an individual or a legal entity exercising rights under this+ License. For legal entities, "You" includes any entity that+ controls, is controlled by, or is under common control with You. For+ purposes of this definition, "control" means (a) the power, direct+ or indirect, to cause the direction or management of such entity,+ whether by contract or otherwise, or (b) ownership of more than+ fifty percent (50%) of the outstanding shares or beneficial+ ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+ Licensable by such Contributor to use, reproduce, make available,+ modify, display, perform, distribute, and otherwise exploit its+ Contributions, either on an unmodified basis, with Modifications, or+ as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+ for sale, have made, import, and otherwise transfer either its+ Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+ or++(b) for infringements caused by: (i) Your and any other third party's+ modifications of Covered Software, or (ii) the combination of its+ Contributions with other software (except as part of its Contributor+ Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+ its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+ Form, as described in Section 3.1, and You must inform recipients of+ the Executable Form how they can obtain a copy of such Source Code+ Form by reasonable means in a timely manner, at a charge no more+ than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+ License, or sublicense it under different terms, provided that the+ license for the Executable Form does not attempt to limit or alter+ the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+* *+* 6. Disclaimer of Warranty *+* ------------------------- *+* *+* Covered Software is provided under this License on an "as is" *+* basis, without warranty of any kind, either expressed, implied, or *+* statutory, including, without limitation, warranties that the *+* Covered Software is free of defects, merchantable, fit for a *+* particular purpose or non-infringing. The entire risk as to the *+* quality and performance of the Covered Software is with You. *+* Should any Covered Software prove defective in any respect, You *+* (not any Contributor) assume the cost of any necessary servicing, *+* repair, or correction. This disclaimer of warranty constitutes an *+* essential part of this License. No use of any Covered Software is *+* authorized under this License except under this disclaimer. *+* *+************************************************************************++************************************************************************+* *+* 7. Limitation of Liability *+* -------------------------- *+* *+* Under no circumstances and under no legal theory, whether tort *+* (including negligence), contract, or otherwise, shall any *+* Contributor, or anyone who distributes Covered Software as *+* permitted above, be liable to You for any direct, indirect, *+* special, incidental, or consequential damages of any character *+* including, without limitation, damages for lost profits, loss of *+* goodwill, work stoppage, computer failure or malfunction, or any *+* and all other commercial damages or losses, even if such party *+* shall have been informed of the possibility of such damages. This *+* limitation of liability shall not apply to liability for death or *+* personal injury resulting from such party's negligence to the *+* extent applicable law prohibits such limitation. Some *+* jurisdictions do not allow the exclusion or limitation of *+* incidental or consequential damages, so this exclusion and *+* limitation may not apply to You. *+* *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++ This Source Code Form is subject to the terms of the Mozilla Public+ License, v. 2.0. If a copy of the MPL was not distributed with this+ file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.
+ README.md view
@@ -0,0 +1,58 @@+# Amazon Application Auto Scaling SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`1.4.2`+++## Description++Application Auto Scaling is a general purpose Auto Scaling service for+supported elastic AWS resources. With Application Auto Scaling, you can+automatically scale your AWS resources, with an experience similar to+that of Auto Scaling.++At this time, Application Auto Scaling only supports scaling Amazon ECS+services.++For example, you can use Application Auto Scaling to accomplish the+following tasks:++- Define scaling policies for automatically adjusting your+ application’s resources++- Scale your resources in response to CloudWatch alarms++- View history of your scaling events++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-application-autoscaling)+and the [AWS API Reference](https://aws.amazon.com/documentation/).++The types from this library are intended to be used with [amazonka](http://hackage.haskell.org/package/amazonka),+which provides mechanisms for specifying AuthN/AuthZ information and sending requests.++Use of lenses is required for constructing and manipulating types.+This is due to the amount of nesting of AWS types and transparency regarding+de/serialisation into more palatable Haskell values.+The provided lenses should be compatible with any of the major lens libraries+[lens](http://hackage.haskell.org/package/lens) or [lens-family-core](http://hackage.haskell.org/package/lens-family-core).++## Contribute++For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues).++> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information.+++## Licence++`amazonka-application-autoscaling` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).++Parts of the code are derived from AWS service descriptions, licensed under Apache 2.0.+Source files subject to this contain an additional licensing clause in their header.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ amazonka-application-autoscaling.cabal view
@@ -0,0 +1,104 @@+name: amazonka-application-autoscaling+version: 1.4.2+synopsis: Amazon Application Auto Scaling SDK.+homepage: https://github.com/brendanhay/amazonka+bug-reports: https://github.com/brendanhay/amazonka/issues+license: OtherLicense+license-file: LICENSE+author: Brendan Hay+maintainer: Brendan Hay <brendan.g.hay@gmail.com>+copyright: Copyright (c) 2013-2016 Brendan Hay+category: Network, AWS, Cloud, Distributed Computing+build-type: Simple+cabal-version: >= 1.10+extra-source-files: README.md fixture/*.yaml fixture/*.proto+description:+ Application Auto Scaling is a general purpose Auto Scaling service for+ supported elastic AWS resources. With Application Auto Scaling, you can+ automatically scale your AWS resources, with an experience similar to+ that of Auto Scaling.++ At this time, Application Auto Scaling only supports scaling Amazon ECS+ services.++ For example, you can use Application Auto Scaling to accomplish the+ following tasks:++ - Define scaling policies for automatically adjusting your+ application’s resources++ - Scale your resources in response to CloudWatch alarms++ - View history of your scaling events+ .+ The types from this library are intended to be used with+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides+ mechanisms for specifying AuthN/AuthZ information and sending requests.+ .+ Use of lenses is required for constructing and manipulating types.+ This is due to the amount of nesting of AWS types and transparency regarding+ de/serialisation into more palatable Haskell values.+ The provided lenses should be compatible with any of the major lens libraries+ such as <http://hackage.haskell.org/package/lens lens> or+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.+ .+ See "Network.AWS.ApplicationAutoScaling" or <https://aws.amazon.com/documentation/ the AWS Documentation>+ to get started.++source-repository head+ type: git+ location: git://github.com/brendanhay/amazonka.git++library+ default-language: Haskell2010+ hs-source-dirs: src gen++ ghc-options: -Wall++ exposed-modules:+ Network.AWS.ApplicationAutoScaling+ , Network.AWS.ApplicationAutoScaling.DeleteScalingPolicy+ , Network.AWS.ApplicationAutoScaling.DeregisterScalableTarget+ , Network.AWS.ApplicationAutoScaling.DescribeScalableTargets+ , Network.AWS.ApplicationAutoScaling.DescribeScalingActivities+ , Network.AWS.ApplicationAutoScaling.DescribeScalingPolicies+ , Network.AWS.ApplicationAutoScaling.PutScalingPolicy+ , Network.AWS.ApplicationAutoScaling.RegisterScalableTarget+ , Network.AWS.ApplicationAutoScaling.Types+ , Network.AWS.ApplicationAutoScaling.Waiters++ other-modules:+ Network.AWS.ApplicationAutoScaling.Types.Product+ , Network.AWS.ApplicationAutoScaling.Types.Sum++ build-depends:+ amazonka-core == 1.4.2.*+ , base >= 4.7 && < 5++test-suite amazonka-application-autoscaling-test+ type: exitcode-stdio-1.0+ default-language: Haskell2010+ hs-source-dirs: test+ main-is: Main.hs++ ghc-options: -Wall -threaded++ -- This section is encoded by the template and any modules added by+ -- hand outside these namespaces will not correctly be added to the+ -- distribution package.+ other-modules:+ Test.AWS.ApplicationAutoScaling+ , Test.AWS.Gen.ApplicationAutoScaling+ , Test.AWS.ApplicationAutoScaling.Internal++ build-depends:+ amazonka-core == 1.4.2.*+ , amazonka-test == 1.4.2.*+ , amazonka-application-autoscaling == 1.4.2.*+ , base+ , bytestring+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/DeleteScalingPolicy.yaml view
+ fixture/DeleteScalingPolicyResponse.proto view
+ fixture/DeregisterScalableTarget.yaml view
+ fixture/DeregisterScalableTargetResponse.proto view
+ fixture/DescribeScalableTargets.yaml view
+ fixture/DescribeScalableTargetsResponse.proto view
+ fixture/DescribeScalingActivities.yaml view
+ fixture/DescribeScalingActivitiesResponse.proto view
+ fixture/DescribeScalingPolicies.yaml view
+ fixture/DescribeScalingPoliciesResponse.proto view
+ fixture/PutScalingPolicy.yaml view
+ fixture/PutScalingPolicyResponse.proto view
+ fixture/RegisterScalableTarget.yaml view
+ fixture/RegisterScalableTargetResponse.proto view
+ gen/Network/AWS/ApplicationAutoScaling.hs view
@@ -0,0 +1,208 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.ApplicationAutoScaling+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Application Auto Scaling is a general purpose Auto Scaling service for+-- supported elastic AWS resources. With Application Auto Scaling, you can+-- automatically scale your AWS resources, with an experience similar to+-- that of Auto Scaling.+--+-- At this time, Application Auto Scaling only supports scaling Amazon ECS+-- services.+--+-- For example, you can use Application Auto Scaling to accomplish the+-- following tasks:+--+-- - Define scaling policies for automatically adjusting your+-- application’s resources+--+-- - Scale your resources in response to CloudWatch alarms+--+-- - View history of your scaling events+--+module Network.AWS.ApplicationAutoScaling+ (+ -- * Service Configuration+ applicationAutoScaling++ -- * Errors+ -- $errors++ -- ** ValidationException+ , _ValidationException++ -- ** FailedResourceAccessException+ , _FailedResourceAccessException++ -- ** InvalidNextTokenException+ , _InvalidNextTokenException++ -- ** ConcurrentUpdateException+ , _ConcurrentUpdateException++ -- ** InternalServiceException+ , _InternalServiceException++ -- ** ObjectNotFoundException+ , _ObjectNotFoundException++ -- ** LimitExceededException+ , _LimitExceededException++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** DeleteScalingPolicy+ , module Network.AWS.ApplicationAutoScaling.DeleteScalingPolicy++ -- ** PutScalingPolicy+ , module Network.AWS.ApplicationAutoScaling.PutScalingPolicy++ -- ** RegisterScalableTarget+ , module Network.AWS.ApplicationAutoScaling.RegisterScalableTarget++ -- ** DescribeScalingPolicies+ , module Network.AWS.ApplicationAutoScaling.DescribeScalingPolicies++ -- ** DescribeScalableTargets+ , module Network.AWS.ApplicationAutoScaling.DescribeScalableTargets++ -- ** DescribeScalingActivities+ , module Network.AWS.ApplicationAutoScaling.DescribeScalingActivities++ -- ** DeregisterScalableTarget+ , module Network.AWS.ApplicationAutoScaling.DeregisterScalableTarget++ -- * Types++ -- ** AdjustmentType+ , AdjustmentType (..)++ -- ** MetricAggregationType+ , MetricAggregationType (..)++ -- ** PolicyType+ , PolicyType (..)++ -- ** ScalableDimension+ , ScalableDimension (..)++ -- ** ScalingActivityStatusCode+ , ScalingActivityStatusCode (..)++ -- ** ServiceNamespace+ , ServiceNamespace (..)++ -- ** Alarm+ , Alarm+ , alarm+ , aAlarmName+ , aAlarmARN++ -- ** ScalableTarget+ , ScalableTarget+ , scalableTarget+ , stServiceNamespace+ , stResourceId+ , stScalableDimension+ , stMinCapacity+ , stMaxCapacity+ , stRoleARN+ , stCreationTime++ -- ** ScalingActivity+ , ScalingActivity+ , scalingActivity+ , saStatusMessage+ , saEndTime+ , saDetails+ , saActivityId+ , saServiceNamespace+ , saResourceId+ , saScalableDimension+ , saDescription+ , saCause+ , saStartTime+ , saStatusCode++ -- ** ScalingPolicy+ , ScalingPolicy+ , scalingPolicy+ , spStepScalingPolicyConfiguration+ , spAlarms+ , spPolicyARN+ , spPolicyName+ , spServiceNamespace+ , spResourceId+ , spScalableDimension+ , spPolicyType+ , spCreationTime++ -- ** StepAdjustment+ , StepAdjustment+ , stepAdjustment+ , saMetricIntervalLowerBound+ , saMetricIntervalUpperBound+ , saScalingAdjustment++ -- ** StepScalingPolicyConfiguration+ , StepScalingPolicyConfiguration+ , stepScalingPolicyConfiguration+ , sspcStepAdjustments+ , sspcAdjustmentType+ , sspcCooldown+ , sspcMetricAggregationType+ , sspcMinAdjustmentMagnitude+ ) 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++{- $errors+Error matchers are designed for use with the functions provided by+<http://hackage.haskell.org/package/lens/docs/Control-Exception-Lens.html Control.Exception.Lens>.+This allows catching (and rethrowing) service specific errors returned+by 'ApplicationAutoScaling'.+-}++{- $operations+Some AWS operations return results that are incomplete and require subsequent+requests in order to obtain the entire result set. The process of sending+subsequent requests to continue where a previous request left off is called+pagination. For example, the 'ListObjects' operation of Amazon S3 returns up to+1000 objects at a time, and you must send subsequent requests with the+appropriate Marker in order to retrieve the next page of results.++Operations that have an 'AWSPager' instance can transparently perform subsequent+requests, correctly setting Markers and other request facets to iterate through+the entire result set of a truncated API operation. Operations which support+this have an additional note in the documentation.++Many operations have the ability to filter results on the server side. See the+individual operation parameters for details.+-}++{- $waiters+Waiters poll by repeatedly sending a request until some remote success condition+configured by the 'Wait' specification is fulfilled. The 'Wait' specification+determines how many attempts should be made, in addition to delay and retry strategies.+-}
+ gen/Network/AWS/ApplicationAutoScaling/DeleteScalingPolicy.hs view
@@ -0,0 +1,174 @@+{-# 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.DeleteScalingPolicy+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes an Application Auto Scaling scaling policy that was previously+-- created. If you are no longer using a scaling policy, you can delete it+-- with this operation.+--+-- Deleting a policy deletes the underlying alarm action, but does not+-- delete the CloudWatch alarm, even if it no longer has an associated+-- action.+--+-- To create a new scaling policy or update an existing one, see+-- < PutScalingPolicy>.+module Network.AWS.ApplicationAutoScaling.DeleteScalingPolicy+ (+ -- * Creating a Request+ deleteScalingPolicy+ , DeleteScalingPolicy+ -- * Request Lenses+ , dspPolicyName+ , dspServiceNamespace+ , dspResourceId+ , dspScalableDimension++ -- * Destructuring the Response+ , deleteScalingPolicyResponse+ , DeleteScalingPolicyResponse+ -- * Response Lenses+ , 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++-- | /See:/ 'deleteScalingPolicy' smart constructor.+data DeleteScalingPolicy = DeleteScalingPolicy'+ { _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.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dspPolicyName'+--+-- * 'dspServiceNamespace'+--+-- * 'dspResourceId'+--+-- * 'dspScalableDimension'+deleteScalingPolicy+ :: Text -- ^ 'dspPolicyName'+ -> ServiceNamespace -- ^ 'dspServiceNamespace'+ -> Text -- ^ 'dspResourceId'+ -> ScalableDimension -- ^ 'dspScalableDimension'+ -> DeleteScalingPolicy+deleteScalingPolicy pPolicyName_ pServiceNamespace_ pResourceId_ pScalableDimension_ =+ DeleteScalingPolicy'+ { _dspPolicyName = pPolicyName_+ , _dspServiceNamespace = pServiceNamespace_+ , _dspResourceId = pResourceId_+ , _dspScalableDimension = pScalableDimension_+ }++-- | The name of the scaling policy to delete.+dspPolicyName :: Lens' DeleteScalingPolicy Text+dspPolicyName = lens _dspPolicyName (\ s a -> s{_dspPolicyName = a});++-- | The namespace for the AWS service that the scaling policy is associated+-- with. 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.+dspServiceNamespace :: Lens' DeleteScalingPolicy ServiceNamespace+dspServiceNamespace = lens _dspServiceNamespace (\ s a -> s{_dspServiceNamespace = a});++-- | The unique identifier string for the resource associated with the+-- scaling policy. For Amazon ECS services, this value is the resource+-- type, followed by the cluster name and service name, such as+-- 'service\/default\/sample-webapp'.+dspResourceId :: Lens' DeleteScalingPolicy Text+dspResourceId = lens _dspResourceId (\ s a -> s{_dspResourceId = a});++-- | The scalable dimension associated with the scaling policy. The scalable+-- dimension contains the service namespace, resource type, and scaling+-- property, such as 'ecs:service:DesiredCount' for the desired task count+-- of an Amazon ECS service.+dspScalableDimension :: Lens' DeleteScalingPolicy ScalableDimension+dspScalableDimension = lens _dspScalableDimension (\ s a -> s{_dspScalableDimension = a});++instance AWSRequest DeleteScalingPolicy where+ type Rs DeleteScalingPolicy =+ DeleteScalingPolicyResponse+ request = postJSON applicationAutoScaling+ response+ = receiveEmpty+ (\ s h x ->+ DeleteScalingPolicyResponse' <$> (pure (fromEnum s)))++instance Hashable DeleteScalingPolicy++instance NFData DeleteScalingPolicy++instance ToHeaders DeleteScalingPolicy where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AnyScaleFrontendService.DeleteScalingPolicy" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteScalingPolicy where+ toJSON DeleteScalingPolicy'{..}+ = object+ (catMaybes+ [Just ("PolicyName" .= _dspPolicyName),+ Just ("ServiceNamespace" .= _dspServiceNamespace),+ Just ("ResourceId" .= _dspResourceId),+ Just ("ScalableDimension" .= _dspScalableDimension)])++instance ToPath DeleteScalingPolicy where+ toPath = const "/"++instance ToQuery DeleteScalingPolicy where+ toQuery = const mempty++-- | /See:/ 'deleteScalingPolicyResponse' smart constructor.+newtype DeleteScalingPolicyResponse = DeleteScalingPolicyResponse'+ { _dsprsResponseStatus :: Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeleteScalingPolicyResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dsprsResponseStatus'+deleteScalingPolicyResponse+ :: Int -- ^ 'dsprsResponseStatus'+ -> DeleteScalingPolicyResponse+deleteScalingPolicyResponse pResponseStatus_ =+ DeleteScalingPolicyResponse'+ { _dsprsResponseStatus = pResponseStatus_+ }++-- | The response status code.+dsprsResponseStatus :: Lens' DeleteScalingPolicyResponse Int+dsprsResponseStatus = lens _dsprsResponseStatus (\ s a -> s{_dsprsResponseStatus = a});++instance NFData DeleteScalingPolicyResponse
+ gen/Network/AWS/ApplicationAutoScaling/DeregisterScalableTarget.hs view
@@ -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.DeregisterScalableTarget+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deregisters a scalable target that was previously registered. If you are+-- no longer using a scalable target, you can delete it with this+-- operation. When you deregister a scalable target, all of the scaling+-- policies that are associated with that scalable target are deleted.+--+-- To create a new scalable target or update an existing one, see+-- < RegisterScalableTarget>.+module Network.AWS.ApplicationAutoScaling.DeregisterScalableTarget+ (+ -- * Creating a Request+ deregisterScalableTarget+ , DeregisterScalableTarget+ -- * Request Lenses+ , derServiceNamespace+ , derResourceId+ , derScalableDimension++ -- * Destructuring the Response+ , deregisterScalableTargetResponse+ , DeregisterScalableTargetResponse+ -- * Response Lenses+ , 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++-- | /See:/ 'deregisterScalableTarget' smart constructor.+data DeregisterScalableTarget = DeregisterScalableTarget'+ { _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.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'derServiceNamespace'+--+-- * 'derResourceId'+--+-- * 'derScalableDimension'+deregisterScalableTarget+ :: ServiceNamespace -- ^ 'derServiceNamespace'+ -> Text -- ^ 'derResourceId'+ -> ScalableDimension -- ^ 'derScalableDimension'+ -> DeregisterScalableTarget+deregisterScalableTarget pServiceNamespace_ pResourceId_ pScalableDimension_ =+ DeregisterScalableTarget'+ { _derServiceNamespace = pServiceNamespace_+ , _derResourceId = pResourceId_+ , _derScalableDimension = pScalableDimension_+ }++-- | The namespace for the AWS service that the scalable target is associated+-- with. 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 unique identifier string for the resource associated with the+-- scalable target. For Amazon ECS services, this value is the resource+-- type, followed by the cluster name and service name, such as+-- 'service\/default\/sample-webapp'.+derResourceId :: Lens' DeregisterScalableTarget Text+derResourceId = lens _derResourceId (\ s a -> s{_derResourceId = a});++-- | The scalable dimension associated with the scalable target. The scalable+-- dimension contains the service namespace, resource type, and scaling+-- property, such as 'ecs:service:DesiredCount' for the desired task count+-- of an Amazon ECS service.+derScalableDimension :: Lens' DeregisterScalableTarget ScalableDimension+derScalableDimension = lens _derScalableDimension (\ s a -> s{_derScalableDimension = a});++instance AWSRequest DeregisterScalableTarget where+ type Rs DeregisterScalableTarget =+ DeregisterScalableTargetResponse+ request = postJSON applicationAutoScaling+ response+ = receiveEmpty+ (\ s h x ->+ DeregisterScalableTargetResponse' <$>+ (pure (fromEnum s)))++instance Hashable DeregisterScalableTarget++instance NFData DeregisterScalableTarget++instance ToHeaders DeregisterScalableTarget where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AnyScaleFrontendService.DeregisterScalableTarget"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeregisterScalableTarget where+ toJSON DeregisterScalableTarget'{..}+ = object+ (catMaybes+ [Just ("ServiceNamespace" .= _derServiceNamespace),+ Just ("ResourceId" .= _derResourceId),+ Just ("ScalableDimension" .= _derScalableDimension)])++instance ToPath DeregisterScalableTarget where+ toPath = const "/"++instance ToQuery DeregisterScalableTarget where+ toQuery = const mempty++-- | /See:/ 'deregisterScalableTargetResponse' smart constructor.+newtype DeregisterScalableTargetResponse = DeregisterScalableTargetResponse'+ { _dstrsResponseStatus :: Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeregisterScalableTargetResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dstrsResponseStatus'+deregisterScalableTargetResponse+ :: Int -- ^ 'dstrsResponseStatus'+ -> DeregisterScalableTargetResponse+deregisterScalableTargetResponse pResponseStatus_ =+ DeregisterScalableTargetResponse'+ { _dstrsResponseStatus = pResponseStatus_+ }++-- | The response status code.+dstrsResponseStatus :: Lens' DeregisterScalableTargetResponse Int+dstrsResponseStatus = lens _dstrsResponseStatus (\ s a -> s{_dstrsResponseStatus = a});++instance NFData DeregisterScalableTargetResponse
+ gen/Network/AWS/ApplicationAutoScaling/DescribeScalableTargets.hs view
@@ -0,0 +1,217 @@+{-# 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.DescribeScalableTargets+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Provides descriptive information for scalable targets with a specified+-- service namespace.+--+-- You can filter the results in a service namespace with the 'ResourceIds'+-- and 'ScalableDimension' parameters.+--+-- To create a new scalable target or update an existing one, see+-- < RegisterScalableTarget>. If you are no longer using a scalable target,+-- you can deregister it with < DeregisterScalableTarget>.+module Network.AWS.ApplicationAutoScaling.DescribeScalableTargets+ (+ -- * Creating a Request+ describeScalableTargets+ , DescribeScalableTargets+ -- * Request Lenses+ , dstResourceIds+ , dstScalableDimension+ , dstNextToken+ , dstMaxResults+ , dstServiceNamespace++ -- * Destructuring the Response+ , describeScalableTargetsResponse+ , DescribeScalableTargetsResponse+ -- * Response Lenses+ , dstsrsNextToken+ , dstsrsScalableTargets+ , dstsrsResponseStatus+ ) 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:/ '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)++-- | 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'+--+-- * 'dstScalableDimension'+--+-- * 'dstNextToken'+--+-- * 'dstMaxResults'+--+-- * 'dstServiceNamespace'+describeScalableTargets+ :: ServiceNamespace -- ^ 'dstServiceNamespace'+ -> DescribeScalableTargets+describeScalableTargets pServiceNamespace_ =+ DescribeScalableTargets'+ { _dstResourceIds = Nothing+ , _dstScalableDimension = Nothing+ , _dstNextToken = Nothing+ , _dstMaxResults = Nothing+ , _dstServiceNamespace = pServiceNamespace_+ }++-- | The unique identifier string for the resource associated with the+-- scalable target. For Amazon ECS services, this value is the resource+-- type, followed by the cluster name and service name, such as+-- 'service\/default\/sample-webapp'. If you specify a scalable dimension,+-- you must also specify a resource ID.+dstResourceIds :: Lens' DescribeScalableTargets [Text]+dstResourceIds = lens _dstResourceIds (\ s a -> s{_dstResourceIds = a}) . _Default . _Coerce;++-- | The scalable dimension associated with the scalable target. The scalable+-- dimension contains the service namespace, resource type, and scaling+-- property, such as 'ecs:service:DesiredCount' for the desired task count+-- of an Amazon ECS service. If you specify a scalable dimension, you must+-- also specify a resource ID.+dstScalableDimension :: Lens' DescribeScalableTargets (Maybe ScalableDimension)+dstScalableDimension = lens _dstScalableDimension (\ s a -> s{_dstScalableDimension = a});++-- | The 'NextToken' value returned from a previous paginated+-- 'DescribeScalableTargets' request. Pagination continues from the end of+-- the previous results that returned the 'NextToken' value. This value is+-- 'null' when there are no more results to return.+dstNextToken :: Lens' DescribeScalableTargets (Maybe Text)+dstNextToken = lens _dstNextToken (\ s a -> s{_dstNextToken = a});++-- | The maximum number of scalable target results returned by+-- 'DescribeScalableTargets' in paginated output. When this parameter is+-- used, 'DescribeScalableTargets' returns up to 'MaxResults' results in a+-- single page along with a 'NextToken' response element. The remaining+-- results of the initial request can be seen by sending another+-- 'DescribeScalableTargets' request with the returned 'NextToken' value.+-- This value can be between 1 and 50. If this parameter is not used, then+-- 'DescribeScalableTargets' returns up to 50 results and a 'NextToken'+-- value, if applicable.+dstMaxResults :: Lens' DescribeScalableTargets (Maybe Int)+dstMaxResults = lens _dstMaxResults (\ s a -> s{_dstMaxResults = a});++-- | The namespace for the AWS service that the scalable target is associated+-- with. 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.+dstServiceNamespace :: Lens' DescribeScalableTargets ServiceNamespace+dstServiceNamespace = lens _dstServiceNamespace (\ s a -> s{_dstServiceNamespace = a});++instance AWSRequest DescribeScalableTargets where+ type Rs DescribeScalableTargets =+ DescribeScalableTargetsResponse+ request = postJSON applicationAutoScaling+ response+ = receiveJSON+ (\ s h x ->+ DescribeScalableTargetsResponse' <$>+ (x .?> "NextToken") <*>+ (x .?> "ScalableTargets" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable DescribeScalableTargets++instance NFData DescribeScalableTargets++instance ToHeaders DescribeScalableTargets where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AnyScaleFrontendService.DescribeScalableTargets" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeScalableTargets where+ toJSON DescribeScalableTargets'{..}+ = object+ (catMaybes+ [("ResourceIds" .=) <$> _dstResourceIds,+ ("ScalableDimension" .=) <$> _dstScalableDimension,+ ("NextToken" .=) <$> _dstNextToken,+ ("MaxResults" .=) <$> _dstMaxResults,+ Just ("ServiceNamespace" .= _dstServiceNamespace)])++instance ToPath DescribeScalableTargets where+ toPath = const "/"++instance ToQuery DescribeScalableTargets where+ toQuery = const mempty++-- | /See:/ 'describeScalableTargetsResponse' smart constructor.+data DescribeScalableTargetsResponse = DescribeScalableTargetsResponse'+ { _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.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dstsrsNextToken'+--+-- * 'dstsrsScalableTargets'+--+-- * 'dstsrsResponseStatus'+describeScalableTargetsResponse+ :: Int -- ^ 'dstsrsResponseStatus'+ -> DescribeScalableTargetsResponse+describeScalableTargetsResponse pResponseStatus_ =+ DescribeScalableTargetsResponse'+ { _dstsrsNextToken = Nothing+ , _dstsrsScalableTargets = Nothing+ , _dstsrsResponseStatus = pResponseStatus_+ }++-- | The 'NextToken' value to include in a future 'DescribeScalableTargets'+-- request. When the results of a 'DescribeScalableTargets' request exceed+-- 'MaxResults', this value can be used to retrieve the next page of+-- results. This value is 'null' when there are no more results to return.+dstsrsNextToken :: Lens' DescribeScalableTargetsResponse (Maybe Text)+dstsrsNextToken = lens _dstsrsNextToken (\ s a -> s{_dstsrsNextToken = a});++-- | The list of scalable targets that matches the request parameters.+dstsrsScalableTargets :: Lens' DescribeScalableTargetsResponse [ScalableTarget]+dstsrsScalableTargets = lens _dstsrsScalableTargets (\ s a -> s{_dstsrsScalableTargets = a}) . _Default . _Coerce;++-- | The response status code.+dstsrsResponseStatus :: Lens' DescribeScalableTargetsResponse Int+dstsrsResponseStatus = lens _dstsrsResponseStatus (\ s a -> s{_dstsrsResponseStatus = a});++instance NFData DescribeScalableTargetsResponse
+ gen/Network/AWS/ApplicationAutoScaling/DescribeScalingActivities.hs view
@@ -0,0 +1,218 @@+{-# 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.DescribeScalingActivities+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Provides descriptive information for scaling activities with a specified+-- service namespace.+--+-- You can filter the results in a service namespace with the 'ResourceId'+-- and 'ScalableDimension' parameters.+--+-- Scaling activities are triggered by CloudWatch alarms that are+-- associated with scaling policies. To view the existing scaling policies+-- for a service namespace, see < DescribeScalingPolicies>. To create a new+-- scaling policy or update an existing one, see < PutScalingPolicy>.+module Network.AWS.ApplicationAutoScaling.DescribeScalingActivities+ (+ -- * Creating a Request+ describeScalingActivities+ , DescribeScalingActivities+ -- * Request Lenses+ , dsaScalableDimension+ , dsaResourceId+ , dsaNextToken+ , dsaMaxResults+ , dsaServiceNamespace++ -- * Destructuring the Response+ , describeScalingActivitiesResponse+ , DescribeScalingActivitiesResponse+ -- * Response Lenses+ , dsarsScalingActivities+ , dsarsNextToken+ , 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:/ '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)++-- | 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'+--+-- * 'dsaResourceId'+--+-- * 'dsaNextToken'+--+-- * 'dsaMaxResults'+--+-- * 'dsaServiceNamespace'+describeScalingActivities+ :: ServiceNamespace -- ^ 'dsaServiceNamespace'+ -> DescribeScalingActivities+describeScalingActivities pServiceNamespace_ =+ DescribeScalingActivities'+ { _dsaScalableDimension = Nothing+ , _dsaResourceId = Nothing+ , _dsaNextToken = Nothing+ , _dsaMaxResults = Nothing+ , _dsaServiceNamespace = pServiceNamespace_+ }++-- | The scalable dimension associated with the scaling activity. The+-- scalable dimension contains the service namespace, resource type, and+-- scaling property, such as 'ecs:service:DesiredCount' for the desired+-- task count of an Amazon ECS service. If you specify a scalable+-- dimension, you must also specify a resource ID.+dsaScalableDimension :: Lens' DescribeScalingActivities (Maybe ScalableDimension)+dsaScalableDimension = lens _dsaScalableDimension (\ s a -> s{_dsaScalableDimension = a});++-- | The unique identifier string for the resource associated with the+-- scaling activity. For Amazon ECS services, this value is the resource+-- type, followed by the cluster name and service name, such as+-- 'service\/default\/sample-webapp'. If you specify a scalable dimension,+-- you must also specify a resource ID.+dsaResourceId :: Lens' DescribeScalingActivities (Maybe Text)+dsaResourceId = lens _dsaResourceId (\ s a -> s{_dsaResourceId = a});++-- | The 'NextToken' value returned from a previous paginated+-- 'DescribeScalingActivities' request. Pagination continues from the end+-- of the previous results that returned the 'NextToken' value. This value+-- is 'null' when there are no more results to return.+dsaNextToken :: Lens' DescribeScalingActivities (Maybe Text)+dsaNextToken = lens _dsaNextToken (\ s a -> s{_dsaNextToken = a});++-- | The maximum number of scaling activity results returned by+-- 'DescribeScalingActivities' in paginated output. When this parameter is+-- used, 'DescribeScalingActivities' returns up to 'MaxResults' results in+-- a single page along with a 'NextToken' response element. The remaining+-- results of the initial request can be seen by sending another+-- 'DescribeScalingActivities' request with the returned 'NextToken' value.+-- This value can be between 1 and 50. If this parameter is not used, then+-- 'DescribeScalingActivities' returns up to 50 results and a 'NextToken'+-- value, if applicable.+dsaMaxResults :: Lens' DescribeScalingActivities (Maybe Int)+dsaMaxResults = lens _dsaMaxResults (\ s a -> s{_dsaMaxResults = a});++-- | The namespace for the AWS service that the scaling activity is+-- associated with. 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});++instance AWSRequest DescribeScalingActivities where+ type Rs DescribeScalingActivities =+ DescribeScalingActivitiesResponse+ request = postJSON applicationAutoScaling+ response+ = receiveJSON+ (\ s h x ->+ DescribeScalingActivitiesResponse' <$>+ (x .?> "ScalingActivities" .!@ mempty) <*>+ (x .?> "NextToken")+ <*> (pure (fromEnum s)))++instance Hashable DescribeScalingActivities++instance NFData DescribeScalingActivities++instance ToHeaders DescribeScalingActivities where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AnyScaleFrontendService.DescribeScalingActivities"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeScalingActivities where+ toJSON DescribeScalingActivities'{..}+ = object+ (catMaybes+ [("ScalableDimension" .=) <$> _dsaScalableDimension,+ ("ResourceId" .=) <$> _dsaResourceId,+ ("NextToken" .=) <$> _dsaNextToken,+ ("MaxResults" .=) <$> _dsaMaxResults,+ Just ("ServiceNamespace" .= _dsaServiceNamespace)])++instance ToPath DescribeScalingActivities where+ toPath = const "/"++instance ToQuery DescribeScalingActivities where+ toQuery = const mempty++-- | /See:/ 'describeScalingActivitiesResponse' smart constructor.+data DescribeScalingActivitiesResponse = DescribeScalingActivitiesResponse'+ { _dsarsScalingActivities :: !(Maybe [ScalingActivity])+ , _dsarsNextToken :: !(Maybe Text)+ , _dsarsResponseStatus :: !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'+--+-- * 'dsarsNextToken'+--+-- * 'dsarsResponseStatus'+describeScalingActivitiesResponse+ :: Int -- ^ 'dsarsResponseStatus'+ -> DescribeScalingActivitiesResponse+describeScalingActivitiesResponse pResponseStatus_ =+ DescribeScalingActivitiesResponse'+ { _dsarsScalingActivities = Nothing+ , _dsarsNextToken = Nothing+ , _dsarsResponseStatus = pResponseStatus_+ }++-- | A list of scaling activity objects.+dsarsScalingActivities :: Lens' DescribeScalingActivitiesResponse [ScalingActivity]+dsarsScalingActivities = lens _dsarsScalingActivities (\ s a -> s{_dsarsScalingActivities = a}) . _Default . _Coerce;++-- | The 'NextToken' value to include in a future 'DescribeScalingActivities'+-- request. When the results of a 'DescribeScalingActivities' request+-- exceed 'MaxResults', this value can be used to retrieve the next page of+-- results. This value is 'null' when there are no more results to return.+dsarsNextToken :: Lens' DescribeScalingActivitiesResponse (Maybe Text)+dsarsNextToken = lens _dsarsNextToken (\ s a -> s{_dsarsNextToken = a});++-- | The response status code.+dsarsResponseStatus :: Lens' DescribeScalingActivitiesResponse Int+dsarsResponseStatus = lens _dsarsResponseStatus (\ s a -> s{_dsarsResponseStatus = a});++instance NFData DescribeScalingActivitiesResponse
+ gen/Network/AWS/ApplicationAutoScaling/DescribeScalingPolicies.hs view
@@ -0,0 +1,227 @@+{-# 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.DescribeScalingPolicies+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Provides descriptive information for scaling policies with a specified+-- service namespace.+--+-- You can filter the results in a service namespace with the 'ResourceId',+-- 'ScalableDimension', and 'PolicyNames' parameters.+--+-- To create a new scaling policy or update an existing one, see+-- < PutScalingPolicy>. If you are no longer using a scaling policy, you+-- can delete it with < DeleteScalingPolicy>.+module Network.AWS.ApplicationAutoScaling.DescribeScalingPolicies+ (+ -- * Creating a Request+ describeScalingPolicies+ , DescribeScalingPolicies+ -- * Request Lenses+ , dPolicyNames+ , dScalableDimension+ , dResourceId+ , dNextToken+ , dMaxResults+ , dServiceNamespace++ -- * Destructuring the Response+ , describeScalingPoliciesResponse+ , DescribeScalingPoliciesResponse+ -- * Response Lenses+ , drsNextToken+ , drsScalingPolicies+ , drsResponseStatus+ ) 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:/ '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)++-- | Creates a value of 'DescribeScalingPolicies' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dPolicyNames'+--+-- * 'dScalableDimension'+--+-- * 'dResourceId'+--+-- * 'dNextToken'+--+-- * 'dMaxResults'+--+-- * 'dServiceNamespace'+describeScalingPolicies+ :: ServiceNamespace -- ^ 'dServiceNamespace'+ -> DescribeScalingPolicies+describeScalingPolicies 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 of the scalable target that the scaling policy is+-- associated with. The scalable dimension contains the service namespace,+-- resource type, and scaling property, such as 'ecs:service:DesiredCount'+-- for the desired task count of an Amazon ECS service. If you specify a+-- scalable dimension, you must also specify a resource ID.+dScalableDimension :: Lens' DescribeScalingPolicies (Maybe ScalableDimension)+dScalableDimension = lens _dScalableDimension (\ s a -> s{_dScalableDimension = a});++-- | The unique resource identifier string of the scalable target that the+-- scaling policy is associated with. For Amazon ECS services, this value+-- is the resource type, followed by the cluster name and service name,+-- such as 'service\/default\/sample-webapp'. If you specify a scalable+-- dimension, you must also specify a resource ID.+dResourceId :: Lens' DescribeScalingPolicies (Maybe Text)+dResourceId = lens _dResourceId (\ s a -> s{_dResourceId = a});++-- | The 'NextToken' value returned from a previous paginated+-- 'DescribeScalingPolicies' request. Pagination continues from the end of+-- the previous results that returned the 'NextToken' value. This value is+-- 'null' when there are no more results to return.+dNextToken :: Lens' DescribeScalingPolicies (Maybe Text)+dNextToken = lens _dNextToken (\ s a -> s{_dNextToken = a});++-- | The maximum number of scaling policy results returned by+-- 'DescribeScalingPolicies' in paginated output. When this parameter is+-- used, 'DescribeScalingPolicies' returns up to 'MaxResults' results in a+-- single page along with a 'NextToken' response element. The remaining+-- results of the initial request can be seen by sending another+-- 'DescribeScalingPolicies' request with the returned 'NextToken' value.+-- This value can be between 1 and 50. If this parameter is not used, then+-- 'DescribeScalingPolicies' returns up to 50 results and a 'NextToken'+-- value, if applicable.+dMaxResults :: Lens' DescribeScalingPolicies (Maybe Int)+dMaxResults = lens _dMaxResults (\ s a -> s{_dMaxResults = a});++-- | The AWS service namespace of the scalable target that the scaling policy+-- is associated with. 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.+dServiceNamespace :: Lens' DescribeScalingPolicies ServiceNamespace+dServiceNamespace = lens _dServiceNamespace (\ s a -> s{_dServiceNamespace = a});++instance AWSRequest DescribeScalingPolicies where+ type Rs DescribeScalingPolicies =+ DescribeScalingPoliciesResponse+ request = postJSON applicationAutoScaling+ response+ = receiveJSON+ (\ s h x ->+ DescribeScalingPoliciesResponse' <$>+ (x .?> "NextToken") <*>+ (x .?> "ScalingPolicies" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable DescribeScalingPolicies++instance NFData DescribeScalingPolicies++instance ToHeaders DescribeScalingPolicies where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AnyScaleFrontendService.DescribeScalingPolicies" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeScalingPolicies where+ toJSON DescribeScalingPolicies'{..}+ = object+ (catMaybes+ [("PolicyNames" .=) <$> _dPolicyNames,+ ("ScalableDimension" .=) <$> _dScalableDimension,+ ("ResourceId" .=) <$> _dResourceId,+ ("NextToken" .=) <$> _dNextToken,+ ("MaxResults" .=) <$> _dMaxResults,+ Just ("ServiceNamespace" .= _dServiceNamespace)])++instance ToPath DescribeScalingPolicies where+ toPath = const "/"++instance ToQuery DescribeScalingPolicies where+ toQuery = const mempty++-- | /See:/ 'describeScalingPoliciesResponse' smart constructor.+data DescribeScalingPoliciesResponse = DescribeScalingPoliciesResponse'+ { _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.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'drsNextToken'+--+-- * 'drsScalingPolicies'+--+-- * 'drsResponseStatus'+describeScalingPoliciesResponse+ :: Int -- ^ 'drsResponseStatus'+ -> DescribeScalingPoliciesResponse+describeScalingPoliciesResponse pResponseStatus_ =+ DescribeScalingPoliciesResponse'+ { _drsNextToken = Nothing+ , _drsScalingPolicies = Nothing+ , _drsResponseStatus = pResponseStatus_+ }++-- | The 'NextToken' value to include in a future 'DescribeScalingPolicies'+-- request. When the results of a 'DescribeScalingPolicies' request exceed+-- 'MaxResults', this value can be used to retrieve the next page of+-- results. This value is 'null' when 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.+drsScalingPolicies :: Lens' DescribeScalingPoliciesResponse [ScalingPolicy]+drsScalingPolicies = lens _drsScalingPolicies (\ s a -> s{_drsScalingPolicies = a}) . _Default . _Coerce;++-- | The response status code.+drsResponseStatus :: Lens' DescribeScalingPoliciesResponse Int+drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a});++instance NFData DescribeScalingPoliciesResponse
+ gen/Network/AWS/ApplicationAutoScaling/PutScalingPolicy.hs view
@@ -0,0 +1,215 @@+{-# 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.PutScalingPolicy+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates or updates a policy for an existing Application Auto Scaling+-- scalable target. Each scalable target is identified by service+-- namespace, a resource ID, and a scalable dimension, and a scaling policy+-- applies to a scalable target that is identified by those three+-- attributes. You cannot create a scaling policy without first registering+-- a scalable target with < RegisterScalableTarget>.+--+-- To update an existing policy, use the existing policy name and set the+-- parameters you want to change. Any existing parameter not changed in an+-- update to an existing policy is not changed in this update request.+--+-- You can view the existing scaling policies for a service namespace with+-- < DescribeScalingPolicies>. If you are no longer using a scaling policy,+-- you can delete it with < DeleteScalingPolicy>.+module Network.AWS.ApplicationAutoScaling.PutScalingPolicy+ (+ -- * Creating a Request+ putScalingPolicy+ , PutScalingPolicy+ -- * Request Lenses+ , pspPolicyType+ , pspStepScalingPolicyConfiguration+ , pspPolicyName+ , pspServiceNamespace+ , pspResourceId+ , pspScalableDimension++ -- * Destructuring the Response+ , putScalingPolicyResponse+ , PutScalingPolicyResponse+ -- * Response Lenses+ , 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++-- | /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)++-- | 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'+--+-- * 'pspStepScalingPolicyConfiguration'+--+-- * 'pspPolicyName'+--+-- * 'pspServiceNamespace'+--+-- * 'pspResourceId'+--+-- * 'pspScalableDimension'+putScalingPolicy+ :: Text -- ^ 'pspPolicyName'+ -> ServiceNamespace -- ^ 'pspServiceNamespace'+ -> Text -- ^ 'pspResourceId'+ -> ScalableDimension -- ^ 'pspScalableDimension'+ -> PutScalingPolicy+putScalingPolicy pPolicyName_ pServiceNamespace_ pResourceId_ pScalableDimension_ =+ PutScalingPolicy'+ { _pspPolicyType = Nothing+ , _pspStepScalingPolicyConfiguration = Nothing+ , _pspPolicyName = pPolicyName_+ , _pspServiceNamespace = pServiceNamespace_+ , _pspResourceId = pResourceId_+ , _pspScalableDimension = pScalableDimension_+ }++-- | The policy type. This parameter is required if you are creating a new+-- policy.+pspPolicyType :: Lens' PutScalingPolicy (Maybe PolicyType)+pspPolicyType = lens _pspPolicyType (\ s a -> s{_pspPolicyType = a});++-- | The configuration for the step scaling policy. This parameter is+-- required if you are creating a new policy. For more information, see+-- <http://docs.aws.amazon.com/http:/docs.aws.amazon.com/ApplicationAutoScaling/latest/APIReference/API_StepScalingPolicyConfiguration.html StepScalingPolicyConfiguration>+-- and+-- <http://docs.aws.amazon.com/http:/docs.aws.amazon.com/ApplicationAutoScaling/latest/APIReference/API_StepAdjustment.html StepAdjustment>+-- in the /Application Auto Scaling API Reference/.+pspStepScalingPolicyConfiguration :: Lens' PutScalingPolicy (Maybe StepScalingPolicyConfiguration)+pspStepScalingPolicyConfiguration = lens _pspStepScalingPolicyConfiguration (\ s a -> s{_pspStepScalingPolicyConfiguration = a});++-- | The name of the scaling policy.+pspPolicyName :: Lens' PutScalingPolicy Text+pspPolicyName = lens _pspPolicyName (\ s a -> s{_pspPolicyName = a});++-- | The AWS service namespace of the scalable target that this scaling+-- policy applies to. 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.+pspServiceNamespace :: Lens' PutScalingPolicy ServiceNamespace+pspServiceNamespace = lens _pspServiceNamespace (\ s a -> s{_pspServiceNamespace = a});++-- | The unique resource identifier string for the scalable target that this+-- scaling policy applies to. For Amazon ECS services, this value is the+-- resource type, followed by the cluster name and service name, such as+-- 'service\/default\/sample-webapp'.+pspResourceId :: Lens' PutScalingPolicy Text+pspResourceId = lens _pspResourceId (\ s a -> s{_pspResourceId = a});++-- | The scalable dimension of the scalable target that this scaling policy+-- applies to. The scalable dimension contains the service namespace,+-- resource type, and scaling property, such as 'ecs:service:DesiredCount'+-- for the desired task count of an Amazon ECS service.+pspScalableDimension :: Lens' PutScalingPolicy ScalableDimension+pspScalableDimension = lens _pspScalableDimension (\ s a -> s{_pspScalableDimension = a});++instance AWSRequest PutScalingPolicy where+ type Rs PutScalingPolicy = PutScalingPolicyResponse+ request = postJSON applicationAutoScaling+ response+ = receiveJSON+ (\ s h x ->+ PutScalingPolicyResponse' <$>+ (pure (fromEnum s)) <*> (x .:> "PolicyARN"))++instance Hashable PutScalingPolicy++instance NFData PutScalingPolicy++instance ToHeaders PutScalingPolicy where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AnyScaleFrontendService.PutScalingPolicy" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON PutScalingPolicy where+ toJSON PutScalingPolicy'{..}+ = object+ (catMaybes+ [("PolicyType" .=) <$> _pspPolicyType,+ ("StepScalingPolicyConfiguration" .=) <$>+ _pspStepScalingPolicyConfiguration,+ Just ("PolicyName" .= _pspPolicyName),+ Just ("ServiceNamespace" .= _pspServiceNamespace),+ Just ("ResourceId" .= _pspResourceId),+ Just ("ScalableDimension" .= _pspScalableDimension)])++instance ToPath PutScalingPolicy where+ toPath = const "/"++instance ToQuery PutScalingPolicy where+ toQuery = const mempty++-- | /See:/ 'putScalingPolicyResponse' smart constructor.+data PutScalingPolicyResponse = PutScalingPolicyResponse'+ { _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:+--+-- * 'psprsResponseStatus'+--+-- * 'psprsPolicyARN'+putScalingPolicyResponse+ :: Int -- ^ 'psprsResponseStatus'+ -> Text -- ^ 'psprsPolicyARN'+ -> PutScalingPolicyResponse+putScalingPolicyResponse pResponseStatus_ pPolicyARN_ =+ PutScalingPolicyResponse'+ { _psprsResponseStatus = pResponseStatus_+ , _psprsPolicyARN = pPolicyARN_+ }++-- | The response status code.+psprsResponseStatus :: Lens' PutScalingPolicyResponse Int+psprsResponseStatus = lens _psprsResponseStatus (\ s a -> s{_psprsResponseStatus = a});++-- | The Amazon Resource Name (ARN) of the resulting scaling policy.+psprsPolicyARN :: Lens' PutScalingPolicyResponse Text+psprsPolicyARN = lens _psprsPolicyARN (\ s a -> s{_psprsPolicyARN = a});++instance NFData PutScalingPolicyResponse
+ gen/Network/AWS/ApplicationAutoScaling/RegisterScalableTarget.hs view
@@ -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.RegisterScalableTarget+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Registers or updates a scalable target. A scalable target is a resource+-- that can be scaled up or down with Application Auto Scaling. After you+-- have registered a scalable target, you can use this command to update+-- the minimum and maximum values for your scalable dimension.+--+-- At this time, Application Auto Scaling only supports scaling Amazon ECS+-- services.+--+-- After you register a scalable target with Application Auto Scaling, you+-- can create and apply scaling policies to it with < PutScalingPolicy>.+-- You can view the existing scaling policies for a service namespace with+-- < DescribeScalableTargets>. If you are no longer using a scalable+-- target, you can deregister it with < DeregisterScalableTarget>.+module Network.AWS.ApplicationAutoScaling.RegisterScalableTarget+ (+ -- * Creating a Request+ registerScalableTarget+ , RegisterScalableTarget+ -- * Request Lenses+ , rstMaxCapacity+ , rstMinCapacity+ , rstRoleARN+ , rstServiceNamespace+ , rstResourceId+ , rstScalableDimension++ -- * Destructuring the Response+ , registerScalableTargetResponse+ , RegisterScalableTargetResponse+ -- * Response Lenses+ , 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++-- | /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)++-- | Creates a value of 'RegisterScalableTarget' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rstMaxCapacity'+--+-- * 'rstMinCapacity'+--+-- * 'rstRoleARN'+--+-- * 'rstServiceNamespace'+--+-- * 'rstResourceId'+--+-- * 'rstScalableDimension'+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_+ }++-- | The maximum value for this scalable target to scale out to in response+-- to scaling activities. This parameter is required if you are registering+-- a new scalable target, and it is optional if you are updating an+-- existing one.+rstMaxCapacity :: Lens' RegisterScalableTarget (Maybe Int)+rstMaxCapacity = lens _rstMaxCapacity (\ s a -> s{_rstMaxCapacity = a});++-- | The minimum value for this scalable target to scale in to in response to+-- scaling activities. This parameter is required if you are registering a+-- new scalable target, and it is optional if you are updating an existing+-- one.+rstMinCapacity :: Lens' RegisterScalableTarget (Maybe Int)+rstMinCapacity = lens _rstMinCapacity (\ s a -> s{_rstMinCapacity = a});++-- | The ARN of the IAM role that allows Application Auto Scaling to modify+-- your scalable target on your behalf. This parameter is required if you+-- are registering a new scalable target, and it is optional if you are+-- updating an existing one.+rstRoleARN :: Lens' RegisterScalableTarget (Maybe Text)+rstRoleARN = lens _rstRoleARN (\ s a -> s{_rstRoleARN = a});++-- | The namespace for the AWS service that the scalable target is associated+-- with. For Amazon ECS services, the namespace value is 'ecs'. 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.+rstServiceNamespace :: Lens' RegisterScalableTarget ServiceNamespace+rstServiceNamespace = lens _rstServiceNamespace (\ s a -> s{_rstServiceNamespace = a});++-- | The unique identifier string for the resource to associate with the+-- scalable target. For Amazon ECS services, this value is the resource+-- type, followed by the cluster name and service name, such as+-- 'service\/default\/sample-webapp'.+rstResourceId :: Lens' RegisterScalableTarget Text+rstResourceId = lens _rstResourceId (\ s a -> s{_rstResourceId = a});++-- | The scalable dimension associated with the scalable target. The scalable+-- dimension contains the service namespace, resource type, and scaling+-- property, such as 'ecs:service:DesiredCount' for the desired task count+-- of an Amazon ECS service.+rstScalableDimension :: Lens' RegisterScalableTarget ScalableDimension+rstScalableDimension = lens _rstScalableDimension (\ s a -> s{_rstScalableDimension = a});++instance AWSRequest RegisterScalableTarget where+ type Rs RegisterScalableTarget =+ RegisterScalableTargetResponse+ request = postJSON applicationAutoScaling+ response+ = receiveEmpty+ (\ s h x ->+ RegisterScalableTargetResponse' <$>+ (pure (fromEnum s)))++instance Hashable RegisterScalableTarget++instance NFData RegisterScalableTarget++instance ToHeaders RegisterScalableTarget where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AnyScaleFrontendService.RegisterScalableTarget" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON RegisterScalableTarget where+ toJSON RegisterScalableTarget'{..}+ = object+ (catMaybes+ [("MaxCapacity" .=) <$> _rstMaxCapacity,+ ("MinCapacity" .=) <$> _rstMinCapacity,+ ("RoleARN" .=) <$> _rstRoleARN,+ Just ("ServiceNamespace" .= _rstServiceNamespace),+ Just ("ResourceId" .= _rstResourceId),+ Just ("ScalableDimension" .= _rstScalableDimension)])++instance ToPath RegisterScalableTarget where+ toPath = const "/"++instance ToQuery RegisterScalableTarget where+ toQuery = const mempty++-- | /See:/ 'registerScalableTargetResponse' smart constructor.+newtype RegisterScalableTargetResponse = RegisterScalableTargetResponse'+ { _rstrsResponseStatus :: Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'RegisterScalableTargetResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rstrsResponseStatus'+registerScalableTargetResponse+ :: Int -- ^ 'rstrsResponseStatus'+ -> RegisterScalableTargetResponse+registerScalableTargetResponse pResponseStatus_ =+ RegisterScalableTargetResponse'+ { _rstrsResponseStatus = pResponseStatus_+ }++-- | The response status code.+rstrsResponseStatus :: Lens' RegisterScalableTargetResponse Int+rstrsResponseStatus = lens _rstrsResponseStatus (\ s a -> s{_rstrsResponseStatus = a});++instance NFData RegisterScalableTargetResponse
+ gen/Network/AWS/ApplicationAutoScaling/Types.hs view
@@ -0,0 +1,195 @@+{-# LANGUAGE OverloadedStrings #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.ApplicationAutoScaling.Types+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.ApplicationAutoScaling.Types+ (+ -- * Service Configuration+ applicationAutoScaling++ -- * Errors+ , _ValidationException+ , _FailedResourceAccessException+ , _InvalidNextTokenException+ , _ConcurrentUpdateException+ , _InternalServiceException+ , _ObjectNotFoundException+ , _LimitExceededException++ -- * AdjustmentType+ , AdjustmentType (..)++ -- * MetricAggregationType+ , MetricAggregationType (..)++ -- * PolicyType+ , PolicyType (..)++ -- * ScalableDimension+ , ScalableDimension (..)++ -- * ScalingActivityStatusCode+ , ScalingActivityStatusCode (..)++ -- * ServiceNamespace+ , ServiceNamespace (..)++ -- * Alarm+ , Alarm+ , alarm+ , aAlarmName+ , aAlarmARN++ -- * ScalableTarget+ , ScalableTarget+ , scalableTarget+ , stServiceNamespace+ , stResourceId+ , stScalableDimension+ , stMinCapacity+ , stMaxCapacity+ , stRoleARN+ , stCreationTime++ -- * ScalingActivity+ , ScalingActivity+ , scalingActivity+ , saStatusMessage+ , saEndTime+ , saDetails+ , saActivityId+ , saServiceNamespace+ , saResourceId+ , saScalableDimension+ , saDescription+ , saCause+ , saStartTime+ , saStatusCode++ -- * ScalingPolicy+ , ScalingPolicy+ , scalingPolicy+ , spStepScalingPolicyConfiguration+ , spAlarms+ , spPolicyARN+ , spPolicyName+ , spServiceNamespace+ , spResourceId+ , spScalableDimension+ , spPolicyType+ , spCreationTime++ -- * StepAdjustment+ , StepAdjustment+ , stepAdjustment+ , saMetricIntervalLowerBound+ , saMetricIntervalUpperBound+ , saScalingAdjustment++ -- * StepScalingPolicyConfiguration+ , StepScalingPolicyConfiguration+ , stepScalingPolicyConfiguration+ , sspcStepAdjustments+ , sspcAdjustmentType+ , sspcCooldown+ , sspcMetricAggregationType+ , sspcMinAdjustmentMagnitude+ ) 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++-- | 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+ }+ where+ retry =+ Exponential+ { _retryBase = 5.0e-2+ , _retryGrowth = 2+ , _retryAttempts = 5+ , _retryCheck = check+ }+ check e+ | has (hasStatus 429) e = Just "too_many_requests"+ | has (hasCode "ThrottlingException" . hasStatus 400) e =+ Just "throttling_exception"+ | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"+ | has (hasStatus 504) e = Just "gateway_timeout"+ | has (hasStatus 502) e = Just "bad_gateway"+ | has (hasStatus 503) e = Just "service_unavailable"+ | has (hasStatus 500) e = Just "general_server_error"+ | has (hasStatus 509) e = Just "limit_exceeded"+ | otherwise = Nothing++-- | 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"++-- | 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.+_FailedResourceAccessException :: AsError a => Getting (First ServiceError) a ServiceError+_FailedResourceAccessException =+ _ServiceError . hasCode "FailedResourceAccessException"++-- | The next token supplied was invalid.+_InvalidNextTokenException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidNextTokenException =+ _ServiceError . hasCode "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"++-- | The service encountered an internal error.+_InternalServiceException :: AsError a => Getting (First ServiceError) a ServiceError+_InternalServiceException = _ServiceError . hasCode "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"++-- | Your account exceeded a limit. This exception is thrown when a+-- per-account resource limit is exceeded. Application Auto Scaling has a+-- limit of 40 scalable targets per account for Amazon ECS services, 50+-- scaling policies per scalable target, and 20 step adjustments per step+-- scaling policy.+_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError+_LimitExceededException = _ServiceError . hasCode "LimitExceededException"
+ gen/Network/AWS/ApplicationAutoScaling/Types/Product.hs view
@@ -0,0 +1,653 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.ApplicationAutoScaling.Types.Product+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@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++-- | An object representing a CloudWatch alarm associated with a scaling+-- policy.+--+-- /See:/ 'alarm' smart constructor.+data Alarm = Alarm'+ { _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.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'aAlarmName'+--+-- * 'aAlarmARN'+alarm+ :: Text -- ^ 'aAlarmName'+ -> Text -- ^ 'aAlarmARN'+ -> Alarm+alarm pAlarmName_ pAlarmARN_ =+ Alarm'+ { _aAlarmName = pAlarmName_+ , _aAlarmARN = pAlarmARN_+ }++-- | The name of the alarm.+aAlarmName :: Lens' Alarm Text+aAlarmName = lens _aAlarmName (\ s a -> s{_aAlarmName = a});++-- | The Amazon Resource Name (ARN) of the alarm.+aAlarmARN :: Lens' Alarm Text+aAlarmARN = lens _aAlarmARN (\ s a -> s{_aAlarmARN = a});++instance FromJSON Alarm where+ parseJSON+ = withObject "Alarm"+ (\ x ->+ Alarm' <$> (x .: "AlarmName") <*> (x .: "AlarmARN"))++instance Hashable Alarm++instance NFData Alarm++-- | An object representing a scalable target.+--+-- /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)++-- | Creates a value of 'ScalableTarget' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'stServiceNamespace'+--+-- * 'stResourceId'+--+-- * 'stScalableDimension'+--+-- * 'stMinCapacity'+--+-- * 'stMaxCapacity'+--+-- * 'stRoleARN'+--+-- * 'stCreationTime'+scalableTarget+ :: ServiceNamespace -- ^ 'stServiceNamespace'+ -> Text -- ^ 'stResourceId'+ -> ScalableDimension -- ^ 'stScalableDimension'+ -> Int -- ^ 'stMinCapacity'+ -> Int -- ^ 'stMaxCapacity'+ -> Text -- ^ 'stRoleARN'+ -> 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_+ }++-- | The namespace for the AWS service that the scalable target is associated+-- with. 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 unique identifier string for the resource associated with the+-- scalable target. For Amazon ECS services, this value is the resource+-- type, followed by the cluster name and service name, such as+-- 'service\/default\/sample-webapp'.+stResourceId :: Lens' ScalableTarget Text+stResourceId = lens _stResourceId (\ s a -> s{_stResourceId = a});++-- | The scalable dimension associated with the scalable target. The scalable+-- dimension contains the service namespace, resource type, and scaling+-- property, such as 'ecs:service:DesiredCount' for the desired task count+-- of an Amazon ECS service.+stScalableDimension :: Lens' ScalableTarget ScalableDimension+stScalableDimension = lens _stScalableDimension (\ s a -> s{_stScalableDimension = a});++-- | The minimum value for this scalable target to scale in to in response to+-- scaling activities.+stMinCapacity :: Lens' ScalableTarget Int+stMinCapacity = lens _stMinCapacity (\ s a -> s{_stMinCapacity = a});++-- | The maximum value for this scalable target to scale out to in response+-- to scaling activities.+stMaxCapacity :: Lens' ScalableTarget Int+stMaxCapacity = lens _stMaxCapacity (\ s a -> s{_stMaxCapacity = a});++-- | The ARN of the IAM role that allows Application Auto Scaling to modify+-- your scalable target on your behalf.+stRoleARN :: Lens' ScalableTarget Text+stRoleARN = lens _stRoleARN (\ s a -> s{_stRoleARN = a});++-- | The Unix timestamp for when the scalable target was created.+stCreationTime :: Lens' ScalableTarget UTCTime+stCreationTime = lens _stCreationTime (\ s a -> s{_stCreationTime = a}) . _Time;++instance FromJSON ScalableTarget where+ parseJSON+ = withObject "ScalableTarget"+ (\ x ->+ ScalableTarget' <$>+ (x .: "ServiceNamespace") <*> (x .: "ResourceId") <*>+ (x .: "ScalableDimension")+ <*> (x .: "MinCapacity")+ <*> (x .: "MaxCapacity")+ <*> (x .: "RoleARN")+ <*> (x .: "CreationTime"))++instance Hashable ScalableTarget++instance NFData ScalableTarget++-- | An object representing a scaling activity.+--+-- /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)++-- | 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'+--+-- * 'saEndTime'+--+-- * 'saDetails'+--+-- * 'saActivityId'+--+-- * 'saServiceNamespace'+--+-- * 'saResourceId'+--+-- * 'saScalableDimension'+--+-- * 'saDescription'+--+-- * 'saCause'+--+-- * 'saStartTime'+--+-- * 'saStatusCode'+scalingActivity+ :: Text -- ^ 'saActivityId'+ -> ServiceNamespace -- ^ 'saServiceNamespace'+ -> Text -- ^ 'saResourceId'+ -> ScalableDimension -- ^ 'saScalableDimension'+ -> Text -- ^ 'saDescription'+ -> Text -- ^ 'saCause'+ -> UTCTime -- ^ 'saStartTime'+ -> ScalingActivityStatusCode -- ^ 'saStatusCode'+ -> 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_+ }++-- | A simple message about the current status of the scaling activity.+saStatusMessage :: Lens' ScalingActivity (Maybe Text)+saStatusMessage = lens _saStatusMessage (\ s a -> s{_saStatusMessage = 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;++-- | The details about the scaling activity.+saDetails :: Lens' ScalingActivity (Maybe Text)+saDetails = lens _saDetails (\ s a -> s{_saDetails = a});++-- | The unique identifier string for the scaling activity.+saActivityId :: Lens' ScalingActivity Text+saActivityId = lens _saActivityId (\ s a -> s{_saActivityId = a});++-- | The namespace for the AWS service that the scaling activity is+-- associated with. 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});++-- | The unique identifier string for the resource associated with the+-- scaling activity. For Amazon ECS services, this value is the resource+-- type, followed by the cluster name and service name, such as+-- 'service\/default\/sample-webapp'.+saResourceId :: Lens' ScalingActivity Text+saResourceId = lens _saResourceId (\ s a -> s{_saResourceId = a});++-- | The scalable dimension associated with the scaling activity. The+-- scalable dimension contains the service namespace, resource type, and+-- scaling property, such as 'ecs:service:DesiredCount' for the desired+-- task count of an Amazon ECS service.+saScalableDimension :: Lens' ScalingActivity ScalableDimension+saScalableDimension = lens _saScalableDimension (\ s a -> s{_saScalableDimension = 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});++-- | A simple description of what caused the scaling activity to happen.+saCause :: Lens' ScalingActivity Text+saCause = lens _saCause (\ s a -> s{_saCause = a});++-- | The Unix timestamp for when the scaling activity began.+saStartTime :: Lens' ScalingActivity UTCTime+saStartTime = lens _saStartTime (\ s a -> s{_saStartTime = a}) . _Time;++-- | Indicates the status of the scaling activity.+saStatusCode :: Lens' ScalingActivity ScalingActivityStatusCode+saStatusCode = lens _saStatusCode (\ s a -> s{_saStatusCode = a});++instance FromJSON ScalingActivity where+ parseJSON+ = withObject "ScalingActivity"+ (\ x ->+ ScalingActivity' <$>+ (x .:? "StatusMessage") <*> (x .:? "EndTime") <*>+ (x .:? "Details")+ <*> (x .: "ActivityId")+ <*> (x .: "ServiceNamespace")+ <*> (x .: "ResourceId")+ <*> (x .: "ScalableDimension")+ <*> (x .: "Description")+ <*> (x .: "Cause")+ <*> (x .: "StartTime")+ <*> (x .: "StatusCode"))++instance Hashable ScalingActivity++instance NFData ScalingActivity++-- | An object representing a scaling policy.+--+-- /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)++-- | 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'+--+-- * 'spAlarms'+--+-- * 'spPolicyARN'+--+-- * 'spPolicyName'+--+-- * 'spServiceNamespace'+--+-- * 'spResourceId'+--+-- * 'spScalableDimension'+--+-- * 'spPolicyType'+--+-- * 'spCreationTime'+scalingPolicy+ :: Text -- ^ 'spPolicyARN'+ -> Text -- ^ 'spPolicyName'+ -> ServiceNamespace -- ^ 'spServiceNamespace'+ -> Text -- ^ 'spResourceId'+ -> ScalableDimension -- ^ 'spScalableDimension'+ -> PolicyType -- ^ 'spPolicyType'+ -> 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.+spStepScalingPolicyConfiguration :: Lens' ScalingPolicy (Maybe StepScalingPolicyConfiguration)+spStepScalingPolicyConfiguration = lens _spStepScalingPolicyConfiguration (\ s a -> s{_spStepScalingPolicyConfiguration = a});++-- | The CloudWatch alarms that are associated with the scaling policy.+spAlarms :: Lens' ScalingPolicy [Alarm]+spAlarms = lens _spAlarms (\ s a -> s{_spAlarms = a}) . _Default . _Coerce;++-- | The Amazon Resource Name (ARN) of the scaling policy.+spPolicyARN :: Lens' ScalingPolicy Text+spPolicyARN = lens _spPolicyARN (\ s a -> s{_spPolicyARN = a});++-- | The name of the scaling policy.+spPolicyName :: Lens' ScalingPolicy Text+spPolicyName = lens _spPolicyName (\ s a -> s{_spPolicyName = a});++-- | The namespace for the AWS service that the scaling policy is associated+-- with. 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.+spServiceNamespace :: Lens' ScalingPolicy ServiceNamespace+spServiceNamespace = lens _spServiceNamespace (\ s a -> s{_spServiceNamespace = a});++-- | The unique identifier string for the resource associated with the+-- scaling policy. For Amazon ECS services, this value is the resource+-- type, followed by the cluster name and service name, such as+-- 'service\/default\/sample-webapp'.+spResourceId :: Lens' ScalingPolicy Text+spResourceId = lens _spResourceId (\ s a -> s{_spResourceId = a});++-- | The scalable dimension associated with the scaling policy. The scalable+-- dimension contains the service namespace, resource type, and scaling+-- property, such as 'ecs:service:DesiredCount' for the desired task count+-- of an Amazon ECS service.+spScalableDimension :: Lens' ScalingPolicy ScalableDimension+spScalableDimension = lens _spScalableDimension (\ s a -> s{_spScalableDimension = a});++-- | The scaling policy type.+spPolicyType :: Lens' ScalingPolicy PolicyType+spPolicyType = lens _spPolicyType (\ s a -> s{_spPolicyType = a});++-- | The Unix timestamp for when the scaling policy was created.+spCreationTime :: Lens' ScalingPolicy UTCTime+spCreationTime = lens _spCreationTime (\ s a -> s{_spCreationTime = a}) . _Time;++instance FromJSON ScalingPolicy where+ parseJSON+ = withObject "ScalingPolicy"+ (\ x ->+ ScalingPolicy' <$>+ (x .:? "StepScalingPolicyConfiguration") <*>+ (x .:? "Alarms" .!= mempty)+ <*> (x .: "PolicyARN")+ <*> (x .: "PolicyName")+ <*> (x .: "ServiceNamespace")+ <*> (x .: "ResourceId")+ <*> (x .: "ScalableDimension")+ <*> (x .: "PolicyType")+ <*> (x .: "CreationTime"))++instance Hashable ScalingPolicy++instance NFData ScalingPolicy++-- | An object representing 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.+--+-- For the following examples, suppose that you have an alarm with a breach+-- threshold of 50:+--+-- - If you want the adjustment to be triggered when the metric is+-- greater than or equal to 50 and less than 60, specify a lower bound+-- of 0 and an upper bound of 10.+--+-- - If you want the adjustment to be triggered when the metric is+-- greater than 40 and less than or equal to 50, specify a lower bound+-- of -10 and an upper bound of 0.+--+-- There are a few rules for the step adjustments for your step policy:+--+-- - The ranges of your step adjustments can\'t overlap or have a gap.+--+-- - At most one step adjustment can have a null lower bound. If one step+-- adjustment has a negative lower bound, then there must be a step+-- adjustment with a null lower bound.+--+-- - At most one step adjustment can have a null upper bound. If one step+-- adjustment has a positive upper bound, then there must be a step+-- adjustment with a null upper bound.+--+-- - The upper and lower bound can\'t be null in the same step+-- adjustment.+--+--+-- /See:/ 'stepAdjustment' smart constructor.+data StepAdjustment = StepAdjustment'+ { _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.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'saMetricIntervalLowerBound'+--+-- * 'saMetricIntervalUpperBound'+--+-- * 'saScalingAdjustment'+stepAdjustment+ :: Int -- ^ 'saScalingAdjustment'+ -> StepAdjustment+stepAdjustment 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)+saMetricIntervalLowerBound = lens _saMetricIntervalLowerBound (\ s a -> s{_saMetricIntervalLowerBound = a});++-- | The upper bound for the difference between the alarm threshold and the+-- CloudWatch metric. If the metric value is above the breach threshold,+-- the upper bound is exclusive (the metric must be less than the threshold+-- plus the upper bound). Otherwise, it is inclusive (the metric must be+-- less than or equal to the threshold plus the upper bound). A null value+-- indicates positive infinity.+--+-- The upper bound must be greater than the lower bound.+saMetricIntervalUpperBound :: Lens' StepAdjustment (Maybe Double)+saMetricIntervalUpperBound = lens _saMetricIntervalUpperBound (\ s a -> s{_saMetricIntervalUpperBound = a});++-- | The amount by which to scale, based on the specified adjustment type. A+-- positive value adds to the current scalable dimension while a negative+-- number removes from the current scalable dimension.+saScalingAdjustment :: Lens' StepAdjustment Int+saScalingAdjustment = lens _saScalingAdjustment (\ s a -> s{_saScalingAdjustment = a});++instance FromJSON StepAdjustment where+ parseJSON+ = withObject "StepAdjustment"+ (\ x ->+ StepAdjustment' <$>+ (x .:? "MetricIntervalLowerBound") <*>+ (x .:? "MetricIntervalUpperBound")+ <*> (x .: "ScalingAdjustment"))++instance Hashable StepAdjustment++instance NFData StepAdjustment++instance ToJSON StepAdjustment where+ toJSON StepAdjustment'{..}+ = object+ (catMaybes+ [("MetricIntervalLowerBound" .=) <$>+ _saMetricIntervalLowerBound,+ ("MetricIntervalUpperBound" .=) <$>+ _saMetricIntervalUpperBound,+ Just ("ScalingAdjustment" .= _saScalingAdjustment)])++-- | An object representing a step scaling policy configuration.+--+-- /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)++-- | Creates a value of 'StepScalingPolicyConfiguration' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sspcStepAdjustments'+--+-- * 'sspcAdjustmentType'+--+-- * 'sspcCooldown'+--+-- * 'sspcMetricAggregationType'+--+-- * 'sspcMinAdjustmentMagnitude'+stepScalingPolicyConfiguration+ :: StepScalingPolicyConfiguration+stepScalingPolicyConfiguration =+ 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]+sspcStepAdjustments = lens _sspcStepAdjustments (\ s a -> s{_sspcStepAdjustments = a}) . _Default . _Coerce;++-- | The adjustment type, which specifies how the 'ScalingAdjustment'+-- parameter in a < StepAdjustment> is interpreted.+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.+sspcCooldown :: Lens' StepScalingPolicyConfiguration (Maybe Int)+sspcCooldown = lens _sspcCooldown (\ s a -> s{_sspcCooldown = a});++-- | The aggregation type for the CloudWatch metrics. Valid values are+-- 'Minimum', 'Maximum', and 'Average'.+sspcMetricAggregationType :: Lens' StepScalingPolicyConfiguration (Maybe MetricAggregationType)+sspcMetricAggregationType = lens _sspcMetricAggregationType (\ s a -> s{_sspcMetricAggregationType = a});++-- | The minimum number to adjust your scalable dimension as a result of a+-- scaling activity. If the adjustment type is 'PercentChangeInCapacity',+-- the scaling policy changes the scalable dimension of the scalable target+-- by this amount.+sspcMinAdjustmentMagnitude :: Lens' StepScalingPolicyConfiguration (Maybe Int)+sspcMinAdjustmentMagnitude = lens _sspcMinAdjustmentMagnitude (\ s a -> s{_sspcMinAdjustmentMagnitude = a});++instance FromJSON StepScalingPolicyConfiguration+ where+ parseJSON+ = withObject "StepScalingPolicyConfiguration"+ (\ x ->+ StepScalingPolicyConfiguration' <$>+ (x .:? "StepAdjustments" .!= mempty) <*>+ (x .:? "AdjustmentType")+ <*> (x .:? "Cooldown")+ <*> (x .:? "MetricAggregationType")+ <*> (x .:? "MinAdjustmentMagnitude"))++instance Hashable StepScalingPolicyConfiguration++instance NFData StepScalingPolicyConfiguration++instance ToJSON StepScalingPolicyConfiguration where+ toJSON StepScalingPolicyConfiguration'{..}+ = object+ (catMaybes+ [("StepAdjustments" .=) <$> _sspcStepAdjustments,+ ("AdjustmentType" .=) <$> _sspcAdjustmentType,+ ("Cooldown" .=) <$> _sspcCooldown,+ ("MetricAggregationType" .=) <$>+ _sspcMetricAggregationType,+ ("MinAdjustmentMagnitude" .=) <$>+ _sspcMinAdjustmentMagnitude])
+ gen/Network/AWS/ApplicationAutoScaling/Types/Sum.hs view
@@ -0,0 +1,200 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.ApplicationAutoScaling.Types.Sum+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.ApplicationAutoScaling.Types.Sum where++import Network.AWS.Prelude++data AdjustmentType+ = ChangeInCapacity+ | ExactCapacity+ | PercentChangeInCapacity+ deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)++instance FromText AdjustmentType where+ parser = takeLowerText >>= \case+ "changeincapacity" -> pure ChangeInCapacity+ "exactcapacity" -> pure ExactCapacity+ "percentchangeincapacity" -> pure PercentChangeInCapacity+ e -> fromTextError $ "Failure parsing AdjustmentType from value: '" <> e+ <> "'. Accepted values: ChangeInCapacity, ExactCapacity, PercentChangeInCapacity"++instance ToText AdjustmentType where+ toText = \case+ ChangeInCapacity -> "ChangeInCapacity"+ ExactCapacity -> "ExactCapacity"+ PercentChangeInCapacity -> "PercentChangeInCapacity"++instance Hashable AdjustmentType+instance NFData AdjustmentType+instance ToByteString AdjustmentType+instance ToQuery AdjustmentType+instance ToHeader AdjustmentType++instance ToJSON AdjustmentType where+ toJSON = toJSONText++instance FromJSON AdjustmentType where+ parseJSON = parseJSONText "AdjustmentType"++data MetricAggregationType+ = Average+ | Maximum+ | Minimum+ 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+ 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"++instance Hashable MetricAggregationType+instance NFData MetricAggregationType+instance ToByteString MetricAggregationType+instance ToQuery MetricAggregationType+instance ToHeader MetricAggregationType++instance ToJSON MetricAggregationType where+ toJSON = toJSONText++instance FromJSON MetricAggregationType where+ parseJSON = parseJSONText "MetricAggregationType"++data PolicyType =+ StepScaling+ deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)++instance FromText PolicyType where+ parser = takeLowerText >>= \case+ "stepscaling" -> pure StepScaling+ e -> fromTextError $ "Failure parsing PolicyType from value: '" <> e+ <> "'. Accepted values: StepScaling"++instance ToText PolicyType where+ toText = \case+ StepScaling -> "StepScaling"++instance Hashable PolicyType+instance NFData PolicyType+instance ToByteString PolicyType+instance ToQuery PolicyType+instance ToHeader PolicyType++instance ToJSON PolicyType where+ toJSON = toJSONText++instance FromJSON PolicyType where+ parseJSON = parseJSONText "PolicyType"++data ScalableDimension =+ EcsServiceDesiredCount+ deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)++instance FromText ScalableDimension where+ parser = takeLowerText >>= \case+ "ecs:service:desiredcount" -> pure EcsServiceDesiredCount+ e -> fromTextError $ "Failure parsing ScalableDimension from value: '" <> e+ <> "'. Accepted values: ecs:service:DesiredCount"++instance ToText ScalableDimension where+ toText = \case+ EcsServiceDesiredCount -> "ecs:service:DesiredCount"++instance Hashable ScalableDimension+instance NFData ScalableDimension+instance ToByteString ScalableDimension+instance ToQuery ScalableDimension+instance ToHeader ScalableDimension++instance ToJSON ScalableDimension where+ toJSON = toJSONText++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)++instance FromText ScalingActivityStatusCode where+ parser = takeLowerText >>= \case+ "failed" -> pure Failed+ "inprogress" -> pure InProgress+ "overridden" -> pure Overridden+ "pending" -> pure Pending+ "successful" -> pure Successful+ "unfulfilled" -> pure Unfulfilled+ e -> fromTextError $ "Failure parsing ScalingActivityStatusCode from value: '" <> e+ <> "'. Accepted values: Failed, InProgress, Overridden, Pending, Successful, Unfulfilled"++instance ToText ScalingActivityStatusCode where+ toText = \case+ Failed -> "Failed"+ InProgress -> "InProgress"+ Overridden -> "Overridden"+ Pending -> "Pending"+ Successful -> "Successful"+ Unfulfilled -> "Unfulfilled"++instance Hashable ScalingActivityStatusCode+instance NFData ScalingActivityStatusCode+instance ToByteString ScalingActivityStatusCode+instance ToQuery ScalingActivityStatusCode+instance ToHeader ScalingActivityStatusCode++instance FromJSON ScalingActivityStatusCode where+ parseJSON = parseJSONText "ScalingActivityStatusCode"++data ServiceNamespace =+ Ecs+ deriving (Eq,Ord,Read,Show,Enum,Bounded,Data,Typeable,Generic)++instance FromText ServiceNamespace where+ parser = takeLowerText >>= \case+ "ecs" -> pure Ecs+ e -> fromTextError $ "Failure parsing ServiceNamespace from value: '" <> e+ <> "'. Accepted values: ecs"++instance ToText ServiceNamespace where+ toText = \case+ Ecs -> "ecs"++instance Hashable ServiceNamespace+instance NFData ServiceNamespace+instance ToByteString ServiceNamespace+instance ToQuery ServiceNamespace+instance ToHeader ServiceNamespace++instance ToJSON ServiceNamespace where+ toJSON = toJSONText++instance FromJSON ServiceNamespace where+ parseJSON = parseJSONText "ServiceNamespace"
+ gen/Network/AWS/ApplicationAutoScaling/Waiters.hs view
@@ -0,0 +1,21 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.ApplicationAutoScaling.Waiters+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@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
+ test/Main.hs view
@@ -0,0 +1,21 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Main+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Main (main) where++import Test.Tasty+import Test.AWS.ApplicationAutoScaling+import Test.AWS.ApplicationAutoScaling.Internal++main :: IO ()+main = defaultMain $ testGroup "ApplicationAutoScaling"+ [ testGroup "tests" tests+ , testGroup "fixtures" fixtures+ ]
+ test/Test/AWS/ApplicationAutoScaling.hs view
@@ -0,0 +1,27 @@+{-# LANGUAGE OverloadedStrings #-}++-- |+-- Module : Test.AWS.ApplicationAutoScaling+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++module Test.AWS.ApplicationAutoScaling+ ( tests+ , fixtures+ ) where++import Network.AWS.ApplicationAutoScaling+import Test.AWS.Gen.ApplicationAutoScaling+import Test.Tasty++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/AWS/ApplicationAutoScaling/Internal.hs view
@@ -0,0 +1,17 @@+{-# LANGUAGE OverloadedStrings #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Test.AWS.ApplicationAutoScaling.Internal+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++module Test.AWS.ApplicationAutoScaling.Internal where++import Test.AWS.Prelude
+ test/Test/AWS/Gen/ApplicationAutoScaling.hs view
@@ -0,0 +1,165 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Test.AWS.Gen.ApplicationAutoScaling+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.Gen.ApplicationAutoScaling where++import Data.Proxy+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.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+-- [ testGroup "request"+-- [ testDeleteScalingPolicy $+-- deleteScalingPolicy+--+-- , testPutScalingPolicy $+-- putScalingPolicy+--+-- , testRegisterScalableTarget $+-- registerScalableTarget+--+-- , testDescribeScalingPolicies $+-- describeScalingPolicies+--+-- , testDescribeScalableTargets $+-- describeScalableTargets+--+-- , testDescribeScalingActivities $+-- describeScalingActivities+--+-- , testDeregisterScalableTarget $+-- deregisterScalableTarget+--+-- ]++-- , testGroup "response"+-- [ testDeleteScalingPolicyResponse $+-- deleteScalingPolicyResponse+--+-- , testPutScalingPolicyResponse $+-- putScalingPolicyResponse+--+-- , testRegisterScalableTargetResponse $+-- registerScalableTargetResponse+--+-- , testDescribeScalingPoliciesResponse $+-- describeScalingPoliciesResponse+--+-- , testDescribeScalableTargetsResponse $+-- describeScalableTargetsResponse+--+-- , testDescribeScalingActivitiesResponse $+-- describeScalingActivitiesResponse+--+-- , testDeregisterScalableTargetResponse $+-- deregisterScalableTargetResponse+--+-- ]+-- ]++-- Requests++testDeleteScalingPolicy :: DeleteScalingPolicy -> TestTree+testDeleteScalingPolicy = req+ "DeleteScalingPolicy"+ "fixture/DeleteScalingPolicy.yaml"++testPutScalingPolicy :: PutScalingPolicy -> TestTree+testPutScalingPolicy = req+ "PutScalingPolicy"+ "fixture/PutScalingPolicy.yaml"++testRegisterScalableTarget :: RegisterScalableTarget -> TestTree+testRegisterScalableTarget = req+ "RegisterScalableTarget"+ "fixture/RegisterScalableTarget.yaml"++testDescribeScalingPolicies :: DescribeScalingPolicies -> TestTree+testDescribeScalingPolicies = req+ "DescribeScalingPolicies"+ "fixture/DescribeScalingPolicies.yaml"++testDescribeScalableTargets :: DescribeScalableTargets -> TestTree+testDescribeScalableTargets = req+ "DescribeScalableTargets"+ "fixture/DescribeScalableTargets.yaml"++testDescribeScalingActivities :: DescribeScalingActivities -> TestTree+testDescribeScalingActivities = req+ "DescribeScalingActivities"+ "fixture/DescribeScalingActivities.yaml"++testDeregisterScalableTarget :: DeregisterScalableTarget -> TestTree+testDeregisterScalableTarget = req+ "DeregisterScalableTarget"+ "fixture/DeregisterScalableTarget.yaml"++-- Responses++testDeleteScalingPolicyResponse :: DeleteScalingPolicyResponse -> TestTree+testDeleteScalingPolicyResponse = res+ "DeleteScalingPolicyResponse"+ "fixture/DeleteScalingPolicyResponse.proto"+ applicationAutoScaling+ (Proxy :: Proxy DeleteScalingPolicy)++testPutScalingPolicyResponse :: PutScalingPolicyResponse -> TestTree+testPutScalingPolicyResponse = res+ "PutScalingPolicyResponse"+ "fixture/PutScalingPolicyResponse.proto"+ applicationAutoScaling+ (Proxy :: Proxy PutScalingPolicy)++testRegisterScalableTargetResponse :: RegisterScalableTargetResponse -> TestTree+testRegisterScalableTargetResponse = res+ "RegisterScalableTargetResponse"+ "fixture/RegisterScalableTargetResponse.proto"+ applicationAutoScaling+ (Proxy :: Proxy RegisterScalableTarget)++testDescribeScalingPoliciesResponse :: DescribeScalingPoliciesResponse -> TestTree+testDescribeScalingPoliciesResponse = res+ "DescribeScalingPoliciesResponse"+ "fixture/DescribeScalingPoliciesResponse.proto"+ applicationAutoScaling+ (Proxy :: Proxy DescribeScalingPolicies)++testDescribeScalableTargetsResponse :: DescribeScalableTargetsResponse -> TestTree+testDescribeScalableTargetsResponse = res+ "DescribeScalableTargetsResponse"+ "fixture/DescribeScalableTargetsResponse.proto"+ applicationAutoScaling+ (Proxy :: Proxy DescribeScalableTargets)++testDescribeScalingActivitiesResponse :: DescribeScalingActivitiesResponse -> TestTree+testDescribeScalingActivitiesResponse = res+ "DescribeScalingActivitiesResponse"+ "fixture/DescribeScalingActivitiesResponse.proto"+ applicationAutoScaling+ (Proxy :: Proxy DescribeScalingActivities)++testDeregisterScalableTargetResponse :: DeregisterScalableTargetResponse -> TestTree+testDeregisterScalableTargetResponse = res+ "DeregisterScalableTargetResponse"+ "fixture/DeregisterScalableTargetResponse.proto"+ applicationAutoScaling+ (Proxy :: Proxy DeregisterScalableTarget)