amazonka-iot (empty) → 1.3.3
raw patch · 130 files changed
+8414/−0 lines, 130 filesdep +amazonka-coredep +amazonka-iotdep +amazonka-testsetup-changed
Dependencies added: amazonka-core, amazonka-iot, amazonka-test, base, bytestring, lens, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +55/−0
- Setup.hs +2/−0
- amazonka-iot.cabal +134/−0
- fixture/AcceptCertificateTransfer.yaml +0/−0
- fixture/AcceptCertificateTransferResponse.proto +0/−0
- fixture/AttachPrincipalPolicy.yaml +0/−0
- fixture/AttachPrincipalPolicyResponse.proto +0/−0
- fixture/AttachThingPrincipal.yaml +0/−0
- fixture/AttachThingPrincipalResponse.proto +0/−0
- fixture/CancelCertificateTransfer.yaml +0/−0
- fixture/CancelCertificateTransferResponse.proto +0/−0
- fixture/CreateCertificateFromCsr.yaml +0/−0
- fixture/CreateCertificateFromCsrResponse.proto +0/−0
- fixture/CreateKeysAndCertificate.yaml +0/−0
- fixture/CreateKeysAndCertificateResponse.proto +0/−0
- fixture/CreatePolicy.yaml +0/−0
- fixture/CreatePolicyResponse.proto +0/−0
- fixture/CreatePolicyVersion.yaml +0/−0
- fixture/CreatePolicyVersionResponse.proto +0/−0
- fixture/CreateThing.yaml +0/−0
- fixture/CreateThingResponse.proto +0/−0
- fixture/CreateTopicRule.yaml +0/−0
- fixture/CreateTopicRuleResponse.proto +0/−0
- fixture/DeleteCertificate.yaml +0/−0
- fixture/DeleteCertificateResponse.proto +0/−0
- fixture/DeletePolicy.yaml +0/−0
- fixture/DeletePolicyResponse.proto +0/−0
- fixture/DeletePolicyVersion.yaml +0/−0
- fixture/DeletePolicyVersionResponse.proto +0/−0
- fixture/DeleteThing.yaml +0/−0
- fixture/DeleteThingResponse.proto +0/−0
- fixture/DeleteTopicRule.yaml +0/−0
- fixture/DeleteTopicRuleResponse.proto +0/−0
- fixture/DescribeCertificate.yaml +0/−0
- fixture/DescribeCertificateResponse.proto +0/−0
- fixture/DescribeEndpoint.yaml +0/−0
- fixture/DescribeEndpointResponse.proto +0/−0
- fixture/DescribeThing.yaml +0/−0
- fixture/DescribeThingResponse.proto +0/−0
- fixture/DetachPrincipalPolicy.yaml +0/−0
- fixture/DetachPrincipalPolicyResponse.proto +0/−0
- fixture/DetachThingPrincipal.yaml +0/−0
- fixture/DetachThingPrincipalResponse.proto +0/−0
- fixture/GetLoggingOptions.yaml +0/−0
- fixture/GetLoggingOptionsResponse.proto +0/−0
- fixture/GetPolicy.yaml +0/−0
- fixture/GetPolicyResponse.proto +0/−0
- fixture/GetPolicyVersion.yaml +0/−0
- fixture/GetPolicyVersionResponse.proto +0/−0
- fixture/GetTopicRule.yaml +0/−0
- fixture/GetTopicRuleResponse.proto +0/−0
- fixture/ListCertificates.yaml +0/−0
- fixture/ListCertificatesResponse.proto +0/−0
- fixture/ListPolicies.yaml +0/−0
- fixture/ListPoliciesResponse.proto +0/−0
- fixture/ListPolicyVersions.yaml +0/−0
- fixture/ListPolicyVersionsResponse.proto +0/−0
- fixture/ListPrincipalPolicies.yaml +0/−0
- fixture/ListPrincipalPoliciesResponse.proto +0/−0
- fixture/ListPrincipalThings.yaml +0/−0
- fixture/ListPrincipalThingsResponse.proto +0/−0
- fixture/ListThingPrincipals.yaml +0/−0
- fixture/ListThingPrincipalsResponse.proto +0/−0
- fixture/ListThings.yaml +0/−0
- fixture/ListThingsResponse.proto +0/−0
- fixture/ListTopicRules.yaml +0/−0
- fixture/ListTopicRulesResponse.proto +0/−0
- fixture/RejectCertificateTransfer.yaml +0/−0
- fixture/RejectCertificateTransferResponse.proto +0/−0
- fixture/ReplaceTopicRule.yaml +0/−0
- fixture/ReplaceTopicRuleResponse.proto +0/−0
- fixture/SetDefaultPolicyVersion.yaml +0/−0
- fixture/SetDefaultPolicyVersionResponse.proto +0/−0
- fixture/SetLoggingOptions.yaml +0/−0
- fixture/SetLoggingOptionsResponse.proto +0/−0
- fixture/TransferCertificate.yaml +0/−0
- fixture/TransferCertificateResponse.proto +0/−0
- fixture/UpdateCertificate.yaml +0/−0
- fixture/UpdateCertificateResponse.proto +0/−0
- fixture/UpdateThing.yaml +0/−0
- fixture/UpdateThingResponse.proto +0/−0
- gen/Network/AWS/IoT.hs +436/−0
- gen/Network/AWS/IoT/AcceptCertificateTransfer.hs +112/−0
- gen/Network/AWS/IoT/AttachPrincipalPolicy.hs +109/−0
- gen/Network/AWS/IoT/AttachThingPrincipal.hs +126/−0
- gen/Network/AWS/IoT/CancelCertificateTransfer.hs +108/−0
- gen/Network/AWS/IoT/CreateCertificateFromCsr.hs +163/−0
- gen/Network/AWS/IoT/CreateKeysAndCertificate.hs +157/−0
- gen/Network/AWS/IoT/CreatePolicy.hs +171/−0
- gen/Network/AWS/IoT/CreatePolicyVersion.hs +178/−0
- gen/Network/AWS/IoT/CreateThing.hs +146/−0
- gen/Network/AWS/IoT/CreateTopicRule.hs +107/−0
- gen/Network/AWS/IoT/DeleteCertificate.hs +99/−0
- gen/Network/AWS/IoT/DeletePolicy.hs +106/−0
- gen/Network/AWS/IoT/DeletePolicyVersion.hs +108/−0
- gen/Network/AWS/IoT/DeleteThing.hs +109/−0
- gen/Network/AWS/IoT/DeleteTopicRule.hs +91/−0
- gen/Network/AWS/IoT/DescribeCertificate.hs +121/−0
- gen/Network/AWS/IoT/DescribeEndpoint.hs +107/−0
- gen/Network/AWS/IoT/DescribeThing.hs +144/−0
- gen/Network/AWS/IoT/DetachPrincipalPolicy.hs +107/−0
- gen/Network/AWS/IoT/DetachThingPrincipal.hs +123/−0
- gen/Network/AWS/IoT/GetLoggingOptions.hs +115/−0
- gen/Network/AWS/IoT/GetPolicy.hs +150/−0
- gen/Network/AWS/IoT/GetPolicyVersion.hs +171/−0
- gen/Network/AWS/IoT/GetTopicRule.hs +119/−0
- gen/Network/AWS/IoT/ListCertificates.hs +155/−0
- gen/Network/AWS/IoT/ListPolicies.hs +152/−0
- gen/Network/AWS/IoT/ListPolicyVersions.hs +123/−0
- gen/Network/AWS/IoT/ListPrincipalPolicies.hs +166/−0
- gen/Network/AWS/IoT/ListPrincipalThings.hs +151/−0
- gen/Network/AWS/IoT/ListThingPrincipals.hs +122/−0
- gen/Network/AWS/IoT/ListThings.hs +161/−0
- gen/Network/AWS/IoT/ListTopicRules.hs +158/−0
- gen/Network/AWS/IoT/RejectCertificateTransfer.hs +107/−0
- gen/Network/AWS/IoT/ReplaceTopicRule.hs +108/−0
- gen/Network/AWS/IoT/SetDefaultPolicyVersion.hs +109/−0
- gen/Network/AWS/IoT/SetLoggingOptions.hs +96/−0
- gen/Network/AWS/IoT/TransferCertificate.hs +147/−0
- gen/Network/AWS/IoT/Types.hs +308/−0
- gen/Network/AWS/IoT/Types/Product.hs +1153/−0
- gen/Network/AWS/IoT/Types/Sum.hs +91/−0
- gen/Network/AWS/IoT/UpdateCertificate.hs +113/−0
- gen/Network/AWS/IoT/UpdateThing.hs +128/−0
- gen/Network/AWS/IoT/Waiters.hs +20/−0
- test/Main.hs +21/−0
- test/Test/AWS/Gen/IoT.hs +741/−0
- test/Test/AWS/IoT.hs +26/−0
- test/Test/AWS/IoT/Internal.hs +17/−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,55 @@+# Amazon IoT SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`1.3.3`+++## Description++AWS IoT (Beta)++__AWS IoT is in beta and is subject to change__++AWS IoT provides secure, bi-directional communication between+Internet-connected things (such as sensors, actuators, embedded devices,+or smart appliances) and the AWS cloud. You can discover your custom+IoT-Data endpoint to communicate with, configure rules for data+processing and integration with other services, organize resources+associated with each thing (Thing Registry), configure logging, and+create and manage policies and credentials to authenticate things.++For more information about how AWS IoT works, see the+<http://docs.aws.amazon.com/iot/latest/developerguide/aws-iot-how-it-works.html Developer Guide>.++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-iot)+and the [AWS API Reference](https://aws.amazon.com/iot).++The types from this library are intended to be used with [amazonka](http://hackage.haskell.org/package/amazonka),+which provides mechanisms for specifying AuthN/AuthZ information and sending requests.++Use of lenses is required for constructing and manipulating types.+This is due to the amount of nesting of AWS types and transparency regarding+de/serialisation into more palatable Haskell values.+The provided lenses should be compatible with any of the major lens libraries+[lens](http://hackage.haskell.org/package/lens) or [lens-family-core](http://hackage.haskell.org/package/lens-family-core).++## Contribute++For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues).++> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information.+++## Licence++`amazonka-iot` 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-iot.cabal view
@@ -0,0 +1,134 @@+name: amazonka-iot+version: 1.3.3+synopsis: Amazon IoT SDK.+homepage: https://github.com/brendanhay/amazonka+bug-reports: https://github.com/brendanhay/amazonka/issues+license: OtherLicense+license-file: LICENSE+author: Brendan Hay+maintainer: Brendan Hay <brendan.g.hay@gmail.com>+copyright: Copyright (c) 2013-2015 Brendan Hay+category: Network, AWS, Cloud, Distributed Computing+build-type: Simple+cabal-version: >= 1.10+extra-source-files: README.md fixture/*.yaml fixture/*.proto+description:+ AWS IoT (Beta)++ __AWS IoT is in beta and is subject to change__++ AWS IoT provides secure, bi-directional communication between+ Internet-connected things (such as sensors, actuators, embedded devices,+ or smart appliances) and the AWS cloud. You can discover your custom+ IoT-Data endpoint to communicate with, configure rules for data+ processing and integration with other services, organize resources+ associated with each thing (Thing Registry), configure logging, and+ create and manage policies and credentials to authenticate things.++ For more information about how AWS IoT works, see the+ <http://docs.aws.amazon.com/iot/latest/developerguide/aws-iot-how-it-works.html Developer Guide>.+ .+ The types from this library are intended to be used with+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides+ mechanisms for specifying AuthN/AuthZ information and sending requests.+ .+ Use of lenses is required for constructing and manipulating types.+ This is due to the amount of nesting of AWS types and transparency regarding+ de/serialisation into more palatable Haskell values.+ The provided lenses should be compatible with any of the major lens libraries+ such as <http://hackage.haskell.org/package/lens lens> or+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.+ .+ See "Network.AWS.IoT" and the <https://aws.amazon.com/iot AWS API Reference>+ to get started.++source-repository head+ type: git+ location: git://github.com/brendanhay/amazonka.git++library+ default-language: Haskell2010+ hs-source-dirs: src gen++ ghc-options: -Wall++ exposed-modules:+ Network.AWS.IoT+ , Network.AWS.IoT.AcceptCertificateTransfer+ , Network.AWS.IoT.AttachPrincipalPolicy+ , Network.AWS.IoT.AttachThingPrincipal+ , Network.AWS.IoT.CancelCertificateTransfer+ , Network.AWS.IoT.CreateCertificateFromCsr+ , Network.AWS.IoT.CreateKeysAndCertificate+ , Network.AWS.IoT.CreatePolicy+ , Network.AWS.IoT.CreatePolicyVersion+ , Network.AWS.IoT.CreateThing+ , Network.AWS.IoT.CreateTopicRule+ , Network.AWS.IoT.DeleteCertificate+ , Network.AWS.IoT.DeletePolicy+ , Network.AWS.IoT.DeletePolicyVersion+ , Network.AWS.IoT.DeleteThing+ , Network.AWS.IoT.DeleteTopicRule+ , Network.AWS.IoT.DescribeCertificate+ , Network.AWS.IoT.DescribeEndpoint+ , Network.AWS.IoT.DescribeThing+ , Network.AWS.IoT.DetachPrincipalPolicy+ , Network.AWS.IoT.DetachThingPrincipal+ , Network.AWS.IoT.GetLoggingOptions+ , Network.AWS.IoT.GetPolicy+ , Network.AWS.IoT.GetPolicyVersion+ , Network.AWS.IoT.GetTopicRule+ , Network.AWS.IoT.ListCertificates+ , Network.AWS.IoT.ListPolicies+ , Network.AWS.IoT.ListPolicyVersions+ , Network.AWS.IoT.ListPrincipalPolicies+ , Network.AWS.IoT.ListPrincipalThings+ , Network.AWS.IoT.ListThingPrincipals+ , Network.AWS.IoT.ListThings+ , Network.AWS.IoT.ListTopicRules+ , Network.AWS.IoT.RejectCertificateTransfer+ , Network.AWS.IoT.ReplaceTopicRule+ , Network.AWS.IoT.SetDefaultPolicyVersion+ , Network.AWS.IoT.SetLoggingOptions+ , Network.AWS.IoT.TransferCertificate+ , Network.AWS.IoT.Types+ , Network.AWS.IoT.UpdateCertificate+ , Network.AWS.IoT.UpdateThing+ , Network.AWS.IoT.Waiters++ other-modules:+ Network.AWS.IoT.Types.Product+ , Network.AWS.IoT.Types.Sum++ build-depends:+ amazonka-core == 1.3.3.*+ , base >= 4.7 && < 5++test-suite amazonka-iot-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.IoT+ , Test.AWS.Gen.IoT+ , Test.AWS.IoT.Internal++ build-depends:+ amazonka-core == 1.3.3.*+ , amazonka-test == 1.3.3.*+ , amazonka-iot == 1.3.3.*+ , base+ , bytestring+ , lens+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/AcceptCertificateTransfer.yaml view
+ fixture/AcceptCertificateTransferResponse.proto view
+ fixture/AttachPrincipalPolicy.yaml view
+ fixture/AttachPrincipalPolicyResponse.proto view
+ fixture/AttachThingPrincipal.yaml view
+ fixture/AttachThingPrincipalResponse.proto view
+ fixture/CancelCertificateTransfer.yaml view
+ fixture/CancelCertificateTransferResponse.proto view
+ fixture/CreateCertificateFromCsr.yaml view
+ fixture/CreateCertificateFromCsrResponse.proto view
+ fixture/CreateKeysAndCertificate.yaml view
+ fixture/CreateKeysAndCertificateResponse.proto view
+ fixture/CreatePolicy.yaml view
+ fixture/CreatePolicyResponse.proto view
+ fixture/CreatePolicyVersion.yaml view
+ fixture/CreatePolicyVersionResponse.proto view
+ fixture/CreateThing.yaml view
+ fixture/CreateThingResponse.proto view
+ fixture/CreateTopicRule.yaml view
+ fixture/CreateTopicRuleResponse.proto view
+ fixture/DeleteCertificate.yaml view
+ fixture/DeleteCertificateResponse.proto view
+ fixture/DeletePolicy.yaml view
+ fixture/DeletePolicyResponse.proto view
+ fixture/DeletePolicyVersion.yaml view
+ fixture/DeletePolicyVersionResponse.proto view
+ fixture/DeleteThing.yaml view
+ fixture/DeleteThingResponse.proto view
+ fixture/DeleteTopicRule.yaml view
+ fixture/DeleteTopicRuleResponse.proto view
+ fixture/DescribeCertificate.yaml view
+ fixture/DescribeCertificateResponse.proto view
+ fixture/DescribeEndpoint.yaml view
+ fixture/DescribeEndpointResponse.proto view
+ fixture/DescribeThing.yaml view
+ fixture/DescribeThingResponse.proto view
+ fixture/DetachPrincipalPolicy.yaml view
+ fixture/DetachPrincipalPolicyResponse.proto view
+ fixture/DetachThingPrincipal.yaml view
+ fixture/DetachThingPrincipalResponse.proto view
+ fixture/GetLoggingOptions.yaml view
+ fixture/GetLoggingOptionsResponse.proto view
+ fixture/GetPolicy.yaml view
+ fixture/GetPolicyResponse.proto view
+ fixture/GetPolicyVersion.yaml view
+ fixture/GetPolicyVersionResponse.proto view
+ fixture/GetTopicRule.yaml view
+ fixture/GetTopicRuleResponse.proto view
+ fixture/ListCertificates.yaml view
+ fixture/ListCertificatesResponse.proto view
+ fixture/ListPolicies.yaml view
+ fixture/ListPoliciesResponse.proto view
+ fixture/ListPolicyVersions.yaml view
+ fixture/ListPolicyVersionsResponse.proto view
+ fixture/ListPrincipalPolicies.yaml view
+ fixture/ListPrincipalPoliciesResponse.proto view
+ fixture/ListPrincipalThings.yaml view
+ fixture/ListPrincipalThingsResponse.proto view
+ fixture/ListThingPrincipals.yaml view
+ fixture/ListThingPrincipalsResponse.proto view
+ fixture/ListThings.yaml view
+ fixture/ListThingsResponse.proto view
+ fixture/ListTopicRules.yaml view
+ fixture/ListTopicRulesResponse.proto view
+ fixture/RejectCertificateTransfer.yaml view
+ fixture/RejectCertificateTransferResponse.proto view
+ fixture/ReplaceTopicRule.yaml view
+ fixture/ReplaceTopicRuleResponse.proto view
+ fixture/SetDefaultPolicyVersion.yaml view
+ fixture/SetDefaultPolicyVersionResponse.proto view
+ fixture/SetLoggingOptions.yaml view
+ fixture/SetLoggingOptionsResponse.proto view
+ fixture/TransferCertificate.yaml view
+ fixture/TransferCertificateResponse.proto view
+ fixture/UpdateCertificate.yaml view
+ fixture/UpdateCertificateResponse.proto view
+ fixture/UpdateThing.yaml view
+ fixture/UpdateThingResponse.proto view
+ gen/Network/AWS/IoT.hs view
@@ -0,0 +1,436 @@+{-# 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.IoT+-- Copyright : (c) 2013-2015 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)+--+-- AWS IoT (Beta)+--+-- __AWS IoT is in beta and is subject to change__+--+-- AWS IoT provides secure, bi-directional communication between+-- Internet-connected things (such as sensors, actuators, embedded devices,+-- or smart appliances) and the AWS cloud. You can discover your custom+-- IoT-Data endpoint to communicate with, configure rules for data+-- processing and integration with other services, organize resources+-- associated with each thing (Thing Registry), configure logging, and+-- create and manage policies and credentials to authenticate things.+--+-- For more information about how AWS IoT works, see the+-- <http://docs.aws.amazon.com/iot/latest/developerguide/aws-iot-how-it-works.html Developer Guide>.+--+-- /See:/ <https://aws.amazon.com/iot AWS API Reference>+module Network.AWS.IoT+ (+ -- * Service Configuration+ ioT++ -- * Errors+ -- $errors++ -- ** SqlParseException+ , _SqlParseException++ -- ** InvalidRequestException+ , _InvalidRequestException++ -- ** TransferConflictException+ , _TransferConflictException++ -- ** CertificateStateException+ , _CertificateStateException++ -- ** MalformedPolicyException+ , _MalformedPolicyException++ -- ** DeleteConflictException+ , _DeleteConflictException++ -- ** ResourceAlreadyExistsException+ , _ResourceAlreadyExistsException++ -- ** TransferAlreadyCompletedException+ , _TransferAlreadyCompletedException++ -- ** ThrottlingException+ , _ThrottlingException++ -- ** InternalFailureException+ , _InternalFailureException++ -- ** VersionsLimitExceededException+ , _VersionsLimitExceededException++ -- ** ServiceUnavailableException+ , _ServiceUnavailableException++ -- ** InternalException+ , _InternalException++ -- ** UnauthorizedException+ , _UnauthorizedException++ -- ** ResourceNotFoundException+ , _ResourceNotFoundException++ -- ** LimitExceededException+ , _LimitExceededException++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** ListPolicies+ , module Network.AWS.IoT.ListPolicies++ -- ** CreatePolicy+ , module Network.AWS.IoT.CreatePolicy++ -- ** ListThingPrincipals+ , module Network.AWS.IoT.ListThingPrincipals++ -- ** ListPrincipalThings+ , module Network.AWS.IoT.ListPrincipalThings++ -- ** GetLoggingOptions+ , module Network.AWS.IoT.GetLoggingOptions++ -- ** CreateCertificateFromCsr+ , module Network.AWS.IoT.CreateCertificateFromCsr++ -- ** DeleteThing+ , module Network.AWS.IoT.DeleteThing++ -- ** UpdateThing+ , module Network.AWS.IoT.UpdateThing++ -- ** CancelCertificateTransfer+ , module Network.AWS.IoT.CancelCertificateTransfer++ -- ** DeletePolicyVersion+ , module Network.AWS.IoT.DeletePolicyVersion++ -- ** CreateTopicRule+ , module Network.AWS.IoT.CreateTopicRule++ -- ** CreatePolicyVersion+ , module Network.AWS.IoT.CreatePolicyVersion++ -- ** DeleteTopicRule+ , module Network.AWS.IoT.DeleteTopicRule++ -- ** ListPrincipalPolicies+ , module Network.AWS.IoT.ListPrincipalPolicies++ -- ** ListTopicRules+ , module Network.AWS.IoT.ListTopicRules++ -- ** TransferCertificate+ , module Network.AWS.IoT.TransferCertificate++ -- ** GetTopicRule+ , module Network.AWS.IoT.GetTopicRule++ -- ** DescribeThing+ , module Network.AWS.IoT.DescribeThing++ -- ** DeletePolicy+ , module Network.AWS.IoT.DeletePolicy++ -- ** ListCertificates+ , module Network.AWS.IoT.ListCertificates++ -- ** GetPolicyVersion+ , module Network.AWS.IoT.GetPolicyVersion++ -- ** DeleteCertificate+ , module Network.AWS.IoT.DeleteCertificate++ -- ** UpdateCertificate+ , module Network.AWS.IoT.UpdateCertificate++ -- ** AttachThingPrincipal+ , module Network.AWS.IoT.AttachThingPrincipal++ -- ** ListThings+ , module Network.AWS.IoT.ListThings++ -- ** DetachPrincipalPolicy+ , module Network.AWS.IoT.DetachPrincipalPolicy++ -- ** CreateThing+ , module Network.AWS.IoT.CreateThing++ -- ** DescribeCertificate+ , module Network.AWS.IoT.DescribeCertificate++ -- ** ReplaceTopicRule+ , module Network.AWS.IoT.ReplaceTopicRule++ -- ** SetDefaultPolicyVersion+ , module Network.AWS.IoT.SetDefaultPolicyVersion++ -- ** ListPolicyVersions+ , module Network.AWS.IoT.ListPolicyVersions++ -- ** CreateKeysAndCertificate+ , module Network.AWS.IoT.CreateKeysAndCertificate++ -- ** AcceptCertificateTransfer+ , module Network.AWS.IoT.AcceptCertificateTransfer++ -- ** GetPolicy+ , module Network.AWS.IoT.GetPolicy++ -- ** DescribeEndpoint+ , module Network.AWS.IoT.DescribeEndpoint++ -- ** SetLoggingOptions+ , module Network.AWS.IoT.SetLoggingOptions++ -- ** AttachPrincipalPolicy+ , module Network.AWS.IoT.AttachPrincipalPolicy++ -- ** RejectCertificateTransfer+ , module Network.AWS.IoT.RejectCertificateTransfer++ -- ** DetachThingPrincipal+ , module Network.AWS.IoT.DetachThingPrincipal++ -- * Types++ -- ** CertificateStatus+ , CertificateStatus (..)++ -- ** LogLevel+ , LogLevel (..)++ -- ** Action+ , Action+ , action+ , aSns+ , aDynamoDB+ , aFirehose+ , aLambda+ , aKinesis+ , aS3+ , aRepublish+ , aSqs++ -- ** AttributePayload+ , AttributePayload+ , attributePayload+ , apAttributes++ -- ** Certificate+ , Certificate+ , certificate+ , cStatus+ , cCertificateARN+ , cCertificateId+ , cCreationDate++ -- ** CertificateDescription+ , CertificateDescription+ , certificateDescription+ , cdStatus+ , cdOwnedBy+ , cdLastModifiedDate+ , cdCertificatePem+ , cdCertificateARN+ , cdCertificateId+ , cdCreationDate++ -- ** DynamoDBAction+ , DynamoDBAction+ , dynamoDBAction+ , ddaPayloadField+ , ddaTableName+ , ddaRoleARN+ , ddaHashKeyField+ , ddaHashKeyValue+ , ddaRangeKeyField+ , ddaRangeKeyValue++ -- ** FirehoseAction+ , FirehoseAction+ , firehoseAction+ , faRoleARN+ , faDeliveryStreamName++ -- ** KeyPair+ , KeyPair+ , keyPair+ , kpPrivateKey+ , kpPublicKey++ -- ** KinesisAction+ , KinesisAction+ , kinesisAction+ , kaPartitionKey+ , kaRoleARN+ , kaStreamName++ -- ** LambdaAction+ , LambdaAction+ , lambdaAction+ , laFunctionARN++ -- ** LoggingOptionsPayload+ , LoggingOptionsPayload+ , loggingOptionsPayload+ , lopLogLevel+ , lopRoleARN++ -- ** Policy+ , Policy+ , policy+ , pPolicyName+ , pPolicyARN++ -- ** PolicyVersion+ , PolicyVersion+ , policyVersion+ , pvVersionId+ , pvCreateDate+ , pvIsDefaultVersion++ -- ** RepublishAction+ , RepublishAction+ , republishAction+ , raRoleARN+ , raTopic++ -- ** S3Action+ , S3Action+ , s3Action+ , sRoleARN+ , sBucketName+ , sKey++ -- ** SNSAction+ , SNSAction+ , snsAction+ , snsaTargetARN+ , snsaRoleARN++ -- ** SqsAction+ , SqsAction+ , sqsAction+ , saUseBase64+ , saRoleARN+ , saQueueURL++ -- ** ThingAttribute+ , ThingAttribute+ , thingAttribute+ , taAttributes+ , taThingName++ -- ** TopicRule+ , TopicRule+ , topicRule+ , trCreatedAt+ , trActions+ , trRuleDisabled+ , trRuleName+ , trSql+ , trDescription++ -- ** TopicRuleListItem+ , TopicRuleListItem+ , topicRuleListItem+ , trliCreatedAt+ , trliRuleDisabled+ , trliRuleName+ , trliTopicPattern++ -- ** TopicRulePayload+ , TopicRulePayload+ , topicRulePayload+ , trpRuleDisabled+ , trpDescription+ , trpSql+ , trpActions+ ) where++import Network.AWS.IoT.AcceptCertificateTransfer+import Network.AWS.IoT.AttachPrincipalPolicy+import Network.AWS.IoT.AttachThingPrincipal+import Network.AWS.IoT.CancelCertificateTransfer+import Network.AWS.IoT.CreateCertificateFromCsr+import Network.AWS.IoT.CreateKeysAndCertificate+import Network.AWS.IoT.CreatePolicy+import Network.AWS.IoT.CreatePolicyVersion+import Network.AWS.IoT.CreateThing+import Network.AWS.IoT.CreateTopicRule+import Network.AWS.IoT.DeleteCertificate+import Network.AWS.IoT.DeletePolicy+import Network.AWS.IoT.DeletePolicyVersion+import Network.AWS.IoT.DeleteThing+import Network.AWS.IoT.DeleteTopicRule+import Network.AWS.IoT.DescribeCertificate+import Network.AWS.IoT.DescribeEndpoint+import Network.AWS.IoT.DescribeThing+import Network.AWS.IoT.DetachPrincipalPolicy+import Network.AWS.IoT.DetachThingPrincipal+import Network.AWS.IoT.GetLoggingOptions+import Network.AWS.IoT.GetPolicy+import Network.AWS.IoT.GetPolicyVersion+import Network.AWS.IoT.GetTopicRule+import Network.AWS.IoT.ListCertificates+import Network.AWS.IoT.ListPolicies+import Network.AWS.IoT.ListPolicyVersions+import Network.AWS.IoT.ListPrincipalPolicies+import Network.AWS.IoT.ListPrincipalThings+import Network.AWS.IoT.ListThingPrincipals+import Network.AWS.IoT.ListThings+import Network.AWS.IoT.ListTopicRules+import Network.AWS.IoT.RejectCertificateTransfer+import Network.AWS.IoT.ReplaceTopicRule+import Network.AWS.IoT.SetDefaultPolicyVersion+import Network.AWS.IoT.SetLoggingOptions+import Network.AWS.IoT.TransferCertificate+import Network.AWS.IoT.Types+import Network.AWS.IoT.UpdateCertificate+import Network.AWS.IoT.UpdateThing+import Network.AWS.IoT.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 'IoT'.+-}++{- $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/IoT/AcceptCertificateTransfer.hs view
@@ -0,0 +1,112 @@+{-# 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.IoT.AcceptCertificateTransfer+-- Copyright : (c) 2013-2015 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)+--+-- Accepts a pending certificate transfer. The default state of the+-- certificate is INACTIVE.+--+-- To check for pending certificate transfers, call ListCertificates to+-- enumerate your certificates.+--+-- /See:/ <https://aws.amazon.com/iot#AcceptCertificateTransfer.html AWS API Reference> for AcceptCertificateTransfer.+module Network.AWS.IoT.AcceptCertificateTransfer+ (+ -- * Creating a Request+ acceptCertificateTransfer+ , AcceptCertificateTransfer+ -- * Request Lenses+ , actSetAsActive+ , actCertificateId++ -- * Destructuring the Response+ , acceptCertificateTransferResponse+ , AcceptCertificateTransferResponse+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the AcceptCertificateTransfer operation.+--+-- /See:/ 'acceptCertificateTransfer' smart constructor.+data AcceptCertificateTransfer = AcceptCertificateTransfer'+ { _actSetAsActive :: !(Maybe Bool)+ , _actCertificateId :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'AcceptCertificateTransfer' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'actSetAsActive'+--+-- * 'actCertificateId'+acceptCertificateTransfer+ :: Text -- ^ 'actCertificateId'+ -> AcceptCertificateTransfer+acceptCertificateTransfer pCertificateId_ =+ AcceptCertificateTransfer'+ { _actSetAsActive = Nothing+ , _actCertificateId = pCertificateId_+ }++-- | Specifies whether the certificate is active.+actSetAsActive :: Lens' AcceptCertificateTransfer (Maybe Bool)+actSetAsActive = lens _actSetAsActive (\ s a -> s{_actSetAsActive = a});++-- | The ID of the certificate.+actCertificateId :: Lens' AcceptCertificateTransfer Text+actCertificateId = lens _actCertificateId (\ s a -> s{_actCertificateId = a});++instance AWSRequest AcceptCertificateTransfer where+ type Rs AcceptCertificateTransfer =+ AcceptCertificateTransferResponse+ request = patchJSON ioT+ response+ = receiveNull AcceptCertificateTransferResponse'++instance ToHeaders AcceptCertificateTransfer where+ toHeaders = const mempty++instance ToJSON AcceptCertificateTransfer where+ toJSON = const (Object mempty)++instance ToPath AcceptCertificateTransfer where+ toPath AcceptCertificateTransfer'{..}+ = mconcat+ ["/accept-certificate-transfer/",+ toBS _actCertificateId]++instance ToQuery AcceptCertificateTransfer where+ toQuery AcceptCertificateTransfer'{..}+ = mconcat ["setAsActive" =: _actSetAsActive]++-- | /See:/ 'acceptCertificateTransferResponse' smart constructor.+data AcceptCertificateTransferResponse =+ AcceptCertificateTransferResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'AcceptCertificateTransferResponse' with the minimum fields required to make a request.+--+acceptCertificateTransferResponse+ :: AcceptCertificateTransferResponse+acceptCertificateTransferResponse = AcceptCertificateTransferResponse'
+ gen/Network/AWS/IoT/AttachPrincipalPolicy.hs view
@@ -0,0 +1,109 @@+{-# 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.IoT.AttachPrincipalPolicy+-- Copyright : (c) 2013-2015 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)+--+-- Attaches the specified policy to the specified principal (certificate or+-- other credential).+--+-- /See:/ <https://aws.amazon.com/iot#AttachPrincipalPolicy.html AWS API Reference> for AttachPrincipalPolicy.+module Network.AWS.IoT.AttachPrincipalPolicy+ (+ -- * Creating a Request+ attachPrincipalPolicy+ , AttachPrincipalPolicy+ -- * Request Lenses+ , appPolicyName+ , appPrincipal++ -- * Destructuring the Response+ , attachPrincipalPolicyResponse+ , AttachPrincipalPolicyResponse+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the AttachPrincipalPolicy operation.+--+-- /See:/ 'attachPrincipalPolicy' smart constructor.+data AttachPrincipalPolicy = AttachPrincipalPolicy'+ { _appPolicyName :: !Text+ , _appPrincipal :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'AttachPrincipalPolicy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'appPolicyName'+--+-- * 'appPrincipal'+attachPrincipalPolicy+ :: Text -- ^ 'appPolicyName'+ -> Text -- ^ 'appPrincipal'+ -> AttachPrincipalPolicy+attachPrincipalPolicy pPolicyName_ pPrincipal_ =+ AttachPrincipalPolicy'+ { _appPolicyName = pPolicyName_+ , _appPrincipal = pPrincipal_+ }++-- | The policy name.+appPolicyName :: Lens' AttachPrincipalPolicy Text+appPolicyName = lens _appPolicyName (\ s a -> s{_appPolicyName = a});++-- | The principal which can be a certificate ARN (as returned from the+-- CreateCertificate operation) or a Cognito ID.+appPrincipal :: Lens' AttachPrincipalPolicy Text+appPrincipal = lens _appPrincipal (\ s a -> s{_appPrincipal = a});++instance AWSRequest AttachPrincipalPolicy where+ type Rs AttachPrincipalPolicy =+ AttachPrincipalPolicyResponse+ request = putJSON ioT+ response = receiveNull AttachPrincipalPolicyResponse'++instance ToHeaders AttachPrincipalPolicy where+ toHeaders AttachPrincipalPolicy'{..}+ = mconcat ["x-amzn-iot-principal" =# _appPrincipal]++instance ToJSON AttachPrincipalPolicy where+ toJSON = const (Object mempty)++instance ToPath AttachPrincipalPolicy where+ toPath AttachPrincipalPolicy'{..}+ = mconcat+ ["/principal-policies/", toBS _appPolicyName]++instance ToQuery AttachPrincipalPolicy where+ toQuery = const mempty++-- | /See:/ 'attachPrincipalPolicyResponse' smart constructor.+data AttachPrincipalPolicyResponse =+ AttachPrincipalPolicyResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'AttachPrincipalPolicyResponse' with the minimum fields required to make a request.+--+attachPrincipalPolicyResponse+ :: AttachPrincipalPolicyResponse+attachPrincipalPolicyResponse = AttachPrincipalPolicyResponse'
+ gen/Network/AWS/IoT/AttachThingPrincipal.hs view
@@ -0,0 +1,126 @@+{-# 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.IoT.AttachThingPrincipal+-- Copyright : (c) 2013-2015 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)+--+-- Attaches the specified principal to the specified thing.+--+-- /See:/ <https://aws.amazon.com/iot#AttachThingPrincipal.html AWS API Reference> for AttachThingPrincipal.+module Network.AWS.IoT.AttachThingPrincipal+ (+ -- * Creating a Request+ attachThingPrincipal+ , AttachThingPrincipal+ -- * Request Lenses+ , atpThingName+ , atpPrincipal++ -- * Destructuring the Response+ , attachThingPrincipalResponse+ , AttachThingPrincipalResponse+ -- * Response Lenses+ , atprsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the AttachThingPrincipal operation.+--+-- /See:/ 'attachThingPrincipal' smart constructor.+data AttachThingPrincipal = AttachThingPrincipal'+ { _atpThingName :: !Text+ , _atpPrincipal :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'AttachThingPrincipal' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'atpThingName'+--+-- * 'atpPrincipal'+attachThingPrincipal+ :: Text -- ^ 'atpThingName'+ -> Text -- ^ 'atpPrincipal'+ -> AttachThingPrincipal+attachThingPrincipal pThingName_ pPrincipal_ =+ AttachThingPrincipal'+ { _atpThingName = pThingName_+ , _atpPrincipal = pPrincipal_+ }++-- | The name of the thing.+atpThingName :: Lens' AttachThingPrincipal Text+atpThingName = lens _atpThingName (\ s a -> s{_atpThingName = a});++-- | The principal (certificate or other credential).+atpPrincipal :: Lens' AttachThingPrincipal Text+atpPrincipal = lens _atpPrincipal (\ s a -> s{_atpPrincipal = a});++instance AWSRequest AttachThingPrincipal where+ type Rs AttachThingPrincipal =+ AttachThingPrincipalResponse+ request = putJSON ioT+ response+ = receiveEmpty+ (\ s h x ->+ AttachThingPrincipalResponse' <$>+ (pure (fromEnum s)))++instance ToHeaders AttachThingPrincipal where+ toHeaders AttachThingPrincipal'{..}+ = mconcat ["x-amzn-principal" =# _atpPrincipal]++instance ToJSON AttachThingPrincipal where+ toJSON = const (Object mempty)++instance ToPath AttachThingPrincipal where+ toPath AttachThingPrincipal'{..}+ = mconcat+ ["/things/", toBS _atpThingName, "/principals"]++instance ToQuery AttachThingPrincipal where+ toQuery = const mempty++-- | The output from the AttachThingPrincipal operation.+--+-- /See:/ 'attachThingPrincipalResponse' smart constructor.+newtype AttachThingPrincipalResponse = AttachThingPrincipalResponse'+ { _atprsResponseStatus :: Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'AttachThingPrincipalResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'atprsResponseStatus'+attachThingPrincipalResponse+ :: Int -- ^ 'atprsResponseStatus'+ -> AttachThingPrincipalResponse+attachThingPrincipalResponse pResponseStatus_ =+ AttachThingPrincipalResponse'+ { _atprsResponseStatus = pResponseStatus_+ }++-- | The response status code.+atprsResponseStatus :: Lens' AttachThingPrincipalResponse Int+atprsResponseStatus = lens _atprsResponseStatus (\ s a -> s{_atprsResponseStatus = a});
+ gen/Network/AWS/IoT/CancelCertificateTransfer.hs view
@@ -0,0 +1,108 @@+{-# 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.IoT.CancelCertificateTransfer+-- Copyright : (c) 2013-2015 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)+--+-- Cancels a pending transfer for the specified certificate.+--+-- __Note__ Only the transfer source account can use this operation to+-- cancel a transfer (transfer destinations can use+-- RejectCertificateTransfer instead). After transfer, AWS IoT returns the+-- certificate to the source account in the INACTIVE state. Once the+-- destination account has accepted the transfer, the transfer may no+-- longer be cancelled.+--+-- After a certificate transfer is cancelled, the status of the certificate+-- changes from PENDING_TRANSFER to INACTIVE.+--+-- /See:/ <https://aws.amazon.com/iot#CancelCertificateTransfer.html AWS API Reference> for CancelCertificateTransfer.+module Network.AWS.IoT.CancelCertificateTransfer+ (+ -- * Creating a Request+ cancelCertificateTransfer+ , CancelCertificateTransfer+ -- * Request Lenses+ , cctCertificateId++ -- * Destructuring the Response+ , cancelCertificateTransferResponse+ , CancelCertificateTransferResponse+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the CancelCertificateTransfer operation.+--+-- /See:/ 'cancelCertificateTransfer' smart constructor.+newtype CancelCertificateTransfer = CancelCertificateTransfer'+ { _cctCertificateId :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CancelCertificateTransfer' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cctCertificateId'+cancelCertificateTransfer+ :: Text -- ^ 'cctCertificateId'+ -> CancelCertificateTransfer+cancelCertificateTransfer pCertificateId_ =+ CancelCertificateTransfer'+ { _cctCertificateId = pCertificateId_+ }++-- | The ID of the certificate.+cctCertificateId :: Lens' CancelCertificateTransfer Text+cctCertificateId = lens _cctCertificateId (\ s a -> s{_cctCertificateId = a});++instance AWSRequest CancelCertificateTransfer where+ type Rs CancelCertificateTransfer =+ CancelCertificateTransferResponse+ request = patchJSON ioT+ response+ = receiveNull CancelCertificateTransferResponse'++instance ToHeaders CancelCertificateTransfer where+ toHeaders = const mempty++instance ToJSON CancelCertificateTransfer where+ toJSON = const (Object mempty)++instance ToPath CancelCertificateTransfer where+ toPath CancelCertificateTransfer'{..}+ = mconcat+ ["/cancel-certificate-transfer/",+ toBS _cctCertificateId]++instance ToQuery CancelCertificateTransfer where+ toQuery = const mempty++-- | /See:/ 'cancelCertificateTransferResponse' smart constructor.+data CancelCertificateTransferResponse =+ CancelCertificateTransferResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CancelCertificateTransferResponse' with the minimum fields required to make a request.+--+cancelCertificateTransferResponse+ :: CancelCertificateTransferResponse+cancelCertificateTransferResponse = CancelCertificateTransferResponse'
+ gen/Network/AWS/IoT/CreateCertificateFromCsr.hs view
@@ -0,0 +1,163 @@+{-# 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.IoT.CreateCertificateFromCsr+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates an X.509 certificate using the specified certificate signing+-- request.+--+-- __Note__ Reusing the same certificate signing request (CSR) results in a+-- distinct certificate.+--+-- /See:/ <https://aws.amazon.com/iot#CreateCertificateFromCsr.html AWS API Reference> for CreateCertificateFromCsr.+module Network.AWS.IoT.CreateCertificateFromCsr+ (+ -- * Creating a Request+ createCertificateFromCsr+ , CreateCertificateFromCsr+ -- * Request Lenses+ , ccfcSetAsActive+ , ccfcCertificateSigningRequest++ -- * Destructuring the Response+ , createCertificateFromCsrResponse+ , CreateCertificateFromCsrResponse+ -- * Response Lenses+ , ccfcrsCertificatePem+ , ccfcrsCertificateARN+ , ccfcrsCertificateId+ , ccfcrsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the CreateCertificateFromCsr operation.+--+-- /See:/ 'createCertificateFromCsr' smart constructor.+data CreateCertificateFromCsr = CreateCertificateFromCsr'+ { _ccfcSetAsActive :: !(Maybe Bool)+ , _ccfcCertificateSigningRequest :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreateCertificateFromCsr' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ccfcSetAsActive'+--+-- * 'ccfcCertificateSigningRequest'+createCertificateFromCsr+ :: Text -- ^ 'ccfcCertificateSigningRequest'+ -> CreateCertificateFromCsr+createCertificateFromCsr pCertificateSigningRequest_ =+ CreateCertificateFromCsr'+ { _ccfcSetAsActive = Nothing+ , _ccfcCertificateSigningRequest = pCertificateSigningRequest_+ }++-- | Specifies whether the certificate is active.+ccfcSetAsActive :: Lens' CreateCertificateFromCsr (Maybe Bool)+ccfcSetAsActive = lens _ccfcSetAsActive (\ s a -> s{_ccfcSetAsActive = a});++-- | The certificate signing request (CSR).+ccfcCertificateSigningRequest :: Lens' CreateCertificateFromCsr Text+ccfcCertificateSigningRequest = lens _ccfcCertificateSigningRequest (\ s a -> s{_ccfcCertificateSigningRequest = a});++instance AWSRequest CreateCertificateFromCsr where+ type Rs CreateCertificateFromCsr =+ CreateCertificateFromCsrResponse+ request = postJSON ioT+ response+ = receiveJSON+ (\ s h x ->+ CreateCertificateFromCsrResponse' <$>+ (x .?> "certificatePem") <*> (x .?> "certificateArn")+ <*> (x .?> "certificateId")+ <*> (pure (fromEnum s)))++instance ToHeaders CreateCertificateFromCsr where+ toHeaders = const mempty++instance ToJSON CreateCertificateFromCsr where+ toJSON CreateCertificateFromCsr'{..}+ = object+ (catMaybes+ [Just+ ("certificateSigningRequest" .=+ _ccfcCertificateSigningRequest)])++instance ToPath CreateCertificateFromCsr where+ toPath = const "/certificates"++instance ToQuery CreateCertificateFromCsr where+ toQuery CreateCertificateFromCsr'{..}+ = mconcat ["setAsActive" =: _ccfcSetAsActive]++-- | The output from the CreateCertificateFromCsr operation.+--+-- /See:/ 'createCertificateFromCsrResponse' smart constructor.+data CreateCertificateFromCsrResponse = CreateCertificateFromCsrResponse'+ { _ccfcrsCertificatePem :: !(Maybe Text)+ , _ccfcrsCertificateARN :: !(Maybe Text)+ , _ccfcrsCertificateId :: !(Maybe Text)+ , _ccfcrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreateCertificateFromCsrResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ccfcrsCertificatePem'+--+-- * 'ccfcrsCertificateARN'+--+-- * 'ccfcrsCertificateId'+--+-- * 'ccfcrsResponseStatus'+createCertificateFromCsrResponse+ :: Int -- ^ 'ccfcrsResponseStatus'+ -> CreateCertificateFromCsrResponse+createCertificateFromCsrResponse pResponseStatus_ =+ CreateCertificateFromCsrResponse'+ { _ccfcrsCertificatePem = Nothing+ , _ccfcrsCertificateARN = Nothing+ , _ccfcrsCertificateId = Nothing+ , _ccfcrsResponseStatus = pResponseStatus_+ }++-- | The certificate data, in PEM format.+ccfcrsCertificatePem :: Lens' CreateCertificateFromCsrResponse (Maybe Text)+ccfcrsCertificatePem = lens _ccfcrsCertificatePem (\ s a -> s{_ccfcrsCertificatePem = a});++-- | The Amazon Resource Name (ARN) of the certificate. You can use the ARN+-- as a principal for policy operations.+ccfcrsCertificateARN :: Lens' CreateCertificateFromCsrResponse (Maybe Text)+ccfcrsCertificateARN = lens _ccfcrsCertificateARN (\ s a -> s{_ccfcrsCertificateARN = a});++-- | The ID of the certificate. Certificate management operations only take a+-- certificateId.+ccfcrsCertificateId :: Lens' CreateCertificateFromCsrResponse (Maybe Text)+ccfcrsCertificateId = lens _ccfcrsCertificateId (\ s a -> s{_ccfcrsCertificateId = a});++-- | The response status code.+ccfcrsResponseStatus :: Lens' CreateCertificateFromCsrResponse Int+ccfcrsResponseStatus = lens _ccfcrsResponseStatus (\ s a -> s{_ccfcrsResponseStatus = a});
+ gen/Network/AWS/IoT/CreateKeysAndCertificate.hs view
@@ -0,0 +1,157 @@+{-# 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.IoT.CreateKeysAndCertificate+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a 2048 bit RSA key pair and issues an X.509 certificate using+-- the issued public key.+--+-- __Note__ This is the only time AWS IoT issues the private key for this+-- certificate. It is important to keep track of the private key.+--+-- /See:/ <https://aws.amazon.com/iot#CreateKeysAndCertificate.html AWS API Reference> for CreateKeysAndCertificate.+module Network.AWS.IoT.CreateKeysAndCertificate+ (+ -- * Creating a Request+ createKeysAndCertificate+ , CreateKeysAndCertificate+ -- * Request Lenses+ , ckacSetAsActive++ -- * Destructuring the Response+ , createKeysAndCertificateResponse+ , CreateKeysAndCertificateResponse+ -- * Response Lenses+ , ckacrsKeyPair+ , ckacrsCertificatePem+ , ckacrsCertificateARN+ , ckacrsCertificateId+ , ckacrsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the CreateKeysAndCertificate operation.+--+-- /See:/ 'createKeysAndCertificate' smart constructor.+newtype CreateKeysAndCertificate = CreateKeysAndCertificate'+ { _ckacSetAsActive :: Maybe Bool+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreateKeysAndCertificate' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ckacSetAsActive'+createKeysAndCertificate+ :: CreateKeysAndCertificate+createKeysAndCertificate =+ CreateKeysAndCertificate'+ { _ckacSetAsActive = Nothing+ }++-- | Specifies whether the certificate is active.+ckacSetAsActive :: Lens' CreateKeysAndCertificate (Maybe Bool)+ckacSetAsActive = lens _ckacSetAsActive (\ s a -> s{_ckacSetAsActive = a});++instance AWSRequest CreateKeysAndCertificate where+ type Rs CreateKeysAndCertificate =+ CreateKeysAndCertificateResponse+ request = postJSON ioT+ response+ = receiveJSON+ (\ s h x ->+ CreateKeysAndCertificateResponse' <$>+ (x .?> "keyPair") <*> (x .?> "certificatePem") <*>+ (x .?> "certificateArn")+ <*> (x .?> "certificateId")+ <*> (pure (fromEnum s)))++instance ToHeaders CreateKeysAndCertificate where+ toHeaders = const mempty++instance ToJSON CreateKeysAndCertificate where+ toJSON = const (Object mempty)++instance ToPath CreateKeysAndCertificate where+ toPath = const "/keys-and-certificate"++instance ToQuery CreateKeysAndCertificate where+ toQuery CreateKeysAndCertificate'{..}+ = mconcat ["setAsActive" =: _ckacSetAsActive]++-- | The output of the CreateKeysAndCertificate operation.+--+-- /See:/ 'createKeysAndCertificateResponse' smart constructor.+data CreateKeysAndCertificateResponse = CreateKeysAndCertificateResponse'+ { _ckacrsKeyPair :: !(Maybe KeyPair)+ , _ckacrsCertificatePem :: !(Maybe Text)+ , _ckacrsCertificateARN :: !(Maybe Text)+ , _ckacrsCertificateId :: !(Maybe Text)+ , _ckacrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreateKeysAndCertificateResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ckacrsKeyPair'+--+-- * 'ckacrsCertificatePem'+--+-- * 'ckacrsCertificateARN'+--+-- * 'ckacrsCertificateId'+--+-- * 'ckacrsResponseStatus'+createKeysAndCertificateResponse+ :: Int -- ^ 'ckacrsResponseStatus'+ -> CreateKeysAndCertificateResponse+createKeysAndCertificateResponse pResponseStatus_ =+ CreateKeysAndCertificateResponse'+ { _ckacrsKeyPair = Nothing+ , _ckacrsCertificatePem = Nothing+ , _ckacrsCertificateARN = Nothing+ , _ckacrsCertificateId = Nothing+ , _ckacrsResponseStatus = pResponseStatus_+ }++-- | The generated key pair.+ckacrsKeyPair :: Lens' CreateKeysAndCertificateResponse (Maybe KeyPair)+ckacrsKeyPair = lens _ckacrsKeyPair (\ s a -> s{_ckacrsKeyPair = a});++-- | The certificate data, in PEM format.+ckacrsCertificatePem :: Lens' CreateKeysAndCertificateResponse (Maybe Text)+ckacrsCertificatePem = lens _ckacrsCertificatePem (\ s a -> s{_ckacrsCertificatePem = a});++-- | The ARN of the certificate.+ckacrsCertificateARN :: Lens' CreateKeysAndCertificateResponse (Maybe Text)+ckacrsCertificateARN = lens _ckacrsCertificateARN (\ s a -> s{_ckacrsCertificateARN = a});++-- | The ID of the certificate. AWS IoT issues a default subject name for the+-- certificate (e.g., AWS IoT Certificate).+ckacrsCertificateId :: Lens' CreateKeysAndCertificateResponse (Maybe Text)+ckacrsCertificateId = lens _ckacrsCertificateId (\ s a -> s{_ckacrsCertificateId = a});++-- | The response status code.+ckacrsResponseStatus :: Lens' CreateKeysAndCertificateResponse Int+ckacrsResponseStatus = lens _ckacrsResponseStatus (\ s a -> s{_ckacrsResponseStatus = a});
+ gen/Network/AWS/IoT/CreatePolicy.hs view
@@ -0,0 +1,171 @@+{-# 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.IoT.CreatePolicy+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates an AWS IoT policy.+--+-- The created policy is the default version for the policy. This operation+-- creates a policy version with a version identifier of __1__ and sets+-- __1__ as the policy\'s default version.+--+-- /See:/ <https://aws.amazon.com/iot#CreatePolicy.html AWS API Reference> for CreatePolicy.+module Network.AWS.IoT.CreatePolicy+ (+ -- * Creating a Request+ createPolicy+ , CreatePolicy+ -- * Request Lenses+ , cpPolicyName+ , cpPolicyDocument++ -- * Destructuring the Response+ , createPolicyResponse+ , CreatePolicyResponse+ -- * Response Lenses+ , cprsPolicyName+ , cprsPolicyDocument+ , cprsPolicyVersionId+ , cprsPolicyARN+ , cprsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the CreatePolicy operation.+--+-- /See:/ 'createPolicy' smart constructor.+data CreatePolicy = CreatePolicy'+ { _cpPolicyName :: !Text+ , _cpPolicyDocument :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreatePolicy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cpPolicyName'+--+-- * 'cpPolicyDocument'+createPolicy+ :: Text -- ^ 'cpPolicyName'+ -> Text -- ^ 'cpPolicyDocument'+ -> CreatePolicy+createPolicy pPolicyName_ pPolicyDocument_ =+ CreatePolicy'+ { _cpPolicyName = pPolicyName_+ , _cpPolicyDocument = pPolicyDocument_+ }++-- | The policy name.+cpPolicyName :: Lens' CreatePolicy Text+cpPolicyName = lens _cpPolicyName (\ s a -> s{_cpPolicyName = a});++-- | The JSON document that describes the policy. The length of the+-- __policyDocument__ must be a minimum length of 1, with a maximum length+-- of 2048, excluding whitespace.+cpPolicyDocument :: Lens' CreatePolicy Text+cpPolicyDocument = lens _cpPolicyDocument (\ s a -> s{_cpPolicyDocument = a});++instance AWSRequest CreatePolicy where+ type Rs CreatePolicy = CreatePolicyResponse+ request = postJSON ioT+ response+ = receiveJSON+ (\ s h x ->+ CreatePolicyResponse' <$>+ (x .?> "policyName") <*> (x .?> "policyDocument") <*>+ (x .?> "policyVersionId")+ <*> (x .?> "policyArn")+ <*> (pure (fromEnum s)))++instance ToHeaders CreatePolicy where+ toHeaders = const mempty++instance ToJSON CreatePolicy where+ toJSON CreatePolicy'{..}+ = object+ (catMaybes+ [Just ("policyDocument" .= _cpPolicyDocument)])++instance ToPath CreatePolicy where+ toPath CreatePolicy'{..}+ = mconcat ["/policies/", toBS _cpPolicyName]++instance ToQuery CreatePolicy where+ toQuery = const mempty++-- | The output from the CreatePolicy operation.+--+-- /See:/ 'createPolicyResponse' smart constructor.+data CreatePolicyResponse = CreatePolicyResponse'+ { _cprsPolicyName :: !(Maybe Text)+ , _cprsPolicyDocument :: !(Maybe Text)+ , _cprsPolicyVersionId :: !(Maybe Text)+ , _cprsPolicyARN :: !(Maybe Text)+ , _cprsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreatePolicyResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cprsPolicyName'+--+-- * 'cprsPolicyDocument'+--+-- * 'cprsPolicyVersionId'+--+-- * 'cprsPolicyARN'+--+-- * 'cprsResponseStatus'+createPolicyResponse+ :: Int -- ^ 'cprsResponseStatus'+ -> CreatePolicyResponse+createPolicyResponse pResponseStatus_ =+ CreatePolicyResponse'+ { _cprsPolicyName = Nothing+ , _cprsPolicyDocument = Nothing+ , _cprsPolicyVersionId = Nothing+ , _cprsPolicyARN = Nothing+ , _cprsResponseStatus = pResponseStatus_+ }++-- | The policy name.+cprsPolicyName :: Lens' CreatePolicyResponse (Maybe Text)+cprsPolicyName = lens _cprsPolicyName (\ s a -> s{_cprsPolicyName = a});++-- | The JSON document that describes the policy.+cprsPolicyDocument :: Lens' CreatePolicyResponse (Maybe Text)+cprsPolicyDocument = lens _cprsPolicyDocument (\ s a -> s{_cprsPolicyDocument = a});++-- | The policy version ID.+cprsPolicyVersionId :: Lens' CreatePolicyResponse (Maybe Text)+cprsPolicyVersionId = lens _cprsPolicyVersionId (\ s a -> s{_cprsPolicyVersionId = a});++-- | The policy ARN.+cprsPolicyARN :: Lens' CreatePolicyResponse (Maybe Text)+cprsPolicyARN = lens _cprsPolicyARN (\ s a -> s{_cprsPolicyARN = a});++-- | The response status code.+cprsResponseStatus :: Lens' CreatePolicyResponse Int+cprsResponseStatus = lens _cprsResponseStatus (\ s a -> s{_cprsResponseStatus = a});
+ gen/Network/AWS/IoT/CreatePolicyVersion.hs view
@@ -0,0 +1,178 @@+{-# 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.IoT.CreatePolicyVersion+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a new version of the specified AWS IoT policy.+--+-- /See:/ <https://aws.amazon.com/iot#CreatePolicyVersion.html AWS API Reference> for CreatePolicyVersion.+module Network.AWS.IoT.CreatePolicyVersion+ (+ -- * Creating a Request+ createPolicyVersion+ , CreatePolicyVersion+ -- * Request Lenses+ , cpvSetAsDefault+ , cpvPolicyName+ , cpvPolicyDocument++ -- * Destructuring the Response+ , createPolicyVersionResponse+ , CreatePolicyVersionResponse+ -- * Response Lenses+ , cpvrsPolicyDocument+ , cpvrsPolicyVersionId+ , cpvrsPolicyARN+ , cpvrsIsDefaultVersion+ , cpvrsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the CreatePolicyVersion operation.+--+-- /See:/ 'createPolicyVersion' smart constructor.+data CreatePolicyVersion = CreatePolicyVersion'+ { _cpvSetAsDefault :: !(Maybe Bool)+ , _cpvPolicyName :: !Text+ , _cpvPolicyDocument :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreatePolicyVersion' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cpvSetAsDefault'+--+-- * 'cpvPolicyName'+--+-- * 'cpvPolicyDocument'+createPolicyVersion+ :: Text -- ^ 'cpvPolicyName'+ -> Text -- ^ 'cpvPolicyDocument'+ -> CreatePolicyVersion+createPolicyVersion pPolicyName_ pPolicyDocument_ =+ CreatePolicyVersion'+ { _cpvSetAsDefault = Nothing+ , _cpvPolicyName = pPolicyName_+ , _cpvPolicyDocument = pPolicyDocument_+ }++-- | Specifies whether the policy version is set as the default.+cpvSetAsDefault :: Lens' CreatePolicyVersion (Maybe Bool)+cpvSetAsDefault = lens _cpvSetAsDefault (\ s a -> s{_cpvSetAsDefault = a});++-- | The policy name.+cpvPolicyName :: Lens' CreatePolicyVersion Text+cpvPolicyName = lens _cpvPolicyName (\ s a -> s{_cpvPolicyName = a});++-- | The JSON document that describes the policy.+cpvPolicyDocument :: Lens' CreatePolicyVersion Text+cpvPolicyDocument = lens _cpvPolicyDocument (\ s a -> s{_cpvPolicyDocument = a});++instance AWSRequest CreatePolicyVersion where+ type Rs CreatePolicyVersion =+ CreatePolicyVersionResponse+ request = postJSON ioT+ response+ = receiveJSON+ (\ s h x ->+ CreatePolicyVersionResponse' <$>+ (x .?> "policyDocument") <*>+ (x .?> "policyVersionId")+ <*> (x .?> "policyArn")+ <*> (x .?> "isDefaultVersion")+ <*> (pure (fromEnum s)))++instance ToHeaders CreatePolicyVersion where+ toHeaders = const mempty++instance ToJSON CreatePolicyVersion where+ toJSON CreatePolicyVersion'{..}+ = object+ (catMaybes+ [Just ("policyDocument" .= _cpvPolicyDocument)])++instance ToPath CreatePolicyVersion where+ toPath CreatePolicyVersion'{..}+ = mconcat+ ["/policies/", toBS _cpvPolicyName, "/version"]++instance ToQuery CreatePolicyVersion where+ toQuery CreatePolicyVersion'{..}+ = mconcat ["setAsDefault" =: _cpvSetAsDefault]++-- | The output of the CreatePolicyVersion operation.+--+-- /See:/ 'createPolicyVersionResponse' smart constructor.+data CreatePolicyVersionResponse = CreatePolicyVersionResponse'+ { _cpvrsPolicyDocument :: !(Maybe Text)+ , _cpvrsPolicyVersionId :: !(Maybe Text)+ , _cpvrsPolicyARN :: !(Maybe Text)+ , _cpvrsIsDefaultVersion :: !(Maybe Bool)+ , _cpvrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreatePolicyVersionResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cpvrsPolicyDocument'+--+-- * 'cpvrsPolicyVersionId'+--+-- * 'cpvrsPolicyARN'+--+-- * 'cpvrsIsDefaultVersion'+--+-- * 'cpvrsResponseStatus'+createPolicyVersionResponse+ :: Int -- ^ 'cpvrsResponseStatus'+ -> CreatePolicyVersionResponse+createPolicyVersionResponse pResponseStatus_ =+ CreatePolicyVersionResponse'+ { _cpvrsPolicyDocument = Nothing+ , _cpvrsPolicyVersionId = Nothing+ , _cpvrsPolicyARN = Nothing+ , _cpvrsIsDefaultVersion = Nothing+ , _cpvrsResponseStatus = pResponseStatus_+ }++-- | The JSON document that describes the policy.+cpvrsPolicyDocument :: Lens' CreatePolicyVersionResponse (Maybe Text)+cpvrsPolicyDocument = lens _cpvrsPolicyDocument (\ s a -> s{_cpvrsPolicyDocument = a});++-- | The policy version ID.+cpvrsPolicyVersionId :: Lens' CreatePolicyVersionResponse (Maybe Text)+cpvrsPolicyVersionId = lens _cpvrsPolicyVersionId (\ s a -> s{_cpvrsPolicyVersionId = a});++-- | The policy ARN.+cpvrsPolicyARN :: Lens' CreatePolicyVersionResponse (Maybe Text)+cpvrsPolicyARN = lens _cpvrsPolicyARN (\ s a -> s{_cpvrsPolicyARN = a});++-- | Specifies whether the policy version is the default.+cpvrsIsDefaultVersion :: Lens' CreatePolicyVersionResponse (Maybe Bool)+cpvrsIsDefaultVersion = lens _cpvrsIsDefaultVersion (\ s a -> s{_cpvrsIsDefaultVersion = a});++-- | The response status code.+cpvrsResponseStatus :: Lens' CreatePolicyVersionResponse Int+cpvrsResponseStatus = lens _cpvrsResponseStatus (\ s a -> s{_cpvrsResponseStatus = a});
+ gen/Network/AWS/IoT/CreateThing.hs view
@@ -0,0 +1,146 @@+{-# 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.IoT.CreateThing+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a thing in the thing registry.+--+-- /See:/ <https://aws.amazon.com/iot#CreateThing.html AWS API Reference> for CreateThing.+module Network.AWS.IoT.CreateThing+ (+ -- * Creating a Request+ createThing+ , CreateThing+ -- * Request Lenses+ , ctAttributePayload+ , ctThingName++ -- * Destructuring the Response+ , createThingResponse+ , CreateThingResponse+ -- * Response Lenses+ , ctrsThingARN+ , ctrsThingName+ , ctrsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the CreateThing operation.+--+-- /See:/ 'createThing' smart constructor.+data CreateThing = CreateThing'+ { _ctAttributePayload :: !(Maybe AttributePayload)+ , _ctThingName :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreateThing' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ctAttributePayload'+--+-- * 'ctThingName'+createThing+ :: Text -- ^ 'ctThingName'+ -> CreateThing+createThing pThingName_ =+ CreateThing'+ { _ctAttributePayload = Nothing+ , _ctThingName = pThingName_+ }++-- | The attribute payload. Which consists of up to 3 name\/value pairs in a+-- JSON document. For example:+-- {\\\"attributes\\\":{\\\"string1\\\":\\\"string2\\”}}+ctAttributePayload :: Lens' CreateThing (Maybe AttributePayload)+ctAttributePayload = lens _ctAttributePayload (\ s a -> s{_ctAttributePayload = a});++-- | The name of the thing.+ctThingName :: Lens' CreateThing Text+ctThingName = lens _ctThingName (\ s a -> s{_ctThingName = a});++instance AWSRequest CreateThing where+ type Rs CreateThing = CreateThingResponse+ request = postJSON ioT+ response+ = receiveJSON+ (\ s h x ->+ CreateThingResponse' <$>+ (x .?> "thingArn") <*> (x .?> "thingName") <*>+ (pure (fromEnum s)))++instance ToHeaders CreateThing where+ toHeaders = const mempty++instance ToJSON CreateThing where+ toJSON CreateThing'{..}+ = object+ (catMaybes+ [("attributePayload" .=) <$> _ctAttributePayload])++instance ToPath CreateThing where+ toPath CreateThing'{..}+ = mconcat ["/things/", toBS _ctThingName]++instance ToQuery CreateThing where+ toQuery = const mempty++-- | The output of the CreateThing operation.+--+-- /See:/ 'createThingResponse' smart constructor.+data CreateThingResponse = CreateThingResponse'+ { _ctrsThingARN :: !(Maybe Text)+ , _ctrsThingName :: !(Maybe Text)+ , _ctrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreateThingResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ctrsThingARN'+--+-- * 'ctrsThingName'+--+-- * 'ctrsResponseStatus'+createThingResponse+ :: Int -- ^ 'ctrsResponseStatus'+ -> CreateThingResponse+createThingResponse pResponseStatus_ =+ CreateThingResponse'+ { _ctrsThingARN = Nothing+ , _ctrsThingName = Nothing+ , _ctrsResponseStatus = pResponseStatus_+ }++-- | The thing ARN.+ctrsThingARN :: Lens' CreateThingResponse (Maybe Text)+ctrsThingARN = lens _ctrsThingARN (\ s a -> s{_ctrsThingARN = a});++-- | The name of the thing.+ctrsThingName :: Lens' CreateThingResponse (Maybe Text)+ctrsThingName = lens _ctrsThingName (\ s a -> s{_ctrsThingName = a});++-- | The response status code.+ctrsResponseStatus :: Lens' CreateThingResponse Int+ctrsResponseStatus = lens _ctrsResponseStatus (\ s a -> s{_ctrsResponseStatus = a});
+ gen/Network/AWS/IoT/CreateTopicRule.hs view
@@ -0,0 +1,107 @@+{-# 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.IoT.CreateTopicRule+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a rule.+--+-- /See:/ <https://aws.amazon.com/iot#CreateTopicRule.html AWS API Reference> for CreateTopicRule.+module Network.AWS.IoT.CreateTopicRule+ (+ -- * Creating a Request+ createTopicRule+ , CreateTopicRule+ -- * Request Lenses+ , ctrRuleName+ , ctrTopicRulePayload++ -- * Destructuring the Response+ , createTopicRuleResponse+ , CreateTopicRuleResponse+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the CreateTopicRule operation.+--+-- /See:/ 'createTopicRule' smart constructor.+data CreateTopicRule = CreateTopicRule'+ { _ctrRuleName :: !Text+ , _ctrTopicRulePayload :: !TopicRulePayload+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreateTopicRule' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ctrRuleName'+--+-- * 'ctrTopicRulePayload'+createTopicRule+ :: Text -- ^ 'ctrRuleName'+ -> TopicRulePayload -- ^ 'ctrTopicRulePayload'+ -> CreateTopicRule+createTopicRule pRuleName_ pTopicRulePayload_ =+ CreateTopicRule'+ { _ctrRuleName = pRuleName_+ , _ctrTopicRulePayload = pTopicRulePayload_+ }++-- | The name of the rule.+ctrRuleName :: Lens' CreateTopicRule Text+ctrRuleName = lens _ctrRuleName (\ s a -> s{_ctrRuleName = a});++-- | The rule payload.+ctrTopicRulePayload :: Lens' CreateTopicRule TopicRulePayload+ctrTopicRulePayload = lens _ctrTopicRulePayload (\ s a -> s{_ctrTopicRulePayload = a});++instance AWSRequest CreateTopicRule where+ type Rs CreateTopicRule = CreateTopicRuleResponse+ request = postJSON ioT+ response = receiveNull CreateTopicRuleResponse'++instance ToHeaders CreateTopicRule where+ toHeaders = const mempty++instance ToJSON CreateTopicRule where+ toJSON CreateTopicRule'{..}+ = object+ (catMaybes+ [Just ("topicRulePayload" .= _ctrTopicRulePayload)])++instance ToPath CreateTopicRule where+ toPath CreateTopicRule'{..}+ = mconcat ["/rules/", toBS _ctrRuleName]++instance ToQuery CreateTopicRule where+ toQuery = const mempty++-- | /See:/ 'createTopicRuleResponse' smart constructor.+data CreateTopicRuleResponse =+ CreateTopicRuleResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CreateTopicRuleResponse' with the minimum fields required to make a request.+--+createTopicRuleResponse+ :: CreateTopicRuleResponse+createTopicRuleResponse = CreateTopicRuleResponse'
+ gen/Network/AWS/IoT/DeleteCertificate.hs view
@@ -0,0 +1,99 @@+{-# 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.IoT.DeleteCertificate+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the specified certificate.+--+-- A certificate cannot be deleted if it has a policy attached to it. To+-- delete a certificate, first detach all policies using the+-- DetachPrincipalPolicy operation.+--+-- In addition, a certificate cannot be deleted if it is in ACTIVE status.+-- To delete a certificate, first change the status to INACTIVE using the+-- UpdateCertificate operation.+--+-- /See:/ <https://aws.amazon.com/iot#DeleteCertificate.html AWS API Reference> for DeleteCertificate.+module Network.AWS.IoT.DeleteCertificate+ (+ -- * Creating a Request+ deleteCertificate+ , DeleteCertificate+ -- * Request Lenses+ , dcCertificateId++ -- * Destructuring the Response+ , deleteCertificateResponse+ , DeleteCertificateResponse+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the DeleteCertificate operation.+--+-- /See:/ 'deleteCertificate' smart constructor.+newtype DeleteCertificate = DeleteCertificate'+ { _dcCertificateId :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeleteCertificate' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dcCertificateId'+deleteCertificate+ :: Text -- ^ 'dcCertificateId'+ -> DeleteCertificate+deleteCertificate pCertificateId_ =+ DeleteCertificate'+ { _dcCertificateId = pCertificateId_+ }++-- | The ID of the certificate.+dcCertificateId :: Lens' DeleteCertificate Text+dcCertificateId = lens _dcCertificateId (\ s a -> s{_dcCertificateId = a});++instance AWSRequest DeleteCertificate where+ type Rs DeleteCertificate = DeleteCertificateResponse+ request = delete ioT+ response = receiveNull DeleteCertificateResponse'++instance ToHeaders DeleteCertificate where+ toHeaders = const mempty++instance ToPath DeleteCertificate where+ toPath DeleteCertificate'{..}+ = mconcat ["/certificates/", toBS _dcCertificateId]++instance ToQuery DeleteCertificate where+ toQuery = const mempty++-- | /See:/ 'deleteCertificateResponse' smart constructor.+data DeleteCertificateResponse =+ DeleteCertificateResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeleteCertificateResponse' with the minimum fields required to make a request.+--+deleteCertificateResponse+ :: DeleteCertificateResponse+deleteCertificateResponse = DeleteCertificateResponse'
+ gen/Network/AWS/IoT/DeletePolicy.hs view
@@ -0,0 +1,106 @@+{-# 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.IoT.DeletePolicy+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the specified policy.+--+-- A policy cannot be deleted if:+--+-- - it has non-default versions+--+-- - it is attached to any certificate+--+-- To delete a policy:+--+-- - First delete all the non-default versions of the policy using the+-- DeletePolicyVersion API.+--+-- - Detach it from any certificate using the DetachPrincipalPolicy API.+--+-- When a policy is deleted, its default version is deleted with it.+--+-- /See:/ <https://aws.amazon.com/iot#DeletePolicy.html AWS API Reference> for DeletePolicy.+module Network.AWS.IoT.DeletePolicy+ (+ -- * Creating a Request+ deletePolicy+ , DeletePolicy+ -- * Request Lenses+ , dpPolicyName++ -- * Destructuring the Response+ , deletePolicyResponse+ , DeletePolicyResponse+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the DeletePolicy operation.+--+-- /See:/ 'deletePolicy' smart constructor.+newtype DeletePolicy = DeletePolicy'+ { _dpPolicyName :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeletePolicy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dpPolicyName'+deletePolicy+ :: Text -- ^ 'dpPolicyName'+ -> DeletePolicy+deletePolicy pPolicyName_ =+ DeletePolicy'+ { _dpPolicyName = pPolicyName_+ }++-- | The name of the policy to delete.+dpPolicyName :: Lens' DeletePolicy Text+dpPolicyName = lens _dpPolicyName (\ s a -> s{_dpPolicyName = a});++instance AWSRequest DeletePolicy where+ type Rs DeletePolicy = DeletePolicyResponse+ request = delete ioT+ response = receiveNull DeletePolicyResponse'++instance ToHeaders DeletePolicy where+ toHeaders = const mempty++instance ToPath DeletePolicy where+ toPath DeletePolicy'{..}+ = mconcat ["/policies/", toBS _dpPolicyName]++instance ToQuery DeletePolicy where+ toQuery = const mempty++-- | /See:/ 'deletePolicyResponse' smart constructor.+data DeletePolicyResponse =+ DeletePolicyResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeletePolicyResponse' with the minimum fields required to make a request.+--+deletePolicyResponse+ :: DeletePolicyResponse+deletePolicyResponse = DeletePolicyResponse'
+ gen/Network/AWS/IoT/DeletePolicyVersion.hs view
@@ -0,0 +1,108 @@+{-# 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.IoT.DeletePolicyVersion+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the specified version of the specified policy. The default+-- version of the policy cannot be deleted.+--+-- To delete the default version use the DeletePolicy API or mark the+-- policy as non-default and then delete it.+--+-- /See:/ <https://aws.amazon.com/iot#DeletePolicyVersion.html AWS API Reference> for DeletePolicyVersion.+module Network.AWS.IoT.DeletePolicyVersion+ (+ -- * Creating a Request+ deletePolicyVersion+ , DeletePolicyVersion+ -- * Request Lenses+ , dpvPolicyName+ , dpvPolicyVersionId++ -- * Destructuring the Response+ , deletePolicyVersionResponse+ , DeletePolicyVersionResponse+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the DeletePolicyVersion operation.+--+-- /See:/ 'deletePolicyVersion' smart constructor.+data DeletePolicyVersion = DeletePolicyVersion'+ { _dpvPolicyName :: !Text+ , _dpvPolicyVersionId :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeletePolicyVersion' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dpvPolicyName'+--+-- * 'dpvPolicyVersionId'+deletePolicyVersion+ :: Text -- ^ 'dpvPolicyName'+ -> Text -- ^ 'dpvPolicyVersionId'+ -> DeletePolicyVersion+deletePolicyVersion pPolicyName_ pPolicyVersionId_ =+ DeletePolicyVersion'+ { _dpvPolicyName = pPolicyName_+ , _dpvPolicyVersionId = pPolicyVersionId_+ }++-- | The name of the policy.+dpvPolicyName :: Lens' DeletePolicyVersion Text+dpvPolicyName = lens _dpvPolicyName (\ s a -> s{_dpvPolicyName = a});++-- | The policy version ID.+dpvPolicyVersionId :: Lens' DeletePolicyVersion Text+dpvPolicyVersionId = lens _dpvPolicyVersionId (\ s a -> s{_dpvPolicyVersionId = a});++instance AWSRequest DeletePolicyVersion where+ type Rs DeletePolicyVersion =+ DeletePolicyVersionResponse+ request = delete ioT+ response = receiveNull DeletePolicyVersionResponse'++instance ToHeaders DeletePolicyVersion where+ toHeaders = const mempty++instance ToPath DeletePolicyVersion where+ toPath DeletePolicyVersion'{..}+ = mconcat+ ["/policies/", toBS _dpvPolicyName, "/version/",+ toBS _dpvPolicyVersionId]++instance ToQuery DeletePolicyVersion where+ toQuery = const mempty++-- | /See:/ 'deletePolicyVersionResponse' smart constructor.+data DeletePolicyVersionResponse =+ DeletePolicyVersionResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeletePolicyVersionResponse' with the minimum fields required to make a request.+--+deletePolicyVersionResponse+ :: DeletePolicyVersionResponse+deletePolicyVersionResponse = DeletePolicyVersionResponse'
+ gen/Network/AWS/IoT/DeleteThing.hs view
@@ -0,0 +1,109 @@+{-# 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.IoT.DeleteThing+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the specified thing from the Thing Registry.+--+-- /See:/ <https://aws.amazon.com/iot#DeleteThing.html AWS API Reference> for DeleteThing.+module Network.AWS.IoT.DeleteThing+ (+ -- * Creating a Request+ deleteThing+ , DeleteThing+ -- * Request Lenses+ , dtThingName++ -- * Destructuring the Response+ , deleteThingResponse+ , DeleteThingResponse+ -- * Response Lenses+ , drsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the DeleteThing operation.+--+-- /See:/ 'deleteThing' smart constructor.+newtype DeleteThing = DeleteThing'+ { _dtThingName :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeleteThing' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dtThingName'+deleteThing+ :: Text -- ^ 'dtThingName'+ -> DeleteThing+deleteThing pThingName_ =+ DeleteThing'+ { _dtThingName = pThingName_+ }++-- | The thing name.+dtThingName :: Lens' DeleteThing Text+dtThingName = lens _dtThingName (\ s a -> s{_dtThingName = a});++instance AWSRequest DeleteThing where+ type Rs DeleteThing = DeleteThingResponse+ request = delete ioT+ response+ = receiveEmpty+ (\ s h x ->+ DeleteThingResponse' <$> (pure (fromEnum s)))++instance ToHeaders DeleteThing where+ toHeaders = const mempty++instance ToPath DeleteThing where+ toPath DeleteThing'{..}+ = mconcat ["/things/", toBS _dtThingName]++instance ToQuery DeleteThing where+ toQuery = const mempty++-- | The output of the DeleteThing operation.+--+-- /See:/ 'deleteThingResponse' smart constructor.+newtype DeleteThingResponse = DeleteThingResponse'+ { _drsResponseStatus :: Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeleteThingResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'drsResponseStatus'+deleteThingResponse+ :: Int -- ^ 'drsResponseStatus'+ -> DeleteThingResponse+deleteThingResponse pResponseStatus_ =+ DeleteThingResponse'+ { _drsResponseStatus = pResponseStatus_+ }++-- | The response status code.+drsResponseStatus :: Lens' DeleteThingResponse Int+drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a});
+ gen/Network/AWS/IoT/DeleteTopicRule.hs view
@@ -0,0 +1,91 @@+{-# 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.IoT.DeleteTopicRule+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the specified rule.+--+-- /See:/ <https://aws.amazon.com/iot#DeleteTopicRule.html AWS API Reference> for DeleteTopicRule.+module Network.AWS.IoT.DeleteTopicRule+ (+ -- * Creating a Request+ deleteTopicRule+ , DeleteTopicRule+ -- * Request Lenses+ , dtrRuleName++ -- * Destructuring the Response+ , deleteTopicRuleResponse+ , DeleteTopicRuleResponse+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the DeleteTopicRule operation.+--+-- /See:/ 'deleteTopicRule' smart constructor.+newtype DeleteTopicRule = DeleteTopicRule'+ { _dtrRuleName :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeleteTopicRule' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dtrRuleName'+deleteTopicRule+ :: Text -- ^ 'dtrRuleName'+ -> DeleteTopicRule+deleteTopicRule pRuleName_ =+ DeleteTopicRule'+ { _dtrRuleName = pRuleName_+ }++-- | The name of the rule.+dtrRuleName :: Lens' DeleteTopicRule Text+dtrRuleName = lens _dtrRuleName (\ s a -> s{_dtrRuleName = a});++instance AWSRequest DeleteTopicRule where+ type Rs DeleteTopicRule = DeleteTopicRuleResponse+ request = delete ioT+ response = receiveNull DeleteTopicRuleResponse'++instance ToHeaders DeleteTopicRule where+ toHeaders = const mempty++instance ToPath DeleteTopicRule where+ toPath DeleteTopicRule'{..}+ = mconcat ["/rules/", toBS _dtrRuleName]++instance ToQuery DeleteTopicRule where+ toQuery = const mempty++-- | /See:/ 'deleteTopicRuleResponse' smart constructor.+data DeleteTopicRuleResponse =+ DeleteTopicRuleResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DeleteTopicRuleResponse' with the minimum fields required to make a request.+--+deleteTopicRuleResponse+ :: DeleteTopicRuleResponse+deleteTopicRuleResponse = DeleteTopicRuleResponse'
+ gen/Network/AWS/IoT/DescribeCertificate.hs view
@@ -0,0 +1,121 @@+{-# 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.IoT.DescribeCertificate+-- Copyright : (c) 2013-2015 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)+--+-- Gets information about the specified certificate.+--+-- /See:/ <https://aws.amazon.com/iot#DescribeCertificate.html AWS API Reference> for DescribeCertificate.+module Network.AWS.IoT.DescribeCertificate+ (+ -- * Creating a Request+ describeCertificate+ , DescribeCertificate+ -- * Request Lenses+ , dCertificateId++ -- * Destructuring the Response+ , describeCertificateResponse+ , DescribeCertificateResponse+ -- * Response Lenses+ , dcrsCertificateDescription+ , dcrsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the DescribeCertificate operation.+--+-- /See:/ 'describeCertificate' smart constructor.+newtype DescribeCertificate = DescribeCertificate'+ { _dCertificateId :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DescribeCertificate' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dCertificateId'+describeCertificate+ :: Text -- ^ 'dCertificateId'+ -> DescribeCertificate+describeCertificate pCertificateId_ =+ DescribeCertificate'+ { _dCertificateId = pCertificateId_+ }++-- | The ID of the certificate.+dCertificateId :: Lens' DescribeCertificate Text+dCertificateId = lens _dCertificateId (\ s a -> s{_dCertificateId = a});++instance AWSRequest DescribeCertificate where+ type Rs DescribeCertificate =+ DescribeCertificateResponse+ request = get ioT+ response+ = receiveJSON+ (\ s h x ->+ DescribeCertificateResponse' <$>+ (x .?> "certificateDescription") <*>+ (pure (fromEnum s)))++instance ToHeaders DescribeCertificate where+ toHeaders = const mempty++instance ToPath DescribeCertificate where+ toPath DescribeCertificate'{..}+ = mconcat ["/certificates/", toBS _dCertificateId]++instance ToQuery DescribeCertificate where+ toQuery = const mempty++-- | The output of the DescribeCertificate operation.+--+-- /See:/ 'describeCertificateResponse' smart constructor.+data DescribeCertificateResponse = DescribeCertificateResponse'+ { _dcrsCertificateDescription :: !(Maybe CertificateDescription)+ , _dcrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DescribeCertificateResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dcrsCertificateDescription'+--+-- * 'dcrsResponseStatus'+describeCertificateResponse+ :: Int -- ^ 'dcrsResponseStatus'+ -> DescribeCertificateResponse+describeCertificateResponse pResponseStatus_ =+ DescribeCertificateResponse'+ { _dcrsCertificateDescription = Nothing+ , _dcrsResponseStatus = pResponseStatus_+ }++-- | The description of the certificate.+dcrsCertificateDescription :: Lens' DescribeCertificateResponse (Maybe CertificateDescription)+dcrsCertificateDescription = lens _dcrsCertificateDescription (\ s a -> s{_dcrsCertificateDescription = a});++-- | The response status code.+dcrsResponseStatus :: Lens' DescribeCertificateResponse Int+dcrsResponseStatus = lens _dcrsResponseStatus (\ s a -> s{_dcrsResponseStatus = a});
+ gen/Network/AWS/IoT/DescribeEndpoint.hs view
@@ -0,0 +1,107 @@+{-# 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.IoT.DescribeEndpoint+-- Copyright : (c) 2013-2015 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)+--+-- Returns a unique URL specific to the AWS account making the call. The+-- URL points to the AWS IoT data plane endpoint. The customer-specific+-- endpoint should be provided to all data plane operations.+--+-- /See:/ <https://aws.amazon.com/iot#DescribeEndpoint.html AWS API Reference> for DescribeEndpoint.+module Network.AWS.IoT.DescribeEndpoint+ (+ -- * Creating a Request+ describeEndpoint+ , DescribeEndpoint++ -- * Destructuring the Response+ , describeEndpointResponse+ , DescribeEndpointResponse+ -- * Response Lenses+ , dersEndpointAddress+ , dersResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the DescribeEndpoint operation.+--+-- /See:/ 'describeEndpoint' smart constructor.+data DescribeEndpoint =+ DescribeEndpoint'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DescribeEndpoint' with the minimum fields required to make a request.+--+describeEndpoint+ :: DescribeEndpoint+describeEndpoint = DescribeEndpoint'++instance AWSRequest DescribeEndpoint where+ type Rs DescribeEndpoint = DescribeEndpointResponse+ request = get ioT+ response+ = receiveJSON+ (\ s h x ->+ DescribeEndpointResponse' <$>+ (x .?> "endpointAddress") <*> (pure (fromEnum s)))++instance ToHeaders DescribeEndpoint where+ toHeaders = const mempty++instance ToPath DescribeEndpoint where+ toPath = const "/endpoint"++instance ToQuery DescribeEndpoint where+ toQuery = const mempty++-- | The output from the DescribeEndpoint operation.+--+-- /See:/ 'describeEndpointResponse' smart constructor.+data DescribeEndpointResponse = DescribeEndpointResponse'+ { _dersEndpointAddress :: !(Maybe Text)+ , _dersResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DescribeEndpointResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dersEndpointAddress'+--+-- * 'dersResponseStatus'+describeEndpointResponse+ :: Int -- ^ 'dersResponseStatus'+ -> DescribeEndpointResponse+describeEndpointResponse pResponseStatus_ =+ DescribeEndpointResponse'+ { _dersEndpointAddress = Nothing+ , _dersResponseStatus = pResponseStatus_+ }++-- | The address.+dersEndpointAddress :: Lens' DescribeEndpointResponse (Maybe Text)+dersEndpointAddress = lens _dersEndpointAddress (\ s a -> s{_dersEndpointAddress = a});++-- | The response status code.+dersResponseStatus :: Lens' DescribeEndpointResponse Int+dersResponseStatus = lens _dersResponseStatus (\ s a -> s{_dersResponseStatus = a});
+ gen/Network/AWS/IoT/DescribeThing.hs view
@@ -0,0 +1,144 @@+{-# 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.IoT.DescribeThing+-- Copyright : (c) 2013-2015 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)+--+-- Gets information about the specified thing.+--+-- /See:/ <https://aws.amazon.com/iot#DescribeThing.html AWS API Reference> for DescribeThing.+module Network.AWS.IoT.DescribeThing+ (+ -- * Creating a Request+ describeThing+ , DescribeThing+ -- * Request Lenses+ , dThingName++ -- * Destructuring the Response+ , describeThingResponse+ , DescribeThingResponse+ -- * Response Lenses+ , dtrsDefaultClientId+ , dtrsAttributes+ , dtrsThingName+ , dtrsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the DescribeThing operation.+--+-- /See:/ 'describeThing' smart constructor.+newtype DescribeThing = DescribeThing'+ { _dThingName :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DescribeThing' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dThingName'+describeThing+ :: Text -- ^ 'dThingName'+ -> DescribeThing+describeThing pThingName_ =+ DescribeThing'+ { _dThingName = pThingName_+ }++-- | The name of the thing.+dThingName :: Lens' DescribeThing Text+dThingName = lens _dThingName (\ s a -> s{_dThingName = a});++instance AWSRequest DescribeThing where+ type Rs DescribeThing = DescribeThingResponse+ request = get ioT+ response+ = receiveJSON+ (\ s h x ->+ DescribeThingResponse' <$>+ (x .?> "defaultClientId") <*>+ (x .?> "attributes" .!@ mempty)+ <*> (x .?> "thingName")+ <*> (pure (fromEnum s)))++instance ToHeaders DescribeThing where+ toHeaders = const mempty++instance ToPath DescribeThing where+ toPath DescribeThing'{..}+ = mconcat ["/things/", toBS _dThingName]++instance ToQuery DescribeThing where+ toQuery = const mempty++-- | The output from the DescribeThing operation.+--+-- /See:/ 'describeThingResponse' smart constructor.+data DescribeThingResponse = DescribeThingResponse'+ { _dtrsDefaultClientId :: !(Maybe Text)+ , _dtrsAttributes :: !(Maybe (Map Text Text))+ , _dtrsThingName :: !(Maybe Text)+ , _dtrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DescribeThingResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dtrsDefaultClientId'+--+-- * 'dtrsAttributes'+--+-- * 'dtrsThingName'+--+-- * 'dtrsResponseStatus'+describeThingResponse+ :: Int -- ^ 'dtrsResponseStatus'+ -> DescribeThingResponse+describeThingResponse pResponseStatus_ =+ DescribeThingResponse'+ { _dtrsDefaultClientId = Nothing+ , _dtrsAttributes = Nothing+ , _dtrsThingName = Nothing+ , _dtrsResponseStatus = pResponseStatus_+ }++-- | The default client ID.+dtrsDefaultClientId :: Lens' DescribeThingResponse (Maybe Text)+dtrsDefaultClientId = lens _dtrsDefaultClientId (\ s a -> s{_dtrsDefaultClientId = a});++-- | The attributes which are name\/value pairs in JSON format. For example:+--+-- {\\\"attributes\\\":{\\\"some-name1\\\":\\\"some-value1\\”},+-- {\\\"some-name2\\\":\\\"some-value2\\”},+-- {\\\"some-name3\\\":\\\"some-value3\\”}}+dtrsAttributes :: Lens' DescribeThingResponse (HashMap Text Text)+dtrsAttributes = lens _dtrsAttributes (\ s a -> s{_dtrsAttributes = a}) . _Default . _Map;++-- | The name of the thing.+dtrsThingName :: Lens' DescribeThingResponse (Maybe Text)+dtrsThingName = lens _dtrsThingName (\ s a -> s{_dtrsThingName = a});++-- | The response status code.+dtrsResponseStatus :: Lens' DescribeThingResponse Int+dtrsResponseStatus = lens _dtrsResponseStatus (\ s a -> s{_dtrsResponseStatus = a});
+ gen/Network/AWS/IoT/DetachPrincipalPolicy.hs view
@@ -0,0 +1,107 @@+{-# 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.IoT.DetachPrincipalPolicy+-- Copyright : (c) 2013-2015 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)+--+-- Removes the specified policy from the specified certificate.+--+-- /See:/ <https://aws.amazon.com/iot#DetachPrincipalPolicy.html AWS API Reference> for DetachPrincipalPolicy.+module Network.AWS.IoT.DetachPrincipalPolicy+ (+ -- * Creating a Request+ detachPrincipalPolicy+ , DetachPrincipalPolicy+ -- * Request Lenses+ , dppPolicyName+ , dppPrincipal++ -- * Destructuring the Response+ , detachPrincipalPolicyResponse+ , DetachPrincipalPolicyResponse+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the DetachPrincipalPolicy operation.+--+-- /See:/ 'detachPrincipalPolicy' smart constructor.+data DetachPrincipalPolicy = DetachPrincipalPolicy'+ { _dppPolicyName :: !Text+ , _dppPrincipal :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DetachPrincipalPolicy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dppPolicyName'+--+-- * 'dppPrincipal'+detachPrincipalPolicy+ :: Text -- ^ 'dppPolicyName'+ -> Text -- ^ 'dppPrincipal'+ -> DetachPrincipalPolicy+detachPrincipalPolicy pPolicyName_ pPrincipal_ =+ DetachPrincipalPolicy'+ { _dppPolicyName = pPolicyName_+ , _dppPrincipal = pPrincipal_+ }++-- | The name of the policy to detach.+dppPolicyName :: Lens' DetachPrincipalPolicy Text+dppPolicyName = lens _dppPolicyName (\ s a -> s{_dppPolicyName = a});++-- | The principal+--+-- If the principal is a certificate, specify the certificate ARN. If the+-- principal is a Cognito identity specify the identity ID.+dppPrincipal :: Lens' DetachPrincipalPolicy Text+dppPrincipal = lens _dppPrincipal (\ s a -> s{_dppPrincipal = a});++instance AWSRequest DetachPrincipalPolicy where+ type Rs DetachPrincipalPolicy =+ DetachPrincipalPolicyResponse+ request = delete ioT+ response = receiveNull DetachPrincipalPolicyResponse'++instance ToHeaders DetachPrincipalPolicy where+ toHeaders DetachPrincipalPolicy'{..}+ = mconcat ["x-amzn-iot-principal" =# _dppPrincipal]++instance ToPath DetachPrincipalPolicy where+ toPath DetachPrincipalPolicy'{..}+ = mconcat+ ["/principal-policies/", toBS _dppPolicyName]++instance ToQuery DetachPrincipalPolicy where+ toQuery = const mempty++-- | /See:/ 'detachPrincipalPolicyResponse' smart constructor.+data DetachPrincipalPolicyResponse =+ DetachPrincipalPolicyResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DetachPrincipalPolicyResponse' with the minimum fields required to make a request.+--+detachPrincipalPolicyResponse+ :: DetachPrincipalPolicyResponse+detachPrincipalPolicyResponse = DetachPrincipalPolicyResponse'
+ gen/Network/AWS/IoT/DetachThingPrincipal.hs view
@@ -0,0 +1,123 @@+{-# 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.IoT.DetachThingPrincipal+-- Copyright : (c) 2013-2015 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)+--+-- Detaches the specified principal from the specified thing.+--+-- /See:/ <https://aws.amazon.com/iot#DetachThingPrincipal.html AWS API Reference> for DetachThingPrincipal.+module Network.AWS.IoT.DetachThingPrincipal+ (+ -- * Creating a Request+ detachThingPrincipal+ , DetachThingPrincipal+ -- * Request Lenses+ , dtpThingName+ , dtpPrincipal++ -- * Destructuring the Response+ , detachThingPrincipalResponse+ , DetachThingPrincipalResponse+ -- * Response Lenses+ , dtprsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the DetachThingPrincipal operation.+--+-- /See:/ 'detachThingPrincipal' smart constructor.+data DetachThingPrincipal = DetachThingPrincipal'+ { _dtpThingName :: !Text+ , _dtpPrincipal :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DetachThingPrincipal' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dtpThingName'+--+-- * 'dtpPrincipal'+detachThingPrincipal+ :: Text -- ^ 'dtpThingName'+ -> Text -- ^ 'dtpPrincipal'+ -> DetachThingPrincipal+detachThingPrincipal pThingName_ pPrincipal_ =+ DetachThingPrincipal'+ { _dtpThingName = pThingName_+ , _dtpPrincipal = pPrincipal_+ }++-- | The name of the thing.+dtpThingName :: Lens' DetachThingPrincipal Text+dtpThingName = lens _dtpThingName (\ s a -> s{_dtpThingName = a});++-- | The principal.+dtpPrincipal :: Lens' DetachThingPrincipal Text+dtpPrincipal = lens _dtpPrincipal (\ s a -> s{_dtpPrincipal = a});++instance AWSRequest DetachThingPrincipal where+ type Rs DetachThingPrincipal =+ DetachThingPrincipalResponse+ request = delete ioT+ response+ = receiveEmpty+ (\ s h x ->+ DetachThingPrincipalResponse' <$>+ (pure (fromEnum s)))++instance ToHeaders DetachThingPrincipal where+ toHeaders DetachThingPrincipal'{..}+ = mconcat ["x-amzn-principal" =# _dtpPrincipal]++instance ToPath DetachThingPrincipal where+ toPath DetachThingPrincipal'{..}+ = mconcat+ ["/things/", toBS _dtpThingName, "/principals"]++instance ToQuery DetachThingPrincipal where+ toQuery = const mempty++-- | The output from the DetachThingPrincipal operation.+--+-- /See:/ 'detachThingPrincipalResponse' smart constructor.+newtype DetachThingPrincipalResponse = DetachThingPrincipalResponse'+ { _dtprsResponseStatus :: Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DetachThingPrincipalResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dtprsResponseStatus'+detachThingPrincipalResponse+ :: Int -- ^ 'dtprsResponseStatus'+ -> DetachThingPrincipalResponse+detachThingPrincipalResponse pResponseStatus_ =+ DetachThingPrincipalResponse'+ { _dtprsResponseStatus = pResponseStatus_+ }++-- | The response status code.+dtprsResponseStatus :: Lens' DetachThingPrincipalResponse Int+dtprsResponseStatus = lens _dtprsResponseStatus (\ s a -> s{_dtprsResponseStatus = a});
+ gen/Network/AWS/IoT/GetLoggingOptions.hs view
@@ -0,0 +1,115 @@+{-# 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.IoT.GetLoggingOptions+-- Copyright : (c) 2013-2015 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)+--+-- Gets the logging options.+--+-- /See:/ <https://aws.amazon.com/iot#GetLoggingOptions.html AWS API Reference> for GetLoggingOptions.+module Network.AWS.IoT.GetLoggingOptions+ (+ -- * Creating a Request+ getLoggingOptions+ , GetLoggingOptions++ -- * Destructuring the Response+ , getLoggingOptionsResponse+ , GetLoggingOptionsResponse+ -- * Response Lenses+ , glorsLogLevel+ , glorsRoleARN+ , glorsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the GetLoggingOptions operation.+--+-- /See:/ 'getLoggingOptions' smart constructor.+data GetLoggingOptions =+ GetLoggingOptions'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetLoggingOptions' with the minimum fields required to make a request.+--+getLoggingOptions+ :: GetLoggingOptions+getLoggingOptions = GetLoggingOptions'++instance AWSRequest GetLoggingOptions where+ type Rs GetLoggingOptions = GetLoggingOptionsResponse+ request = get ioT+ response+ = receiveJSON+ (\ s h x ->+ GetLoggingOptionsResponse' <$>+ (x .?> "logLevel") <*> (x .?> "roleArn") <*>+ (pure (fromEnum s)))++instance ToHeaders GetLoggingOptions where+ toHeaders = const mempty++instance ToPath GetLoggingOptions where+ toPath = const "/loggingOptions"++instance ToQuery GetLoggingOptions where+ toQuery = const mempty++-- | The output from the GetLoggingOptions operation.+--+-- /See:/ 'getLoggingOptionsResponse' smart constructor.+data GetLoggingOptionsResponse = GetLoggingOptionsResponse'+ { _glorsLogLevel :: !(Maybe LogLevel)+ , _glorsRoleARN :: !(Maybe Text)+ , _glorsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetLoggingOptionsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'glorsLogLevel'+--+-- * 'glorsRoleARN'+--+-- * 'glorsResponseStatus'+getLoggingOptionsResponse+ :: Int -- ^ 'glorsResponseStatus'+ -> GetLoggingOptionsResponse+getLoggingOptionsResponse pResponseStatus_ =+ GetLoggingOptionsResponse'+ { _glorsLogLevel = Nothing+ , _glorsRoleARN = Nothing+ , _glorsResponseStatus = pResponseStatus_+ }++-- | The logging level.+glorsLogLevel :: Lens' GetLoggingOptionsResponse (Maybe LogLevel)+glorsLogLevel = lens _glorsLogLevel (\ s a -> s{_glorsLogLevel = a});++-- | The ARN of the IAM role that grants access.+glorsRoleARN :: Lens' GetLoggingOptionsResponse (Maybe Text)+glorsRoleARN = lens _glorsRoleARN (\ s a -> s{_glorsRoleARN = a});++-- | The response status code.+glorsResponseStatus :: Lens' GetLoggingOptionsResponse Int+glorsResponseStatus = lens _glorsResponseStatus (\ s a -> s{_glorsResponseStatus = a});
+ gen/Network/AWS/IoT/GetPolicy.hs view
@@ -0,0 +1,150 @@+{-# 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.IoT.GetPolicy+-- Copyright : (c) 2013-2015 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)+--+-- Gets information about the specified policy with the policy document of+-- the default version.+--+-- /See:/ <https://aws.amazon.com/iot#GetPolicy.html AWS API Reference> for GetPolicy.+module Network.AWS.IoT.GetPolicy+ (+ -- * Creating a Request+ getPolicy+ , GetPolicy+ -- * Request Lenses+ , gpPolicyName++ -- * Destructuring the Response+ , getPolicyResponse+ , GetPolicyResponse+ -- * Response Lenses+ , gprsPolicyName+ , gprsPolicyDocument+ , gprsDefaultVersionId+ , gprsPolicyARN+ , gprsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the GetPolicy operation.+--+-- /See:/ 'getPolicy' smart constructor.+newtype GetPolicy = GetPolicy'+ { _gpPolicyName :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetPolicy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gpPolicyName'+getPolicy+ :: Text -- ^ 'gpPolicyName'+ -> GetPolicy+getPolicy pPolicyName_ =+ GetPolicy'+ { _gpPolicyName = pPolicyName_+ }++-- | The name of the policy.+gpPolicyName :: Lens' GetPolicy Text+gpPolicyName = lens _gpPolicyName (\ s a -> s{_gpPolicyName = a});++instance AWSRequest GetPolicy where+ type Rs GetPolicy = GetPolicyResponse+ request = get ioT+ response+ = receiveJSON+ (\ s h x ->+ GetPolicyResponse' <$>+ (x .?> "policyName") <*> (x .?> "policyDocument") <*>+ (x .?> "defaultVersionId")+ <*> (x .?> "policyArn")+ <*> (pure (fromEnum s)))++instance ToHeaders GetPolicy where+ toHeaders = const mempty++instance ToPath GetPolicy where+ toPath GetPolicy'{..}+ = mconcat ["/policies/", toBS _gpPolicyName]++instance ToQuery GetPolicy where+ toQuery = const mempty++-- | The output from the GetPolicy operation.+--+-- /See:/ 'getPolicyResponse' smart constructor.+data GetPolicyResponse = GetPolicyResponse'+ { _gprsPolicyName :: !(Maybe Text)+ , _gprsPolicyDocument :: !(Maybe Text)+ , _gprsDefaultVersionId :: !(Maybe Text)+ , _gprsPolicyARN :: !(Maybe Text)+ , _gprsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetPolicyResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gprsPolicyName'+--+-- * 'gprsPolicyDocument'+--+-- * 'gprsDefaultVersionId'+--+-- * 'gprsPolicyARN'+--+-- * 'gprsResponseStatus'+getPolicyResponse+ :: Int -- ^ 'gprsResponseStatus'+ -> GetPolicyResponse+getPolicyResponse pResponseStatus_ =+ GetPolicyResponse'+ { _gprsPolicyName = Nothing+ , _gprsPolicyDocument = Nothing+ , _gprsDefaultVersionId = Nothing+ , _gprsPolicyARN = Nothing+ , _gprsResponseStatus = pResponseStatus_+ }++-- | The policy name.+gprsPolicyName :: Lens' GetPolicyResponse (Maybe Text)+gprsPolicyName = lens _gprsPolicyName (\ s a -> s{_gprsPolicyName = a});++-- | The JSON document that describes the policy.+gprsPolicyDocument :: Lens' GetPolicyResponse (Maybe Text)+gprsPolicyDocument = lens _gprsPolicyDocument (\ s a -> s{_gprsPolicyDocument = a});++-- | The default policy version ID.+gprsDefaultVersionId :: Lens' GetPolicyResponse (Maybe Text)+gprsDefaultVersionId = lens _gprsDefaultVersionId (\ s a -> s{_gprsDefaultVersionId = a});++-- | The policy ARN.+gprsPolicyARN :: Lens' GetPolicyResponse (Maybe Text)+gprsPolicyARN = lens _gprsPolicyARN (\ s a -> s{_gprsPolicyARN = a});++-- | The response status code.+gprsResponseStatus :: Lens' GetPolicyResponse Int+gprsResponseStatus = lens _gprsResponseStatus (\ s a -> s{_gprsResponseStatus = a});
+ gen/Network/AWS/IoT/GetPolicyVersion.hs view
@@ -0,0 +1,171 @@+{-# 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.IoT.GetPolicyVersion+-- Copyright : (c) 2013-2015 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)+--+-- Gets information about the specified policy version.+--+-- /See:/ <https://aws.amazon.com/iot#GetPolicyVersion.html AWS API Reference> for GetPolicyVersion.+module Network.AWS.IoT.GetPolicyVersion+ (+ -- * Creating a Request+ getPolicyVersion+ , GetPolicyVersion+ -- * Request Lenses+ , gpvPolicyName+ , gpvPolicyVersionId++ -- * Destructuring the Response+ , getPolicyVersionResponse+ , GetPolicyVersionResponse+ -- * Response Lenses+ , gpvrsPolicyName+ , gpvrsPolicyDocument+ , gpvrsPolicyVersionId+ , gpvrsPolicyARN+ , gpvrsIsDefaultVersion+ , gpvrsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the GetPolicyVersion operation.+--+-- /See:/ 'getPolicyVersion' smart constructor.+data GetPolicyVersion = GetPolicyVersion'+ { _gpvPolicyName :: !Text+ , _gpvPolicyVersionId :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetPolicyVersion' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gpvPolicyName'+--+-- * 'gpvPolicyVersionId'+getPolicyVersion+ :: Text -- ^ 'gpvPolicyName'+ -> Text -- ^ 'gpvPolicyVersionId'+ -> GetPolicyVersion+getPolicyVersion pPolicyName_ pPolicyVersionId_ =+ GetPolicyVersion'+ { _gpvPolicyName = pPolicyName_+ , _gpvPolicyVersionId = pPolicyVersionId_+ }++-- | The name of the policy.+gpvPolicyName :: Lens' GetPolicyVersion Text+gpvPolicyName = lens _gpvPolicyName (\ s a -> s{_gpvPolicyName = a});++-- | The policy version ID.+gpvPolicyVersionId :: Lens' GetPolicyVersion Text+gpvPolicyVersionId = lens _gpvPolicyVersionId (\ s a -> s{_gpvPolicyVersionId = a});++instance AWSRequest GetPolicyVersion where+ type Rs GetPolicyVersion = GetPolicyVersionResponse+ request = get ioT+ response+ = receiveJSON+ (\ s h x ->+ GetPolicyVersionResponse' <$>+ (x .?> "policyName") <*> (x .?> "policyDocument") <*>+ (x .?> "policyVersionId")+ <*> (x .?> "policyArn")+ <*> (x .?> "isDefaultVersion")+ <*> (pure (fromEnum s)))++instance ToHeaders GetPolicyVersion where+ toHeaders = const mempty++instance ToPath GetPolicyVersion where+ toPath GetPolicyVersion'{..}+ = mconcat+ ["/policies/", toBS _gpvPolicyName, "/version/",+ toBS _gpvPolicyVersionId]++instance ToQuery GetPolicyVersion where+ toQuery = const mempty++-- | The output from the GetPolicyVersion operation.+--+-- /See:/ 'getPolicyVersionResponse' smart constructor.+data GetPolicyVersionResponse = GetPolicyVersionResponse'+ { _gpvrsPolicyName :: !(Maybe Text)+ , _gpvrsPolicyDocument :: !(Maybe Text)+ , _gpvrsPolicyVersionId :: !(Maybe Text)+ , _gpvrsPolicyARN :: !(Maybe Text)+ , _gpvrsIsDefaultVersion :: !(Maybe Bool)+ , _gpvrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetPolicyVersionResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gpvrsPolicyName'+--+-- * 'gpvrsPolicyDocument'+--+-- * 'gpvrsPolicyVersionId'+--+-- * 'gpvrsPolicyARN'+--+-- * 'gpvrsIsDefaultVersion'+--+-- * 'gpvrsResponseStatus'+getPolicyVersionResponse+ :: Int -- ^ 'gpvrsResponseStatus'+ -> GetPolicyVersionResponse+getPolicyVersionResponse pResponseStatus_ =+ GetPolicyVersionResponse'+ { _gpvrsPolicyName = Nothing+ , _gpvrsPolicyDocument = Nothing+ , _gpvrsPolicyVersionId = Nothing+ , _gpvrsPolicyARN = Nothing+ , _gpvrsIsDefaultVersion = Nothing+ , _gpvrsResponseStatus = pResponseStatus_+ }++-- | The policy name.+gpvrsPolicyName :: Lens' GetPolicyVersionResponse (Maybe Text)+gpvrsPolicyName = lens _gpvrsPolicyName (\ s a -> s{_gpvrsPolicyName = a});++-- | The JSON document that describes the policy.+gpvrsPolicyDocument :: Lens' GetPolicyVersionResponse (Maybe Text)+gpvrsPolicyDocument = lens _gpvrsPolicyDocument (\ s a -> s{_gpvrsPolicyDocument = a});++-- | The policy version ID.+gpvrsPolicyVersionId :: Lens' GetPolicyVersionResponse (Maybe Text)+gpvrsPolicyVersionId = lens _gpvrsPolicyVersionId (\ s a -> s{_gpvrsPolicyVersionId = a});++-- | The policy ARN.+gpvrsPolicyARN :: Lens' GetPolicyVersionResponse (Maybe Text)+gpvrsPolicyARN = lens _gpvrsPolicyARN (\ s a -> s{_gpvrsPolicyARN = a});++-- | Specifies whether the policy version is the default.+gpvrsIsDefaultVersion :: Lens' GetPolicyVersionResponse (Maybe Bool)+gpvrsIsDefaultVersion = lens _gpvrsIsDefaultVersion (\ s a -> s{_gpvrsIsDefaultVersion = a});++-- | The response status code.+gpvrsResponseStatus :: Lens' GetPolicyVersionResponse Int+gpvrsResponseStatus = lens _gpvrsResponseStatus (\ s a -> s{_gpvrsResponseStatus = a});
+ gen/Network/AWS/IoT/GetTopicRule.hs view
@@ -0,0 +1,119 @@+{-# 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.IoT.GetTopicRule+-- Copyright : (c) 2013-2015 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)+--+-- Gets information about the specified rule.+--+-- /See:/ <https://aws.amazon.com/iot#GetTopicRule.html AWS API Reference> for GetTopicRule.+module Network.AWS.IoT.GetTopicRule+ (+ -- * Creating a Request+ getTopicRule+ , GetTopicRule+ -- * Request Lenses+ , gtrRuleName++ -- * Destructuring the Response+ , getTopicRuleResponse+ , GetTopicRuleResponse+ -- * Response Lenses+ , gtrrsRule+ , gtrrsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the GetTopicRule operation.+--+-- /See:/ 'getTopicRule' smart constructor.+newtype GetTopicRule = GetTopicRule'+ { _gtrRuleName :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetTopicRule' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gtrRuleName'+getTopicRule+ :: Text -- ^ 'gtrRuleName'+ -> GetTopicRule+getTopicRule pRuleName_ =+ GetTopicRule'+ { _gtrRuleName = pRuleName_+ }++-- | The name of the rule.+gtrRuleName :: Lens' GetTopicRule Text+gtrRuleName = lens _gtrRuleName (\ s a -> s{_gtrRuleName = a});++instance AWSRequest GetTopicRule where+ type Rs GetTopicRule = GetTopicRuleResponse+ request = get ioT+ response+ = receiveJSON+ (\ s h x ->+ GetTopicRuleResponse' <$>+ (x .?> "rule") <*> (pure (fromEnum s)))++instance ToHeaders GetTopicRule where+ toHeaders = const mempty++instance ToPath GetTopicRule where+ toPath GetTopicRule'{..}+ = mconcat ["/rules/", toBS _gtrRuleName]++instance ToQuery GetTopicRule where+ toQuery = const mempty++-- | The output from the GetTopicRule operation.+--+-- /See:/ 'getTopicRuleResponse' smart constructor.+data GetTopicRuleResponse = GetTopicRuleResponse'+ { _gtrrsRule :: !(Maybe TopicRule)+ , _gtrrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'GetTopicRuleResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gtrrsRule'+--+-- * 'gtrrsResponseStatus'+getTopicRuleResponse+ :: Int -- ^ 'gtrrsResponseStatus'+ -> GetTopicRuleResponse+getTopicRuleResponse pResponseStatus_ =+ GetTopicRuleResponse'+ { _gtrrsRule = Nothing+ , _gtrrsResponseStatus = pResponseStatus_+ }++-- | The rule.+gtrrsRule :: Lens' GetTopicRuleResponse (Maybe TopicRule)+gtrrsRule = lens _gtrrsRule (\ s a -> s{_gtrrsRule = a});++-- | The response status code.+gtrrsResponseStatus :: Lens' GetTopicRuleResponse Int+gtrrsResponseStatus = lens _gtrrsResponseStatus (\ s a -> s{_gtrrsResponseStatus = a});
+ gen/Network/AWS/IoT/ListCertificates.hs view
@@ -0,0 +1,155 @@+{-# 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.IoT.ListCertificates+-- Copyright : (c) 2013-2015 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)+--+-- Lists your certificates.+--+-- The results are paginated with a default page size of 25. You can+-- retrieve additional results using the returned marker.+--+-- /See:/ <https://aws.amazon.com/iot#ListCertificates.html AWS API Reference> for ListCertificates.+module Network.AWS.IoT.ListCertificates+ (+ -- * Creating a Request+ listCertificates+ , ListCertificates+ -- * Request Lenses+ , lcMarker+ , lcAscendingOrder+ , lcPageSize++ -- * Destructuring the Response+ , listCertificatesResponse+ , ListCertificatesResponse+ -- * Response Lenses+ , lcrsCertificates+ , lcrsNextMarker+ , lcrsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the ListCertificates operation.+--+-- /See:/ 'listCertificates' smart constructor.+data ListCertificates = ListCertificates'+ { _lcMarker :: !(Maybe Text)+ , _lcAscendingOrder :: !(Maybe Bool)+ , _lcPageSize :: !(Maybe Nat)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListCertificates' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lcMarker'+--+-- * 'lcAscendingOrder'+--+-- * 'lcPageSize'+listCertificates+ :: ListCertificates+listCertificates =+ ListCertificates'+ { _lcMarker = Nothing+ , _lcAscendingOrder = Nothing+ , _lcPageSize = Nothing+ }++-- | The marker for the next set of results.+lcMarker :: Lens' ListCertificates (Maybe Text)+lcMarker = lens _lcMarker (\ s a -> s{_lcMarker = a});++-- | Specifies the order for results. If True, the results are returned in+-- ascending order, based on the creation date.+lcAscendingOrder :: Lens' ListCertificates (Maybe Bool)+lcAscendingOrder = lens _lcAscendingOrder (\ s a -> s{_lcAscendingOrder = a});++-- | The result page size.+lcPageSize :: Lens' ListCertificates (Maybe Natural)+lcPageSize = lens _lcPageSize (\ s a -> s{_lcPageSize = a}) . mapping _Nat;++instance AWSRequest ListCertificates where+ type Rs ListCertificates = ListCertificatesResponse+ request = get ioT+ response+ = receiveJSON+ (\ s h x ->+ ListCertificatesResponse' <$>+ (x .?> "certificates" .!@ mempty) <*>+ (x .?> "nextMarker")+ <*> (pure (fromEnum s)))++instance ToHeaders ListCertificates where+ toHeaders = const mempty++instance ToPath ListCertificates where+ toPath = const "/certificates"++instance ToQuery ListCertificates where+ toQuery ListCertificates'{..}+ = mconcat+ ["marker" =: _lcMarker,+ "isAscendingOrder" =: _lcAscendingOrder,+ "pageSize" =: _lcPageSize]++-- | The output of the ListCertificates operation.+--+-- /See:/ 'listCertificatesResponse' smart constructor.+data ListCertificatesResponse = ListCertificatesResponse'+ { _lcrsCertificates :: !(Maybe [Certificate])+ , _lcrsNextMarker :: !(Maybe Text)+ , _lcrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListCertificatesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lcrsCertificates'+--+-- * 'lcrsNextMarker'+--+-- * 'lcrsResponseStatus'+listCertificatesResponse+ :: Int -- ^ 'lcrsResponseStatus'+ -> ListCertificatesResponse+listCertificatesResponse pResponseStatus_ =+ ListCertificatesResponse'+ { _lcrsCertificates = Nothing+ , _lcrsNextMarker = Nothing+ , _lcrsResponseStatus = pResponseStatus_+ }++-- | The descriptions of the certificates.+lcrsCertificates :: Lens' ListCertificatesResponse [Certificate]+lcrsCertificates = lens _lcrsCertificates (\ s a -> s{_lcrsCertificates = a}) . _Default . _Coerce;++-- | The marker for the next set of results, or null if there are no+-- additional results.+lcrsNextMarker :: Lens' ListCertificatesResponse (Maybe Text)+lcrsNextMarker = lens _lcrsNextMarker (\ s a -> s{_lcrsNextMarker = a});++-- | The response status code.+lcrsResponseStatus :: Lens' ListCertificatesResponse Int+lcrsResponseStatus = lens _lcrsResponseStatus (\ s a -> s{_lcrsResponseStatus = a});
+ gen/Network/AWS/IoT/ListPolicies.hs view
@@ -0,0 +1,152 @@+{-# 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.IoT.ListPolicies+-- Copyright : (c) 2013-2015 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)+--+-- Lists your policies.+--+-- /See:/ <https://aws.amazon.com/iot#ListPolicies.html AWS API Reference> for ListPolicies.+module Network.AWS.IoT.ListPolicies+ (+ -- * Creating a Request+ listPolicies+ , ListPolicies+ -- * Request Lenses+ , lpMarker+ , lpAscendingOrder+ , lpPageSize++ -- * Destructuring the Response+ , listPoliciesResponse+ , ListPoliciesResponse+ -- * Response Lenses+ , lprsNextMarker+ , lprsPolicies+ , lprsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the ListPolicies operation.+--+-- /See:/ 'listPolicies' smart constructor.+data ListPolicies = ListPolicies'+ { _lpMarker :: !(Maybe Text)+ , _lpAscendingOrder :: !(Maybe Bool)+ , _lpPageSize :: !(Maybe Nat)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListPolicies' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lpMarker'+--+-- * 'lpAscendingOrder'+--+-- * 'lpPageSize'+listPolicies+ :: ListPolicies+listPolicies =+ ListPolicies'+ { _lpMarker = Nothing+ , _lpAscendingOrder = Nothing+ , _lpPageSize = Nothing+ }++-- | The marker for the next set of results.+lpMarker :: Lens' ListPolicies (Maybe Text)+lpMarker = lens _lpMarker (\ s a -> s{_lpMarker = a});++-- | Specifies the order for results. If true, the results are returned in+-- ascending creation order.+lpAscendingOrder :: Lens' ListPolicies (Maybe Bool)+lpAscendingOrder = lens _lpAscendingOrder (\ s a -> s{_lpAscendingOrder = a});++-- | The result page size.+lpPageSize :: Lens' ListPolicies (Maybe Natural)+lpPageSize = lens _lpPageSize (\ s a -> s{_lpPageSize = a}) . mapping _Nat;++instance AWSRequest ListPolicies where+ type Rs ListPolicies = ListPoliciesResponse+ request = get ioT+ response+ = receiveJSON+ (\ s h x ->+ ListPoliciesResponse' <$>+ (x .?> "nextMarker") <*>+ (x .?> "policies" .!@ mempty)+ <*> (pure (fromEnum s)))++instance ToHeaders ListPolicies where+ toHeaders = const mempty++instance ToPath ListPolicies where+ toPath = const "/policies"++instance ToQuery ListPolicies where+ toQuery ListPolicies'{..}+ = mconcat+ ["marker" =: _lpMarker,+ "isAscendingOrder" =: _lpAscendingOrder,+ "pageSize" =: _lpPageSize]++-- | The output from the ListPolicies operation.+--+-- /See:/ 'listPoliciesResponse' smart constructor.+data ListPoliciesResponse = ListPoliciesResponse'+ { _lprsNextMarker :: !(Maybe Text)+ , _lprsPolicies :: !(Maybe [Policy])+ , _lprsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListPoliciesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lprsNextMarker'+--+-- * 'lprsPolicies'+--+-- * 'lprsResponseStatus'+listPoliciesResponse+ :: Int -- ^ 'lprsResponseStatus'+ -> ListPoliciesResponse+listPoliciesResponse pResponseStatus_ =+ ListPoliciesResponse'+ { _lprsNextMarker = Nothing+ , _lprsPolicies = Nothing+ , _lprsResponseStatus = pResponseStatus_+ }++-- | The marker for the next set of results, or null if there are no+-- additional results.+lprsNextMarker :: Lens' ListPoliciesResponse (Maybe Text)+lprsNextMarker = lens _lprsNextMarker (\ s a -> s{_lprsNextMarker = a});++-- | The descriptions of the policies.+lprsPolicies :: Lens' ListPoliciesResponse [Policy]+lprsPolicies = lens _lprsPolicies (\ s a -> s{_lprsPolicies = a}) . _Default . _Coerce;++-- | The response status code.+lprsResponseStatus :: Lens' ListPoliciesResponse Int+lprsResponseStatus = lens _lprsResponseStatus (\ s a -> s{_lprsResponseStatus = a});
+ gen/Network/AWS/IoT/ListPolicyVersions.hs view
@@ -0,0 +1,123 @@+{-# 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.IoT.ListPolicyVersions+-- Copyright : (c) 2013-2015 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)+--+-- Lists the versions of the specified policy, and identifies the default+-- version.+--+-- /See:/ <https://aws.amazon.com/iot#ListPolicyVersions.html AWS API Reference> for ListPolicyVersions.+module Network.AWS.IoT.ListPolicyVersions+ (+ -- * Creating a Request+ listPolicyVersions+ , ListPolicyVersions+ -- * Request Lenses+ , lpvPolicyName++ -- * Destructuring the Response+ , listPolicyVersionsResponse+ , ListPolicyVersionsResponse+ -- * Response Lenses+ , lpvrsPolicyVersions+ , lpvrsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the ListPolicyVersions operation.+--+-- /See:/ 'listPolicyVersions' smart constructor.+newtype ListPolicyVersions = ListPolicyVersions'+ { _lpvPolicyName :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListPolicyVersions' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lpvPolicyName'+listPolicyVersions+ :: Text -- ^ 'lpvPolicyName'+ -> ListPolicyVersions+listPolicyVersions pPolicyName_ =+ ListPolicyVersions'+ { _lpvPolicyName = pPolicyName_+ }++-- | The policy name.+lpvPolicyName :: Lens' ListPolicyVersions Text+lpvPolicyName = lens _lpvPolicyName (\ s a -> s{_lpvPolicyName = a});++instance AWSRequest ListPolicyVersions where+ type Rs ListPolicyVersions =+ ListPolicyVersionsResponse+ request = get ioT+ response+ = receiveJSON+ (\ s h x ->+ ListPolicyVersionsResponse' <$>+ (x .?> "policyVersions" .!@ mempty) <*>+ (pure (fromEnum s)))++instance ToHeaders ListPolicyVersions where+ toHeaders = const mempty++instance ToPath ListPolicyVersions where+ toPath ListPolicyVersions'{..}+ = mconcat+ ["/policies/", toBS _lpvPolicyName, "/version"]++instance ToQuery ListPolicyVersions where+ toQuery = const mempty++-- | The output from the ListPolicyVersions operation.+--+-- /See:/ 'listPolicyVersionsResponse' smart constructor.+data ListPolicyVersionsResponse = ListPolicyVersionsResponse'+ { _lpvrsPolicyVersions :: !(Maybe [PolicyVersion])+ , _lpvrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListPolicyVersionsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lpvrsPolicyVersions'+--+-- * 'lpvrsResponseStatus'+listPolicyVersionsResponse+ :: Int -- ^ 'lpvrsResponseStatus'+ -> ListPolicyVersionsResponse+listPolicyVersionsResponse pResponseStatus_ =+ ListPolicyVersionsResponse'+ { _lpvrsPolicyVersions = Nothing+ , _lpvrsResponseStatus = pResponseStatus_+ }++-- | The policy versions.+lpvrsPolicyVersions :: Lens' ListPolicyVersionsResponse [PolicyVersion]+lpvrsPolicyVersions = lens _lpvrsPolicyVersions (\ s a -> s{_lpvrsPolicyVersions = a}) . _Default . _Coerce;++-- | The response status code.+lpvrsResponseStatus :: Lens' ListPolicyVersionsResponse Int+lpvrsResponseStatus = lens _lpvrsResponseStatus (\ s a -> s{_lpvrsResponseStatus = a});
+ gen/Network/AWS/IoT/ListPrincipalPolicies.hs view
@@ -0,0 +1,166 @@+{-# 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.IoT.ListPrincipalPolicies+-- Copyright : (c) 2013-2015 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)+--+-- Lists the policies attached to the specified principal. If you use an+-- Amazon Cognito identity, the ID needs to be in+-- <http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetCredentialsForIdentity.html#API_GetCredentialsForIdentity_RequestSyntax Amazon Cognito Identity format>.+--+-- /See:/ <https://aws.amazon.com/iot#ListPrincipalPolicies.html AWS API Reference> for ListPrincipalPolicies.+module Network.AWS.IoT.ListPrincipalPolicies+ (+ -- * Creating a Request+ listPrincipalPolicies+ , ListPrincipalPolicies+ -- * Request Lenses+ , lppMarker+ , lppAscendingOrder+ , lppPageSize+ , lppPrincipal++ -- * Destructuring the Response+ , listPrincipalPoliciesResponse+ , ListPrincipalPoliciesResponse+ -- * Response Lenses+ , lpprsNextMarker+ , lpprsPolicies+ , lpprsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the ListPrincipalPolicies operation.+--+-- /See:/ 'listPrincipalPolicies' smart constructor.+data ListPrincipalPolicies = ListPrincipalPolicies'+ { _lppMarker :: !(Maybe Text)+ , _lppAscendingOrder :: !(Maybe Bool)+ , _lppPageSize :: !(Maybe Nat)+ , _lppPrincipal :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListPrincipalPolicies' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lppMarker'+--+-- * 'lppAscendingOrder'+--+-- * 'lppPageSize'+--+-- * 'lppPrincipal'+listPrincipalPolicies+ :: Text -- ^ 'lppPrincipal'+ -> ListPrincipalPolicies+listPrincipalPolicies pPrincipal_ =+ ListPrincipalPolicies'+ { _lppMarker = Nothing+ , _lppAscendingOrder = Nothing+ , _lppPageSize = Nothing+ , _lppPrincipal = pPrincipal_+ }++-- | The marker for the next set of results.+lppMarker :: Lens' ListPrincipalPolicies (Maybe Text)+lppMarker = lens _lppMarker (\ s a -> s{_lppMarker = a});++-- | Specifies the order for results. If true, results are returned in+-- ascending creation order.+lppAscendingOrder :: Lens' ListPrincipalPolicies (Maybe Bool)+lppAscendingOrder = lens _lppAscendingOrder (\ s a -> s{_lppAscendingOrder = a});++-- | The result page size.+lppPageSize :: Lens' ListPrincipalPolicies (Maybe Natural)+lppPageSize = lens _lppPageSize (\ s a -> s{_lppPageSize = a}) . mapping _Nat;++-- | The principal.+lppPrincipal :: Lens' ListPrincipalPolicies Text+lppPrincipal = lens _lppPrincipal (\ s a -> s{_lppPrincipal = a});++instance AWSRequest ListPrincipalPolicies where+ type Rs ListPrincipalPolicies =+ ListPrincipalPoliciesResponse+ request = get ioT+ response+ = receiveJSON+ (\ s h x ->+ ListPrincipalPoliciesResponse' <$>+ (x .?> "nextMarker") <*>+ (x .?> "policies" .!@ mempty)+ <*> (pure (fromEnum s)))++instance ToHeaders ListPrincipalPolicies where+ toHeaders ListPrincipalPolicies'{..}+ = mconcat ["x-amzn-iot-principal" =# _lppPrincipal]++instance ToPath ListPrincipalPolicies where+ toPath = const "/principal-policies"++instance ToQuery ListPrincipalPolicies where+ toQuery ListPrincipalPolicies'{..}+ = mconcat+ ["marker" =: _lppMarker,+ "isAscendingOrder" =: _lppAscendingOrder,+ "pageSize" =: _lppPageSize]++-- | The output from the ListPrincipalPolicies operation.+--+-- /See:/ 'listPrincipalPoliciesResponse' smart constructor.+data ListPrincipalPoliciesResponse = ListPrincipalPoliciesResponse'+ { _lpprsNextMarker :: !(Maybe Text)+ , _lpprsPolicies :: !(Maybe [Policy])+ , _lpprsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListPrincipalPoliciesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lpprsNextMarker'+--+-- * 'lpprsPolicies'+--+-- * 'lpprsResponseStatus'+listPrincipalPoliciesResponse+ :: Int -- ^ 'lpprsResponseStatus'+ -> ListPrincipalPoliciesResponse+listPrincipalPoliciesResponse pResponseStatus_ =+ ListPrincipalPoliciesResponse'+ { _lpprsNextMarker = Nothing+ , _lpprsPolicies = Nothing+ , _lpprsResponseStatus = pResponseStatus_+ }++-- | The marker for the next set of results, or null if there are no+-- additional results.+lpprsNextMarker :: Lens' ListPrincipalPoliciesResponse (Maybe Text)+lpprsNextMarker = lens _lpprsNextMarker (\ s a -> s{_lpprsNextMarker = a});++-- | The policies.+lpprsPolicies :: Lens' ListPrincipalPoliciesResponse [Policy]+lpprsPolicies = lens _lpprsPolicies (\ s a -> s{_lpprsPolicies = a}) . _Default . _Coerce;++-- | The response status code.+lpprsResponseStatus :: Lens' ListPrincipalPoliciesResponse Int+lpprsResponseStatus = lens _lpprsResponseStatus (\ s a -> s{_lpprsResponseStatus = a});
+ gen/Network/AWS/IoT/ListPrincipalThings.hs view
@@ -0,0 +1,151 @@+{-# 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.IoT.ListPrincipalThings+-- Copyright : (c) 2013-2015 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)+--+-- Lists the things associated with the specified principal.+--+-- /See:/ <https://aws.amazon.com/iot#ListPrincipalThings.html AWS API Reference> for ListPrincipalThings.+module Network.AWS.IoT.ListPrincipalThings+ (+ -- * Creating a Request+ listPrincipalThings+ , ListPrincipalThings+ -- * Request Lenses+ , lptNextToken+ , lptMaxResults+ , lptPrincipal++ -- * Destructuring the Response+ , listPrincipalThingsResponse+ , ListPrincipalThingsResponse+ -- * Response Lenses+ , lptrsNextToken+ , lptrsThings+ , lptrsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the ListPrincipalThings operation.+--+-- /See:/ 'listPrincipalThings' smart constructor.+data ListPrincipalThings = ListPrincipalThings'+ { _lptNextToken :: !(Maybe Text)+ , _lptMaxResults :: !(Maybe Nat)+ , _lptPrincipal :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListPrincipalThings' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lptNextToken'+--+-- * 'lptMaxResults'+--+-- * 'lptPrincipal'+listPrincipalThings+ :: Text -- ^ 'lptPrincipal'+ -> ListPrincipalThings+listPrincipalThings pPrincipal_ =+ ListPrincipalThings'+ { _lptNextToken = Nothing+ , _lptMaxResults = Nothing+ , _lptPrincipal = pPrincipal_+ }++-- | Undocumented member.+lptNextToken :: Lens' ListPrincipalThings (Maybe Text)+lptNextToken = lens _lptNextToken (\ s a -> s{_lptNextToken = a});++-- | Undocumented member.+lptMaxResults :: Lens' ListPrincipalThings (Maybe Natural)+lptMaxResults = lens _lptMaxResults (\ s a -> s{_lptMaxResults = a}) . mapping _Nat;++-- | The principal.+lptPrincipal :: Lens' ListPrincipalThings Text+lptPrincipal = lens _lptPrincipal (\ s a -> s{_lptPrincipal = a});++instance AWSRequest ListPrincipalThings where+ type Rs ListPrincipalThings =+ ListPrincipalThingsResponse+ request = get ioT+ response+ = receiveJSON+ (\ s h x ->+ ListPrincipalThingsResponse' <$>+ (x .?> "nextToken") <*> (x .?> "things" .!@ mempty)+ <*> (pure (fromEnum s)))++instance ToHeaders ListPrincipalThings where+ toHeaders ListPrincipalThings'{..}+ = mconcat ["x-amzn-principal" =# _lptPrincipal]++instance ToPath ListPrincipalThings where+ toPath = const "/principals/things"++instance ToQuery ListPrincipalThings where+ toQuery ListPrincipalThings'{..}+ = mconcat+ ["nextToken" =: _lptNextToken,+ "maxResults" =: _lptMaxResults]++-- | The output from the ListPrincipalThings operation.+--+-- /See:/ 'listPrincipalThingsResponse' smart constructor.+data ListPrincipalThingsResponse = ListPrincipalThingsResponse'+ { _lptrsNextToken :: !(Maybe Text)+ , _lptrsThings :: !(Maybe [Text])+ , _lptrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListPrincipalThingsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lptrsNextToken'+--+-- * 'lptrsThings'+--+-- * 'lptrsResponseStatus'+listPrincipalThingsResponse+ :: Int -- ^ 'lptrsResponseStatus'+ -> ListPrincipalThingsResponse+listPrincipalThingsResponse pResponseStatus_ =+ ListPrincipalThingsResponse'+ { _lptrsNextToken = Nothing+ , _lptrsThings = Nothing+ , _lptrsResponseStatus = pResponseStatus_+ }++-- | A token used to retrieve the next value.+lptrsNextToken :: Lens' ListPrincipalThingsResponse (Maybe Text)+lptrsNextToken = lens _lptrsNextToken (\ s a -> s{_lptrsNextToken = a});++-- | The things.+lptrsThings :: Lens' ListPrincipalThingsResponse [Text]+lptrsThings = lens _lptrsThings (\ s a -> s{_lptrsThings = a}) . _Default . _Coerce;++-- | The response status code.+lptrsResponseStatus :: Lens' ListPrincipalThingsResponse Int+lptrsResponseStatus = lens _lptrsResponseStatus (\ s a -> s{_lptrsResponseStatus = a});
+ gen/Network/AWS/IoT/ListThingPrincipals.hs view
@@ -0,0 +1,122 @@+{-# 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.IoT.ListThingPrincipals+-- Copyright : (c) 2013-2015 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)+--+-- Lists the principals associated with the specified thing.+--+-- /See:/ <https://aws.amazon.com/iot#ListThingPrincipals.html AWS API Reference> for ListThingPrincipals.+module Network.AWS.IoT.ListThingPrincipals+ (+ -- * Creating a Request+ listThingPrincipals+ , ListThingPrincipals+ -- * Request Lenses+ , ltpThingName++ -- * Destructuring the Response+ , listThingPrincipalsResponse+ , ListThingPrincipalsResponse+ -- * Response Lenses+ , ltprsPrincipals+ , ltprsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the ListThingPrincipal operation.+--+-- /See:/ 'listThingPrincipals' smart constructor.+newtype ListThingPrincipals = ListThingPrincipals'+ { _ltpThingName :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListThingPrincipals' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ltpThingName'+listThingPrincipals+ :: Text -- ^ 'ltpThingName'+ -> ListThingPrincipals+listThingPrincipals pThingName_ =+ ListThingPrincipals'+ { _ltpThingName = pThingName_+ }++-- | The name of the thing.+ltpThingName :: Lens' ListThingPrincipals Text+ltpThingName = lens _ltpThingName (\ s a -> s{_ltpThingName = a});++instance AWSRequest ListThingPrincipals where+ type Rs ListThingPrincipals =+ ListThingPrincipalsResponse+ request = get ioT+ response+ = receiveJSON+ (\ s h x ->+ ListThingPrincipalsResponse' <$>+ (x .?> "principals" .!@ mempty) <*>+ (pure (fromEnum s)))++instance ToHeaders ListThingPrincipals where+ toHeaders = const mempty++instance ToPath ListThingPrincipals where+ toPath ListThingPrincipals'{..}+ = mconcat+ ["/things/", toBS _ltpThingName, "/principals"]++instance ToQuery ListThingPrincipals where+ toQuery = const mempty++-- | The output from the ListThingPrincipals operation.+--+-- /See:/ 'listThingPrincipalsResponse' smart constructor.+data ListThingPrincipalsResponse = ListThingPrincipalsResponse'+ { _ltprsPrincipals :: !(Maybe [Text])+ , _ltprsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListThingPrincipalsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ltprsPrincipals'+--+-- * 'ltprsResponseStatus'+listThingPrincipalsResponse+ :: Int -- ^ 'ltprsResponseStatus'+ -> ListThingPrincipalsResponse+listThingPrincipalsResponse pResponseStatus_ =+ ListThingPrincipalsResponse'+ { _ltprsPrincipals = Nothing+ , _ltprsResponseStatus = pResponseStatus_+ }++-- | The principals.+ltprsPrincipals :: Lens' ListThingPrincipalsResponse [Text]+ltprsPrincipals = lens _ltprsPrincipals (\ s a -> s{_ltprsPrincipals = a}) . _Default . _Coerce;++-- | The response status code.+ltprsResponseStatus :: Lens' ListThingPrincipalsResponse Int+ltprsResponseStatus = lens _ltprsResponseStatus (\ s a -> s{_ltprsResponseStatus = a});
+ gen/Network/AWS/IoT/ListThings.hs view
@@ -0,0 +1,161 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.IoT.ListThings+-- Copyright : (c) 2013-2015 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)+--+-- Lists your things. You can pass an AttributeName and\/or AttributeValue+-- to filter your things. For example: \"ListThings where+-- AttributeName=Color and AttributeValue=Red\"+--+-- /See:/ <https://aws.amazon.com/iot#ListThings.html AWS API Reference> for ListThings.+module Network.AWS.IoT.ListThings+ (+ -- * Creating a Request+ listThings+ , ListThings+ -- * Request Lenses+ , ltAttributeValue+ , ltNextToken+ , ltAttributeName+ , ltMaxResults++ -- * Destructuring the Response+ , listThingsResponse+ , ListThingsResponse+ -- * Response Lenses+ , ltrsNextToken+ , ltrsThings+ , ltrsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the ListThings operation.+--+-- /See:/ 'listThings' smart constructor.+data ListThings = ListThings'+ { _ltAttributeValue :: !(Maybe Text)+ , _ltNextToken :: !(Maybe Text)+ , _ltAttributeName :: !(Maybe Text)+ , _ltMaxResults :: !(Maybe Nat)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListThings' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ltAttributeValue'+--+-- * 'ltNextToken'+--+-- * 'ltAttributeName'+--+-- * 'ltMaxResults'+listThings+ :: ListThings+listThings =+ ListThings'+ { _ltAttributeValue = Nothing+ , _ltNextToken = Nothing+ , _ltAttributeName = Nothing+ , _ltMaxResults = Nothing+ }++-- | The attribute value.+ltAttributeValue :: Lens' ListThings (Maybe Text)+ltAttributeValue = lens _ltAttributeValue (\ s a -> s{_ltAttributeValue = a});++-- | The token for the next value.+ltNextToken :: Lens' ListThings (Maybe Text)+ltNextToken = lens _ltNextToken (\ s a -> s{_ltNextToken = a});++-- | The attribute name.+ltAttributeName :: Lens' ListThings (Maybe Text)+ltAttributeName = lens _ltAttributeName (\ s a -> s{_ltAttributeName = a});++-- | The maximum number of results.+ltMaxResults :: Lens' ListThings (Maybe Natural)+ltMaxResults = lens _ltMaxResults (\ s a -> s{_ltMaxResults = a}) . mapping _Nat;++instance AWSRequest ListThings where+ type Rs ListThings = ListThingsResponse+ request = get ioT+ response+ = receiveJSON+ (\ s h x ->+ ListThingsResponse' <$>+ (x .?> "nextToken") <*> (x .?> "things" .!@ mempty)+ <*> (pure (fromEnum s)))++instance ToHeaders ListThings where+ toHeaders = const mempty++instance ToPath ListThings where+ toPath = const "/things"++instance ToQuery ListThings where+ toQuery ListThings'{..}+ = mconcat+ ["attributeValue" =: _ltAttributeValue,+ "nextToken" =: _ltNextToken,+ "attributeName" =: _ltAttributeName,+ "maxResults" =: _ltMaxResults]++-- | The output from the ListThings operation.+--+-- /See:/ 'listThingsResponse' smart constructor.+data ListThingsResponse = ListThingsResponse'+ { _ltrsNextToken :: !(Maybe Text)+ , _ltrsThings :: !(Maybe [ThingAttribute])+ , _ltrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListThingsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ltrsNextToken'+--+-- * 'ltrsThings'+--+-- * 'ltrsResponseStatus'+listThingsResponse+ :: Int -- ^ 'ltrsResponseStatus'+ -> ListThingsResponse+listThingsResponse pResponseStatus_ =+ ListThingsResponse'+ { _ltrsNextToken = Nothing+ , _ltrsThings = Nothing+ , _ltrsResponseStatus = pResponseStatus_+ }++-- | A token used to retrieve the next value.+ltrsNextToken :: Lens' ListThingsResponse (Maybe Text)+ltrsNextToken = lens _ltrsNextToken (\ s a -> s{_ltrsNextToken = a});++-- | The things.+ltrsThings :: Lens' ListThingsResponse [ThingAttribute]+ltrsThings = lens _ltrsThings (\ s a -> s{_ltrsThings = a}) . _Default . _Coerce;++-- | The response status code.+ltrsResponseStatus :: Lens' ListThingsResponse Int+ltrsResponseStatus = lens _ltrsResponseStatus (\ s a -> s{_ltrsResponseStatus = a});
+ gen/Network/AWS/IoT/ListTopicRules.hs view
@@ -0,0 +1,158 @@+{-# 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.IoT.ListTopicRules+-- Copyright : (c) 2013-2015 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)+--+-- Lists the rules for the specific topic.+--+-- /See:/ <https://aws.amazon.com/iot#ListTopicRules.html AWS API Reference> for ListTopicRules.+module Network.AWS.IoT.ListTopicRules+ (+ -- * Creating a Request+ listTopicRules+ , ListTopicRules+ -- * Request Lenses+ , ltrRuleDisabled+ , ltrTopic+ , ltrNextToken+ , ltrMaxResults++ -- * Destructuring the Response+ , listTopicRulesResponse+ , ListTopicRulesResponse+ -- * Response Lenses+ , ltrrsRules+ , ltrrsNextToken+ , ltrrsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the ListTopicRules operation.+--+-- /See:/ 'listTopicRules' smart constructor.+data ListTopicRules = ListTopicRules'+ { _ltrRuleDisabled :: !(Maybe Bool)+ , _ltrTopic :: !(Maybe Text)+ , _ltrNextToken :: !(Maybe Text)+ , _ltrMaxResults :: !(Maybe Nat)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListTopicRules' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ltrRuleDisabled'+--+-- * 'ltrTopic'+--+-- * 'ltrNextToken'+--+-- * 'ltrMaxResults'+listTopicRules+ :: ListTopicRules+listTopicRules =+ ListTopicRules'+ { _ltrRuleDisabled = Nothing+ , _ltrTopic = Nothing+ , _ltrNextToken = Nothing+ , _ltrMaxResults = Nothing+ }++-- | Specifies whether the rule is disabled.+ltrRuleDisabled :: Lens' ListTopicRules (Maybe Bool)+ltrRuleDisabled = lens _ltrRuleDisabled (\ s a -> s{_ltrRuleDisabled = a});++-- | The topic.+ltrTopic :: Lens' ListTopicRules (Maybe Text)+ltrTopic = lens _ltrTopic (\ s a -> s{_ltrTopic = a});++-- | A token used to retrieve the next value.+ltrNextToken :: Lens' ListTopicRules (Maybe Text)+ltrNextToken = lens _ltrNextToken (\ s a -> s{_ltrNextToken = a});++-- | The maximum number of results to return.+ltrMaxResults :: Lens' ListTopicRules (Maybe Natural)+ltrMaxResults = lens _ltrMaxResults (\ s a -> s{_ltrMaxResults = a}) . mapping _Nat;++instance AWSRequest ListTopicRules where+ type Rs ListTopicRules = ListTopicRulesResponse+ request = get ioT+ response+ = receiveJSON+ (\ s h x ->+ ListTopicRulesResponse' <$>+ (x .?> "rules" .!@ mempty) <*> (x .?> "nextToken")+ <*> (pure (fromEnum s)))++instance ToHeaders ListTopicRules where+ toHeaders = const mempty++instance ToPath ListTopicRules where+ toPath = const "/rules"++instance ToQuery ListTopicRules where+ toQuery ListTopicRules'{..}+ = mconcat+ ["ruleDisabled" =: _ltrRuleDisabled,+ "topic" =: _ltrTopic, "nextToken" =: _ltrNextToken,+ "maxResults" =: _ltrMaxResults]++-- | The output from the ListTopicRules operation.+--+-- /See:/ 'listTopicRulesResponse' smart constructor.+data ListTopicRulesResponse = ListTopicRulesResponse'+ { _ltrrsRules :: !(Maybe [TopicRuleListItem])+ , _ltrrsNextToken :: !(Maybe Text)+ , _ltrrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ListTopicRulesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ltrrsRules'+--+-- * 'ltrrsNextToken'+--+-- * 'ltrrsResponseStatus'+listTopicRulesResponse+ :: Int -- ^ 'ltrrsResponseStatus'+ -> ListTopicRulesResponse+listTopicRulesResponse pResponseStatus_ =+ ListTopicRulesResponse'+ { _ltrrsRules = Nothing+ , _ltrrsNextToken = Nothing+ , _ltrrsResponseStatus = pResponseStatus_+ }++-- | The rules.+ltrrsRules :: Lens' ListTopicRulesResponse [TopicRuleListItem]+ltrrsRules = lens _ltrrsRules (\ s a -> s{_ltrrsRules = a}) . _Default . _Coerce;++-- | A token used to retrieve the next value.+ltrrsNextToken :: Lens' ListTopicRulesResponse (Maybe Text)+ltrrsNextToken = lens _ltrrsNextToken (\ s a -> s{_ltrrsNextToken = a});++-- | The response status code.+ltrrsResponseStatus :: Lens' ListTopicRulesResponse Int+ltrrsResponseStatus = lens _ltrrsResponseStatus (\ s a -> s{_ltrrsResponseStatus = a});
+ gen/Network/AWS/IoT/RejectCertificateTransfer.hs view
@@ -0,0 +1,107 @@+{-# 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.IoT.RejectCertificateTransfer+-- Copyright : (c) 2013-2015 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)+--+-- Rejects a pending certificate transfer. After AWS IoT rejects a+-- certificate transfer, the certificate status changes from+-- __PENDING_TRANFER__ to __INACTIVE__.+--+-- To check for pending certificate transfers, call ListCertificates to+-- enumerate your certificates.+--+-- This operation can only be called by the transfer destination. Once+-- called, the certificate will be returned to the source\'s account in the+-- INACTIVE state.+--+-- /See:/ <https://aws.amazon.com/iot#RejectCertificateTransfer.html AWS API Reference> for RejectCertificateTransfer.+module Network.AWS.IoT.RejectCertificateTransfer+ (+ -- * Creating a Request+ rejectCertificateTransfer+ , RejectCertificateTransfer+ -- * Request Lenses+ , rctCertificateId++ -- * Destructuring the Response+ , rejectCertificateTransferResponse+ , RejectCertificateTransferResponse+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the RejectCertificateTransfer operation.+--+-- /See:/ 'rejectCertificateTransfer' smart constructor.+newtype RejectCertificateTransfer = RejectCertificateTransfer'+ { _rctCertificateId :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'RejectCertificateTransfer' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rctCertificateId'+rejectCertificateTransfer+ :: Text -- ^ 'rctCertificateId'+ -> RejectCertificateTransfer+rejectCertificateTransfer pCertificateId_ =+ RejectCertificateTransfer'+ { _rctCertificateId = pCertificateId_+ }++-- | The ID of the certificate.+rctCertificateId :: Lens' RejectCertificateTransfer Text+rctCertificateId = lens _rctCertificateId (\ s a -> s{_rctCertificateId = a});++instance AWSRequest RejectCertificateTransfer where+ type Rs RejectCertificateTransfer =+ RejectCertificateTransferResponse+ request = patchJSON ioT+ response+ = receiveNull RejectCertificateTransferResponse'++instance ToHeaders RejectCertificateTransfer where+ toHeaders = const mempty++instance ToJSON RejectCertificateTransfer where+ toJSON = const (Object mempty)++instance ToPath RejectCertificateTransfer where+ toPath RejectCertificateTransfer'{..}+ = mconcat+ ["/reject-certificate-transfer/",+ toBS _rctCertificateId]++instance ToQuery RejectCertificateTransfer where+ toQuery = const mempty++-- | /See:/ 'rejectCertificateTransferResponse' smart constructor.+data RejectCertificateTransferResponse =+ RejectCertificateTransferResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'RejectCertificateTransferResponse' with the minimum fields required to make a request.+--+rejectCertificateTransferResponse+ :: RejectCertificateTransferResponse+rejectCertificateTransferResponse = RejectCertificateTransferResponse'
+ gen/Network/AWS/IoT/ReplaceTopicRule.hs view
@@ -0,0 +1,108 @@+{-# 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.IoT.ReplaceTopicRule+-- Copyright : (c) 2013-2015 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)+--+-- Replaces the specified rule. You must specify all parameters for the new+-- rule.+--+-- /See:/ <https://aws.amazon.com/iot#ReplaceTopicRule.html AWS API Reference> for ReplaceTopicRule.+module Network.AWS.IoT.ReplaceTopicRule+ (+ -- * Creating a Request+ replaceTopicRule+ , ReplaceTopicRule+ -- * Request Lenses+ , rtrRuleName+ , rtrTopicRulePayload++ -- * Destructuring the Response+ , replaceTopicRuleResponse+ , ReplaceTopicRuleResponse+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the ReplaceTopicRule operation.+--+-- /See:/ 'replaceTopicRule' smart constructor.+data ReplaceTopicRule = ReplaceTopicRule'+ { _rtrRuleName :: !Text+ , _rtrTopicRulePayload :: !TopicRulePayload+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ReplaceTopicRule' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rtrRuleName'+--+-- * 'rtrTopicRulePayload'+replaceTopicRule+ :: Text -- ^ 'rtrRuleName'+ -> TopicRulePayload -- ^ 'rtrTopicRulePayload'+ -> ReplaceTopicRule+replaceTopicRule pRuleName_ pTopicRulePayload_ =+ ReplaceTopicRule'+ { _rtrRuleName = pRuleName_+ , _rtrTopicRulePayload = pTopicRulePayload_+ }++-- | The name of the rule.+rtrRuleName :: Lens' ReplaceTopicRule Text+rtrRuleName = lens _rtrRuleName (\ s a -> s{_rtrRuleName = a});++-- | The rule payload.+rtrTopicRulePayload :: Lens' ReplaceTopicRule TopicRulePayload+rtrTopicRulePayload = lens _rtrTopicRulePayload (\ s a -> s{_rtrTopicRulePayload = a});++instance AWSRequest ReplaceTopicRule where+ type Rs ReplaceTopicRule = ReplaceTopicRuleResponse+ request = patchJSON ioT+ response = receiveNull ReplaceTopicRuleResponse'++instance ToHeaders ReplaceTopicRule where+ toHeaders = const mempty++instance ToJSON ReplaceTopicRule where+ toJSON ReplaceTopicRule'{..}+ = object+ (catMaybes+ [Just ("topicRulePayload" .= _rtrTopicRulePayload)])++instance ToPath ReplaceTopicRule where+ toPath ReplaceTopicRule'{..}+ = mconcat ["/rules/", toBS _rtrRuleName]++instance ToQuery ReplaceTopicRule where+ toQuery = const mempty++-- | /See:/ 'replaceTopicRuleResponse' smart constructor.+data ReplaceTopicRuleResponse =+ ReplaceTopicRuleResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ReplaceTopicRuleResponse' with the minimum fields required to make a request.+--+replaceTopicRuleResponse+ :: ReplaceTopicRuleResponse+replaceTopicRuleResponse = ReplaceTopicRuleResponse'
+ gen/Network/AWS/IoT/SetDefaultPolicyVersion.hs view
@@ -0,0 +1,109 @@+{-# 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.IoT.SetDefaultPolicyVersion+-- Copyright : (c) 2013-2015 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)+--+-- Sets the specified policy version as the default for the specified+-- policy.+--+-- /See:/ <https://aws.amazon.com/iot#SetDefaultPolicyVersion.html AWS API Reference> for SetDefaultPolicyVersion.+module Network.AWS.IoT.SetDefaultPolicyVersion+ (+ -- * Creating a Request+ setDefaultPolicyVersion+ , SetDefaultPolicyVersion+ -- * Request Lenses+ , sdpvPolicyName+ , sdpvPolicyVersionId++ -- * Destructuring the Response+ , setDefaultPolicyVersionResponse+ , SetDefaultPolicyVersionResponse+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the SetDefaultPolicyVersion operation.+--+-- /See:/ 'setDefaultPolicyVersion' smart constructor.+data SetDefaultPolicyVersion = SetDefaultPolicyVersion'+ { _sdpvPolicyName :: !Text+ , _sdpvPolicyVersionId :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'SetDefaultPolicyVersion' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sdpvPolicyName'+--+-- * 'sdpvPolicyVersionId'+setDefaultPolicyVersion+ :: Text -- ^ 'sdpvPolicyName'+ -> Text -- ^ 'sdpvPolicyVersionId'+ -> SetDefaultPolicyVersion+setDefaultPolicyVersion pPolicyName_ pPolicyVersionId_ =+ SetDefaultPolicyVersion'+ { _sdpvPolicyName = pPolicyName_+ , _sdpvPolicyVersionId = pPolicyVersionId_+ }++-- | The policy name.+sdpvPolicyName :: Lens' SetDefaultPolicyVersion Text+sdpvPolicyName = lens _sdpvPolicyName (\ s a -> s{_sdpvPolicyName = a});++-- | The policy version ID.+sdpvPolicyVersionId :: Lens' SetDefaultPolicyVersion Text+sdpvPolicyVersionId = lens _sdpvPolicyVersionId (\ s a -> s{_sdpvPolicyVersionId = a});++instance AWSRequest SetDefaultPolicyVersion where+ type Rs SetDefaultPolicyVersion =+ SetDefaultPolicyVersionResponse+ request = patchJSON ioT+ response+ = receiveNull SetDefaultPolicyVersionResponse'++instance ToHeaders SetDefaultPolicyVersion where+ toHeaders = const mempty++instance ToJSON SetDefaultPolicyVersion where+ toJSON = const (Object mempty)++instance ToPath SetDefaultPolicyVersion where+ toPath SetDefaultPolicyVersion'{..}+ = mconcat+ ["/policies/", toBS _sdpvPolicyName, "/version/",+ toBS _sdpvPolicyVersionId]++instance ToQuery SetDefaultPolicyVersion where+ toQuery = const mempty++-- | /See:/ 'setDefaultPolicyVersionResponse' smart constructor.+data SetDefaultPolicyVersionResponse =+ SetDefaultPolicyVersionResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'SetDefaultPolicyVersionResponse' with the minimum fields required to make a request.+--+setDefaultPolicyVersionResponse+ :: SetDefaultPolicyVersionResponse+setDefaultPolicyVersionResponse = SetDefaultPolicyVersionResponse'
+ gen/Network/AWS/IoT/SetLoggingOptions.hs view
@@ -0,0 +1,96 @@+{-# 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.IoT.SetLoggingOptions+-- Copyright : (c) 2013-2015 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)+--+-- Sets the logging options.+--+-- /See:/ <https://aws.amazon.com/iot#SetLoggingOptions.html AWS API Reference> for SetLoggingOptions.+module Network.AWS.IoT.SetLoggingOptions+ (+ -- * Creating a Request+ setLoggingOptions+ , SetLoggingOptions+ -- * Request Lenses+ , sloLoggingOptionsPayload++ -- * Destructuring the Response+ , setLoggingOptionsResponse+ , SetLoggingOptionsResponse+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the SetLoggingOptions operation.+--+-- /See:/ 'setLoggingOptions' smart constructor.+newtype SetLoggingOptions = SetLoggingOptions'+ { _sloLoggingOptionsPayload :: Maybe LoggingOptionsPayload+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'SetLoggingOptions' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sloLoggingOptionsPayload'+setLoggingOptions+ :: SetLoggingOptions+setLoggingOptions =+ SetLoggingOptions'+ { _sloLoggingOptionsPayload = Nothing+ }++-- | The logging options payload.+sloLoggingOptionsPayload :: Lens' SetLoggingOptions (Maybe LoggingOptionsPayload)+sloLoggingOptionsPayload = lens _sloLoggingOptionsPayload (\ s a -> s{_sloLoggingOptionsPayload = a});++instance AWSRequest SetLoggingOptions where+ type Rs SetLoggingOptions = SetLoggingOptionsResponse+ request = postJSON ioT+ response = receiveNull SetLoggingOptionsResponse'++instance ToHeaders SetLoggingOptions where+ toHeaders = const mempty++instance ToJSON SetLoggingOptions where+ toJSON SetLoggingOptions'{..}+ = object+ (catMaybes+ [("loggingOptionsPayload" .=) <$>+ _sloLoggingOptionsPayload])++instance ToPath SetLoggingOptions where+ toPath = const "/loggingOptions"++instance ToQuery SetLoggingOptions where+ toQuery = const mempty++-- | /See:/ 'setLoggingOptionsResponse' smart constructor.+data SetLoggingOptionsResponse =+ SetLoggingOptionsResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'SetLoggingOptionsResponse' with the minimum fields required to make a request.+--+setLoggingOptionsResponse+ :: SetLoggingOptionsResponse+setLoggingOptionsResponse = SetLoggingOptionsResponse'
+ gen/Network/AWS/IoT/TransferCertificate.hs view
@@ -0,0 +1,147 @@+{-# 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.IoT.TransferCertificate+-- Copyright : (c) 2013-2015 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)+--+-- Transfers the specified certificate to the specified AWS account.+--+-- You can cancel the transfer until it is acknowledged by the recipient.+--+-- No notification is sent to the transfer destination\'s account, it is up+-- to the caller to notify the transfer target.+--+-- The certificate being transferred must not be in the ACTIVE state. It+-- can be deactivated using the UpdateCertificate API.+--+-- The certificate must not have any policies attached to it. These can be+-- detached using the DetachPrincipalPolicy API.+--+-- /See:/ <https://aws.amazon.com/iot#TransferCertificate.html AWS API Reference> for TransferCertificate.+module Network.AWS.IoT.TransferCertificate+ (+ -- * Creating a Request+ transferCertificate+ , TransferCertificate+ -- * Request Lenses+ , tcCertificateId+ , tcTargetAWSAccount++ -- * Destructuring the Response+ , transferCertificateResponse+ , TransferCertificateResponse+ -- * Response Lenses+ , tcrsTransferredCertificateARN+ , tcrsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the TransferCertificate operation.+--+-- /See:/ 'transferCertificate' smart constructor.+data TransferCertificate = TransferCertificate'+ { _tcCertificateId :: !Text+ , _tcTargetAWSAccount :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'TransferCertificate' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'tcCertificateId'+--+-- * 'tcTargetAWSAccount'+transferCertificate+ :: Text -- ^ 'tcCertificateId'+ -> Text -- ^ 'tcTargetAWSAccount'+ -> TransferCertificate+transferCertificate pCertificateId_ pTargetAWSAccount_ =+ TransferCertificate'+ { _tcCertificateId = pCertificateId_+ , _tcTargetAWSAccount = pTargetAWSAccount_+ }++-- | The ID of the certificate.+tcCertificateId :: Lens' TransferCertificate Text+tcCertificateId = lens _tcCertificateId (\ s a -> s{_tcCertificateId = a});++-- | The AWS account.+tcTargetAWSAccount :: Lens' TransferCertificate Text+tcTargetAWSAccount = lens _tcTargetAWSAccount (\ s a -> s{_tcTargetAWSAccount = a});++instance AWSRequest TransferCertificate where+ type Rs TransferCertificate =+ TransferCertificateResponse+ request = patchJSON ioT+ response+ = receiveJSON+ (\ s h x ->+ TransferCertificateResponse' <$>+ (x .?> "transferredCertificateArn") <*>+ (pure (fromEnum s)))++instance ToHeaders TransferCertificate where+ toHeaders = const mempty++instance ToJSON TransferCertificate where+ toJSON = const (Object mempty)++instance ToPath TransferCertificate where+ toPath TransferCertificate'{..}+ = mconcat+ ["/transfer-certificate/", toBS _tcCertificateId]++instance ToQuery TransferCertificate where+ toQuery TransferCertificate'{..}+ = mconcat ["targetAwsAccount" =: _tcTargetAWSAccount]++-- | The output from the TransferCertificate operation.+--+-- /See:/ 'transferCertificateResponse' smart constructor.+data TransferCertificateResponse = TransferCertificateResponse'+ { _tcrsTransferredCertificateARN :: !(Maybe Text)+ , _tcrsResponseStatus :: !Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'TransferCertificateResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'tcrsTransferredCertificateARN'+--+-- * 'tcrsResponseStatus'+transferCertificateResponse+ :: Int -- ^ 'tcrsResponseStatus'+ -> TransferCertificateResponse+transferCertificateResponse pResponseStatus_ =+ TransferCertificateResponse'+ { _tcrsTransferredCertificateARN = Nothing+ , _tcrsResponseStatus = pResponseStatus_+ }++-- | The ARN of the certificate.+tcrsTransferredCertificateARN :: Lens' TransferCertificateResponse (Maybe Text)+tcrsTransferredCertificateARN = lens _tcrsTransferredCertificateARN (\ s a -> s{_tcrsTransferredCertificateARN = a});++-- | The response status code.+tcrsResponseStatus :: Lens' TransferCertificateResponse Int+tcrsResponseStatus = lens _tcrsResponseStatus (\ s a -> s{_tcrsResponseStatus = a});
+ gen/Network/AWS/IoT/Types.hs view
@@ -0,0 +1,308 @@+{-# LANGUAGE OverloadedStrings #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.IoT.Types+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.IoT.Types+ (+ -- * Service Configuration+ ioT++ -- * Errors+ , _SqlParseException+ , _InvalidRequestException+ , _TransferConflictException+ , _CertificateStateException+ , _MalformedPolicyException+ , _DeleteConflictException+ , _ResourceAlreadyExistsException+ , _TransferAlreadyCompletedException+ , _ThrottlingException+ , _InternalFailureException+ , _VersionsLimitExceededException+ , _ServiceUnavailableException+ , _InternalException+ , _UnauthorizedException+ , _ResourceNotFoundException+ , _LimitExceededException++ -- * CertificateStatus+ , CertificateStatus (..)++ -- * LogLevel+ , LogLevel (..)++ -- * Action+ , Action+ , action+ , aSns+ , aDynamoDB+ , aFirehose+ , aLambda+ , aKinesis+ , aS3+ , aRepublish+ , aSqs++ -- * AttributePayload+ , AttributePayload+ , attributePayload+ , apAttributes++ -- * Certificate+ , Certificate+ , certificate+ , cStatus+ , cCertificateARN+ , cCertificateId+ , cCreationDate++ -- * CertificateDescription+ , CertificateDescription+ , certificateDescription+ , cdStatus+ , cdOwnedBy+ , cdLastModifiedDate+ , cdCertificatePem+ , cdCertificateARN+ , cdCertificateId+ , cdCreationDate++ -- * DynamoDBAction+ , DynamoDBAction+ , dynamoDBAction+ , ddaPayloadField+ , ddaTableName+ , ddaRoleARN+ , ddaHashKeyField+ , ddaHashKeyValue+ , ddaRangeKeyField+ , ddaRangeKeyValue++ -- * FirehoseAction+ , FirehoseAction+ , firehoseAction+ , faRoleARN+ , faDeliveryStreamName++ -- * KeyPair+ , KeyPair+ , keyPair+ , kpPrivateKey+ , kpPublicKey++ -- * KinesisAction+ , KinesisAction+ , kinesisAction+ , kaPartitionKey+ , kaRoleARN+ , kaStreamName++ -- * LambdaAction+ , LambdaAction+ , lambdaAction+ , laFunctionARN++ -- * LoggingOptionsPayload+ , LoggingOptionsPayload+ , loggingOptionsPayload+ , lopLogLevel+ , lopRoleARN++ -- * Policy+ , Policy+ , policy+ , pPolicyName+ , pPolicyARN++ -- * PolicyVersion+ , PolicyVersion+ , policyVersion+ , pvVersionId+ , pvCreateDate+ , pvIsDefaultVersion++ -- * RepublishAction+ , RepublishAction+ , republishAction+ , raRoleARN+ , raTopic++ -- * S3Action+ , S3Action+ , s3Action+ , sRoleARN+ , sBucketName+ , sKey++ -- * SNSAction+ , SNSAction+ , snsAction+ , snsaTargetARN+ , snsaRoleARN++ -- * SqsAction+ , SqsAction+ , sqsAction+ , saUseBase64+ , saRoleARN+ , saQueueURL++ -- * ThingAttribute+ , ThingAttribute+ , thingAttribute+ , taAttributes+ , taThingName++ -- * TopicRule+ , TopicRule+ , topicRule+ , trCreatedAt+ , trActions+ , trRuleDisabled+ , trRuleName+ , trSql+ , trDescription++ -- * TopicRuleListItem+ , TopicRuleListItem+ , topicRuleListItem+ , trliCreatedAt+ , trliRuleDisabled+ , trliRuleName+ , trliTopicPattern++ -- * TopicRulePayload+ , TopicRulePayload+ , topicRulePayload+ , trpRuleDisabled+ , trpDescription+ , trpSql+ , trpActions+ ) where++import Network.AWS.IoT.Types.Product+import Network.AWS.IoT.Types.Sum+import Network.AWS.Prelude+import Network.AWS.Sign.V4++-- | API version '2015-05-28' of the Amazon IoT SDK configuration.+ioT :: Service+ioT =+ Service+ { _svcAbbrev = "IoT"+ , _svcSigner = v4+ , _svcPrefix = "iot"+ , _svcVersion = "2015-05-28"+ , _svcEndpoint = defaultEndpoint ioT+ , _svcTimeout = Just 70+ , _svcCheck = statusSuccess+ , _svcError = parseJSONError+ , _svcRetry = retry+ }+ where+ retry =+ Exponential+ { _retryBase = 5.0e-2+ , _retryGrowth = 2+ , _retryAttempts = 5+ , _retryCheck = check+ }+ check e+ | has (hasCode "ThrottlingException" . hasStatus 400) e =+ Just "throttling_exception"+ | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"+ | 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 Rule-SQL expression can\'t be parsed correctly.+_SqlParseException :: AsError a => Getting (First ServiceError) a ServiceError+_SqlParseException =+ _ServiceError . hasStatus 406 . hasCode "SqlParseException"++-- | The request is not valid.+_InvalidRequestException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidRequestException =+ _ServiceError . hasStatus 400 . hasCode "InvalidRequestException"++-- | You can\'t transfer the the certificate because authorization policies+-- are still attached.+_TransferConflictException :: AsError a => Getting (First ServiceError) a ServiceError+_TransferConflictException =+ _ServiceError . hasStatus 409 . hasCode "TransferConflictException"++-- | The certificate operation is not allowed.+_CertificateStateException :: AsError a => Getting (First ServiceError) a ServiceError+_CertificateStateException =+ _ServiceError . hasStatus 406 . hasCode "CertificateStateException"++-- | The policy documentation is not valid.+_MalformedPolicyException :: AsError a => Getting (First ServiceError) a ServiceError+_MalformedPolicyException =+ _ServiceError . hasStatus 400 . hasCode "MalformedPolicyException"++-- | You can\'t delete the resource because it is attached to one or more+-- resources.+_DeleteConflictException :: AsError a => Getting (First ServiceError) a ServiceError+_DeleteConflictException =+ _ServiceError . hasStatus 409 . hasCode "DeleteConflictException"++-- | The resource already exists.+_ResourceAlreadyExistsException :: AsError a => Getting (First ServiceError) a ServiceError+_ResourceAlreadyExistsException =+ _ServiceError . hasStatus 409 . hasCode "ResourceAlreadyExistsException"++-- | You can\'t revert the certificate transfer because it has already+-- completed.+_TransferAlreadyCompletedException :: AsError a => Getting (First ServiceError) a ServiceError+_TransferAlreadyCompletedException =+ _ServiceError . hasStatus 410 . hasCode "TransferAlreadyCompletedException"++-- | The rate exceeds the limit.+_ThrottlingException :: AsError a => Getting (First ServiceError) a ServiceError+_ThrottlingException =+ _ServiceError . hasStatus 429 . hasCode "ThrottlingException"++-- | An unexpected error has occurred.+_InternalFailureException :: AsError a => Getting (First ServiceError) a ServiceError+_InternalFailureException =+ _ServiceError . hasStatus 500 . hasCode "InternalFailureException"++-- | The number of policy versions exceeds the limit.+_VersionsLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError+_VersionsLimitExceededException =+ _ServiceError . hasStatus 409 . hasCode "VersionsLimitExceededException"++-- | The service is temporarily unavailable.+_ServiceUnavailableException :: AsError a => Getting (First ServiceError) a ServiceError+_ServiceUnavailableException =+ _ServiceError . hasStatus 503 . hasCode "ServiceUnavailableException"++-- | An unexpected error has occurred.+_InternalException :: AsError a => Getting (First ServiceError) a ServiceError+_InternalException =+ _ServiceError . hasStatus 500 . hasCode "InternalException"++-- | You are not authorized to perform this operation.+_UnauthorizedException :: AsError a => Getting (First ServiceError) a ServiceError+_UnauthorizedException =+ _ServiceError . hasStatus 401 . hasCode "UnauthorizedException"++-- | The specified resource does not exist.+_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_ResourceNotFoundException =+ _ServiceError . hasStatus 404 . hasCode "ResourceNotFoundException"++-- | The number of attached entities exceeds the limit.+_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError+_LimitExceededException =+ _ServiceError . hasStatus 410 . hasCode "LimitExceededException"
+ gen/Network/AWS/IoT/Types/Product.hs view
@@ -0,0 +1,1153 @@+{-# 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.IoT.Types.Product+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.IoT.Types.Product where++import Network.AWS.IoT.Types.Sum+import Network.AWS.Prelude++-- | Describes the actions associated with a rule.+--+-- /See:/ 'action' smart constructor.+data Action = Action'+ { _aSns :: !(Maybe SNSAction)+ , _aDynamoDB :: !(Maybe DynamoDBAction)+ , _aFirehose :: !(Maybe FirehoseAction)+ , _aLambda :: !(Maybe LambdaAction)+ , _aKinesis :: !(Maybe KinesisAction)+ , _aS3 :: !(Maybe S3Action)+ , _aRepublish :: !(Maybe RepublishAction)+ , _aSqs :: !(Maybe SqsAction)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'Action' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'aSns'+--+-- * 'aDynamoDB'+--+-- * 'aFirehose'+--+-- * 'aLambda'+--+-- * 'aKinesis'+--+-- * 'aS3'+--+-- * 'aRepublish'+--+-- * 'aSqs'+action+ :: Action+action =+ Action'+ { _aSns = Nothing+ , _aDynamoDB = Nothing+ , _aFirehose = Nothing+ , _aLambda = Nothing+ , _aKinesis = Nothing+ , _aS3 = Nothing+ , _aRepublish = Nothing+ , _aSqs = Nothing+ }++-- | Publish to an SNS topic.+aSns :: Lens' Action (Maybe SNSAction)+aSns = lens _aSns (\ s a -> s{_aSns = a});++-- | Write to a DynamoDB table.+aDynamoDB :: Lens' Action (Maybe DynamoDBAction)+aDynamoDB = lens _aDynamoDB (\ s a -> s{_aDynamoDB = a});++-- | Undocumented member.+aFirehose :: Lens' Action (Maybe FirehoseAction)+aFirehose = lens _aFirehose (\ s a -> s{_aFirehose = a});++-- | Invoke a Lambda function.+aLambda :: Lens' Action (Maybe LambdaAction)+aLambda = lens _aLambda (\ s a -> s{_aLambda = a});++-- | Write data to a Kinesis stream.+aKinesis :: Lens' Action (Maybe KinesisAction)+aKinesis = lens _aKinesis (\ s a -> s{_aKinesis = a});++-- | Write to an S3 bucket.+aS3 :: Lens' Action (Maybe S3Action)+aS3 = lens _aS3 (\ s a -> s{_aS3 = a});++-- | Publish to another MQTT topic.+aRepublish :: Lens' Action (Maybe RepublishAction)+aRepublish = lens _aRepublish (\ s a -> s{_aRepublish = a});++-- | Publish to an SQS queue.+aSqs :: Lens' Action (Maybe SqsAction)+aSqs = lens _aSqs (\ s a -> s{_aSqs = a});++instance FromJSON Action where+ parseJSON+ = withObject "Action"+ (\ x ->+ Action' <$>+ (x .:? "sns") <*> (x .:? "dynamoDB") <*>+ (x .:? "firehose")+ <*> (x .:? "lambda")+ <*> (x .:? "kinesis")+ <*> (x .:? "s3")+ <*> (x .:? "republish")+ <*> (x .:? "sqs"))++instance ToJSON Action where+ toJSON Action'{..}+ = object+ (catMaybes+ [("sns" .=) <$> _aSns,+ ("dynamoDB" .=) <$> _aDynamoDB,+ ("firehose" .=) <$> _aFirehose,+ ("lambda" .=) <$> _aLambda,+ ("kinesis" .=) <$> _aKinesis, ("s3" .=) <$> _aS3,+ ("republish" .=) <$> _aRepublish,+ ("sqs" .=) <$> _aSqs])++-- | The attribute payload, a JSON string containing up to three key-value+-- pairs.+--+-- For example: {\\\"attributes\\\":{\\\"string1\\\":\\\"string2\\”}}+--+-- /See:/ 'attributePayload' smart constructor.+newtype AttributePayload = AttributePayload'+ { _apAttributes :: Maybe (Map Text Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'AttributePayload' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'apAttributes'+attributePayload+ :: AttributePayload+attributePayload =+ AttributePayload'+ { _apAttributes = Nothing+ }++-- | A JSON string containing up to three key-value pair in JSON format.+--+-- For example: {\\\"attributes\\\":{\\\"string1\\\":\\\"string2\\”}}+apAttributes :: Lens' AttributePayload (HashMap Text Text)+apAttributes = lens _apAttributes (\ s a -> s{_apAttributes = a}) . _Default . _Map;++instance ToJSON AttributePayload where+ toJSON AttributePayload'{..}+ = object+ (catMaybes [("attributes" .=) <$> _apAttributes])++-- | Information about a certificate.+--+-- /See:/ 'certificate' smart constructor.+data Certificate = Certificate'+ { _cStatus :: !(Maybe CertificateStatus)+ , _cCertificateARN :: !(Maybe Text)+ , _cCertificateId :: !(Maybe Text)+ , _cCreationDate :: !(Maybe POSIX)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'Certificate' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cStatus'+--+-- * 'cCertificateARN'+--+-- * 'cCertificateId'+--+-- * 'cCreationDate'+certificate+ :: Certificate+certificate =+ Certificate'+ { _cStatus = Nothing+ , _cCertificateARN = Nothing+ , _cCertificateId = Nothing+ , _cCreationDate = Nothing+ }++-- | The status of the certificate.+cStatus :: Lens' Certificate (Maybe CertificateStatus)+cStatus = lens _cStatus (\ s a -> s{_cStatus = a});++-- | The ARN of the certificate.+cCertificateARN :: Lens' Certificate (Maybe Text)+cCertificateARN = lens _cCertificateARN (\ s a -> s{_cCertificateARN = a});++-- | The ID of the certificate.+cCertificateId :: Lens' Certificate (Maybe Text)+cCertificateId = lens _cCertificateId (\ s a -> s{_cCertificateId = a});++-- | The date and time the certificate was created.+cCreationDate :: Lens' Certificate (Maybe UTCTime)+cCreationDate = lens _cCreationDate (\ s a -> s{_cCreationDate = a}) . mapping _Time;++instance FromJSON Certificate where+ parseJSON+ = withObject "Certificate"+ (\ x ->+ Certificate' <$>+ (x .:? "status") <*> (x .:? "certificateArn") <*>+ (x .:? "certificateId")+ <*> (x .:? "creationDate"))++-- | Describes a certificate.+--+-- /See:/ 'certificateDescription' smart constructor.+data CertificateDescription = CertificateDescription'+ { _cdStatus :: !(Maybe CertificateStatus)+ , _cdOwnedBy :: !(Maybe Text)+ , _cdLastModifiedDate :: !(Maybe POSIX)+ , _cdCertificatePem :: !(Maybe Text)+ , _cdCertificateARN :: !(Maybe Text)+ , _cdCertificateId :: !(Maybe Text)+ , _cdCreationDate :: !(Maybe POSIX)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'CertificateDescription' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cdStatus'+--+-- * 'cdOwnedBy'+--+-- * 'cdLastModifiedDate'+--+-- * 'cdCertificatePem'+--+-- * 'cdCertificateARN'+--+-- * 'cdCertificateId'+--+-- * 'cdCreationDate'+certificateDescription+ :: CertificateDescription+certificateDescription =+ CertificateDescription'+ { _cdStatus = Nothing+ , _cdOwnedBy = Nothing+ , _cdLastModifiedDate = Nothing+ , _cdCertificatePem = Nothing+ , _cdCertificateARN = Nothing+ , _cdCertificateId = Nothing+ , _cdCreationDate = Nothing+ }++-- | The status of the certificate.+cdStatus :: Lens' CertificateDescription (Maybe CertificateStatus)+cdStatus = lens _cdStatus (\ s a -> s{_cdStatus = a});++-- | The ID of the AWS account that owns the certificate.+cdOwnedBy :: Lens' CertificateDescription (Maybe Text)+cdOwnedBy = lens _cdOwnedBy (\ s a -> s{_cdOwnedBy = a});++-- | The date and time the certificate was last modified.+cdLastModifiedDate :: Lens' CertificateDescription (Maybe UTCTime)+cdLastModifiedDate = lens _cdLastModifiedDate (\ s a -> s{_cdLastModifiedDate = a}) . mapping _Time;++-- | The certificate data, in PEM format.+cdCertificatePem :: Lens' CertificateDescription (Maybe Text)+cdCertificatePem = lens _cdCertificatePem (\ s a -> s{_cdCertificatePem = a});++-- | The ARN of the certificate.+cdCertificateARN :: Lens' CertificateDescription (Maybe Text)+cdCertificateARN = lens _cdCertificateARN (\ s a -> s{_cdCertificateARN = a});++-- | The ID of the certificate.+cdCertificateId :: Lens' CertificateDescription (Maybe Text)+cdCertificateId = lens _cdCertificateId (\ s a -> s{_cdCertificateId = a});++-- | The date and time the certificate was created.+cdCreationDate :: Lens' CertificateDescription (Maybe UTCTime)+cdCreationDate = lens _cdCreationDate (\ s a -> s{_cdCreationDate = a}) . mapping _Time;++instance FromJSON CertificateDescription where+ parseJSON+ = withObject "CertificateDescription"+ (\ x ->+ CertificateDescription' <$>+ (x .:? "status") <*> (x .:? "ownedBy") <*>+ (x .:? "lastModifiedDate")+ <*> (x .:? "certificatePem")+ <*> (x .:? "certificateArn")+ <*> (x .:? "certificateId")+ <*> (x .:? "creationDate"))++-- | Describes an action to write to a DynamoDB table.+--+-- The 'tableName', 'hashKeyField', and 'rangeKeyField' values must match+-- the values used when you created the table.+--+-- The 'hashKeyValue' and 'rangeKeyvalue' fields use a substitution+-- template syntax. These templates provide data at runtime. The syntax is+-- as follows: ${/sql-expression/}.+--+-- You can specify any expression that\'s valid in a WHERE or SELECT+-- clause, including JSON properties, comparisons, calculations, and+-- functions. For example, the following field uses the third level of the+-- topic:+--+-- '\"hashKeyValue\": \"${topic(3)}\"'+--+-- The following field uses the timestamp:+--+-- '\"rangeKeyValue\": \"${timestamp()}\"'+--+-- /See:/ 'dynamoDBAction' smart constructor.+data DynamoDBAction = DynamoDBAction'+ { _ddaPayloadField :: !(Maybe Text)+ , _ddaTableName :: !Text+ , _ddaRoleARN :: !Text+ , _ddaHashKeyField :: !Text+ , _ddaHashKeyValue :: !Text+ , _ddaRangeKeyField :: !Text+ , _ddaRangeKeyValue :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'DynamoDBAction' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ddaPayloadField'+--+-- * 'ddaTableName'+--+-- * 'ddaRoleARN'+--+-- * 'ddaHashKeyField'+--+-- * 'ddaHashKeyValue'+--+-- * 'ddaRangeKeyField'+--+-- * 'ddaRangeKeyValue'+dynamoDBAction+ :: Text -- ^ 'ddaTableName'+ -> Text -- ^ 'ddaRoleARN'+ -> Text -- ^ 'ddaHashKeyField'+ -> Text -- ^ 'ddaHashKeyValue'+ -> Text -- ^ 'ddaRangeKeyField'+ -> Text -- ^ 'ddaRangeKeyValue'+ -> DynamoDBAction+dynamoDBAction pTableName_ pRoleARN_ pHashKeyField_ pHashKeyValue_ pRangeKeyField_ pRangeKeyValue_ =+ DynamoDBAction'+ { _ddaPayloadField = Nothing+ , _ddaTableName = pTableName_+ , _ddaRoleARN = pRoleARN_+ , _ddaHashKeyField = pHashKeyField_+ , _ddaHashKeyValue = pHashKeyValue_+ , _ddaRangeKeyField = pRangeKeyField_+ , _ddaRangeKeyValue = pRangeKeyValue_+ }++-- | The action payload.+ddaPayloadField :: Lens' DynamoDBAction (Maybe Text)+ddaPayloadField = lens _ddaPayloadField (\ s a -> s{_ddaPayloadField = a});++-- | The name of the DynamoDB table.+ddaTableName :: Lens' DynamoDBAction Text+ddaTableName = lens _ddaTableName (\ s a -> s{_ddaTableName = a});++-- | The ARN of the IAM role that grants access.+ddaRoleARN :: Lens' DynamoDBAction Text+ddaRoleARN = lens _ddaRoleARN (\ s a -> s{_ddaRoleARN = a});++-- | The hash key name.+ddaHashKeyField :: Lens' DynamoDBAction Text+ddaHashKeyField = lens _ddaHashKeyField (\ s a -> s{_ddaHashKeyField = a});++-- | The hash key value.+ddaHashKeyValue :: Lens' DynamoDBAction Text+ddaHashKeyValue = lens _ddaHashKeyValue (\ s a -> s{_ddaHashKeyValue = a});++-- | The range key name.+ddaRangeKeyField :: Lens' DynamoDBAction Text+ddaRangeKeyField = lens _ddaRangeKeyField (\ s a -> s{_ddaRangeKeyField = a});++-- | The range key value.+ddaRangeKeyValue :: Lens' DynamoDBAction Text+ddaRangeKeyValue = lens _ddaRangeKeyValue (\ s a -> s{_ddaRangeKeyValue = a});++instance FromJSON DynamoDBAction where+ parseJSON+ = withObject "DynamoDBAction"+ (\ x ->+ DynamoDBAction' <$>+ (x .:? "payloadField") <*> (x .: "tableName") <*>+ (x .: "roleArn")+ <*> (x .: "hashKeyField")+ <*> (x .: "hashKeyValue")+ <*> (x .: "rangeKeyField")+ <*> (x .: "rangeKeyValue"))++instance ToJSON DynamoDBAction where+ toJSON DynamoDBAction'{..}+ = object+ (catMaybes+ [("payloadField" .=) <$> _ddaPayloadField,+ Just ("tableName" .= _ddaTableName),+ Just ("roleArn" .= _ddaRoleARN),+ Just ("hashKeyField" .= _ddaHashKeyField),+ Just ("hashKeyValue" .= _ddaHashKeyValue),+ Just ("rangeKeyField" .= _ddaRangeKeyField),+ Just ("rangeKeyValue" .= _ddaRangeKeyValue)])++-- | /See:/ 'firehoseAction' smart constructor.+data FirehoseAction = FirehoseAction'+ { _faRoleARN :: !Text+ , _faDeliveryStreamName :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'FirehoseAction' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'faRoleARN'+--+-- * 'faDeliveryStreamName'+firehoseAction+ :: Text -- ^ 'faRoleARN'+ -> Text -- ^ 'faDeliveryStreamName'+ -> FirehoseAction+firehoseAction pRoleARN_ pDeliveryStreamName_ =+ FirehoseAction'+ { _faRoleARN = pRoleARN_+ , _faDeliveryStreamName = pDeliveryStreamName_+ }++-- | Undocumented member.+faRoleARN :: Lens' FirehoseAction Text+faRoleARN = lens _faRoleARN (\ s a -> s{_faRoleARN = a});++-- | Undocumented member.+faDeliveryStreamName :: Lens' FirehoseAction Text+faDeliveryStreamName = lens _faDeliveryStreamName (\ s a -> s{_faDeliveryStreamName = a});++instance FromJSON FirehoseAction where+ parseJSON+ = withObject "FirehoseAction"+ (\ x ->+ FirehoseAction' <$>+ (x .: "roleArn") <*> (x .: "deliveryStreamName"))++instance ToJSON FirehoseAction where+ toJSON FirehoseAction'{..}+ = object+ (catMaybes+ [Just ("roleArn" .= _faRoleARN),+ Just+ ("deliveryStreamName" .= _faDeliveryStreamName)])++-- | Describes a key pair.+--+-- /See:/ 'keyPair' smart constructor.+data KeyPair = KeyPair'+ { _kpPrivateKey :: !(Maybe Text)+ , _kpPublicKey :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'KeyPair' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'kpPrivateKey'+--+-- * 'kpPublicKey'+keyPair+ :: KeyPair+keyPair =+ KeyPair'+ { _kpPrivateKey = Nothing+ , _kpPublicKey = Nothing+ }++-- | The private key.+kpPrivateKey :: Lens' KeyPair (Maybe Text)+kpPrivateKey = lens _kpPrivateKey (\ s a -> s{_kpPrivateKey = a});++-- | The public key.+kpPublicKey :: Lens' KeyPair (Maybe Text)+kpPublicKey = lens _kpPublicKey (\ s a -> s{_kpPublicKey = a});++instance FromJSON KeyPair where+ parseJSON+ = withObject "KeyPair"+ (\ x ->+ KeyPair' <$>+ (x .:? "PrivateKey") <*> (x .:? "PublicKey"))++-- | Describes an action to write data to an Amazon Kinesis stream.+--+-- /See:/ 'kinesisAction' smart constructor.+data KinesisAction = KinesisAction'+ { _kaPartitionKey :: !(Maybe Text)+ , _kaRoleARN :: !Text+ , _kaStreamName :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'KinesisAction' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'kaPartitionKey'+--+-- * 'kaRoleARN'+--+-- * 'kaStreamName'+kinesisAction+ :: Text -- ^ 'kaRoleARN'+ -> Text -- ^ 'kaStreamName'+ -> KinesisAction+kinesisAction pRoleARN_ pStreamName_ =+ KinesisAction'+ { _kaPartitionKey = Nothing+ , _kaRoleARN = pRoleARN_+ , _kaStreamName = pStreamName_+ }++-- | The partition key.+kaPartitionKey :: Lens' KinesisAction (Maybe Text)+kaPartitionKey = lens _kaPartitionKey (\ s a -> s{_kaPartitionKey = a});++-- | The ARN of the IAM role that grants access.+kaRoleARN :: Lens' KinesisAction Text+kaRoleARN = lens _kaRoleARN (\ s a -> s{_kaRoleARN = a});++-- | The name of the Kinesis stream.+kaStreamName :: Lens' KinesisAction Text+kaStreamName = lens _kaStreamName (\ s a -> s{_kaStreamName = a});++instance FromJSON KinesisAction where+ parseJSON+ = withObject "KinesisAction"+ (\ x ->+ KinesisAction' <$>+ (x .:? "partitionKey") <*> (x .: "roleArn") <*>+ (x .: "streamName"))++instance ToJSON KinesisAction where+ toJSON KinesisAction'{..}+ = object+ (catMaybes+ [("partitionKey" .=) <$> _kaPartitionKey,+ Just ("roleArn" .= _kaRoleARN),+ Just ("streamName" .= _kaStreamName)])++-- | Describes an action to invoke a Lamdba function.+--+-- /See:/ 'lambdaAction' smart constructor.+newtype LambdaAction = LambdaAction'+ { _laFunctionARN :: Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'LambdaAction' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'laFunctionARN'+lambdaAction+ :: Text -- ^ 'laFunctionARN'+ -> LambdaAction+lambdaAction pFunctionARN_ =+ LambdaAction'+ { _laFunctionARN = pFunctionARN_+ }++-- | The ARN of the Lambda function.+laFunctionARN :: Lens' LambdaAction Text+laFunctionARN = lens _laFunctionARN (\ s a -> s{_laFunctionARN = a});++instance FromJSON LambdaAction where+ parseJSON+ = withObject "LambdaAction"+ (\ x -> LambdaAction' <$> (x .: "functionArn"))++instance ToJSON LambdaAction where+ toJSON LambdaAction'{..}+ = object+ (catMaybes [Just ("functionArn" .= _laFunctionARN)])++-- | Describes the logging options payload.+--+-- /See:/ 'loggingOptionsPayload' smart constructor.+data LoggingOptionsPayload = LoggingOptionsPayload'+ { _lopLogLevel :: !(Maybe LogLevel)+ , _lopRoleARN :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'LoggingOptionsPayload' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lopLogLevel'+--+-- * 'lopRoleARN'+loggingOptionsPayload+ :: Text -- ^ 'lopRoleARN'+ -> LoggingOptionsPayload+loggingOptionsPayload pRoleARN_ =+ LoggingOptionsPayload'+ { _lopLogLevel = Nothing+ , _lopRoleARN = pRoleARN_+ }++-- | The logging level.+lopLogLevel :: Lens' LoggingOptionsPayload (Maybe LogLevel)+lopLogLevel = lens _lopLogLevel (\ s a -> s{_lopLogLevel = a});++-- | The ARN of the IAM role that grants access.+lopRoleARN :: Lens' LoggingOptionsPayload Text+lopRoleARN = lens _lopRoleARN (\ s a -> s{_lopRoleARN = a});++instance ToJSON LoggingOptionsPayload where+ toJSON LoggingOptionsPayload'{..}+ = object+ (catMaybes+ [("logLevel" .=) <$> _lopLogLevel,+ Just ("roleArn" .= _lopRoleARN)])++-- | Describes an AWS IoT policy.+--+-- /See:/ 'policy' smart constructor.+data Policy = Policy'+ { _pPolicyName :: !(Maybe Text)+ , _pPolicyARN :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'Policy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'pPolicyName'+--+-- * 'pPolicyARN'+policy+ :: Policy+policy =+ Policy'+ { _pPolicyName = Nothing+ , _pPolicyARN = Nothing+ }++-- | The policy name.+pPolicyName :: Lens' Policy (Maybe Text)+pPolicyName = lens _pPolicyName (\ s a -> s{_pPolicyName = a});++-- | The policy ARN.+pPolicyARN :: Lens' Policy (Maybe Text)+pPolicyARN = lens _pPolicyARN (\ s a -> s{_pPolicyARN = a});++instance FromJSON Policy where+ parseJSON+ = withObject "Policy"+ (\ x ->+ Policy' <$>+ (x .:? "policyName") <*> (x .:? "policyArn"))++-- | Describes a policy version.+--+-- /See:/ 'policyVersion' smart constructor.+data PolicyVersion = PolicyVersion'+ { _pvVersionId :: !(Maybe Text)+ , _pvCreateDate :: !(Maybe POSIX)+ , _pvIsDefaultVersion :: !(Maybe Bool)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'PolicyVersion' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'pvVersionId'+--+-- * 'pvCreateDate'+--+-- * 'pvIsDefaultVersion'+policyVersion+ :: PolicyVersion+policyVersion =+ PolicyVersion'+ { _pvVersionId = Nothing+ , _pvCreateDate = Nothing+ , _pvIsDefaultVersion = Nothing+ }++-- | The policy version ID.+pvVersionId :: Lens' PolicyVersion (Maybe Text)+pvVersionId = lens _pvVersionId (\ s a -> s{_pvVersionId = a});++-- | The date and time the policy was created.+pvCreateDate :: Lens' PolicyVersion (Maybe UTCTime)+pvCreateDate = lens _pvCreateDate (\ s a -> s{_pvCreateDate = a}) . mapping _Time;++-- | Specifies whether the policy version is the default.+pvIsDefaultVersion :: Lens' PolicyVersion (Maybe Bool)+pvIsDefaultVersion = lens _pvIsDefaultVersion (\ s a -> s{_pvIsDefaultVersion = a});++instance FromJSON PolicyVersion where+ parseJSON+ = withObject "PolicyVersion"+ (\ x ->+ PolicyVersion' <$>+ (x .:? "versionId") <*> (x .:? "createDate") <*>+ (x .:? "isDefaultVersion"))++-- | Describes an action to republish to another topic.+--+-- /See:/ 'republishAction' smart constructor.+data RepublishAction = RepublishAction'+ { _raRoleARN :: !Text+ , _raTopic :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'RepublishAction' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'raRoleARN'+--+-- * 'raTopic'+republishAction+ :: Text -- ^ 'raRoleARN'+ -> Text -- ^ 'raTopic'+ -> RepublishAction+republishAction pRoleARN_ pTopic_ =+ RepublishAction'+ { _raRoleARN = pRoleARN_+ , _raTopic = pTopic_+ }++-- | The ARN of the IAM role that grants access.+raRoleARN :: Lens' RepublishAction Text+raRoleARN = lens _raRoleARN (\ s a -> s{_raRoleARN = a});++-- | The name of the MQTT topic.+raTopic :: Lens' RepublishAction Text+raTopic = lens _raTopic (\ s a -> s{_raTopic = a});++instance FromJSON RepublishAction where+ parseJSON+ = withObject "RepublishAction"+ (\ x ->+ RepublishAction' <$>+ (x .: "roleArn") <*> (x .: "topic"))++instance ToJSON RepublishAction where+ toJSON RepublishAction'{..}+ = object+ (catMaybes+ [Just ("roleArn" .= _raRoleARN),+ Just ("topic" .= _raTopic)])++-- | Describes an action to write data to an Amazon S3 bucket.+--+-- /See:/ 's3Action' smart constructor.+data S3Action = S3Action'+ { _sRoleARN :: !Text+ , _sBucketName :: !Text+ , _sKey :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'S3Action' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'sRoleARN'+--+-- * 'sBucketName'+--+-- * 'sKey'+s3Action+ :: Text -- ^ 'sRoleARN'+ -> Text -- ^ 'sBucketName'+ -> Text -- ^ 'sKey'+ -> S3Action+s3Action pRoleARN_ pBucketName_ pKey_ =+ S3Action'+ { _sRoleARN = pRoleARN_+ , _sBucketName = pBucketName_+ , _sKey = pKey_+ }++-- | The ARN of the IAM role that grants access.+sRoleARN :: Lens' S3Action Text+sRoleARN = lens _sRoleARN (\ s a -> s{_sRoleARN = a});++-- | The S3 bucket.+sBucketName :: Lens' S3Action Text+sBucketName = lens _sBucketName (\ s a -> s{_sBucketName = a});++-- | The object key.+sKey :: Lens' S3Action Text+sKey = lens _sKey (\ s a -> s{_sKey = a});++instance FromJSON S3Action where+ parseJSON+ = withObject "S3Action"+ (\ x ->+ S3Action' <$>+ (x .: "roleArn") <*> (x .: "bucketName") <*>+ (x .: "key"))++instance ToJSON S3Action where+ toJSON S3Action'{..}+ = object+ (catMaybes+ [Just ("roleArn" .= _sRoleARN),+ Just ("bucketName" .= _sBucketName),+ Just ("key" .= _sKey)])++-- | Describes an action to publish to an Amazon SNS topic.+--+-- /See:/ 'snsAction' smart constructor.+data SNSAction = SNSAction'+ { _snsaTargetARN :: !Text+ , _snsaRoleARN :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'SNSAction' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'snsaTargetARN'+--+-- * 'snsaRoleARN'+snsAction+ :: Text -- ^ 'snsaTargetARN'+ -> Text -- ^ 'snsaRoleARN'+ -> SNSAction+snsAction pTargetARN_ pRoleARN_ =+ SNSAction'+ { _snsaTargetARN = pTargetARN_+ , _snsaRoleARN = pRoleARN_+ }++-- | The ARN of the SNS topic.+snsaTargetARN :: Lens' SNSAction Text+snsaTargetARN = lens _snsaTargetARN (\ s a -> s{_snsaTargetARN = a});++-- | The ARN of the IAM role that grants access.+snsaRoleARN :: Lens' SNSAction Text+snsaRoleARN = lens _snsaRoleARN (\ s a -> s{_snsaRoleARN = a});++instance FromJSON SNSAction where+ parseJSON+ = withObject "SNSAction"+ (\ x ->+ SNSAction' <$>+ (x .: "targetArn") <*> (x .: "roleArn"))++instance ToJSON SNSAction where+ toJSON SNSAction'{..}+ = object+ (catMaybes+ [Just ("targetArn" .= _snsaTargetARN),+ Just ("roleArn" .= _snsaRoleARN)])++-- | Describes an action to publish data to an SQS queue.+--+-- /See:/ 'sqsAction' smart constructor.+data SqsAction = SqsAction'+ { _saUseBase64 :: !(Maybe Bool)+ , _saRoleARN :: !Text+ , _saQueueURL :: !Text+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'SqsAction' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'saUseBase64'+--+-- * 'saRoleARN'+--+-- * 'saQueueURL'+sqsAction+ :: Text -- ^ 'saRoleARN'+ -> Text -- ^ 'saQueueURL'+ -> SqsAction+sqsAction pRoleARN_ pQueueURL_ =+ SqsAction'+ { _saUseBase64 = Nothing+ , _saRoleARN = pRoleARN_+ , _saQueueURL = pQueueURL_+ }++-- | Specifies whether to use Base64 encoding.+saUseBase64 :: Lens' SqsAction (Maybe Bool)+saUseBase64 = lens _saUseBase64 (\ s a -> s{_saUseBase64 = a});++-- | The ARN of the IAM role that grants access.+saRoleARN :: Lens' SqsAction Text+saRoleARN = lens _saRoleARN (\ s a -> s{_saRoleARN = a});++-- | The URL of the Amazon SQS queue.+saQueueURL :: Lens' SqsAction Text+saQueueURL = lens _saQueueURL (\ s a -> s{_saQueueURL = a});++instance FromJSON SqsAction where+ parseJSON+ = withObject "SqsAction"+ (\ x ->+ SqsAction' <$>+ (x .:? "useBase64") <*> (x .: "roleArn") <*>+ (x .: "queueUrl"))++instance ToJSON SqsAction where+ toJSON SqsAction'{..}+ = object+ (catMaybes+ [("useBase64" .=) <$> _saUseBase64,+ Just ("roleArn" .= _saRoleARN),+ Just ("queueUrl" .= _saQueueURL)])++-- | Describes a thing attribute.+--+-- /See:/ 'thingAttribute' smart constructor.+data ThingAttribute = ThingAttribute'+ { _taAttributes :: !(Maybe (Map Text Text))+ , _taThingName :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'ThingAttribute' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'taAttributes'+--+-- * 'taThingName'+thingAttribute+ :: ThingAttribute+thingAttribute =+ ThingAttribute'+ { _taAttributes = Nothing+ , _taThingName = Nothing+ }++-- | The attributes.+taAttributes :: Lens' ThingAttribute (HashMap Text Text)+taAttributes = lens _taAttributes (\ s a -> s{_taAttributes = a}) . _Default . _Map;++-- | The name of the thing.+taThingName :: Lens' ThingAttribute (Maybe Text)+taThingName = lens _taThingName (\ s a -> s{_taThingName = a});++instance FromJSON ThingAttribute where+ parseJSON+ = withObject "ThingAttribute"+ (\ x ->+ ThingAttribute' <$>+ (x .:? "attributes" .!= mempty) <*>+ (x .:? "thingName"))++-- | Describes a rule.+--+-- /See:/ 'topicRule' smart constructor.+data TopicRule = TopicRule'+ { _trCreatedAt :: !(Maybe POSIX)+ , _trActions :: !(Maybe [Action])+ , _trRuleDisabled :: !(Maybe Bool)+ , _trRuleName :: !(Maybe Text)+ , _trSql :: !(Maybe Text)+ , _trDescription :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'TopicRule' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'trCreatedAt'+--+-- * 'trActions'+--+-- * 'trRuleDisabled'+--+-- * 'trRuleName'+--+-- * 'trSql'+--+-- * 'trDescription'+topicRule+ :: TopicRule+topicRule =+ TopicRule'+ { _trCreatedAt = Nothing+ , _trActions = Nothing+ , _trRuleDisabled = Nothing+ , _trRuleName = Nothing+ , _trSql = Nothing+ , _trDescription = Nothing+ }++-- | The date and time the rule was created.+trCreatedAt :: Lens' TopicRule (Maybe UTCTime)+trCreatedAt = lens _trCreatedAt (\ s a -> s{_trCreatedAt = a}) . mapping _Time;++-- | The actions associated with the rule.+trActions :: Lens' TopicRule [Action]+trActions = lens _trActions (\ s a -> s{_trActions = a}) . _Default . _Coerce;++-- | Specifies whether the rule is disabled.+trRuleDisabled :: Lens' TopicRule (Maybe Bool)+trRuleDisabled = lens _trRuleDisabled (\ s a -> s{_trRuleDisabled = a});++-- | The name of the rule.+trRuleName :: Lens' TopicRule (Maybe Text)+trRuleName = lens _trRuleName (\ s a -> s{_trRuleName = a});++-- | The SQL statement used to query the topic. When using a SQL query with+-- multiple lines, be sure to escape the newline characters properly.+trSql :: Lens' TopicRule (Maybe Text)+trSql = lens _trSql (\ s a -> s{_trSql = a});++-- | The description of the rule.+trDescription :: Lens' TopicRule (Maybe Text)+trDescription = lens _trDescription (\ s a -> s{_trDescription = a});++instance FromJSON TopicRule where+ parseJSON+ = withObject "TopicRule"+ (\ x ->+ TopicRule' <$>+ (x .:? "createdAt") <*> (x .:? "actions" .!= mempty)+ <*> (x .:? "ruleDisabled")+ <*> (x .:? "ruleName")+ <*> (x .:? "sql")+ <*> (x .:? "description"))++-- | Describes a rule.+--+-- /See:/ 'topicRuleListItem' smart constructor.+data TopicRuleListItem = TopicRuleListItem'+ { _trliCreatedAt :: !(Maybe POSIX)+ , _trliRuleDisabled :: !(Maybe Bool)+ , _trliRuleName :: !(Maybe Text)+ , _trliTopicPattern :: !(Maybe Text)+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'TopicRuleListItem' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'trliCreatedAt'+--+-- * 'trliRuleDisabled'+--+-- * 'trliRuleName'+--+-- * 'trliTopicPattern'+topicRuleListItem+ :: TopicRuleListItem+topicRuleListItem =+ TopicRuleListItem'+ { _trliCreatedAt = Nothing+ , _trliRuleDisabled = Nothing+ , _trliRuleName = Nothing+ , _trliTopicPattern = Nothing+ }++-- | The date and time the rule was created.+trliCreatedAt :: Lens' TopicRuleListItem (Maybe UTCTime)+trliCreatedAt = lens _trliCreatedAt (\ s a -> s{_trliCreatedAt = a}) . mapping _Time;++-- | Specifies whether the rule is disabled.+trliRuleDisabled :: Lens' TopicRuleListItem (Maybe Bool)+trliRuleDisabled = lens _trliRuleDisabled (\ s a -> s{_trliRuleDisabled = a});++-- | The name of the rule.+trliRuleName :: Lens' TopicRuleListItem (Maybe Text)+trliRuleName = lens _trliRuleName (\ s a -> s{_trliRuleName = a});++-- | The pattern for the topic names that apply.+trliTopicPattern :: Lens' TopicRuleListItem (Maybe Text)+trliTopicPattern = lens _trliTopicPattern (\ s a -> s{_trliTopicPattern = a});++instance FromJSON TopicRuleListItem where+ parseJSON+ = withObject "TopicRuleListItem"+ (\ x ->+ TopicRuleListItem' <$>+ (x .:? "createdAt") <*> (x .:? "ruleDisabled") <*>+ (x .:? "ruleName")+ <*> (x .:? "topicPattern"))++-- | Describes a rule.+--+-- /See:/ 'topicRulePayload' smart constructor.+data TopicRulePayload = TopicRulePayload'+ { _trpRuleDisabled :: !(Maybe Bool)+ , _trpDescription :: !(Maybe Text)+ , _trpSql :: !Text+ , _trpActions :: ![Action]+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'TopicRulePayload' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'trpRuleDisabled'+--+-- * 'trpDescription'+--+-- * 'trpSql'+--+-- * 'trpActions'+topicRulePayload+ :: Text -- ^ 'trpSql'+ -> TopicRulePayload+topicRulePayload pSql_ =+ TopicRulePayload'+ { _trpRuleDisabled = Nothing+ , _trpDescription = Nothing+ , _trpSql = pSql_+ , _trpActions = mempty+ }++-- | Specifies whether the rule is disabled.+trpRuleDisabled :: Lens' TopicRulePayload (Maybe Bool)+trpRuleDisabled = lens _trpRuleDisabled (\ s a -> s{_trpRuleDisabled = a});++-- | The description of the rule.+trpDescription :: Lens' TopicRulePayload (Maybe Text)+trpDescription = lens _trpDescription (\ s a -> s{_trpDescription = a});++-- | The SQL statement used to query the topic. For more information, see+-- <http://docs.aws.amazon.com/iot/latest/developerguide/iot-rules.html#aws-iot-sql-reference AWS IoT SQL Reference>+-- in the /AWS IoT Developer Guide/.+trpSql :: Lens' TopicRulePayload Text+trpSql = lens _trpSql (\ s a -> s{_trpSql = a});++-- | The actions associated with the rule.+trpActions :: Lens' TopicRulePayload [Action]+trpActions = lens _trpActions (\ s a -> s{_trpActions = a}) . _Coerce;++instance ToJSON TopicRulePayload where+ toJSON TopicRulePayload'{..}+ = object+ (catMaybes+ [("ruleDisabled" .=) <$> _trpRuleDisabled,+ ("description" .=) <$> _trpDescription,+ Just ("sql" .= _trpSql),+ Just ("actions" .= _trpActions)])
+ gen/Network/AWS/IoT/Types/Sum.hs view
@@ -0,0 +1,91 @@+{-# 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.IoT.Types.Sum+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.IoT.Types.Sum where++import Network.AWS.Prelude++data CertificateStatus+ = Active+ | Inactive+ | PendingTransfer+ | Revoked+ deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)++instance FromText CertificateStatus where+ parser = takeLowerText >>= \case+ "active" -> pure Active+ "inactive" -> pure Inactive+ "pending_transfer" -> pure PendingTransfer+ "revoked" -> pure Revoked+ e -> fromTextError $ "Failure parsing CertificateStatus from value: '" <> e+ <> "'. Accepted values: ACTIVE, INACTIVE, PENDING_TRANSFER, REVOKED"++instance ToText CertificateStatus where+ toText = \case+ Active -> "ACTIVE"+ Inactive -> "INACTIVE"+ PendingTransfer -> "PENDING_TRANSFER"+ Revoked -> "REVOKED"++instance Hashable CertificateStatus+instance ToByteString CertificateStatus+instance ToQuery CertificateStatus+instance ToHeader CertificateStatus++instance ToJSON CertificateStatus where+ toJSON = toJSONText++instance FromJSON CertificateStatus where+ parseJSON = parseJSONText "CertificateStatus"++data LogLevel+ = Debug+ | Disabled+ | Error'+ | Info+ | Warn+ deriving (Eq,Ord,Read,Show,Enum,Data,Typeable,Generic)++instance FromText LogLevel where+ parser = takeLowerText >>= \case+ "debug" -> pure Debug+ "disabled" -> pure Disabled+ "error" -> pure Error'+ "info" -> pure Info+ "warn" -> pure Warn+ e -> fromTextError $ "Failure parsing LogLevel from value: '" <> e+ <> "'. Accepted values: DEBUG, DISABLED, ERROR, INFO, WARN"++instance ToText LogLevel where+ toText = \case+ Debug -> "DEBUG"+ Disabled -> "DISABLED"+ Error' -> "ERROR"+ Info -> "INFO"+ Warn -> "WARN"++instance Hashable LogLevel+instance ToByteString LogLevel+instance ToQuery LogLevel+instance ToHeader LogLevel++instance ToJSON LogLevel where+ toJSON = toJSONText++instance FromJSON LogLevel where+ parseJSON = parseJSONText "LogLevel"
+ gen/Network/AWS/IoT/UpdateCertificate.hs view
@@ -0,0 +1,113 @@+{-# 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.IoT.UpdateCertificate+-- Copyright : (c) 2013-2015 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)+--+-- Updates the status of the specified certificate. This operation is+-- idempotent.+--+-- Moving a cert from the ACTIVE state (including REVOKED) will NOT+-- disconnect currently-connected devices, although these devices will be+-- unable to reconnect.+--+-- The ACTIVE state is required to authenticate devices connecting to AWS+-- IoT using a certificate.+--+-- /See:/ <https://aws.amazon.com/iot#UpdateCertificate.html AWS API Reference> for UpdateCertificate.+module Network.AWS.IoT.UpdateCertificate+ (+ -- * Creating a Request+ updateCertificate+ , UpdateCertificate+ -- * Request Lenses+ , ucCertificateId+ , ucNewStatus++ -- * Destructuring the Response+ , updateCertificateResponse+ , UpdateCertificateResponse+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the UpdateCertificate operation.+--+-- /See:/ 'updateCertificate' smart constructor.+data UpdateCertificate = UpdateCertificate'+ { _ucCertificateId :: !Text+ , _ucNewStatus :: !CertificateStatus+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'UpdateCertificate' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ucCertificateId'+--+-- * 'ucNewStatus'+updateCertificate+ :: Text -- ^ 'ucCertificateId'+ -> CertificateStatus -- ^ 'ucNewStatus'+ -> UpdateCertificate+updateCertificate pCertificateId_ pNewStatus_ =+ UpdateCertificate'+ { _ucCertificateId = pCertificateId_+ , _ucNewStatus = pNewStatus_+ }++-- | The ID of the certificate.+ucCertificateId :: Lens' UpdateCertificate Text+ucCertificateId = lens _ucCertificateId (\ s a -> s{_ucCertificateId = a});++-- | The new status.+ucNewStatus :: Lens' UpdateCertificate CertificateStatus+ucNewStatus = lens _ucNewStatus (\ s a -> s{_ucNewStatus = a});++instance AWSRequest UpdateCertificate where+ type Rs UpdateCertificate = UpdateCertificateResponse+ request = putJSON ioT+ response = receiveNull UpdateCertificateResponse'++instance ToHeaders UpdateCertificate where+ toHeaders = const mempty++instance ToJSON UpdateCertificate where+ toJSON = const (Object mempty)++instance ToPath UpdateCertificate where+ toPath UpdateCertificate'{..}+ = mconcat ["/certificates/", toBS _ucCertificateId]++instance ToQuery UpdateCertificate where+ toQuery UpdateCertificate'{..}+ = mconcat ["newStatus" =: _ucNewStatus]++-- | /See:/ 'updateCertificateResponse' smart constructor.+data UpdateCertificateResponse =+ UpdateCertificateResponse'+ deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'UpdateCertificateResponse' with the minimum fields required to make a request.+--+updateCertificateResponse+ :: UpdateCertificateResponse+updateCertificateResponse = UpdateCertificateResponse'
+ gen/Network/AWS/IoT/UpdateThing.hs view
@@ -0,0 +1,128 @@+{-# 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.IoT.UpdateThing+-- Copyright : (c) 2013-2015 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)+--+-- Updates the data for a thing.+--+-- /See:/ <https://aws.amazon.com/iot#UpdateThing.html AWS API Reference> for UpdateThing.+module Network.AWS.IoT.UpdateThing+ (+ -- * Creating a Request+ updateThing+ , UpdateThing+ -- * Request Lenses+ , utThingName+ , utAttributePayload++ -- * Destructuring the Response+ , updateThingResponse+ , UpdateThingResponse+ -- * Response Lenses+ , utrsResponseStatus+ ) where++import Network.AWS.IoT.Types+import Network.AWS.IoT.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | The input for the UpdateThing operation.+--+-- /See:/ 'updateThing' smart constructor.+data UpdateThing = UpdateThing'+ { _utThingName :: !Text+ , _utAttributePayload :: !AttributePayload+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'UpdateThing' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'utThingName'+--+-- * 'utAttributePayload'+updateThing+ :: Text -- ^ 'utThingName'+ -> AttributePayload -- ^ 'utAttributePayload'+ -> UpdateThing+updateThing pThingName_ pAttributePayload_ =+ UpdateThing'+ { _utThingName = pThingName_+ , _utAttributePayload = pAttributePayload_+ }++-- | The thing name.+utThingName :: Lens' UpdateThing Text+utThingName = lens _utThingName (\ s a -> s{_utThingName = a});++-- | The attribute payload, a JSON string containing up to three key-value+-- pairs.+--+-- For example: {\\\"attributes\\\":{\\\"string1\\\":\\\"string2\\”}}+utAttributePayload :: Lens' UpdateThing AttributePayload+utAttributePayload = lens _utAttributePayload (\ s a -> s{_utAttributePayload = a});++instance AWSRequest UpdateThing where+ type Rs UpdateThing = UpdateThingResponse+ request = patchJSON ioT+ response+ = receiveEmpty+ (\ s h x ->+ UpdateThingResponse' <$> (pure (fromEnum s)))++instance ToHeaders UpdateThing where+ toHeaders = const mempty++instance ToJSON UpdateThing where+ toJSON UpdateThing'{..}+ = object+ (catMaybes+ [Just ("attributePayload" .= _utAttributePayload)])++instance ToPath UpdateThing where+ toPath UpdateThing'{..}+ = mconcat ["/things/", toBS _utThingName]++instance ToQuery UpdateThing where+ toQuery = const mempty++-- | The output from the UpdateThing operation.+--+-- /See:/ 'updateThingResponse' smart constructor.+newtype UpdateThingResponse = UpdateThingResponse'+ { _utrsResponseStatus :: Int+ } deriving (Eq,Read,Show,Data,Typeable,Generic)++-- | Creates a value of 'UpdateThingResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'utrsResponseStatus'+updateThingResponse+ :: Int -- ^ 'utrsResponseStatus'+ -> UpdateThingResponse+updateThingResponse pResponseStatus_ =+ UpdateThingResponse'+ { _utrsResponseStatus = pResponseStatus_+ }++-- | The response status code.+utrsResponseStatus :: Lens' UpdateThingResponse Int+utrsResponseStatus = lens _utrsResponseStatus (\ s a -> s{_utrsResponseStatus = a});
+ gen/Network/AWS/IoT/Waiters.hs view
@@ -0,0 +1,20 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.IoT.Waiters+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.IoT.Waiters where++import Network.AWS.IoT.Types+import Network.AWS.Prelude+import Network.AWS.Waiter
+ test/Main.hs view
@@ -0,0 +1,21 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Main+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Main (main) where++import Test.Tasty+import Test.AWS.IoT+import Test.AWS.IoT.Internal++main :: IO ()+main = defaultMain $ testGroup "IoT"+ [ testGroup "tests" tests+ , testGroup "fixtures" fixtures+ ]
+ test/Test/AWS/Gen/IoT.hs view
@@ -0,0 +1,741 @@+{-# 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.IoT+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.Gen.IoT where++import Data.Proxy+import Test.AWS.Fixture+import Test.AWS.Prelude+import Test.Tasty+import Network.AWS.IoT+import Test.AWS.IoT.Internal++-- Auto-generated: the actual test selection needs to be manually placed into+-- the top-level so that real test data can be incrementally added.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+-- [ testGroup "request"+-- [ testListPolicies $+-- listPolicies+--+-- , testCreatePolicy $+-- createPolicy+--+-- , testListThingPrincipals $+-- listThingPrincipals+--+-- , testListPrincipalThings $+-- listPrincipalThings+--+-- , testGetLoggingOptions $+-- getLoggingOptions+--+-- , testCreateCertificateFromCsr $+-- createCertificateFromCsr+--+-- , testDeleteThing $+-- deleteThing+--+-- , testUpdateThing $+-- updateThing+--+-- , testCancelCertificateTransfer $+-- cancelCertificateTransfer+--+-- , testDeletePolicyVersion $+-- deletePolicyVersion+--+-- , testCreateTopicRule $+-- createTopicRule+--+-- , testCreatePolicyVersion $+-- createPolicyVersion+--+-- , testDeleteTopicRule $+-- deleteTopicRule+--+-- , testListPrincipalPolicies $+-- listPrincipalPolicies+--+-- , testListTopicRules $+-- listTopicRules+--+-- , testTransferCertificate $+-- transferCertificate+--+-- , testGetTopicRule $+-- getTopicRule+--+-- , testDescribeThing $+-- describeThing+--+-- , testDeletePolicy $+-- deletePolicy+--+-- , testListCertificates $+-- listCertificates+--+-- , testGetPolicyVersion $+-- getPolicyVersion+--+-- , testDeleteCertificate $+-- deleteCertificate+--+-- , testUpdateCertificate $+-- updateCertificate+--+-- , testAttachThingPrincipal $+-- attachThingPrincipal+--+-- , testListThings $+-- listThings+--+-- , testDetachPrincipalPolicy $+-- detachPrincipalPolicy+--+-- , testCreateThing $+-- createThing+--+-- , testDescribeCertificate $+-- describeCertificate+--+-- , testReplaceTopicRule $+-- replaceTopicRule+--+-- , testSetDefaultPolicyVersion $+-- setDefaultPolicyVersion+--+-- , testListPolicyVersions $+-- listPolicyVersions+--+-- , testCreateKeysAndCertificate $+-- createKeysAndCertificate+--+-- , testAcceptCertificateTransfer $+-- acceptCertificateTransfer+--+-- , testGetPolicy $+-- getPolicy+--+-- , testDescribeEndpoint $+-- describeEndpoint+--+-- , testSetLoggingOptions $+-- setLoggingOptions+--+-- , testAttachPrincipalPolicy $+-- attachPrincipalPolicy+--+-- , testRejectCertificateTransfer $+-- rejectCertificateTransfer+--+-- , testDetachThingPrincipal $+-- detachThingPrincipal+--+-- ]++-- , testGroup "response"+-- [ testListPoliciesResponse $+-- listPoliciesResponse+--+-- , testCreatePolicyResponse $+-- createPolicyResponse+--+-- , testListThingPrincipalsResponse $+-- listThingPrincipalsResponse+--+-- , testListPrincipalThingsResponse $+-- listPrincipalThingsResponse+--+-- , testGetLoggingOptionsResponse $+-- getLoggingOptionsResponse+--+-- , testCreateCertificateFromCsrResponse $+-- createCertificateFromCsrResponse+--+-- , testDeleteThingResponse $+-- deleteThingResponse+--+-- , testUpdateThingResponse $+-- updateThingResponse+--+-- , testCancelCertificateTransferResponse $+-- cancelCertificateTransferResponse+--+-- , testDeletePolicyVersionResponse $+-- deletePolicyVersionResponse+--+-- , testCreateTopicRuleResponse $+-- createTopicRuleResponse+--+-- , testCreatePolicyVersionResponse $+-- createPolicyVersionResponse+--+-- , testDeleteTopicRuleResponse $+-- deleteTopicRuleResponse+--+-- , testListPrincipalPoliciesResponse $+-- listPrincipalPoliciesResponse+--+-- , testListTopicRulesResponse $+-- listTopicRulesResponse+--+-- , testTransferCertificateResponse $+-- transferCertificateResponse+--+-- , testGetTopicRuleResponse $+-- getTopicRuleResponse+--+-- , testDescribeThingResponse $+-- describeThingResponse+--+-- , testDeletePolicyResponse $+-- deletePolicyResponse+--+-- , testListCertificatesResponse $+-- listCertificatesResponse+--+-- , testGetPolicyVersionResponse $+-- getPolicyVersionResponse+--+-- , testDeleteCertificateResponse $+-- deleteCertificateResponse+--+-- , testUpdateCertificateResponse $+-- updateCertificateResponse+--+-- , testAttachThingPrincipalResponse $+-- attachThingPrincipalResponse+--+-- , testListThingsResponse $+-- listThingsResponse+--+-- , testDetachPrincipalPolicyResponse $+-- detachPrincipalPolicyResponse+--+-- , testCreateThingResponse $+-- createThingResponse+--+-- , testDescribeCertificateResponse $+-- describeCertificateResponse+--+-- , testReplaceTopicRuleResponse $+-- replaceTopicRuleResponse+--+-- , testSetDefaultPolicyVersionResponse $+-- setDefaultPolicyVersionResponse+--+-- , testListPolicyVersionsResponse $+-- listPolicyVersionsResponse+--+-- , testCreateKeysAndCertificateResponse $+-- createKeysAndCertificateResponse+--+-- , testAcceptCertificateTransferResponse $+-- acceptCertificateTransferResponse+--+-- , testGetPolicyResponse $+-- getPolicyResponse+--+-- , testDescribeEndpointResponse $+-- describeEndpointResponse+--+-- , testSetLoggingOptionsResponse $+-- setLoggingOptionsResponse+--+-- , testAttachPrincipalPolicyResponse $+-- attachPrincipalPolicyResponse+--+-- , testRejectCertificateTransferResponse $+-- rejectCertificateTransferResponse+--+-- , testDetachThingPrincipalResponse $+-- detachThingPrincipalResponse+--+-- ]+-- ]++-- Requests++testListPolicies :: ListPolicies -> TestTree+testListPolicies = req+ "ListPolicies"+ "fixture/ListPolicies.yaml"++testCreatePolicy :: CreatePolicy -> TestTree+testCreatePolicy = req+ "CreatePolicy"+ "fixture/CreatePolicy.yaml"++testListThingPrincipals :: ListThingPrincipals -> TestTree+testListThingPrincipals = req+ "ListThingPrincipals"+ "fixture/ListThingPrincipals.yaml"++testListPrincipalThings :: ListPrincipalThings -> TestTree+testListPrincipalThings = req+ "ListPrincipalThings"+ "fixture/ListPrincipalThings.yaml"++testGetLoggingOptions :: GetLoggingOptions -> TestTree+testGetLoggingOptions = req+ "GetLoggingOptions"+ "fixture/GetLoggingOptions.yaml"++testCreateCertificateFromCsr :: CreateCertificateFromCsr -> TestTree+testCreateCertificateFromCsr = req+ "CreateCertificateFromCsr"+ "fixture/CreateCertificateFromCsr.yaml"++testDeleteThing :: DeleteThing -> TestTree+testDeleteThing = req+ "DeleteThing"+ "fixture/DeleteThing.yaml"++testUpdateThing :: UpdateThing -> TestTree+testUpdateThing = req+ "UpdateThing"+ "fixture/UpdateThing.yaml"++testCancelCertificateTransfer :: CancelCertificateTransfer -> TestTree+testCancelCertificateTransfer = req+ "CancelCertificateTransfer"+ "fixture/CancelCertificateTransfer.yaml"++testDeletePolicyVersion :: DeletePolicyVersion -> TestTree+testDeletePolicyVersion = req+ "DeletePolicyVersion"+ "fixture/DeletePolicyVersion.yaml"++testCreateTopicRule :: CreateTopicRule -> TestTree+testCreateTopicRule = req+ "CreateTopicRule"+ "fixture/CreateTopicRule.yaml"++testCreatePolicyVersion :: CreatePolicyVersion -> TestTree+testCreatePolicyVersion = req+ "CreatePolicyVersion"+ "fixture/CreatePolicyVersion.yaml"++testDeleteTopicRule :: DeleteTopicRule -> TestTree+testDeleteTopicRule = req+ "DeleteTopicRule"+ "fixture/DeleteTopicRule.yaml"++testListPrincipalPolicies :: ListPrincipalPolicies -> TestTree+testListPrincipalPolicies = req+ "ListPrincipalPolicies"+ "fixture/ListPrincipalPolicies.yaml"++testListTopicRules :: ListTopicRules -> TestTree+testListTopicRules = req+ "ListTopicRules"+ "fixture/ListTopicRules.yaml"++testTransferCertificate :: TransferCertificate -> TestTree+testTransferCertificate = req+ "TransferCertificate"+ "fixture/TransferCertificate.yaml"++testGetTopicRule :: GetTopicRule -> TestTree+testGetTopicRule = req+ "GetTopicRule"+ "fixture/GetTopicRule.yaml"++testDescribeThing :: DescribeThing -> TestTree+testDescribeThing = req+ "DescribeThing"+ "fixture/DescribeThing.yaml"++testDeletePolicy :: DeletePolicy -> TestTree+testDeletePolicy = req+ "DeletePolicy"+ "fixture/DeletePolicy.yaml"++testListCertificates :: ListCertificates -> TestTree+testListCertificates = req+ "ListCertificates"+ "fixture/ListCertificates.yaml"++testGetPolicyVersion :: GetPolicyVersion -> TestTree+testGetPolicyVersion = req+ "GetPolicyVersion"+ "fixture/GetPolicyVersion.yaml"++testDeleteCertificate :: DeleteCertificate -> TestTree+testDeleteCertificate = req+ "DeleteCertificate"+ "fixture/DeleteCertificate.yaml"++testUpdateCertificate :: UpdateCertificate -> TestTree+testUpdateCertificate = req+ "UpdateCertificate"+ "fixture/UpdateCertificate.yaml"++testAttachThingPrincipal :: AttachThingPrincipal -> TestTree+testAttachThingPrincipal = req+ "AttachThingPrincipal"+ "fixture/AttachThingPrincipal.yaml"++testListThings :: ListThings -> TestTree+testListThings = req+ "ListThings"+ "fixture/ListThings.yaml"++testDetachPrincipalPolicy :: DetachPrincipalPolicy -> TestTree+testDetachPrincipalPolicy = req+ "DetachPrincipalPolicy"+ "fixture/DetachPrincipalPolicy.yaml"++testCreateThing :: CreateThing -> TestTree+testCreateThing = req+ "CreateThing"+ "fixture/CreateThing.yaml"++testDescribeCertificate :: DescribeCertificate -> TestTree+testDescribeCertificate = req+ "DescribeCertificate"+ "fixture/DescribeCertificate.yaml"++testReplaceTopicRule :: ReplaceTopicRule -> TestTree+testReplaceTopicRule = req+ "ReplaceTopicRule"+ "fixture/ReplaceTopicRule.yaml"++testSetDefaultPolicyVersion :: SetDefaultPolicyVersion -> TestTree+testSetDefaultPolicyVersion = req+ "SetDefaultPolicyVersion"+ "fixture/SetDefaultPolicyVersion.yaml"++testListPolicyVersions :: ListPolicyVersions -> TestTree+testListPolicyVersions = req+ "ListPolicyVersions"+ "fixture/ListPolicyVersions.yaml"++testCreateKeysAndCertificate :: CreateKeysAndCertificate -> TestTree+testCreateKeysAndCertificate = req+ "CreateKeysAndCertificate"+ "fixture/CreateKeysAndCertificate.yaml"++testAcceptCertificateTransfer :: AcceptCertificateTransfer -> TestTree+testAcceptCertificateTransfer = req+ "AcceptCertificateTransfer"+ "fixture/AcceptCertificateTransfer.yaml"++testGetPolicy :: GetPolicy -> TestTree+testGetPolicy = req+ "GetPolicy"+ "fixture/GetPolicy.yaml"++testDescribeEndpoint :: DescribeEndpoint -> TestTree+testDescribeEndpoint = req+ "DescribeEndpoint"+ "fixture/DescribeEndpoint.yaml"++testSetLoggingOptions :: SetLoggingOptions -> TestTree+testSetLoggingOptions = req+ "SetLoggingOptions"+ "fixture/SetLoggingOptions.yaml"++testAttachPrincipalPolicy :: AttachPrincipalPolicy -> TestTree+testAttachPrincipalPolicy = req+ "AttachPrincipalPolicy"+ "fixture/AttachPrincipalPolicy.yaml"++testRejectCertificateTransfer :: RejectCertificateTransfer -> TestTree+testRejectCertificateTransfer = req+ "RejectCertificateTransfer"+ "fixture/RejectCertificateTransfer.yaml"++testDetachThingPrincipal :: DetachThingPrincipal -> TestTree+testDetachThingPrincipal = req+ "DetachThingPrincipal"+ "fixture/DetachThingPrincipal.yaml"++-- Responses++testListPoliciesResponse :: ListPoliciesResponse -> TestTree+testListPoliciesResponse = res+ "ListPoliciesResponse"+ "fixture/ListPoliciesResponse.proto"+ ioT+ (Proxy :: Proxy ListPolicies)++testCreatePolicyResponse :: CreatePolicyResponse -> TestTree+testCreatePolicyResponse = res+ "CreatePolicyResponse"+ "fixture/CreatePolicyResponse.proto"+ ioT+ (Proxy :: Proxy CreatePolicy)++testListThingPrincipalsResponse :: ListThingPrincipalsResponse -> TestTree+testListThingPrincipalsResponse = res+ "ListThingPrincipalsResponse"+ "fixture/ListThingPrincipalsResponse.proto"+ ioT+ (Proxy :: Proxy ListThingPrincipals)++testListPrincipalThingsResponse :: ListPrincipalThingsResponse -> TestTree+testListPrincipalThingsResponse = res+ "ListPrincipalThingsResponse"+ "fixture/ListPrincipalThingsResponse.proto"+ ioT+ (Proxy :: Proxy ListPrincipalThings)++testGetLoggingOptionsResponse :: GetLoggingOptionsResponse -> TestTree+testGetLoggingOptionsResponse = res+ "GetLoggingOptionsResponse"+ "fixture/GetLoggingOptionsResponse.proto"+ ioT+ (Proxy :: Proxy GetLoggingOptions)++testCreateCertificateFromCsrResponse :: CreateCertificateFromCsrResponse -> TestTree+testCreateCertificateFromCsrResponse = res+ "CreateCertificateFromCsrResponse"+ "fixture/CreateCertificateFromCsrResponse.proto"+ ioT+ (Proxy :: Proxy CreateCertificateFromCsr)++testDeleteThingResponse :: DeleteThingResponse -> TestTree+testDeleteThingResponse = res+ "DeleteThingResponse"+ "fixture/DeleteThingResponse.proto"+ ioT+ (Proxy :: Proxy DeleteThing)++testUpdateThingResponse :: UpdateThingResponse -> TestTree+testUpdateThingResponse = res+ "UpdateThingResponse"+ "fixture/UpdateThingResponse.proto"+ ioT+ (Proxy :: Proxy UpdateThing)++testCancelCertificateTransferResponse :: CancelCertificateTransferResponse -> TestTree+testCancelCertificateTransferResponse = res+ "CancelCertificateTransferResponse"+ "fixture/CancelCertificateTransferResponse.proto"+ ioT+ (Proxy :: Proxy CancelCertificateTransfer)++testDeletePolicyVersionResponse :: DeletePolicyVersionResponse -> TestTree+testDeletePolicyVersionResponse = res+ "DeletePolicyVersionResponse"+ "fixture/DeletePolicyVersionResponse.proto"+ ioT+ (Proxy :: Proxy DeletePolicyVersion)++testCreateTopicRuleResponse :: CreateTopicRuleResponse -> TestTree+testCreateTopicRuleResponse = res+ "CreateTopicRuleResponse"+ "fixture/CreateTopicRuleResponse.proto"+ ioT+ (Proxy :: Proxy CreateTopicRule)++testCreatePolicyVersionResponse :: CreatePolicyVersionResponse -> TestTree+testCreatePolicyVersionResponse = res+ "CreatePolicyVersionResponse"+ "fixture/CreatePolicyVersionResponse.proto"+ ioT+ (Proxy :: Proxy CreatePolicyVersion)++testDeleteTopicRuleResponse :: DeleteTopicRuleResponse -> TestTree+testDeleteTopicRuleResponse = res+ "DeleteTopicRuleResponse"+ "fixture/DeleteTopicRuleResponse.proto"+ ioT+ (Proxy :: Proxy DeleteTopicRule)++testListPrincipalPoliciesResponse :: ListPrincipalPoliciesResponse -> TestTree+testListPrincipalPoliciesResponse = res+ "ListPrincipalPoliciesResponse"+ "fixture/ListPrincipalPoliciesResponse.proto"+ ioT+ (Proxy :: Proxy ListPrincipalPolicies)++testListTopicRulesResponse :: ListTopicRulesResponse -> TestTree+testListTopicRulesResponse = res+ "ListTopicRulesResponse"+ "fixture/ListTopicRulesResponse.proto"+ ioT+ (Proxy :: Proxy ListTopicRules)++testTransferCertificateResponse :: TransferCertificateResponse -> TestTree+testTransferCertificateResponse = res+ "TransferCertificateResponse"+ "fixture/TransferCertificateResponse.proto"+ ioT+ (Proxy :: Proxy TransferCertificate)++testGetTopicRuleResponse :: GetTopicRuleResponse -> TestTree+testGetTopicRuleResponse = res+ "GetTopicRuleResponse"+ "fixture/GetTopicRuleResponse.proto"+ ioT+ (Proxy :: Proxy GetTopicRule)++testDescribeThingResponse :: DescribeThingResponse -> TestTree+testDescribeThingResponse = res+ "DescribeThingResponse"+ "fixture/DescribeThingResponse.proto"+ ioT+ (Proxy :: Proxy DescribeThing)++testDeletePolicyResponse :: DeletePolicyResponse -> TestTree+testDeletePolicyResponse = res+ "DeletePolicyResponse"+ "fixture/DeletePolicyResponse.proto"+ ioT+ (Proxy :: Proxy DeletePolicy)++testListCertificatesResponse :: ListCertificatesResponse -> TestTree+testListCertificatesResponse = res+ "ListCertificatesResponse"+ "fixture/ListCertificatesResponse.proto"+ ioT+ (Proxy :: Proxy ListCertificates)++testGetPolicyVersionResponse :: GetPolicyVersionResponse -> TestTree+testGetPolicyVersionResponse = res+ "GetPolicyVersionResponse"+ "fixture/GetPolicyVersionResponse.proto"+ ioT+ (Proxy :: Proxy GetPolicyVersion)++testDeleteCertificateResponse :: DeleteCertificateResponse -> TestTree+testDeleteCertificateResponse = res+ "DeleteCertificateResponse"+ "fixture/DeleteCertificateResponse.proto"+ ioT+ (Proxy :: Proxy DeleteCertificate)++testUpdateCertificateResponse :: UpdateCertificateResponse -> TestTree+testUpdateCertificateResponse = res+ "UpdateCertificateResponse"+ "fixture/UpdateCertificateResponse.proto"+ ioT+ (Proxy :: Proxy UpdateCertificate)++testAttachThingPrincipalResponse :: AttachThingPrincipalResponse -> TestTree+testAttachThingPrincipalResponse = res+ "AttachThingPrincipalResponse"+ "fixture/AttachThingPrincipalResponse.proto"+ ioT+ (Proxy :: Proxy AttachThingPrincipal)++testListThingsResponse :: ListThingsResponse -> TestTree+testListThingsResponse = res+ "ListThingsResponse"+ "fixture/ListThingsResponse.proto"+ ioT+ (Proxy :: Proxy ListThings)++testDetachPrincipalPolicyResponse :: DetachPrincipalPolicyResponse -> TestTree+testDetachPrincipalPolicyResponse = res+ "DetachPrincipalPolicyResponse"+ "fixture/DetachPrincipalPolicyResponse.proto"+ ioT+ (Proxy :: Proxy DetachPrincipalPolicy)++testCreateThingResponse :: CreateThingResponse -> TestTree+testCreateThingResponse = res+ "CreateThingResponse"+ "fixture/CreateThingResponse.proto"+ ioT+ (Proxy :: Proxy CreateThing)++testDescribeCertificateResponse :: DescribeCertificateResponse -> TestTree+testDescribeCertificateResponse = res+ "DescribeCertificateResponse"+ "fixture/DescribeCertificateResponse.proto"+ ioT+ (Proxy :: Proxy DescribeCertificate)++testReplaceTopicRuleResponse :: ReplaceTopicRuleResponse -> TestTree+testReplaceTopicRuleResponse = res+ "ReplaceTopicRuleResponse"+ "fixture/ReplaceTopicRuleResponse.proto"+ ioT+ (Proxy :: Proxy ReplaceTopicRule)++testSetDefaultPolicyVersionResponse :: SetDefaultPolicyVersionResponse -> TestTree+testSetDefaultPolicyVersionResponse = res+ "SetDefaultPolicyVersionResponse"+ "fixture/SetDefaultPolicyVersionResponse.proto"+ ioT+ (Proxy :: Proxy SetDefaultPolicyVersion)++testListPolicyVersionsResponse :: ListPolicyVersionsResponse -> TestTree+testListPolicyVersionsResponse = res+ "ListPolicyVersionsResponse"+ "fixture/ListPolicyVersionsResponse.proto"+ ioT+ (Proxy :: Proxy ListPolicyVersions)++testCreateKeysAndCertificateResponse :: CreateKeysAndCertificateResponse -> TestTree+testCreateKeysAndCertificateResponse = res+ "CreateKeysAndCertificateResponse"+ "fixture/CreateKeysAndCertificateResponse.proto"+ ioT+ (Proxy :: Proxy CreateKeysAndCertificate)++testAcceptCertificateTransferResponse :: AcceptCertificateTransferResponse -> TestTree+testAcceptCertificateTransferResponse = res+ "AcceptCertificateTransferResponse"+ "fixture/AcceptCertificateTransferResponse.proto"+ ioT+ (Proxy :: Proxy AcceptCertificateTransfer)++testGetPolicyResponse :: GetPolicyResponse -> TestTree+testGetPolicyResponse = res+ "GetPolicyResponse"+ "fixture/GetPolicyResponse.proto"+ ioT+ (Proxy :: Proxy GetPolicy)++testDescribeEndpointResponse :: DescribeEndpointResponse -> TestTree+testDescribeEndpointResponse = res+ "DescribeEndpointResponse"+ "fixture/DescribeEndpointResponse.proto"+ ioT+ (Proxy :: Proxy DescribeEndpoint)++testSetLoggingOptionsResponse :: SetLoggingOptionsResponse -> TestTree+testSetLoggingOptionsResponse = res+ "SetLoggingOptionsResponse"+ "fixture/SetLoggingOptionsResponse.proto"+ ioT+ (Proxy :: Proxy SetLoggingOptions)++testAttachPrincipalPolicyResponse :: AttachPrincipalPolicyResponse -> TestTree+testAttachPrincipalPolicyResponse = res+ "AttachPrincipalPolicyResponse"+ "fixture/AttachPrincipalPolicyResponse.proto"+ ioT+ (Proxy :: Proxy AttachPrincipalPolicy)++testRejectCertificateTransferResponse :: RejectCertificateTransferResponse -> TestTree+testRejectCertificateTransferResponse = res+ "RejectCertificateTransferResponse"+ "fixture/RejectCertificateTransferResponse.proto"+ ioT+ (Proxy :: Proxy RejectCertificateTransfer)++testDetachThingPrincipalResponse :: DetachThingPrincipalResponse -> TestTree+testDetachThingPrincipalResponse = res+ "DetachThingPrincipalResponse"+ "fixture/DetachThingPrincipalResponse.proto"+ ioT+ (Proxy :: Proxy DetachThingPrincipal)
+ test/Test/AWS/IoT.hs view
@@ -0,0 +1,26 @@+{-# LANGUAGE OverloadedStrings #-}++-- Module : Test.AWS.IoT+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++module Test.AWS.IoT+ ( tests+ , fixtures+ ) where++import Network.AWS.IoT+import Test.AWS.Gen.IoT+import Test.Tasty++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/AWS/IoT/Internal.hs view
@@ -0,0 +1,17 @@+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Module : Test.AWS.IoT.Internal+-- Copyright : (c) 2013-2015 Brendan Hay+-- License : This Source Code Form is subject to the terms of+-- the Mozilla Public License, v. 2.0.+-- A copy of the MPL can be found in the LICENSE file or+-- you can obtain it at http://mozilla.org/MPL/2.0/.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : experimental+-- Portability : non-portable (GHC extensions)++module Test.AWS.IoT.Internal where++import Test.AWS.Prelude