amazonka-ssm (empty) → 0.3.1
raw patch · 17 files changed
+2603/−0 lines, 17 filesdep +amazonka-coredep +basesetup-changed
Dependencies added: amazonka-core, base
Files
- LICENSE +373/−0
- README.md +31/−0
- Setup.hs +2/−0
- amazonka-ssm.cabal +55/−0
- gen/Network/AWS/SSM.hs +42/−0
- gen/Network/AWS/SSM/CreateAssociation.hs +132/−0
- gen/Network/AWS/SSM/CreateAssociationBatch.hs +134/−0
- gen/Network/AWS/SSM/CreateDocument.hs +126/−0
- gen/Network/AWS/SSM/DeleteAssociation.hs +111/−0
- gen/Network/AWS/SSM/DeleteDocument.hs +96/−0
- gen/Network/AWS/SSM/DescribeAssociation.hs +125/−0
- gen/Network/AWS/SSM/DescribeDocument.hs +111/−0
- gen/Network/AWS/SSM/GetDocument.hs +121/−0
- gen/Network/AWS/SSM/ListAssociations.hs +147/−0
- gen/Network/AWS/SSM/ListDocuments.hs +149/−0
- gen/Network/AWS/SSM/Types.hs +711/−0
- gen/Network/AWS/SSM/UpdateAssociationStatus.hs +137/−0
+ LICENSE view
@@ -0,0 +1,373 @@+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.++Exhibit B - "Incompatible With Secondary Licenses" Notice+---------------------------------------------------------++ This Source Code Form is "Incompatible With Secondary Licenses", as+ defined by the Mozilla Public License, v. 2.0.
+ README.md view
@@ -0,0 +1,31 @@+# Amazon Simple Systems Management Service SDK++> _Warning:_ This is an experimental preview release which is still under heavy development and not intended for public consumption, _caveat emptor_!++* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)++## Description++Amazon EC2 Simple Systems Manager (SSM) enables you to configure and manage+your EC2 instances. You can create a configuration document and then+associate it with one or more running instances.++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-ssm)+and the [AWS API Reference](http://docs.aws.amazon.com/ssm/latest/APIReference/Welcome.html).+++## 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-ssm` 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-ssm.cabal view
@@ -0,0 +1,55 @@+name: amazonka-ssm+version: 0.3.1+synopsis: Amazon Simple Systems Management Service SDK.+homepage: https://github.com/brendanhay/amazonka+license: OtherLicense+license-file: LICENSE+author: Brendan Hay+maintainer: Brendan Hay <brendan.g.hay@gmail.com>+copyright: Copyright (c) 2013-2014 Brendan Hay+category: Network, AWS, Cloud, Distributed Computing+build-type: Simple+extra-source-files: README.md+cabal-version: >= 1.10++description:+ Amazon EC2 Simple Systems Manager (SSM) enables you to configure and manage+ your EC2 instances. You can create a configuration document and then+ associate it with one or more running instances.++ .+ /See:/ <http://docs.aws.amazon.com/ssm/latest/APIReference/Welcome.html AWS API Reference>+ .+ /Warning:/ This is an experimental preview release which is still under+ heavy development and not intended for public consumption, caveat emptor!++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.SSM+ , Network.AWS.SSM.CreateAssociation+ , Network.AWS.SSM.CreateAssociationBatch+ , Network.AWS.SSM.CreateDocument+ , Network.AWS.SSM.DeleteAssociation+ , Network.AWS.SSM.DeleteDocument+ , Network.AWS.SSM.DescribeAssociation+ , Network.AWS.SSM.DescribeDocument+ , Network.AWS.SSM.GetDocument+ , Network.AWS.SSM.ListAssociations+ , Network.AWS.SSM.ListDocuments+ , Network.AWS.SSM.Types+ , Network.AWS.SSM.UpdateAssociationStatus++ other-modules:++ build-depends:+ amazonka-core == 0.3.1.*+ , base >= 4.7 && < 5
+ gen/Network/AWS/SSM.hs view
@@ -0,0 +1,42 @@+-- Module : Network.AWS.SSM+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Amazon EC2 Simple Systems Manager (SSM) enables you to configure and manage+-- your EC2 instances. You can create a configuration document and then+-- associate it with one or more running instances.+module Network.AWS.SSM+ ( module Network.AWS.SSM.CreateAssociation+ , module Network.AWS.SSM.CreateAssociationBatch+ , module Network.AWS.SSM.CreateDocument+ , module Network.AWS.SSM.DeleteAssociation+ , module Network.AWS.SSM.DeleteDocument+ , module Network.AWS.SSM.DescribeAssociation+ , module Network.AWS.SSM.DescribeDocument+ , module Network.AWS.SSM.GetDocument+ , module Network.AWS.SSM.ListAssociations+ , module Network.AWS.SSM.ListDocuments+ , module Network.AWS.SSM.Types+ , module Network.AWS.SSM.UpdateAssociationStatus+ ) where++import Network.AWS.SSM.CreateAssociation+import Network.AWS.SSM.CreateAssociationBatch+import Network.AWS.SSM.CreateDocument+import Network.AWS.SSM.DeleteAssociation+import Network.AWS.SSM.DeleteDocument+import Network.AWS.SSM.DescribeAssociation+import Network.AWS.SSM.DescribeDocument+import Network.AWS.SSM.GetDocument+import Network.AWS.SSM.ListAssociations+import Network.AWS.SSM.ListDocuments+import Network.AWS.SSM.Types+import Network.AWS.SSM.UpdateAssociationStatus
+ gen/Network/AWS/SSM/CreateAssociation.hs view
@@ -0,0 +1,132 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SSM.CreateAssociation+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Associates the specified configuration document with the specified instance.+--+-- When you associate a configuration document with an instance, the+-- configuration agent on the instance processes the configuration document and+-- configures the instance as specified.+--+-- If you associate a configuration document with an instance that already has+-- an associated configuration document, we replace the current configuration+-- document with the new configuration document.+--+-- <http://docs.aws.amazon.com/ssm/latest/APIReference/API_CreateAssociation.html>+module Network.AWS.SSM.CreateAssociation+ (+ -- * Request+ CreateAssociation+ -- ** Request constructor+ , createAssociation+ -- ** Request lenses+ , caInstanceId+ , caName++ -- * Response+ , CreateAssociationResponse+ -- ** Response constructor+ , createAssociationResponse+ -- ** Response lenses+ , carAssociationDescription+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SSM.Types+import qualified GHC.Exts++data CreateAssociation = CreateAssociation+ { _caInstanceId :: Text+ , _caName :: Text+ } deriving (Eq, Ord, Read, Show)++-- | 'CreateAssociation' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'caInstanceId' @::@ 'Text'+--+-- * 'caName' @::@ 'Text'+--+createAssociation :: Text -- ^ 'caName'+ -> Text -- ^ 'caInstanceId'+ -> CreateAssociation+createAssociation p1 p2 = CreateAssociation+ { _caName = p1+ , _caInstanceId = p2+ }++-- | The ID of the instance.+caInstanceId :: Lens' CreateAssociation Text+caInstanceId = lens _caInstanceId (\s a -> s { _caInstanceId = a })++-- | The name of the configuration document.+caName :: Lens' CreateAssociation Text+caName = lens _caName (\s a -> s { _caName = a })++newtype CreateAssociationResponse = CreateAssociationResponse+ { _carAssociationDescription :: Maybe AssociationDescription+ } deriving (Eq, Read, Show)++-- | 'CreateAssociationResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'carAssociationDescription' @::@ 'Maybe' 'AssociationDescription'+--+createAssociationResponse :: CreateAssociationResponse+createAssociationResponse = CreateAssociationResponse+ { _carAssociationDescription = Nothing+ }++-- | Information about the association.+carAssociationDescription :: Lens' CreateAssociationResponse (Maybe AssociationDescription)+carAssociationDescription =+ lens _carAssociationDescription+ (\s a -> s { _carAssociationDescription = a })++instance ToPath CreateAssociation where+ toPath = const "/"++instance ToQuery CreateAssociation where+ toQuery = const mempty++instance ToHeaders CreateAssociation++instance ToJSON CreateAssociation where+ toJSON CreateAssociation{..} = object+ [ "Name" .= _caName+ , "InstanceId" .= _caInstanceId+ ]++instance AWSRequest CreateAssociation where+ type Sv CreateAssociation = SSM+ type Rs CreateAssociation = CreateAssociationResponse++ request = post "CreateAssociation"+ response = jsonResponse++instance FromJSON CreateAssociationResponse where+ parseJSON = withObject "CreateAssociationResponse" $ \o -> CreateAssociationResponse+ <$> o .:? "AssociationDescription"
+ gen/Network/AWS/SSM/CreateAssociationBatch.hs view
@@ -0,0 +1,134 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SSM.CreateAssociationBatch+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Associates the specified configuration documents with the specified instances.+--+-- When you associate a configuration document with an instance, the+-- configuration agent on the instance processes the configuration document and+-- configures the instance as specified.+--+-- If you associate a configuration document with an instance that already has+-- an associated configuration document, we replace the current configuration+-- document with the new configuration document.+--+-- <http://docs.aws.amazon.com/ssm/latest/APIReference/API_CreateAssociationBatch.html>+module Network.AWS.SSM.CreateAssociationBatch+ (+ -- * Request+ CreateAssociationBatch+ -- ** Request constructor+ , createAssociationBatch+ -- ** Request lenses+ , cabEntries++ -- * Response+ , CreateAssociationBatchResponse+ -- ** Response constructor+ , createAssociationBatchResponse+ -- ** Response lenses+ , cabrFailed+ , cabrSuccessful+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SSM.Types+import qualified GHC.Exts++newtype CreateAssociationBatch = CreateAssociationBatch+ { _cabEntries :: List "entries" CreateAssociationBatchRequestEntry+ } deriving (Eq, Read, Show, Monoid, Semigroup)++instance GHC.Exts.IsList CreateAssociationBatch where+ type Item CreateAssociationBatch = CreateAssociationBatchRequestEntry++ fromList = CreateAssociationBatch . GHC.Exts.fromList+ toList = GHC.Exts.toList . _cabEntries++-- | 'CreateAssociationBatch' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cabEntries' @::@ ['CreateAssociationBatchRequestEntry']+--+createAssociationBatch :: CreateAssociationBatch+createAssociationBatch = CreateAssociationBatch+ { _cabEntries = mempty+ }++-- | One or more associations.+cabEntries :: Lens' CreateAssociationBatch [CreateAssociationBatchRequestEntry]+cabEntries = lens _cabEntries (\s a -> s { _cabEntries = a }) . _List++data CreateAssociationBatchResponse = CreateAssociationBatchResponse+ { _cabrFailed :: List "FailedCreateAssociationEntry" FailedCreateAssociation+ , _cabrSuccessful :: List "AssociationDescription" AssociationDescription+ } deriving (Eq, Read, Show)++-- | 'CreateAssociationBatchResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cabrFailed' @::@ ['FailedCreateAssociation']+--+-- * 'cabrSuccessful' @::@ ['AssociationDescription']+--+createAssociationBatchResponse :: CreateAssociationBatchResponse+createAssociationBatchResponse = CreateAssociationBatchResponse+ { _cabrSuccessful = mempty+ , _cabrFailed = mempty+ }++-- | Information about the associations that failed.+cabrFailed :: Lens' CreateAssociationBatchResponse [FailedCreateAssociation]+cabrFailed = lens _cabrFailed (\s a -> s { _cabrFailed = a }) . _List++-- | Information about the associations that succeeded.+cabrSuccessful :: Lens' CreateAssociationBatchResponse [AssociationDescription]+cabrSuccessful = lens _cabrSuccessful (\s a -> s { _cabrSuccessful = a }) . _List++instance ToPath CreateAssociationBatch where+ toPath = const "/"++instance ToQuery CreateAssociationBatch where+ toQuery = const mempty++instance ToHeaders CreateAssociationBatch++instance ToJSON CreateAssociationBatch where+ toJSON CreateAssociationBatch{..} = object+ [ "Entries" .= _cabEntries+ ]++instance AWSRequest CreateAssociationBatch where+ type Sv CreateAssociationBatch = SSM+ type Rs CreateAssociationBatch = CreateAssociationBatchResponse++ request = post "CreateAssociationBatch"+ response = jsonResponse++instance FromJSON CreateAssociationBatchResponse where+ parseJSON = withObject "CreateAssociationBatchResponse" $ \o -> CreateAssociationBatchResponse+ <$> o .:? "Failed" .!= mempty+ <*> o .:? "Successful" .!= mempty
+ gen/Network/AWS/SSM/CreateDocument.hs view
@@ -0,0 +1,126 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SSM.CreateDocument+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Creates a configuration document.+--+-- After you create a configuration document, you can use 'CreateAssociation' to+-- associate it with one or more running instances.+--+-- <http://docs.aws.amazon.com/ssm/latest/APIReference/API_CreateDocument.html>+module Network.AWS.SSM.CreateDocument+ (+ -- * Request+ CreateDocument+ -- ** Request constructor+ , createDocument+ -- ** Request lenses+ , cdContent+ , cdName++ -- * Response+ , CreateDocumentResponse+ -- ** Response constructor+ , createDocumentResponse+ -- ** Response lenses+ , cdrDocumentDescription+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SSM.Types+import qualified GHC.Exts++data CreateDocument = CreateDocument+ { _cdContent :: Text+ , _cdName :: Text+ } deriving (Eq, Ord, Read, Show)++-- | 'CreateDocument' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cdContent' @::@ 'Text'+--+-- * 'cdName' @::@ 'Text'+--+createDocument :: Text -- ^ 'cdContent'+ -> Text -- ^ 'cdName'+ -> CreateDocument+createDocument p1 p2 = CreateDocument+ { _cdContent = p1+ , _cdName = p2+ }++-- | A valid JSON file. For more information about the contents of this file, see <http://docs.aws.amazon.com/ssm/latest/APIReference/aws-ssm-document.html Configuration Document>.+cdContent :: Lens' CreateDocument Text+cdContent = lens _cdContent (\s a -> s { _cdContent = a })++-- | A name for the configuration document.+cdName :: Lens' CreateDocument Text+cdName = lens _cdName (\s a -> s { _cdName = a })++newtype CreateDocumentResponse = CreateDocumentResponse+ { _cdrDocumentDescription :: Maybe DocumentDescription+ } deriving (Eq, Read, Show)++-- | 'CreateDocumentResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cdrDocumentDescription' @::@ 'Maybe' 'DocumentDescription'+--+createDocumentResponse :: CreateDocumentResponse+createDocumentResponse = CreateDocumentResponse+ { _cdrDocumentDescription = Nothing+ }++-- | Information about the configuration document.+cdrDocumentDescription :: Lens' CreateDocumentResponse (Maybe DocumentDescription)+cdrDocumentDescription =+ lens _cdrDocumentDescription (\s a -> s { _cdrDocumentDescription = a })++instance ToPath CreateDocument where+ toPath = const "/"++instance ToQuery CreateDocument where+ toQuery = const mempty++instance ToHeaders CreateDocument++instance ToJSON CreateDocument where+ toJSON CreateDocument{..} = object+ [ "Content" .= _cdContent+ , "Name" .= _cdName+ ]++instance AWSRequest CreateDocument where+ type Sv CreateDocument = SSM+ type Rs CreateDocument = CreateDocumentResponse++ request = post "CreateDocument"+ response = jsonResponse++instance FromJSON CreateDocumentResponse where+ parseJSON = withObject "CreateDocumentResponse" $ \o -> CreateDocumentResponse+ <$> o .:? "DocumentDescription"
+ gen/Network/AWS/SSM/DeleteAssociation.hs view
@@ -0,0 +1,111 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SSM.DeleteAssociation+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Disassociates the specified configuration document from the specified+-- instance.+--+-- When you disassociate a configuration document from an instance, it does not+-- change the configuration of the instance. To change the configuration state+-- of an instance after you disassociate a configuration document, you must+-- create a new configuration document with the desired configuration and+-- associate it with the instance.+--+-- <http://docs.aws.amazon.com/ssm/latest/APIReference/API_DeleteAssociation.html>+module Network.AWS.SSM.DeleteAssociation+ (+ -- * Request+ DeleteAssociation+ -- ** Request constructor+ , deleteAssociation+ -- ** Request lenses+ , da1InstanceId+ , da1Name++ -- * Response+ , DeleteAssociationResponse+ -- ** Response constructor+ , deleteAssociationResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SSM.Types+import qualified GHC.Exts++data DeleteAssociation = DeleteAssociation+ { _da1InstanceId :: Text+ , _da1Name :: Text+ } deriving (Eq, Ord, Read, Show)++-- | 'DeleteAssociation' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'da1InstanceId' @::@ 'Text'+--+-- * 'da1Name' @::@ 'Text'+--+deleteAssociation :: Text -- ^ 'da1Name'+ -> Text -- ^ 'da1InstanceId'+ -> DeleteAssociation+deleteAssociation p1 p2 = DeleteAssociation+ { _da1Name = p1+ , _da1InstanceId = p2+ }++-- | The ID of the instance.+da1InstanceId :: Lens' DeleteAssociation Text+da1InstanceId = lens _da1InstanceId (\s a -> s { _da1InstanceId = a })++-- | The name of the configuration document.+da1Name :: Lens' DeleteAssociation Text+da1Name = lens _da1Name (\s a -> s { _da1Name = a })++data DeleteAssociationResponse = DeleteAssociationResponse+ deriving (Eq, Ord, Read, Show, Generic)++-- | 'DeleteAssociationResponse' constructor.+deleteAssociationResponse :: DeleteAssociationResponse+deleteAssociationResponse = DeleteAssociationResponse++instance ToPath DeleteAssociation where+ toPath = const "/"++instance ToQuery DeleteAssociation where+ toQuery = const mempty++instance ToHeaders DeleteAssociation++instance ToJSON DeleteAssociation where+ toJSON DeleteAssociation{..} = object+ [ "Name" .= _da1Name+ , "InstanceId" .= _da1InstanceId+ ]++instance AWSRequest DeleteAssociation where+ type Sv DeleteAssociation = SSM+ type Rs DeleteAssociation = DeleteAssociationResponse++ request = post "DeleteAssociation"+ response = nullResponse DeleteAssociationResponse
+ gen/Network/AWS/SSM/DeleteDocument.hs view
@@ -0,0 +1,96 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SSM.DeleteDocument+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Deletes the specified configuration document.+--+-- You must use 'DeleteAssociation' to disassociate all instances that are+-- associated with the configuration document before you can delete it.+--+-- <http://docs.aws.amazon.com/ssm/latest/APIReference/API_DeleteDocument.html>+module Network.AWS.SSM.DeleteDocument+ (+ -- * Request+ DeleteDocument+ -- ** Request constructor+ , deleteDocument+ -- ** Request lenses+ , dd2Name++ -- * Response+ , DeleteDocumentResponse+ -- ** Response constructor+ , deleteDocumentResponse+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SSM.Types+import qualified GHC.Exts++newtype DeleteDocument = DeleteDocument+ { _dd2Name :: Text+ } deriving (Eq, Ord, Read, Show, Monoid, IsString)++-- | 'DeleteDocument' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dd2Name' @::@ 'Text'+--+deleteDocument :: Text -- ^ 'dd2Name'+ -> DeleteDocument+deleteDocument p1 = DeleteDocument+ { _dd2Name = p1+ }++-- | The name of the configuration document.+dd2Name :: Lens' DeleteDocument Text+dd2Name = lens _dd2Name (\s a -> s { _dd2Name = a })++data DeleteDocumentResponse = DeleteDocumentResponse+ deriving (Eq, Ord, Read, Show, Generic)++-- | 'DeleteDocumentResponse' constructor.+deleteDocumentResponse :: DeleteDocumentResponse+deleteDocumentResponse = DeleteDocumentResponse++instance ToPath DeleteDocument where+ toPath = const "/"++instance ToQuery DeleteDocument where+ toQuery = const mempty++instance ToHeaders DeleteDocument++instance ToJSON DeleteDocument where+ toJSON DeleteDocument{..} = object+ [ "Name" .= _dd2Name+ ]++instance AWSRequest DeleteDocument where+ type Sv DeleteDocument = SSM+ type Rs DeleteDocument = DeleteDocumentResponse++ request = post "DeleteDocument"+ response = nullResponse DeleteDocumentResponse
+ gen/Network/AWS/SSM/DescribeAssociation.hs view
@@ -0,0 +1,125 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SSM.DescribeAssociation+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Describes the associations for the specified configuration document or+-- instance.+--+-- <http://docs.aws.amazon.com/ssm/latest/APIReference/API_DescribeAssociation.html>+module Network.AWS.SSM.DescribeAssociation+ (+ -- * Request+ DescribeAssociation+ -- ** Request constructor+ , describeAssociation+ -- ** Request lenses+ , daInstanceId+ , daName++ -- * Response+ , DescribeAssociationResponse+ -- ** Response constructor+ , describeAssociationResponse+ -- ** Response lenses+ , darAssociationDescription+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SSM.Types+import qualified GHC.Exts++data DescribeAssociation = DescribeAssociation+ { _daInstanceId :: Text+ , _daName :: Text+ } deriving (Eq, Ord, Read, Show)++-- | 'DescribeAssociation' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'daInstanceId' @::@ 'Text'+--+-- * 'daName' @::@ 'Text'+--+describeAssociation :: Text -- ^ 'daName'+ -> Text -- ^ 'daInstanceId'+ -> DescribeAssociation+describeAssociation p1 p2 = DescribeAssociation+ { _daName = p1+ , _daInstanceId = p2+ }++-- | The ID of the instance.+daInstanceId :: Lens' DescribeAssociation Text+daInstanceId = lens _daInstanceId (\s a -> s { _daInstanceId = a })++-- | The name of the configuration document.+daName :: Lens' DescribeAssociation Text+daName = lens _daName (\s a -> s { _daName = a })++newtype DescribeAssociationResponse = DescribeAssociationResponse+ { _darAssociationDescription :: Maybe AssociationDescription+ } deriving (Eq, Read, Show)++-- | 'DescribeAssociationResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'darAssociationDescription' @::@ 'Maybe' 'AssociationDescription'+--+describeAssociationResponse :: DescribeAssociationResponse+describeAssociationResponse = DescribeAssociationResponse+ { _darAssociationDescription = Nothing+ }++-- | Information about the association.+darAssociationDescription :: Lens' DescribeAssociationResponse (Maybe AssociationDescription)+darAssociationDescription =+ lens _darAssociationDescription+ (\s a -> s { _darAssociationDescription = a })++instance ToPath DescribeAssociation where+ toPath = const "/"++instance ToQuery DescribeAssociation where+ toQuery = const mempty++instance ToHeaders DescribeAssociation++instance ToJSON DescribeAssociation where+ toJSON DescribeAssociation{..} = object+ [ "Name" .= _daName+ , "InstanceId" .= _daInstanceId+ ]++instance AWSRequest DescribeAssociation where+ type Sv DescribeAssociation = SSM+ type Rs DescribeAssociation = DescribeAssociationResponse++ request = post "DescribeAssociation"+ response = jsonResponse++instance FromJSON DescribeAssociationResponse where+ parseJSON = withObject "DescribeAssociationResponse" $ \o -> DescribeAssociationResponse+ <$> o .:? "AssociationDescription"
+ gen/Network/AWS/SSM/DescribeDocument.hs view
@@ -0,0 +1,111 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SSM.DescribeDocument+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Describes the specified configuration document.+--+-- <http://docs.aws.amazon.com/ssm/latest/APIReference/API_DescribeDocument.html>+module Network.AWS.SSM.DescribeDocument+ (+ -- * Request+ DescribeDocument+ -- ** Request constructor+ , describeDocument+ -- ** Request lenses+ , ddName++ -- * Response+ , DescribeDocumentResponse+ -- ** Response constructor+ , describeDocumentResponse+ -- ** Response lenses+ , ddrDocument+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SSM.Types+import qualified GHC.Exts++newtype DescribeDocument = DescribeDocument+ { _ddName :: Text+ } deriving (Eq, Ord, Read, Show, Monoid, IsString)++-- | 'DescribeDocument' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ddName' @::@ 'Text'+--+describeDocument :: Text -- ^ 'ddName'+ -> DescribeDocument+describeDocument p1 = DescribeDocument+ { _ddName = p1+ }++-- | The name of the configuration document.+ddName :: Lens' DescribeDocument Text+ddName = lens _ddName (\s a -> s { _ddName = a })++newtype DescribeDocumentResponse = DescribeDocumentResponse+ { _ddrDocument :: Maybe DocumentDescription+ } deriving (Eq, Read, Show)++-- | 'DescribeDocumentResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ddrDocument' @::@ 'Maybe' 'DocumentDescription'+--+describeDocumentResponse :: DescribeDocumentResponse+describeDocumentResponse = DescribeDocumentResponse+ { _ddrDocument = Nothing+ }++-- | Information about the configuration document.+ddrDocument :: Lens' DescribeDocumentResponse (Maybe DocumentDescription)+ddrDocument = lens _ddrDocument (\s a -> s { _ddrDocument = a })++instance ToPath DescribeDocument where+ toPath = const "/"++instance ToQuery DescribeDocument where+ toQuery = const mempty++instance ToHeaders DescribeDocument++instance ToJSON DescribeDocument where+ toJSON DescribeDocument{..} = object+ [ "Name" .= _ddName+ ]++instance AWSRequest DescribeDocument where+ type Sv DescribeDocument = SSM+ type Rs DescribeDocument = DescribeDocumentResponse++ request = post "DescribeDocument"+ response = jsonResponse++instance FromJSON DescribeDocumentResponse where+ parseJSON = withObject "DescribeDocumentResponse" $ \o -> DescribeDocumentResponse+ <$> o .:? "Document"
+ gen/Network/AWS/SSM/GetDocument.hs view
@@ -0,0 +1,121 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SSM.GetDocument+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Gets the contents of the specified configuration document.+--+-- <http://docs.aws.amazon.com/ssm/latest/APIReference/API_GetDocument.html>+module Network.AWS.SSM.GetDocument+ (+ -- * Request+ GetDocument+ -- ** Request constructor+ , getDocument+ -- ** Request lenses+ , gdName++ -- * Response+ , GetDocumentResponse+ -- ** Response constructor+ , getDocumentResponse+ -- ** Response lenses+ , gdrContent+ , gdrName+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SSM.Types+import qualified GHC.Exts++newtype GetDocument = GetDocument+ { _gdName :: Text+ } deriving (Eq, Ord, Read, Show, Monoid, IsString)++-- | 'GetDocument' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gdName' @::@ 'Text'+--+getDocument :: Text -- ^ 'gdName'+ -> GetDocument+getDocument p1 = GetDocument+ { _gdName = p1+ }++-- | The name of the configuration document.+gdName :: Lens' GetDocument Text+gdName = lens _gdName (\s a -> s { _gdName = a })++data GetDocumentResponse = GetDocumentResponse+ { _gdrContent :: Maybe Text+ , _gdrName :: Maybe Text+ } deriving (Eq, Ord, Read, Show)++-- | 'GetDocumentResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'gdrContent' @::@ 'Maybe' 'Text'+--+-- * 'gdrName' @::@ 'Maybe' 'Text'+--+getDocumentResponse :: GetDocumentResponse+getDocumentResponse = GetDocumentResponse+ { _gdrName = Nothing+ , _gdrContent = Nothing+ }++-- | The contents of the configuration document.+gdrContent :: Lens' GetDocumentResponse (Maybe Text)+gdrContent = lens _gdrContent (\s a -> s { _gdrContent = a })++-- | The name of the configuration document.+gdrName :: Lens' GetDocumentResponse (Maybe Text)+gdrName = lens _gdrName (\s a -> s { _gdrName = a })++instance ToPath GetDocument where+ toPath = const "/"++instance ToQuery GetDocument where+ toQuery = const mempty++instance ToHeaders GetDocument++instance ToJSON GetDocument where+ toJSON GetDocument{..} = object+ [ "Name" .= _gdName+ ]++instance AWSRequest GetDocument where+ type Sv GetDocument = SSM+ type Rs GetDocument = GetDocumentResponse++ request = post "GetDocument"+ response = jsonResponse++instance FromJSON GetDocumentResponse where+ parseJSON = withObject "GetDocumentResponse" $ \o -> GetDocumentResponse+ <$> o .:? "Content"+ <*> o .:? "Name"
+ gen/Network/AWS/SSM/ListAssociations.hs view
@@ -0,0 +1,147 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SSM.ListAssociations+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Lists the associations for the specified configuration document or instance.+--+-- <http://docs.aws.amazon.com/ssm/latest/APIReference/API_ListAssociations.html>+module Network.AWS.SSM.ListAssociations+ (+ -- * Request+ ListAssociations+ -- ** Request constructor+ , listAssociations+ -- ** Request lenses+ , laAssociationFilterList+ , laMaxResults+ , laNextToken++ -- * Response+ , ListAssociationsResponse+ -- ** Response constructor+ , listAssociationsResponse+ -- ** Response lenses+ , larAssociations+ , larNextToken+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SSM.Types+import qualified GHC.Exts++data ListAssociations = ListAssociations+ { _laAssociationFilterList :: List1 "AssociationFilter" AssociationFilter+ , _laMaxResults :: Maybe Nat+ , _laNextToken :: Maybe Text+ } deriving (Eq, Read, Show)++-- | 'ListAssociations' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'laAssociationFilterList' @::@ 'NonEmpty' 'AssociationFilter'+--+-- * 'laMaxResults' @::@ 'Maybe' 'Natural'+--+-- * 'laNextToken' @::@ 'Maybe' 'Text'+--+listAssociations :: NonEmpty AssociationFilter -- ^ 'laAssociationFilterList'+ -> ListAssociations+listAssociations p1 = ListAssociations+ { _laAssociationFilterList = withIso _List1 (const id) p1+ , _laMaxResults = Nothing+ , _laNextToken = Nothing+ }++-- | One or more filters. Use a filter to return a more specific list of results.+laAssociationFilterList :: Lens' ListAssociations (NonEmpty AssociationFilter)+laAssociationFilterList =+ lens _laAssociationFilterList (\s a -> s { _laAssociationFilterList = a })+ . _List1++-- | The maximum number of items to return for this call. The call also returns a+-- token that you can specify in a subsequent call to get the next set of+-- results.+laMaxResults :: Lens' ListAssociations (Maybe Natural)+laMaxResults = lens _laMaxResults (\s a -> s { _laMaxResults = a }) . mapping _Nat++-- | The token for the next set of items to return. (You received this token from+-- a previous call.)+laNextToken :: Lens' ListAssociations (Maybe Text)+laNextToken = lens _laNextToken (\s a -> s { _laNextToken = a })++data ListAssociationsResponse = ListAssociationsResponse+ { _larAssociations :: List "Association" Association+ , _larNextToken :: Maybe Text+ } deriving (Eq, Read, Show)++-- | 'ListAssociationsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'larAssociations' @::@ ['Association']+--+-- * 'larNextToken' @::@ 'Maybe' 'Text'+--+listAssociationsResponse :: ListAssociationsResponse+listAssociationsResponse = ListAssociationsResponse+ { _larAssociations = mempty+ , _larNextToken = Nothing+ }++-- | The associations.+larAssociations :: Lens' ListAssociationsResponse [Association]+larAssociations = lens _larAssociations (\s a -> s { _larAssociations = a }) . _List++-- | The token to use when requesting the next set of items. If there are no+-- additional items to return, the string is empty.+larNextToken :: Lens' ListAssociationsResponse (Maybe Text)+larNextToken = lens _larNextToken (\s a -> s { _larNextToken = a })++instance ToPath ListAssociations where+ toPath = const "/"++instance ToQuery ListAssociations where+ toQuery = const mempty++instance ToHeaders ListAssociations++instance ToJSON ListAssociations where+ toJSON ListAssociations{..} = object+ [ "AssociationFilterList" .= _laAssociationFilterList+ , "MaxResults" .= _laMaxResults+ , "NextToken" .= _laNextToken+ ]++instance AWSRequest ListAssociations where+ type Sv ListAssociations = SSM+ type Rs ListAssociations = ListAssociationsResponse++ request = post "ListAssociations"+ response = jsonResponse++instance FromJSON ListAssociationsResponse where+ parseJSON = withObject "ListAssociationsResponse" $ \o -> ListAssociationsResponse+ <$> o .:? "Associations" .!= mempty+ <*> o .:? "NextToken"
+ gen/Network/AWS/SSM/ListDocuments.hs view
@@ -0,0 +1,149 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SSM.ListDocuments+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Describes one or more of your configuration documents.+--+-- <http://docs.aws.amazon.com/ssm/latest/APIReference/API_ListDocuments.html>+module Network.AWS.SSM.ListDocuments+ (+ -- * Request+ ListDocuments+ -- ** Request constructor+ , listDocuments+ -- ** Request lenses+ , ldDocumentFilterList+ , ldMaxResults+ , ldNextToken++ -- * Response+ , ListDocumentsResponse+ -- ** Response constructor+ , listDocumentsResponse+ -- ** Response lenses+ , ldrDocumentIdentifiers+ , ldrNextToken+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SSM.Types+import qualified GHC.Exts++data ListDocuments = ListDocuments+ { _ldDocumentFilterList :: List1 "DocumentFilter" DocumentFilter+ , _ldMaxResults :: Maybe Nat+ , _ldNextToken :: Maybe Text+ } deriving (Eq, Read, Show)++-- | 'ListDocuments' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ldDocumentFilterList' @::@ 'NonEmpty' 'DocumentFilter'+--+-- * 'ldMaxResults' @::@ 'Maybe' 'Natural'+--+-- * 'ldNextToken' @::@ 'Maybe' 'Text'+--+listDocuments :: NonEmpty DocumentFilter -- ^ 'ldDocumentFilterList'+ -> ListDocuments+listDocuments p1 = ListDocuments+ { _ldDocumentFilterList = withIso _List1 (const id) p1+ , _ldMaxResults = Nothing+ , _ldNextToken = Nothing+ }++-- | One or more filters. Use a filter to return a more specific list of results.+ldDocumentFilterList :: Lens' ListDocuments (NonEmpty DocumentFilter)+ldDocumentFilterList =+ lens _ldDocumentFilterList (\s a -> s { _ldDocumentFilterList = a })+ . _List1++-- | The maximum number of items to return for this call. The call also returns a+-- token that you can specify in a subsequent call to get the next set of+-- results.+ldMaxResults :: Lens' ListDocuments (Maybe Natural)+ldMaxResults = lens _ldMaxResults (\s a -> s { _ldMaxResults = a }) . mapping _Nat++-- | The token for the next set of items to return. (You received this token from+-- a previous call.)+ldNextToken :: Lens' ListDocuments (Maybe Text)+ldNextToken = lens _ldNextToken (\s a -> s { _ldNextToken = a })++data ListDocumentsResponse = ListDocumentsResponse+ { _ldrDocumentIdentifiers :: List "DocumentIdentifier" DocumentIdentifier+ , _ldrNextToken :: Maybe Text+ } deriving (Eq, Read, Show)++-- | 'ListDocumentsResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'ldrDocumentIdentifiers' @::@ ['DocumentIdentifier']+--+-- * 'ldrNextToken' @::@ 'Maybe' 'Text'+--+listDocumentsResponse :: ListDocumentsResponse+listDocumentsResponse = ListDocumentsResponse+ { _ldrDocumentIdentifiers = mempty+ , _ldrNextToken = Nothing+ }++-- | The names of the configuration documents.+ldrDocumentIdentifiers :: Lens' ListDocumentsResponse [DocumentIdentifier]+ldrDocumentIdentifiers =+ lens _ldrDocumentIdentifiers (\s a -> s { _ldrDocumentIdentifiers = a })+ . _List++-- | The token to use when requesting the next set of items. If there are no+-- additional items to return, the string is empty.+ldrNextToken :: Lens' ListDocumentsResponse (Maybe Text)+ldrNextToken = lens _ldrNextToken (\s a -> s { _ldrNextToken = a })++instance ToPath ListDocuments where+ toPath = const "/"++instance ToQuery ListDocuments where+ toQuery = const mempty++instance ToHeaders ListDocuments++instance ToJSON ListDocuments where+ toJSON ListDocuments{..} = object+ [ "DocumentFilterList" .= _ldDocumentFilterList+ , "MaxResults" .= _ldMaxResults+ , "NextToken" .= _ldNextToken+ ]++instance AWSRequest ListDocuments where+ type Sv ListDocuments = SSM+ type Rs ListDocuments = ListDocumentsResponse++ request = post "ListDocuments"+ response = jsonResponse++instance FromJSON ListDocumentsResponse where+ parseJSON = withObject "ListDocumentsResponse" $ \o -> ListDocumentsResponse+ <$> o .:? "DocumentIdentifiers" .!= mempty+ <*> o .:? "NextToken"
+ gen/Network/AWS/SSM/Types.hs view
@@ -0,0 +1,711 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE ViewPatterns #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SSM.Types+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++module Network.AWS.SSM.Types+ (+ -- * Service+ SSM+ -- ** Error+ , JSONError++ -- * CreateAssociationBatchRequestEntry+ , CreateAssociationBatchRequestEntry+ , createAssociationBatchRequestEntry+ , cabreInstanceId+ , cabreName++ -- * DocumentFilter+ , DocumentFilter+ , documentFilter+ , dfKey+ , dfValue++ -- * AssociationDescription+ , AssociationDescription+ , associationDescription+ , adDate+ , adInstanceId+ , adName+ , adStatus++ -- * AssociationStatusName+ , AssociationStatusName (..)++ -- * DocumentFilterKey+ , DocumentFilterKey (..)++ -- * DocumentDescription+ , DocumentDescription+ , documentDescription+ , dd1CreatedDate+ , dd1Name+ , dd1Sha1+ , dd1Status++ -- * AssociationFilter+ , AssociationFilter+ , associationFilter+ , afKey+ , afValue++ -- * DocumentIdentifier+ , DocumentIdentifier+ , documentIdentifier+ , diName++ -- * Fault+ , Fault (..)++ -- * AssociationStatus+ , AssociationStatus+ , associationStatus+ , asAdditionalInfo+ , asDate+ , asMessage+ , asName++ -- * DocumentStatus+ , DocumentStatus (..)++ -- * AssociationFilterKey+ , AssociationFilterKey (..)++ -- * FailedCreateAssociation+ , FailedCreateAssociation+ , failedCreateAssociation+ , fcaEntry+ , fcaFault+ , fcaMessage++ -- * Association+ , Association+ , association+ , aInstanceId+ , aName+ ) where++import Network.AWS.Prelude+import Network.AWS.Signing+import qualified GHC.Exts++-- | Version @2014-11-06@ of the Amazon Simple Systems Management Service service.+data SSM++instance AWSService SSM where+ type Sg SSM = V4+ type Er SSM = JSONError++ service = service'+ where+ service' :: Service SSM+ service' = Service+ { _svcAbbrev = "SSM"+ , _svcPrefix = "ssm"+ , _svcVersion = "2014-11-06"+ , _svcTargetPrefix = Just "AmazonSSM"+ , _svcJSONVersion = Just "1.1"+ , _svcHandle = handle+ , _svcRetry = retry+ }++ handle :: Status+ -> Maybe (LazyByteString -> ServiceError JSONError)+ handle = jsonError statusSuccess service'++ retry :: Retry SSM+ retry = Exponential+ { _retryBase = 0.05+ , _retryGrowth = 2+ , _retryAttempts = 5+ , _retryCheck = check+ }++ check :: Status+ -> JSONError+ -> Bool+ check (statusCode -> s) (awsErrorCode -> e)+ | s == 500 = True -- General Server Error+ | s == 509 = True -- Limit Exceeded+ | s == 503 = True -- Service Unavailable+ | otherwise = False++data CreateAssociationBatchRequestEntry = CreateAssociationBatchRequestEntry+ { _cabreInstanceId :: Maybe Text+ , _cabreName :: Maybe Text+ } deriving (Eq, Ord, Read, Show)++-- | 'CreateAssociationBatchRequestEntry' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'cabreInstanceId' @::@ 'Maybe' 'Text'+--+-- * 'cabreName' @::@ 'Maybe' 'Text'+--+createAssociationBatchRequestEntry :: CreateAssociationBatchRequestEntry+createAssociationBatchRequestEntry = CreateAssociationBatchRequestEntry+ { _cabreName = Nothing+ , _cabreInstanceId = Nothing+ }++-- | The ID of the instance.+cabreInstanceId :: Lens' CreateAssociationBatchRequestEntry (Maybe Text)+cabreInstanceId = lens _cabreInstanceId (\s a -> s { _cabreInstanceId = a })++-- | The name of the configuration document.+cabreName :: Lens' CreateAssociationBatchRequestEntry (Maybe Text)+cabreName = lens _cabreName (\s a -> s { _cabreName = a })++instance FromJSON CreateAssociationBatchRequestEntry where+ parseJSON = withObject "CreateAssociationBatchRequestEntry" $ \o -> CreateAssociationBatchRequestEntry+ <$> o .:? "InstanceId"+ <*> o .:? "Name"++instance ToJSON CreateAssociationBatchRequestEntry where+ toJSON CreateAssociationBatchRequestEntry{..} = object+ [ "Name" .= _cabreName+ , "InstanceId" .= _cabreInstanceId+ ]++data DocumentFilter = DocumentFilter+ { _dfKey :: DocumentFilterKey+ , _dfValue :: Text+ } deriving (Eq, Read, Show)++-- | 'DocumentFilter' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dfKey' @::@ 'DocumentFilterKey'+--+-- * 'dfValue' @::@ 'Text'+--+documentFilter :: DocumentFilterKey -- ^ 'dfKey'+ -> Text -- ^ 'dfValue'+ -> DocumentFilter+documentFilter p1 p2 = DocumentFilter+ { _dfKey = p1+ , _dfValue = p2+ }++-- | The name of the filter.+dfKey :: Lens' DocumentFilter DocumentFilterKey+dfKey = lens _dfKey (\s a -> s { _dfKey = a })++-- | The value of the filter.+dfValue :: Lens' DocumentFilter Text+dfValue = lens _dfValue (\s a -> s { _dfValue = a })++instance FromJSON DocumentFilter where+ parseJSON = withObject "DocumentFilter" $ \o -> DocumentFilter+ <$> o .: "key"+ <*> o .: "value"++instance ToJSON DocumentFilter where+ toJSON DocumentFilter{..} = object+ [ "key" .= _dfKey+ , "value" .= _dfValue+ ]++data AssociationDescription = AssociationDescription+ { _adDate :: Maybe POSIX+ , _adInstanceId :: Maybe Text+ , _adName :: Maybe Text+ , _adStatus :: Maybe AssociationStatus+ } deriving (Eq, Read, Show)++-- | 'AssociationDescription' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'adDate' @::@ 'Maybe' 'UTCTime'+--+-- * 'adInstanceId' @::@ 'Maybe' 'Text'+--+-- * 'adName' @::@ 'Maybe' 'Text'+--+-- * 'adStatus' @::@ 'Maybe' 'AssociationStatus'+--+associationDescription :: AssociationDescription+associationDescription = AssociationDescription+ { _adName = Nothing+ , _adInstanceId = Nothing+ , _adDate = Nothing+ , _adStatus = Nothing+ }++-- | The date when the association was made.+adDate :: Lens' AssociationDescription (Maybe UTCTime)+adDate = lens _adDate (\s a -> s { _adDate = a }) . mapping _Time++-- | The ID of the instance.+adInstanceId :: Lens' AssociationDescription (Maybe Text)+adInstanceId = lens _adInstanceId (\s a -> s { _adInstanceId = a })++-- | The name of the configuration document.+adName :: Lens' AssociationDescription (Maybe Text)+adName = lens _adName (\s a -> s { _adName = a })++-- | The association status.+adStatus :: Lens' AssociationDescription (Maybe AssociationStatus)+adStatus = lens _adStatus (\s a -> s { _adStatus = a })++instance FromJSON AssociationDescription where+ parseJSON = withObject "AssociationDescription" $ \o -> AssociationDescription+ <$> o .:? "Date"+ <*> o .:? "InstanceId"+ <*> o .:? "Name"+ <*> o .:? "Status"++instance ToJSON AssociationDescription where+ toJSON AssociationDescription{..} = object+ [ "Name" .= _adName+ , "InstanceId" .= _adInstanceId+ , "Date" .= _adDate+ , "Status" .= _adStatus+ ]++data AssociationStatusName+ = Failed -- ^ Failed+ | Pending -- ^ Pending+ | Success -- ^ Success+ deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable AssociationStatusName++instance FromText AssociationStatusName where+ parser = takeLowerText >>= \case+ "failed" -> pure Failed+ "pending" -> pure Pending+ "success" -> pure Success+ e -> fail $+ "Failure parsing AssociationStatusName from " ++ show e++instance ToText AssociationStatusName where+ toText = \case+ Failed -> "Failed"+ Pending -> "Pending"+ Success -> "Success"++instance ToByteString AssociationStatusName+instance ToHeader AssociationStatusName+instance ToQuery AssociationStatusName++instance FromJSON AssociationStatusName where+ parseJSON = parseJSONText "AssociationStatusName"++instance ToJSON AssociationStatusName where+ toJSON = toJSONText++data DocumentFilterKey+ = Name -- ^ Name+ deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable DocumentFilterKey++instance FromText DocumentFilterKey where+ parser = takeLowerText >>= \case+ "name" -> pure Name+ e -> fail $+ "Failure parsing DocumentFilterKey from " ++ show e++instance ToText DocumentFilterKey where+ toText Name = "Name"++instance ToByteString DocumentFilterKey+instance ToHeader DocumentFilterKey+instance ToQuery DocumentFilterKey++instance FromJSON DocumentFilterKey where+ parseJSON = parseJSONText "DocumentFilterKey"++instance ToJSON DocumentFilterKey where+ toJSON = toJSONText++data DocumentDescription = DocumentDescription+ { _dd1CreatedDate :: Maybe POSIX+ , _dd1Name :: Maybe Text+ , _dd1Sha1 :: Maybe Text+ , _dd1Status :: Maybe DocumentStatus+ } deriving (Eq, Read, Show)++-- | 'DocumentDescription' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'dd1CreatedDate' @::@ 'Maybe' 'UTCTime'+--+-- * 'dd1Name' @::@ 'Maybe' 'Text'+--+-- * 'dd1Sha1' @::@ 'Maybe' 'Text'+--+-- * 'dd1Status' @::@ 'Maybe' 'DocumentStatus'+--+documentDescription :: DocumentDescription+documentDescription = DocumentDescription+ { _dd1Sha1 = Nothing+ , _dd1Name = Nothing+ , _dd1CreatedDate = Nothing+ , _dd1Status = Nothing+ }++-- | The date when the configuration document was created.+dd1CreatedDate :: Lens' DocumentDescription (Maybe UTCTime)+dd1CreatedDate = lens _dd1CreatedDate (\s a -> s { _dd1CreatedDate = a }) . mapping _Time++-- | The name of the configuration document.+dd1Name :: Lens' DocumentDescription (Maybe Text)+dd1Name = lens _dd1Name (\s a -> s { _dd1Name = a })++-- | The SHA1 hash of the document, which you can use for verification purposes.+dd1Sha1 :: Lens' DocumentDescription (Maybe Text)+dd1Sha1 = lens _dd1Sha1 (\s a -> s { _dd1Sha1 = a })++-- | The status of the configuration document.+dd1Status :: Lens' DocumentDescription (Maybe DocumentStatus)+dd1Status = lens _dd1Status (\s a -> s { _dd1Status = a })++instance FromJSON DocumentDescription where+ parseJSON = withObject "DocumentDescription" $ \o -> DocumentDescription+ <$> o .:? "CreatedDate"+ <*> o .:? "Name"+ <*> o .:? "Sha1"+ <*> o .:? "Status"++instance ToJSON DocumentDescription where+ toJSON DocumentDescription{..} = object+ [ "Sha1" .= _dd1Sha1+ , "Name" .= _dd1Name+ , "CreatedDate" .= _dd1CreatedDate+ , "Status" .= _dd1Status+ ]++data AssociationFilter = AssociationFilter+ { _afKey :: AssociationFilterKey+ , _afValue :: Text+ } deriving (Eq, Read, Show)++-- | 'AssociationFilter' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'afKey' @::@ 'AssociationFilterKey'+--+-- * 'afValue' @::@ 'Text'+--+associationFilter :: AssociationFilterKey -- ^ 'afKey'+ -> Text -- ^ 'afValue'+ -> AssociationFilter+associationFilter p1 p2 = AssociationFilter+ { _afKey = p1+ , _afValue = p2+ }++-- | The name of the filter.+afKey :: Lens' AssociationFilter AssociationFilterKey+afKey = lens _afKey (\s a -> s { _afKey = a })++-- | The filter value.+afValue :: Lens' AssociationFilter Text+afValue = lens _afValue (\s a -> s { _afValue = a })++instance FromJSON AssociationFilter where+ parseJSON = withObject "AssociationFilter" $ \o -> AssociationFilter+ <$> o .: "key"+ <*> o .: "value"++instance ToJSON AssociationFilter where+ toJSON AssociationFilter{..} = object+ [ "key" .= _afKey+ , "value" .= _afValue+ ]++newtype DocumentIdentifier = DocumentIdentifier+ { _diName :: Maybe Text+ } deriving (Eq, Ord, Read, Show, Monoid)++-- | 'DocumentIdentifier' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'diName' @::@ 'Maybe' 'Text'+--+documentIdentifier :: DocumentIdentifier+documentIdentifier = DocumentIdentifier+ { _diName = Nothing+ }++-- | The name of the configuration document.+diName :: Lens' DocumentIdentifier (Maybe Text)+diName = lens _diName (\s a -> s { _diName = a })++instance FromJSON DocumentIdentifier where+ parseJSON = withObject "DocumentIdentifier" $ \o -> DocumentIdentifier+ <$> o .:? "Name"++instance ToJSON DocumentIdentifier where+ toJSON DocumentIdentifier{..} = object+ [ "Name" .= _diName+ ]++data Fault+ = Client -- ^ Client+ | Server -- ^ Server+ | Unknown -- ^ Unknown+ deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable Fault++instance FromText Fault where+ parser = takeLowerText >>= \case+ "client" -> pure Client+ "server" -> pure Server+ "unknown" -> pure Unknown+ e -> fail $+ "Failure parsing Fault from " ++ show e++instance ToText Fault where+ toText = \case+ Client -> "Client"+ Server -> "Server"+ Unknown -> "Unknown"++instance ToByteString Fault+instance ToHeader Fault+instance ToQuery Fault++instance FromJSON Fault where+ parseJSON = parseJSONText "Fault"++instance ToJSON Fault where+ toJSON = toJSONText++data AssociationStatus = AssociationStatus+ { _asAdditionalInfo :: Maybe Text+ , _asDate :: POSIX+ , _asMessage :: Text+ , _asName :: AssociationStatusName+ } deriving (Eq, Read, Show)++-- | 'AssociationStatus' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'asAdditionalInfo' @::@ 'Maybe' 'Text'+--+-- * 'asDate' @::@ 'UTCTime'+--+-- * 'asMessage' @::@ 'Text'+--+-- * 'asName' @::@ 'AssociationStatusName'+--+associationStatus :: UTCTime -- ^ 'asDate'+ -> AssociationStatusName -- ^ 'asName'+ -> Text -- ^ 'asMessage'+ -> AssociationStatus+associationStatus p1 p2 p3 = AssociationStatus+ { _asDate = withIso _Time (const id) p1+ , _asName = p2+ , _asMessage = p3+ , _asAdditionalInfo = Nothing+ }++-- | A user-defined string.+asAdditionalInfo :: Lens' AssociationStatus (Maybe Text)+asAdditionalInfo = lens _asAdditionalInfo (\s a -> s { _asAdditionalInfo = a })++-- | The date when the status changed.+asDate :: Lens' AssociationStatus UTCTime+asDate = lens _asDate (\s a -> s { _asDate = a }) . _Time++-- | The reason for the status.+asMessage :: Lens' AssociationStatus Text+asMessage = lens _asMessage (\s a -> s { _asMessage = a })++-- | The status.+asName :: Lens' AssociationStatus AssociationStatusName+asName = lens _asName (\s a -> s { _asName = a })++instance FromJSON AssociationStatus where+ parseJSON = withObject "AssociationStatus" $ \o -> AssociationStatus+ <$> o .:? "AdditionalInfo"+ <*> o .: "Date"+ <*> o .: "Message"+ <*> o .: "Name"++instance ToJSON AssociationStatus where+ toJSON AssociationStatus{..} = object+ [ "Date" .= _asDate+ , "Name" .= _asName+ , "Message" .= _asMessage+ , "AdditionalInfo" .= _asAdditionalInfo+ ]++data DocumentStatus+ = Active -- ^ Active+ | Creating -- ^ Creating+ | Deleting -- ^ Deleting+ deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable DocumentStatus++instance FromText DocumentStatus where+ parser = takeLowerText >>= \case+ "active" -> pure Active+ "creating" -> pure Creating+ "deleting" -> pure Deleting+ e -> fail $+ "Failure parsing DocumentStatus from " ++ show e++instance ToText DocumentStatus where+ toText = \case+ Active -> "Active"+ Creating -> "Creating"+ Deleting -> "Deleting"++instance ToByteString DocumentStatus+instance ToHeader DocumentStatus+instance ToQuery DocumentStatus++instance FromJSON DocumentStatus where+ parseJSON = parseJSONText "DocumentStatus"++instance ToJSON DocumentStatus where+ toJSON = toJSONText++data AssociationFilterKey+ = AFKInstanceId -- ^ InstanceId+ | AFKName -- ^ Name+ deriving (Eq, Ord, Read, Show, Generic, Enum)++instance Hashable AssociationFilterKey++instance FromText AssociationFilterKey where+ parser = takeLowerText >>= \case+ "instanceid" -> pure AFKInstanceId+ "name" -> pure AFKName+ e -> fail $+ "Failure parsing AssociationFilterKey from " ++ show e++instance ToText AssociationFilterKey where+ toText = \case+ AFKInstanceId -> "InstanceId"+ AFKName -> "Name"++instance ToByteString AssociationFilterKey+instance ToHeader AssociationFilterKey+instance ToQuery AssociationFilterKey++instance FromJSON AssociationFilterKey where+ parseJSON = parseJSONText "AssociationFilterKey"++instance ToJSON AssociationFilterKey where+ toJSON = toJSONText++data FailedCreateAssociation = FailedCreateAssociation+ { _fcaEntry :: Maybe CreateAssociationBatchRequestEntry+ , _fcaFault :: Maybe Fault+ , _fcaMessage :: Maybe Text+ } deriving (Eq, Read, Show)++-- | 'FailedCreateAssociation' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'fcaEntry' @::@ 'Maybe' 'CreateAssociationBatchRequestEntry'+--+-- * 'fcaFault' @::@ 'Maybe' 'Fault'+--+-- * 'fcaMessage' @::@ 'Maybe' 'Text'+--+failedCreateAssociation :: FailedCreateAssociation+failedCreateAssociation = FailedCreateAssociation+ { _fcaEntry = Nothing+ , _fcaMessage = Nothing+ , _fcaFault = Nothing+ }++-- | The association.+fcaEntry :: Lens' FailedCreateAssociation (Maybe CreateAssociationBatchRequestEntry)+fcaEntry = lens _fcaEntry (\s a -> s { _fcaEntry = a })++-- | The source of the failure.+fcaFault :: Lens' FailedCreateAssociation (Maybe Fault)+fcaFault = lens _fcaFault (\s a -> s { _fcaFault = a })++-- | A description of the failure.+fcaMessage :: Lens' FailedCreateAssociation (Maybe Text)+fcaMessage = lens _fcaMessage (\s a -> s { _fcaMessage = a })++instance FromJSON FailedCreateAssociation where+ parseJSON = withObject "FailedCreateAssociation" $ \o -> FailedCreateAssociation+ <$> o .:? "Entry"+ <*> o .:? "Fault"+ <*> o .:? "Message"++instance ToJSON FailedCreateAssociation where+ toJSON FailedCreateAssociation{..} = object+ [ "Entry" .= _fcaEntry+ , "Message" .= _fcaMessage+ , "Fault" .= _fcaFault+ ]++data Association = Association+ { _aInstanceId :: Maybe Text+ , _aName :: Maybe Text+ } deriving (Eq, Ord, Read, Show)++-- | 'Association' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'aInstanceId' @::@ 'Maybe' 'Text'+--+-- * 'aName' @::@ 'Maybe' 'Text'+--+association :: Association+association = Association+ { _aName = Nothing+ , _aInstanceId = Nothing+ }++-- | The ID of the instance.+aInstanceId :: Lens' Association (Maybe Text)+aInstanceId = lens _aInstanceId (\s a -> s { _aInstanceId = a })++-- | The name of the configuration document.+aName :: Lens' Association (Maybe Text)+aName = lens _aName (\s a -> s { _aName = a })++instance FromJSON Association where+ parseJSON = withObject "Association" $ \o -> Association+ <$> o .:? "InstanceId"+ <*> o .:? "Name"++instance ToJSON Association where+ toJSON Association{..} = object+ [ "Name" .= _aName+ , "InstanceId" .= _aInstanceId+ ]
+ gen/Network/AWS/SSM/UpdateAssociationStatus.hs view
@@ -0,0 +1,137 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Network.AWS.SSM.UpdateAssociationStatus+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>+-- 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)+--+-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- | Updates the status of the configuration document associated with the+-- specified instance.+--+-- <http://docs.aws.amazon.com/ssm/latest/APIReference/API_UpdateAssociationStatus.html>+module Network.AWS.SSM.UpdateAssociationStatus+ (+ -- * Request+ UpdateAssociationStatus+ -- ** Request constructor+ , updateAssociationStatus+ -- ** Request lenses+ , uasAssociationStatus+ , uasInstanceId+ , uasName++ -- * Response+ , UpdateAssociationStatusResponse+ -- ** Response constructor+ , updateAssociationStatusResponse+ -- ** Response lenses+ , uasrAssociationDescription+ ) where++import Network.AWS.Prelude+import Network.AWS.Request.JSON+import Network.AWS.SSM.Types+import qualified GHC.Exts++data UpdateAssociationStatus = UpdateAssociationStatus+ { _uasAssociationStatus :: AssociationStatus+ , _uasInstanceId :: Text+ , _uasName :: Text+ } deriving (Eq, Read, Show)++-- | 'UpdateAssociationStatus' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'uasAssociationStatus' @::@ 'AssociationStatus'+--+-- * 'uasInstanceId' @::@ 'Text'+--+-- * 'uasName' @::@ 'Text'+--+updateAssociationStatus :: Text -- ^ 'uasName'+ -> Text -- ^ 'uasInstanceId'+ -> AssociationStatus -- ^ 'uasAssociationStatus'+ -> UpdateAssociationStatus+updateAssociationStatus p1 p2 p3 = UpdateAssociationStatus+ { _uasName = p1+ , _uasInstanceId = p2+ , _uasAssociationStatus = p3+ }++-- | The association status.+uasAssociationStatus :: Lens' UpdateAssociationStatus AssociationStatus+uasAssociationStatus =+ lens _uasAssociationStatus (\s a -> s { _uasAssociationStatus = a })++-- | The ID of the instance.+uasInstanceId :: Lens' UpdateAssociationStatus Text+uasInstanceId = lens _uasInstanceId (\s a -> s { _uasInstanceId = a })++-- | The name of the configuration document.+uasName :: Lens' UpdateAssociationStatus Text+uasName = lens _uasName (\s a -> s { _uasName = a })++newtype UpdateAssociationStatusResponse = UpdateAssociationStatusResponse+ { _uasrAssociationDescription :: Maybe AssociationDescription+ } deriving (Eq, Read, Show)++-- | 'UpdateAssociationStatusResponse' constructor.+--+-- The fields accessible through corresponding lenses are:+--+-- * 'uasrAssociationDescription' @::@ 'Maybe' 'AssociationDescription'+--+updateAssociationStatusResponse :: UpdateAssociationStatusResponse+updateAssociationStatusResponse = UpdateAssociationStatusResponse+ { _uasrAssociationDescription = Nothing+ }++-- | Information about the association.+uasrAssociationDescription :: Lens' UpdateAssociationStatusResponse (Maybe AssociationDescription)+uasrAssociationDescription =+ lens _uasrAssociationDescription+ (\s a -> s { _uasrAssociationDescription = a })++instance ToPath UpdateAssociationStatus where+ toPath = const "/"++instance ToQuery UpdateAssociationStatus where+ toQuery = const mempty++instance ToHeaders UpdateAssociationStatus++instance ToJSON UpdateAssociationStatus where+ toJSON UpdateAssociationStatus{..} = object+ [ "Name" .= _uasName+ , "InstanceId" .= _uasInstanceId+ , "AssociationStatus" .= _uasAssociationStatus+ ]++instance AWSRequest UpdateAssociationStatus where+ type Sv UpdateAssociationStatus = SSM+ type Rs UpdateAssociationStatus = UpdateAssociationStatusResponse++ request = post "UpdateAssociationStatus"+ response = jsonResponse++instance FromJSON UpdateAssociationStatusResponse where+ parseJSON = withObject "UpdateAssociationStatusResponse" $ \o -> UpdateAssociationStatusResponse+ <$> o .:? "AssociationDescription"