amazonka-cloudhsmv2 (empty) → 1.5.0
raw patch · 44 files changed
+3411/−0 lines, 44 filesdep +amazonka-cloudhsmv2dep +amazonka-coredep +amazonka-testsetup-changed
Dependencies added: amazonka-cloudhsmv2, amazonka-core, amazonka-test, base, bytestring, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +45/−0
- Setup.hs +2/−0
- amazonka-cloudhsmv2.cabal +95/−0
- fixture/CreateCluster.yaml +10/−0
- fixture/CreateClusterResponse.proto +0/−0
- fixture/CreateHSM.yaml +10/−0
- fixture/CreateHSMResponse.proto +0/−0
- fixture/DeleteCluster.yaml +10/−0
- fixture/DeleteClusterResponse.proto +0/−0
- fixture/DeleteHSM.yaml +10/−0
- fixture/DeleteHSMResponse.proto +0/−0
- fixture/DescribeBackups.yaml +10/−0
- fixture/DescribeBackupsResponse.proto +0/−0
- fixture/DescribeClusters.yaml +10/−0
- fixture/DescribeClustersResponse.proto +0/−0
- fixture/InitializeCluster.yaml +10/−0
- fixture/InitializeClusterResponse.proto +0/−0
- fixture/ListTags.yaml +10/−0
- fixture/ListTagsResponse.proto +0/−0
- fixture/TagResource.yaml +10/−0
- fixture/TagResourceResponse.proto +0/−0
- fixture/UntagResource.yaml +10/−0
- fixture/UntagResourceResponse.proto +0/−0
- gen/Network/AWS/CloudHSMv2.hs +184/−0
- gen/Network/AWS/CloudHSMv2/CreateCluster.hs +156/−0
- gen/Network/AWS/CloudHSMv2/CreateHSM.hs +156/−0
- gen/Network/AWS/CloudHSMv2/DeleteCluster.hs +131/−0
- gen/Network/AWS/CloudHSMv2/DeleteHSM.hs +164/−0
- gen/Network/AWS/CloudHSMv2/DescribeBackups.hs +165/−0
- gen/Network/AWS/CloudHSMv2/DescribeClusters.hs +165/−0
- gen/Network/AWS/CloudHSMv2/InitializeCluster.hs +169/−0
- gen/Network/AWS/CloudHSMv2/ListTags.hs +170/−0
- gen/Network/AWS/CloudHSMv2/TagResource.hs +133/−0
- gen/Network/AWS/CloudHSMv2/Types.hs +171/−0
- gen/Network/AWS/CloudHSMv2/Types/Product.hs +456/−0
- gen/Network/AWS/CloudHSMv2/Types/Sum.hs +158/−0
- gen/Network/AWS/CloudHSMv2/UntagResource.hs +134/−0
- gen/Network/AWS/CloudHSMv2/Waiters.hs +21/−0
- src/.gitkeep +0/−0
- test/Main.hs +21/−0
- test/Test/AWS/CloudHSMv2.hs +20/−0
- test/Test/AWS/CloudHSMv2/Internal.hs +9/−0
- test/Test/AWS/Gen/CloudHSMv2.hs +219/−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,45 @@+# Amazon CloudHSM V2 SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`1.5.0`+++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-cloudhsmv2)+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, sending requests,+and receiving responses.++Lenses are used for constructing and manipulating types,+due to the depth 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).++See [Network.AWS.CloudHSMv2](http://hackage.haskell.org/package/amazonka-cloudhsmv2/docs/Network-AWS-CloudHSMv2.html)+or [the AWS documentation](https://aws.amazon.com/documentation/) to get started.+++## 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-cloudhsmv2` 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-cloudhsmv2.cabal view
@@ -0,0 +1,95 @@+name: amazonka-cloudhsmv2+version: 1.5.0+synopsis: Amazon CloudHSM V2 SDK.+homepage: https://github.com/brendanhay/amazonka+bug-reports: https://github.com/brendanhay/amazonka/issues+license: MPL-2.0+license-file: LICENSE+author: Brendan Hay+maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>+copyright: Copyright (c) 2013-2017 Brendan Hay+category: Network, AWS, Cloud, Distributed Computing+build-type: Simple+cabal-version: >= 1.10+extra-source-files: README.md fixture/*.yaml fixture/*.proto src/.gitkeep+description:+ 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, sending requests,+ and receiving responses.+ .+ Lenses are used for constructing and manipulating types,+ due to the depth 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.CloudHSMv2" or <https://aws.amazon.com/documentation/ the AWS documentation>+ to get started.++source-repository head+ type: git+ location: git://github.com/brendanhay/amazonka.git+ subdir: amazonka-cloudhsmv2++library+ default-language: Haskell2010+ hs-source-dirs: src gen++ ghc-options:+ -Wall+ -fwarn-incomplete-uni-patterns+ -fwarn-incomplete-record-updates+ -funbox-strict-fields++ exposed-modules:+ Network.AWS.CloudHSMv2+ , Network.AWS.CloudHSMv2.CreateCluster+ , Network.AWS.CloudHSMv2.CreateHSM+ , Network.AWS.CloudHSMv2.DeleteCluster+ , Network.AWS.CloudHSMv2.DeleteHSM+ , Network.AWS.CloudHSMv2.DescribeBackups+ , Network.AWS.CloudHSMv2.DescribeClusters+ , Network.AWS.CloudHSMv2.InitializeCluster+ , Network.AWS.CloudHSMv2.ListTags+ , Network.AWS.CloudHSMv2.TagResource+ , Network.AWS.CloudHSMv2.Types+ , Network.AWS.CloudHSMv2.UntagResource+ , Network.AWS.CloudHSMv2.Waiters++ other-modules:+ Network.AWS.CloudHSMv2.Types.Product+ , Network.AWS.CloudHSMv2.Types.Sum++ build-depends:+ amazonka-core == 1.5.0.*+ , base >= 4.7 && < 5++test-suite amazonka-cloudhsmv2-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.CloudHSMv2+ , Test.AWS.Gen.CloudHSMv2+ , Test.AWS.CloudHSMv2.Internal++ build-depends:+ amazonka-core == 1.5.0.*+ , amazonka-test == 1.5.0.*+ , amazonka-cloudhsmv2+ , base+ , bytestring+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/CreateCluster.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/cloudhsmv2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: cloudhsmv2.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreateClusterResponse.proto view
+ fixture/CreateHSM.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/cloudhsmv2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: cloudhsmv2.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreateHSMResponse.proto view
+ fixture/DeleteCluster.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/cloudhsmv2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: cloudhsmv2.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeleteClusterResponse.proto view
+ fixture/DeleteHSM.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/cloudhsmv2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: cloudhsmv2.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeleteHSMResponse.proto view
+ fixture/DescribeBackups.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/cloudhsmv2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: cloudhsmv2.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DescribeBackupsResponse.proto view
+ fixture/DescribeClusters.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/cloudhsmv2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: cloudhsmv2.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DescribeClustersResponse.proto view
+ fixture/InitializeCluster.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/cloudhsmv2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: cloudhsmv2.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/InitializeClusterResponse.proto view
+ fixture/ListTags.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/cloudhsmv2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: cloudhsmv2.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListTagsResponse.proto view
+ fixture/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/cloudhsmv2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: cloudhsmv2.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/TagResourceResponse.proto view
+ fixture/UntagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/cloudhsmv2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: cloudhsmv2.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UntagResourceResponse.proto view
+ gen/Network/AWS/CloudHSMv2.hs view
@@ -0,0 +1,184 @@+{-# 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.CloudHSMv2+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- For more information about AWS CloudHSM, see <http://aws.amazon.com/cloudhsm/ AWS CloudHSM> and the <http://docs.aws.amazon.com/cloudhsm/latest/userguide/ AWS CloudHSM User Guide> .+--+--+module Network.AWS.CloudHSMv2+ (+ -- * Service Configuration+ cloudHSMv2++ -- * Errors+ -- $errors++ -- ** CloudHSMInternalFailureException+ , _CloudHSMInternalFailureException++ -- ** CloudHSMServiceException+ , _CloudHSMServiceException++ -- ** CloudHSMInvalidRequestException+ , _CloudHSMInvalidRequestException++ -- ** CloudHSMAccessDeniedException+ , _CloudHSMAccessDeniedException++ -- ** CloudHSMResourceNotFoundException+ , _CloudHSMResourceNotFoundException++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** DescribeClusters+ , module Network.AWS.CloudHSMv2.DescribeClusters++ -- ** InitializeCluster+ , module Network.AWS.CloudHSMv2.InitializeCluster++ -- ** CreateHSM+ , module Network.AWS.CloudHSMv2.CreateHSM++ -- ** DescribeBackups+ , module Network.AWS.CloudHSMv2.DescribeBackups++ -- ** DeleteCluster+ , module Network.AWS.CloudHSMv2.DeleteCluster++ -- ** CreateCluster+ , module Network.AWS.CloudHSMv2.CreateCluster++ -- ** DeleteHSM+ , module Network.AWS.CloudHSMv2.DeleteHSM++ -- ** TagResource+ , module Network.AWS.CloudHSMv2.TagResource++ -- ** ListTags+ , module Network.AWS.CloudHSMv2.ListTags++ -- ** UntagResource+ , module Network.AWS.CloudHSMv2.UntagResource++ -- * Types++ -- ** BackupPolicy+ , BackupPolicy (..)++ -- ** BackupState+ , BackupState (..)++ -- ** ClusterState+ , ClusterState (..)++ -- ** HSMState+ , HSMState (..)++ -- ** Backup+ , Backup+ , backup+ , bClusterId+ , bCreateTimestamp+ , bBackupState+ , bBackupId++ -- ** Certificates+ , Certificates+ , certificates+ , cManufacturerHardwareCertificate+ , cClusterCSR+ , cHSMCertificate+ , cClusterCertificate+ , cAWSHardwareCertificate++ -- ** Cluster+ , Cluster+ , cluster+ , cPreCoPassword+ , cStateMessage+ , cState+ , cSubnetMapping+ , cHSMs+ , cVPCId+ , cSourceBackupId+ , cCertificates+ , cSecurityGroup+ , cClusterId+ , cCreateTimestamp+ , cBackupPolicy+ , cHSMType++ -- ** HSM+ , HSM+ , hsm+ , hsmStateMessage+ , hsmState+ , hsmEniId+ , hsmSubnetId+ , hsmAvailabilityZone+ , hsmClusterId+ , hsmEniIP+ , hsmHSMId++ -- ** Tag+ , Tag+ , tag+ , tagKey+ , tagValue+ ) where++import Network.AWS.CloudHSMv2.CreateCluster+import Network.AWS.CloudHSMv2.CreateHSM+import Network.AWS.CloudHSMv2.DeleteCluster+import Network.AWS.CloudHSMv2.DeleteHSM+import Network.AWS.CloudHSMv2.DescribeBackups+import Network.AWS.CloudHSMv2.DescribeClusters+import Network.AWS.CloudHSMv2.InitializeCluster+import Network.AWS.CloudHSMv2.ListTags+import Network.AWS.CloudHSMv2.TagResource+import Network.AWS.CloudHSMv2.Types+import Network.AWS.CloudHSMv2.UntagResource+import Network.AWS.CloudHSMv2.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 'CloudHSMv2'.+-}++{- $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/CloudHSMv2/CreateCluster.hs view
@@ -0,0 +1,156 @@+{-# 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.CloudHSMv2.CreateCluster+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a new AWS CloudHSM cluster.+--+--+module Network.AWS.CloudHSMv2.CreateCluster+ (+ -- * Creating a Request+ createCluster+ , CreateCluster+ -- * Request Lenses+ , ccSourceBackupId+ , ccSubnetIds+ , ccHSMType++ -- * Destructuring the Response+ , createClusterResponse+ , CreateClusterResponse+ -- * Response Lenses+ , ccrsCluster+ , ccrsResponseStatus+ ) where++import Network.AWS.CloudHSMv2.Types+import Network.AWS.CloudHSMv2.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'createCluster' smart constructor.+data CreateCluster = CreateCluster'+ { _ccSourceBackupId :: !(Maybe Text)+ , _ccSubnetIds :: !(List1 Text)+ , _ccHSMType :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateCluster' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ccSourceBackupId' - The identifier (ID) of the cluster backup to restore. Use this value to restore the cluster from a backup instead of creating a new cluster. To find the backup ID, use 'DescribeBackups' .+--+-- * 'ccSubnetIds' - The identifiers (IDs) of the subnets where you are creating the cluster. You must specify at least one subnet. If you specify multiple subnets, they must meet the following criteria: * All subnets must be in the same virtual private cloud (VPC). * You can specify only one subnet per Availability Zone.+--+-- * 'ccHSMType' - The type of HSM to use in the cluster. Currently the only allowed value is @hsm1.medium@ .+createCluster+ :: NonEmpty Text -- ^ 'ccSubnetIds'+ -> Text -- ^ 'ccHSMType'+ -> CreateCluster+createCluster pSubnetIds_ pHSMType_ =+ CreateCluster'+ { _ccSourceBackupId = Nothing+ , _ccSubnetIds = _List1 # pSubnetIds_+ , _ccHSMType = pHSMType_+ }+++-- | The identifier (ID) of the cluster backup to restore. Use this value to restore the cluster from a backup instead of creating a new cluster. To find the backup ID, use 'DescribeBackups' .+ccSourceBackupId :: Lens' CreateCluster (Maybe Text)+ccSourceBackupId = lens _ccSourceBackupId (\ s a -> s{_ccSourceBackupId = a});++-- | The identifiers (IDs) of the subnets where you are creating the cluster. You must specify at least one subnet. If you specify multiple subnets, they must meet the following criteria: * All subnets must be in the same virtual private cloud (VPC). * You can specify only one subnet per Availability Zone.+ccSubnetIds :: Lens' CreateCluster (NonEmpty Text)+ccSubnetIds = lens _ccSubnetIds (\ s a -> s{_ccSubnetIds = a}) . _List1;++-- | The type of HSM to use in the cluster. Currently the only allowed value is @hsm1.medium@ .+ccHSMType :: Lens' CreateCluster Text+ccHSMType = lens _ccHSMType (\ s a -> s{_ccHSMType = a});++instance AWSRequest CreateCluster where+ type Rs CreateCluster = CreateClusterResponse+ request = postJSON cloudHSMv2+ response+ = receiveJSON+ (\ s h x ->+ CreateClusterResponse' <$>+ (x .?> "Cluster") <*> (pure (fromEnum s)))++instance Hashable CreateCluster where++instance NFData CreateCluster where++instance ToHeaders CreateCluster where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("BaldrApiService.CreateCluster" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateCluster where+ toJSON CreateCluster'{..}+ = object+ (catMaybes+ [("SourceBackupId" .=) <$> _ccSourceBackupId,+ Just ("SubnetIds" .= _ccSubnetIds),+ Just ("HsmType" .= _ccHSMType)])++instance ToPath CreateCluster where+ toPath = const "/"++instance ToQuery CreateCluster where+ toQuery = const mempty++-- | /See:/ 'createClusterResponse' smart constructor.+data CreateClusterResponse = CreateClusterResponse'+ { _ccrsCluster :: !(Maybe Cluster)+ , _ccrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateClusterResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ccrsCluster' - Information about the cluster that was created.+--+-- * 'ccrsResponseStatus' - -- | The response status code.+createClusterResponse+ :: Int -- ^ 'ccrsResponseStatus'+ -> CreateClusterResponse+createClusterResponse pResponseStatus_ =+ CreateClusterResponse'+ {_ccrsCluster = Nothing, _ccrsResponseStatus = pResponseStatus_}+++-- | Information about the cluster that was created.+ccrsCluster :: Lens' CreateClusterResponse (Maybe Cluster)+ccrsCluster = lens _ccrsCluster (\ s a -> s{_ccrsCluster = a});++-- | -- | The response status code.+ccrsResponseStatus :: Lens' CreateClusterResponse Int+ccrsResponseStatus = lens _ccrsResponseStatus (\ s a -> s{_ccrsResponseStatus = a});++instance NFData CreateClusterResponse where
+ gen/Network/AWS/CloudHSMv2/CreateHSM.hs view
@@ -0,0 +1,156 @@+{-# 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.CloudHSMv2.CreateHSM+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a new hardware security module (HSM) in the specified AWS CloudHSM cluster.+--+--+module Network.AWS.CloudHSMv2.CreateHSM+ (+ -- * Creating a Request+ createHSM+ , CreateHSM+ -- * Request Lenses+ , chIPAddress+ , chClusterId+ , chAvailabilityZone++ -- * Destructuring the Response+ , createHSMResponse+ , CreateHSMResponse+ -- * Response Lenses+ , chrsHSM+ , chrsResponseStatus+ ) where++import Network.AWS.CloudHSMv2.Types+import Network.AWS.CloudHSMv2.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'createHSM' smart constructor.+data CreateHSM = CreateHSM'+ { _chIPAddress :: !(Maybe Text)+ , _chClusterId :: !Text+ , _chAvailabilityZone :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateHSM' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'chIPAddress' - The HSM's IP address. If you specify an IP address, use an available address from the subnet that maps to the Availability Zone where you are creating the HSM. If you don't specify an IP address, one is chosen for you from that subnet.+--+-- * 'chClusterId' - The identifier (ID) of the HSM's cluster. To find the cluster ID, use 'DescribeClusters' .+--+-- * 'chAvailabilityZone' - The Availability Zone where you are creating the HSM. To find the cluster's Availability Zones, use 'DescribeClusters' .+createHSM+ :: Text -- ^ 'chClusterId'+ -> Text -- ^ 'chAvailabilityZone'+ -> CreateHSM+createHSM pClusterId_ pAvailabilityZone_ =+ CreateHSM'+ { _chIPAddress = Nothing+ , _chClusterId = pClusterId_+ , _chAvailabilityZone = pAvailabilityZone_+ }+++-- | The HSM's IP address. If you specify an IP address, use an available address from the subnet that maps to the Availability Zone where you are creating the HSM. If you don't specify an IP address, one is chosen for you from that subnet.+chIPAddress :: Lens' CreateHSM (Maybe Text)+chIPAddress = lens _chIPAddress (\ s a -> s{_chIPAddress = a});++-- | The identifier (ID) of the HSM's cluster. To find the cluster ID, use 'DescribeClusters' .+chClusterId :: Lens' CreateHSM Text+chClusterId = lens _chClusterId (\ s a -> s{_chClusterId = a});++-- | The Availability Zone where you are creating the HSM. To find the cluster's Availability Zones, use 'DescribeClusters' .+chAvailabilityZone :: Lens' CreateHSM Text+chAvailabilityZone = lens _chAvailabilityZone (\ s a -> s{_chAvailabilityZone = a});++instance AWSRequest CreateHSM where+ type Rs CreateHSM = CreateHSMResponse+ request = postJSON cloudHSMv2+ response+ = receiveJSON+ (\ s h x ->+ CreateHSMResponse' <$>+ (x .?> "Hsm") <*> (pure (fromEnum s)))++instance Hashable CreateHSM where++instance NFData CreateHSM where++instance ToHeaders CreateHSM where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("BaldrApiService.CreateHsm" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateHSM where+ toJSON CreateHSM'{..}+ = object+ (catMaybes+ [("IpAddress" .=) <$> _chIPAddress,+ Just ("ClusterId" .= _chClusterId),+ Just ("AvailabilityZone" .= _chAvailabilityZone)])++instance ToPath CreateHSM where+ toPath = const "/"++instance ToQuery CreateHSM where+ toQuery = const mempty++-- | /See:/ 'createHSMResponse' smart constructor.+data CreateHSMResponse = CreateHSMResponse'+ { _chrsHSM :: !(Maybe HSM)+ , _chrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateHSMResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'chrsHSM' - Information about the HSM that was created.+--+-- * 'chrsResponseStatus' - -- | The response status code.+createHSMResponse+ :: Int -- ^ 'chrsResponseStatus'+ -> CreateHSMResponse+createHSMResponse pResponseStatus_ =+ CreateHSMResponse'+ {_chrsHSM = Nothing, _chrsResponseStatus = pResponseStatus_}+++-- | Information about the HSM that was created.+chrsHSM :: Lens' CreateHSMResponse (Maybe HSM)+chrsHSM = lens _chrsHSM (\ s a -> s{_chrsHSM = a});++-- | -- | The response status code.+chrsResponseStatus :: Lens' CreateHSMResponse Int+chrsResponseStatus = lens _chrsResponseStatus (\ s a -> s{_chrsResponseStatus = a});++instance NFData CreateHSMResponse where
+ gen/Network/AWS/CloudHSMv2/DeleteCluster.hs view
@@ -0,0 +1,131 @@+{-# 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.CloudHSMv2.DeleteCluster+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the specified AWS CloudHSM cluster. Before you can delete a cluster, you must delete all HSMs in the cluster. To see if the cluster contains any HSMs, use 'DescribeClusters' . To delete an HSM, use 'DeleteHsm' .+--+--+module Network.AWS.CloudHSMv2.DeleteCluster+ (+ -- * Creating a Request+ deleteCluster+ , DeleteCluster+ -- * Request Lenses+ , dcClusterId++ -- * Destructuring the Response+ , deleteClusterResponse+ , DeleteClusterResponse+ -- * Response Lenses+ , drsCluster+ , drsResponseStatus+ ) where++import Network.AWS.CloudHSMv2.Types+import Network.AWS.CloudHSMv2.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'deleteCluster' smart constructor.+newtype DeleteCluster = DeleteCluster'+ { _dcClusterId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteCluster' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dcClusterId' - The identifier (ID) of the cluster that you are deleting. To find the cluster ID, use 'DescribeClusters' .+deleteCluster+ :: Text -- ^ 'dcClusterId'+ -> DeleteCluster+deleteCluster pClusterId_ = DeleteCluster' {_dcClusterId = pClusterId_}+++-- | The identifier (ID) of the cluster that you are deleting. To find the cluster ID, use 'DescribeClusters' .+dcClusterId :: Lens' DeleteCluster Text+dcClusterId = lens _dcClusterId (\ s a -> s{_dcClusterId = a});++instance AWSRequest DeleteCluster where+ type Rs DeleteCluster = DeleteClusterResponse+ request = postJSON cloudHSMv2+ response+ = receiveJSON+ (\ s h x ->+ DeleteClusterResponse' <$>+ (x .?> "Cluster") <*> (pure (fromEnum s)))++instance Hashable DeleteCluster where++instance NFData DeleteCluster where++instance ToHeaders DeleteCluster where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("BaldrApiService.DeleteCluster" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteCluster where+ toJSON DeleteCluster'{..}+ = object+ (catMaybes [Just ("ClusterId" .= _dcClusterId)])++instance ToPath DeleteCluster where+ toPath = const "/"++instance ToQuery DeleteCluster where+ toQuery = const mempty++-- | /See:/ 'deleteClusterResponse' smart constructor.+data DeleteClusterResponse = DeleteClusterResponse'+ { _drsCluster :: !(Maybe Cluster)+ , _drsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteClusterResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'drsCluster' - Information about the cluster that was deleted.+--+-- * 'drsResponseStatus' - -- | The response status code.+deleteClusterResponse+ :: Int -- ^ 'drsResponseStatus'+ -> DeleteClusterResponse+deleteClusterResponse pResponseStatus_ =+ DeleteClusterResponse'+ {_drsCluster = Nothing, _drsResponseStatus = pResponseStatus_}+++-- | Information about the cluster that was deleted.+drsCluster :: Lens' DeleteClusterResponse (Maybe Cluster)+drsCluster = lens _drsCluster (\ s a -> s{_drsCluster = a});++-- | -- | The response status code.+drsResponseStatus :: Lens' DeleteClusterResponse Int+drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a});++instance NFData DeleteClusterResponse where
+ gen/Network/AWS/CloudHSMv2/DeleteHSM.hs view
@@ -0,0 +1,164 @@+{-# 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.CloudHSMv2.DeleteHSM+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the specified HSM. To specify an HSM, you can use its identifier (ID), the IP address of the HSM's elastic network interface (ENI), or the ID of the HSM's ENI. You need to specify only one of these values. To find these values, use 'DescribeClusters' .+--+--+module Network.AWS.CloudHSMv2.DeleteHSM+ (+ -- * Creating a Request+ deleteHSM+ , DeleteHSM+ -- * Request Lenses+ , dhEniId+ , dhHSMId+ , dhEniIP+ , dhClusterId++ -- * Destructuring the Response+ , deleteHSMResponse+ , DeleteHSMResponse+ -- * Response Lenses+ , dhrsHSMId+ , dhrsResponseStatus+ ) where++import Network.AWS.CloudHSMv2.Types+import Network.AWS.CloudHSMv2.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'deleteHSM' smart constructor.+data DeleteHSM = DeleteHSM'+ { _dhEniId :: !(Maybe Text)+ , _dhHSMId :: !(Maybe Text)+ , _dhEniIP :: !(Maybe Text)+ , _dhClusterId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteHSM' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dhEniId' - The identifier (ID) of the elastic network interface (ENI) of the HSM that you are deleting.+--+-- * 'dhHSMId' - The identifier (ID) of the HSM that you are deleting.+--+-- * 'dhEniIP' - The IP address of the elastic network interface (ENI) of the HSM that you are deleting.+--+-- * 'dhClusterId' - The identifier (ID) of the cluster that contains the HSM that you are deleting.+deleteHSM+ :: Text -- ^ 'dhClusterId'+ -> DeleteHSM+deleteHSM pClusterId_ =+ DeleteHSM'+ { _dhEniId = Nothing+ , _dhHSMId = Nothing+ , _dhEniIP = Nothing+ , _dhClusterId = pClusterId_+ }+++-- | The identifier (ID) of the elastic network interface (ENI) of the HSM that you are deleting.+dhEniId :: Lens' DeleteHSM (Maybe Text)+dhEniId = lens _dhEniId (\ s a -> s{_dhEniId = a});++-- | The identifier (ID) of the HSM that you are deleting.+dhHSMId :: Lens' DeleteHSM (Maybe Text)+dhHSMId = lens _dhHSMId (\ s a -> s{_dhHSMId = a});++-- | The IP address of the elastic network interface (ENI) of the HSM that you are deleting.+dhEniIP :: Lens' DeleteHSM (Maybe Text)+dhEniIP = lens _dhEniIP (\ s a -> s{_dhEniIP = a});++-- | The identifier (ID) of the cluster that contains the HSM that you are deleting.+dhClusterId :: Lens' DeleteHSM Text+dhClusterId = lens _dhClusterId (\ s a -> s{_dhClusterId = a});++instance AWSRequest DeleteHSM where+ type Rs DeleteHSM = DeleteHSMResponse+ request = postJSON cloudHSMv2+ response+ = receiveJSON+ (\ s h x ->+ DeleteHSMResponse' <$>+ (x .?> "HsmId") <*> (pure (fromEnum s)))++instance Hashable DeleteHSM where++instance NFData DeleteHSM where++instance ToHeaders DeleteHSM where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("BaldrApiService.DeleteHsm" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteHSM where+ toJSON DeleteHSM'{..}+ = object+ (catMaybes+ [("EniId" .=) <$> _dhEniId,+ ("HsmId" .=) <$> _dhHSMId, ("EniIp" .=) <$> _dhEniIP,+ Just ("ClusterId" .= _dhClusterId)])++instance ToPath DeleteHSM where+ toPath = const "/"++instance ToQuery DeleteHSM where+ toQuery = const mempty++-- | /See:/ 'deleteHSMResponse' smart constructor.+data DeleteHSMResponse = DeleteHSMResponse'+ { _dhrsHSMId :: !(Maybe Text)+ , _dhrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteHSMResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dhrsHSMId' - The identifier (ID) of the HSM that was deleted.+--+-- * 'dhrsResponseStatus' - -- | The response status code.+deleteHSMResponse+ :: Int -- ^ 'dhrsResponseStatus'+ -> DeleteHSMResponse+deleteHSMResponse pResponseStatus_ =+ DeleteHSMResponse'+ {_dhrsHSMId = Nothing, _dhrsResponseStatus = pResponseStatus_}+++-- | The identifier (ID) of the HSM that was deleted.+dhrsHSMId :: Lens' DeleteHSMResponse (Maybe Text)+dhrsHSMId = lens _dhrsHSMId (\ s a -> s{_dhrsHSMId = a});++-- | -- | The response status code.+dhrsResponseStatus :: Lens' DeleteHSMResponse Int+dhrsResponseStatus = lens _dhrsResponseStatus (\ s a -> s{_dhrsResponseStatus = a});++instance NFData DeleteHSMResponse where
+ gen/Network/AWS/CloudHSMv2/DescribeBackups.hs view
@@ -0,0 +1,165 @@+{-# 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.CloudHSMv2.DescribeBackups+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Gets information about backups of AWS CloudHSM clusters.+--+--+-- This is a paginated operation, which means that each response might contain only a subset of all the backups. When the response contains only a subset of backups, it includes a @NextToken@ value. Use this value in a subsequent @DescribeBackups@ request to get more backups. When you receive a response with no @NextToken@ (or an empty or null value), that means there are no more backups to get.+--+module Network.AWS.CloudHSMv2.DescribeBackups+ (+ -- * Creating a Request+ describeBackups+ , DescribeBackups+ -- * Request Lenses+ , dbFilters+ , dbNextToken+ , dbMaxResults++ -- * Destructuring the Response+ , describeBackupsResponse+ , DescribeBackupsResponse+ -- * Response Lenses+ , dbrsBackups+ , dbrsNextToken+ , dbrsResponseStatus+ ) where++import Network.AWS.CloudHSMv2.Types+import Network.AWS.CloudHSMv2.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'describeBackups' smart constructor.+data DescribeBackups = DescribeBackups'+ { _dbFilters :: !(Maybe (Map Text [Text]))+ , _dbNextToken :: !(Maybe Text)+ , _dbMaxResults :: !(Maybe Nat)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeBackups' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dbFilters' - One or more filters to limit the items returned in the response. Use the @backupIds@ filter to return only the specified backups. Specify backups by their backup identifier (ID). Use the @clusterIds@ filter to return only the backups for the specified clusters. Specify clusters by their cluster identifier (ID). Use the @states@ filter to return only backups that match the specified state.+--+-- * 'dbNextToken' - The @NextToken@ value that you received in the previous response. Use this value to get more backups.+--+-- * 'dbMaxResults' - The maximum number of backups to return in the response. When there are more backups than the number you specify, the response contains a @NextToken@ value.+describeBackups+ :: DescribeBackups+describeBackups =+ DescribeBackups'+ {_dbFilters = Nothing, _dbNextToken = Nothing, _dbMaxResults = Nothing}+++-- | One or more filters to limit the items returned in the response. Use the @backupIds@ filter to return only the specified backups. Specify backups by their backup identifier (ID). Use the @clusterIds@ filter to return only the backups for the specified clusters. Specify clusters by their cluster identifier (ID). Use the @states@ filter to return only backups that match the specified state.+dbFilters :: Lens' DescribeBackups (HashMap Text [Text])+dbFilters = lens _dbFilters (\ s a -> s{_dbFilters = a}) . _Default . _Map;++-- | The @NextToken@ value that you received in the previous response. Use this value to get more backups.+dbNextToken :: Lens' DescribeBackups (Maybe Text)+dbNextToken = lens _dbNextToken (\ s a -> s{_dbNextToken = a});++-- | The maximum number of backups to return in the response. When there are more backups than the number you specify, the response contains a @NextToken@ value.+dbMaxResults :: Lens' DescribeBackups (Maybe Natural)+dbMaxResults = lens _dbMaxResults (\ s a -> s{_dbMaxResults = a}) . mapping _Nat;++instance AWSRequest DescribeBackups where+ type Rs DescribeBackups = DescribeBackupsResponse+ request = postJSON cloudHSMv2+ response+ = receiveJSON+ (\ s h x ->+ DescribeBackupsResponse' <$>+ (x .?> "Backups" .!@ mempty) <*> (x .?> "NextToken")+ <*> (pure (fromEnum s)))++instance Hashable DescribeBackups where++instance NFData DescribeBackups where++instance ToHeaders DescribeBackups where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("BaldrApiService.DescribeBackups" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeBackups where+ toJSON DescribeBackups'{..}+ = object+ (catMaybes+ [("Filters" .=) <$> _dbFilters,+ ("NextToken" .=) <$> _dbNextToken,+ ("MaxResults" .=) <$> _dbMaxResults])++instance ToPath DescribeBackups where+ toPath = const "/"++instance ToQuery DescribeBackups where+ toQuery = const mempty++-- | /See:/ 'describeBackupsResponse' smart constructor.+data DescribeBackupsResponse = DescribeBackupsResponse'+ { _dbrsBackups :: !(Maybe [Backup])+ , _dbrsNextToken :: !(Maybe Text)+ , _dbrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeBackupsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dbrsBackups' - A list of backups.+--+-- * 'dbrsNextToken' - An opaque string that indicates that the response contains only a subset of backups. Use this value in a subsequent @DescribeBackups@ request to get more backups.+--+-- * 'dbrsResponseStatus' - -- | The response status code.+describeBackupsResponse+ :: Int -- ^ 'dbrsResponseStatus'+ -> DescribeBackupsResponse+describeBackupsResponse pResponseStatus_ =+ DescribeBackupsResponse'+ { _dbrsBackups = Nothing+ , _dbrsNextToken = Nothing+ , _dbrsResponseStatus = pResponseStatus_+ }+++-- | A list of backups.+dbrsBackups :: Lens' DescribeBackupsResponse [Backup]+dbrsBackups = lens _dbrsBackups (\ s a -> s{_dbrsBackups = a}) . _Default . _Coerce;++-- | An opaque string that indicates that the response contains only a subset of backups. Use this value in a subsequent @DescribeBackups@ request to get more backups.+dbrsNextToken :: Lens' DescribeBackupsResponse (Maybe Text)+dbrsNextToken = lens _dbrsNextToken (\ s a -> s{_dbrsNextToken = a});++-- | -- | The response status code.+dbrsResponseStatus :: Lens' DescribeBackupsResponse Int+dbrsResponseStatus = lens _dbrsResponseStatus (\ s a -> s{_dbrsResponseStatus = a});++instance NFData DescribeBackupsResponse where
+ gen/Network/AWS/CloudHSMv2/DescribeClusters.hs view
@@ -0,0 +1,165 @@+{-# 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.CloudHSMv2.DescribeClusters+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Gets information about AWS CloudHSM clusters.+--+--+-- This is a paginated operation, which means that each response might contain only a subset of all the clusters. When the response contains only a subset of clusters, it includes a @NextToken@ value. Use this value in a subsequent @DescribeClusters@ request to get more clusters. When you receive a response with no @NextToken@ (or an empty or null value), that means there are no more clusters to get.+--+module Network.AWS.CloudHSMv2.DescribeClusters+ (+ -- * Creating a Request+ describeClusters+ , DescribeClusters+ -- * Request Lenses+ , dcFilters+ , dcNextToken+ , dcMaxResults++ -- * Destructuring the Response+ , describeClustersResponse+ , DescribeClustersResponse+ -- * Response Lenses+ , dcrsNextToken+ , dcrsClusters+ , dcrsResponseStatus+ ) where++import Network.AWS.CloudHSMv2.Types+import Network.AWS.CloudHSMv2.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'describeClusters' smart constructor.+data DescribeClusters = DescribeClusters'+ { _dcFilters :: !(Maybe (Map Text [Text]))+ , _dcNextToken :: !(Maybe Text)+ , _dcMaxResults :: !(Maybe Nat)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeClusters' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dcFilters' - One or more filters to limit the items returned in the response. Use the @clusterIds@ filter to return only the specified clusters. Specify clusters by their cluster identifier (ID). Use the @vpcIds@ filter to return only the clusters in the specified virtual private clouds (VPCs). Specify VPCs by their VPC identifier (ID). Use the @states@ filter to return only clusters that match the specified state.+--+-- * 'dcNextToken' - The @NextToken@ value that you received in the previous response. Use this value to get more clusters.+--+-- * 'dcMaxResults' - The maximum number of clusters to return in the response. When there are more clusters than the number you specify, the response contains a @NextToken@ value.+describeClusters+ :: DescribeClusters+describeClusters =+ DescribeClusters'+ {_dcFilters = Nothing, _dcNextToken = Nothing, _dcMaxResults = Nothing}+++-- | One or more filters to limit the items returned in the response. Use the @clusterIds@ filter to return only the specified clusters. Specify clusters by their cluster identifier (ID). Use the @vpcIds@ filter to return only the clusters in the specified virtual private clouds (VPCs). Specify VPCs by their VPC identifier (ID). Use the @states@ filter to return only clusters that match the specified state.+dcFilters :: Lens' DescribeClusters (HashMap Text [Text])+dcFilters = lens _dcFilters (\ s a -> s{_dcFilters = a}) . _Default . _Map;++-- | The @NextToken@ value that you received in the previous response. Use this value to get more clusters.+dcNextToken :: Lens' DescribeClusters (Maybe Text)+dcNextToken = lens _dcNextToken (\ s a -> s{_dcNextToken = a});++-- | The maximum number of clusters to return in the response. When there are more clusters than the number you specify, the response contains a @NextToken@ value.+dcMaxResults :: Lens' DescribeClusters (Maybe Natural)+dcMaxResults = lens _dcMaxResults (\ s a -> s{_dcMaxResults = a}) . mapping _Nat;++instance AWSRequest DescribeClusters where+ type Rs DescribeClusters = DescribeClustersResponse+ request = postJSON cloudHSMv2+ response+ = receiveJSON+ (\ s h x ->+ DescribeClustersResponse' <$>+ (x .?> "NextToken") <*> (x .?> "Clusters" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable DescribeClusters where++instance NFData DescribeClusters where++instance ToHeaders DescribeClusters where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("BaldrApiService.DescribeClusters" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeClusters where+ toJSON DescribeClusters'{..}+ = object+ (catMaybes+ [("Filters" .=) <$> _dcFilters,+ ("NextToken" .=) <$> _dcNextToken,+ ("MaxResults" .=) <$> _dcMaxResults])++instance ToPath DescribeClusters where+ toPath = const "/"++instance ToQuery DescribeClusters where+ toQuery = const mempty++-- | /See:/ 'describeClustersResponse' smart constructor.+data DescribeClustersResponse = DescribeClustersResponse'+ { _dcrsNextToken :: !(Maybe Text)+ , _dcrsClusters :: !(Maybe [Cluster])+ , _dcrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeClustersResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dcrsNextToken' - An opaque string that indicates that the response contains only a subset of clusters. Use this value in a subsequent @DescribeClusters@ request to get more clusters.+--+-- * 'dcrsClusters' - A list of clusters.+--+-- * 'dcrsResponseStatus' - -- | The response status code.+describeClustersResponse+ :: Int -- ^ 'dcrsResponseStatus'+ -> DescribeClustersResponse+describeClustersResponse pResponseStatus_ =+ DescribeClustersResponse'+ { _dcrsNextToken = Nothing+ , _dcrsClusters = Nothing+ , _dcrsResponseStatus = pResponseStatus_+ }+++-- | An opaque string that indicates that the response contains only a subset of clusters. Use this value in a subsequent @DescribeClusters@ request to get more clusters.+dcrsNextToken :: Lens' DescribeClustersResponse (Maybe Text)+dcrsNextToken = lens _dcrsNextToken (\ s a -> s{_dcrsNextToken = a});++-- | A list of clusters.+dcrsClusters :: Lens' DescribeClustersResponse [Cluster]+dcrsClusters = lens _dcrsClusters (\ s a -> s{_dcrsClusters = a}) . _Default . _Coerce;++-- | -- | The response status code.+dcrsResponseStatus :: Lens' DescribeClustersResponse Int+dcrsResponseStatus = lens _dcrsResponseStatus (\ s a -> s{_dcrsResponseStatus = a});++instance NFData DescribeClustersResponse where
+ gen/Network/AWS/CloudHSMv2/InitializeCluster.hs view
@@ -0,0 +1,169 @@+{-# 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.CloudHSMv2.InitializeCluster+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Claims an AWS CloudHSM cluster by submitting the cluster certificate issued by your issuing certificate authority (CA) and the CA's root certificate. Before you can claim a cluster, you must sign the cluster's certificate signing request (CSR) with your issuing CA. To get the cluster's CSR, use 'DescribeClusters' .+--+--+module Network.AWS.CloudHSMv2.InitializeCluster+ (+ -- * Creating a Request+ initializeCluster+ , InitializeCluster+ -- * Request Lenses+ , icClusterId+ , icSignedCert+ , icTrustAnchor++ -- * Destructuring the Response+ , initializeClusterResponse+ , InitializeClusterResponse+ -- * Response Lenses+ , icrsStateMessage+ , icrsState+ , icrsResponseStatus+ ) where++import Network.AWS.CloudHSMv2.Types+import Network.AWS.CloudHSMv2.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'initializeCluster' smart constructor.+data InitializeCluster = InitializeCluster'+ { _icClusterId :: !Text+ , _icSignedCert :: !Text+ , _icTrustAnchor :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'InitializeCluster' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'icClusterId' - The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use 'DescribeClusters' .+--+-- * 'icSignedCert' - The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must be in PEM format and can contain a maximum of 5000 characters.+--+-- * 'icTrustAnchor' - The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster certificate. This can be a root (self-signed) certificate or a certificate chain that begins with the certificate that issued the cluster certificate and ends with a root certificate. The certificate or certificate chain must be in PEM format and can contain a maximum of 5000 characters.+initializeCluster+ :: Text -- ^ 'icClusterId'+ -> Text -- ^ 'icSignedCert'+ -> Text -- ^ 'icTrustAnchor'+ -> InitializeCluster+initializeCluster pClusterId_ pSignedCert_ pTrustAnchor_ =+ InitializeCluster'+ { _icClusterId = pClusterId_+ , _icSignedCert = pSignedCert_+ , _icTrustAnchor = pTrustAnchor_+ }+++-- | The identifier (ID) of the cluster that you are claiming. To find the cluster ID, use 'DescribeClusters' .+icClusterId :: Lens' InitializeCluster Text+icClusterId = lens _icClusterId (\ s a -> s{_icClusterId = a});++-- | The cluster certificate issued (signed) by your issuing certificate authority (CA). The certificate must be in PEM format and can contain a maximum of 5000 characters.+icSignedCert :: Lens' InitializeCluster Text+icSignedCert = lens _icSignedCert (\ s a -> s{_icSignedCert = a});++-- | The issuing certificate of the issuing certificate authority (CA) that issued (signed) the cluster certificate. This can be a root (self-signed) certificate or a certificate chain that begins with the certificate that issued the cluster certificate and ends with a root certificate. The certificate or certificate chain must be in PEM format and can contain a maximum of 5000 characters.+icTrustAnchor :: Lens' InitializeCluster Text+icTrustAnchor = lens _icTrustAnchor (\ s a -> s{_icTrustAnchor = a});++instance AWSRequest InitializeCluster where+ type Rs InitializeCluster = InitializeClusterResponse+ request = postJSON cloudHSMv2+ response+ = receiveJSON+ (\ s h x ->+ InitializeClusterResponse' <$>+ (x .?> "StateMessage") <*> (x .?> "State") <*>+ (pure (fromEnum s)))++instance Hashable InitializeCluster where++instance NFData InitializeCluster where++instance ToHeaders InitializeCluster where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("BaldrApiService.InitializeCluster" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON InitializeCluster where+ toJSON InitializeCluster'{..}+ = object+ (catMaybes+ [Just ("ClusterId" .= _icClusterId),+ Just ("SignedCert" .= _icSignedCert),+ Just ("TrustAnchor" .= _icTrustAnchor)])++instance ToPath InitializeCluster where+ toPath = const "/"++instance ToQuery InitializeCluster where+ toQuery = const mempty++-- | /See:/ 'initializeClusterResponse' smart constructor.+data InitializeClusterResponse = InitializeClusterResponse'+ { _icrsStateMessage :: !(Maybe Text)+ , _icrsState :: !(Maybe ClusterState)+ , _icrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'InitializeClusterResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'icrsStateMessage' - A description of the cluster's state.+--+-- * 'icrsState' - The cluster's state.+--+-- * 'icrsResponseStatus' - -- | The response status code.+initializeClusterResponse+ :: Int -- ^ 'icrsResponseStatus'+ -> InitializeClusterResponse+initializeClusterResponse pResponseStatus_ =+ InitializeClusterResponse'+ { _icrsStateMessage = Nothing+ , _icrsState = Nothing+ , _icrsResponseStatus = pResponseStatus_+ }+++-- | A description of the cluster's state.+icrsStateMessage :: Lens' InitializeClusterResponse (Maybe Text)+icrsStateMessage = lens _icrsStateMessage (\ s a -> s{_icrsStateMessage = a});++-- | The cluster's state.+icrsState :: Lens' InitializeClusterResponse (Maybe ClusterState)+icrsState = lens _icrsState (\ s a -> s{_icrsState = a});++-- | -- | The response status code.+icrsResponseStatus :: Lens' InitializeClusterResponse Int+icrsResponseStatus = lens _icrsResponseStatus (\ s a -> s{_icrsResponseStatus = a});++instance NFData InitializeClusterResponse where
+ gen/Network/AWS/CloudHSMv2/ListTags.hs view
@@ -0,0 +1,170 @@+{-# 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.CloudHSMv2.ListTags+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Gets a list of tags for the specified AWS CloudHSM cluster.+--+--+-- This is a paginated operation, which means that each response might contain only a subset of all the tags. When the response contains only a subset of tags, it includes a @NextToken@ value. Use this value in a subsequent @ListTags@ request to get more tags. When you receive a response with no @NextToken@ (or an empty or null value), that means there are no more tags to get.+--+module Network.AWS.CloudHSMv2.ListTags+ (+ -- * Creating a Request+ listTags+ , ListTags+ -- * Request Lenses+ , ltNextToken+ , ltMaxResults+ , ltResourceId++ -- * Destructuring the Response+ , listTagsResponse+ , ListTagsResponse+ -- * Response Lenses+ , ltrsNextToken+ , ltrsResponseStatus+ , ltrsTagList+ ) where++import Network.AWS.CloudHSMv2.Types+import Network.AWS.CloudHSMv2.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listTags' smart constructor.+data ListTags = ListTags'+ { _ltNextToken :: !(Maybe Text)+ , _ltMaxResults :: !(Maybe Nat)+ , _ltResourceId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListTags' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ltNextToken' - The @NextToken@ value that you received in the previous response. Use this value to get more tags.+--+-- * 'ltMaxResults' - The maximum number of tags to return in the response. When there are more tags than the number you specify, the response contains a @NextToken@ value.+--+-- * 'ltResourceId' - The cluster identifier (ID) for the cluster whose tags you are getting. To find the cluster ID, use 'DescribeClusters' .+listTags+ :: Text -- ^ 'ltResourceId'+ -> ListTags+listTags pResourceId_ =+ ListTags'+ { _ltNextToken = Nothing+ , _ltMaxResults = Nothing+ , _ltResourceId = pResourceId_+ }+++-- | The @NextToken@ value that you received in the previous response. Use this value to get more tags.+ltNextToken :: Lens' ListTags (Maybe Text)+ltNextToken = lens _ltNextToken (\ s a -> s{_ltNextToken = a});++-- | The maximum number of tags to return in the response. When there are more tags than the number you specify, the response contains a @NextToken@ value.+ltMaxResults :: Lens' ListTags (Maybe Natural)+ltMaxResults = lens _ltMaxResults (\ s a -> s{_ltMaxResults = a}) . mapping _Nat;++-- | The cluster identifier (ID) for the cluster whose tags you are getting. To find the cluster ID, use 'DescribeClusters' .+ltResourceId :: Lens' ListTags Text+ltResourceId = lens _ltResourceId (\ s a -> s{_ltResourceId = a});++instance AWSRequest ListTags where+ type Rs ListTags = ListTagsResponse+ request = postJSON cloudHSMv2+ response+ = receiveJSON+ (\ s h x ->+ ListTagsResponse' <$>+ (x .?> "NextToken") <*> (pure (fromEnum s)) <*>+ (x .:> "TagList"))++instance Hashable ListTags where++instance NFData ListTags where++instance ToHeaders ListTags where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("BaldrApiService.ListTags" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListTags where+ toJSON ListTags'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _ltNextToken,+ ("MaxResults" .=) <$> _ltMaxResults,+ Just ("ResourceId" .= _ltResourceId)])++instance ToPath ListTags where+ toPath = const "/"++instance ToQuery ListTags where+ toQuery = const mempty++-- | /See:/ 'listTagsResponse' smart constructor.+data ListTagsResponse = ListTagsResponse'+ { _ltrsNextToken :: !(Maybe Text)+ , _ltrsResponseStatus :: !Int+ , _ltrsTagList :: !(List1 Tag)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListTagsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ltrsNextToken' - An opaque string that indicates that the response contains only a subset of tags. Use this value in a subsequent @ListTags@ request to get more tags.+--+-- * 'ltrsResponseStatus' - -- | The response status code.+--+-- * 'ltrsTagList' - A list of tags.+listTagsResponse+ :: Int -- ^ 'ltrsResponseStatus'+ -> NonEmpty Tag -- ^ 'ltrsTagList'+ -> ListTagsResponse+listTagsResponse pResponseStatus_ pTagList_ =+ ListTagsResponse'+ { _ltrsNextToken = Nothing+ , _ltrsResponseStatus = pResponseStatus_+ , _ltrsTagList = _List1 # pTagList_+ }+++-- | An opaque string that indicates that the response contains only a subset of tags. Use this value in a subsequent @ListTags@ request to get more tags.+ltrsNextToken :: Lens' ListTagsResponse (Maybe Text)+ltrsNextToken = lens _ltrsNextToken (\ s a -> s{_ltrsNextToken = a});++-- | -- | The response status code.+ltrsResponseStatus :: Lens' ListTagsResponse Int+ltrsResponseStatus = lens _ltrsResponseStatus (\ s a -> s{_ltrsResponseStatus = a});++-- | A list of tags.+ltrsTagList :: Lens' ListTagsResponse (NonEmpty Tag)+ltrsTagList = lens _ltrsTagList (\ s a -> s{_ltrsTagList = a}) . _List1;++instance NFData ListTagsResponse where
+ gen/Network/AWS/CloudHSMv2/TagResource.hs view
@@ -0,0 +1,133 @@+{-# 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.CloudHSMv2.TagResource+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Adds or overwrites one or more tags for the specified AWS CloudHSM cluster.+--+--+module Network.AWS.CloudHSMv2.TagResource+ (+ -- * Creating a Request+ tagResource+ , TagResource+ -- * Request Lenses+ , trResourceId+ , trTagList++ -- * Destructuring the Response+ , tagResourceResponse+ , TagResourceResponse+ -- * Response Lenses+ , trrsResponseStatus+ ) where++import Network.AWS.CloudHSMv2.Types+import Network.AWS.CloudHSMv2.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'tagResource' smart constructor.+data TagResource = TagResource'+ { _trResourceId :: !Text+ , _trTagList :: !(List1 Tag)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'TagResource' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'trResourceId' - The cluster identifier (ID) for the cluster that you are tagging. To find the cluster ID, use 'DescribeClusters' .+--+-- * 'trTagList' - A list of one or more tags.+tagResource+ :: Text -- ^ 'trResourceId'+ -> NonEmpty Tag -- ^ 'trTagList'+ -> TagResource+tagResource pResourceId_ pTagList_ =+ TagResource' {_trResourceId = pResourceId_, _trTagList = _List1 # pTagList_}+++-- | The cluster identifier (ID) for the cluster that you are tagging. To find the cluster ID, use 'DescribeClusters' .+trResourceId :: Lens' TagResource Text+trResourceId = lens _trResourceId (\ s a -> s{_trResourceId = a});++-- | A list of one or more tags.+trTagList :: Lens' TagResource (NonEmpty Tag)+trTagList = lens _trTagList (\ s a -> s{_trTagList = a}) . _List1;++instance AWSRequest TagResource where+ type Rs TagResource = TagResourceResponse+ request = postJSON cloudHSMv2+ response+ = receiveEmpty+ (\ s h x ->+ TagResourceResponse' <$> (pure (fromEnum s)))++instance Hashable TagResource where++instance NFData TagResource where++instance ToHeaders TagResource where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("BaldrApiService.TagResource" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON TagResource where+ toJSON TagResource'{..}+ = object+ (catMaybes+ [Just ("ResourceId" .= _trResourceId),+ Just ("TagList" .= _trTagList)])++instance ToPath TagResource where+ toPath = const "/"++instance ToQuery TagResource where+ toQuery = const mempty++-- | /See:/ 'tagResourceResponse' smart constructor.+newtype TagResourceResponse = TagResourceResponse'+ { _trrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'TagResourceResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'trrsResponseStatus' - -- | The response status code.+tagResourceResponse+ :: Int -- ^ 'trrsResponseStatus'+ -> TagResourceResponse+tagResourceResponse pResponseStatus_ =+ TagResourceResponse' {_trrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+trrsResponseStatus :: Lens' TagResourceResponse Int+trrsResponseStatus = lens _trrsResponseStatus (\ s a -> s{_trrsResponseStatus = a});++instance NFData TagResourceResponse where
+ gen/Network/AWS/CloudHSMv2/Types.hs view
@@ -0,0 +1,171 @@+{-# LANGUAGE OverloadedStrings #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.CloudHSMv2.Types+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.CloudHSMv2.Types+ (+ -- * Service Configuration+ cloudHSMv2++ -- * Errors+ , _CloudHSMInternalFailureException+ , _CloudHSMServiceException+ , _CloudHSMInvalidRequestException+ , _CloudHSMAccessDeniedException+ , _CloudHSMResourceNotFoundException++ -- * BackupPolicy+ , BackupPolicy (..)++ -- * BackupState+ , BackupState (..)++ -- * ClusterState+ , ClusterState (..)++ -- * HSMState+ , HSMState (..)++ -- * Backup+ , Backup+ , backup+ , bClusterId+ , bCreateTimestamp+ , bBackupState+ , bBackupId++ -- * Certificates+ , Certificates+ , certificates+ , cManufacturerHardwareCertificate+ , cClusterCSR+ , cHSMCertificate+ , cClusterCertificate+ , cAWSHardwareCertificate++ -- * Cluster+ , Cluster+ , cluster+ , cPreCoPassword+ , cStateMessage+ , cState+ , cSubnetMapping+ , cHSMs+ , cVPCId+ , cSourceBackupId+ , cCertificates+ , cSecurityGroup+ , cClusterId+ , cCreateTimestamp+ , cBackupPolicy+ , cHSMType++ -- * HSM+ , HSM+ , hsm+ , hsmStateMessage+ , hsmState+ , hsmEniId+ , hsmSubnetId+ , hsmAvailabilityZone+ , hsmClusterId+ , hsmEniIP+ , hsmHSMId++ -- * Tag+ , Tag+ , tag+ , tagKey+ , tagValue+ ) where++import Network.AWS.CloudHSMv2.Types.Product+import Network.AWS.CloudHSMv2.Types.Sum+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Sign.V4++-- | API version @2017-04-28@ of the Amazon CloudHSM V2 SDK configuration.+cloudHSMv2 :: Service+cloudHSMv2 =+ Service+ { _svcAbbrev = "CloudHSMv2"+ , _svcSigner = v4+ , _svcPrefix = "cloudhsmv2"+ , _svcVersion = "2017-04-28"+ , _svcEndpoint = defaultEndpoint cloudHSMv2+ , _svcTimeout = Just 70+ , _svcCheck = statusSuccess+ , _svcError = parseJSONError "CloudHSMv2"+ , _svcRetry = retry+ }+ where+ retry =+ Exponential+ { _retryBase = 5.0e-2+ , _retryGrowth = 2+ , _retryAttempts = 5+ , _retryCheck = check+ }+ check e+ | has (hasCode "ThrottledException" . hasStatus 400) e =+ Just "throttled_exception"+ | has (hasStatus 429) e = Just "too_many_requests"+ | has (hasCode "ThrottlingException" . hasStatus 400) e =+ Just "throttling_exception"+ | 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+++-- | The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.+--+--+_CloudHSMInternalFailureException :: AsError a => Getting (First ServiceError) a ServiceError+_CloudHSMInternalFailureException =+ _MatchServiceError cloudHSMv2 "CloudHsmInternalFailureException"+++-- | The request was rejected because an error occurred.+--+--+_CloudHSMServiceException :: AsError a => Getting (First ServiceError) a ServiceError+_CloudHSMServiceException =+ _MatchServiceError cloudHSMv2 "CloudHsmServiceException"+++-- | The request was rejected because it is not a valid request.+--+--+_CloudHSMInvalidRequestException :: AsError a => Getting (First ServiceError) a ServiceError+_CloudHSMInvalidRequestException =+ _MatchServiceError cloudHSMv2 "CloudHsmInvalidRequestException"+++-- | The request was rejected because the requester does not have permission to perform the requested operation.+--+--+_CloudHSMAccessDeniedException :: AsError a => Getting (First ServiceError) a ServiceError+_CloudHSMAccessDeniedException =+ _MatchServiceError cloudHSMv2 "CloudHsmAccessDeniedException"+++-- | The request was rejected because it refers to a resource that cannot be found.+--+--+_CloudHSMResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_CloudHSMResourceNotFoundException =+ _MatchServiceError cloudHSMv2 "CloudHsmResourceNotFoundException"+
+ gen/Network/AWS/CloudHSMv2/Types/Product.hs view
@@ -0,0 +1,456 @@+{-# 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.CloudHSMv2.Types.Product+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.CloudHSMv2.Types.Product where++import Network.AWS.CloudHSMv2.Types.Sum+import Network.AWS.Lens+import Network.AWS.Prelude++-- | Contains information about a backup of an AWS CloudHSM cluster.+--+--+--+-- /See:/ 'backup' smart constructor.+data Backup = Backup'+ { _bClusterId :: !(Maybe Text)+ , _bCreateTimestamp :: !(Maybe POSIX)+ , _bBackupState :: !(Maybe BackupState)+ , _bBackupId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Backup' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'bClusterId' - The identifier (ID) of the cluster that was backed up.+--+-- * 'bCreateTimestamp' - The date and time when the backup was created.+--+-- * 'bBackupState' - The state of the backup.+--+-- * 'bBackupId' - The identifier (ID) of the backup.+backup+ :: Text -- ^ 'bBackupId'+ -> Backup+backup pBackupId_ =+ Backup'+ { _bClusterId = Nothing+ , _bCreateTimestamp = Nothing+ , _bBackupState = Nothing+ , _bBackupId = pBackupId_+ }+++-- | The identifier (ID) of the cluster that was backed up.+bClusterId :: Lens' Backup (Maybe Text)+bClusterId = lens _bClusterId (\ s a -> s{_bClusterId = a});++-- | The date and time when the backup was created.+bCreateTimestamp :: Lens' Backup (Maybe UTCTime)+bCreateTimestamp = lens _bCreateTimestamp (\ s a -> s{_bCreateTimestamp = a}) . mapping _Time;++-- | The state of the backup.+bBackupState :: Lens' Backup (Maybe BackupState)+bBackupState = lens _bBackupState (\ s a -> s{_bBackupState = a});++-- | The identifier (ID) of the backup.+bBackupId :: Lens' Backup Text+bBackupId = lens _bBackupId (\ s a -> s{_bBackupId = a});++instance FromJSON Backup where+ parseJSON+ = withObject "Backup"+ (\ x ->+ Backup' <$>+ (x .:? "ClusterId") <*> (x .:? "CreateTimestamp") <*>+ (x .:? "BackupState")+ <*> (x .: "BackupId"))++instance Hashable Backup where++instance NFData Backup where++-- | Contains one or more certificates or a certificate signing request (CSR).+--+--+--+-- /See:/ 'certificates' smart constructor.+data Certificates = Certificates'+ { _cManufacturerHardwareCertificate :: !(Maybe Text)+ , _cClusterCSR :: !(Maybe Text)+ , _cHSMCertificate :: !(Maybe Text)+ , _cClusterCertificate :: !(Maybe Text)+ , _cAWSHardwareCertificate :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Certificates' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cManufacturerHardwareCertificate' - The HSM hardware certificate issued (signed) by the hardware manufacturer.+--+-- * 'cClusterCSR' - The cluster's certificate signing request (CSR). The CSR exists only when the cluster's state is @UNINITIALIZED@ .+--+-- * 'cHSMCertificate' - The HSM certificate issued (signed) by the HSM hardware.+--+-- * 'cClusterCertificate' - The cluster certificate issued (signed) by the issuing certificate authority (CA) of the cluster's owner.+--+-- * 'cAWSHardwareCertificate' - The HSM hardware certificate issued (signed) by AWS CloudHSM.+certificates+ :: Certificates+certificates =+ Certificates'+ { _cManufacturerHardwareCertificate = Nothing+ , _cClusterCSR = Nothing+ , _cHSMCertificate = Nothing+ , _cClusterCertificate = Nothing+ , _cAWSHardwareCertificate = Nothing+ }+++-- | The HSM hardware certificate issued (signed) by the hardware manufacturer.+cManufacturerHardwareCertificate :: Lens' Certificates (Maybe Text)+cManufacturerHardwareCertificate = lens _cManufacturerHardwareCertificate (\ s a -> s{_cManufacturerHardwareCertificate = a});++-- | The cluster's certificate signing request (CSR). The CSR exists only when the cluster's state is @UNINITIALIZED@ .+cClusterCSR :: Lens' Certificates (Maybe Text)+cClusterCSR = lens _cClusterCSR (\ s a -> s{_cClusterCSR = a});++-- | The HSM certificate issued (signed) by the HSM hardware.+cHSMCertificate :: Lens' Certificates (Maybe Text)+cHSMCertificate = lens _cHSMCertificate (\ s a -> s{_cHSMCertificate = a});++-- | The cluster certificate issued (signed) by the issuing certificate authority (CA) of the cluster's owner.+cClusterCertificate :: Lens' Certificates (Maybe Text)+cClusterCertificate = lens _cClusterCertificate (\ s a -> s{_cClusterCertificate = a});++-- | The HSM hardware certificate issued (signed) by AWS CloudHSM.+cAWSHardwareCertificate :: Lens' Certificates (Maybe Text)+cAWSHardwareCertificate = lens _cAWSHardwareCertificate (\ s a -> s{_cAWSHardwareCertificate = a});++instance FromJSON Certificates where+ parseJSON+ = withObject "Certificates"+ (\ x ->+ Certificates' <$>+ (x .:? "ManufacturerHardwareCertificate") <*>+ (x .:? "ClusterCsr")+ <*> (x .:? "HsmCertificate")+ <*> (x .:? "ClusterCertificate")+ <*> (x .:? "AwsHardwareCertificate"))++instance Hashable Certificates where++instance NFData Certificates where++-- | Contains information about an AWS CloudHSM cluster.+--+--+--+-- /See:/ 'cluster' smart constructor.+data Cluster = Cluster'+ { _cPreCoPassword :: !(Maybe Text)+ , _cStateMessage :: !(Maybe Text)+ , _cState :: !(Maybe ClusterState)+ , _cSubnetMapping :: !(Maybe (Map Text Text))+ , _cHSMs :: !(Maybe [HSM])+ , _cVPCId :: !(Maybe Text)+ , _cSourceBackupId :: !(Maybe Text)+ , _cCertificates :: !(Maybe Certificates)+ , _cSecurityGroup :: !(Maybe Text)+ , _cClusterId :: !(Maybe Text)+ , _cCreateTimestamp :: !(Maybe POSIX)+ , _cBackupPolicy :: !(Maybe BackupPolicy)+ , _cHSMType :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Cluster' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cPreCoPassword' - The default password for the cluster's Pre-Crypto Officer (PRECO) user.+--+-- * 'cStateMessage' - A description of the cluster's state.+--+-- * 'cState' - The cluster's state.+--+-- * 'cSubnetMapping' - A map of the cluster's subnets and their corresponding Availability Zones.+--+-- * 'cHSMs' - Contains information about the HSMs in the cluster.+--+-- * 'cVPCId' - The identifier (ID) of the virtual private cloud (VPC) that contains the cluster.+--+-- * 'cSourceBackupId' - The identifier (ID) of the backup used to create the cluster. This value exists only when the cluster was created from a backup.+--+-- * 'cCertificates' - Contains one or more certificates or a certificate signing request (CSR).+--+-- * 'cSecurityGroup' - The identifier (ID) of the cluster's security group.+--+-- * 'cClusterId' - The cluster's identifier (ID).+--+-- * 'cCreateTimestamp' - The date and time when the cluster was created.+--+-- * 'cBackupPolicy' - The cluster's backup policy.+--+-- * 'cHSMType' - The type of HSM that the cluster contains.+cluster+ :: Cluster+cluster =+ Cluster'+ { _cPreCoPassword = Nothing+ , _cStateMessage = Nothing+ , _cState = Nothing+ , _cSubnetMapping = Nothing+ , _cHSMs = Nothing+ , _cVPCId = Nothing+ , _cSourceBackupId = Nothing+ , _cCertificates = Nothing+ , _cSecurityGroup = Nothing+ , _cClusterId = Nothing+ , _cCreateTimestamp = Nothing+ , _cBackupPolicy = Nothing+ , _cHSMType = Nothing+ }+++-- | The default password for the cluster's Pre-Crypto Officer (PRECO) user.+cPreCoPassword :: Lens' Cluster (Maybe Text)+cPreCoPassword = lens _cPreCoPassword (\ s a -> s{_cPreCoPassword = a});++-- | A description of the cluster's state.+cStateMessage :: Lens' Cluster (Maybe Text)+cStateMessage = lens _cStateMessage (\ s a -> s{_cStateMessage = a});++-- | The cluster's state.+cState :: Lens' Cluster (Maybe ClusterState)+cState = lens _cState (\ s a -> s{_cState = a});++-- | A map of the cluster's subnets and their corresponding Availability Zones.+cSubnetMapping :: Lens' Cluster (HashMap Text Text)+cSubnetMapping = lens _cSubnetMapping (\ s a -> s{_cSubnetMapping = a}) . _Default . _Map;++-- | Contains information about the HSMs in the cluster.+cHSMs :: Lens' Cluster [HSM]+cHSMs = lens _cHSMs (\ s a -> s{_cHSMs = a}) . _Default . _Coerce;++-- | The identifier (ID) of the virtual private cloud (VPC) that contains the cluster.+cVPCId :: Lens' Cluster (Maybe Text)+cVPCId = lens _cVPCId (\ s a -> s{_cVPCId = a});++-- | The identifier (ID) of the backup used to create the cluster. This value exists only when the cluster was created from a backup.+cSourceBackupId :: Lens' Cluster (Maybe Text)+cSourceBackupId = lens _cSourceBackupId (\ s a -> s{_cSourceBackupId = a});++-- | Contains one or more certificates or a certificate signing request (CSR).+cCertificates :: Lens' Cluster (Maybe Certificates)+cCertificates = lens _cCertificates (\ s a -> s{_cCertificates = a});++-- | The identifier (ID) of the cluster's security group.+cSecurityGroup :: Lens' Cluster (Maybe Text)+cSecurityGroup = lens _cSecurityGroup (\ s a -> s{_cSecurityGroup = a});++-- | The cluster's identifier (ID).+cClusterId :: Lens' Cluster (Maybe Text)+cClusterId = lens _cClusterId (\ s a -> s{_cClusterId = a});++-- | The date and time when the cluster was created.+cCreateTimestamp :: Lens' Cluster (Maybe UTCTime)+cCreateTimestamp = lens _cCreateTimestamp (\ s a -> s{_cCreateTimestamp = a}) . mapping _Time;++-- | The cluster's backup policy.+cBackupPolicy :: Lens' Cluster (Maybe BackupPolicy)+cBackupPolicy = lens _cBackupPolicy (\ s a -> s{_cBackupPolicy = a});++-- | The type of HSM that the cluster contains.+cHSMType :: Lens' Cluster (Maybe Text)+cHSMType = lens _cHSMType (\ s a -> s{_cHSMType = a});++instance FromJSON Cluster where+ parseJSON+ = withObject "Cluster"+ (\ x ->+ Cluster' <$>+ (x .:? "PreCoPassword") <*> (x .:? "StateMessage")+ <*> (x .:? "State")+ <*> (x .:? "SubnetMapping" .!= mempty)+ <*> (x .:? "Hsms" .!= mempty)+ <*> (x .:? "VpcId")+ <*> (x .:? "SourceBackupId")+ <*> (x .:? "Certificates")+ <*> (x .:? "SecurityGroup")+ <*> (x .:? "ClusterId")+ <*> (x .:? "CreateTimestamp")+ <*> (x .:? "BackupPolicy")+ <*> (x .:? "HsmType"))++instance Hashable Cluster where++instance NFData Cluster where++-- | Contains information about a hardware security module (HSM) in an AWS CloudHSM cluster.+--+--+--+-- /See:/ 'hsm' smart constructor.+data HSM = HSM'+ { _hsmStateMessage :: !(Maybe Text)+ , _hsmState :: !(Maybe HSMState)+ , _hsmEniId :: !(Maybe Text)+ , _hsmSubnetId :: !(Maybe Text)+ , _hsmAvailabilityZone :: !(Maybe Text)+ , _hsmClusterId :: !(Maybe Text)+ , _hsmEniIP :: !(Maybe Text)+ , _hsmHSMId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'HSM' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'hsmStateMessage' - A description of the HSM's state.+--+-- * 'hsmState' - The HSM's state.+--+-- * 'hsmEniId' - The identifier (ID) of the HSM's elastic network interface (ENI).+--+-- * 'hsmSubnetId' - The subnet that contains the HSM's elastic network interface (ENI).+--+-- * 'hsmAvailabilityZone' - The Availability Zone that contains the HSM.+--+-- * 'hsmClusterId' - The identifier (ID) of the cluster that contains the HSM.+--+-- * 'hsmEniIP' - The IP address of the HSM's elastic network interface (ENI).+--+-- * 'hsmHSMId' - The HSM's identifier (ID).+hsm+ :: Text -- ^ 'hsmHSMId'+ -> HSM+hsm pHSMId_ =+ HSM'+ { _hsmStateMessage = Nothing+ , _hsmState = Nothing+ , _hsmEniId = Nothing+ , _hsmSubnetId = Nothing+ , _hsmAvailabilityZone = Nothing+ , _hsmClusterId = Nothing+ , _hsmEniIP = Nothing+ , _hsmHSMId = pHSMId_+ }+++-- | A description of the HSM's state.+hsmStateMessage :: Lens' HSM (Maybe Text)+hsmStateMessage = lens _hsmStateMessage (\ s a -> s{_hsmStateMessage = a});++-- | The HSM's state.+hsmState :: Lens' HSM (Maybe HSMState)+hsmState = lens _hsmState (\ s a -> s{_hsmState = a});++-- | The identifier (ID) of the HSM's elastic network interface (ENI).+hsmEniId :: Lens' HSM (Maybe Text)+hsmEniId = lens _hsmEniId (\ s a -> s{_hsmEniId = a});++-- | The subnet that contains the HSM's elastic network interface (ENI).+hsmSubnetId :: Lens' HSM (Maybe Text)+hsmSubnetId = lens _hsmSubnetId (\ s a -> s{_hsmSubnetId = a});++-- | The Availability Zone that contains the HSM.+hsmAvailabilityZone :: Lens' HSM (Maybe Text)+hsmAvailabilityZone = lens _hsmAvailabilityZone (\ s a -> s{_hsmAvailabilityZone = a});++-- | The identifier (ID) of the cluster that contains the HSM.+hsmClusterId :: Lens' HSM (Maybe Text)+hsmClusterId = lens _hsmClusterId (\ s a -> s{_hsmClusterId = a});++-- | The IP address of the HSM's elastic network interface (ENI).+hsmEniIP :: Lens' HSM (Maybe Text)+hsmEniIP = lens _hsmEniIP (\ s a -> s{_hsmEniIP = a});++-- | The HSM's identifier (ID).+hsmHSMId :: Lens' HSM Text+hsmHSMId = lens _hsmHSMId (\ s a -> s{_hsmHSMId = a});++instance FromJSON HSM where+ parseJSON+ = withObject "HSM"+ (\ x ->+ HSM' <$>+ (x .:? "StateMessage") <*> (x .:? "State") <*>+ (x .:? "EniId")+ <*> (x .:? "SubnetId")+ <*> (x .:? "AvailabilityZone")+ <*> (x .:? "ClusterId")+ <*> (x .:? "EniIp")+ <*> (x .: "HsmId"))++instance Hashable HSM where++instance NFData HSM where++-- | Contains a tag. A tag is a key-value pair.+--+--+--+-- /See:/ 'tag' smart constructor.+data Tag = Tag'+ { _tagKey :: !Text+ , _tagValue :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Tag' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'tagKey' - The key of the tag.+--+-- * 'tagValue' - The value of the tag.+tag+ :: Text -- ^ 'tagKey'+ -> Text -- ^ 'tagValue'+ -> Tag+tag pKey_ pValue_ = Tag' {_tagKey = pKey_, _tagValue = pValue_}+++-- | The key of the tag.+tagKey :: Lens' Tag Text+tagKey = lens _tagKey (\ s a -> s{_tagKey = a});++-- | The value of the tag.+tagValue :: Lens' Tag Text+tagValue = lens _tagValue (\ s a -> s{_tagValue = a});++instance FromJSON Tag where+ parseJSON+ = withObject "Tag"+ (\ x -> Tag' <$> (x .: "Key") <*> (x .: "Value"))++instance Hashable Tag where++instance NFData Tag where++instance ToJSON Tag where+ toJSON Tag'{..}+ = object+ (catMaybes+ [Just ("Key" .= _tagKey),+ Just ("Value" .= _tagValue)])
+ gen/Network/AWS/CloudHSMv2/Types/Sum.hs view
@@ -0,0 +1,158 @@+{-# 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.CloudHSMv2.Types.Sum+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.CloudHSMv2.Types.Sum where++import Network.AWS.Prelude++data BackupPolicy =+ Default+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText BackupPolicy where+ parser = takeLowerText >>= \case+ "default" -> pure Default+ e -> fromTextError $ "Failure parsing BackupPolicy from value: '" <> e+ <> "'. Accepted values: default"++instance ToText BackupPolicy where+ toText = \case+ Default -> "DEFAULT"++instance Hashable BackupPolicy+instance NFData BackupPolicy+instance ToByteString BackupPolicy+instance ToQuery BackupPolicy+instance ToHeader BackupPolicy++instance FromJSON BackupPolicy where+ parseJSON = parseJSONText "BackupPolicy"++data BackupState+ = BSCreateInProgress+ | BSDeleted+ | BSReady+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText BackupState where+ parser = takeLowerText >>= \case+ "create_in_progress" -> pure BSCreateInProgress+ "deleted" -> pure BSDeleted+ "ready" -> pure BSReady+ e -> fromTextError $ "Failure parsing BackupState from value: '" <> e+ <> "'. Accepted values: create_in_progress, deleted, ready"++instance ToText BackupState where+ toText = \case+ BSCreateInProgress -> "CREATE_IN_PROGRESS"+ BSDeleted -> "DELETED"+ BSReady -> "READY"++instance Hashable BackupState+instance NFData BackupState+instance ToByteString BackupState+instance ToQuery BackupState+instance ToHeader BackupState++instance FromJSON BackupState where+ parseJSON = parseJSONText "BackupState"++data ClusterState+ = Active+ | CreateInProgress+ | Degraded+ | DeleteInProgress+ | Deleted+ | InitializeInProgress+ | Initialized+ | Uninitialized+ | UpdateInProgress+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText ClusterState where+ parser = takeLowerText >>= \case+ "active" -> pure Active+ "create_in_progress" -> pure CreateInProgress+ "degraded" -> pure Degraded+ "delete_in_progress" -> pure DeleteInProgress+ "deleted" -> pure Deleted+ "initialize_in_progress" -> pure InitializeInProgress+ "initialized" -> pure Initialized+ "uninitialized" -> pure Uninitialized+ "update_in_progress" -> pure UpdateInProgress+ e -> fromTextError $ "Failure parsing ClusterState from value: '" <> e+ <> "'. Accepted values: active, create_in_progress, degraded, delete_in_progress, deleted, initialize_in_progress, initialized, uninitialized, update_in_progress"++instance ToText ClusterState where+ toText = \case+ Active -> "ACTIVE"+ CreateInProgress -> "CREATE_IN_PROGRESS"+ Degraded -> "DEGRADED"+ DeleteInProgress -> "DELETE_IN_PROGRESS"+ Deleted -> "DELETED"+ InitializeInProgress -> "INITIALIZE_IN_PROGRESS"+ Initialized -> "INITIALIZED"+ Uninitialized -> "UNINITIALIZED"+ UpdateInProgress -> "UPDATE_IN_PROGRESS"++instance Hashable ClusterState+instance NFData ClusterState+instance ToByteString ClusterState+instance ToQuery ClusterState+instance ToHeader ClusterState++instance FromJSON ClusterState where+ parseJSON = parseJSONText "ClusterState"++data HSMState+ = HSActive+ | HSCreateInProgress+ | HSDegraded+ | HSDeleteInProgress+ | HSDeleted+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText HSMState where+ parser = takeLowerText >>= \case+ "active" -> pure HSActive+ "create_in_progress" -> pure HSCreateInProgress+ "degraded" -> pure HSDegraded+ "delete_in_progress" -> pure HSDeleteInProgress+ "deleted" -> pure HSDeleted+ e -> fromTextError $ "Failure parsing HSMState from value: '" <> e+ <> "'. Accepted values: active, create_in_progress, degraded, delete_in_progress, deleted"++instance ToText HSMState where+ toText = \case+ HSActive -> "ACTIVE"+ HSCreateInProgress -> "CREATE_IN_PROGRESS"+ HSDegraded -> "DEGRADED"+ HSDeleteInProgress -> "DELETE_IN_PROGRESS"+ HSDeleted -> "DELETED"++instance Hashable HSMState+instance NFData HSMState+instance ToByteString HSMState+instance ToQuery HSMState+instance ToHeader HSMState++instance FromJSON HSMState where+ parseJSON = parseJSONText "HSMState"
+ gen/Network/AWS/CloudHSMv2/UntagResource.hs view
@@ -0,0 +1,134 @@+{-# 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.CloudHSMv2.UntagResource+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes the specified tag or tags from the specified AWS CloudHSM cluster.+--+--+module Network.AWS.CloudHSMv2.UntagResource+ (+ -- * Creating a Request+ untagResource+ , UntagResource+ -- * Request Lenses+ , urResourceId+ , urTagKeyList++ -- * Destructuring the Response+ , untagResourceResponse+ , UntagResourceResponse+ -- * Response Lenses+ , urrsResponseStatus+ ) where++import Network.AWS.CloudHSMv2.Types+import Network.AWS.CloudHSMv2.Types.Product+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'untagResource' smart constructor.+data UntagResource = UntagResource'+ { _urResourceId :: !Text+ , _urTagKeyList :: !(List1 Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UntagResource' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'urResourceId' - The cluster identifier (ID) for the cluster whose tags you are removing. To find the cluster ID, use 'DescribeClusters' .+--+-- * 'urTagKeyList' - A list of one or more tag keys for the tags that you are removing. Specify only the tag keys, not the tag values.+untagResource+ :: Text -- ^ 'urResourceId'+ -> NonEmpty Text -- ^ 'urTagKeyList'+ -> UntagResource+untagResource pResourceId_ pTagKeyList_ =+ UntagResource'+ {_urResourceId = pResourceId_, _urTagKeyList = _List1 # pTagKeyList_}+++-- | The cluster identifier (ID) for the cluster whose tags you are removing. To find the cluster ID, use 'DescribeClusters' .+urResourceId :: Lens' UntagResource Text+urResourceId = lens _urResourceId (\ s a -> s{_urResourceId = a});++-- | A list of one or more tag keys for the tags that you are removing. Specify only the tag keys, not the tag values.+urTagKeyList :: Lens' UntagResource (NonEmpty Text)+urTagKeyList = lens _urTagKeyList (\ s a -> s{_urTagKeyList = a}) . _List1;++instance AWSRequest UntagResource where+ type Rs UntagResource = UntagResourceResponse+ request = postJSON cloudHSMv2+ response+ = receiveEmpty+ (\ s h x ->+ UntagResourceResponse' <$> (pure (fromEnum s)))++instance Hashable UntagResource where++instance NFData UntagResource where++instance ToHeaders UntagResource where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("BaldrApiService.UntagResource" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON UntagResource where+ toJSON UntagResource'{..}+ = object+ (catMaybes+ [Just ("ResourceId" .= _urResourceId),+ Just ("TagKeyList" .= _urTagKeyList)])++instance ToPath UntagResource where+ toPath = const "/"++instance ToQuery UntagResource where+ toQuery = const mempty++-- | /See:/ 'untagResourceResponse' smart constructor.+newtype UntagResourceResponse = UntagResourceResponse'+ { _urrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UntagResourceResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'urrsResponseStatus' - -- | The response status code.+untagResourceResponse+ :: Int -- ^ 'urrsResponseStatus'+ -> UntagResourceResponse+untagResourceResponse pResponseStatus_ =+ UntagResourceResponse' {_urrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+urrsResponseStatus :: Lens' UntagResourceResponse Int+urrsResponseStatus = lens _urrsResponseStatus (\ s a -> s{_urrsResponseStatus = a});++instance NFData UntagResourceResponse where
+ gen/Network/AWS/CloudHSMv2/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.CloudHSMv2.Waiters+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.CloudHSMv2.Waiters where++import Network.AWS.CloudHSMv2.Types+import Network.AWS.Lens+import Network.AWS.Prelude+import Network.AWS.Waiter
+ src/.gitkeep view
+ test/Main.hs view
@@ -0,0 +1,21 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Main+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Main (main) where++import Test.Tasty+import Test.AWS.CloudHSMv2+import Test.AWS.CloudHSMv2.Internal++main :: IO ()+main = defaultMain $ testGroup "CloudHSMv2"+ [ testGroup "tests" tests+ , testGroup "fixtures" fixtures+ ]
+ test/Test/AWS/CloudHSMv2.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.AWS.CloudHSMv2+-- 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.CloudHSMv2+ ( tests+ , fixtures+ ) where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/AWS/CloudHSMv2/Internal.hs view
@@ -0,0 +1,9 @@+-- |+-- Module : Test.AWS.CloudHSMv2.Internal+-- 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.CloudHSMv2.Internal where
+ test/Test/AWS/Gen/CloudHSMv2.hs view
@@ -0,0 +1,219 @@+{-# 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.CloudHSMv2+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.Gen.CloudHSMv2 where++import Data.Proxy+import Network.AWS.CloudHSMv2+import Test.AWS.CloudHSMv2.Internal+import Test.AWS.Fixture+import Test.AWS.Prelude+import Test.Tasty++-- 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"+-- [ requestDescribeClusters $+-- describeClusters+--+-- , requestInitializeCluster $+-- initializeCluster+--+-- , requestCreateHSM $+-- createHSM+--+-- , requestDescribeBackups $+-- describeBackups+--+-- , requestDeleteCluster $+-- deleteCluster+--+-- , requestCreateCluster $+-- createCluster+--+-- , requestDeleteHSM $+-- deleteHSM+--+-- , requestTagResource $+-- tagResource+--+-- , requestListTags $+-- listTags+--+-- , requestUntagResource $+-- untagResource+--+-- ]++-- , testGroup "response"+-- [ responseDescribeClusters $+-- describeClustersResponse+--+-- , responseInitializeCluster $+-- initializeClusterResponse+--+-- , responseCreateHSM $+-- createHSMResponse+--+-- , responseDescribeBackups $+-- describeBackupsResponse+--+-- , responseDeleteCluster $+-- deleteClusterResponse+--+-- , responseCreateCluster $+-- createClusterResponse+--+-- , responseDeleteHSM $+-- deleteHSMResponse+--+-- , responseTagResource $+-- tagResourceResponse+--+-- , responseListTags $+-- listTagsResponse+--+-- , responseUntagResource $+-- untagResourceResponse+--+-- ]+-- ]++-- Requests++requestDescribeClusters :: DescribeClusters -> TestTree+requestDescribeClusters = req+ "DescribeClusters"+ "fixture/DescribeClusters.yaml"++requestInitializeCluster :: InitializeCluster -> TestTree+requestInitializeCluster = req+ "InitializeCluster"+ "fixture/InitializeCluster.yaml"++requestCreateHSM :: CreateHSM -> TestTree+requestCreateHSM = req+ "CreateHSM"+ "fixture/CreateHSM.yaml"++requestDescribeBackups :: DescribeBackups -> TestTree+requestDescribeBackups = req+ "DescribeBackups"+ "fixture/DescribeBackups.yaml"++requestDeleteCluster :: DeleteCluster -> TestTree+requestDeleteCluster = req+ "DeleteCluster"+ "fixture/DeleteCluster.yaml"++requestCreateCluster :: CreateCluster -> TestTree+requestCreateCluster = req+ "CreateCluster"+ "fixture/CreateCluster.yaml"++requestDeleteHSM :: DeleteHSM -> TestTree+requestDeleteHSM = req+ "DeleteHSM"+ "fixture/DeleteHSM.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource = req+ "TagResource"+ "fixture/TagResource.yaml"++requestListTags :: ListTags -> TestTree+requestListTags = req+ "ListTags"+ "fixture/ListTags.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource = req+ "UntagResource"+ "fixture/UntagResource.yaml"++-- Responses++responseDescribeClusters :: DescribeClustersResponse -> TestTree+responseDescribeClusters = res+ "DescribeClustersResponse"+ "fixture/DescribeClustersResponse.proto"+ cloudHSMv2+ (Proxy :: Proxy DescribeClusters)++responseInitializeCluster :: InitializeClusterResponse -> TestTree+responseInitializeCluster = res+ "InitializeClusterResponse"+ "fixture/InitializeClusterResponse.proto"+ cloudHSMv2+ (Proxy :: Proxy InitializeCluster)++responseCreateHSM :: CreateHSMResponse -> TestTree+responseCreateHSM = res+ "CreateHSMResponse"+ "fixture/CreateHSMResponse.proto"+ cloudHSMv2+ (Proxy :: Proxy CreateHSM)++responseDescribeBackups :: DescribeBackupsResponse -> TestTree+responseDescribeBackups = res+ "DescribeBackupsResponse"+ "fixture/DescribeBackupsResponse.proto"+ cloudHSMv2+ (Proxy :: Proxy DescribeBackups)++responseDeleteCluster :: DeleteClusterResponse -> TestTree+responseDeleteCluster = res+ "DeleteClusterResponse"+ "fixture/DeleteClusterResponse.proto"+ cloudHSMv2+ (Proxy :: Proxy DeleteCluster)++responseCreateCluster :: CreateClusterResponse -> TestTree+responseCreateCluster = res+ "CreateClusterResponse"+ "fixture/CreateClusterResponse.proto"+ cloudHSMv2+ (Proxy :: Proxy CreateCluster)++responseDeleteHSM :: DeleteHSMResponse -> TestTree+responseDeleteHSM = res+ "DeleteHSMResponse"+ "fixture/DeleteHSMResponse.proto"+ cloudHSMv2+ (Proxy :: Proxy DeleteHSM)++responseTagResource :: TagResourceResponse -> TestTree+responseTagResource = res+ "TagResourceResponse"+ "fixture/TagResourceResponse.proto"+ cloudHSMv2+ (Proxy :: Proxy TagResource)++responseListTags :: ListTagsResponse -> TestTree+responseListTags = res+ "ListTagsResponse"+ "fixture/ListTagsResponse.proto"+ cloudHSMv2+ (Proxy :: Proxy ListTags)++responseUntagResource :: UntagResourceResponse -> TestTree+responseUntagResource = res+ "UntagResourceResponse"+ "fixture/UntagResourceResponse.proto"+ cloudHSMv2+ (Proxy :: Proxy UntagResource)