amazonka-organizations (empty) → 1.5.0
raw patch · 131 files changed
+10296/−0 lines, 131 filesdep +amazonka-coredep +amazonka-organizationsdep +amazonka-testsetup-changed
Dependencies added: amazonka-core, amazonka-organizations, amazonka-test, base, bytestring, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +45/−0
- Setup.hs +2/−0
- amazonka-organizations.cabal +124/−0
- fixture/AcceptHandshake.yaml +10/−0
- fixture/AcceptHandshakeResponse.proto +0/−0
- fixture/AttachPolicy.yaml +10/−0
- fixture/AttachPolicyResponse.proto +0/−0
- fixture/CancelHandshake.yaml +10/−0
- fixture/CancelHandshakeResponse.proto +0/−0
- fixture/CreateAccount.yaml +10/−0
- fixture/CreateAccountResponse.proto +0/−0
- fixture/CreateOrganization.yaml +10/−0
- fixture/CreateOrganizationResponse.proto +0/−0
- fixture/CreateOrganizationalUnit.yaml +10/−0
- fixture/CreateOrganizationalUnitResponse.proto +0/−0
- fixture/CreatePolicy.yaml +10/−0
- fixture/CreatePolicyResponse.proto +0/−0
- fixture/DeclineHandshake.yaml +10/−0
- fixture/DeclineHandshakeResponse.proto +0/−0
- fixture/DeleteOrganization.yaml +10/−0
- fixture/DeleteOrganizationResponse.proto +0/−0
- fixture/DeleteOrganizationalUnit.yaml +10/−0
- fixture/DeleteOrganizationalUnitResponse.proto +0/−0
- fixture/DeletePolicy.yaml +10/−0
- fixture/DeletePolicyResponse.proto +0/−0
- fixture/DescribeAccount.yaml +10/−0
- fixture/DescribeAccountResponse.proto +0/−0
- fixture/DescribeCreateAccountStatus.yaml +10/−0
- fixture/DescribeCreateAccountStatusResponse.proto +0/−0
- fixture/DescribeHandshake.yaml +10/−0
- fixture/DescribeHandshakeResponse.proto +0/−0
- fixture/DescribeOrganization.yaml +10/−0
- fixture/DescribeOrganizationResponse.proto +0/−0
- fixture/DescribeOrganizationalUnit.yaml +10/−0
- fixture/DescribeOrganizationalUnitResponse.proto +0/−0
- fixture/DescribePolicy.yaml +10/−0
- fixture/DescribePolicyResponse.proto +0/−0
- fixture/DetachPolicy.yaml +10/−0
- fixture/DetachPolicyResponse.proto +0/−0
- fixture/DisablePolicyType.yaml +10/−0
- fixture/DisablePolicyTypeResponse.proto +0/−0
- fixture/EnableAllFeatures.yaml +10/−0
- fixture/EnableAllFeaturesResponse.proto +0/−0
- fixture/EnablePolicyType.yaml +10/−0
- fixture/EnablePolicyTypeResponse.proto +0/−0
- fixture/InviteAccountToOrganization.yaml +10/−0
- fixture/InviteAccountToOrganizationResponse.proto +0/−0
- fixture/LeaveOrganization.yaml +10/−0
- fixture/LeaveOrganizationResponse.proto +0/−0
- fixture/ListAccounts.yaml +10/−0
- fixture/ListAccountsForParent.yaml +10/−0
- fixture/ListAccountsForParentResponse.proto +0/−0
- fixture/ListAccountsResponse.proto +0/−0
- fixture/ListChildren.yaml +10/−0
- fixture/ListChildrenResponse.proto +0/−0
- fixture/ListCreateAccountStatus.yaml +10/−0
- fixture/ListCreateAccountStatusResponse.proto +0/−0
- fixture/ListHandshakesForAccount.yaml +10/−0
- fixture/ListHandshakesForAccountResponse.proto +0/−0
- fixture/ListHandshakesForOrganization.yaml +10/−0
- fixture/ListHandshakesForOrganizationResponse.proto +0/−0
- fixture/ListOrganizationalUnitsForParent.yaml +10/−0
- fixture/ListOrganizationalUnitsForParentResponse.proto +0/−0
- fixture/ListParents.yaml +10/−0
- fixture/ListParentsResponse.proto +0/−0
- fixture/ListPolicies.yaml +10/−0
- fixture/ListPoliciesForTarget.yaml +10/−0
- fixture/ListPoliciesForTargetResponse.proto +0/−0
- fixture/ListPoliciesResponse.proto +0/−0
- fixture/ListRoots.yaml +10/−0
- fixture/ListRootsResponse.proto +0/−0
- fixture/ListTargetsForPolicy.yaml +10/−0
- fixture/ListTargetsForPolicyResponse.proto +0/−0
- fixture/MoveAccount.yaml +10/−0
- fixture/MoveAccountResponse.proto +0/−0
- fixture/RemoveAccountFromOrganization.yaml +10/−0
- fixture/RemoveAccountFromOrganizationResponse.proto +0/−0
- fixture/UpdateOrganizationalUnit.yaml +10/−0
- fixture/UpdateOrganizationalUnitResponse.proto +0/−0
- fixture/UpdatePolicy.yaml +10/−0
- fixture/UpdatePolicyResponse.proto +0/−0
- gen/Network/AWS/Organizations.hs +552/−0
- gen/Network/AWS/Organizations/AcceptHandshake.hs +147/−0
- gen/Network/AWS/Organizations/AttachPolicy.hs +140/−0
- gen/Network/AWS/Organizations/CancelHandshake.hs +137/−0
- gen/Network/AWS/Organizations/CreateAccount.hs +181/−0
- gen/Network/AWS/Organizations/CreateOrganization.hs +136/−0
- gen/Network/AWS/Organizations/CreateOrganizationalUnit.hs +150/−0
- gen/Network/AWS/Organizations/CreatePolicy.hs +172/−0
- gen/Network/AWS/Organizations/DeclineHandshake.hs +137/−0
- gen/Network/AWS/Organizations/DeleteOrganization.hs +97/−0
- gen/Network/AWS/Organizations/DeleteOrganizationalUnit.hs +116/−0
- gen/Network/AWS/Organizations/DeletePolicy.hs +110/−0
- gen/Network/AWS/Organizations/DescribeAccount.hs +134/−0
- gen/Network/AWS/Organizations/DescribeCreateAccountStatus.hs +144/−0
- gen/Network/AWS/Organizations/DescribeHandshake.hs +137/−0
- gen/Network/AWS/Organizations/DescribeOrganization.hs +123/−0
- gen/Network/AWS/Organizations/DescribeOrganizationalUnit.hs +141/−0
- gen/Network/AWS/Organizations/DescribePolicy.hs +134/−0
- gen/Network/AWS/Organizations/DetachPolicy.hs +124/−0
- gen/Network/AWS/Organizations/DisablePolicyType.hs +146/−0
- gen/Network/AWS/Organizations/EnableAllFeatures.hs +128/−0
- gen/Network/AWS/Organizations/EnablePolicyType.hs +146/−0
- gen/Network/AWS/Organizations/InviteAccountToOrganization.hs +151/−0
- gen/Network/AWS/Organizations/LeaveOrganization.hs +106/−0
- gen/Network/AWS/Organizations/ListAccounts.hs +165/−0
- gen/Network/AWS/Organizations/ListAccountsForParent.hs +181/−0
- gen/Network/AWS/Organizations/ListChildren.hs +191/−0
- gen/Network/AWS/Organizations/ListCreateAccountStatus.hs +178/−0
- gen/Network/AWS/Organizations/ListHandshakesForAccount.hs +181/−0
- gen/Network/AWS/Organizations/ListHandshakesForOrganization.hs +183/−0
- gen/Network/AWS/Organizations/ListOrganizationalUnitsForParent.hs +192/−0
- gen/Network/AWS/Organizations/ListParents.hs +177/−0
- gen/Network/AWS/Organizations/ListPolicies.hs +177/−0
- gen/Network/AWS/Organizations/ListPoliciesForTarget.hs +192/−0
- gen/Network/AWS/Organizations/ListRoots.hs +165/−0
- gen/Network/AWS/Organizations/ListTargetsForPolicy.hs +181/−0
- gen/Network/AWS/Organizations/MoveAccount.hs +137/−0
- gen/Network/AWS/Organizations/RemoveAccountFromOrganization.hs +124/−0
- gen/Network/AWS/Organizations/Types.hs +664/−0
- gen/Network/AWS/Organizations/Types/Product.hs +961/−0
- gen/Network/AWS/Organizations/Types/Sum.hs +500/−0
- gen/Network/AWS/Organizations/UpdateOrganizationalUnit.hs +150/−0
- gen/Network/AWS/Organizations/UpdatePolicy.hs +168/−0
- gen/Network/AWS/Organizations/Waiters.hs +21/−0
- src/.gitkeep +0/−0
- test/Main.hs +21/−0
- test/Test/AWS/Gen/Organizations.hs +741/−0
- test/Test/AWS/Organizations.hs +20/−0
- test/Test/AWS/Organizations/Internal.hs +9/−0
+ LICENSE view
@@ -0,0 +1,367 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+ means each individual or legal entity that creates, contributes to+ the creation of, or owns Covered Software.++1.2. "Contributor Version"+ means the combination of the Contributions of others (if any) used+ by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+ means Covered Software of a particular Contributor.++1.4. "Covered Software"+ means Source Code Form to which the initial Contributor has attached+ the notice in Exhibit A, the Executable Form of such Source Code+ Form, and Modifications of such Source Code Form, in each case+ including portions thereof.++1.5. "Incompatible With Secondary Licenses"+ means++ (a) that the initial Contributor has attached the notice described+ in Exhibit B to the Covered Software; or++ (b) that the Covered Software was made available under the terms of+ version 1.1 or earlier of the License, but not also under the+ terms of a Secondary License.++1.6. "Executable Form"+ means any form of the work other than Source Code Form.++1.7. "Larger Work"+ means a work that combines Covered Software with other material, in+ a separate file or files, that is not Covered Software.++1.8. "License"+ means this document.++1.9. "Licensable"+ means having the right to grant, to the maximum extent possible,+ whether at the time of the initial grant or subsequently, any and+ all of the rights conveyed by this License.++1.10. "Modifications"+ means any of the following:++ (a) any file in Source Code Form that results from an addition to,+ deletion from, or modification of the contents of Covered+ Software; or++ (b) any new file in Source Code Form that contains any Covered+ Software.++1.11. "Patent Claims" of a Contributor+ means any patent claim(s), including without limitation, method,+ process, and apparatus claims, in any patent Licensable by such+ Contributor that would be infringed, but for the grant of the+ License, by the making, using, selling, offering for sale, having+ made, import, or transfer of either its Contributions or its+ Contributor Version.++1.12. "Secondary License"+ means either the GNU General Public License, Version 2.0, the GNU+ Lesser General Public License, Version 2.1, the GNU Affero General+ Public License, Version 3.0, or any later versions of those+ licenses.++1.13. "Source Code Form"+ means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+ means an individual or a legal entity exercising rights under this+ License. For legal entities, "You" includes any entity that+ controls, is controlled by, or is under common control with You. For+ purposes of this definition, "control" means (a) the power, direct+ or indirect, to cause the direction or management of such entity,+ whether by contract or otherwise, or (b) ownership of more than+ fifty percent (50%) of the outstanding shares or beneficial+ ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+ Licensable by such Contributor to use, reproduce, make available,+ modify, display, perform, distribute, and otherwise exploit its+ Contributions, either on an unmodified basis, with Modifications, or+ as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+ for sale, have made, import, and otherwise transfer either its+ Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+ or++(b) for infringements caused by: (i) Your and any other third party's+ modifications of Covered Software, or (ii) the combination of its+ Contributions with other software (except as part of its Contributor+ Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+ its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+ Form, as described in Section 3.1, and You must inform recipients of+ the Executable Form how they can obtain a copy of such Source Code+ Form by reasonable means in a timely manner, at a charge no more+ than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+ License, or sublicense it under different terms, provided that the+ license for the Executable Form does not attempt to limit or alter+ the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+* *+* 6. Disclaimer of Warranty *+* ------------------------- *+* *+* Covered Software is provided under this License on an "as is" *+* basis, without warranty of any kind, either expressed, implied, or *+* statutory, including, without limitation, warranties that the *+* Covered Software is free of defects, merchantable, fit for a *+* particular purpose or non-infringing. The entire risk as to the *+* quality and performance of the Covered Software is with You. *+* Should any Covered Software prove defective in any respect, You *+* (not any Contributor) assume the cost of any necessary servicing, *+* repair, or correction. This disclaimer of warranty constitutes an *+* essential part of this License. No use of any Covered Software is *+* authorized under this License except under this disclaimer. *+* *+************************************************************************++************************************************************************+* *+* 7. Limitation of Liability *+* -------------------------- *+* *+* Under no circumstances and under no legal theory, whether tort *+* (including negligence), contract, or otherwise, shall any *+* Contributor, or anyone who distributes Covered Software as *+* permitted above, be liable to You for any direct, indirect, *+* special, incidental, or consequential damages of any character *+* including, without limitation, damages for lost profits, loss of *+* goodwill, work stoppage, computer failure or malfunction, or any *+* and all other commercial damages or losses, even if such party *+* shall have been informed of the possibility of such damages. This *+* limitation of liability shall not apply to liability for death or *+* personal injury resulting from such party's negligence to the *+* extent applicable law prohibits such limitation. Some *+* jurisdictions do not allow the exclusion or limitation of *+* incidental or consequential damages, so this exclusion and *+* limitation may not apply to You. *+* *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++ This Source Code Form is subject to the terms of the Mozilla Public+ License, v. 2.0. If a copy of the MPL was not distributed with this+ file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.
+ README.md view
@@ -0,0 +1,45 @@+# Amazon Organizations SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`1.5.0`+++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-organizations)+and the [AWS API Reference](https://aws.amazon.com/documentation/).++The types from this library are intended to be used with [amazonka](http://hackage.haskell.org/package/amazonka),+which provides mechanisms for specifying AuthN/AuthZ information, sending requests,+and receiving responses.++Lenses are used for constructing and manipulating types,+due to the depth of nesting of AWS types and transparency regarding+de/serialisation into more palatable Haskell values.+The provided lenses should be compatible with any of the major lens libraries+[lens](http://hackage.haskell.org/package/lens) or [lens-family-core](http://hackage.haskell.org/package/lens-family-core).++See [Network.AWS.Organizations](http://hackage.haskell.org/package/amazonka-organizations/docs/Network-AWS-Organizations.html)+or [the AWS documentation](https://aws.amazon.com/documentation/) to get started.+++## Contribute++For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues).++> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information.+++## Licence++`amazonka-organizations` 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-organizations.cabal view
@@ -0,0 +1,124 @@+name: amazonka-organizations+version: 1.5.0+synopsis: Amazon Organizations SDK.+homepage: https://github.com/brendanhay/amazonka+bug-reports: https://github.com/brendanhay/amazonka/issues+license: MPL-2.0+license-file: LICENSE+author: Brendan Hay+maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>+copyright: Copyright (c) 2013-2017 Brendan Hay+category: Network, AWS, Cloud, Distributed Computing+build-type: Simple+cabal-version: >= 1.10+extra-source-files: README.md fixture/*.yaml fixture/*.proto src/.gitkeep+description:+ The types from this library are intended to be used with+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides+ mechanisms for specifying AuthN/AuthZ information, sending requests,+ and receiving responses.+ .+ Lenses are used for constructing and manipulating types,+ due to the depth of nesting of AWS types and transparency regarding+ de/serialisation into more palatable Haskell values.+ The provided lenses should be compatible with any of the major lens libraries+ such as <http://hackage.haskell.org/package/lens lens> or+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.+ .+ See "Network.AWS.Organizations" or <https://aws.amazon.com/documentation/ the AWS documentation>+ to get started.++source-repository head+ type: git+ location: git://github.com/brendanhay/amazonka.git+ subdir: amazonka-organizations++library+ default-language: Haskell2010+ hs-source-dirs: src gen++ ghc-options:+ -Wall+ -fwarn-incomplete-uni-patterns+ -fwarn-incomplete-record-updates+ -funbox-strict-fields++ exposed-modules:+ Network.AWS.Organizations+ , Network.AWS.Organizations.AcceptHandshake+ , Network.AWS.Organizations.AttachPolicy+ , Network.AWS.Organizations.CancelHandshake+ , Network.AWS.Organizations.CreateAccount+ , Network.AWS.Organizations.CreateOrganization+ , Network.AWS.Organizations.CreateOrganizationalUnit+ , Network.AWS.Organizations.CreatePolicy+ , Network.AWS.Organizations.DeclineHandshake+ , Network.AWS.Organizations.DeleteOrganization+ , Network.AWS.Organizations.DeleteOrganizationalUnit+ , Network.AWS.Organizations.DeletePolicy+ , Network.AWS.Organizations.DescribeAccount+ , Network.AWS.Organizations.DescribeCreateAccountStatus+ , Network.AWS.Organizations.DescribeHandshake+ , Network.AWS.Organizations.DescribeOrganization+ , Network.AWS.Organizations.DescribeOrganizationalUnit+ , Network.AWS.Organizations.DescribePolicy+ , Network.AWS.Organizations.DetachPolicy+ , Network.AWS.Organizations.DisablePolicyType+ , Network.AWS.Organizations.EnableAllFeatures+ , Network.AWS.Organizations.EnablePolicyType+ , Network.AWS.Organizations.InviteAccountToOrganization+ , Network.AWS.Organizations.LeaveOrganization+ , Network.AWS.Organizations.ListAccounts+ , Network.AWS.Organizations.ListAccountsForParent+ , Network.AWS.Organizations.ListChildren+ , Network.AWS.Organizations.ListCreateAccountStatus+ , Network.AWS.Organizations.ListHandshakesForAccount+ , Network.AWS.Organizations.ListHandshakesForOrganization+ , Network.AWS.Organizations.ListOrganizationalUnitsForParent+ , Network.AWS.Organizations.ListParents+ , Network.AWS.Organizations.ListPolicies+ , Network.AWS.Organizations.ListPoliciesForTarget+ , Network.AWS.Organizations.ListRoots+ , Network.AWS.Organizations.ListTargetsForPolicy+ , Network.AWS.Organizations.MoveAccount+ , Network.AWS.Organizations.RemoveAccountFromOrganization+ , Network.AWS.Organizations.Types+ , Network.AWS.Organizations.UpdateOrganizationalUnit+ , Network.AWS.Organizations.UpdatePolicy+ , Network.AWS.Organizations.Waiters++ other-modules:+ Network.AWS.Organizations.Types.Product+ , Network.AWS.Organizations.Types.Sum++ build-depends:+ amazonka-core == 1.5.0.*+ , base >= 4.7 && < 5++test-suite amazonka-organizations-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.Organizations+ , Test.AWS.Gen.Organizations+ , Test.AWS.Organizations.Internal++ build-depends:+ amazonka-core == 1.5.0.*+ , amazonka-test == 1.5.0.*+ , amazonka-organizations+ , base+ , bytestring+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/AcceptHandshake.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/AcceptHandshakeResponse.proto view
+ fixture/AttachPolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/AttachPolicyResponse.proto view
+ fixture/CancelHandshake.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CancelHandshakeResponse.proto view
+ fixture/CreateAccount.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreateAccountResponse.proto view
+ fixture/CreateOrganization.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreateOrganizationResponse.proto view
+ fixture/CreateOrganizationalUnit.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreateOrganizationalUnitResponse.proto view
+ fixture/CreatePolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/CreatePolicyResponse.proto view
+ fixture/DeclineHandshake.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeclineHandshakeResponse.proto view
+ fixture/DeleteOrganization.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeleteOrganizationResponse.proto view
+ fixture/DeleteOrganizationalUnit.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeleteOrganizationalUnitResponse.proto view
+ fixture/DeletePolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DeletePolicyResponse.proto view
+ fixture/DescribeAccount.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DescribeAccountResponse.proto view
+ fixture/DescribeCreateAccountStatus.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DescribeCreateAccountStatusResponse.proto view
+ fixture/DescribeHandshake.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DescribeHandshakeResponse.proto view
+ fixture/DescribeOrganization.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DescribeOrganizationResponse.proto view
+ fixture/DescribeOrganizationalUnit.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DescribeOrganizationalUnitResponse.proto view
+ fixture/DescribePolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DescribePolicyResponse.proto view
+ fixture/DetachPolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DetachPolicyResponse.proto view
+ fixture/DisablePolicyType.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/DisablePolicyTypeResponse.proto view
+ fixture/EnableAllFeatures.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/EnableAllFeaturesResponse.proto view
+ fixture/EnablePolicyType.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/EnablePolicyTypeResponse.proto view
+ fixture/InviteAccountToOrganization.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/InviteAccountToOrganizationResponse.proto view
+ fixture/LeaveOrganization.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/LeaveOrganizationResponse.proto view
+ fixture/ListAccounts.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListAccountsForParent.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListAccountsForParentResponse.proto view
+ fixture/ListAccountsResponse.proto view
+ fixture/ListChildren.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListChildrenResponse.proto view
+ fixture/ListCreateAccountStatus.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListCreateAccountStatusResponse.proto view
+ fixture/ListHandshakesForAccount.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListHandshakesForAccountResponse.proto view
+ fixture/ListHandshakesForOrganization.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListHandshakesForOrganizationResponse.proto view
+ fixture/ListOrganizationalUnitsForParent.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListOrganizationalUnitsForParentResponse.proto view
+ fixture/ListParents.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListParentsResponse.proto view
+ fixture/ListPolicies.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListPoliciesForTarget.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListPoliciesForTargetResponse.proto view
+ fixture/ListPoliciesResponse.proto view
+ fixture/ListRoots.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListRootsResponse.proto view
+ fixture/ListTargetsForPolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/ListTargetsForPolicyResponse.proto view
+ fixture/MoveAccount.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/MoveAccountResponse.proto view
+ fixture/RemoveAccountFromOrganization.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/RemoveAccountFromOrganizationResponse.proto view
+ fixture/UpdateOrganizationalUnit.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UpdateOrganizationalUnitResponse.proto view
+ fixture/UpdatePolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/organizations/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: organizations.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UpdatePolicyResponse.proto view
+ gen/Network/AWS/Organizations.hs view
@@ -0,0 +1,552 @@+{-# 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.Organizations+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- __AWS Organizations API Reference__+--+-- AWS Organizations is a web service that enables you to consolidate your multiple AWS accounts into an /organization/ and centrally manage your accounts and their resources.+--+-- This guide provides descriptions of the Organizations API. For more information about using this service, see the <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html AWS Organizations User Guide> .+--+-- __API Version__+--+-- This version of the Organizations API Reference documents the Organizations API version 2016-11-28.+--+-- We recommend that you use the AWS SDKs to make programmatic API calls to Organizations. However, you also can use the Organizations Query API to make direct calls to the Organizations web service. To learn more about the Organizations Query API, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_query-requests.html Making Query Requests> in the /AWS Organizations User Guide/ . Organizations supports GET and POST requests for all actions. That is, the API does not require you to use GET for some actions and POST for others. However, GET requests are subject to the limitation size of a URL. Therefore, for operations that require larger sizes, use a POST request.+--+-- __Signing Requests__+--+-- When you send HTTP requests to AWS, you must sign the requests so that AWS can identify who sent them. You sign requests with your AWS access key, which consists of an access key ID and a secret access key. We strongly recommend that you do not create an access key for your root account. Anyone who has the access key for your root account has unrestricted access to all the resources in your account. Instead, create an access key for an IAM user account that has administrative privileges. As another option, use AWS Security Token Service to generate temporary security credentials, and use those credentials to sign requests.+--+-- To sign requests, we recommend that you use <http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html Signature Version 4> . If you have an existing application that uses Signature Version 2, you do not have to update it to use Signature Version 4. However, some operations now require Signature Version 4. The documentation for operations that require version 4 indicate this requirement.+--+-- When you use the AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, these tools automatically sign the requests for you with the access key that you specify when you configure the tools.+--+-- In this release, each organization can have only one root. In a future release, a single organization will support multiple roots.+--+-- __Support and Feedback for AWS Organizations__+--+-- We welcome your feedback. Send your comments to <mailto:feedback-awsorganizations@amazon.com feedback-awsorganizations@amazon.com> or post your feedback and questions in our private <http://forums.aws.amazon.com/forum.jspa?forumID=219 AWS Organizations support forum> . If you don't have access to the forum, send a request for access to the email address, along with your forum user ID. For more information about the AWS support forums, see <http://forums.aws.amazon.com/help.jspa Forums Help> .+--+-- __Endpoint to Call When Using the CLI or the AWS API__+--+-- For the current release of Organizations, you must specify the @us-east-1@ region for all AWS API and CLI calls. You can do this in the CLI by using these parameters and commands:+--+-- * Use the following parameter with each command to specify both the endpoint and its region:+--+-- @--endpoint-url https://organizations.us-east-1.amazonaws.com@+--+-- * Use the default endpoint, but configure your default region with this command:+--+-- @aws configure set default.region us-east-1@+--+-- * Use the following parameter with each command to specify the endpoint:+--+-- @--region us-east-1@+--+--+--+-- For the various SDKs used to call the APIs, see the documentation for the SDK of interest to learn how to direct the requests to a specific endpoint. For more information, see <http://docs.aws.amazon.com/general/latest/gr/rande.html#sts_region Regions and Endpoints> in the /AWS General Reference/ .+--+-- __How examples are presented__+--+-- The JSON returned by the AWS Organizations service as response to your requests is returned as a single long string without line breaks or formatting whitespace. Both line breaks and whitespace are included in the examples in this guide to improve readability. When example input parameters also would result in long strings that would extend beyond the screen, we insert line breaks to enhance readability. You should always submit the input as a single JSON text string.+--+-- __Recording API Requests__+--+-- AWS Organizations supports AWS CloudTrail, a service that records AWS API calls for your AWS account and delivers log files to an Amazon S3 bucket. By using information collected by AWS CloudTrail, you can determine which requests were successfully made to Organizations, who made the request, when it was made, and so on. For more about AWS Organizations and its support for AWS CloudTrail, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_cloudtrail-integration.html Logging AWS Organizations Events with AWS CloudTrail> in the /AWS Organizations User Guide/ . To learn more about CloudTrail, including how to turn it on and find your log files, see the <http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html AWS CloudTrail User Guide> .+--+module Network.AWS.Organizations+ (+ -- * Service Configuration+ organizations++ -- * Errors+ -- $errors++ -- ** PolicyNotFoundException+ , _PolicyNotFoundException++ -- ** PolicyTypeAlreadyEnabledException+ , _PolicyTypeAlreadyEnabledException++ -- ** HandshakeConstraintViolationException+ , _HandshakeConstraintViolationException++ -- ** AccessDeniedException+ , _AccessDeniedException++ -- ** MalformedPolicyDocumentException+ , _MalformedPolicyDocumentException++ -- ** RootNotFoundException+ , _RootNotFoundException++ -- ** MasterCannotLeaveOrganizationException+ , _MasterCannotLeaveOrganizationException++ -- ** AccountNotFoundException+ , _AccountNotFoundException++ -- ** DuplicatePolicyException+ , _DuplicatePolicyException++ -- ** ConstraintViolationException+ , _ConstraintViolationException++ -- ** FinalizingOrganizationException+ , _FinalizingOrganizationException++ -- ** HandshakeNotFoundException+ , _HandshakeNotFoundException++ -- ** PolicyTypeNotAvailableForOrganizationException+ , _PolicyTypeNotAvailableForOrganizationException++ -- ** ChildNotFoundException+ , _ChildNotFoundException++ -- ** OrganizationalUnitNotFoundException+ , _OrganizationalUnitNotFoundException++ -- ** DestinationParentNotFoundException+ , _DestinationParentNotFoundException++ -- ** OrganizationNotEmptyException+ , _OrganizationNotEmptyException++ -- ** PolicyTypeNotEnabledException+ , _PolicyTypeNotEnabledException++ -- ** DuplicateHandshakeException+ , _DuplicateHandshakeException++ -- ** OrganizationalUnitNotEmptyException+ , _OrganizationalUnitNotEmptyException++ -- ** TooManyRequestsException+ , _TooManyRequestsException++ -- ** ConcurrentModificationException+ , _ConcurrentModificationException++ -- ** ServiceException+ , _ServiceException++ -- ** SourceParentNotFoundException+ , _SourceParentNotFoundException++ -- ** TargetNotFoundException+ , _TargetNotFoundException++ -- ** CreateAccountStatusNotFoundException+ , _CreateAccountStatusNotFoundException++ -- ** AlreadyInOrganizationException+ , _AlreadyInOrganizationException++ -- ** DuplicateOrganizationalUnitException+ , _DuplicateOrganizationalUnitException++ -- ** InvalidInputException+ , _InvalidInputException++ -- ** PolicyNotAttachedException+ , _PolicyNotAttachedException++ -- ** ParentNotFoundException+ , _ParentNotFoundException++ -- ** AccessDeniedForDependencyException+ , _AccessDeniedForDependencyException++ -- ** AWSOrganizationsNotInUseException+ , _AWSOrganizationsNotInUseException++ -- ** PolicyInUseException+ , _PolicyInUseException++ -- ** InvalidHandshakeTransitionException+ , _InvalidHandshakeTransitionException++ -- ** HandshakeAlreadyInStateException+ , _HandshakeAlreadyInStateException++ -- ** DuplicateAccountException+ , _DuplicateAccountException++ -- ** DuplicatePolicyAttachmentException+ , _DuplicatePolicyAttachmentException++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** ListHandshakesForAccount (Paginated)+ , module Network.AWS.Organizations.ListHandshakesForAccount++ -- ** DescribeAccount+ , module Network.AWS.Organizations.DescribeAccount++ -- ** ListPolicies (Paginated)+ , module Network.AWS.Organizations.ListPolicies++ -- ** CreatePolicy+ , module Network.AWS.Organizations.CreatePolicy++ -- ** ListRoots (Paginated)+ , module Network.AWS.Organizations.ListRoots++ -- ** AcceptHandshake+ , module Network.AWS.Organizations.AcceptHandshake++ -- ** CreateOrganization+ , module Network.AWS.Organizations.CreateOrganization++ -- ** EnableAllFeatures+ , module Network.AWS.Organizations.EnableAllFeatures++ -- ** DeleteOrganization+ , module Network.AWS.Organizations.DeleteOrganization++ -- ** DescribeHandshake+ , module Network.AWS.Organizations.DescribeHandshake++ -- ** DescribePolicy+ , module Network.AWS.Organizations.DescribePolicy++ -- ** LeaveOrganization+ , module Network.AWS.Organizations.LeaveOrganization++ -- ** MoveAccount+ , module Network.AWS.Organizations.MoveAccount++ -- ** ListAccounts (Paginated)+ , module Network.AWS.Organizations.ListAccounts++ -- ** InviteAccountToOrganization+ , module Network.AWS.Organizations.InviteAccountToOrganization++ -- ** ListOrganizationalUnitsForParent (Paginated)+ , module Network.AWS.Organizations.ListOrganizationalUnitsForParent++ -- ** CancelHandshake+ , module Network.AWS.Organizations.CancelHandshake++ -- ** ListChildren (Paginated)+ , module Network.AWS.Organizations.ListChildren++ -- ** DeletePolicy+ , module Network.AWS.Organizations.DeletePolicy++ -- ** UpdatePolicy+ , module Network.AWS.Organizations.UpdatePolicy++ -- ** EnablePolicyType+ , module Network.AWS.Organizations.EnablePolicyType++ -- ** DisablePolicyType+ , module Network.AWS.Organizations.DisablePolicyType++ -- ** DescribeCreateAccountStatus+ , module Network.AWS.Organizations.DescribeCreateAccountStatus++ -- ** CreateOrganizationalUnit+ , module Network.AWS.Organizations.CreateOrganizationalUnit++ -- ** ListAccountsForParent (Paginated)+ , module Network.AWS.Organizations.ListAccountsForParent++ -- ** DetachPolicy+ , module Network.AWS.Organizations.DetachPolicy++ -- ** RemoveAccountFromOrganization+ , module Network.AWS.Organizations.RemoveAccountFromOrganization++ -- ** DescribeOrganizationalUnit+ , module Network.AWS.Organizations.DescribeOrganizationalUnit++ -- ** ListParents (Paginated)+ , module Network.AWS.Organizations.ListParents++ -- ** CreateAccount+ , module Network.AWS.Organizations.CreateAccount++ -- ** ListCreateAccountStatus (Paginated)+ , module Network.AWS.Organizations.ListCreateAccountStatus++ -- ** ListTargetsForPolicy (Paginated)+ , module Network.AWS.Organizations.ListTargetsForPolicy++ -- ** DeclineHandshake+ , module Network.AWS.Organizations.DeclineHandshake++ -- ** AttachPolicy+ , module Network.AWS.Organizations.AttachPolicy++ -- ** ListPoliciesForTarget (Paginated)+ , module Network.AWS.Organizations.ListPoliciesForTarget++ -- ** DescribeOrganization+ , module Network.AWS.Organizations.DescribeOrganization++ -- ** ListHandshakesForOrganization (Paginated)+ , module Network.AWS.Organizations.ListHandshakesForOrganization++ -- ** DeleteOrganizationalUnit+ , module Network.AWS.Organizations.DeleteOrganizationalUnit++ -- ** UpdateOrganizationalUnit+ , module Network.AWS.Organizations.UpdateOrganizationalUnit++ -- * Types++ -- ** AccountJoinedMethod+ , AccountJoinedMethod (..)++ -- ** AccountStatus+ , AccountStatus (..)++ -- ** ActionType+ , ActionType (..)++ -- ** ChildType+ , ChildType (..)++ -- ** CreateAccountFailureReason+ , CreateAccountFailureReason (..)++ -- ** CreateAccountState+ , CreateAccountState (..)++ -- ** HandshakePartyType+ , HandshakePartyType (..)++ -- ** HandshakeResourceType+ , HandshakeResourceType (..)++ -- ** HandshakeState+ , HandshakeState (..)++ -- ** IAMUserAccessToBilling+ , IAMUserAccessToBilling (..)++ -- ** OrganizationFeatureSet+ , OrganizationFeatureSet (..)++ -- ** ParentType+ , ParentType (..)++ -- ** PolicyType+ , PolicyType (..)++ -- ** PolicyTypeStatus+ , PolicyTypeStatus (..)++ -- ** TargetType+ , TargetType (..)++ -- ** Account+ , Account+ , account+ , aStatus+ , aJoinedMethod+ , aEmail+ , aARN+ , aJoinedTimestamp+ , aName+ , aId++ -- ** Child+ , Child+ , child+ , cId+ , cType++ -- ** CreateAccountStatus+ , CreateAccountStatus+ , createAccountStatus+ , casFailureReason+ , casState+ , casCompletedTimestamp+ , casAccountName+ , casAccountId+ , casId+ , casRequestedTimestamp++ -- ** Handshake+ , Handshake+ , handshake+ , hState+ , hARN+ , hAction+ , hResources+ , hId+ , hExpirationTimestamp+ , hParties+ , hRequestedTimestamp++ -- ** HandshakeFilter+ , HandshakeFilter+ , handshakeFilter+ , hfParentHandshakeId+ , hfActionType++ -- ** HandshakeParty+ , HandshakeParty+ , handshakeParty+ , hpId+ , hpType++ -- ** HandshakeResource+ , HandshakeResource+ , handshakeResource+ , hrValue+ , hrResources+ , hrType++ -- ** Organization+ , Organization+ , organization+ , oARN+ , oMasterAccountId+ , oMasterAccountARN+ , oMasterAccountEmail+ , oAvailablePolicyTypes+ , oId+ , oFeatureSet++ -- ** OrganizationalUnit+ , OrganizationalUnit+ , organizationalUnit+ , ouARN+ , ouName+ , ouId++ -- ** Parent+ , Parent+ , parent+ , pId+ , pType++ -- ** Policy+ , Policy+ , policy+ , pContent+ , pPolicySummary++ -- ** PolicySummary+ , PolicySummary+ , policySummary+ , psARN+ , psName+ , psId+ , psAWSManaged+ , psType+ , psDescription++ -- ** PolicyTargetSummary+ , PolicyTargetSummary+ , policyTargetSummary+ , polTargetId+ , polARN+ , polName+ , polType++ -- ** PolicyTypeSummary+ , PolicyTypeSummary+ , policyTypeSummary+ , ptsStatus+ , ptsType++ -- ** Root+ , Root+ , root+ , rARN+ , rName+ , rId+ , rPolicyTypes+ ) where++import Network.AWS.Organizations.AcceptHandshake+import Network.AWS.Organizations.AttachPolicy+import Network.AWS.Organizations.CancelHandshake+import Network.AWS.Organizations.CreateAccount+import Network.AWS.Organizations.CreateOrganization+import Network.AWS.Organizations.CreateOrganizationalUnit+import Network.AWS.Organizations.CreatePolicy+import Network.AWS.Organizations.DeclineHandshake+import Network.AWS.Organizations.DeleteOrganization+import Network.AWS.Organizations.DeleteOrganizationalUnit+import Network.AWS.Organizations.DeletePolicy+import Network.AWS.Organizations.DescribeAccount+import Network.AWS.Organizations.DescribeCreateAccountStatus+import Network.AWS.Organizations.DescribeHandshake+import Network.AWS.Organizations.DescribeOrganization+import Network.AWS.Organizations.DescribeOrganizationalUnit+import Network.AWS.Organizations.DescribePolicy+import Network.AWS.Organizations.DetachPolicy+import Network.AWS.Organizations.DisablePolicyType+import Network.AWS.Organizations.EnableAllFeatures+import Network.AWS.Organizations.EnablePolicyType+import Network.AWS.Organizations.InviteAccountToOrganization+import Network.AWS.Organizations.LeaveOrganization+import Network.AWS.Organizations.ListAccounts+import Network.AWS.Organizations.ListAccountsForParent+import Network.AWS.Organizations.ListChildren+import Network.AWS.Organizations.ListCreateAccountStatus+import Network.AWS.Organizations.ListHandshakesForAccount+import Network.AWS.Organizations.ListHandshakesForOrganization+import Network.AWS.Organizations.ListOrganizationalUnitsForParent+import Network.AWS.Organizations.ListParents+import Network.AWS.Organizations.ListPolicies+import Network.AWS.Organizations.ListPoliciesForTarget+import Network.AWS.Organizations.ListRoots+import Network.AWS.Organizations.ListTargetsForPolicy+import Network.AWS.Organizations.MoveAccount+import Network.AWS.Organizations.RemoveAccountFromOrganization+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.UpdateOrganizationalUnit+import Network.AWS.Organizations.UpdatePolicy+import Network.AWS.Organizations.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 'Organizations'.+-}++{- $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/Organizations/AcceptHandshake.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.Organizations.AcceptHandshake+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Sends a response to the originator of a handshake agreeing to the action proposed by the handshake request.+--+--+-- This operation can be called only by the following principals when they also have the relevant IAM permissions:+--+-- * __Invitation to join__ or __Approve all features request__ handshakes: only a principal from the member account.+--+-- The user who calls the API for an invitation to join must have the @organizations:AcceptHandshake@ permission. If you enabled all features in the organization, then the user must also have the @iam:CreateServiceLinkedRole@ permission so that Organizations can create the required service-linked role named /OrgsServiceLinkedRoleName/ . For more information, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integration_services.html#orgs_integration_service-linked-roles AWS Organizations and Service-Linked Roles> in the /AWS Organizations User Guide/ .+--+-- * __Enable all features final confirmation__ handshake: only a principal from the master account.+--+-- For more information about invitations, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_invites.html Inviting an AWS Account to Join Your Organization> in the /AWS Organizations User Guide/ . For more information about requests to enable all features in the organization, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html Enabling All Features in Your Organization> in the /AWS Organizations User Guide/ .+--+--+--+-- After you accept a handshake, it continues to appear in the results of relevant APIs for only 30 days. After that it is deleted.+--+module Network.AWS.Organizations.AcceptHandshake+ (+ -- * Creating a Request+ acceptHandshake+ , AcceptHandshake+ -- * Request Lenses+ , ahHandshakeId++ -- * Destructuring the Response+ , acceptHandshakeResponse+ , AcceptHandshakeResponse+ -- * Response Lenses+ , ahrsHandshake+ , ahrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'acceptHandshake' smart constructor.+newtype AcceptHandshake = AcceptHandshake'+ { _ahHandshakeId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'AcceptHandshake' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ahHandshakeId' - The unique identifier (ID) of the handshake that you want to accept. The <http://wikipedia.org/wiki/regex regex pattern> for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.+acceptHandshake+ :: Text -- ^ 'ahHandshakeId'+ -> AcceptHandshake+acceptHandshake pHandshakeId_ =+ AcceptHandshake' {_ahHandshakeId = pHandshakeId_}+++-- | The unique identifier (ID) of the handshake that you want to accept. The <http://wikipedia.org/wiki/regex regex pattern> for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.+ahHandshakeId :: Lens' AcceptHandshake Text+ahHandshakeId = lens _ahHandshakeId (\ s a -> s{_ahHandshakeId = a});++instance AWSRequest AcceptHandshake where+ type Rs AcceptHandshake = AcceptHandshakeResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ AcceptHandshakeResponse' <$>+ (x .?> "Handshake") <*> (pure (fromEnum s)))++instance Hashable AcceptHandshake where++instance NFData AcceptHandshake where++instance ToHeaders AcceptHandshake where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.AcceptHandshake" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON AcceptHandshake where+ toJSON AcceptHandshake'{..}+ = object+ (catMaybes [Just ("HandshakeId" .= _ahHandshakeId)])++instance ToPath AcceptHandshake where+ toPath = const "/"++instance ToQuery AcceptHandshake where+ toQuery = const mempty++-- | /See:/ 'acceptHandshakeResponse' smart constructor.+data AcceptHandshakeResponse = AcceptHandshakeResponse'+ { _ahrsHandshake :: !(Maybe Handshake)+ , _ahrsResponseStatus :: !Int+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'AcceptHandshakeResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ahrsHandshake' - A structure that contains details about the accepted handshake.+--+-- * 'ahrsResponseStatus' - -- | The response status code.+acceptHandshakeResponse+ :: Int -- ^ 'ahrsResponseStatus'+ -> AcceptHandshakeResponse+acceptHandshakeResponse pResponseStatus_ =+ AcceptHandshakeResponse'+ {_ahrsHandshake = Nothing, _ahrsResponseStatus = pResponseStatus_}+++-- | A structure that contains details about the accepted handshake.+ahrsHandshake :: Lens' AcceptHandshakeResponse (Maybe Handshake)+ahrsHandshake = lens _ahrsHandshake (\ s a -> s{_ahrsHandshake = a});++-- | -- | The response status code.+ahrsResponseStatus :: Lens' AcceptHandshakeResponse Int+ahrsResponseStatus = lens _ahrsResponseStatus (\ s a -> s{_ahrsResponseStatus = a});++instance NFData AcceptHandshakeResponse where
+ gen/Network/AWS/Organizations/AttachPolicy.hs view
@@ -0,0 +1,140 @@+{-# 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.Organizations.AttachPolicy+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Attaches a policy to a root, an organizational unit, or an individual account. How the policy affects accounts depends on the type of policy:+--+--+-- * __Service control policy (SCP)__ - An SCP specifies what permissions can be delegated to users in affected member accounts. The scope of influence for a policy depends on what you attach the policy to:+--+-- * If you attach an SCP to a root, it affects all accounts in the organization.+--+-- * If you attach an SCP to an OU, it affects all accounts in that OU and in any child OUs.+--+-- * If you attach the policy directly to an account, then it affects only that account.+--+--+--+-- SCPs essentially are permission "filters". When you attach one SCP to a higher level root or OU, and you also attach a different SCP to a child OU or to an account, the child policy can further restrict only the permissions that pass through the parent filter and are available to the child. An SCP that is attached to a child cannot grant a permission that is not already granted by the parent. For example, imagine that the parent SCP allows permissions A, B, C, D, and E. The child SCP allows C, D, E, F, and G. The result is that the accounts affected by the child SCP are allowed to use only C, D, and E. They cannot use A or B because they were filtered out by the child OU. They also cannot use F and G because they were filtered out by the parent OU. They cannot be granted back by the child SCP; child SCPs can only filter the permissions they receive from the parent SCP.+--+-- AWS Organizations attaches a default SCP named @"FullAWSAccess@ to every root, OU, and account. This default SCP allows all services and actions, enabling any new child OU or account to inherit the permissions of the parent root or OU. If you detach the default policy, you must replace it with a policy that specifies the permissions that you want to allow in that OU or account.+--+-- For more information about how Organizations policies permissions work, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html Using Service Control Policies> in the /AWS Organizations User Guide/ .+--+--+--+-- This operation can be called only from the organization's master account.+--+module Network.AWS.Organizations.AttachPolicy+ (+ -- * Creating a Request+ attachPolicy+ , AttachPolicy+ -- * Request Lenses+ , apPolicyId+ , apTargetId++ -- * Destructuring the Response+ , attachPolicyResponse+ , AttachPolicyResponse+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'attachPolicy' smart constructor.+data AttachPolicy = AttachPolicy'+ { _apPolicyId :: !Text+ , _apTargetId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'AttachPolicy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'apPolicyId' - The unique identifier (ID) of the policy that you want to attach to the target. You can get the ID for the policy by calling the 'ListPolicies' operation. The <http://wikipedia.org/wiki/regex regex pattern> for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.+--+-- * 'apTargetId' - The unique identifier (ID) of the root, OU, or account that you want to attach the policy to. You can get the ID by calling the 'ListRoots' , 'ListOrganizationalUnitsForParent' , or 'ListAccounts' operations. The <http://wikipedia.org/wiki/regex regex pattern> for a target ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Account: a string that consists of exactly 12 digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+attachPolicy+ :: Text -- ^ 'apPolicyId'+ -> Text -- ^ 'apTargetId'+ -> AttachPolicy+attachPolicy pPolicyId_ pTargetId_ =+ AttachPolicy' {_apPolicyId = pPolicyId_, _apTargetId = pTargetId_}+++-- | The unique identifier (ID) of the policy that you want to attach to the target. You can get the ID for the policy by calling the 'ListPolicies' operation. The <http://wikipedia.org/wiki/regex regex pattern> for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.+apPolicyId :: Lens' AttachPolicy Text+apPolicyId = lens _apPolicyId (\ s a -> s{_apPolicyId = a});++-- | The unique identifier (ID) of the root, OU, or account that you want to attach the policy to. You can get the ID by calling the 'ListRoots' , 'ListOrganizationalUnitsForParent' , or 'ListAccounts' operations. The <http://wikipedia.org/wiki/regex regex pattern> for a target ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Account: a string that consists of exactly 12 digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+apTargetId :: Lens' AttachPolicy Text+apTargetId = lens _apTargetId (\ s a -> s{_apTargetId = a});++instance AWSRequest AttachPolicy where+ type Rs AttachPolicy = AttachPolicyResponse+ request = postJSON organizations+ response = receiveNull AttachPolicyResponse'++instance Hashable AttachPolicy where++instance NFData AttachPolicy where++instance ToHeaders AttachPolicy where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.AttachPolicy" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON AttachPolicy where+ toJSON AttachPolicy'{..}+ = object+ (catMaybes+ [Just ("PolicyId" .= _apPolicyId),+ Just ("TargetId" .= _apTargetId)])++instance ToPath AttachPolicy where+ toPath = const "/"++instance ToQuery AttachPolicy where+ toQuery = const mempty++-- | /See:/ 'attachPolicyResponse' smart constructor.+data AttachPolicyResponse =+ AttachPolicyResponse'+ deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'AttachPolicyResponse' with the minimum fields required to make a request.+--+attachPolicyResponse+ :: AttachPolicyResponse+attachPolicyResponse = AttachPolicyResponse'+++instance NFData AttachPolicyResponse where
+ gen/Network/AWS/Organizations/CancelHandshake.hs view
@@ -0,0 +1,137 @@+{-# 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.Organizations.CancelHandshake+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Cancels a handshake. Canceling a handshake sets the handshake state to @CANCELED@ .+--+--+-- This operation can be called only from the account that originated the handshake. The recipient of the handshake can't cancel it, but can use 'DeclineHandshake' instead. After a handshake is canceled, the recipient can no longer respond to that handshake.+--+-- After you cancel a handshake, it continues to appear in the results of relevant APIs for only 30 days. After that it is deleted.+--+module Network.AWS.Organizations.CancelHandshake+ (+ -- * Creating a Request+ cancelHandshake+ , CancelHandshake+ -- * Request Lenses+ , chHandshakeId++ -- * Destructuring the Response+ , cancelHandshakeResponse+ , CancelHandshakeResponse+ -- * Response Lenses+ , chrsHandshake+ , chrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'cancelHandshake' smart constructor.+newtype CancelHandshake = CancelHandshake'+ { _chHandshakeId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CancelHandshake' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'chHandshakeId' - The unique identifier (ID) of the handshake that you want to cancel. You can get the ID from the 'ListHandshakesForOrganization' operation. The <http://wikipedia.org/wiki/regex regex pattern> for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.+cancelHandshake+ :: Text -- ^ 'chHandshakeId'+ -> CancelHandshake+cancelHandshake pHandshakeId_ =+ CancelHandshake' {_chHandshakeId = pHandshakeId_}+++-- | The unique identifier (ID) of the handshake that you want to cancel. You can get the ID from the 'ListHandshakesForOrganization' operation. The <http://wikipedia.org/wiki/regex regex pattern> for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.+chHandshakeId :: Lens' CancelHandshake Text+chHandshakeId = lens _chHandshakeId (\ s a -> s{_chHandshakeId = a});++instance AWSRequest CancelHandshake where+ type Rs CancelHandshake = CancelHandshakeResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ CancelHandshakeResponse' <$>+ (x .?> "Handshake") <*> (pure (fromEnum s)))++instance Hashable CancelHandshake where++instance NFData CancelHandshake where++instance ToHeaders CancelHandshake where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.CancelHandshake" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CancelHandshake where+ toJSON CancelHandshake'{..}+ = object+ (catMaybes [Just ("HandshakeId" .= _chHandshakeId)])++instance ToPath CancelHandshake where+ toPath = const "/"++instance ToQuery CancelHandshake where+ toQuery = const mempty++-- | /See:/ 'cancelHandshakeResponse' smart constructor.+data CancelHandshakeResponse = CancelHandshakeResponse'+ { _chrsHandshake :: !(Maybe Handshake)+ , _chrsResponseStatus :: !Int+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CancelHandshakeResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'chrsHandshake' - A structure that contains details about the handshake that you canceled.+--+-- * 'chrsResponseStatus' - -- | The response status code.+cancelHandshakeResponse+ :: Int -- ^ 'chrsResponseStatus'+ -> CancelHandshakeResponse+cancelHandshakeResponse pResponseStatus_ =+ CancelHandshakeResponse'+ {_chrsHandshake = Nothing, _chrsResponseStatus = pResponseStatus_}+++-- | A structure that contains details about the handshake that you canceled.+chrsHandshake :: Lens' CancelHandshakeResponse (Maybe Handshake)+chrsHandshake = lens _chrsHandshake (\ s a -> s{_chrsHandshake = a});++-- | -- | The response status code.+chrsResponseStatus :: Lens' CancelHandshakeResponse Int+chrsResponseStatus = lens _chrsResponseStatus (\ s a -> s{_chrsResponseStatus = a});++instance NFData CancelHandshakeResponse where
+ gen/Network/AWS/Organizations/CreateAccount.hs view
@@ -0,0 +1,181 @@+{-# 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.Organizations.CreateAccount+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates an AWS account that is automatically a member of the organization whose credentials made the request. This is an asynchronous request that AWS performs in the background. If you want to check the status of the request later, you need the @OperationId@ response element from this operation to provide as a parameter to the 'DescribeCreateAccountStatus' operation.+--+--+-- The user who calls the API for an invitation to join must have the @organizations:CreateAccount@ permission. If you enabled all features in the organization, then the user must also have the @iam:CreateServiceLinkedRole@ permission so that Organizations can create the required service-linked role named /OrgsServiceLinkedRoleName/ . For more information, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integration_services.html#orgs_integration_service-linked-roles AWS Organizations and Service-Linked Roles> in the /AWS Organizations User Guide/ .+--+-- The user in the master account who calls this API must also have the @iam:CreateRole@ permission because AWS Organizations preconfigures the new member account with a role (named @OrganizationAccountAccessRole@ ) that grants users in the master account administrator permissions in the new member account. Principals in the master account can assume the role. AWS Organizations clones the company name and address information for the new account from the organization's master account.+--+-- This operation can be called only from the organization's master account.+--+-- For more information about creating accounts, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html Creating an AWS Account in Your Organization> in the /AWS Organizations User Guide/ .+--+-- /Important:/ When you create an account in an organization using the AWS Organizations console, API, or CLI commands, the information required for the account to operate as a standalone account, such as a payment method and signing the End User Licence Agreement (EULA) is /not/ automatically collected. If you must remove an account from your organization later, you can do so only after you provide the missing information. Follow the steps at <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info To leave an organization when all required account information has not yet been provided> in the /AWS Organizations User Guide/ .+--+-- /Important:/ If you get an exception that indicates that you exceeded your account limits for the organization or that you can"t add an account because your organization is still initializing, please contact <https://console.aws.amazon.com/support/home#/ AWS Customer Support> .+--+module Network.AWS.Organizations.CreateAccount+ (+ -- * Creating a Request+ createAccount+ , CreateAccount+ -- * Request Lenses+ , caIAMUserAccessToBilling+ , caRoleName+ , caEmail+ , caAccountName++ -- * Destructuring the Response+ , createAccountResponse+ , CreateAccountResponse+ -- * Response Lenses+ , carsCreateAccountStatus+ , carsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'createAccount' smart constructor.+data CreateAccount = CreateAccount'+ { _caIAMUserAccessToBilling :: !(Maybe IAMUserAccessToBilling)+ , _caRoleName :: !(Maybe Text)+ , _caEmail :: !(Sensitive Text)+ , _caAccountName :: !(Sensitive Text)+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateAccount' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'caIAMUserAccessToBilling' - If set to @ALLOW@ , the new account enables IAM users to access account billing information /if/ they have the required permissions. If set to @DENY@ , then only the root user of the new account can access account billing information. For more information, see <http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate Activating Access to the Billing and Cost Management Console> in the /AWS Billing and Cost Management User Guide/ . If you do not specify this parameter, the value defaults to ALLOW, and IAM users and roles with the required permissions can access billing information for the new account.+--+-- * 'caRoleName' - (Optional) The name of an IAM role that Organizations automatically preconfigures in the new member account. This role trusts the master account, allowing users in the master account to assume the role, as permitted by the master account administrator. The role has administrator permissions in the new member account. If you do not specify this parameter, the role name defaults to @OrganizationAccountAccessRole@ . For more information about how to use this role to access the member account, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role Accessing and Administering the Member Accounts in Your Organization> in the /AWS Organizations User Guide/ , and steps 2 and 3 in <http://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html Tutorial: Delegate Access Across AWS Accounts Using IAM Roles> in the /IAM User Guide/ . The <http://wikipedia.org/wiki/regex regex pattern> that is used to validate this parameter is a string of characters that can consist of uppercase letters, lowercase letters, digits with no spaces, and any of the following characters: =,.@-+--+-- * 'caEmail' - The email address of the owner to assign to the new member account. This email address must not already be associated with another AWS account. You must use a valid email address to complete account creation. You cannot access the root user of the account or remove an account that was created with an invalid email address.+--+-- * 'caAccountName' - The friendly name of the member account.+createAccount+ :: Text -- ^ 'caEmail'+ -> Text -- ^ 'caAccountName'+ -> CreateAccount+createAccount pEmail_ pAccountName_ =+ CreateAccount'+ { _caIAMUserAccessToBilling = Nothing+ , _caRoleName = Nothing+ , _caEmail = _Sensitive # pEmail_+ , _caAccountName = _Sensitive # pAccountName_+ }+++-- | If set to @ALLOW@ , the new account enables IAM users to access account billing information /if/ they have the required permissions. If set to @DENY@ , then only the root user of the new account can access account billing information. For more information, see <http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate Activating Access to the Billing and Cost Management Console> in the /AWS Billing and Cost Management User Guide/ . If you do not specify this parameter, the value defaults to ALLOW, and IAM users and roles with the required permissions can access billing information for the new account.+caIAMUserAccessToBilling :: Lens' CreateAccount (Maybe IAMUserAccessToBilling)+caIAMUserAccessToBilling = lens _caIAMUserAccessToBilling (\ s a -> s{_caIAMUserAccessToBilling = a});++-- | (Optional) The name of an IAM role that Organizations automatically preconfigures in the new member account. This role trusts the master account, allowing users in the master account to assume the role, as permitted by the master account administrator. The role has administrator permissions in the new member account. If you do not specify this parameter, the role name defaults to @OrganizationAccountAccessRole@ . For more information about how to use this role to access the member account, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role Accessing and Administering the Member Accounts in Your Organization> in the /AWS Organizations User Guide/ , and steps 2 and 3 in <http://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html Tutorial: Delegate Access Across AWS Accounts Using IAM Roles> in the /IAM User Guide/ . The <http://wikipedia.org/wiki/regex regex pattern> that is used to validate this parameter is a string of characters that can consist of uppercase letters, lowercase letters, digits with no spaces, and any of the following characters: =,.@-+caRoleName :: Lens' CreateAccount (Maybe Text)+caRoleName = lens _caRoleName (\ s a -> s{_caRoleName = a});++-- | The email address of the owner to assign to the new member account. This email address must not already be associated with another AWS account. You must use a valid email address to complete account creation. You cannot access the root user of the account or remove an account that was created with an invalid email address.+caEmail :: Lens' CreateAccount Text+caEmail = lens _caEmail (\ s a -> s{_caEmail = a}) . _Sensitive;++-- | The friendly name of the member account.+caAccountName :: Lens' CreateAccount Text+caAccountName = lens _caAccountName (\ s a -> s{_caAccountName = a}) . _Sensitive;++instance AWSRequest CreateAccount where+ type Rs CreateAccount = CreateAccountResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ CreateAccountResponse' <$>+ (x .?> "CreateAccountStatus") <*>+ (pure (fromEnum s)))++instance Hashable CreateAccount where++instance NFData CreateAccount where++instance ToHeaders CreateAccount where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.CreateAccount" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateAccount where+ toJSON CreateAccount'{..}+ = object+ (catMaybes+ [("IamUserAccessToBilling" .=) <$>+ _caIAMUserAccessToBilling,+ ("RoleName" .=) <$> _caRoleName,+ Just ("Email" .= _caEmail),+ Just ("AccountName" .= _caAccountName)])++instance ToPath CreateAccount where+ toPath = const "/"++instance ToQuery CreateAccount where+ toQuery = const mempty++-- | /See:/ 'createAccountResponse' smart constructor.+data CreateAccountResponse = CreateAccountResponse'+ { _carsCreateAccountStatus :: !(Maybe CreateAccountStatus)+ , _carsResponseStatus :: !Int+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateAccountResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'carsCreateAccountStatus' - A structure that contains details about the request to create an account. This response structure might not be fully populated when you first receive it because account creation is an asynchronous process. You can pass the returned CreateAccountStatus ID as a parameter to @'DescribeCreateAccountStatus' @ to get status about the progress of the request at later times.+--+-- * 'carsResponseStatus' - -- | The response status code.+createAccountResponse+ :: Int -- ^ 'carsResponseStatus'+ -> CreateAccountResponse+createAccountResponse pResponseStatus_ =+ CreateAccountResponse'+ {_carsCreateAccountStatus = Nothing, _carsResponseStatus = pResponseStatus_}+++-- | A structure that contains details about the request to create an account. This response structure might not be fully populated when you first receive it because account creation is an asynchronous process. You can pass the returned CreateAccountStatus ID as a parameter to @'DescribeCreateAccountStatus' @ to get status about the progress of the request at later times.+carsCreateAccountStatus :: Lens' CreateAccountResponse (Maybe CreateAccountStatus)+carsCreateAccountStatus = lens _carsCreateAccountStatus (\ s a -> s{_carsCreateAccountStatus = a});++-- | -- | The response status code.+carsResponseStatus :: Lens' CreateAccountResponse Int+carsResponseStatus = lens _carsResponseStatus (\ s a -> s{_carsResponseStatus = a});++instance NFData CreateAccountResponse where
+ gen/Network/AWS/Organizations/CreateOrganization.hs view
@@ -0,0 +1,136 @@+{-# 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.Organizations.CreateOrganization+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates an AWS organization. The account whose user is calling the CreateOrganization operation automatically becomes the <http://docs.aws.amazon.com/IAM/latest/UserGuide/orgs_getting-started_concepts.html#account master account> of the new organization.+--+--+-- This operation must be called using credentials from the account that is to become the new organization's master account. The principal must also have the relevant IAM permissions.+--+-- By default (or if you set the @FeatureSet@ parameter to @ALL@ ), the new organization is created with all features enabled and service control policies automatically enabled in the root. If you instead choose to create the organization supporting only the consolidated billing features by setting the @FeatureSet@ parameter to @CONSOLIDATED_BILLING"@ , then no policy types are enabled by default and you cannot use organization policies.+--+module Network.AWS.Organizations.CreateOrganization+ (+ -- * Creating a Request+ createOrganization+ , CreateOrganization+ -- * Request Lenses+ , coFeatureSet++ -- * Destructuring the Response+ , createOrganizationResponse+ , CreateOrganizationResponse+ -- * Response Lenses+ , corsOrganization+ , corsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'createOrganization' smart constructor.+newtype CreateOrganization = CreateOrganization'+ { _coFeatureSet :: Maybe OrganizationFeatureSet+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateOrganization' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'coFeatureSet' - Specifies the feature set supported by the new organization. Each feature set supports different levels of functionality. * /CONSOLIDATED_BILLING/ : All member accounts have their bills consolidated to and paid by the master account. For more information, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-cb-only Consolidated Billing> in the /AWS Organizations User Guide/ . * /ALL/ : In addition to all the features supported by the consolidated billing feature set, the master account can also apply any type of policy to any member account in the organization. For more information, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-all All features> in the /AWS Organizations User Guide/ .+createOrganization+ :: CreateOrganization+createOrganization = CreateOrganization' {_coFeatureSet = Nothing}+++-- | Specifies the feature set supported by the new organization. Each feature set supports different levels of functionality. * /CONSOLIDATED_BILLING/ : All member accounts have their bills consolidated to and paid by the master account. For more information, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-cb-only Consolidated Billing> in the /AWS Organizations User Guide/ . * /ALL/ : In addition to all the features supported by the consolidated billing feature set, the master account can also apply any type of policy to any member account in the organization. For more information, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-all All features> in the /AWS Organizations User Guide/ .+coFeatureSet :: Lens' CreateOrganization (Maybe OrganizationFeatureSet)+coFeatureSet = lens _coFeatureSet (\ s a -> s{_coFeatureSet = a});++instance AWSRequest CreateOrganization where+ type Rs CreateOrganization =+ CreateOrganizationResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ CreateOrganizationResponse' <$>+ (x .?> "Organization") <*> (pure (fromEnum s)))++instance Hashable CreateOrganization where++instance NFData CreateOrganization where++instance ToHeaders CreateOrganization where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.CreateOrganization" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateOrganization where+ toJSON CreateOrganization'{..}+ = object+ (catMaybes [("FeatureSet" .=) <$> _coFeatureSet])++instance ToPath CreateOrganization where+ toPath = const "/"++instance ToQuery CreateOrganization where+ toQuery = const mempty++-- | /See:/ 'createOrganizationResponse' smart constructor.+data CreateOrganizationResponse = CreateOrganizationResponse'+ { _corsOrganization :: !(Maybe Organization)+ , _corsResponseStatus :: !Int+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateOrganizationResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'corsOrganization' - A structure that contains details about the newly created organization.+--+-- * 'corsResponseStatus' - -- | The response status code.+createOrganizationResponse+ :: Int -- ^ 'corsResponseStatus'+ -> CreateOrganizationResponse+createOrganizationResponse pResponseStatus_ =+ CreateOrganizationResponse'+ {_corsOrganization = Nothing, _corsResponseStatus = pResponseStatus_}+++-- | A structure that contains details about the newly created organization.+corsOrganization :: Lens' CreateOrganizationResponse (Maybe Organization)+corsOrganization = lens _corsOrganization (\ s a -> s{_corsOrganization = a});++-- | -- | The response status code.+corsResponseStatus :: Lens' CreateOrganizationResponse Int+corsResponseStatus = lens _corsResponseStatus (\ s a -> s{_corsResponseStatus = a});++instance NFData CreateOrganizationResponse where
+ gen/Network/AWS/Organizations/CreateOrganizationalUnit.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.Organizations.CreateOrganizationalUnit+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates an organizational unit (OU) within a root or parent OU. An OU is a container for accounts that enables you to organize your accounts to apply policies according to your business requirements. The number of levels deep that you can nest OUs is dependent upon the policy types enabled for that root. For service control policies, the limit is five.+--+--+-- For more information about OUs, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_ous.html Managing Organizational Units> in the /AWS Organizations User Guide/ .+--+-- This operation can be called only from the organization's master account.+--+module Network.AWS.Organizations.CreateOrganizationalUnit+ (+ -- * Creating a Request+ createOrganizationalUnit+ , CreateOrganizationalUnit+ -- * Request Lenses+ , couParentId+ , couName++ -- * Destructuring the Response+ , createOrganizationalUnitResponse+ , CreateOrganizationalUnitResponse+ -- * Response Lenses+ , coursOrganizationalUnit+ , coursResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'createOrganizationalUnit' smart constructor.+data CreateOrganizationalUnit = CreateOrganizationalUnit'+ { _couParentId :: !Text+ , _couName :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateOrganizationalUnit' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'couParentId' - The unique identifier (ID) of the parent root or OU in which you want to create the new OU. The <http://wikipedia.org/wiki/regex regex pattern> for a parent ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+--+-- * 'couName' - The friendly name to assign to the new OU.+createOrganizationalUnit+ :: Text -- ^ 'couParentId'+ -> Text -- ^ 'couName'+ -> CreateOrganizationalUnit+createOrganizationalUnit pParentId_ pName_ =+ CreateOrganizationalUnit' {_couParentId = pParentId_, _couName = pName_}+++-- | The unique identifier (ID) of the parent root or OU in which you want to create the new OU. The <http://wikipedia.org/wiki/regex regex pattern> for a parent ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+couParentId :: Lens' CreateOrganizationalUnit Text+couParentId = lens _couParentId (\ s a -> s{_couParentId = a});++-- | The friendly name to assign to the new OU.+couName :: Lens' CreateOrganizationalUnit Text+couName = lens _couName (\ s a -> s{_couName = a});++instance AWSRequest CreateOrganizationalUnit where+ type Rs CreateOrganizationalUnit =+ CreateOrganizationalUnitResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ CreateOrganizationalUnitResponse' <$>+ (x .?> "OrganizationalUnit") <*> (pure (fromEnum s)))++instance Hashable CreateOrganizationalUnit where++instance NFData CreateOrganizationalUnit where++instance ToHeaders CreateOrganizationalUnit where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.CreateOrganizationalUnit"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateOrganizationalUnit where+ toJSON CreateOrganizationalUnit'{..}+ = object+ (catMaybes+ [Just ("ParentId" .= _couParentId),+ Just ("Name" .= _couName)])++instance ToPath CreateOrganizationalUnit where+ toPath = const "/"++instance ToQuery CreateOrganizationalUnit where+ toQuery = const mempty++-- | /See:/ 'createOrganizationalUnitResponse' smart constructor.+data CreateOrganizationalUnitResponse = CreateOrganizationalUnitResponse'+ { _coursOrganizationalUnit :: !(Maybe OrganizationalUnit)+ , _coursResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateOrganizationalUnitResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'coursOrganizationalUnit' - A structure that contains details about the newly created OU.+--+-- * 'coursResponseStatus' - -- | The response status code.+createOrganizationalUnitResponse+ :: Int -- ^ 'coursResponseStatus'+ -> CreateOrganizationalUnitResponse+createOrganizationalUnitResponse pResponseStatus_ =+ CreateOrganizationalUnitResponse'+ {_coursOrganizationalUnit = Nothing, _coursResponseStatus = pResponseStatus_}+++-- | A structure that contains details about the newly created OU.+coursOrganizationalUnit :: Lens' CreateOrganizationalUnitResponse (Maybe OrganizationalUnit)+coursOrganizationalUnit = lens _coursOrganizationalUnit (\ s a -> s{_coursOrganizationalUnit = a});++-- | -- | The response status code.+coursResponseStatus :: Lens' CreateOrganizationalUnitResponse Int+coursResponseStatus = lens _coursResponseStatus (\ s a -> s{_coursResponseStatus = a});++instance NFData CreateOrganizationalUnitResponse+ where
+ gen/Network/AWS/Organizations/CreatePolicy.hs view
@@ -0,0 +1,172 @@+{-# 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.Organizations.CreatePolicy+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a policy of a specified type that you can attach to a root, an organizational unit (OU), or an individual AWS account.+--+--+-- For more information about policies and their use, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html Managing Organization Policies> .+--+-- This operation can be called only from the organization's master account.+--+module Network.AWS.Organizations.CreatePolicy+ (+ -- * Creating a Request+ createPolicy+ , CreatePolicy+ -- * Request Lenses+ , cpContent+ , cpDescription+ , cpName+ , cpType++ -- * Destructuring the Response+ , createPolicyResponse+ , CreatePolicyResponse+ -- * Response Lenses+ , cprsPolicy+ , cprsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'createPolicy' smart constructor.+data CreatePolicy = CreatePolicy'+ { _cpContent :: !Text+ , _cpDescription :: !Text+ , _cpName :: !Text+ , _cpType :: !PolicyType+ } 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:+--+-- * 'cpContent' - The policy content to add to the new policy. For example, if you create a <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html service control policy> (SCP), this string must be JSON text that specifies the permissions that admins in attached accounts can delegate to their users, groups, and roles. For more information about the SCP syntax, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html Service Control Policy Syntax> in the /AWS Organizations User Guide/ .+--+-- * 'cpDescription' - An optional description to assign to the policy.+--+-- * 'cpName' - The friendly name to assign to the policy. The <http://wikipedia.org/wiki/regex regex pattern> that is used to validate this parameter is a string of any of the characters in the ASCII character range.+--+-- * 'cpType' - The type of policy to create.+createPolicy+ :: Text -- ^ 'cpContent'+ -> Text -- ^ 'cpDescription'+ -> Text -- ^ 'cpName'+ -> PolicyType -- ^ 'cpType'+ -> CreatePolicy+createPolicy pContent_ pDescription_ pName_ pType_ =+ CreatePolicy'+ { _cpContent = pContent_+ , _cpDescription = pDescription_+ , _cpName = pName_+ , _cpType = pType_+ }+++-- | The policy content to add to the new policy. For example, if you create a <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html service control policy> (SCP), this string must be JSON text that specifies the permissions that admins in attached accounts can delegate to their users, groups, and roles. For more information about the SCP syntax, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html Service Control Policy Syntax> in the /AWS Organizations User Guide/ .+cpContent :: Lens' CreatePolicy Text+cpContent = lens _cpContent (\ s a -> s{_cpContent = a});++-- | An optional description to assign to the policy.+cpDescription :: Lens' CreatePolicy Text+cpDescription = lens _cpDescription (\ s a -> s{_cpDescription = a});++-- | The friendly name to assign to the policy. The <http://wikipedia.org/wiki/regex regex pattern> that is used to validate this parameter is a string of any of the characters in the ASCII character range.+cpName :: Lens' CreatePolicy Text+cpName = lens _cpName (\ s a -> s{_cpName = a});++-- | The type of policy to create.+cpType :: Lens' CreatePolicy PolicyType+cpType = lens _cpType (\ s a -> s{_cpType = a});++instance AWSRequest CreatePolicy where+ type Rs CreatePolicy = CreatePolicyResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ CreatePolicyResponse' <$>+ (x .?> "Policy") <*> (pure (fromEnum s)))++instance Hashable CreatePolicy where++instance NFData CreatePolicy where++instance ToHeaders CreatePolicy where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.CreatePolicy" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreatePolicy where+ toJSON CreatePolicy'{..}+ = object+ (catMaybes+ [Just ("Content" .= _cpContent),+ Just ("Description" .= _cpDescription),+ Just ("Name" .= _cpName), Just ("Type" .= _cpType)])++instance ToPath CreatePolicy where+ toPath = const "/"++instance ToQuery CreatePolicy where+ toQuery = const mempty++-- | /See:/ 'createPolicyResponse' smart constructor.+data CreatePolicyResponse = CreatePolicyResponse'+ { _cprsPolicy :: !(Maybe Policy)+ , _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:+--+-- * 'cprsPolicy' - A structure that contains details about the newly created policy.+--+-- * 'cprsResponseStatus' - -- | The response status code.+createPolicyResponse+ :: Int -- ^ 'cprsResponseStatus'+ -> CreatePolicyResponse+createPolicyResponse pResponseStatus_ =+ CreatePolicyResponse'+ {_cprsPolicy = Nothing, _cprsResponseStatus = pResponseStatus_}+++-- | A structure that contains details about the newly created policy.+cprsPolicy :: Lens' CreatePolicyResponse (Maybe Policy)+cprsPolicy = lens _cprsPolicy (\ s a -> s{_cprsPolicy = a});++-- | -- | The response status code.+cprsResponseStatus :: Lens' CreatePolicyResponse Int+cprsResponseStatus = lens _cprsResponseStatus (\ s a -> s{_cprsResponseStatus = a});++instance NFData CreatePolicyResponse where
+ gen/Network/AWS/Organizations/DeclineHandshake.hs view
@@ -0,0 +1,137 @@+{-# 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.Organizations.DeclineHandshake+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Declines a handshake request. This sets the handshake state to @DECLINED@ and effectively deactivates the request.+--+--+-- This operation can be called only from the account that received the handshake. The originator of the handshake can use 'CancelHandshake' instead. The originator can't reactivate a declined request, but can re-initiate the process with a new handshake request.+--+-- After you decline a handshake, it continues to appear in the results of relevant APIs for only 30 days. After that it is deleted.+--+module Network.AWS.Organizations.DeclineHandshake+ (+ -- * Creating a Request+ declineHandshake+ , DeclineHandshake+ -- * Request Lenses+ , dHandshakeId++ -- * Destructuring the Response+ , declineHandshakeResponse+ , DeclineHandshakeResponse+ -- * Response Lenses+ , drsHandshake+ , drsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'declineHandshake' smart constructor.+newtype DeclineHandshake = DeclineHandshake'+ { _dHandshakeId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeclineHandshake' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dHandshakeId' - The unique identifier (ID) of the handshake that you want to decline. You can get the ID from the 'ListHandshakesForAccount' operation. The <http://wikipedia.org/wiki/regex regex pattern> for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.+declineHandshake+ :: Text -- ^ 'dHandshakeId'+ -> DeclineHandshake+declineHandshake pHandshakeId_ =+ DeclineHandshake' {_dHandshakeId = pHandshakeId_}+++-- | The unique identifier (ID) of the handshake that you want to decline. You can get the ID from the 'ListHandshakesForAccount' operation. The <http://wikipedia.org/wiki/regex regex pattern> for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.+dHandshakeId :: Lens' DeclineHandshake Text+dHandshakeId = lens _dHandshakeId (\ s a -> s{_dHandshakeId = a});++instance AWSRequest DeclineHandshake where+ type Rs DeclineHandshake = DeclineHandshakeResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ DeclineHandshakeResponse' <$>+ (x .?> "Handshake") <*> (pure (fromEnum s)))++instance Hashable DeclineHandshake where++instance NFData DeclineHandshake where++instance ToHeaders DeclineHandshake where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.DeclineHandshake" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeclineHandshake where+ toJSON DeclineHandshake'{..}+ = object+ (catMaybes [Just ("HandshakeId" .= _dHandshakeId)])++instance ToPath DeclineHandshake where+ toPath = const "/"++instance ToQuery DeclineHandshake where+ toQuery = const mempty++-- | /See:/ 'declineHandshakeResponse' smart constructor.+data DeclineHandshakeResponse = DeclineHandshakeResponse'+ { _drsHandshake :: !(Maybe Handshake)+ , _drsResponseStatus :: !Int+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeclineHandshakeResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'drsHandshake' - A structure that contains details about the declined handshake. The state is updated to show the value @DECLINED@ .+--+-- * 'drsResponseStatus' - -- | The response status code.+declineHandshakeResponse+ :: Int -- ^ 'drsResponseStatus'+ -> DeclineHandshakeResponse+declineHandshakeResponse pResponseStatus_ =+ DeclineHandshakeResponse'+ {_drsHandshake = Nothing, _drsResponseStatus = pResponseStatus_}+++-- | A structure that contains details about the declined handshake. The state is updated to show the value @DECLINED@ .+drsHandshake :: Lens' DeclineHandshakeResponse (Maybe Handshake)+drsHandshake = lens _drsHandshake (\ s a -> s{_drsHandshake = a});++-- | -- | The response status code.+drsResponseStatus :: Lens' DeclineHandshakeResponse Int+drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a});++instance NFData DeclineHandshakeResponse where
+ gen/Network/AWS/Organizations/DeleteOrganization.hs view
@@ -0,0 +1,97 @@+{-# 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.Organizations.DeleteOrganization+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the organization. You can delete an organization only by using credentials from the master account. The organization must be empty of member accounts, OUs, and policies.+--+--+module Network.AWS.Organizations.DeleteOrganization+ (+ -- * Creating a Request+ deleteOrganization+ , DeleteOrganization++ -- * Destructuring the Response+ , deleteOrganizationResponse+ , DeleteOrganizationResponse+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'deleteOrganization' smart constructor.+data DeleteOrganization =+ DeleteOrganization'+ deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteOrganization' with the minimum fields required to make a request.+--+deleteOrganization+ :: DeleteOrganization+deleteOrganization = DeleteOrganization'+++instance AWSRequest DeleteOrganization where+ type Rs DeleteOrganization =+ DeleteOrganizationResponse+ request = postJSON organizations+ response = receiveNull DeleteOrganizationResponse'++instance Hashable DeleteOrganization where++instance NFData DeleteOrganization where++instance ToHeaders DeleteOrganization where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.DeleteOrganization" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteOrganization where+ toJSON = const (Object mempty)++instance ToPath DeleteOrganization where+ toPath = const "/"++instance ToQuery DeleteOrganization where+ toQuery = const mempty++-- | /See:/ 'deleteOrganizationResponse' smart constructor.+data DeleteOrganizationResponse =+ DeleteOrganizationResponse'+ deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteOrganizationResponse' with the minimum fields required to make a request.+--+deleteOrganizationResponse+ :: DeleteOrganizationResponse+deleteOrganizationResponse = DeleteOrganizationResponse'+++instance NFData DeleteOrganizationResponse where
+ gen/Network/AWS/Organizations/DeleteOrganizationalUnit.hs view
@@ -0,0 +1,116 @@+{-# 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.Organizations.DeleteOrganizationalUnit+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes an organizational unit from a root or another OU. You must first remove all accounts and child OUs from the OU that you want to delete.+--+--+-- This operation can be called only from the organization's master account.+--+module Network.AWS.Organizations.DeleteOrganizationalUnit+ (+ -- * Creating a Request+ deleteOrganizationalUnit+ , DeleteOrganizationalUnit+ -- * Request Lenses+ , dOrganizationalUnitId++ -- * Destructuring the Response+ , deleteOrganizationalUnitResponse+ , DeleteOrganizationalUnitResponse+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'deleteOrganizationalUnit' smart constructor.+newtype DeleteOrganizationalUnit = DeleteOrganizationalUnit'+ { _dOrganizationalUnitId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteOrganizationalUnit' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dOrganizationalUnitId' - The unique identifier (ID) of the organizational unit that you want to delete. You can get the ID from the 'ListOrganizationalUnitsForParent' operation. The <http://wikipedia.org/wiki/regex regex pattern> for an organizational unit ID string requires "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that contains the OU) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+deleteOrganizationalUnit+ :: Text -- ^ 'dOrganizationalUnitId'+ -> DeleteOrganizationalUnit+deleteOrganizationalUnit pOrganizationalUnitId_ =+ DeleteOrganizationalUnit' {_dOrganizationalUnitId = pOrganizationalUnitId_}+++-- | The unique identifier (ID) of the organizational unit that you want to delete. You can get the ID from the 'ListOrganizationalUnitsForParent' operation. The <http://wikipedia.org/wiki/regex regex pattern> for an organizational unit ID string requires "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that contains the OU) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+dOrganizationalUnitId :: Lens' DeleteOrganizationalUnit Text+dOrganizationalUnitId = lens _dOrganizationalUnitId (\ s a -> s{_dOrganizationalUnitId = a});++instance AWSRequest DeleteOrganizationalUnit where+ type Rs DeleteOrganizationalUnit =+ DeleteOrganizationalUnitResponse+ request = postJSON organizations+ response+ = receiveNull DeleteOrganizationalUnitResponse'++instance Hashable DeleteOrganizationalUnit where++instance NFData DeleteOrganizationalUnit where++instance ToHeaders DeleteOrganizationalUnit where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.DeleteOrganizationalUnit"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteOrganizationalUnit where+ toJSON DeleteOrganizationalUnit'{..}+ = object+ (catMaybes+ [Just+ ("OrganizationalUnitId" .= _dOrganizationalUnitId)])++instance ToPath DeleteOrganizationalUnit where+ toPath = const "/"++instance ToQuery DeleteOrganizationalUnit where+ toQuery = const mempty++-- | /See:/ 'deleteOrganizationalUnitResponse' smart constructor.+data DeleteOrganizationalUnitResponse =+ DeleteOrganizationalUnitResponse'+ deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteOrganizationalUnitResponse' with the minimum fields required to make a request.+--+deleteOrganizationalUnitResponse+ :: DeleteOrganizationalUnitResponse+deleteOrganizationalUnitResponse = DeleteOrganizationalUnitResponse'+++instance NFData DeleteOrganizationalUnitResponse+ where
+ gen/Network/AWS/Organizations/DeletePolicy.hs view
@@ -0,0 +1,110 @@+{-# 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.Organizations.DeletePolicy+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the specified policy from your organization. Before you perform this operation, you must first detach the policy from all OUs, roots, and accounts.+--+--+-- This operation can be called only from the organization's master account.+--+module Network.AWS.Organizations.DeletePolicy+ (+ -- * Creating a Request+ deletePolicy+ , DeletePolicy+ -- * Request Lenses+ , dPolicyId++ -- * Destructuring the Response+ , deletePolicyResponse+ , DeletePolicyResponse+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'deletePolicy' smart constructor.+newtype DeletePolicy = DeletePolicy'+ { _dPolicyId :: 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:+--+-- * 'dPolicyId' - The unique identifier (ID) of the policy that you want to delete. You can get the ID from the 'ListPolicies' or 'ListPoliciesForTarget' operations. The <http://wikipedia.org/wiki/regex regex pattern> for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.+deletePolicy+ :: Text -- ^ 'dPolicyId'+ -> DeletePolicy+deletePolicy pPolicyId_ = DeletePolicy' {_dPolicyId = pPolicyId_}+++-- | The unique identifier (ID) of the policy that you want to delete. You can get the ID from the 'ListPolicies' or 'ListPoliciesForTarget' operations. The <http://wikipedia.org/wiki/regex regex pattern> for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.+dPolicyId :: Lens' DeletePolicy Text+dPolicyId = lens _dPolicyId (\ s a -> s{_dPolicyId = a});++instance AWSRequest DeletePolicy where+ type Rs DeletePolicy = DeletePolicyResponse+ request = postJSON organizations+ response = receiveNull DeletePolicyResponse'++instance Hashable DeletePolicy where++instance NFData DeletePolicy where++instance ToHeaders DeletePolicy where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.DeletePolicy" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeletePolicy where+ toJSON DeletePolicy'{..}+ = object+ (catMaybes [Just ("PolicyId" .= _dPolicyId)])++instance ToPath DeletePolicy where+ toPath = const "/"++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'+++instance NFData DeletePolicyResponse where
+ gen/Network/AWS/Organizations/DescribeAccount.hs view
@@ -0,0 +1,134 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Organizations.DescribeAccount+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves Organizations-related information about the specified account.+--+--+-- This operation can be called only from the organization's master account.+--+module Network.AWS.Organizations.DescribeAccount+ (+ -- * Creating a Request+ describeAccount+ , DescribeAccount+ -- * Request Lenses+ , daAccountId++ -- * Destructuring the Response+ , describeAccountResponse+ , DescribeAccountResponse+ -- * Response Lenses+ , darsAccount+ , darsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'describeAccount' smart constructor.+newtype DescribeAccount = DescribeAccount'+ { _daAccountId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeAccount' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'daAccountId' - The unique identifier (ID) of the AWS account that you want information about. You can get the ID from the 'ListAccounts' or 'ListAccountsForParent' operations. The <http://wikipedia.org/wiki/regex regex pattern> for an account ID string requires exactly 12 digits.+describeAccount+ :: Text -- ^ 'daAccountId'+ -> DescribeAccount+describeAccount pAccountId_ = DescribeAccount' {_daAccountId = pAccountId_}+++-- | The unique identifier (ID) of the AWS account that you want information about. You can get the ID from the 'ListAccounts' or 'ListAccountsForParent' operations. The <http://wikipedia.org/wiki/regex regex pattern> for an account ID string requires exactly 12 digits.+daAccountId :: Lens' DescribeAccount Text+daAccountId = lens _daAccountId (\ s a -> s{_daAccountId = a});++instance AWSRequest DescribeAccount where+ type Rs DescribeAccount = DescribeAccountResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ DescribeAccountResponse' <$>+ (x .?> "Account") <*> (pure (fromEnum s)))++instance Hashable DescribeAccount where++instance NFData DescribeAccount where++instance ToHeaders DescribeAccount where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.DescribeAccount" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeAccount where+ toJSON DescribeAccount'{..}+ = object+ (catMaybes [Just ("AccountId" .= _daAccountId)])++instance ToPath DescribeAccount where+ toPath = const "/"++instance ToQuery DescribeAccount where+ toQuery = const mempty++-- | /See:/ 'describeAccountResponse' smart constructor.+data DescribeAccountResponse = DescribeAccountResponse'+ { _darsAccount :: !(Maybe Account)+ , _darsResponseStatus :: !Int+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeAccountResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'darsAccount' - A structure that contains information about the requested account.+--+-- * 'darsResponseStatus' - -- | The response status code.+describeAccountResponse+ :: Int -- ^ 'darsResponseStatus'+ -> DescribeAccountResponse+describeAccountResponse pResponseStatus_ =+ DescribeAccountResponse'+ {_darsAccount = Nothing, _darsResponseStatus = pResponseStatus_}+++-- | A structure that contains information about the requested account.+darsAccount :: Lens' DescribeAccountResponse (Maybe Account)+darsAccount = lens _darsAccount (\ s a -> s{_darsAccount = a});++-- | -- | The response status code.+darsResponseStatus :: Lens' DescribeAccountResponse Int+darsResponseStatus = lens _darsResponseStatus (\ s a -> s{_darsResponseStatus = a});++instance NFData DescribeAccountResponse where
+ gen/Network/AWS/Organizations/DescribeCreateAccountStatus.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.Organizations.DescribeCreateAccountStatus+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves the current status of an asynchronous request to create an account.+--+--+-- This operation can be called only from the organization's master account.+--+module Network.AWS.Organizations.DescribeCreateAccountStatus+ (+ -- * Creating a Request+ describeCreateAccountStatus+ , DescribeCreateAccountStatus+ -- * Request Lenses+ , dcasCreateAccountRequestId++ -- * Destructuring the Response+ , describeCreateAccountStatusResponse+ , DescribeCreateAccountStatusResponse+ -- * Response Lenses+ , dcasrsCreateAccountStatus+ , dcasrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'describeCreateAccountStatus' smart constructor.+newtype DescribeCreateAccountStatus = DescribeCreateAccountStatus'+ { _dcasCreateAccountRequestId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeCreateAccountStatus' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dcasCreateAccountRequestId' - Specifies the @operationId@ that uniquely identifies the request. You can get the ID from the response to an earlier 'CreateAccount' request, or from the 'ListCreateAccountStatus' operation. The <http://wikipedia.org/wiki/regex regex pattern> for an create account request ID string requires "car-" followed by from 8 to 32 lower-case letters or digits.+describeCreateAccountStatus+ :: Text -- ^ 'dcasCreateAccountRequestId'+ -> DescribeCreateAccountStatus+describeCreateAccountStatus pCreateAccountRequestId_ =+ DescribeCreateAccountStatus'+ {_dcasCreateAccountRequestId = pCreateAccountRequestId_}+++-- | Specifies the @operationId@ that uniquely identifies the request. You can get the ID from the response to an earlier 'CreateAccount' request, or from the 'ListCreateAccountStatus' operation. The <http://wikipedia.org/wiki/regex regex pattern> for an create account request ID string requires "car-" followed by from 8 to 32 lower-case letters or digits.+dcasCreateAccountRequestId :: Lens' DescribeCreateAccountStatus Text+dcasCreateAccountRequestId = lens _dcasCreateAccountRequestId (\ s a -> s{_dcasCreateAccountRequestId = a});++instance AWSRequest DescribeCreateAccountStatus where+ type Rs DescribeCreateAccountStatus =+ DescribeCreateAccountStatusResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ DescribeCreateAccountStatusResponse' <$>+ (x .?> "CreateAccountStatus") <*>+ (pure (fromEnum s)))++instance Hashable DescribeCreateAccountStatus where++instance NFData DescribeCreateAccountStatus where++instance ToHeaders DescribeCreateAccountStatus where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.DescribeCreateAccountStatus"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeCreateAccountStatus where+ toJSON DescribeCreateAccountStatus'{..}+ = object+ (catMaybes+ [Just+ ("CreateAccountRequestId" .=+ _dcasCreateAccountRequestId)])++instance ToPath DescribeCreateAccountStatus where+ toPath = const "/"++instance ToQuery DescribeCreateAccountStatus where+ toQuery = const mempty++-- | /See:/ 'describeCreateAccountStatusResponse' smart constructor.+data DescribeCreateAccountStatusResponse = DescribeCreateAccountStatusResponse'+ { _dcasrsCreateAccountStatus :: !(Maybe CreateAccountStatus)+ , _dcasrsResponseStatus :: !Int+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeCreateAccountStatusResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dcasrsCreateAccountStatus' - A structure that contains the current status of an account creation request.+--+-- * 'dcasrsResponseStatus' - -- | The response status code.+describeCreateAccountStatusResponse+ :: Int -- ^ 'dcasrsResponseStatus'+ -> DescribeCreateAccountStatusResponse+describeCreateAccountStatusResponse pResponseStatus_ =+ DescribeCreateAccountStatusResponse'+ { _dcasrsCreateAccountStatus = Nothing+ , _dcasrsResponseStatus = pResponseStatus_+ }+++-- | A structure that contains the current status of an account creation request.+dcasrsCreateAccountStatus :: Lens' DescribeCreateAccountStatusResponse (Maybe CreateAccountStatus)+dcasrsCreateAccountStatus = lens _dcasrsCreateAccountStatus (\ s a -> s{_dcasrsCreateAccountStatus = a});++-- | -- | The response status code.+dcasrsResponseStatus :: Lens' DescribeCreateAccountStatusResponse Int+dcasrsResponseStatus = lens _dcasrsResponseStatus (\ s a -> s{_dcasrsResponseStatus = a});++instance NFData DescribeCreateAccountStatusResponse+ where
+ gen/Network/AWS/Organizations/DescribeHandshake.hs view
@@ -0,0 +1,137 @@+{-# 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.Organizations.DescribeHandshake+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves information about a previously requested handshake. The handshake ID comes from the response to the original 'InviteAccountToOrganization' operation that generated the handshake.+--+--+-- You can access handshakes that are ACCEPTED, DECLINED, or CANCELED for only 30 days after they change to that state. They are then deleted and no longer accessible.+--+-- This operation can be called from any account in the organization.+--+module Network.AWS.Organizations.DescribeHandshake+ (+ -- * Creating a Request+ describeHandshake+ , DescribeHandshake+ -- * Request Lenses+ , dhHandshakeId++ -- * Destructuring the Response+ , describeHandshakeResponse+ , DescribeHandshakeResponse+ -- * Response Lenses+ , dhrsHandshake+ , dhrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'describeHandshake' smart constructor.+newtype DescribeHandshake = DescribeHandshake'+ { _dhHandshakeId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeHandshake' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dhHandshakeId' - The unique identifier (ID) of the handshake that you want information about. You can get the ID from the original call to 'InviteAccountToOrganization' , or from a call to 'ListHandshakesForAccount' or 'ListHandshakesForOrganization' . The <http://wikipedia.org/wiki/regex regex pattern> for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.+describeHandshake+ :: Text -- ^ 'dhHandshakeId'+ -> DescribeHandshake+describeHandshake pHandshakeId_ =+ DescribeHandshake' {_dhHandshakeId = pHandshakeId_}+++-- | The unique identifier (ID) of the handshake that you want information about. You can get the ID from the original call to 'InviteAccountToOrganization' , or from a call to 'ListHandshakesForAccount' or 'ListHandshakesForOrganization' . The <http://wikipedia.org/wiki/regex regex pattern> for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.+dhHandshakeId :: Lens' DescribeHandshake Text+dhHandshakeId = lens _dhHandshakeId (\ s a -> s{_dhHandshakeId = a});++instance AWSRequest DescribeHandshake where+ type Rs DescribeHandshake = DescribeHandshakeResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ DescribeHandshakeResponse' <$>+ (x .?> "Handshake") <*> (pure (fromEnum s)))++instance Hashable DescribeHandshake where++instance NFData DescribeHandshake where++instance ToHeaders DescribeHandshake where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.DescribeHandshake" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeHandshake where+ toJSON DescribeHandshake'{..}+ = object+ (catMaybes [Just ("HandshakeId" .= _dhHandshakeId)])++instance ToPath DescribeHandshake where+ toPath = const "/"++instance ToQuery DescribeHandshake where+ toQuery = const mempty++-- | /See:/ 'describeHandshakeResponse' smart constructor.+data DescribeHandshakeResponse = DescribeHandshakeResponse'+ { _dhrsHandshake :: !(Maybe Handshake)+ , _dhrsResponseStatus :: !Int+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeHandshakeResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dhrsHandshake' - A structure that contains information about the specified handshake.+--+-- * 'dhrsResponseStatus' - -- | The response status code.+describeHandshakeResponse+ :: Int -- ^ 'dhrsResponseStatus'+ -> DescribeHandshakeResponse+describeHandshakeResponse pResponseStatus_ =+ DescribeHandshakeResponse'+ {_dhrsHandshake = Nothing, _dhrsResponseStatus = pResponseStatus_}+++-- | A structure that contains information about the specified handshake.+dhrsHandshake :: Lens' DescribeHandshakeResponse (Maybe Handshake)+dhrsHandshake = lens _dhrsHandshake (\ s a -> s{_dhrsHandshake = a});++-- | -- | The response status code.+dhrsResponseStatus :: Lens' DescribeHandshakeResponse Int+dhrsResponseStatus = lens _dhrsResponseStatus (\ s a -> s{_dhrsResponseStatus = a});++instance NFData DescribeHandshakeResponse where
+ gen/Network/AWS/Organizations/DescribeOrganization.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.Organizations.DescribeOrganization+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves information about the organization that the user's account belongs to.+--+--+-- This operation can be called from any account in the organization.+--+module Network.AWS.Organizations.DescribeOrganization+ (+ -- * Creating a Request+ describeOrganization+ , DescribeOrganization++ -- * Destructuring the Response+ , describeOrganizationResponse+ , DescribeOrganizationResponse+ -- * Response Lenses+ , dorsOrganization+ , dorsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'describeOrganization' smart constructor.+data DescribeOrganization =+ DescribeOrganization'+ deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeOrganization' with the minimum fields required to make a request.+--+describeOrganization+ :: DescribeOrganization+describeOrganization = DescribeOrganization'+++instance AWSRequest DescribeOrganization where+ type Rs DescribeOrganization =+ DescribeOrganizationResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ DescribeOrganizationResponse' <$>+ (x .?> "Organization") <*> (pure (fromEnum s)))++instance Hashable DescribeOrganization where++instance NFData DescribeOrganization where++instance ToHeaders DescribeOrganization where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.DescribeOrganization" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeOrganization where+ toJSON = const (Object mempty)++instance ToPath DescribeOrganization where+ toPath = const "/"++instance ToQuery DescribeOrganization where+ toQuery = const mempty++-- | /See:/ 'describeOrganizationResponse' smart constructor.+data DescribeOrganizationResponse = DescribeOrganizationResponse'+ { _dorsOrganization :: !(Maybe Organization)+ , _dorsResponseStatus :: !Int+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeOrganizationResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dorsOrganization' - A structure that contains information about the organization.+--+-- * 'dorsResponseStatus' - -- | The response status code.+describeOrganizationResponse+ :: Int -- ^ 'dorsResponseStatus'+ -> DescribeOrganizationResponse+describeOrganizationResponse pResponseStatus_ =+ DescribeOrganizationResponse'+ {_dorsOrganization = Nothing, _dorsResponseStatus = pResponseStatus_}+++-- | A structure that contains information about the organization.+dorsOrganization :: Lens' DescribeOrganizationResponse (Maybe Organization)+dorsOrganization = lens _dorsOrganization (\ s a -> s{_dorsOrganization = a});++-- | -- | The response status code.+dorsResponseStatus :: Lens' DescribeOrganizationResponse Int+dorsResponseStatus = lens _dorsResponseStatus (\ s a -> s{_dorsResponseStatus = a});++instance NFData DescribeOrganizationResponse where
+ gen/Network/AWS/Organizations/DescribeOrganizationalUnit.hs view
@@ -0,0 +1,141 @@+{-# 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.Organizations.DescribeOrganizationalUnit+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves information about an organizational unit (OU).+--+--+-- This operation can be called only from the organization's master account.+--+module Network.AWS.Organizations.DescribeOrganizationalUnit+ (+ -- * Creating a Request+ describeOrganizationalUnit+ , DescribeOrganizationalUnit+ -- * Request Lenses+ , douOrganizationalUnitId++ -- * Destructuring the Response+ , describeOrganizationalUnitResponse+ , DescribeOrganizationalUnitResponse+ -- * Response Lenses+ , doursOrganizationalUnit+ , doursResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'describeOrganizationalUnit' smart constructor.+newtype DescribeOrganizationalUnit = DescribeOrganizationalUnit'+ { _douOrganizationalUnitId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeOrganizationalUnit' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'douOrganizationalUnitId' - The unique identifier (ID) of the organizational unit that you want details about. You can get the ID from the 'ListOrganizationalUnitsForParent' operation. The <http://wikipedia.org/wiki/regex regex pattern> for an organizational unit ID string requires "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that contains the OU) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+describeOrganizationalUnit+ :: Text -- ^ 'douOrganizationalUnitId'+ -> DescribeOrganizationalUnit+describeOrganizationalUnit pOrganizationalUnitId_ =+ DescribeOrganizationalUnit'+ {_douOrganizationalUnitId = pOrganizationalUnitId_}+++-- | The unique identifier (ID) of the organizational unit that you want details about. You can get the ID from the 'ListOrganizationalUnitsForParent' operation. The <http://wikipedia.org/wiki/regex regex pattern> for an organizational unit ID string requires "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that contains the OU) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+douOrganizationalUnitId :: Lens' DescribeOrganizationalUnit Text+douOrganizationalUnitId = lens _douOrganizationalUnitId (\ s a -> s{_douOrganizationalUnitId = a});++instance AWSRequest DescribeOrganizationalUnit where+ type Rs DescribeOrganizationalUnit =+ DescribeOrganizationalUnitResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ DescribeOrganizationalUnitResponse' <$>+ (x .?> "OrganizationalUnit") <*> (pure (fromEnum s)))++instance Hashable DescribeOrganizationalUnit where++instance NFData DescribeOrganizationalUnit where++instance ToHeaders DescribeOrganizationalUnit where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.DescribeOrganizationalUnit"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeOrganizationalUnit where+ toJSON DescribeOrganizationalUnit'{..}+ = object+ (catMaybes+ [Just+ ("OrganizationalUnitId" .=+ _douOrganizationalUnitId)])++instance ToPath DescribeOrganizationalUnit where+ toPath = const "/"++instance ToQuery DescribeOrganizationalUnit where+ toQuery = const mempty++-- | /See:/ 'describeOrganizationalUnitResponse' smart constructor.+data DescribeOrganizationalUnitResponse = DescribeOrganizationalUnitResponse'+ { _doursOrganizationalUnit :: !(Maybe OrganizationalUnit)+ , _doursResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeOrganizationalUnitResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'doursOrganizationalUnit' - A structure that contains details about the specified OU.+--+-- * 'doursResponseStatus' - -- | The response status code.+describeOrganizationalUnitResponse+ :: Int -- ^ 'doursResponseStatus'+ -> DescribeOrganizationalUnitResponse+describeOrganizationalUnitResponse pResponseStatus_ =+ DescribeOrganizationalUnitResponse'+ {_doursOrganizationalUnit = Nothing, _doursResponseStatus = pResponseStatus_}+++-- | A structure that contains details about the specified OU.+doursOrganizationalUnit :: Lens' DescribeOrganizationalUnitResponse (Maybe OrganizationalUnit)+doursOrganizationalUnit = lens _doursOrganizationalUnit (\ s a -> s{_doursOrganizationalUnit = a});++-- | -- | The response status code.+doursResponseStatus :: Lens' DescribeOrganizationalUnitResponse Int+doursResponseStatus = lens _doursResponseStatus (\ s a -> s{_doursResponseStatus = a});++instance NFData DescribeOrganizationalUnitResponse+ where
+ gen/Network/AWS/Organizations/DescribePolicy.hs view
@@ -0,0 +1,134 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Organizations.DescribePolicy+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves information about a policy.+--+--+-- This operation can be called only from the organization's master account.+--+module Network.AWS.Organizations.DescribePolicy+ (+ -- * Creating a Request+ describePolicy+ , DescribePolicy+ -- * Request Lenses+ , dpPolicyId++ -- * Destructuring the Response+ , describePolicyResponse+ , DescribePolicyResponse+ -- * Response Lenses+ , dprsPolicy+ , dprsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'describePolicy' smart constructor.+newtype DescribePolicy = DescribePolicy'+ { _dpPolicyId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribePolicy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dpPolicyId' - The unique identifier (ID) of the policy that you want details about. You can get the ID from the 'ListPolicies' or 'ListPoliciesForTarget' operations. The <http://wikipedia.org/wiki/regex regex pattern> for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.+describePolicy+ :: Text -- ^ 'dpPolicyId'+ -> DescribePolicy+describePolicy pPolicyId_ = DescribePolicy' {_dpPolicyId = pPolicyId_}+++-- | The unique identifier (ID) of the policy that you want details about. You can get the ID from the 'ListPolicies' or 'ListPoliciesForTarget' operations. The <http://wikipedia.org/wiki/regex regex pattern> for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.+dpPolicyId :: Lens' DescribePolicy Text+dpPolicyId = lens _dpPolicyId (\ s a -> s{_dpPolicyId = a});++instance AWSRequest DescribePolicy where+ type Rs DescribePolicy = DescribePolicyResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ DescribePolicyResponse' <$>+ (x .?> "Policy") <*> (pure (fromEnum s)))++instance Hashable DescribePolicy where++instance NFData DescribePolicy where++instance ToHeaders DescribePolicy where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.DescribePolicy" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribePolicy where+ toJSON DescribePolicy'{..}+ = object+ (catMaybes [Just ("PolicyId" .= _dpPolicyId)])++instance ToPath DescribePolicy where+ toPath = const "/"++instance ToQuery DescribePolicy where+ toQuery = const mempty++-- | /See:/ 'describePolicyResponse' smart constructor.+data DescribePolicyResponse = DescribePolicyResponse'+ { _dprsPolicy :: !(Maybe Policy)+ , _dprsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribePolicyResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dprsPolicy' - A structure that contains details about the specified policy.+--+-- * 'dprsResponseStatus' - -- | The response status code.+describePolicyResponse+ :: Int -- ^ 'dprsResponseStatus'+ -> DescribePolicyResponse+describePolicyResponse pResponseStatus_ =+ DescribePolicyResponse'+ {_dprsPolicy = Nothing, _dprsResponseStatus = pResponseStatus_}+++-- | A structure that contains details about the specified policy.+dprsPolicy :: Lens' DescribePolicyResponse (Maybe Policy)+dprsPolicy = lens _dprsPolicy (\ s a -> s{_dprsPolicy = a});++-- | -- | The response status code.+dprsResponseStatus :: Lens' DescribePolicyResponse Int+dprsResponseStatus = lens _dprsResponseStatus (\ s a -> s{_dprsResponseStatus = a});++instance NFData DescribePolicyResponse where
+ gen/Network/AWS/Organizations/DetachPolicy.hs view
@@ -0,0 +1,124 @@+{-# 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.Organizations.DetachPolicy+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Detaches a policy from a target root, organizational unit, or account. If the policy being detached is a service control policy (SCP), the changes to permissions for IAM users and roles in affected accounts are immediate.+--+--+-- __Note:__ Every root, OU, and account must have at least one SCP attached. If you want to replace the default @FullAWSAccess@ policy with one that limits the permissions that can be delegated, then you must attach the replacement policy before you can remove the default one. This is the authorization strategy of <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_about-scps.html#orgs_policies_whitelist whitelisting> . If you instead attach a second SCP and leave the @FullAWSAccess@ SCP still attached, and specify @"Effect": "Deny"@ in the second SCP to override the @"Effect": "Allow"@ in the @FullAWSAccess@ policy (or any other attached SCP), then you are using the authorization strategy of <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_about-scps.html#orgs_policies_blacklist blacklisting> .+--+-- This operation can be called only from the organization's master account.+--+module Network.AWS.Organizations.DetachPolicy+ (+ -- * Creating a Request+ detachPolicy+ , DetachPolicy+ -- * Request Lenses+ , detPolicyId+ , detTargetId++ -- * Destructuring the Response+ , detachPolicyResponse+ , DetachPolicyResponse+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'detachPolicy' smart constructor.+data DetachPolicy = DetachPolicy'+ { _detPolicyId :: !Text+ , _detTargetId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DetachPolicy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'detPolicyId' - The unique identifier (ID) of the policy you want to detach. You can get the ID from the 'ListPolicies' or 'ListPoliciesForTarget' operations. The <http://wikipedia.org/wiki/regex regex pattern> for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.+--+-- * 'detTargetId' - The unique identifier (ID) of the root, OU, or account from which you want to detach the policy. You can get the ID from the 'ListRoots' , 'ListOrganizationalUnitsForParent' , or 'ListAccounts' operations. The <http://wikipedia.org/wiki/regex regex pattern> for a target ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Account: a string that consists of exactly 12 digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+detachPolicy+ :: Text -- ^ 'detPolicyId'+ -> Text -- ^ 'detTargetId'+ -> DetachPolicy+detachPolicy pPolicyId_ pTargetId_ =+ DetachPolicy' {_detPolicyId = pPolicyId_, _detTargetId = pTargetId_}+++-- | The unique identifier (ID) of the policy you want to detach. You can get the ID from the 'ListPolicies' or 'ListPoliciesForTarget' operations. The <http://wikipedia.org/wiki/regex regex pattern> for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.+detPolicyId :: Lens' DetachPolicy Text+detPolicyId = lens _detPolicyId (\ s a -> s{_detPolicyId = a});++-- | The unique identifier (ID) of the root, OU, or account from which you want to detach the policy. You can get the ID from the 'ListRoots' , 'ListOrganizationalUnitsForParent' , or 'ListAccounts' operations. The <http://wikipedia.org/wiki/regex regex pattern> for a target ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Account: a string that consists of exactly 12 digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+detTargetId :: Lens' DetachPolicy Text+detTargetId = lens _detTargetId (\ s a -> s{_detTargetId = a});++instance AWSRequest DetachPolicy where+ type Rs DetachPolicy = DetachPolicyResponse+ request = postJSON organizations+ response = receiveNull DetachPolicyResponse'++instance Hashable DetachPolicy where++instance NFData DetachPolicy where++instance ToHeaders DetachPolicy where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.DetachPolicy" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DetachPolicy where+ toJSON DetachPolicy'{..}+ = object+ (catMaybes+ [Just ("PolicyId" .= _detPolicyId),+ Just ("TargetId" .= _detTargetId)])++instance ToPath DetachPolicy where+ toPath = const "/"++instance ToQuery DetachPolicy where+ toQuery = const mempty++-- | /See:/ 'detachPolicyResponse' smart constructor.+data DetachPolicyResponse =+ DetachPolicyResponse'+ deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DetachPolicyResponse' with the minimum fields required to make a request.+--+detachPolicyResponse+ :: DetachPolicyResponse+detachPolicyResponse = DetachPolicyResponse'+++instance NFData DetachPolicyResponse where
+ gen/Network/AWS/Organizations/DisablePolicyType.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.Organizations.DisablePolicyType+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Disables an organizational control policy type in a root. A policy of a certain type can be attached to entities in a root only if that type is enabled in the root. After you perform this operation, you no longer can attach policies of the specified type to that root or to any OU or account in that root. You can undo this by using the 'EnablePolicyType' operation.+--+--+-- This operation can be called only from the organization's master account.+--+module Network.AWS.Organizations.DisablePolicyType+ (+ -- * Creating a Request+ disablePolicyType+ , DisablePolicyType+ -- * Request Lenses+ , dptRootId+ , dptPolicyType++ -- * Destructuring the Response+ , disablePolicyTypeResponse+ , DisablePolicyTypeResponse+ -- * Response Lenses+ , dptrsRoot+ , dptrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'disablePolicyType' smart constructor.+data DisablePolicyType = DisablePolicyType'+ { _dptRootId :: !Text+ , _dptPolicyType :: !PolicyType+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DisablePolicyType' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dptRootId' - The unique identifier (ID) of the root in which you want to disable a policy type. You can get the ID from the 'ListRoots' operation. The <http://wikipedia.org/wiki/regex regex pattern> for a root ID string requires "r-" followed by from 4 to 32 lower-case letters or digits.+--+-- * 'dptPolicyType' - The policy type that you want to disable in this root.+disablePolicyType+ :: Text -- ^ 'dptRootId'+ -> PolicyType -- ^ 'dptPolicyType'+ -> DisablePolicyType+disablePolicyType pRootId_ pPolicyType_ =+ DisablePolicyType' {_dptRootId = pRootId_, _dptPolicyType = pPolicyType_}+++-- | The unique identifier (ID) of the root in which you want to disable a policy type. You can get the ID from the 'ListRoots' operation. The <http://wikipedia.org/wiki/regex regex pattern> for a root ID string requires "r-" followed by from 4 to 32 lower-case letters or digits.+dptRootId :: Lens' DisablePolicyType Text+dptRootId = lens _dptRootId (\ s a -> s{_dptRootId = a});++-- | The policy type that you want to disable in this root.+dptPolicyType :: Lens' DisablePolicyType PolicyType+dptPolicyType = lens _dptPolicyType (\ s a -> s{_dptPolicyType = a});++instance AWSRequest DisablePolicyType where+ type Rs DisablePolicyType = DisablePolicyTypeResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ DisablePolicyTypeResponse' <$>+ (x .?> "Root") <*> (pure (fromEnum s)))++instance Hashable DisablePolicyType where++instance NFData DisablePolicyType where++instance ToHeaders DisablePolicyType where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.DisablePolicyType" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DisablePolicyType where+ toJSON DisablePolicyType'{..}+ = object+ (catMaybes+ [Just ("RootId" .= _dptRootId),+ Just ("PolicyType" .= _dptPolicyType)])++instance ToPath DisablePolicyType where+ toPath = const "/"++instance ToQuery DisablePolicyType where+ toQuery = const mempty++-- | /See:/ 'disablePolicyTypeResponse' smart constructor.+data DisablePolicyTypeResponse = DisablePolicyTypeResponse'+ { _dptrsRoot :: !(Maybe Root)+ , _dptrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DisablePolicyTypeResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dptrsRoot' - A structure that shows the root with the updated list of enabled policy types.+--+-- * 'dptrsResponseStatus' - -- | The response status code.+disablePolicyTypeResponse+ :: Int -- ^ 'dptrsResponseStatus'+ -> DisablePolicyTypeResponse+disablePolicyTypeResponse pResponseStatus_ =+ DisablePolicyTypeResponse'+ {_dptrsRoot = Nothing, _dptrsResponseStatus = pResponseStatus_}+++-- | A structure that shows the root with the updated list of enabled policy types.+dptrsRoot :: Lens' DisablePolicyTypeResponse (Maybe Root)+dptrsRoot = lens _dptrsRoot (\ s a -> s{_dptrsRoot = a});++-- | -- | The response status code.+dptrsResponseStatus :: Lens' DisablePolicyTypeResponse Int+dptrsResponseStatus = lens _dptrsResponseStatus (\ s a -> s{_dptrsResponseStatus = a});++instance NFData DisablePolicyTypeResponse where
+ gen/Network/AWS/Organizations/EnableAllFeatures.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.Organizations.EnableAllFeatures+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Enables all features in an organization. This enables the use of organization policies that can restrict the services and actions that can be called in each account. Until you enable all features, you have access only to consolidated billing, and you can't use any of the advanced account administration features that AWS Organizations supports. For more information, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html Enabling All Features in Your Organization> in the /AWS Organizations User Guide/ .+--+--+-- /Important:/ This operation is required only for organizations that were created explicitly with only the consolidated billing features enabled, or that were migrated from a Consolidated Billing account family to Organizations. Calling this operation sends a handshake to every invited account in the organization. The feature set change can be finalized and the additional features enabled only after all administrators in the invited accounts approve the change by accepting the handshake.+--+-- After all invited member accounts accept the handshake, you finalize the feature set change by accepting the handshake that contains @"Action": "ENABLE_ALL_FEATURES"@ . This completes the change.+--+-- After you enable all features in your organization, the master account in the organization can apply policies on all member accounts. These policies can restrict what users and even administrators in those accounts can do. The master account can apply policies that prevent accounts from leaving the organization. Ensure that your account administrators are aware of this.+--+-- This operation can be called only from the organization's master account.+--+module Network.AWS.Organizations.EnableAllFeatures+ (+ -- * Creating a Request+ enableAllFeatures+ , EnableAllFeatures++ -- * Destructuring the Response+ , enableAllFeaturesResponse+ , EnableAllFeaturesResponse+ -- * Response Lenses+ , eafrsHandshake+ , eafrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'enableAllFeatures' smart constructor.+data EnableAllFeatures =+ EnableAllFeatures'+ deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'EnableAllFeatures' with the minimum fields required to make a request.+--+enableAllFeatures+ :: EnableAllFeatures+enableAllFeatures = EnableAllFeatures'+++instance AWSRequest EnableAllFeatures where+ type Rs EnableAllFeatures = EnableAllFeaturesResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ EnableAllFeaturesResponse' <$>+ (x .?> "Handshake") <*> (pure (fromEnum s)))++instance Hashable EnableAllFeatures where++instance NFData EnableAllFeatures where++instance ToHeaders EnableAllFeatures where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.EnableAllFeatures" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON EnableAllFeatures where+ toJSON = const (Object mempty)++instance ToPath EnableAllFeatures where+ toPath = const "/"++instance ToQuery EnableAllFeatures where+ toQuery = const mempty++-- | /See:/ 'enableAllFeaturesResponse' smart constructor.+data EnableAllFeaturesResponse = EnableAllFeaturesResponse'+ { _eafrsHandshake :: !(Maybe Handshake)+ , _eafrsResponseStatus :: !Int+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'EnableAllFeaturesResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'eafrsHandshake' - A structure that contains details about the handshake created to support this request to enable all features in the organization.+--+-- * 'eafrsResponseStatus' - -- | The response status code.+enableAllFeaturesResponse+ :: Int -- ^ 'eafrsResponseStatus'+ -> EnableAllFeaturesResponse+enableAllFeaturesResponse pResponseStatus_ =+ EnableAllFeaturesResponse'+ {_eafrsHandshake = Nothing, _eafrsResponseStatus = pResponseStatus_}+++-- | A structure that contains details about the handshake created to support this request to enable all features in the organization.+eafrsHandshake :: Lens' EnableAllFeaturesResponse (Maybe Handshake)+eafrsHandshake = lens _eafrsHandshake (\ s a -> s{_eafrsHandshake = a});++-- | -- | The response status code.+eafrsResponseStatus :: Lens' EnableAllFeaturesResponse Int+eafrsResponseStatus = lens _eafrsResponseStatus (\ s a -> s{_eafrsResponseStatus = a});++instance NFData EnableAllFeaturesResponse where
+ gen/Network/AWS/Organizations/EnablePolicyType.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.Organizations.EnablePolicyType+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Enables a policy type in a root. After you enable a policy type in a root, you can attach policies of that type to the root, any OU, or account in that root. You can undo this by using the 'DisablePolicyType' operation.+--+--+-- This operation can be called only from the organization's master account.+--+module Network.AWS.Organizations.EnablePolicyType+ (+ -- * Creating a Request+ enablePolicyType+ , EnablePolicyType+ -- * Request Lenses+ , eptRootId+ , eptPolicyType++ -- * Destructuring the Response+ , enablePolicyTypeResponse+ , EnablePolicyTypeResponse+ -- * Response Lenses+ , eptrsRoot+ , eptrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'enablePolicyType' smart constructor.+data EnablePolicyType = EnablePolicyType'+ { _eptRootId :: !Text+ , _eptPolicyType :: !PolicyType+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'EnablePolicyType' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'eptRootId' - The unique identifier (ID) of the root in which you want to enable a policy type. You can get the ID from the 'ListRoots' operation. The <http://wikipedia.org/wiki/regex regex pattern> for a root ID string requires "r-" followed by from 4 to 32 lower-case letters or digits.+--+-- * 'eptPolicyType' - The policy type that you want to enable.+enablePolicyType+ :: Text -- ^ 'eptRootId'+ -> PolicyType -- ^ 'eptPolicyType'+ -> EnablePolicyType+enablePolicyType pRootId_ pPolicyType_ =+ EnablePolicyType' {_eptRootId = pRootId_, _eptPolicyType = pPolicyType_}+++-- | The unique identifier (ID) of the root in which you want to enable a policy type. You can get the ID from the 'ListRoots' operation. The <http://wikipedia.org/wiki/regex regex pattern> for a root ID string requires "r-" followed by from 4 to 32 lower-case letters or digits.+eptRootId :: Lens' EnablePolicyType Text+eptRootId = lens _eptRootId (\ s a -> s{_eptRootId = a});++-- | The policy type that you want to enable.+eptPolicyType :: Lens' EnablePolicyType PolicyType+eptPolicyType = lens _eptPolicyType (\ s a -> s{_eptPolicyType = a});++instance AWSRequest EnablePolicyType where+ type Rs EnablePolicyType = EnablePolicyTypeResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ EnablePolicyTypeResponse' <$>+ (x .?> "Root") <*> (pure (fromEnum s)))++instance Hashable EnablePolicyType where++instance NFData EnablePolicyType where++instance ToHeaders EnablePolicyType where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.EnablePolicyType" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON EnablePolicyType where+ toJSON EnablePolicyType'{..}+ = object+ (catMaybes+ [Just ("RootId" .= _eptRootId),+ Just ("PolicyType" .= _eptPolicyType)])++instance ToPath EnablePolicyType where+ toPath = const "/"++instance ToQuery EnablePolicyType where+ toQuery = const mempty++-- | /See:/ 'enablePolicyTypeResponse' smart constructor.+data EnablePolicyTypeResponse = EnablePolicyTypeResponse'+ { _eptrsRoot :: !(Maybe Root)+ , _eptrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'EnablePolicyTypeResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'eptrsRoot' - A structure that shows the root with the updated list of enabled policy types.+--+-- * 'eptrsResponseStatus' - -- | The response status code.+enablePolicyTypeResponse+ :: Int -- ^ 'eptrsResponseStatus'+ -> EnablePolicyTypeResponse+enablePolicyTypeResponse pResponseStatus_ =+ EnablePolicyTypeResponse'+ {_eptrsRoot = Nothing, _eptrsResponseStatus = pResponseStatus_}+++-- | A structure that shows the root with the updated list of enabled policy types.+eptrsRoot :: Lens' EnablePolicyTypeResponse (Maybe Root)+eptrsRoot = lens _eptrsRoot (\ s a -> s{_eptrsRoot = a});++-- | -- | The response status code.+eptrsResponseStatus :: Lens' EnablePolicyTypeResponse Int+eptrsResponseStatus = lens _eptrsResponseStatus (\ s a -> s{_eptrsResponseStatus = a});++instance NFData EnablePolicyTypeResponse where
+ gen/Network/AWS/Organizations/InviteAccountToOrganization.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.Organizations.InviteAccountToOrganization+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Sends an invitation to another account to join your organization as a member account. Organizations sends email on your behalf to the email address that is associated with the other account's owner. The invitation is implemented as a 'Handshake' whose details are in the response.+--+--+-- /Important:/ You can invite AWS accounts only from the same seller as the master account. For example, if your organization's master account was created by Amazon Internet Services Pvt. Ltd (AISPL), an AWS seller in India, then you can only invite other AISPL accounts to your organization. You can't combine accounts from AISPL and AWS, or any other AWS seller. For more information, see <http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/useconsolidatedbilliing-India.html Consolidated Billing in India> .+--+-- This operation can be called only from the organization's master account.+--+-- /Important:/ If you get an exception that indicates that you exceeded your account limits for the organization or that you can"t add an account because your organization is still initializing, please contact <https://console.aws.amazon.com/support/home#/ AWS Customer Support> .+--+module Network.AWS.Organizations.InviteAccountToOrganization+ (+ -- * Creating a Request+ inviteAccountToOrganization+ , InviteAccountToOrganization+ -- * Request Lenses+ , iatoNotes+ , iatoTarget++ -- * Destructuring the Response+ , inviteAccountToOrganizationResponse+ , InviteAccountToOrganizationResponse+ -- * Response Lenses+ , iatorsHandshake+ , iatorsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'inviteAccountToOrganization' smart constructor.+data InviteAccountToOrganization = InviteAccountToOrganization'+ { _iatoNotes :: !(Maybe (Sensitive Text))+ , _iatoTarget :: !HandshakeParty+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'InviteAccountToOrganization' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'iatoNotes' - Additional information that you want to include in the generated email to the recipient account owner.+--+-- * 'iatoTarget' - The identifier (ID) of the AWS account that you want to invite to join your organization. This is a JSON object that contains the following elements: @{ "Type": "ACCOUNT", "Id": "</__account id number__ / >" }@ If you use the AWS CLI, you can submit this as a single string, similar to the following example: @--target Id=123456789012,Type=ACCOUNT@ If you specify @"Type": "ACCOUNT"@ , then you must provide the AWS account ID number as the @Id@ . If you specify @"Type": "EMAIL"@ , then you must specify the email address that is associated with the account. @--target Id=bill@example.com,Type=EMAIL@+inviteAccountToOrganization+ :: HandshakeParty -- ^ 'iatoTarget'+ -> InviteAccountToOrganization+inviteAccountToOrganization pTarget_ =+ InviteAccountToOrganization' {_iatoNotes = Nothing, _iatoTarget = pTarget_}+++-- | Additional information that you want to include in the generated email to the recipient account owner.+iatoNotes :: Lens' InviteAccountToOrganization (Maybe Text)+iatoNotes = lens _iatoNotes (\ s a -> s{_iatoNotes = a}) . mapping _Sensitive;++-- | The identifier (ID) of the AWS account that you want to invite to join your organization. This is a JSON object that contains the following elements: @{ "Type": "ACCOUNT", "Id": "</__account id number__ / >" }@ If you use the AWS CLI, you can submit this as a single string, similar to the following example: @--target Id=123456789012,Type=ACCOUNT@ If you specify @"Type": "ACCOUNT"@ , then you must provide the AWS account ID number as the @Id@ . If you specify @"Type": "EMAIL"@ , then you must specify the email address that is associated with the account. @--target Id=bill@example.com,Type=EMAIL@+iatoTarget :: Lens' InviteAccountToOrganization HandshakeParty+iatoTarget = lens _iatoTarget (\ s a -> s{_iatoTarget = a});++instance AWSRequest InviteAccountToOrganization where+ type Rs InviteAccountToOrganization =+ InviteAccountToOrganizationResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ InviteAccountToOrganizationResponse' <$>+ (x .?> "Handshake") <*> (pure (fromEnum s)))++instance Hashable InviteAccountToOrganization where++instance NFData InviteAccountToOrganization where++instance ToHeaders InviteAccountToOrganization where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.InviteAccountToOrganization"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON InviteAccountToOrganization where+ toJSON InviteAccountToOrganization'{..}+ = object+ (catMaybes+ [("Notes" .=) <$> _iatoNotes,+ Just ("Target" .= _iatoTarget)])++instance ToPath InviteAccountToOrganization where+ toPath = const "/"++instance ToQuery InviteAccountToOrganization where+ toQuery = const mempty++-- | /See:/ 'inviteAccountToOrganizationResponse' smart constructor.+data InviteAccountToOrganizationResponse = InviteAccountToOrganizationResponse'+ { _iatorsHandshake :: !(Maybe Handshake)+ , _iatorsResponseStatus :: !Int+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'InviteAccountToOrganizationResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'iatorsHandshake' - A structure that contains details about the handshake that is created to support this invitation request.+--+-- * 'iatorsResponseStatus' - -- | The response status code.+inviteAccountToOrganizationResponse+ :: Int -- ^ 'iatorsResponseStatus'+ -> InviteAccountToOrganizationResponse+inviteAccountToOrganizationResponse pResponseStatus_ =+ InviteAccountToOrganizationResponse'+ {_iatorsHandshake = Nothing, _iatorsResponseStatus = pResponseStatus_}+++-- | A structure that contains details about the handshake that is created to support this invitation request.+iatorsHandshake :: Lens' InviteAccountToOrganizationResponse (Maybe Handshake)+iatorsHandshake = lens _iatorsHandshake (\ s a -> s{_iatorsHandshake = a});++-- | -- | The response status code.+iatorsResponseStatus :: Lens' InviteAccountToOrganizationResponse Int+iatorsResponseStatus = lens _iatorsResponseStatus (\ s a -> s{_iatorsResponseStatus = a});++instance NFData InviteAccountToOrganizationResponse+ where
+ gen/Network/AWS/Organizations/LeaveOrganization.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.Organizations.LeaveOrganization+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes a member account from its parent organization. This version of the operation is performed by the account that wants to leave. To remove a member account as a user in the master account, use 'RemoveAccountFromOrganization' instead.+--+--+-- This operation can be called only from a member account in the organization.+--+-- /Important:/ * The master account in an organization with all features enabled can set service control policies (SCPs) that can restrict what administrators of member accounts can do, including preventing them from successfully calling @LeaveOrganization@ and leaving the organization.+--+-- * You can leave an organization as a member account only if the account is configured with the information required to operate as a standalone account. When you create an account in an organization using the AWS Organizations console, API, or CLI commands, the information required of standalone accounts is /not/ automatically collected. For each account that you want to make standalone, you must accept the End User License Agreement (EULA), choose a support plan, provide and verify the required contact information, and provide a current payment method. AWS uses the payment method to charge for any billable (not free tier) AWS activity that occurs while the account is not attached to an organization. Follow the steps at <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info To leave an organization when all required account information has not yet been provided> in the /AWS Organizations User Guide/ .+--+-- * You can leave an organization only after you enable IAM user access to billing in your account. For more information, see <http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate Activating Access to the Billing and Cost Management Console> in the /AWS Billing and Cost Management User Guide/ .+--+--+--+module Network.AWS.Organizations.LeaveOrganization+ (+ -- * Creating a Request+ leaveOrganization+ , LeaveOrganization++ -- * Destructuring the Response+ , leaveOrganizationResponse+ , LeaveOrganizationResponse+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'leaveOrganization' smart constructor.+data LeaveOrganization =+ LeaveOrganization'+ deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'LeaveOrganization' with the minimum fields required to make a request.+--+leaveOrganization+ :: LeaveOrganization+leaveOrganization = LeaveOrganization'+++instance AWSRequest LeaveOrganization where+ type Rs LeaveOrganization = LeaveOrganizationResponse+ request = postJSON organizations+ response = receiveNull LeaveOrganizationResponse'++instance Hashable LeaveOrganization where++instance NFData LeaveOrganization where++instance ToHeaders LeaveOrganization where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.LeaveOrganization" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON LeaveOrganization where+ toJSON = const (Object mempty)++instance ToPath LeaveOrganization where+ toPath = const "/"++instance ToQuery LeaveOrganization where+ toQuery = const mempty++-- | /See:/ 'leaveOrganizationResponse' smart constructor.+data LeaveOrganizationResponse =+ LeaveOrganizationResponse'+ deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'LeaveOrganizationResponse' with the minimum fields required to make a request.+--+leaveOrganizationResponse+ :: LeaveOrganizationResponse+leaveOrganizationResponse = LeaveOrganizationResponse'+++instance NFData LeaveOrganizationResponse where
+ gen/Network/AWS/Organizations/ListAccounts.hs view
@@ -0,0 +1,165 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Organizations.ListAccounts+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists all the accounts in the organization. To request only the accounts in a root or OU, use the 'ListAccountsForParent' operation instead.+--+--+-- This operation can be called only from the organization's master account.+--+--+-- This operation returns paginated results.+module Network.AWS.Organizations.ListAccounts+ (+ -- * Creating a Request+ listAccounts+ , ListAccounts+ -- * Request Lenses+ , laNextToken+ , laMaxResults++ -- * Destructuring the Response+ , listAccountsResponse+ , ListAccountsResponse+ -- * Response Lenses+ , larsAccounts+ , larsNextToken+ , larsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listAccounts' smart constructor.+data ListAccounts = ListAccounts'+ { _laNextToken :: !(Maybe Text)+ , _laMaxResults :: !(Maybe Nat)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListAccounts' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'laNextToken' - Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+--+-- * 'laMaxResults' - (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+listAccounts+ :: ListAccounts+listAccounts = ListAccounts' {_laNextToken = Nothing, _laMaxResults = Nothing}+++-- | Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+laNextToken :: Lens' ListAccounts (Maybe Text)+laNextToken = lens _laNextToken (\ s a -> s{_laNextToken = a});++-- | (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+laMaxResults :: Lens' ListAccounts (Maybe Natural)+laMaxResults = lens _laMaxResults (\ s a -> s{_laMaxResults = a}) . mapping _Nat;++instance AWSPager ListAccounts where+ page rq rs+ | stop (rs ^. larsNextToken) = Nothing+ | stop (rs ^. larsAccounts) = Nothing+ | otherwise =+ Just $ rq & laNextToken .~ rs ^. larsNextToken++instance AWSRequest ListAccounts where+ type Rs ListAccounts = ListAccountsResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ ListAccountsResponse' <$>+ (x .?> "Accounts" .!@ mempty) <*> (x .?> "NextToken")+ <*> (pure (fromEnum s)))++instance Hashable ListAccounts where++instance NFData ListAccounts where++instance ToHeaders ListAccounts where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.ListAccounts" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListAccounts where+ toJSON ListAccounts'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _laNextToken,+ ("MaxResults" .=) <$> _laMaxResults])++instance ToPath ListAccounts where+ toPath = const "/"++instance ToQuery ListAccounts where+ toQuery = const mempty++-- | /See:/ 'listAccountsResponse' smart constructor.+data ListAccountsResponse = ListAccountsResponse'+ { _larsAccounts :: !(Maybe [Account])+ , _larsNextToken :: !(Maybe Text)+ , _larsResponseStatus :: !Int+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListAccountsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'larsAccounts' - A list of objects in the organization.+--+-- * 'larsNextToken' - If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+--+-- * 'larsResponseStatus' - -- | The response status code.+listAccountsResponse+ :: Int -- ^ 'larsResponseStatus'+ -> ListAccountsResponse+listAccountsResponse pResponseStatus_ =+ ListAccountsResponse'+ { _larsAccounts = Nothing+ , _larsNextToken = Nothing+ , _larsResponseStatus = pResponseStatus_+ }+++-- | A list of objects in the organization.+larsAccounts :: Lens' ListAccountsResponse [Account]+larsAccounts = lens _larsAccounts (\ s a -> s{_larsAccounts = a}) . _Default . _Coerce;++-- | If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+larsNextToken :: Lens' ListAccountsResponse (Maybe Text)+larsNextToken = lens _larsNextToken (\ s a -> s{_larsNextToken = a});++-- | -- | The response status code.+larsResponseStatus :: Lens' ListAccountsResponse Int+larsResponseStatus = lens _larsResponseStatus (\ s a -> s{_larsResponseStatus = a});++instance NFData ListAccountsResponse where
+ gen/Network/AWS/Organizations/ListAccountsForParent.hs view
@@ -0,0 +1,181 @@+{-# 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.Organizations.ListAccountsForParent+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the accounts in an organization that are contained by the specified target root or organizational unit (OU). If you specify the root, you get a list of all the accounts that are not in any OU. If you specify an OU, you get a list of all the accounts in only that OU, and not in any child OUs. To get a list of all accounts in the organization, use the 'ListAccounts' operation.+--+--+-- This operation can be called only from the organization's master account.+--+--+-- This operation returns paginated results.+module Network.AWS.Organizations.ListAccountsForParent+ (+ -- * Creating a Request+ listAccountsForParent+ , ListAccountsForParent+ -- * Request Lenses+ , lafpNextToken+ , lafpMaxResults+ , lafpParentId++ -- * Destructuring the Response+ , listAccountsForParentResponse+ , ListAccountsForParentResponse+ -- * Response Lenses+ , lafprsAccounts+ , lafprsNextToken+ , lafprsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listAccountsForParent' smart constructor.+data ListAccountsForParent = ListAccountsForParent'+ { _lafpNextToken :: !(Maybe Text)+ , _lafpMaxResults :: !(Maybe Nat)+ , _lafpParentId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListAccountsForParent' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lafpNextToken' - Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+--+-- * 'lafpMaxResults' - (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+--+-- * 'lafpParentId' - The unique identifier (ID) for the parent root or organization unit (OU) whose accounts you want to list.+listAccountsForParent+ :: Text -- ^ 'lafpParentId'+ -> ListAccountsForParent+listAccountsForParent pParentId_ =+ ListAccountsForParent'+ { _lafpNextToken = Nothing+ , _lafpMaxResults = Nothing+ , _lafpParentId = pParentId_+ }+++-- | Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+lafpNextToken :: Lens' ListAccountsForParent (Maybe Text)+lafpNextToken = lens _lafpNextToken (\ s a -> s{_lafpNextToken = a});++-- | (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+lafpMaxResults :: Lens' ListAccountsForParent (Maybe Natural)+lafpMaxResults = lens _lafpMaxResults (\ s a -> s{_lafpMaxResults = a}) . mapping _Nat;++-- | The unique identifier (ID) for the parent root or organization unit (OU) whose accounts you want to list.+lafpParentId :: Lens' ListAccountsForParent Text+lafpParentId = lens _lafpParentId (\ s a -> s{_lafpParentId = a});++instance AWSPager ListAccountsForParent where+ page rq rs+ | stop (rs ^. lafprsNextToken) = Nothing+ | stop (rs ^. lafprsAccounts) = Nothing+ | otherwise =+ Just $ rq & lafpNextToken .~ rs ^. lafprsNextToken++instance AWSRequest ListAccountsForParent where+ type Rs ListAccountsForParent =+ ListAccountsForParentResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ ListAccountsForParentResponse' <$>+ (x .?> "Accounts" .!@ mempty) <*> (x .?> "NextToken")+ <*> (pure (fromEnum s)))++instance Hashable ListAccountsForParent where++instance NFData ListAccountsForParent where++instance ToHeaders ListAccountsForParent where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.ListAccountsForParent" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListAccountsForParent where+ toJSON ListAccountsForParent'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lafpNextToken,+ ("MaxResults" .=) <$> _lafpMaxResults,+ Just ("ParentId" .= _lafpParentId)])++instance ToPath ListAccountsForParent where+ toPath = const "/"++instance ToQuery ListAccountsForParent where+ toQuery = const mempty++-- | /See:/ 'listAccountsForParentResponse' smart constructor.+data ListAccountsForParentResponse = ListAccountsForParentResponse'+ { _lafprsAccounts :: !(Maybe [Account])+ , _lafprsNextToken :: !(Maybe Text)+ , _lafprsResponseStatus :: !Int+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListAccountsForParentResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lafprsAccounts' - A list of the accounts in the specified root or OU.+--+-- * 'lafprsNextToken' - If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+--+-- * 'lafprsResponseStatus' - -- | The response status code.+listAccountsForParentResponse+ :: Int -- ^ 'lafprsResponseStatus'+ -> ListAccountsForParentResponse+listAccountsForParentResponse pResponseStatus_ =+ ListAccountsForParentResponse'+ { _lafprsAccounts = Nothing+ , _lafprsNextToken = Nothing+ , _lafprsResponseStatus = pResponseStatus_+ }+++-- | A list of the accounts in the specified root or OU.+lafprsAccounts :: Lens' ListAccountsForParentResponse [Account]+lafprsAccounts = lens _lafprsAccounts (\ s a -> s{_lafprsAccounts = a}) . _Default . _Coerce;++-- | If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+lafprsNextToken :: Lens' ListAccountsForParentResponse (Maybe Text)+lafprsNextToken = lens _lafprsNextToken (\ s a -> s{_lafprsNextToken = a});++-- | -- | The response status code.+lafprsResponseStatus :: Lens' ListAccountsForParentResponse Int+lafprsResponseStatus = lens _lafprsResponseStatus (\ s a -> s{_lafprsResponseStatus = a});++instance NFData ListAccountsForParentResponse where
+ gen/Network/AWS/Organizations/ListChildren.hs view
@@ -0,0 +1,191 @@+{-# 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.Organizations.ListChildren+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists all of the OUs or accounts that are contained in the specified parent OU or root. This operation, along with 'ListParents' enables you to traverse the tree structure that makes up this root.+--+--+-- This operation can be called only from the organization's master account.+--+--+-- This operation returns paginated results.+module Network.AWS.Organizations.ListChildren+ (+ -- * Creating a Request+ listChildren+ , ListChildren+ -- * Request Lenses+ , lcNextToken+ , lcMaxResults+ , lcParentId+ , lcChildType++ -- * Destructuring the Response+ , listChildrenResponse+ , ListChildrenResponse+ -- * Response Lenses+ , lcrsChildren+ , lcrsNextToken+ , lcrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listChildren' smart constructor.+data ListChildren = ListChildren'+ { _lcNextToken :: !(Maybe Text)+ , _lcMaxResults :: !(Maybe Nat)+ , _lcParentId :: !Text+ , _lcChildType :: !ChildType+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListChildren' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lcNextToken' - Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+--+-- * 'lcMaxResults' - (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+--+-- * 'lcParentId' - The unique identifier (ID) for the parent root or OU whose children you want to list. The <http://wikipedia.org/wiki/regex regex pattern> for a parent ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+--+-- * 'lcChildType' - Filters the output to include only the specified child type.+listChildren+ :: Text -- ^ 'lcParentId'+ -> ChildType -- ^ 'lcChildType'+ -> ListChildren+listChildren pParentId_ pChildType_ =+ ListChildren'+ { _lcNextToken = Nothing+ , _lcMaxResults = Nothing+ , _lcParentId = pParentId_+ , _lcChildType = pChildType_+ }+++-- | Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+lcNextToken :: Lens' ListChildren (Maybe Text)+lcNextToken = lens _lcNextToken (\ s a -> s{_lcNextToken = a});++-- | (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+lcMaxResults :: Lens' ListChildren (Maybe Natural)+lcMaxResults = lens _lcMaxResults (\ s a -> s{_lcMaxResults = a}) . mapping _Nat;++-- | The unique identifier (ID) for the parent root or OU whose children you want to list. The <http://wikipedia.org/wiki/regex regex pattern> for a parent ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+lcParentId :: Lens' ListChildren Text+lcParentId = lens _lcParentId (\ s a -> s{_lcParentId = a});++-- | Filters the output to include only the specified child type.+lcChildType :: Lens' ListChildren ChildType+lcChildType = lens _lcChildType (\ s a -> s{_lcChildType = a});++instance AWSPager ListChildren where+ page rq rs+ | stop (rs ^. lcrsNextToken) = Nothing+ | stop (rs ^. lcrsChildren) = Nothing+ | otherwise =+ Just $ rq & lcNextToken .~ rs ^. lcrsNextToken++instance AWSRequest ListChildren where+ type Rs ListChildren = ListChildrenResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ ListChildrenResponse' <$>+ (x .?> "Children" .!@ mempty) <*> (x .?> "NextToken")+ <*> (pure (fromEnum s)))++instance Hashable ListChildren where++instance NFData ListChildren where++instance ToHeaders ListChildren where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.ListChildren" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListChildren where+ toJSON ListChildren'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lcNextToken,+ ("MaxResults" .=) <$> _lcMaxResults,+ Just ("ParentId" .= _lcParentId),+ Just ("ChildType" .= _lcChildType)])++instance ToPath ListChildren where+ toPath = const "/"++instance ToQuery ListChildren where+ toQuery = const mempty++-- | /See:/ 'listChildrenResponse' smart constructor.+data ListChildrenResponse = ListChildrenResponse'+ { _lcrsChildren :: !(Maybe [Child])+ , _lcrsNextToken :: !(Maybe Text)+ , _lcrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListChildrenResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lcrsChildren' - The list of children of the specified parent container.+--+-- * 'lcrsNextToken' - If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+--+-- * 'lcrsResponseStatus' - -- | The response status code.+listChildrenResponse+ :: Int -- ^ 'lcrsResponseStatus'+ -> ListChildrenResponse+listChildrenResponse pResponseStatus_ =+ ListChildrenResponse'+ { _lcrsChildren = Nothing+ , _lcrsNextToken = Nothing+ , _lcrsResponseStatus = pResponseStatus_+ }+++-- | The list of children of the specified parent container.+lcrsChildren :: Lens' ListChildrenResponse [Child]+lcrsChildren = lens _lcrsChildren (\ s a -> s{_lcrsChildren = a}) . _Default . _Coerce;++-- | If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+lcrsNextToken :: Lens' ListChildrenResponse (Maybe Text)+lcrsNextToken = lens _lcrsNextToken (\ s a -> s{_lcrsNextToken = a});++-- | -- | The response status code.+lcrsResponseStatus :: Lens' ListChildrenResponse Int+lcrsResponseStatus = lens _lcrsResponseStatus (\ s a -> s{_lcrsResponseStatus = a});++instance NFData ListChildrenResponse where
+ gen/Network/AWS/Organizations/ListCreateAccountStatus.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.Organizations.ListCreateAccountStatus+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the account creation requests that match the specified status that is currently being tracked for the organization.+--+--+-- This operation can be called only from the organization's master account.+--+--+-- This operation returns paginated results.+module Network.AWS.Organizations.ListCreateAccountStatus+ (+ -- * Creating a Request+ listCreateAccountStatus+ , ListCreateAccountStatus+ -- * Request Lenses+ , lcasStates+ , lcasNextToken+ , lcasMaxResults++ -- * Destructuring the Response+ , listCreateAccountStatusResponse+ , ListCreateAccountStatusResponse+ -- * Response Lenses+ , lcasrsCreateAccountStatuses+ , lcasrsNextToken+ , lcasrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listCreateAccountStatus' smart constructor.+data ListCreateAccountStatus = ListCreateAccountStatus'+ { _lcasStates :: !(Maybe [CreateAccountState])+ , _lcasNextToken :: !(Maybe Text)+ , _lcasMaxResults :: !(Maybe Nat)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListCreateAccountStatus' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lcasStates' - A list of one or more states that you want included in the response. If this parameter is not present, then all requests are included in the response.+--+-- * 'lcasNextToken' - Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+--+-- * 'lcasMaxResults' - (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+listCreateAccountStatus+ :: ListCreateAccountStatus+listCreateAccountStatus =+ ListCreateAccountStatus'+ {_lcasStates = Nothing, _lcasNextToken = Nothing, _lcasMaxResults = Nothing}+++-- | A list of one or more states that you want included in the response. If this parameter is not present, then all requests are included in the response.+lcasStates :: Lens' ListCreateAccountStatus [CreateAccountState]+lcasStates = lens _lcasStates (\ s a -> s{_lcasStates = a}) . _Default . _Coerce;++-- | Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+lcasNextToken :: Lens' ListCreateAccountStatus (Maybe Text)+lcasNextToken = lens _lcasNextToken (\ s a -> s{_lcasNextToken = a});++-- | (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+lcasMaxResults :: Lens' ListCreateAccountStatus (Maybe Natural)+lcasMaxResults = lens _lcasMaxResults (\ s a -> s{_lcasMaxResults = a}) . mapping _Nat;++instance AWSPager ListCreateAccountStatus where+ page rq rs+ | stop (rs ^. lcasrsNextToken) = Nothing+ | stop (rs ^. lcasrsCreateAccountStatuses) = Nothing+ | otherwise =+ Just $ rq & lcasNextToken .~ rs ^. lcasrsNextToken++instance AWSRequest ListCreateAccountStatus where+ type Rs ListCreateAccountStatus =+ ListCreateAccountStatusResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ ListCreateAccountStatusResponse' <$>+ (x .?> "CreateAccountStatuses" .!@ mempty) <*>+ (x .?> "NextToken")+ <*> (pure (fromEnum s)))++instance Hashable ListCreateAccountStatus where++instance NFData ListCreateAccountStatus where++instance ToHeaders ListCreateAccountStatus where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.ListCreateAccountStatus"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListCreateAccountStatus where+ toJSON ListCreateAccountStatus'{..}+ = object+ (catMaybes+ [("States" .=) <$> _lcasStates,+ ("NextToken" .=) <$> _lcasNextToken,+ ("MaxResults" .=) <$> _lcasMaxResults])++instance ToPath ListCreateAccountStatus where+ toPath = const "/"++instance ToQuery ListCreateAccountStatus where+ toQuery = const mempty++-- | /See:/ 'listCreateAccountStatusResponse' smart constructor.+data ListCreateAccountStatusResponse = ListCreateAccountStatusResponse'+ { _lcasrsCreateAccountStatuses :: !(Maybe [CreateAccountStatus])+ , _lcasrsNextToken :: !(Maybe Text)+ , _lcasrsResponseStatus :: !Int+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListCreateAccountStatusResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lcasrsCreateAccountStatuses' - A list of objects with details about the requests. Certain elements, such as the accountId number, are present in the output only after the account has been successfully created.+--+-- * 'lcasrsNextToken' - If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+--+-- * 'lcasrsResponseStatus' - -- | The response status code.+listCreateAccountStatusResponse+ :: Int -- ^ 'lcasrsResponseStatus'+ -> ListCreateAccountStatusResponse+listCreateAccountStatusResponse pResponseStatus_ =+ ListCreateAccountStatusResponse'+ { _lcasrsCreateAccountStatuses = Nothing+ , _lcasrsNextToken = Nothing+ , _lcasrsResponseStatus = pResponseStatus_+ }+++-- | A list of objects with details about the requests. Certain elements, such as the accountId number, are present in the output only after the account has been successfully created.+lcasrsCreateAccountStatuses :: Lens' ListCreateAccountStatusResponse [CreateAccountStatus]+lcasrsCreateAccountStatuses = lens _lcasrsCreateAccountStatuses (\ s a -> s{_lcasrsCreateAccountStatuses = a}) . _Default . _Coerce;++-- | If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+lcasrsNextToken :: Lens' ListCreateAccountStatusResponse (Maybe Text)+lcasrsNextToken = lens _lcasrsNextToken (\ s a -> s{_lcasrsNextToken = a});++-- | -- | The response status code.+lcasrsResponseStatus :: Lens' ListCreateAccountStatusResponse Int+lcasrsResponseStatus = lens _lcasrsResponseStatus (\ s a -> s{_lcasrsResponseStatus = a});++instance NFData ListCreateAccountStatusResponse where
+ gen/Network/AWS/Organizations/ListHandshakesForAccount.hs view
@@ -0,0 +1,181 @@+{-# 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.Organizations.ListHandshakesForAccount+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the current handshakes that are associated with the account of the requesting user.+--+--+-- Handshakes that are ACCEPTED, DECLINED, or CANCELED appear in the results of this API for only 30 days after changing to that state. After that they are deleted and no longer accessible.+--+-- This operation can be called from any account in the organization.+--+--+-- This operation returns paginated results.+module Network.AWS.Organizations.ListHandshakesForAccount+ (+ -- * Creating a Request+ listHandshakesForAccount+ , ListHandshakesForAccount+ -- * Request Lenses+ , lhfaNextToken+ , lhfaFilter+ , lhfaMaxResults++ -- * Destructuring the Response+ , listHandshakesForAccountResponse+ , ListHandshakesForAccountResponse+ -- * Response Lenses+ , lhfarsHandshakes+ , lhfarsNextToken+ , lhfarsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listHandshakesForAccount' smart constructor.+data ListHandshakesForAccount = ListHandshakesForAccount'+ { _lhfaNextToken :: !(Maybe Text)+ , _lhfaFilter :: !(Maybe HandshakeFilter)+ , _lhfaMaxResults :: !(Maybe Nat)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListHandshakesForAccount' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lhfaNextToken' - Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+--+-- * 'lhfaFilter' - Filters the handshakes that you want included in the response. The default is all types. Use the @ActionType@ element to limit the output to only a specified type, such as @INVITE@ , @ENABLE-FULL-CONTROL@ , or @APPROVE-FULL-CONTROL@ . Alternatively, for the @ENABLE-FULL-CONTROL@ handshake that generates a separate child handshake for each member account, you can specify @ParentHandshakeId@ to see only the handshakes that were generated by that parent request.+--+-- * 'lhfaMaxResults' - (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+listHandshakesForAccount+ :: ListHandshakesForAccount+listHandshakesForAccount =+ ListHandshakesForAccount'+ {_lhfaNextToken = Nothing, _lhfaFilter = Nothing, _lhfaMaxResults = Nothing}+++-- | Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+lhfaNextToken :: Lens' ListHandshakesForAccount (Maybe Text)+lhfaNextToken = lens _lhfaNextToken (\ s a -> s{_lhfaNextToken = a});++-- | Filters the handshakes that you want included in the response. The default is all types. Use the @ActionType@ element to limit the output to only a specified type, such as @INVITE@ , @ENABLE-FULL-CONTROL@ , or @APPROVE-FULL-CONTROL@ . Alternatively, for the @ENABLE-FULL-CONTROL@ handshake that generates a separate child handshake for each member account, you can specify @ParentHandshakeId@ to see only the handshakes that were generated by that parent request.+lhfaFilter :: Lens' ListHandshakesForAccount (Maybe HandshakeFilter)+lhfaFilter = lens _lhfaFilter (\ s a -> s{_lhfaFilter = a});++-- | (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+lhfaMaxResults :: Lens' ListHandshakesForAccount (Maybe Natural)+lhfaMaxResults = lens _lhfaMaxResults (\ s a -> s{_lhfaMaxResults = a}) . mapping _Nat;++instance AWSPager ListHandshakesForAccount where+ page rq rs+ | stop (rs ^. lhfarsNextToken) = Nothing+ | stop (rs ^. lhfarsHandshakes) = Nothing+ | otherwise =+ Just $ rq & lhfaNextToken .~ rs ^. lhfarsNextToken++instance AWSRequest ListHandshakesForAccount where+ type Rs ListHandshakesForAccount =+ ListHandshakesForAccountResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ ListHandshakesForAccountResponse' <$>+ (x .?> "Handshakes" .!@ mempty) <*>+ (x .?> "NextToken")+ <*> (pure (fromEnum s)))++instance Hashable ListHandshakesForAccount where++instance NFData ListHandshakesForAccount where++instance ToHeaders ListHandshakesForAccount where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.ListHandshakesForAccount"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListHandshakesForAccount where+ toJSON ListHandshakesForAccount'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lhfaNextToken,+ ("Filter" .=) <$> _lhfaFilter,+ ("MaxResults" .=) <$> _lhfaMaxResults])++instance ToPath ListHandshakesForAccount where+ toPath = const "/"++instance ToQuery ListHandshakesForAccount where+ toQuery = const mempty++-- | /See:/ 'listHandshakesForAccountResponse' smart constructor.+data ListHandshakesForAccountResponse = ListHandshakesForAccountResponse'+ { _lhfarsHandshakes :: !(Maybe [Handshake])+ , _lhfarsNextToken :: !(Maybe Text)+ , _lhfarsResponseStatus :: !Int+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListHandshakesForAccountResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lhfarsHandshakes' - A list of 'Handshake' objects with details about each of the handshakes that is associated with the specified account.+--+-- * 'lhfarsNextToken' - If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+--+-- * 'lhfarsResponseStatus' - -- | The response status code.+listHandshakesForAccountResponse+ :: Int -- ^ 'lhfarsResponseStatus'+ -> ListHandshakesForAccountResponse+listHandshakesForAccountResponse pResponseStatus_ =+ ListHandshakesForAccountResponse'+ { _lhfarsHandshakes = Nothing+ , _lhfarsNextToken = Nothing+ , _lhfarsResponseStatus = pResponseStatus_+ }+++-- | A list of 'Handshake' objects with details about each of the handshakes that is associated with the specified account.+lhfarsHandshakes :: Lens' ListHandshakesForAccountResponse [Handshake]+lhfarsHandshakes = lens _lhfarsHandshakes (\ s a -> s{_lhfarsHandshakes = a}) . _Default . _Coerce;++-- | If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+lhfarsNextToken :: Lens' ListHandshakesForAccountResponse (Maybe Text)+lhfarsNextToken = lens _lhfarsNextToken (\ s a -> s{_lhfarsNextToken = a});++-- | -- | The response status code.+lhfarsResponseStatus :: Lens' ListHandshakesForAccountResponse Int+lhfarsResponseStatus = lens _lhfarsResponseStatus (\ s a -> s{_lhfarsResponseStatus = a});++instance NFData ListHandshakesForAccountResponse+ where
+ gen/Network/AWS/Organizations/ListHandshakesForOrganization.hs view
@@ -0,0 +1,183 @@+{-# 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.Organizations.ListHandshakesForOrganization+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the handshakes that are associated with the organization that the requesting user is part of. The @ListHandshakesForOrganization@ operation returns a list of handshake structures. Each structure contains details and status about a handshake.+--+--+-- Handshakes that are ACCEPTED, DECLINED, or CANCELED appear in the results of this API for only 30 days after changing to that state. After that they are deleted and no longer accessible.+--+-- This operation can be called only from the organization's master account.+--+--+-- This operation returns paginated results.+module Network.AWS.Organizations.ListHandshakesForOrganization+ (+ -- * Creating a Request+ listHandshakesForOrganization+ , ListHandshakesForOrganization+ -- * Request Lenses+ , lhfoNextToken+ , lhfoFilter+ , lhfoMaxResults++ -- * Destructuring the Response+ , listHandshakesForOrganizationResponse+ , ListHandshakesForOrganizationResponse+ -- * Response Lenses+ , lhforsHandshakes+ , lhforsNextToken+ , lhforsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listHandshakesForOrganization' smart constructor.+data ListHandshakesForOrganization = ListHandshakesForOrganization'+ { _lhfoNextToken :: !(Maybe Text)+ , _lhfoFilter :: !(Maybe HandshakeFilter)+ , _lhfoMaxResults :: !(Maybe Nat)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListHandshakesForOrganization' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lhfoNextToken' - Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+--+-- * 'lhfoFilter' - A filter of the handshakes that you want included in the response. The default is all types. Use the @ActionType@ element to limit the output to only a specified type, such as @INVITE@ , @ENABLE-ALL-FEATURES@ , or @APPROVE-ALL-FEATURES@ . Alternatively, for the @ENABLE-ALL-FEATURES@ handshake that generates a separate child handshake for each member account, you can specify the @ParentHandshakeId@ to see only the handshakes that were generated by that parent request.+--+-- * 'lhfoMaxResults' - (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+listHandshakesForOrganization+ :: ListHandshakesForOrganization+listHandshakesForOrganization =+ ListHandshakesForOrganization'+ {_lhfoNextToken = Nothing, _lhfoFilter = Nothing, _lhfoMaxResults = Nothing}+++-- | Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+lhfoNextToken :: Lens' ListHandshakesForOrganization (Maybe Text)+lhfoNextToken = lens _lhfoNextToken (\ s a -> s{_lhfoNextToken = a});++-- | A filter of the handshakes that you want included in the response. The default is all types. Use the @ActionType@ element to limit the output to only a specified type, such as @INVITE@ , @ENABLE-ALL-FEATURES@ , or @APPROVE-ALL-FEATURES@ . Alternatively, for the @ENABLE-ALL-FEATURES@ handshake that generates a separate child handshake for each member account, you can specify the @ParentHandshakeId@ to see only the handshakes that were generated by that parent request.+lhfoFilter :: Lens' ListHandshakesForOrganization (Maybe HandshakeFilter)+lhfoFilter = lens _lhfoFilter (\ s a -> s{_lhfoFilter = a});++-- | (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+lhfoMaxResults :: Lens' ListHandshakesForOrganization (Maybe Natural)+lhfoMaxResults = lens _lhfoMaxResults (\ s a -> s{_lhfoMaxResults = a}) . mapping _Nat;++instance AWSPager ListHandshakesForOrganization where+ page rq rs+ | stop (rs ^. lhforsNextToken) = Nothing+ | stop (rs ^. lhforsHandshakes) = Nothing+ | otherwise =+ Just $ rq & lhfoNextToken .~ rs ^. lhforsNextToken++instance AWSRequest ListHandshakesForOrganization+ where+ type Rs ListHandshakesForOrganization =+ ListHandshakesForOrganizationResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ ListHandshakesForOrganizationResponse' <$>+ (x .?> "Handshakes" .!@ mempty) <*>+ (x .?> "NextToken")+ <*> (pure (fromEnum s)))++instance Hashable ListHandshakesForOrganization where++instance NFData ListHandshakesForOrganization where++instance ToHeaders ListHandshakesForOrganization+ where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.ListHandshakesForOrganization"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListHandshakesForOrganization where+ toJSON ListHandshakesForOrganization'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lhfoNextToken,+ ("Filter" .=) <$> _lhfoFilter,+ ("MaxResults" .=) <$> _lhfoMaxResults])++instance ToPath ListHandshakesForOrganization where+ toPath = const "/"++instance ToQuery ListHandshakesForOrganization where+ toQuery = const mempty++-- | /See:/ 'listHandshakesForOrganizationResponse' smart constructor.+data ListHandshakesForOrganizationResponse = ListHandshakesForOrganizationResponse'+ { _lhforsHandshakes :: !(Maybe [Handshake])+ , _lhforsNextToken :: !(Maybe Text)+ , _lhforsResponseStatus :: !Int+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListHandshakesForOrganizationResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lhforsHandshakes' - A list of 'Handshake' objects with details about each of the handshakes that are associated with an organization.+--+-- * 'lhforsNextToken' - If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+--+-- * 'lhforsResponseStatus' - -- | The response status code.+listHandshakesForOrganizationResponse+ :: Int -- ^ 'lhforsResponseStatus'+ -> ListHandshakesForOrganizationResponse+listHandshakesForOrganizationResponse pResponseStatus_ =+ ListHandshakesForOrganizationResponse'+ { _lhforsHandshakes = Nothing+ , _lhforsNextToken = Nothing+ , _lhforsResponseStatus = pResponseStatus_+ }+++-- | A list of 'Handshake' objects with details about each of the handshakes that are associated with an organization.+lhforsHandshakes :: Lens' ListHandshakesForOrganizationResponse [Handshake]+lhforsHandshakes = lens _lhforsHandshakes (\ s a -> s{_lhforsHandshakes = a}) . _Default . _Coerce;++-- | If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+lhforsNextToken :: Lens' ListHandshakesForOrganizationResponse (Maybe Text)+lhforsNextToken = lens _lhforsNextToken (\ s a -> s{_lhforsNextToken = a});++-- | -- | The response status code.+lhforsResponseStatus :: Lens' ListHandshakesForOrganizationResponse Int+lhforsResponseStatus = lens _lhforsResponseStatus (\ s a -> s{_lhforsResponseStatus = a});++instance NFData ListHandshakesForOrganizationResponse+ where
+ gen/Network/AWS/Organizations/ListOrganizationalUnitsForParent.hs view
@@ -0,0 +1,192 @@+{-# 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.Organizations.ListOrganizationalUnitsForParent+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the organizational units (OUs) in a parent organizational unit or root.+--+--+-- This operation can be called only from the organization's master account.+--+--+-- This operation returns paginated results.+module Network.AWS.Organizations.ListOrganizationalUnitsForParent+ (+ -- * Creating a Request+ listOrganizationalUnitsForParent+ , ListOrganizationalUnitsForParent+ -- * Request Lenses+ , loufpNextToken+ , loufpMaxResults+ , loufpParentId++ -- * Destructuring the Response+ , listOrganizationalUnitsForParentResponse+ , ListOrganizationalUnitsForParentResponse+ -- * Response Lenses+ , loufprsNextToken+ , loufprsOrganizationalUnits+ , loufprsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listOrganizationalUnitsForParent' smart constructor.+data ListOrganizationalUnitsForParent = ListOrganizationalUnitsForParent'+ { _loufpNextToken :: !(Maybe Text)+ , _loufpMaxResults :: !(Maybe Nat)+ , _loufpParentId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListOrganizationalUnitsForParent' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'loufpNextToken' - Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+--+-- * 'loufpMaxResults' - (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+--+-- * 'loufpParentId' - The unique identifier (ID) of the root or OU whose child OUs you want to list. The <http://wikipedia.org/wiki/regex regex pattern> for a parent ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+listOrganizationalUnitsForParent+ :: Text -- ^ 'loufpParentId'+ -> ListOrganizationalUnitsForParent+listOrganizationalUnitsForParent pParentId_ =+ ListOrganizationalUnitsForParent'+ { _loufpNextToken = Nothing+ , _loufpMaxResults = Nothing+ , _loufpParentId = pParentId_+ }+++-- | Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+loufpNextToken :: Lens' ListOrganizationalUnitsForParent (Maybe Text)+loufpNextToken = lens _loufpNextToken (\ s a -> s{_loufpNextToken = a});++-- | (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+loufpMaxResults :: Lens' ListOrganizationalUnitsForParent (Maybe Natural)+loufpMaxResults = lens _loufpMaxResults (\ s a -> s{_loufpMaxResults = a}) . mapping _Nat;++-- | The unique identifier (ID) of the root or OU whose child OUs you want to list. The <http://wikipedia.org/wiki/regex regex pattern> for a parent ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+loufpParentId :: Lens' ListOrganizationalUnitsForParent Text+loufpParentId = lens _loufpParentId (\ s a -> s{_loufpParentId = a});++instance AWSPager ListOrganizationalUnitsForParent+ where+ page rq rs+ | stop (rs ^. loufprsNextToken) = Nothing+ | stop (rs ^. loufprsOrganizationalUnits) = Nothing+ | otherwise =+ Just $ rq & loufpNextToken .~ rs ^. loufprsNextToken++instance AWSRequest ListOrganizationalUnitsForParent+ where+ type Rs ListOrganizationalUnitsForParent =+ ListOrganizationalUnitsForParentResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ ListOrganizationalUnitsForParentResponse' <$>+ (x .?> "NextToken") <*>+ (x .?> "OrganizationalUnits" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable ListOrganizationalUnitsForParent+ where++instance NFData ListOrganizationalUnitsForParent+ where++instance ToHeaders ListOrganizationalUnitsForParent+ where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.ListOrganizationalUnitsForParent"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListOrganizationalUnitsForParent+ where+ toJSON ListOrganizationalUnitsForParent'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _loufpNextToken,+ ("MaxResults" .=) <$> _loufpMaxResults,+ Just ("ParentId" .= _loufpParentId)])++instance ToPath ListOrganizationalUnitsForParent+ where+ toPath = const "/"++instance ToQuery ListOrganizationalUnitsForParent+ where+ toQuery = const mempty++-- | /See:/ 'listOrganizationalUnitsForParentResponse' smart constructor.+data ListOrganizationalUnitsForParentResponse = ListOrganizationalUnitsForParentResponse'+ { _loufprsNextToken :: !(Maybe Text)+ , _loufprsOrganizationalUnits :: !(Maybe [OrganizationalUnit])+ , _loufprsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListOrganizationalUnitsForParentResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'loufprsNextToken' - If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+--+-- * 'loufprsOrganizationalUnits' - A list of the OUs in the specified root or parent OU.+--+-- * 'loufprsResponseStatus' - -- | The response status code.+listOrganizationalUnitsForParentResponse+ :: Int -- ^ 'loufprsResponseStatus'+ -> ListOrganizationalUnitsForParentResponse+listOrganizationalUnitsForParentResponse pResponseStatus_ =+ ListOrganizationalUnitsForParentResponse'+ { _loufprsNextToken = Nothing+ , _loufprsOrganizationalUnits = Nothing+ , _loufprsResponseStatus = pResponseStatus_+ }+++-- | If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+loufprsNextToken :: Lens' ListOrganizationalUnitsForParentResponse (Maybe Text)+loufprsNextToken = lens _loufprsNextToken (\ s a -> s{_loufprsNextToken = a});++-- | A list of the OUs in the specified root or parent OU.+loufprsOrganizationalUnits :: Lens' ListOrganizationalUnitsForParentResponse [OrganizationalUnit]+loufprsOrganizationalUnits = lens _loufprsOrganizationalUnits (\ s a -> s{_loufprsOrganizationalUnits = a}) . _Default . _Coerce;++-- | -- | The response status code.+loufprsResponseStatus :: Lens' ListOrganizationalUnitsForParentResponse Int+loufprsResponseStatus = lens _loufprsResponseStatus (\ s a -> s{_loufprsResponseStatus = a});++instance NFData+ ListOrganizationalUnitsForParentResponse+ where
+ gen/Network/AWS/Organizations/ListParents.hs view
@@ -0,0 +1,177 @@+{-# 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.Organizations.ListParents+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the root or organizational units (OUs) that serve as the immediate parent of the specified child OU or account. This operation, along with 'ListChildren' enables you to traverse the tree structure that makes up this root.+--+--+-- This operation can be called only from the organization's master account.+--+--+-- This operation returns paginated results.+module Network.AWS.Organizations.ListParents+ (+ -- * Creating a Request+ listParents+ , ListParents+ -- * Request Lenses+ , lNextToken+ , lMaxResults+ , lChildId++ -- * Destructuring the Response+ , listParentsResponse+ , ListParentsResponse+ -- * Response Lenses+ , lrsNextToken+ , lrsParents+ , lrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listParents' smart constructor.+data ListParents = ListParents'+ { _lNextToken :: !(Maybe Text)+ , _lMaxResults :: !(Maybe Nat)+ , _lChildId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListParents' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lNextToken' - Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+--+-- * 'lMaxResults' - (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+--+-- * 'lChildId' - The unique identifier (ID) of the OU or account whose parent containers you want to list. Do not specify a root. The <http://wikipedia.org/wiki/regex regex pattern> for a child ID string requires one of the following: * Account: a string that consists of exactly 12 digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that contains the OU) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+listParents+ :: Text -- ^ 'lChildId'+ -> ListParents+listParents pChildId_ =+ ListParents'+ {_lNextToken = Nothing, _lMaxResults = Nothing, _lChildId = pChildId_}+++-- | Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+lNextToken :: Lens' ListParents (Maybe Text)+lNextToken = lens _lNextToken (\ s a -> s{_lNextToken = a});++-- | (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+lMaxResults :: Lens' ListParents (Maybe Natural)+lMaxResults = lens _lMaxResults (\ s a -> s{_lMaxResults = a}) . mapping _Nat;++-- | The unique identifier (ID) of the OU or account whose parent containers you want to list. Do not specify a root. The <http://wikipedia.org/wiki/regex regex pattern> for a child ID string requires one of the following: * Account: a string that consists of exactly 12 digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that contains the OU) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+lChildId :: Lens' ListParents Text+lChildId = lens _lChildId (\ s a -> s{_lChildId = a});++instance AWSPager ListParents where+ page rq rs+ | stop (rs ^. lrsNextToken) = Nothing+ | stop (rs ^. lrsParents) = Nothing+ | otherwise =+ Just $ rq & lNextToken .~ rs ^. lrsNextToken++instance AWSRequest ListParents where+ type Rs ListParents = ListParentsResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ ListParentsResponse' <$>+ (x .?> "NextToken") <*> (x .?> "Parents" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable ListParents where++instance NFData ListParents where++instance ToHeaders ListParents where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.ListParents" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListParents where+ toJSON ListParents'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lNextToken,+ ("MaxResults" .=) <$> _lMaxResults,+ Just ("ChildId" .= _lChildId)])++instance ToPath ListParents where+ toPath = const "/"++instance ToQuery ListParents where+ toQuery = const mempty++-- | /See:/ 'listParentsResponse' smart constructor.+data ListParentsResponse = ListParentsResponse'+ { _lrsNextToken :: !(Maybe Text)+ , _lrsParents :: !(Maybe [Parent])+ , _lrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListParentsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lrsNextToken' - If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+--+-- * 'lrsParents' - A list of parents for the specified child account or OU.+--+-- * 'lrsResponseStatus' - -- | The response status code.+listParentsResponse+ :: Int -- ^ 'lrsResponseStatus'+ -> ListParentsResponse+listParentsResponse pResponseStatus_ =+ ListParentsResponse'+ { _lrsNextToken = Nothing+ , _lrsParents = Nothing+ , _lrsResponseStatus = pResponseStatus_+ }+++-- | If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+lrsNextToken :: Lens' ListParentsResponse (Maybe Text)+lrsNextToken = lens _lrsNextToken (\ s a -> s{_lrsNextToken = a});++-- | A list of parents for the specified child account or OU.+lrsParents :: Lens' ListParentsResponse [Parent]+lrsParents = lens _lrsParents (\ s a -> s{_lrsParents = a}) . _Default . _Coerce;++-- | -- | The response status code.+lrsResponseStatus :: Lens' ListParentsResponse Int+lrsResponseStatus = lens _lrsResponseStatus (\ s a -> s{_lrsResponseStatus = a});++instance NFData ListParentsResponse where
+ gen/Network/AWS/Organizations/ListPolicies.hs view
@@ -0,0 +1,177 @@+{-# 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.Organizations.ListPolicies+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves the list of all policies in an organization of a specified type.+--+--+-- This operation can be called only from the organization's master account.+--+--+-- This operation returns paginated results.+module Network.AWS.Organizations.ListPolicies+ (+ -- * Creating a Request+ listPolicies+ , ListPolicies+ -- * Request Lenses+ , lpNextToken+ , lpMaxResults+ , lpFilter++ -- * Destructuring the Response+ , listPoliciesResponse+ , ListPoliciesResponse+ -- * Response Lenses+ , lprsNextToken+ , lprsPolicies+ , lprsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listPolicies' smart constructor.+data ListPolicies = ListPolicies'+ { _lpNextToken :: !(Maybe Text)+ , _lpMaxResults :: !(Maybe Nat)+ , _lpFilter :: !PolicyType+ } 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:+--+-- * 'lpNextToken' - Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+--+-- * 'lpMaxResults' - (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+--+-- * 'lpFilter' - Specifies the type of policy that you want to include in the response.+listPolicies+ :: PolicyType -- ^ 'lpFilter'+ -> ListPolicies+listPolicies pFilter_ =+ ListPolicies'+ {_lpNextToken = Nothing, _lpMaxResults = Nothing, _lpFilter = pFilter_}+++-- | Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+lpNextToken :: Lens' ListPolicies (Maybe Text)+lpNextToken = lens _lpNextToken (\ s a -> s{_lpNextToken = a});++-- | (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+lpMaxResults :: Lens' ListPolicies (Maybe Natural)+lpMaxResults = lens _lpMaxResults (\ s a -> s{_lpMaxResults = a}) . mapping _Nat;++-- | Specifies the type of policy that you want to include in the response.+lpFilter :: Lens' ListPolicies PolicyType+lpFilter = lens _lpFilter (\ s a -> s{_lpFilter = a});++instance AWSPager ListPolicies where+ page rq rs+ | stop (rs ^. lprsNextToken) = Nothing+ | stop (rs ^. lprsPolicies) = Nothing+ | otherwise =+ Just $ rq & lpNextToken .~ rs ^. lprsNextToken++instance AWSRequest ListPolicies where+ type Rs ListPolicies = ListPoliciesResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ ListPoliciesResponse' <$>+ (x .?> "NextToken") <*> (x .?> "Policies" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable ListPolicies where++instance NFData ListPolicies where++instance ToHeaders ListPolicies where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.ListPolicies" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListPolicies where+ toJSON ListPolicies'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lpNextToken,+ ("MaxResults" .=) <$> _lpMaxResults,+ Just ("Filter" .= _lpFilter)])++instance ToPath ListPolicies where+ toPath = const "/"++instance ToQuery ListPolicies where+ toQuery = const mempty++-- | /See:/ 'listPoliciesResponse' smart constructor.+data ListPoliciesResponse = ListPoliciesResponse'+ { _lprsNextToken :: !(Maybe Text)+ , _lprsPolicies :: !(Maybe [PolicySummary])+ , _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:+--+-- * 'lprsNextToken' - If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+--+-- * 'lprsPolicies' - A list of policies that match the filter criteria in the request. The output list does not include the policy contents. To see the content for a policy, see 'DescribePolicy' .+--+-- * 'lprsResponseStatus' - -- | The response status code.+listPoliciesResponse+ :: Int -- ^ 'lprsResponseStatus'+ -> ListPoliciesResponse+listPoliciesResponse pResponseStatus_ =+ ListPoliciesResponse'+ { _lprsNextToken = Nothing+ , _lprsPolicies = Nothing+ , _lprsResponseStatus = pResponseStatus_+ }+++-- | If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+lprsNextToken :: Lens' ListPoliciesResponse (Maybe Text)+lprsNextToken = lens _lprsNextToken (\ s a -> s{_lprsNextToken = a});++-- | A list of policies that match the filter criteria in the request. The output list does not include the policy contents. To see the content for a policy, see 'DescribePolicy' .+lprsPolicies :: Lens' ListPoliciesResponse [PolicySummary]+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});++instance NFData ListPoliciesResponse where
+ gen/Network/AWS/Organizations/ListPoliciesForTarget.hs view
@@ -0,0 +1,192 @@+{-# 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.Organizations.ListPoliciesForTarget+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the policies that are directly attached to the specified target root, organizational unit (OU), or account. You must specify the policy type that you want included in the returned list.+--+--+-- This operation can be called only from the organization's master account.+--+--+-- This operation returns paginated results.+module Network.AWS.Organizations.ListPoliciesForTarget+ (+ -- * Creating a Request+ listPoliciesForTarget+ , ListPoliciesForTarget+ -- * Request Lenses+ , lpftNextToken+ , lpftMaxResults+ , lpftTargetId+ , lpftFilter++ -- * Destructuring the Response+ , listPoliciesForTargetResponse+ , ListPoliciesForTargetResponse+ -- * Response Lenses+ , lpftrsNextToken+ , lpftrsPolicies+ , lpftrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listPoliciesForTarget' smart constructor.+data ListPoliciesForTarget = ListPoliciesForTarget'+ { _lpftNextToken :: !(Maybe Text)+ , _lpftMaxResults :: !(Maybe Nat)+ , _lpftTargetId :: !Text+ , _lpftFilter :: !PolicyType+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListPoliciesForTarget' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lpftNextToken' - Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+--+-- * 'lpftMaxResults' - (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+--+-- * 'lpftTargetId' - The unique identifier (ID) of the root, organizational unit, or account whose policies you want to list. The <http://wikipedia.org/wiki/regex regex pattern> for a target ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Account: a string that consists of exactly 12 digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+--+-- * 'lpftFilter' - The type of policy that you want to include in the returned list.+listPoliciesForTarget+ :: Text -- ^ 'lpftTargetId'+ -> PolicyType -- ^ 'lpftFilter'+ -> ListPoliciesForTarget+listPoliciesForTarget pTargetId_ pFilter_ =+ ListPoliciesForTarget'+ { _lpftNextToken = Nothing+ , _lpftMaxResults = Nothing+ , _lpftTargetId = pTargetId_+ , _lpftFilter = pFilter_+ }+++-- | Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+lpftNextToken :: Lens' ListPoliciesForTarget (Maybe Text)+lpftNextToken = lens _lpftNextToken (\ s a -> s{_lpftNextToken = a});++-- | (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+lpftMaxResults :: Lens' ListPoliciesForTarget (Maybe Natural)+lpftMaxResults = lens _lpftMaxResults (\ s a -> s{_lpftMaxResults = a}) . mapping _Nat;++-- | The unique identifier (ID) of the root, organizational unit, or account whose policies you want to list. The <http://wikipedia.org/wiki/regex regex pattern> for a target ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Account: a string that consists of exactly 12 digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+lpftTargetId :: Lens' ListPoliciesForTarget Text+lpftTargetId = lens _lpftTargetId (\ s a -> s{_lpftTargetId = a});++-- | The type of policy that you want to include in the returned list.+lpftFilter :: Lens' ListPoliciesForTarget PolicyType+lpftFilter = lens _lpftFilter (\ s a -> s{_lpftFilter = a});++instance AWSPager ListPoliciesForTarget where+ page rq rs+ | stop (rs ^. lpftrsNextToken) = Nothing+ | stop (rs ^. lpftrsPolicies) = Nothing+ | otherwise =+ Just $ rq & lpftNextToken .~ rs ^. lpftrsNextToken++instance AWSRequest ListPoliciesForTarget where+ type Rs ListPoliciesForTarget =+ ListPoliciesForTargetResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ ListPoliciesForTargetResponse' <$>+ (x .?> "NextToken") <*> (x .?> "Policies" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable ListPoliciesForTarget where++instance NFData ListPoliciesForTarget where++instance ToHeaders ListPoliciesForTarget where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.ListPoliciesForTarget" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListPoliciesForTarget where+ toJSON ListPoliciesForTarget'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lpftNextToken,+ ("MaxResults" .=) <$> _lpftMaxResults,+ Just ("TargetId" .= _lpftTargetId),+ Just ("Filter" .= _lpftFilter)])++instance ToPath ListPoliciesForTarget where+ toPath = const "/"++instance ToQuery ListPoliciesForTarget where+ toQuery = const mempty++-- | /See:/ 'listPoliciesForTargetResponse' smart constructor.+data ListPoliciesForTargetResponse = ListPoliciesForTargetResponse'+ { _lpftrsNextToken :: !(Maybe Text)+ , _lpftrsPolicies :: !(Maybe [PolicySummary])+ , _lpftrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListPoliciesForTargetResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lpftrsNextToken' - If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+--+-- * 'lpftrsPolicies' - The list of policies that match the criteria in the request.+--+-- * 'lpftrsResponseStatus' - -- | The response status code.+listPoliciesForTargetResponse+ :: Int -- ^ 'lpftrsResponseStatus'+ -> ListPoliciesForTargetResponse+listPoliciesForTargetResponse pResponseStatus_ =+ ListPoliciesForTargetResponse'+ { _lpftrsNextToken = Nothing+ , _lpftrsPolicies = Nothing+ , _lpftrsResponseStatus = pResponseStatus_+ }+++-- | If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+lpftrsNextToken :: Lens' ListPoliciesForTargetResponse (Maybe Text)+lpftrsNextToken = lens _lpftrsNextToken (\ s a -> s{_lpftrsNextToken = a});++-- | The list of policies that match the criteria in the request.+lpftrsPolicies :: Lens' ListPoliciesForTargetResponse [PolicySummary]+lpftrsPolicies = lens _lpftrsPolicies (\ s a -> s{_lpftrsPolicies = a}) . _Default . _Coerce;++-- | -- | The response status code.+lpftrsResponseStatus :: Lens' ListPoliciesForTargetResponse Int+lpftrsResponseStatus = lens _lpftrsResponseStatus (\ s a -> s{_lpftrsResponseStatus = a});++instance NFData ListPoliciesForTargetResponse where
+ gen/Network/AWS/Organizations/ListRoots.hs view
@@ -0,0 +1,165 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Organizations.ListRoots+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the roots that are defined in the current organization.+--+--+-- This operation can be called only from the organization's master account.+--+--+-- This operation returns paginated results.+module Network.AWS.Organizations.ListRoots+ (+ -- * Creating a Request+ listRoots+ , ListRoots+ -- * Request Lenses+ , lrNextToken+ , lrMaxResults++ -- * Destructuring the Response+ , listRootsResponse+ , ListRootsResponse+ -- * Response Lenses+ , lrrsRoots+ , lrrsNextToken+ , lrrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listRoots' smart constructor.+data ListRoots = ListRoots'+ { _lrNextToken :: !(Maybe Text)+ , _lrMaxResults :: !(Maybe Nat)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListRoots' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lrNextToken' - Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+--+-- * 'lrMaxResults' - (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+listRoots+ :: ListRoots+listRoots = ListRoots' {_lrNextToken = Nothing, _lrMaxResults = Nothing}+++-- | Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+lrNextToken :: Lens' ListRoots (Maybe Text)+lrNextToken = lens _lrNextToken (\ s a -> s{_lrNextToken = a});++-- | (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+lrMaxResults :: Lens' ListRoots (Maybe Natural)+lrMaxResults = lens _lrMaxResults (\ s a -> s{_lrMaxResults = a}) . mapping _Nat;++instance AWSPager ListRoots where+ page rq rs+ | stop (rs ^. lrrsNextToken) = Nothing+ | stop (rs ^. lrrsRoots) = Nothing+ | otherwise =+ Just $ rq & lrNextToken .~ rs ^. lrrsNextToken++instance AWSRequest ListRoots where+ type Rs ListRoots = ListRootsResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ ListRootsResponse' <$>+ (x .?> "Roots" .!@ mempty) <*> (x .?> "NextToken")+ <*> (pure (fromEnum s)))++instance Hashable ListRoots where++instance NFData ListRoots where++instance ToHeaders ListRoots where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.ListRoots" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListRoots where+ toJSON ListRoots'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lrNextToken,+ ("MaxResults" .=) <$> _lrMaxResults])++instance ToPath ListRoots where+ toPath = const "/"++instance ToQuery ListRoots where+ toQuery = const mempty++-- | /See:/ 'listRootsResponse' smart constructor.+data ListRootsResponse = ListRootsResponse'+ { _lrrsRoots :: !(Maybe [Root])+ , _lrrsNextToken :: !(Maybe Text)+ , _lrrsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListRootsResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lrrsRoots' - A list of roots that are defined in an organization.+--+-- * 'lrrsNextToken' - If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+--+-- * 'lrrsResponseStatus' - -- | The response status code.+listRootsResponse+ :: Int -- ^ 'lrrsResponseStatus'+ -> ListRootsResponse+listRootsResponse pResponseStatus_ =+ ListRootsResponse'+ { _lrrsRoots = Nothing+ , _lrrsNextToken = Nothing+ , _lrrsResponseStatus = pResponseStatus_+ }+++-- | A list of roots that are defined in an organization.+lrrsRoots :: Lens' ListRootsResponse [Root]+lrrsRoots = lens _lrrsRoots (\ s a -> s{_lrrsRoots = a}) . _Default . _Coerce;++-- | If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+lrrsNextToken :: Lens' ListRootsResponse (Maybe Text)+lrrsNextToken = lens _lrrsNextToken (\ s a -> s{_lrrsNextToken = a});++-- | -- | The response status code.+lrrsResponseStatus :: Lens' ListRootsResponse Int+lrrsResponseStatus = lens _lrrsResponseStatus (\ s a -> s{_lrrsResponseStatus = a});++instance NFData ListRootsResponse where
+ gen/Network/AWS/Organizations/ListTargetsForPolicy.hs view
@@ -0,0 +1,181 @@+{-# 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.Organizations.ListTargetsForPolicy+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists all the roots, OUs, and accounts to which the specified policy is attached.+--+--+-- This operation can be called only from the organization's master account.+--+--+-- This operation returns paginated results.+module Network.AWS.Organizations.ListTargetsForPolicy+ (+ -- * Creating a Request+ listTargetsForPolicy+ , ListTargetsForPolicy+ -- * Request Lenses+ , ltfpNextToken+ , ltfpMaxResults+ , ltfpPolicyId++ -- * Destructuring the Response+ , listTargetsForPolicyResponse+ , ListTargetsForPolicyResponse+ -- * Response Lenses+ , ltfprsNextToken+ , ltfprsTargets+ , ltfprsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Pager+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listTargetsForPolicy' smart constructor.+data ListTargetsForPolicy = ListTargetsForPolicy'+ { _ltfpNextToken :: !(Maybe Text)+ , _ltfpMaxResults :: !(Maybe Nat)+ , _ltfpPolicyId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListTargetsForPolicy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ltfpNextToken' - Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+--+-- * 'ltfpMaxResults' - (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+--+-- * 'ltfpPolicyId' - The unique identifier (ID) of the policy for which you want to know its attachments. The <http://wikipedia.org/wiki/regex regex pattern> for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.+listTargetsForPolicy+ :: Text -- ^ 'ltfpPolicyId'+ -> ListTargetsForPolicy+listTargetsForPolicy pPolicyId_ =+ ListTargetsForPolicy'+ { _ltfpNextToken = Nothing+ , _ltfpMaxResults = Nothing+ , _ltfpPolicyId = pPolicyId_+ }+++-- | Use this parameter if you receive a @NextToken@ response in a previous request that indicates that there is more output available. Set it to the value of the previous call's @NextToken@ response to indicate where the output should continue from.+ltfpNextToken :: Lens' ListTargetsForPolicy (Maybe Text)+ltfpNextToken = lens _ltfpNextToken (\ s a -> s{_ltfpNextToken = a});++-- | (Optional) Use this to limit the number of results you want included in the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the @NextToken@ response element is present and has a value (is not null). Include that value as the @NextToken@ request parameter in the next call to the operation to get the next part of the results. Note that Organizations might return fewer results than the maximum even when there are more results available. You should check @NextToken@ after every operation to ensure that you receive all of the results.+ltfpMaxResults :: Lens' ListTargetsForPolicy (Maybe Natural)+ltfpMaxResults = lens _ltfpMaxResults (\ s a -> s{_ltfpMaxResults = a}) . mapping _Nat;++-- | The unique identifier (ID) of the policy for which you want to know its attachments. The <http://wikipedia.org/wiki/regex regex pattern> for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.+ltfpPolicyId :: Lens' ListTargetsForPolicy Text+ltfpPolicyId = lens _ltfpPolicyId (\ s a -> s{_ltfpPolicyId = a});++instance AWSPager ListTargetsForPolicy where+ page rq rs+ | stop (rs ^. ltfprsNextToken) = Nothing+ | stop (rs ^. ltfprsTargets) = Nothing+ | otherwise =+ Just $ rq & ltfpNextToken .~ rs ^. ltfprsNextToken++instance AWSRequest ListTargetsForPolicy where+ type Rs ListTargetsForPolicy =+ ListTargetsForPolicyResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ ListTargetsForPolicyResponse' <$>+ (x .?> "NextToken") <*> (x .?> "Targets" .!@ mempty)+ <*> (pure (fromEnum s)))++instance Hashable ListTargetsForPolicy where++instance NFData ListTargetsForPolicy where++instance ToHeaders ListTargetsForPolicy where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.ListTargetsForPolicy" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListTargetsForPolicy where+ toJSON ListTargetsForPolicy'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _ltfpNextToken,+ ("MaxResults" .=) <$> _ltfpMaxResults,+ Just ("PolicyId" .= _ltfpPolicyId)])++instance ToPath ListTargetsForPolicy where+ toPath = const "/"++instance ToQuery ListTargetsForPolicy where+ toQuery = const mempty++-- | /See:/ 'listTargetsForPolicyResponse' smart constructor.+data ListTargetsForPolicyResponse = ListTargetsForPolicyResponse'+ { _ltfprsNextToken :: !(Maybe Text)+ , _ltfprsTargets :: !(Maybe [PolicyTargetSummary])+ , _ltfprsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListTargetsForPolicyResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ltfprsNextToken' - If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+--+-- * 'ltfprsTargets' - A list of structures, each of which contains details about one of the entities to which the specified policy is attached.+--+-- * 'ltfprsResponseStatus' - -- | The response status code.+listTargetsForPolicyResponse+ :: Int -- ^ 'ltfprsResponseStatus'+ -> ListTargetsForPolicyResponse+listTargetsForPolicyResponse pResponseStatus_ =+ ListTargetsForPolicyResponse'+ { _ltfprsNextToken = Nothing+ , _ltfprsTargets = Nothing+ , _ltfprsResponseStatus = pResponseStatus_+ }+++-- | If present, this value indicates that there is more output available than is included in the current response. Use this value in the @NextToken@ request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the @NextToken@ response element comes back as @null@ .+ltfprsNextToken :: Lens' ListTargetsForPolicyResponse (Maybe Text)+ltfprsNextToken = lens _ltfprsNextToken (\ s a -> s{_ltfprsNextToken = a});++-- | A list of structures, each of which contains details about one of the entities to which the specified policy is attached.+ltfprsTargets :: Lens' ListTargetsForPolicyResponse [PolicyTargetSummary]+ltfprsTargets = lens _ltfprsTargets (\ s a -> s{_ltfprsTargets = a}) . _Default . _Coerce;++-- | -- | The response status code.+ltfprsResponseStatus :: Lens' ListTargetsForPolicyResponse Int+ltfprsResponseStatus = lens _ltfprsResponseStatus (\ s a -> s{_ltfprsResponseStatus = a});++instance NFData ListTargetsForPolicyResponse where
+ gen/Network/AWS/Organizations/MoveAccount.hs view
@@ -0,0 +1,137 @@+{-# 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.Organizations.MoveAccount+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Moves an account from its current source parent root or OU to the specified destination parent root or OU.+--+--+-- This operation can be called only from the organization's master account.+--+module Network.AWS.Organizations.MoveAccount+ (+ -- * Creating a Request+ moveAccount+ , MoveAccount+ -- * Request Lenses+ , maAccountId+ , maSourceParentId+ , maDestinationParentId++ -- * Destructuring the Response+ , moveAccountResponse+ , MoveAccountResponse+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'moveAccount' smart constructor.+data MoveAccount = MoveAccount'+ { _maAccountId :: !Text+ , _maSourceParentId :: !Text+ , _maDestinationParentId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'MoveAccount' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'maAccountId' - The unique identifier (ID) of the account that you want to move. The <http://wikipedia.org/wiki/regex regex pattern> for an account ID string requires exactly 12 digits.+--+-- * 'maSourceParentId' - The unique identifier (ID) of the root or organizational unit that you want to move the account from. The <http://wikipedia.org/wiki/regex regex pattern> for a parent ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+--+-- * 'maDestinationParentId' - The unique identifier (ID) of the root or organizational unit that you want to move the account to. The <http://wikipedia.org/wiki/regex regex pattern> for a parent ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+moveAccount+ :: Text -- ^ 'maAccountId'+ -> Text -- ^ 'maSourceParentId'+ -> Text -- ^ 'maDestinationParentId'+ -> MoveAccount+moveAccount pAccountId_ pSourceParentId_ pDestinationParentId_ =+ MoveAccount'+ { _maAccountId = pAccountId_+ , _maSourceParentId = pSourceParentId_+ , _maDestinationParentId = pDestinationParentId_+ }+++-- | The unique identifier (ID) of the account that you want to move. The <http://wikipedia.org/wiki/regex regex pattern> for an account ID string requires exactly 12 digits.+maAccountId :: Lens' MoveAccount Text+maAccountId = lens _maAccountId (\ s a -> s{_maAccountId = a});++-- | The unique identifier (ID) of the root or organizational unit that you want to move the account from. The <http://wikipedia.org/wiki/regex regex pattern> for a parent ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+maSourceParentId :: Lens' MoveAccount Text+maSourceParentId = lens _maSourceParentId (\ s a -> s{_maSourceParentId = a});++-- | The unique identifier (ID) of the root or organizational unit that you want to move the account to. The <http://wikipedia.org/wiki/regex regex pattern> for a parent ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+maDestinationParentId :: Lens' MoveAccount Text+maDestinationParentId = lens _maDestinationParentId (\ s a -> s{_maDestinationParentId = a});++instance AWSRequest MoveAccount where+ type Rs MoveAccount = MoveAccountResponse+ request = postJSON organizations+ response = receiveNull MoveAccountResponse'++instance Hashable MoveAccount where++instance NFData MoveAccount where++instance ToHeaders MoveAccount where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.MoveAccount" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON MoveAccount where+ toJSON MoveAccount'{..}+ = object+ (catMaybes+ [Just ("AccountId" .= _maAccountId),+ Just ("SourceParentId" .= _maSourceParentId),+ Just+ ("DestinationParentId" .= _maDestinationParentId)])++instance ToPath MoveAccount where+ toPath = const "/"++instance ToQuery MoveAccount where+ toQuery = const mempty++-- | /See:/ 'moveAccountResponse' smart constructor.+data MoveAccountResponse =+ MoveAccountResponse'+ deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'MoveAccountResponse' with the minimum fields required to make a request.+--+moveAccountResponse+ :: MoveAccountResponse+moveAccountResponse = MoveAccountResponse'+++instance NFData MoveAccountResponse where
+ gen/Network/AWS/Organizations/RemoveAccountFromOrganization.hs view
@@ -0,0 +1,124 @@+{-# 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.Organizations.RemoveAccountFromOrganization+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes the specified account from the organization.+--+--+-- The removed account becomes a stand-alone account that is not a member of any organization. It is no longer subject to any policies and is responsible for its own bill payments. The organization's master account is no longer charged for any expenses accrued by the member account after it is removed from the organization.+--+-- This operation can be called only from the organization's master account. Member accounts can remove themselves with 'LeaveOrganization' instead.+--+-- /Important:/ * You can remove an account from your organization only if the account is configured with the information required to operate as a standalone account. When you create an account in an organization using the AWS Organizations console, API, or CLI commands, the information required of standalone accounts is /not/ automatically collected. For an account that you want to make standalone, you must accept the End User License Agreement (EULA), choose a support plan, provide and verify the required contact information, and provide a current payment method. AWS uses the payment method to charge for any billable (not free tier) AWS activity that occurs while the account is not attached to an organization. To remove an account that does not yet have this information, you must sign in as the member account and follow the steps at <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info To leave an organization when all required account information has not yet been provided> in the /AWS Organizations User Guide/ .+--+-- * You can remove a member account only after you enable IAM user access to billing in the member account. For more information, see <http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate Activating Access to the Billing and Cost Management Console> in the /AWS Billing and Cost Management User Guide/ .+--+--+--+module Network.AWS.Organizations.RemoveAccountFromOrganization+ (+ -- * Creating a Request+ removeAccountFromOrganization+ , RemoveAccountFromOrganization+ -- * Request Lenses+ , rafoAccountId++ -- * Destructuring the Response+ , removeAccountFromOrganizationResponse+ , RemoveAccountFromOrganizationResponse+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'removeAccountFromOrganization' smart constructor.+newtype RemoveAccountFromOrganization = RemoveAccountFromOrganization'+ { _rafoAccountId :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'RemoveAccountFromOrganization' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rafoAccountId' - The unique identifier (ID) of the member account that you want to remove from the organization. The <http://wikipedia.org/wiki/regex regex pattern> for an account ID string requires exactly 12 digits.+removeAccountFromOrganization+ :: Text -- ^ 'rafoAccountId'+ -> RemoveAccountFromOrganization+removeAccountFromOrganization pAccountId_ =+ RemoveAccountFromOrganization' {_rafoAccountId = pAccountId_}+++-- | The unique identifier (ID) of the member account that you want to remove from the organization. The <http://wikipedia.org/wiki/regex regex pattern> for an account ID string requires exactly 12 digits.+rafoAccountId :: Lens' RemoveAccountFromOrganization Text+rafoAccountId = lens _rafoAccountId (\ s a -> s{_rafoAccountId = a});++instance AWSRequest RemoveAccountFromOrganization+ where+ type Rs RemoveAccountFromOrganization =+ RemoveAccountFromOrganizationResponse+ request = postJSON organizations+ response+ = receiveNull RemoveAccountFromOrganizationResponse'++instance Hashable RemoveAccountFromOrganization where++instance NFData RemoveAccountFromOrganization where++instance ToHeaders RemoveAccountFromOrganization+ where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.RemoveAccountFromOrganization"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON RemoveAccountFromOrganization where+ toJSON RemoveAccountFromOrganization'{..}+ = object+ (catMaybes [Just ("AccountId" .= _rafoAccountId)])++instance ToPath RemoveAccountFromOrganization where+ toPath = const "/"++instance ToQuery RemoveAccountFromOrganization where+ toQuery = const mempty++-- | /See:/ 'removeAccountFromOrganizationResponse' smart constructor.+data RemoveAccountFromOrganizationResponse =+ RemoveAccountFromOrganizationResponse'+ deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'RemoveAccountFromOrganizationResponse' with the minimum fields required to make a request.+--+removeAccountFromOrganizationResponse+ :: RemoveAccountFromOrganizationResponse+removeAccountFromOrganizationResponse = RemoveAccountFromOrganizationResponse'+++instance NFData RemoveAccountFromOrganizationResponse+ where
+ gen/Network/AWS/Organizations/Types.hs view
@@ -0,0 +1,664 @@+{-# LANGUAGE OverloadedStrings #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Organizations.Types+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.Organizations.Types+ (+ -- * Service Configuration+ organizations++ -- * Errors+ , _PolicyNotFoundException+ , _PolicyTypeAlreadyEnabledException+ , _HandshakeConstraintViolationException+ , _AccessDeniedException+ , _MalformedPolicyDocumentException+ , _RootNotFoundException+ , _MasterCannotLeaveOrganizationException+ , _AccountNotFoundException+ , _DuplicatePolicyException+ , _ConstraintViolationException+ , _FinalizingOrganizationException+ , _HandshakeNotFoundException+ , _PolicyTypeNotAvailableForOrganizationException+ , _ChildNotFoundException+ , _OrganizationalUnitNotFoundException+ , _DestinationParentNotFoundException+ , _OrganizationNotEmptyException+ , _PolicyTypeNotEnabledException+ , _DuplicateHandshakeException+ , _OrganizationalUnitNotEmptyException+ , _TooManyRequestsException+ , _ConcurrentModificationException+ , _ServiceException+ , _SourceParentNotFoundException+ , _TargetNotFoundException+ , _CreateAccountStatusNotFoundException+ , _AlreadyInOrganizationException+ , _DuplicateOrganizationalUnitException+ , _InvalidInputException+ , _PolicyNotAttachedException+ , _ParentNotFoundException+ , _AccessDeniedForDependencyException+ , _AWSOrganizationsNotInUseException+ , _PolicyInUseException+ , _InvalidHandshakeTransitionException+ , _HandshakeAlreadyInStateException+ , _DuplicateAccountException+ , _DuplicatePolicyAttachmentException++ -- * AccountJoinedMethod+ , AccountJoinedMethod (..)++ -- * AccountStatus+ , AccountStatus (..)++ -- * ActionType+ , ActionType (..)++ -- * ChildType+ , ChildType (..)++ -- * CreateAccountFailureReason+ , CreateAccountFailureReason (..)++ -- * CreateAccountState+ , CreateAccountState (..)++ -- * HandshakePartyType+ , HandshakePartyType (..)++ -- * HandshakeResourceType+ , HandshakeResourceType (..)++ -- * HandshakeState+ , HandshakeState (..)++ -- * IAMUserAccessToBilling+ , IAMUserAccessToBilling (..)++ -- * OrganizationFeatureSet+ , OrganizationFeatureSet (..)++ -- * ParentType+ , ParentType (..)++ -- * PolicyType+ , PolicyType (..)++ -- * PolicyTypeStatus+ , PolicyTypeStatus (..)++ -- * TargetType+ , TargetType (..)++ -- * Account+ , Account+ , account+ , aStatus+ , aJoinedMethod+ , aEmail+ , aARN+ , aJoinedTimestamp+ , aName+ , aId++ -- * Child+ , Child+ , child+ , cId+ , cType++ -- * CreateAccountStatus+ , CreateAccountStatus+ , createAccountStatus+ , casFailureReason+ , casState+ , casCompletedTimestamp+ , casAccountName+ , casAccountId+ , casId+ , casRequestedTimestamp++ -- * Handshake+ , Handshake+ , handshake+ , hState+ , hARN+ , hAction+ , hResources+ , hId+ , hExpirationTimestamp+ , hParties+ , hRequestedTimestamp++ -- * HandshakeFilter+ , HandshakeFilter+ , handshakeFilter+ , hfParentHandshakeId+ , hfActionType++ -- * HandshakeParty+ , HandshakeParty+ , handshakeParty+ , hpId+ , hpType++ -- * HandshakeResource+ , HandshakeResource+ , handshakeResource+ , hrValue+ , hrResources+ , hrType++ -- * Organization+ , Organization+ , organization+ , oARN+ , oMasterAccountId+ , oMasterAccountARN+ , oMasterAccountEmail+ , oAvailablePolicyTypes+ , oId+ , oFeatureSet++ -- * OrganizationalUnit+ , OrganizationalUnit+ , organizationalUnit+ , ouARN+ , ouName+ , ouId++ -- * Parent+ , Parent+ , parent+ , pId+ , pType++ -- * Policy+ , Policy+ , policy+ , pContent+ , pPolicySummary++ -- * PolicySummary+ , PolicySummary+ , policySummary+ , psARN+ , psName+ , psId+ , psAWSManaged+ , psType+ , psDescription++ -- * PolicyTargetSummary+ , PolicyTargetSummary+ , policyTargetSummary+ , polTargetId+ , polARN+ , polName+ , polType++ -- * PolicyTypeSummary+ , PolicyTypeSummary+ , policyTypeSummary+ , ptsStatus+ , ptsType++ -- * Root+ , Root+ , root+ , rARN+ , rName+ , rId+ , rPolicyTypes+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types.Product+import Network.AWS.Organizations.Types.Sum+import Network.AWS.Prelude+import Network.AWS.Sign.V4++-- | API version @2016-11-28@ of the Amazon Organizations SDK configuration.+organizations :: Service+organizations =+ Service+ { _svcAbbrev = "Organizations"+ , _svcSigner = v4+ , _svcPrefix = "organizations"+ , _svcVersion = "2016-11-28"+ , _svcEndpoint = defaultEndpoint organizations+ , _svcTimeout = Just 70+ , _svcCheck = statusSuccess+ , _svcError = parseJSONError "Organizations"+ , _svcRetry = retry+ }+ where+ retry =+ Exponential+ { _retryBase = 5.0e-2+ , _retryGrowth = 2+ , _retryAttempts = 5+ , _retryCheck = check+ }+ check e+ | has (hasCode "ThrottledException" . hasStatus 400) e =+ Just "throttled_exception"+ | has (hasStatus 429) e = Just "too_many_requests"+ | has (hasCode "ThrottlingException" . hasStatus 400) e =+ Just "throttling_exception"+ | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"+ | has (hasStatus 504) e = Just "gateway_timeout"+ | has (hasStatus 502) e = Just "bad_gateway"+ | has (hasStatus 503) e = Just "service_unavailable"+ | has (hasStatus 500) e = Just "general_server_error"+ | has (hasStatus 509) e = Just "limit_exceeded"+ | otherwise = Nothing+++-- | We can't find a policy with the PolicyId that you specified.+--+--+_PolicyNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_PolicyNotFoundException =+ _MatchServiceError organizations "PolicyNotFoundException"+++-- | The specified policy type is already enabled in the specified root.+--+--+_PolicyTypeAlreadyEnabledException :: AsError a => Getting (First ServiceError) a ServiceError+_PolicyTypeAlreadyEnabledException =+ _MatchServiceError organizations "PolicyTypeAlreadyEnabledException"+++-- | The requested operation would violate the constraint identified in the reason code.+--+--+-- * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. __Note__ : deleted and closed accounts still count toward your limit.+--+-- /Important:/ If you get an exception that indicates that you exceeded your account limits for the organization or that you can"t add an account because your organization is still initializing, please contact <https://console.aws.amazon.com/support/home#/ AWS Customer Support> .+--+-- * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of handshakes you can send in one day.+--+-- * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because the invited account is already a member of an organization.+--+-- * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid because the organization has already enabled all features.+--+-- * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You cannot issue new invitations to join an organization while it is in the process of enabling all features. You can resume inviting accounts after you finalize the process when all accounts have agreed to the change.+--+-- * PAYMENT_INSTRUMENT_REQUIRED: You cannot complete the operation with an account that does not have a payment instrument, such as a credit card, associated with it.+--+-- * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because the account is from a different marketplace than the accounts in the organization. For example, accounts with India addresses must be associated with the AISPL marketplace. All accounts in an organization must be from the same marketplace.+--+-- * ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED: You attempted to change the membership of an account too quickly after its previous change.+--+--+--+_HandshakeConstraintViolationException :: AsError a => Getting (First ServiceError) a ServiceError+_HandshakeConstraintViolationException =+ _MatchServiceError organizations "HandshakeConstraintViolationException"+++-- | You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see <http://docs.aws.amazon.com/IAM/latest/UserGuide/access.html Access Management> in the /IAM User Guide/ .+--+--+_AccessDeniedException :: AsError a => Getting (First ServiceError) a ServiceError+_AccessDeniedException =+ _MatchServiceError organizations "AccessDeniedException"+++-- | The provided policy document does not meet the requirements of the specified policy type. For example, the syntax might be incorrect. For details about service control policy syntax, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html Service Control Policy Syntax> in the /AWS Organizations User Guide/ .+--+--+_MalformedPolicyDocumentException :: AsError a => Getting (First ServiceError) a ServiceError+_MalformedPolicyDocumentException =+ _MatchServiceError organizations "MalformedPolicyDocumentException"+++-- | We can't find a root with the RootId that you specified.+--+--+_RootNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_RootNotFoundException =+ _MatchServiceError organizations "RootNotFoundException"+++-- | You can't remove a master account from an organization. If you want the master account to become a member account in another organization, you must first delete the current organization of the master account.+--+--+_MasterCannotLeaveOrganizationException :: AsError a => Getting (First ServiceError) a ServiceError+_MasterCannotLeaveOrganizationException =+ _MatchServiceError organizations "MasterCannotLeaveOrganizationException"+++-- | We can't find an AWS account with the AccountId that you specified, or the account whose credentials you used to make this request is not a member of an organization.+--+--+_AccountNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_AccountNotFoundException =+ _MatchServiceError organizations "AccountNotFoundException"+++-- | A policy with the same name already exists.+--+--+_DuplicatePolicyException :: AsError a => Getting (First ServiceError) a ServiceError+_DuplicatePolicyException =+ _MatchServiceError organizations "DuplicatePolicyException"+++-- | Performing this operation violates a minimum or maximum value limit. For example, attempting to removing the last SCP from an OU or root, inviting or creating too many accounts to the organization, or attaching too many policies to an account, OU, or root. This exception includes a reason that contains additional information about the violated limit.+--+--+--+--+-- * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number of accounts in an organization. If you need more accounts, contact AWS Support to request an increase in your limit.+--+-- Or, The number of invitations that you tried to send would cause you to exceed the limit of accounts in your organization. Send fewer invitations, or contact AWS Support to request an increase in the number of accounts.+--+-- __Note__ : deleted and closed accounts still count toward your limit.+--+-- /Important:/ If you get an exception that indicates that you exceeded your account limits for the organization or that you can"t add an account because your organization is still initializing, please contact <https://console.aws.amazon.com/support/home#/ AWS Customer Support> .+--+-- * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of handshakes you can send in one day.+--+-- * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational units you can have in an organization.+--+-- * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit tree that is too many levels deep.+--+-- * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of policies that you can have in an organization.+--+-- * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the number of policies of a certain type that can be attached to an entity at one time.+--+-- * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a policy from an entity that would cause the entity to have fewer than the minimum number of policies of a certain type required.+--+-- * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account from the organization that does not yet have enough information to exist as a stand-alone account. This account requires you to first agree to the AWS Customer Agreement. Follow the steps at <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info To leave an organization when all required account information has not yet been provided> in the /AWS Organizations User Guide/ .+--+-- * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove an account from the organization that does not yet have enough information to exist as a stand-alone account. This account requires you to first complete phone verification. Follow the steps at <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info To leave an organization when all required account information has not yet been provided> in the /AWS Organizations User Guide/ .+--+-- * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization with this account, you first must associate a payment instrument, such as a credit card, with the account. Follow the steps at <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info To leave an organization when all required account information has not yet been provided> in the /AWS Organizations User Guide/ .+--+-- * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation with this member account, you first must associate a payment instrument, such as a credit card, with the account. Follow the steps at <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info To leave an organization when all required account information has not yet been provided> in the /AWS Organizations User Guide/ .+--+-- * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of accounts that you can create in one day.+--+-- * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account in this organization, you first must migrate the organization's master account to the marketplace that corresponds to the master account's address. For example, accounts with India addresses must be associated with the AISPL marketplace. All accounts in an organization must be associated with the same marketplace.+--+-- * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you must first provide contact a valid address and phone number for the master account. Then try the operation again.+--+--+--+_ConstraintViolationException :: AsError a => Getting (First ServiceError) a ServiceError+_ConstraintViolationException =+ _MatchServiceError organizations "ConstraintViolationException"+++-- | AWS Organizations could not finalize the creation of your organization. Try again later. If this persists, contact AWS customer support.+--+--+_FinalizingOrganizationException :: AsError a => Getting (First ServiceError) a ServiceError+_FinalizingOrganizationException =+ _MatchServiceError organizations "FinalizingOrganizationException"+++-- | We can't find a handshake with the HandshakeId that you specified.+--+--+_HandshakeNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_HandshakeNotFoundException =+ _MatchServiceError organizations "HandshakeNotFoundException"+++-- | You can't use the specified policy type with the feature set currently enabled for this organization. For example, you can enable service control policies (SCPs) only after you enable all features in the organization. For more information, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root Enabling and Disabling a Policy Type on a Root> in the /AWS Organizations User Guide/ .+--+--+_PolicyTypeNotAvailableForOrganizationException :: AsError a => Getting (First ServiceError) a ServiceError+_PolicyTypeNotAvailableForOrganizationException =+ _MatchServiceError+ organizations+ "PolicyTypeNotAvailableForOrganizationException"+++-- | We can't find an organizational unit (OU) or AWS account with the ChildId that you specified.+--+--+_ChildNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_ChildNotFoundException =+ _MatchServiceError organizations "ChildNotFoundException"+++-- | We can't find an organizational unit (OU) with the OrganizationalUnitId that you specified.+--+--+_OrganizationalUnitNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_OrganizationalUnitNotFoundException =+ _MatchServiceError organizations "OrganizationalUnitNotFoundException"+++-- | We can't find the destination container (a root or OU) with the ParentId that you specified.+--+--+_DestinationParentNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_DestinationParentNotFoundException =+ _MatchServiceError organizations "DestinationParentNotFoundException"+++-- | The organization isn't empty. To delete an organization, you must first remove all accounts except the master account, delete all organizational units (OUs), and delete all policies.+--+--+_OrganizationNotEmptyException :: AsError a => Getting (First ServiceError) a ServiceError+_OrganizationNotEmptyException =+ _MatchServiceError organizations "OrganizationNotEmptyException"+++-- | The specified policy type is not currently enabled in this root. You cannot attach policies of the specified type to entities in a root until you enable that type in the root. For more information, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html Enabling All Features in Your Organization> in the /AWS Organizations User Guide/ .+--+--+_PolicyTypeNotEnabledException :: AsError a => Getting (First ServiceError) a ServiceError+_PolicyTypeNotEnabledException =+ _MatchServiceError organizations "PolicyTypeNotEnabledException"+++-- | A handshake with the same action and target already exists. For example, if you invited an account to join your organization, the invited account might already have a pending invitation from this organization. If you intend to resend an invitation to an account, ensure that existing handshakes that might be considered duplicates are canceled or declined.+--+--+_DuplicateHandshakeException :: AsError a => Getting (First ServiceError) a ServiceError+_DuplicateHandshakeException =+ _MatchServiceError organizations "DuplicateHandshakeException"+++-- | The specified organizational unit (OU) is not empty. Move all accounts to another root or to other OUs, remove all child OUs, and then try the operation again.+--+--+_OrganizationalUnitNotEmptyException :: AsError a => Getting (First ServiceError) a ServiceError+_OrganizationalUnitNotEmptyException =+ _MatchServiceError organizations "OrganizationalUnitNotEmptyException"+++-- | You've sent too many requests in too short a period of time. The limit helps protect against denial-of-service attacks. Try again later.+--+--+_TooManyRequestsException :: AsError a => Getting (First ServiceError) a ServiceError+_TooManyRequestsException =+ _MatchServiceError organizations "TooManyRequestsException"+++-- | The target of the operation is currently being modified by a different request. Try again later.+--+--+_ConcurrentModificationException :: AsError a => Getting (First ServiceError) a ServiceError+_ConcurrentModificationException =+ _MatchServiceError organizations "ConcurrentModificationException"+++-- | AWS Organizations can't complete your request because of an internal service error. Try again later.+--+--+_ServiceException :: AsError a => Getting (First ServiceError) a ServiceError+_ServiceException = _MatchServiceError organizations "ServiceException"+++-- | We can't find a source root or OU with the ParentId that you specified.+--+--+_SourceParentNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_SourceParentNotFoundException =+ _MatchServiceError organizations "SourceParentNotFoundException"+++-- | We can't find a root, OU, or account with the TargetId that you specified.+--+--+_TargetNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_TargetNotFoundException =+ _MatchServiceError organizations "TargetNotFoundException"+++-- | We can't find an create account request with the CreateAccountRequestId that you specified.+--+--+_CreateAccountStatusNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_CreateAccountStatusNotFoundException =+ _MatchServiceError organizations "CreateAccountStatusNotFoundException"+++-- | This account is already a member of an organization. An account can belong to only one organization at a time.+--+--+_AlreadyInOrganizationException :: AsError a => Getting (First ServiceError) a ServiceError+_AlreadyInOrganizationException =+ _MatchServiceError organizations "AlreadyInOrganizationException"+++-- | An organizational unit (OU) with the same name already exists.+--+--+_DuplicateOrganizationalUnitException :: AsError a => Getting (First ServiceError) a ServiceError+_DuplicateOrganizationalUnitException =+ _MatchServiceError organizations "DuplicateOrganizationalUnitException"+++-- | The requested operation failed because you provided invalid values for one or more of the request parameters. This exception includes a reason that contains additional information about the violated limit:+--+--+-- * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account, organization, or email) as a party.+--+-- * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the organization.+--+-- * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.+--+-- * INVALID_ENUM: You specified a value that is not valid for that parameter.+--+-- * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid characters.+--+-- * INVALID_LIST_MEMBER: You provided a list to a parameter that contains at least one invalid value.+--+-- * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer than allowed.+--+-- * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger value than allowed.+--+-- * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter than allowed.+--+-- * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller value than allowed.+--+-- * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and cannot be modified.+--+-- * INVALID_PATTERN: You provided a value that doesn't match the required pattern.+--+-- * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't match the required pattern.+--+-- * INPUT_REQUIRED: You must include a value for all required parameters.+--+-- * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter from the response to a previous call of the operation.+--+-- * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter for the operation.+--+-- * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only between entities in the same root.+--+--+--+_InvalidInputException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidInputException =+ _MatchServiceError organizations "InvalidInputException"+++-- | The policy isn't attached to the specified target in the specified root.+--+--+_PolicyNotAttachedException :: AsError a => Getting (First ServiceError) a ServiceError+_PolicyNotAttachedException =+ _MatchServiceError organizations "PolicyNotAttachedException"+++-- | We can't find a root or organizational unit (OU) with the ParentId that you specified.+--+--+_ParentNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_ParentNotFoundException =+ _MatchServiceError organizations "ParentNotFoundException"+++-- | The operation you attempted requires you to have the @iam:CreateServiceLinkedRole@ so that Organizations can create the required service-linked role. You do not have that permission.+--+--+_AccessDeniedForDependencyException :: AsError a => Getting (First ServiceError) a ServiceError+_AccessDeniedForDependencyException =+ _MatchServiceError organizations "AccessDeniedForDependencyException"+++-- | Your account is not a member of an organization. To make this request, you must use the credentials of an account that belongs to an organization.+--+--+_AWSOrganizationsNotInUseException :: AsError a => Getting (First ServiceError) a ServiceError+_AWSOrganizationsNotInUseException =+ _MatchServiceError organizations "AWSOrganizationsNotInUseException"+++-- | The policy is attached to one or more entities. You must detach it from all roots, organizational units (OUs), and accounts before performing this operation.+--+--+_PolicyInUseException :: AsError a => Getting (First ServiceError) a ServiceError+_PolicyInUseException = _MatchServiceError organizations "PolicyInUseException"+++-- | You can't perform the operation on the handshake in its current state. For example, you can't cancel a handshake that was already accepted, or accept a handshake that was already declined.+--+--+_InvalidHandshakeTransitionException :: AsError a => Getting (First ServiceError) a ServiceError+_InvalidHandshakeTransitionException =+ _MatchServiceError organizations "InvalidHandshakeTransitionException"+++-- | The specified handshake is already in the requested state. For example, you can't accept a handshake that was already accepted.+--+--+_HandshakeAlreadyInStateException :: AsError a => Getting (First ServiceError) a ServiceError+_HandshakeAlreadyInStateException =+ _MatchServiceError organizations "HandshakeAlreadyInStateException"+++-- | That account is already present in the specified destination.+--+--+_DuplicateAccountException :: AsError a => Getting (First ServiceError) a ServiceError+_DuplicateAccountException =+ _MatchServiceError organizations "DuplicateAccountException"+++-- | The selected policy is already attached to the specified target.+--+--+_DuplicatePolicyAttachmentException :: AsError a => Getting (First ServiceError) a ServiceError+_DuplicatePolicyAttachmentException =+ _MatchServiceError organizations "DuplicatePolicyAttachmentException"+
+ gen/Network/AWS/Organizations/Types/Product.hs view
@@ -0,0 +1,961 @@+{-# 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.Organizations.Types.Product+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.Organizations.Types.Product where++import Network.AWS.Lens+import Network.AWS.Organizations.Types.Sum+import Network.AWS.Prelude++-- | Contains information about an AWS account that is a member of an organization.+--+--+--+-- /See:/ 'account' smart constructor.+data Account = Account'+ { _aStatus :: !(Maybe AccountStatus)+ , _aJoinedMethod :: !(Maybe AccountJoinedMethod)+ , _aEmail :: !(Maybe (Sensitive Text))+ , _aARN :: !(Maybe Text)+ , _aJoinedTimestamp :: !(Maybe POSIX)+ , _aName :: !(Maybe (Sensitive Text))+ , _aId :: !(Maybe Text)+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Account' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'aStatus' - The status of the account in the organization.+--+-- * 'aJoinedMethod' - The method by which the account joined the organization.+--+-- * 'aEmail' - The email address associated with the AWS account. The <http://wikipedia.org/wiki/regex regex pattern> for this parameter is a string of characters that represents a standard Internet email address.+--+-- * 'aARN' - The Amazon Resource Name (ARN) of the account. For more information about ARNs in Organizations, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns ARN Formats Supported by Organizations> in the /AWS Organizations User Guide/ .+--+-- * 'aJoinedTimestamp' - The date the account became a part of the organization.+--+-- * 'aName' - The friendly name of the account. The <http://wikipedia.org/wiki/regex regex pattern> that is used to validate this parameter is a string of any of the characters in the ASCII character range.+--+-- * 'aId' - The unique identifier (ID) of the account. The <http://wikipedia.org/wiki/regex regex pattern> for an account ID string requires exactly 12 digits.+account+ :: Account+account =+ Account'+ { _aStatus = Nothing+ , _aJoinedMethod = Nothing+ , _aEmail = Nothing+ , _aARN = Nothing+ , _aJoinedTimestamp = Nothing+ , _aName = Nothing+ , _aId = Nothing+ }+++-- | The status of the account in the organization.+aStatus :: Lens' Account (Maybe AccountStatus)+aStatus = lens _aStatus (\ s a -> s{_aStatus = a});++-- | The method by which the account joined the organization.+aJoinedMethod :: Lens' Account (Maybe AccountJoinedMethod)+aJoinedMethod = lens _aJoinedMethod (\ s a -> s{_aJoinedMethod = a});++-- | The email address associated with the AWS account. The <http://wikipedia.org/wiki/regex regex pattern> for this parameter is a string of characters that represents a standard Internet email address.+aEmail :: Lens' Account (Maybe Text)+aEmail = lens _aEmail (\ s a -> s{_aEmail = a}) . mapping _Sensitive;++-- | The Amazon Resource Name (ARN) of the account. For more information about ARNs in Organizations, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns ARN Formats Supported by Organizations> in the /AWS Organizations User Guide/ .+aARN :: Lens' Account (Maybe Text)+aARN = lens _aARN (\ s a -> s{_aARN = a});++-- | The date the account became a part of the organization.+aJoinedTimestamp :: Lens' Account (Maybe UTCTime)+aJoinedTimestamp = lens _aJoinedTimestamp (\ s a -> s{_aJoinedTimestamp = a}) . mapping _Time;++-- | The friendly name of the account. The <http://wikipedia.org/wiki/regex regex pattern> that is used to validate this parameter is a string of any of the characters in the ASCII character range.+aName :: Lens' Account (Maybe Text)+aName = lens _aName (\ s a -> s{_aName = a}) . mapping _Sensitive;++-- | The unique identifier (ID) of the account. The <http://wikipedia.org/wiki/regex regex pattern> for an account ID string requires exactly 12 digits.+aId :: Lens' Account (Maybe Text)+aId = lens _aId (\ s a -> s{_aId = a});++instance FromJSON Account where+ parseJSON+ = withObject "Account"+ (\ x ->+ Account' <$>+ (x .:? "Status") <*> (x .:? "JoinedMethod") <*>+ (x .:? "Email")+ <*> (x .:? "Arn")+ <*> (x .:? "JoinedTimestamp")+ <*> (x .:? "Name")+ <*> (x .:? "Id"))++instance Hashable Account where++instance NFData Account where++-- | Contains a list of child entities, either OUs or accounts.+--+--+--+-- /See:/ 'child' smart constructor.+data Child = Child'+ { _cId :: !(Maybe Text)+ , _cType :: !(Maybe ChildType)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Child' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cId' - The unique identifier (ID) of this child entity. The <http://wikipedia.org/wiki/regex regex pattern> for a child ID string requires one of the following: * Account: a string that consists of exactly 12 digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that contains the OU) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+--+-- * 'cType' - The type of this child entity.+child+ :: Child+child = Child' {_cId = Nothing, _cType = Nothing}+++-- | The unique identifier (ID) of this child entity. The <http://wikipedia.org/wiki/regex regex pattern> for a child ID string requires one of the following: * Account: a string that consists of exactly 12 digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that contains the OU) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+cId :: Lens' Child (Maybe Text)+cId = lens _cId (\ s a -> s{_cId = a});++-- | The type of this child entity.+cType :: Lens' Child (Maybe ChildType)+cType = lens _cType (\ s a -> s{_cType = a});++instance FromJSON Child where+ parseJSON+ = withObject "Child"+ (\ x -> Child' <$> (x .:? "Id") <*> (x .:? "Type"))++instance Hashable Child where++instance NFData Child where++-- | Contains the status about a 'CreateAccount' request to create an AWS account in an organization.+--+--+--+-- /See:/ 'createAccountStatus' smart constructor.+data CreateAccountStatus = CreateAccountStatus'+ { _casFailureReason :: !(Maybe CreateAccountFailureReason)+ , _casState :: !(Maybe CreateAccountState)+ , _casCompletedTimestamp :: !(Maybe POSIX)+ , _casAccountName :: !(Maybe (Sensitive Text))+ , _casAccountId :: !(Maybe Text)+ , _casId :: !(Maybe Text)+ , _casRequestedTimestamp :: !(Maybe POSIX)+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateAccountStatus' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'casFailureReason' - If the request failed, a description of the reason for the failure. * ACCOUNT_LIMIT_EXCEEDED: The account could not be created because you have reached the limit on the number of accounts in your organization. * EMAIL_ALREADY_EXISTS: The account could not be created because another AWS account with that email address already exists. * INVALID_ADDRESS: The account could not be created because the address you provided is not valid. * INVALID_EMAIL: The account could not be created because the email address you provided is not valid. * INTERNAL_FAILURE: The account could not be created because of an internal failure. Try again later. If the problem persists, contact Customer Support.+--+-- * 'casState' - The status of the request.+--+-- * 'casCompletedTimestamp' - The date and time that the account was created and the request completed.+--+-- * 'casAccountName' - The account name given to the account when it was created.+--+-- * 'casAccountId' - If the account was created successfully, the unique identifier (ID) of the new account. The <http://wikipedia.org/wiki/regex regex pattern> for an account ID string requires exactly 12 digits.+--+-- * 'casId' - The unique identifier (ID) that references this request. You get this value from the response of the initial 'CreateAccount' request to create the account. The <http://wikipedia.org/wiki/regex regex pattern> for an create account request ID string requires "car-" followed by from 8 to 32 lower-case letters or digits.+--+-- * 'casRequestedTimestamp' - The date and time that the request was made for the account creation.+createAccountStatus+ :: CreateAccountStatus+createAccountStatus =+ CreateAccountStatus'+ { _casFailureReason = Nothing+ , _casState = Nothing+ , _casCompletedTimestamp = Nothing+ , _casAccountName = Nothing+ , _casAccountId = Nothing+ , _casId = Nothing+ , _casRequestedTimestamp = Nothing+ }+++-- | If the request failed, a description of the reason for the failure. * ACCOUNT_LIMIT_EXCEEDED: The account could not be created because you have reached the limit on the number of accounts in your organization. * EMAIL_ALREADY_EXISTS: The account could not be created because another AWS account with that email address already exists. * INVALID_ADDRESS: The account could not be created because the address you provided is not valid. * INVALID_EMAIL: The account could not be created because the email address you provided is not valid. * INTERNAL_FAILURE: The account could not be created because of an internal failure. Try again later. If the problem persists, contact Customer Support.+casFailureReason :: Lens' CreateAccountStatus (Maybe CreateAccountFailureReason)+casFailureReason = lens _casFailureReason (\ s a -> s{_casFailureReason = a});++-- | The status of the request.+casState :: Lens' CreateAccountStatus (Maybe CreateAccountState)+casState = lens _casState (\ s a -> s{_casState = a});++-- | The date and time that the account was created and the request completed.+casCompletedTimestamp :: Lens' CreateAccountStatus (Maybe UTCTime)+casCompletedTimestamp = lens _casCompletedTimestamp (\ s a -> s{_casCompletedTimestamp = a}) . mapping _Time;++-- | The account name given to the account when it was created.+casAccountName :: Lens' CreateAccountStatus (Maybe Text)+casAccountName = lens _casAccountName (\ s a -> s{_casAccountName = a}) . mapping _Sensitive;++-- | If the account was created successfully, the unique identifier (ID) of the new account. The <http://wikipedia.org/wiki/regex regex pattern> for an account ID string requires exactly 12 digits.+casAccountId :: Lens' CreateAccountStatus (Maybe Text)+casAccountId = lens _casAccountId (\ s a -> s{_casAccountId = a});++-- | The unique identifier (ID) that references this request. You get this value from the response of the initial 'CreateAccount' request to create the account. The <http://wikipedia.org/wiki/regex regex pattern> for an create account request ID string requires "car-" followed by from 8 to 32 lower-case letters or digits.+casId :: Lens' CreateAccountStatus (Maybe Text)+casId = lens _casId (\ s a -> s{_casId = a});++-- | The date and time that the request was made for the account creation.+casRequestedTimestamp :: Lens' CreateAccountStatus (Maybe UTCTime)+casRequestedTimestamp = lens _casRequestedTimestamp (\ s a -> s{_casRequestedTimestamp = a}) . mapping _Time;++instance FromJSON CreateAccountStatus where+ parseJSON+ = withObject "CreateAccountStatus"+ (\ x ->+ CreateAccountStatus' <$>+ (x .:? "FailureReason") <*> (x .:? "State") <*>+ (x .:? "CompletedTimestamp")+ <*> (x .:? "AccountName")+ <*> (x .:? "AccountId")+ <*> (x .:? "Id")+ <*> (x .:? "RequestedTimestamp"))++instance Hashable CreateAccountStatus where++instance NFData CreateAccountStatus where++-- | Contains information that must be exchanged to securely establish a relationship between two accounts (an /originator/ and a /recipient/ ). For example, when a master account (the originator) invites another account (the recipient) to join its organization, the two accounts exchange information as a series of handshake requests and responses.+--+--+-- __Note:__ Handshakes that are CANCELED, ACCEPTED, or DECLINED show up in lists for only 30 days after entering that state After that they are deleted.+--+--+-- /See:/ 'handshake' smart constructor.+data Handshake = Handshake'+ { _hState :: !(Maybe HandshakeState)+ , _hARN :: !(Maybe Text)+ , _hAction :: !(Maybe ActionType)+ , _hResources :: !(Maybe [HandshakeResource])+ , _hId :: !(Maybe Text)+ , _hExpirationTimestamp :: !(Maybe POSIX)+ , _hParties :: !(Maybe [HandshakeParty])+ , _hRequestedTimestamp :: !(Maybe POSIX)+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Handshake' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'hState' - The current state of the handshake. Use the state to trace the flow of the handshake through the process from its creation to its acceptance. The meaning of each of the valid values is as follows: * __REQUESTED__ : This handshake was sent to multiple recipients (applicable to only some handshake types) and not all recipients have responded yet. The request stays in this state until all recipients respond. * __OPEN__ : This handshake was sent to multiple recipients (applicable to only some policy types) and all recipients have responded, allowing the originator to complete the handshake action. * __CANCELED__ : This handshake is no longer active because it was canceled by the originating account. * __ACCEPTED__ : This handshake is complete because it has been accepted by the recipient. * __DECLINED__ : This handshake is no longer active because it was declined by the recipient account. * __EXPIRED__ : This handshake is no longer active because the originator did not receive a response of any kind from the recipient before the expiration time (15 days).+--+-- * 'hARN' - The Amazon Resource Name (ARN) of a handshake. For more information about ARNs in Organizations, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns ARN Formats Supported by Organizations> in the /AWS Organizations User Guide/ .+--+-- * 'hAction' - The type of handshake, indicating what action occurs when the recipient accepts the handshake. The following handshake types are supported: * __INVITE__ : This type of handshake represents a request to join an organization. It is always sent from the master account to only non-member accounts. * __ENABLE_ALL_FEATURES__ : This type of handshake represents a request to enable all features in an organization. It is always sent from the master account to only /invited/ member accounts. Created accounts do not receive this because those accounts were created by the organization's master account and approval is inferred. * __APPROVE_ALL_FEATURES__ : This type of handshake is sent from the Organizations service when all member accounts have approved the @ENABLE_ALL_FEATURES@ invitation. It is sent only to the master account and signals the master that it can finalize the process to enable all features.+--+-- * 'hResources' - Additional information that is needed to process the handshake.+--+-- * 'hId' - The unique identifier (ID) of a handshake. The originating account creates the ID when it initiates the handshake. The <http://wikipedia.org/wiki/regex regex pattern> for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.+--+-- * 'hExpirationTimestamp' - The date and time that the handshake expires. If the recipient of the handshake request fails to respond before the specified date and time, the handshake becomes inactive and is no longer valid.+--+-- * 'hParties' - Information about the two accounts that are participating in the handshake.+--+-- * 'hRequestedTimestamp' - The date and time that the handshake request was made.+handshake+ :: Handshake+handshake =+ Handshake'+ { _hState = Nothing+ , _hARN = Nothing+ , _hAction = Nothing+ , _hResources = Nothing+ , _hId = Nothing+ , _hExpirationTimestamp = Nothing+ , _hParties = Nothing+ , _hRequestedTimestamp = Nothing+ }+++-- | The current state of the handshake. Use the state to trace the flow of the handshake through the process from its creation to its acceptance. The meaning of each of the valid values is as follows: * __REQUESTED__ : This handshake was sent to multiple recipients (applicable to only some handshake types) and not all recipients have responded yet. The request stays in this state until all recipients respond. * __OPEN__ : This handshake was sent to multiple recipients (applicable to only some policy types) and all recipients have responded, allowing the originator to complete the handshake action. * __CANCELED__ : This handshake is no longer active because it was canceled by the originating account. * __ACCEPTED__ : This handshake is complete because it has been accepted by the recipient. * __DECLINED__ : This handshake is no longer active because it was declined by the recipient account. * __EXPIRED__ : This handshake is no longer active because the originator did not receive a response of any kind from the recipient before the expiration time (15 days).+hState :: Lens' Handshake (Maybe HandshakeState)+hState = lens _hState (\ s a -> s{_hState = a});++-- | The Amazon Resource Name (ARN) of a handshake. For more information about ARNs in Organizations, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns ARN Formats Supported by Organizations> in the /AWS Organizations User Guide/ .+hARN :: Lens' Handshake (Maybe Text)+hARN = lens _hARN (\ s a -> s{_hARN = a});++-- | The type of handshake, indicating what action occurs when the recipient accepts the handshake. The following handshake types are supported: * __INVITE__ : This type of handshake represents a request to join an organization. It is always sent from the master account to only non-member accounts. * __ENABLE_ALL_FEATURES__ : This type of handshake represents a request to enable all features in an organization. It is always sent from the master account to only /invited/ member accounts. Created accounts do not receive this because those accounts were created by the organization's master account and approval is inferred. * __APPROVE_ALL_FEATURES__ : This type of handshake is sent from the Organizations service when all member accounts have approved the @ENABLE_ALL_FEATURES@ invitation. It is sent only to the master account and signals the master that it can finalize the process to enable all features.+hAction :: Lens' Handshake (Maybe ActionType)+hAction = lens _hAction (\ s a -> s{_hAction = a});++-- | Additional information that is needed to process the handshake.+hResources :: Lens' Handshake [HandshakeResource]+hResources = lens _hResources (\ s a -> s{_hResources = a}) . _Default . _Coerce;++-- | The unique identifier (ID) of a handshake. The originating account creates the ID when it initiates the handshake. The <http://wikipedia.org/wiki/regex regex pattern> for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.+hId :: Lens' Handshake (Maybe Text)+hId = lens _hId (\ s a -> s{_hId = a});++-- | The date and time that the handshake expires. If the recipient of the handshake request fails to respond before the specified date and time, the handshake becomes inactive and is no longer valid.+hExpirationTimestamp :: Lens' Handshake (Maybe UTCTime)+hExpirationTimestamp = lens _hExpirationTimestamp (\ s a -> s{_hExpirationTimestamp = a}) . mapping _Time;++-- | Information about the two accounts that are participating in the handshake.+hParties :: Lens' Handshake [HandshakeParty]+hParties = lens _hParties (\ s a -> s{_hParties = a}) . _Default . _Coerce;++-- | The date and time that the handshake request was made.+hRequestedTimestamp :: Lens' Handshake (Maybe UTCTime)+hRequestedTimestamp = lens _hRequestedTimestamp (\ s a -> s{_hRequestedTimestamp = a}) . mapping _Time;++instance FromJSON Handshake where+ parseJSON+ = withObject "Handshake"+ (\ x ->+ Handshake' <$>+ (x .:? "State") <*> (x .:? "Arn") <*>+ (x .:? "Action")+ <*> (x .:? "Resources" .!= mempty)+ <*> (x .:? "Id")+ <*> (x .:? "ExpirationTimestamp")+ <*> (x .:? "Parties" .!= mempty)+ <*> (x .:? "RequestedTimestamp"))++instance Hashable Handshake where++instance NFData Handshake where++-- | Specifies the criteria that are used to select the handshakes for the operation.+--+--+--+-- /See:/ 'handshakeFilter' smart constructor.+data HandshakeFilter = HandshakeFilter'+ { _hfParentHandshakeId :: !(Maybe Text)+ , _hfActionType :: !(Maybe ActionType)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'HandshakeFilter' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'hfParentHandshakeId' - Specifies the parent handshake. Only used for handshake types that are a child of another type. If you specify @ParentHandshakeId@ , you cannot also specify @ActionType@ . The <http://wikipedia.org/wiki/regex regex pattern> for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.+--+-- * 'hfActionType' - Specifies the type of handshake action. If you specify @ActionType@ , you cannot also specify @ParentHandshakeId@ .+handshakeFilter+ :: HandshakeFilter+handshakeFilter =+ HandshakeFilter' {_hfParentHandshakeId = Nothing, _hfActionType = Nothing}+++-- | Specifies the parent handshake. Only used for handshake types that are a child of another type. If you specify @ParentHandshakeId@ , you cannot also specify @ActionType@ . The <http://wikipedia.org/wiki/regex regex pattern> for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.+hfParentHandshakeId :: Lens' HandshakeFilter (Maybe Text)+hfParentHandshakeId = lens _hfParentHandshakeId (\ s a -> s{_hfParentHandshakeId = a});++-- | Specifies the type of handshake action. If you specify @ActionType@ , you cannot also specify @ParentHandshakeId@ .+hfActionType :: Lens' HandshakeFilter (Maybe ActionType)+hfActionType = lens _hfActionType (\ s a -> s{_hfActionType = a});++instance Hashable HandshakeFilter where++instance NFData HandshakeFilter where++instance ToJSON HandshakeFilter where+ toJSON HandshakeFilter'{..}+ = object+ (catMaybes+ [("ParentHandshakeId" .=) <$> _hfParentHandshakeId,+ ("ActionType" .=) <$> _hfActionType])++-- | Identifies a participant in a handshake.+--+--+--+-- /See:/ 'handshakeParty' smart constructor.+data HandshakeParty = HandshakeParty'+ { _hpId :: !(Sensitive Text)+ , _hpType :: !HandshakePartyType+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'HandshakeParty' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'hpId' - The unique identifier (ID) for the party. The <http://wikipedia.org/wiki/regex regex pattern> for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.+--+-- * 'hpType' - The type of party.+handshakeParty+ :: Text -- ^ 'hpId'+ -> HandshakePartyType -- ^ 'hpType'+ -> HandshakeParty+handshakeParty pId_ pType_ =+ HandshakeParty' {_hpId = _Sensitive # pId_, _hpType = pType_}+++-- | The unique identifier (ID) for the party. The <http://wikipedia.org/wiki/regex regex pattern> for handshake ID string requires "h-" followed by from 8 to 32 lower-case letters or digits.+hpId :: Lens' HandshakeParty Text+hpId = lens _hpId (\ s a -> s{_hpId = a}) . _Sensitive;++-- | The type of party.+hpType :: Lens' HandshakeParty HandshakePartyType+hpType = lens _hpType (\ s a -> s{_hpType = a});++instance FromJSON HandshakeParty where+ parseJSON+ = withObject "HandshakeParty"+ (\ x ->+ HandshakeParty' <$> (x .: "Id") <*> (x .: "Type"))++instance Hashable HandshakeParty where++instance NFData HandshakeParty where++instance ToJSON HandshakeParty where+ toJSON HandshakeParty'{..}+ = object+ (catMaybes+ [Just ("Id" .= _hpId), Just ("Type" .= _hpType)])++-- | Contains additional data that is needed to process a handshake.+--+--+--+-- /See:/ 'handshakeResource' smart constructor.+data HandshakeResource = HandshakeResource'+ { _hrValue :: !(Maybe (Sensitive Text))+ , _hrResources :: !(Maybe [HandshakeResource])+ , _hrType :: !(Maybe HandshakeResourceType)+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'HandshakeResource' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'hrValue' - The information that is passed to the other party in the handshake. The format of the value string must match the requirements of the specified type.+--+-- * 'hrResources' - When needed, contains an additional array of @HandshakeResource@ objects.+--+-- * 'hrType' - The type of information being passed, specifying how the value is to be interpreted by the other party: * @ACCOUNT@ - Specifies an AWS account ID number. * @ORGANIZATION@ - Specifies an organization ID number. * @EMAIL@ - Specifies the email address that is associated with the account that receives the handshake. * @OWNER_EMAIL@ - Specifies the email address associated with the master account. Included as information about an organization. * @OWNER_NAME@ - Specifies the name associated with the master account. Included as information about an organization. * @NOTES@ - Additional text provided by the handshake initiator and intended for the recipient to read.+handshakeResource+ :: HandshakeResource+handshakeResource =+ HandshakeResource'+ {_hrValue = Nothing, _hrResources = Nothing, _hrType = Nothing}+++-- | The information that is passed to the other party in the handshake. The format of the value string must match the requirements of the specified type.+hrValue :: Lens' HandshakeResource (Maybe Text)+hrValue = lens _hrValue (\ s a -> s{_hrValue = a}) . mapping _Sensitive;++-- | When needed, contains an additional array of @HandshakeResource@ objects.+hrResources :: Lens' HandshakeResource [HandshakeResource]+hrResources = lens _hrResources (\ s a -> s{_hrResources = a}) . _Default . _Coerce;++-- | The type of information being passed, specifying how the value is to be interpreted by the other party: * @ACCOUNT@ - Specifies an AWS account ID number. * @ORGANIZATION@ - Specifies an organization ID number. * @EMAIL@ - Specifies the email address that is associated with the account that receives the handshake. * @OWNER_EMAIL@ - Specifies the email address associated with the master account. Included as information about an organization. * @OWNER_NAME@ - Specifies the name associated with the master account. Included as information about an organization. * @NOTES@ - Additional text provided by the handshake initiator and intended for the recipient to read.+hrType :: Lens' HandshakeResource (Maybe HandshakeResourceType)+hrType = lens _hrType (\ s a -> s{_hrType = a});++instance FromJSON HandshakeResource where+ parseJSON+ = withObject "HandshakeResource"+ (\ x ->+ HandshakeResource' <$>+ (x .:? "Value") <*> (x .:? "Resources" .!= mempty)+ <*> (x .:? "Type"))++instance Hashable HandshakeResource where++instance NFData HandshakeResource where++-- | Contains details about an organization. An organization is a collection of accounts that are centrally managed together using consolidated billing, organized hierarchically with organizational units (OUs), and controlled with policies .+--+--+--+-- /See:/ 'organization' smart constructor.+data Organization = Organization'+ { _oARN :: !(Maybe Text)+ , _oMasterAccountId :: !(Maybe Text)+ , _oMasterAccountARN :: !(Maybe Text)+ , _oMasterAccountEmail :: !(Maybe (Sensitive Text))+ , _oAvailablePolicyTypes :: !(Maybe [PolicyTypeSummary])+ , _oId :: !(Maybe Text)+ , _oFeatureSet :: !(Maybe OrganizationFeatureSet)+ } deriving (Eq, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Organization' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'oARN' - The Amazon Resource Name (ARN) of an organization. For more information about ARNs in Organizations, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns ARN Formats Supported by Organizations> in the /AWS Organizations User Guide/ .+--+-- * 'oMasterAccountId' - The unique identifier (ID) of the master account of an organization. The <http://wikipedia.org/wiki/regex regex pattern> for an account ID string requires exactly 12 digits.+--+-- * 'oMasterAccountARN' - The Amazon Resource Name (ARN) of the account that is designated as the master account for the organization. For more information about ARNs in Organizations, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns ARN Formats Supported by Organizations> in the /AWS Organizations User Guide/ .+--+-- * 'oMasterAccountEmail' - The email address that is associated with the AWS account that is designated as the master account for the organization.+--+-- * 'oAvailablePolicyTypes' - A list of policy types that are enabled for this organization. For example, if your organization has all features enabled, then service control policies (SCPs) are included in the list.+--+-- * 'oId' - The unique identifier (ID) of an organization. The <http://wikipedia.org/wiki/regex regex pattern> for an organization ID string requires "o-" followed by from 10 to 32 lower-case letters or digits.+--+-- * 'oFeatureSet' - Specifies the functionality that currently is available to the organization. If set to "ALL", then all features are enabled and policies can be applied to accounts in the organization. If set to "CONSOLIDATED_BILLING", then only consolidated billing functionality is available. For more information, see <http://docs.aws.amazon.com/IAM/latest/UserGuide/orgs_manage_org_support-all-features.html Enabling All Features in Your Organization> in the /AWS Organizations User Guide/ .+organization+ :: Organization+organization =+ Organization'+ { _oARN = Nothing+ , _oMasterAccountId = Nothing+ , _oMasterAccountARN = Nothing+ , _oMasterAccountEmail = Nothing+ , _oAvailablePolicyTypes = Nothing+ , _oId = Nothing+ , _oFeatureSet = Nothing+ }+++-- | The Amazon Resource Name (ARN) of an organization. For more information about ARNs in Organizations, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns ARN Formats Supported by Organizations> in the /AWS Organizations User Guide/ .+oARN :: Lens' Organization (Maybe Text)+oARN = lens _oARN (\ s a -> s{_oARN = a});++-- | The unique identifier (ID) of the master account of an organization. The <http://wikipedia.org/wiki/regex regex pattern> for an account ID string requires exactly 12 digits.+oMasterAccountId :: Lens' Organization (Maybe Text)+oMasterAccountId = lens _oMasterAccountId (\ s a -> s{_oMasterAccountId = a});++-- | The Amazon Resource Name (ARN) of the account that is designated as the master account for the organization. For more information about ARNs in Organizations, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns ARN Formats Supported by Organizations> in the /AWS Organizations User Guide/ .+oMasterAccountARN :: Lens' Organization (Maybe Text)+oMasterAccountARN = lens _oMasterAccountARN (\ s a -> s{_oMasterAccountARN = a});++-- | The email address that is associated with the AWS account that is designated as the master account for the organization.+oMasterAccountEmail :: Lens' Organization (Maybe Text)+oMasterAccountEmail = lens _oMasterAccountEmail (\ s a -> s{_oMasterAccountEmail = a}) . mapping _Sensitive;++-- | A list of policy types that are enabled for this organization. For example, if your organization has all features enabled, then service control policies (SCPs) are included in the list.+oAvailablePolicyTypes :: Lens' Organization [PolicyTypeSummary]+oAvailablePolicyTypes = lens _oAvailablePolicyTypes (\ s a -> s{_oAvailablePolicyTypes = a}) . _Default . _Coerce;++-- | The unique identifier (ID) of an organization. The <http://wikipedia.org/wiki/regex regex pattern> for an organization ID string requires "o-" followed by from 10 to 32 lower-case letters or digits.+oId :: Lens' Organization (Maybe Text)+oId = lens _oId (\ s a -> s{_oId = a});++-- | Specifies the functionality that currently is available to the organization. If set to "ALL", then all features are enabled and policies can be applied to accounts in the organization. If set to "CONSOLIDATED_BILLING", then only consolidated billing functionality is available. For more information, see <http://docs.aws.amazon.com/IAM/latest/UserGuide/orgs_manage_org_support-all-features.html Enabling All Features in Your Organization> in the /AWS Organizations User Guide/ .+oFeatureSet :: Lens' Organization (Maybe OrganizationFeatureSet)+oFeatureSet = lens _oFeatureSet (\ s a -> s{_oFeatureSet = a});++instance FromJSON Organization where+ parseJSON+ = withObject "Organization"+ (\ x ->+ Organization' <$>+ (x .:? "Arn") <*> (x .:? "MasterAccountId") <*>+ (x .:? "MasterAccountArn")+ <*> (x .:? "MasterAccountEmail")+ <*> (x .:? "AvailablePolicyTypes" .!= mempty)+ <*> (x .:? "Id")+ <*> (x .:? "FeatureSet"))++instance Hashable Organization where++instance NFData Organization where++-- | Contains details about an organizational unit (OU). An OU is a container of AWS accounts within a root of an organization. Policies that are attached to an OU apply to all accounts contained in that OU and in any child OUs.+--+--+--+-- /See:/ 'organizationalUnit' smart constructor.+data OrganizationalUnit = OrganizationalUnit'+ { _ouARN :: !(Maybe Text)+ , _ouName :: !(Maybe Text)+ , _ouId :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'OrganizationalUnit' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ouARN' - The Amazon Resource Name (ARN) of this OU. For more information about ARNs in Organizations, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns ARN Formats Supported by Organizations> in the /AWS Organizations User Guide/ .+--+-- * 'ouName' - The friendly name of this OU. The <http://wikipedia.org/wiki/regex regex pattern> that is used to validate this parameter is a string of any of the characters in the ASCII character range.+--+-- * 'ouId' - The unique identifier (ID) associated with this OU. The <http://wikipedia.org/wiki/regex regex pattern> for an organizational unit ID string requires "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that contains the OU) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+organizationalUnit+ :: OrganizationalUnit+organizationalUnit =+ OrganizationalUnit' {_ouARN = Nothing, _ouName = Nothing, _ouId = Nothing}+++-- | The Amazon Resource Name (ARN) of this OU. For more information about ARNs in Organizations, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns ARN Formats Supported by Organizations> in the /AWS Organizations User Guide/ .+ouARN :: Lens' OrganizationalUnit (Maybe Text)+ouARN = lens _ouARN (\ s a -> s{_ouARN = a});++-- | The friendly name of this OU. The <http://wikipedia.org/wiki/regex regex pattern> that is used to validate this parameter is a string of any of the characters in the ASCII character range.+ouName :: Lens' OrganizationalUnit (Maybe Text)+ouName = lens _ouName (\ s a -> s{_ouName = a});++-- | The unique identifier (ID) associated with this OU. The <http://wikipedia.org/wiki/regex regex pattern> for an organizational unit ID string requires "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that contains the OU) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+ouId :: Lens' OrganizationalUnit (Maybe Text)+ouId = lens _ouId (\ s a -> s{_ouId = a});++instance FromJSON OrganizationalUnit where+ parseJSON+ = withObject "OrganizationalUnit"+ (\ x ->+ OrganizationalUnit' <$>+ (x .:? "Arn") <*> (x .:? "Name") <*> (x .:? "Id"))++instance Hashable OrganizationalUnit where++instance NFData OrganizationalUnit where++-- | Contains information about either a root or an organizational unit (OU) that can contain OUs or accounts in an organization.+--+--+--+-- /See:/ 'parent' smart constructor.+data Parent = Parent'+ { _pId :: !(Maybe Text)+ , _pType :: !(Maybe ParentType)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Parent' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'pId' - The unique identifier (ID) of the parent entity. The <http://wikipedia.org/wiki/regex regex pattern> for a parent ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+--+-- * 'pType' - The type of the parent entity.+parent+ :: Parent+parent = Parent' {_pId = Nothing, _pType = Nothing}+++-- | The unique identifier (ID) of the parent entity. The <http://wikipedia.org/wiki/regex regex pattern> for a parent ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+pId :: Lens' Parent (Maybe Text)+pId = lens _pId (\ s a -> s{_pId = a});++-- | The type of the parent entity.+pType :: Lens' Parent (Maybe ParentType)+pType = lens _pType (\ s a -> s{_pType = a});++instance FromJSON Parent where+ parseJSON+ = withObject "Parent"+ (\ x -> Parent' <$> (x .:? "Id") <*> (x .:? "Type"))++instance Hashable Parent where++instance NFData Parent where++-- | Contains rules to be applied to the affected accounts. Policies can be attached directly to accounts, or to roots and OUs to affect all accounts in those hierarchies.+--+--+--+-- /See:/ 'policy' smart constructor.+data Policy = Policy'+ { _pContent :: !(Maybe Text)+ , _pPolicySummary :: !(Maybe PolicySummary)+ } 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:+--+-- * 'pContent' - The text content of the policy.+--+-- * 'pPolicySummary' - A structure that contains additional details about the policy.+policy+ :: Policy+policy = Policy' {_pContent = Nothing, _pPolicySummary = Nothing}+++-- | The text content of the policy.+pContent :: Lens' Policy (Maybe Text)+pContent = lens _pContent (\ s a -> s{_pContent = a});++-- | A structure that contains additional details about the policy.+pPolicySummary :: Lens' Policy (Maybe PolicySummary)+pPolicySummary = lens _pPolicySummary (\ s a -> s{_pPolicySummary = a});++instance FromJSON Policy where+ parseJSON+ = withObject "Policy"+ (\ x ->+ Policy' <$>+ (x .:? "Content") <*> (x .:? "PolicySummary"))++instance Hashable Policy where++instance NFData Policy where++-- | Contains information about a policy, but does not include the content. To see the content of a policy, see 'DescribePolicy' .+--+--+--+-- /See:/ 'policySummary' smart constructor.+data PolicySummary = PolicySummary'+ { _psARN :: !(Maybe Text)+ , _psName :: !(Maybe Text)+ , _psId :: !(Maybe Text)+ , _psAWSManaged :: !(Maybe Bool)+ , _psType :: !(Maybe PolicyType)+ , _psDescription :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'PolicySummary' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'psARN' - The Amazon Resource Name (ARN) of the policy. For more information about ARNs in Organizations, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns ARN Formats Supported by Organizations> in the /AWS Organizations User Guide/ .+--+-- * 'psName' - The friendly name of the policy. The <http://wikipedia.org/wiki/regex regex pattern> that is used to validate this parameter is a string of any of the characters in the ASCII character range.+--+-- * 'psId' - The unique identifier (ID) of the policy. The <http://wikipedia.org/wiki/regex regex pattern> for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.+--+-- * 'psAWSManaged' - A boolean value that indicates whether the specified policy is an AWS managed policy. If true, then you can attach the policy to roots, OUs, or accounts, but you cannot edit it.+--+-- * 'psType' - The type of policy.+--+-- * 'psDescription' - The description of the policy.+policySummary+ :: PolicySummary+policySummary =+ PolicySummary'+ { _psARN = Nothing+ , _psName = Nothing+ , _psId = Nothing+ , _psAWSManaged = Nothing+ , _psType = Nothing+ , _psDescription = Nothing+ }+++-- | The Amazon Resource Name (ARN) of the policy. For more information about ARNs in Organizations, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns ARN Formats Supported by Organizations> in the /AWS Organizations User Guide/ .+psARN :: Lens' PolicySummary (Maybe Text)+psARN = lens _psARN (\ s a -> s{_psARN = a});++-- | The friendly name of the policy. The <http://wikipedia.org/wiki/regex regex pattern> that is used to validate this parameter is a string of any of the characters in the ASCII character range.+psName :: Lens' PolicySummary (Maybe Text)+psName = lens _psName (\ s a -> s{_psName = a});++-- | The unique identifier (ID) of the policy. The <http://wikipedia.org/wiki/regex regex pattern> for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.+psId :: Lens' PolicySummary (Maybe Text)+psId = lens _psId (\ s a -> s{_psId = a});++-- | A boolean value that indicates whether the specified policy is an AWS managed policy. If true, then you can attach the policy to roots, OUs, or accounts, but you cannot edit it.+psAWSManaged :: Lens' PolicySummary (Maybe Bool)+psAWSManaged = lens _psAWSManaged (\ s a -> s{_psAWSManaged = a});++-- | The type of policy.+psType :: Lens' PolicySummary (Maybe PolicyType)+psType = lens _psType (\ s a -> s{_psType = a});++-- | The description of the policy.+psDescription :: Lens' PolicySummary (Maybe Text)+psDescription = lens _psDescription (\ s a -> s{_psDescription = a});++instance FromJSON PolicySummary where+ parseJSON+ = withObject "PolicySummary"+ (\ x ->+ PolicySummary' <$>+ (x .:? "Arn") <*> (x .:? "Name") <*> (x .:? "Id") <*>+ (x .:? "AwsManaged")+ <*> (x .:? "Type")+ <*> (x .:? "Description"))++instance Hashable PolicySummary where++instance NFData PolicySummary where++-- | Contains information about a root, OU, or account that a policy is attached to.+--+--+--+-- /See:/ 'policyTargetSummary' smart constructor.+data PolicyTargetSummary = PolicyTargetSummary'+ { _polTargetId :: !(Maybe Text)+ , _polARN :: !(Maybe Text)+ , _polName :: !(Maybe Text)+ , _polType :: !(Maybe TargetType)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'PolicyTargetSummary' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'polTargetId' - The unique identifier (ID) of the policy target. The <http://wikipedia.org/wiki/regex regex pattern> for a target ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Account: a string that consists of exactly 12 digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+--+-- * 'polARN' - The Amazon Resource Name (ARN) of the policy target. For more information about ARNs in Organizations, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns ARN Formats Supported by Organizations> in the /AWS Organizations User Guide/ .+--+-- * 'polName' - The friendly name of the policy target. The <http://wikipedia.org/wiki/regex regex pattern> that is used to validate this parameter is a string of any of the characters in the ASCII character range.+--+-- * 'polType' - The type of the policy target.+policyTargetSummary+ :: PolicyTargetSummary+policyTargetSummary =+ PolicyTargetSummary'+ { _polTargetId = Nothing+ , _polARN = Nothing+ , _polName = Nothing+ , _polType = Nothing+ }+++-- | The unique identifier (ID) of the policy target. The <http://wikipedia.org/wiki/regex regex pattern> for a target ID string requires one of the following: * Root: a string that begins with "r-" followed by from 4 to 32 lower-case letters or digits. * Account: a string that consists of exactly 12 digits. * Organizational unit (OU): a string that begins with "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that the OU is in) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+polTargetId :: Lens' PolicyTargetSummary (Maybe Text)+polTargetId = lens _polTargetId (\ s a -> s{_polTargetId = a});++-- | The Amazon Resource Name (ARN) of the policy target. For more information about ARNs in Organizations, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns ARN Formats Supported by Organizations> in the /AWS Organizations User Guide/ .+polARN :: Lens' PolicyTargetSummary (Maybe Text)+polARN = lens _polARN (\ s a -> s{_polARN = a});++-- | The friendly name of the policy target. The <http://wikipedia.org/wiki/regex regex pattern> that is used to validate this parameter is a string of any of the characters in the ASCII character range.+polName :: Lens' PolicyTargetSummary (Maybe Text)+polName = lens _polName (\ s a -> s{_polName = a});++-- | The type of the policy target.+polType :: Lens' PolicyTargetSummary (Maybe TargetType)+polType = lens _polType (\ s a -> s{_polType = a});++instance FromJSON PolicyTargetSummary where+ parseJSON+ = withObject "PolicyTargetSummary"+ (\ x ->+ PolicyTargetSummary' <$>+ (x .:? "TargetId") <*> (x .:? "Arn") <*>+ (x .:? "Name")+ <*> (x .:? "Type"))++instance Hashable PolicyTargetSummary where++instance NFData PolicyTargetSummary where++-- | Contains information about a policy type and its status in the associated root.+--+--+--+-- /See:/ 'policyTypeSummary' smart constructor.+data PolicyTypeSummary = PolicyTypeSummary'+ { _ptsStatus :: !(Maybe PolicyTypeStatus)+ , _ptsType :: !(Maybe PolicyType)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'PolicyTypeSummary' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ptsStatus' - The status of the policy type as it relates to the associated root. To attach a policy of the specified type to a root or to an OU or account in that root, it must be available in the organization and enabled for that root.+--+-- * 'ptsType' - The name of the policy type.+policyTypeSummary+ :: PolicyTypeSummary+policyTypeSummary =+ PolicyTypeSummary' {_ptsStatus = Nothing, _ptsType = Nothing}+++-- | The status of the policy type as it relates to the associated root. To attach a policy of the specified type to a root or to an OU or account in that root, it must be available in the organization and enabled for that root.+ptsStatus :: Lens' PolicyTypeSummary (Maybe PolicyTypeStatus)+ptsStatus = lens _ptsStatus (\ s a -> s{_ptsStatus = a});++-- | The name of the policy type.+ptsType :: Lens' PolicyTypeSummary (Maybe PolicyType)+ptsType = lens _ptsType (\ s a -> s{_ptsType = a});++instance FromJSON PolicyTypeSummary where+ parseJSON+ = withObject "PolicyTypeSummary"+ (\ x ->+ PolicyTypeSummary' <$>+ (x .:? "Status") <*> (x .:? "Type"))++instance Hashable PolicyTypeSummary where++instance NFData PolicyTypeSummary where++-- | Contains details about a root. A root is a top-level parent node in the hierarchy of an organization that can contain organizational units (OUs) and accounts. Every root contains every AWS account in the organization. Each root enables the accounts to be organized in a different way and to have different policy types enabled for use in that root.+--+--+--+-- /See:/ 'root' smart constructor.+data Root = Root'+ { _rARN :: !(Maybe Text)+ , _rName :: !(Maybe Text)+ , _rId :: !(Maybe Text)+ , _rPolicyTypes :: !(Maybe [PolicyTypeSummary])+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Root' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'rARN' - The Amazon Resource Name (ARN) of the root. For more information about ARNs in Organizations, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns ARN Formats Supported by Organizations> in the /AWS Organizations User Guide/ .+--+-- * 'rName' - The friendly name of the root. The <http://wikipedia.org/wiki/regex regex pattern> that is used to validate this parameter is a string of any of the characters in the ASCII character range.+--+-- * 'rId' - The unique identifier (ID) for the root. The <http://wikipedia.org/wiki/regex regex pattern> for a root ID string requires "r-" followed by from 4 to 32 lower-case letters or digits.+--+-- * 'rPolicyTypes' - The types of policies that are currently enabled for the root and therefore can be attached to the root or to its OUs or accounts.+root+ :: Root+root =+ Root'+ {_rARN = Nothing, _rName = Nothing, _rId = Nothing, _rPolicyTypes = Nothing}+++-- | The Amazon Resource Name (ARN) of the root. For more information about ARNs in Organizations, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_permissions.html#orgs-permissions-arns ARN Formats Supported by Organizations> in the /AWS Organizations User Guide/ .+rARN :: Lens' Root (Maybe Text)+rARN = lens _rARN (\ s a -> s{_rARN = a});++-- | The friendly name of the root. The <http://wikipedia.org/wiki/regex regex pattern> that is used to validate this parameter is a string of any of the characters in the ASCII character range.+rName :: Lens' Root (Maybe Text)+rName = lens _rName (\ s a -> s{_rName = a});++-- | The unique identifier (ID) for the root. The <http://wikipedia.org/wiki/regex regex pattern> for a root ID string requires "r-" followed by from 4 to 32 lower-case letters or digits.+rId :: Lens' Root (Maybe Text)+rId = lens _rId (\ s a -> s{_rId = a});++-- | The types of policies that are currently enabled for the root and therefore can be attached to the root or to its OUs or accounts.+rPolicyTypes :: Lens' Root [PolicyTypeSummary]+rPolicyTypes = lens _rPolicyTypes (\ s a -> s{_rPolicyTypes = a}) . _Default . _Coerce;++instance FromJSON Root where+ parseJSON+ = withObject "Root"+ (\ x ->+ Root' <$>+ (x .:? "Arn") <*> (x .:? "Name") <*> (x .:? "Id") <*>+ (x .:? "PolicyTypes" .!= mempty))++instance Hashable Root where++instance NFData Root where
+ gen/Network/AWS/Organizations/Types/Sum.hs view
@@ -0,0 +1,500 @@+{-# 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.Organizations.Types.Sum+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.Organizations.Types.Sum where++import Network.AWS.Prelude++data AccountJoinedMethod+ = Created+ | Invited+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText AccountJoinedMethod where+ parser = takeLowerText >>= \case+ "created" -> pure Created+ "invited" -> pure Invited+ e -> fromTextError $ "Failure parsing AccountJoinedMethod from value: '" <> e+ <> "'. Accepted values: created, invited"++instance ToText AccountJoinedMethod where+ toText = \case+ Created -> "CREATED"+ Invited -> "INVITED"++instance Hashable AccountJoinedMethod+instance NFData AccountJoinedMethod+instance ToByteString AccountJoinedMethod+instance ToQuery AccountJoinedMethod+instance ToHeader AccountJoinedMethod++instance FromJSON AccountJoinedMethod where+ parseJSON = parseJSONText "AccountJoinedMethod"++data AccountStatus+ = Active+ | Suspended+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText AccountStatus where+ parser = takeLowerText >>= \case+ "active" -> pure Active+ "suspended" -> pure Suspended+ e -> fromTextError $ "Failure parsing AccountStatus from value: '" <> e+ <> "'. Accepted values: active, suspended"++instance ToText AccountStatus where+ toText = \case+ Active -> "ACTIVE"+ Suspended -> "SUSPENDED"++instance Hashable AccountStatus+instance NFData AccountStatus+instance ToByteString AccountStatus+instance ToQuery AccountStatus+instance ToHeader AccountStatus++instance FromJSON AccountStatus where+ parseJSON = parseJSONText "AccountStatus"++data ActionType+ = AddOrganizationsServiceLinkedRole+ | ApproveAllFeatures+ | EnableAllFeatures+ | Invite+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText ActionType where+ parser = takeLowerText >>= \case+ "add_organizations_service_linked_role" -> pure AddOrganizationsServiceLinkedRole+ "approve_all_features" -> pure ApproveAllFeatures+ "enable_all_features" -> pure EnableAllFeatures+ "invite" -> pure Invite+ e -> fromTextError $ "Failure parsing ActionType from value: '" <> e+ <> "'. Accepted values: add_organizations_service_linked_role, approve_all_features, enable_all_features, invite"++instance ToText ActionType where+ toText = \case+ AddOrganizationsServiceLinkedRole -> "ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE"+ ApproveAllFeatures -> "APPROVE_ALL_FEATURES"+ EnableAllFeatures -> "ENABLE_ALL_FEATURES"+ Invite -> "INVITE"++instance Hashable ActionType+instance NFData ActionType+instance ToByteString ActionType+instance ToQuery ActionType+instance ToHeader ActionType++instance ToJSON ActionType where+ toJSON = toJSONText++instance FromJSON ActionType where+ parseJSON = parseJSONText "ActionType"++data ChildType+ = CTAccount+ | CTOrganizationalUnit+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText ChildType where+ parser = takeLowerText >>= \case+ "account" -> pure CTAccount+ "organizational_unit" -> pure CTOrganizationalUnit+ e -> fromTextError $ "Failure parsing ChildType from value: '" <> e+ <> "'. Accepted values: account, organizational_unit"++instance ToText ChildType where+ toText = \case+ CTAccount -> "ACCOUNT"+ CTOrganizationalUnit -> "ORGANIZATIONAL_UNIT"++instance Hashable ChildType+instance NFData ChildType+instance ToByteString ChildType+instance ToQuery ChildType+instance ToHeader ChildType++instance ToJSON ChildType where+ toJSON = toJSONText++instance FromJSON ChildType where+ parseJSON = parseJSONText "ChildType"++data CreateAccountFailureReason+ = AccountLimitExceeded+ | ConcurrentAccountModification+ | EmailAlreadyExists+ | InternalFailure+ | InvalidAddress+ | InvalidEmail+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText CreateAccountFailureReason where+ parser = takeLowerText >>= \case+ "account_limit_exceeded" -> pure AccountLimitExceeded+ "concurrent_account_modification" -> pure ConcurrentAccountModification+ "email_already_exists" -> pure EmailAlreadyExists+ "internal_failure" -> pure InternalFailure+ "invalid_address" -> pure InvalidAddress+ "invalid_email" -> pure InvalidEmail+ e -> fromTextError $ "Failure parsing CreateAccountFailureReason from value: '" <> e+ <> "'. Accepted values: account_limit_exceeded, concurrent_account_modification, email_already_exists, internal_failure, invalid_address, invalid_email"++instance ToText CreateAccountFailureReason where+ toText = \case+ AccountLimitExceeded -> "ACCOUNT_LIMIT_EXCEEDED"+ ConcurrentAccountModification -> "CONCURRENT_ACCOUNT_MODIFICATION"+ EmailAlreadyExists -> "EMAIL_ALREADY_EXISTS"+ InternalFailure -> "INTERNAL_FAILURE"+ InvalidAddress -> "INVALID_ADDRESS"+ InvalidEmail -> "INVALID_EMAIL"++instance Hashable CreateAccountFailureReason+instance NFData CreateAccountFailureReason+instance ToByteString CreateAccountFailureReason+instance ToQuery CreateAccountFailureReason+instance ToHeader CreateAccountFailureReason++instance FromJSON CreateAccountFailureReason where+ parseJSON = parseJSONText "CreateAccountFailureReason"++data CreateAccountState+ = Failed+ | InProgress+ | Succeeded+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText CreateAccountState where+ parser = takeLowerText >>= \case+ "failed" -> pure Failed+ "in_progress" -> pure InProgress+ "succeeded" -> pure Succeeded+ e -> fromTextError $ "Failure parsing CreateAccountState from value: '" <> e+ <> "'. Accepted values: failed, in_progress, succeeded"++instance ToText CreateAccountState where+ toText = \case+ Failed -> "FAILED"+ InProgress -> "IN_PROGRESS"+ Succeeded -> "SUCCEEDED"++instance Hashable CreateAccountState+instance NFData CreateAccountState+instance ToByteString CreateAccountState+instance ToQuery CreateAccountState+instance ToHeader CreateAccountState++instance ToJSON CreateAccountState where+ toJSON = toJSONText++instance FromJSON CreateAccountState where+ parseJSON = parseJSONText "CreateAccountState"++data HandshakePartyType+ = HPTAccount+ | HPTEmail+ | HPTOrganization+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText HandshakePartyType where+ parser = takeLowerText >>= \case+ "account" -> pure HPTAccount+ "email" -> pure HPTEmail+ "organization" -> pure HPTOrganization+ e -> fromTextError $ "Failure parsing HandshakePartyType from value: '" <> e+ <> "'. Accepted values: account, email, organization"++instance ToText HandshakePartyType where+ toText = \case+ HPTAccount -> "ACCOUNT"+ HPTEmail -> "EMAIL"+ HPTOrganization -> "ORGANIZATION"++instance Hashable HandshakePartyType+instance NFData HandshakePartyType+instance ToByteString HandshakePartyType+instance ToQuery HandshakePartyType+instance ToHeader HandshakePartyType++instance ToJSON HandshakePartyType where+ toJSON = toJSONText++instance FromJSON HandshakePartyType where+ parseJSON = parseJSONText "HandshakePartyType"++data HandshakeResourceType+ = Account+ | Email+ | MasterEmail+ | MasterName+ | Notes+ | Organization+ | OrganizationFeatureSet+ | ParentHandshake+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText HandshakeResourceType where+ parser = takeLowerText >>= \case+ "account" -> pure Account+ "email" -> pure Email+ "master_email" -> pure MasterEmail+ "master_name" -> pure MasterName+ "notes" -> pure Notes+ "organization" -> pure Organization+ "organization_feature_set" -> pure OrganizationFeatureSet+ "parent_handshake" -> pure ParentHandshake+ e -> fromTextError $ "Failure parsing HandshakeResourceType from value: '" <> e+ <> "'. Accepted values: account, email, master_email, master_name, notes, organization, organization_feature_set, parent_handshake"++instance ToText HandshakeResourceType where+ toText = \case+ Account -> "ACCOUNT"+ Email -> "EMAIL"+ MasterEmail -> "MASTER_EMAIL"+ MasterName -> "MASTER_NAME"+ Notes -> "NOTES"+ Organization -> "ORGANIZATION"+ OrganizationFeatureSet -> "ORGANIZATION_FEATURE_SET"+ ParentHandshake -> "PARENT_HANDSHAKE"++instance Hashable HandshakeResourceType+instance NFData HandshakeResourceType+instance ToByteString HandshakeResourceType+instance ToQuery HandshakeResourceType+instance ToHeader HandshakeResourceType++instance FromJSON HandshakeResourceType where+ parseJSON = parseJSONText "HandshakeResourceType"++data HandshakeState+ = Accepted+ | Canceled+ | Declined+ | Expired+ | Open+ | Requested+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText HandshakeState where+ parser = takeLowerText >>= \case+ "accepted" -> pure Accepted+ "canceled" -> pure Canceled+ "declined" -> pure Declined+ "expired" -> pure Expired+ "open" -> pure Open+ "requested" -> pure Requested+ e -> fromTextError $ "Failure parsing HandshakeState from value: '" <> e+ <> "'. Accepted values: accepted, canceled, declined, expired, open, requested"++instance ToText HandshakeState where+ toText = \case+ Accepted -> "ACCEPTED"+ Canceled -> "CANCELED"+ Declined -> "DECLINED"+ Expired -> "EXPIRED"+ Open -> "OPEN"+ Requested -> "REQUESTED"++instance Hashable HandshakeState+instance NFData HandshakeState+instance ToByteString HandshakeState+instance ToQuery HandshakeState+instance ToHeader HandshakeState++instance FromJSON HandshakeState where+ parseJSON = parseJSONText "HandshakeState"++data IAMUserAccessToBilling+ = Allow+ | Deny+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText IAMUserAccessToBilling where+ parser = takeLowerText >>= \case+ "allow" -> pure Allow+ "deny" -> pure Deny+ e -> fromTextError $ "Failure parsing IAMUserAccessToBilling from value: '" <> e+ <> "'. Accepted values: allow, deny"++instance ToText IAMUserAccessToBilling where+ toText = \case+ Allow -> "ALLOW"+ Deny -> "DENY"++instance Hashable IAMUserAccessToBilling+instance NFData IAMUserAccessToBilling+instance ToByteString IAMUserAccessToBilling+instance ToQuery IAMUserAccessToBilling+instance ToHeader IAMUserAccessToBilling++instance ToJSON IAMUserAccessToBilling where+ toJSON = toJSONText++data OrganizationFeatureSet+ = All+ | ConsolidatedBilling+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText OrganizationFeatureSet where+ parser = takeLowerText >>= \case+ "all" -> pure All+ "consolidated_billing" -> pure ConsolidatedBilling+ e -> fromTextError $ "Failure parsing OrganizationFeatureSet from value: '" <> e+ <> "'. Accepted values: all, consolidated_billing"++instance ToText OrganizationFeatureSet where+ toText = \case+ All -> "ALL"+ ConsolidatedBilling -> "CONSOLIDATED_BILLING"++instance Hashable OrganizationFeatureSet+instance NFData OrganizationFeatureSet+instance ToByteString OrganizationFeatureSet+instance ToQuery OrganizationFeatureSet+instance ToHeader OrganizationFeatureSet++instance ToJSON OrganizationFeatureSet where+ toJSON = toJSONText++instance FromJSON OrganizationFeatureSet where+ parseJSON = parseJSONText "OrganizationFeatureSet"++data ParentType+ = OrganizationalUnit+ | Root+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText ParentType where+ parser = takeLowerText >>= \case+ "organizational_unit" -> pure OrganizationalUnit+ "root" -> pure Root+ e -> fromTextError $ "Failure parsing ParentType from value: '" <> e+ <> "'. Accepted values: organizational_unit, root"++instance ToText ParentType where+ toText = \case+ OrganizationalUnit -> "ORGANIZATIONAL_UNIT"+ Root -> "ROOT"++instance Hashable ParentType+instance NFData ParentType+instance ToByteString ParentType+instance ToQuery ParentType+instance ToHeader ParentType++instance FromJSON ParentType where+ parseJSON = parseJSONText "ParentType"++data PolicyType =+ ServiceControlPolicy+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText PolicyType where+ parser = takeLowerText >>= \case+ "service_control_policy" -> pure ServiceControlPolicy+ e -> fromTextError $ "Failure parsing PolicyType from value: '" <> e+ <> "'. Accepted values: service_control_policy"++instance ToText PolicyType where+ toText = \case+ ServiceControlPolicy -> "SERVICE_CONTROL_POLICY"++instance Hashable PolicyType+instance NFData PolicyType+instance ToByteString PolicyType+instance ToQuery PolicyType+instance ToHeader PolicyType++instance ToJSON PolicyType where+ toJSON = toJSONText++instance FromJSON PolicyType where+ parseJSON = parseJSONText "PolicyType"++data PolicyTypeStatus+ = Enabled+ | PendingDisable+ | PendingEnable+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText PolicyTypeStatus where+ parser = takeLowerText >>= \case+ "enabled" -> pure Enabled+ "pending_disable" -> pure PendingDisable+ "pending_enable" -> pure PendingEnable+ e -> fromTextError $ "Failure parsing PolicyTypeStatus from value: '" <> e+ <> "'. Accepted values: enabled, pending_disable, pending_enable"++instance ToText PolicyTypeStatus where+ toText = \case+ Enabled -> "ENABLED"+ PendingDisable -> "PENDING_DISABLE"+ PendingEnable -> "PENDING_ENABLE"++instance Hashable PolicyTypeStatus+instance NFData PolicyTypeStatus+instance ToByteString PolicyTypeStatus+instance ToQuery PolicyTypeStatus+instance ToHeader PolicyTypeStatus++instance FromJSON PolicyTypeStatus where+ parseJSON = parseJSONText "PolicyTypeStatus"++data TargetType+ = TTAccount+ | TTOrganizationalUnit+ | TTRoot+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText TargetType where+ parser = takeLowerText >>= \case+ "account" -> pure TTAccount+ "organizational_unit" -> pure TTOrganizationalUnit+ "root" -> pure TTRoot+ e -> fromTextError $ "Failure parsing TargetType from value: '" <> e+ <> "'. Accepted values: account, organizational_unit, root"++instance ToText TargetType where+ toText = \case+ TTAccount -> "ACCOUNT"+ TTOrganizationalUnit -> "ORGANIZATIONAL_UNIT"+ TTRoot -> "ROOT"++instance Hashable TargetType+instance NFData TargetType+instance ToByteString TargetType+instance ToQuery TargetType+instance ToHeader TargetType++instance FromJSON TargetType where+ parseJSON = parseJSONText "TargetType"
+ gen/Network/AWS/Organizations/UpdateOrganizationalUnit.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.Organizations.UpdateOrganizationalUnit+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Renames the specified organizational unit (OU). The ID and ARN do not change. The child OUs and accounts remain in place, and any attached policies of the OU remain attached.+--+--+-- This operation can be called only from the organization's master account.+--+module Network.AWS.Organizations.UpdateOrganizationalUnit+ (+ -- * Creating a Request+ updateOrganizationalUnit+ , UpdateOrganizationalUnit+ -- * Request Lenses+ , uouName+ , uouOrganizationalUnitId++ -- * Destructuring the Response+ , updateOrganizationalUnitResponse+ , UpdateOrganizationalUnitResponse+ -- * Response Lenses+ , uoursOrganizationalUnit+ , uoursResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'updateOrganizationalUnit' smart constructor.+data UpdateOrganizationalUnit = UpdateOrganizationalUnit'+ { _uouName :: !(Maybe Text)+ , _uouOrganizationalUnitId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdateOrganizationalUnit' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'uouName' - The new name that you want to assign to the OU. The <http://wikipedia.org/wiki/regex regex pattern> that is used to validate this parameter is a string of any of the characters in the ASCII character range.+--+-- * 'uouOrganizationalUnitId' - The unique identifier (ID) of the OU that you want to rename. You can get the ID from the 'ListOrganizationalUnitsForParent' operation. The <http://wikipedia.org/wiki/regex regex pattern> for an organizational unit ID string requires "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that contains the OU) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+updateOrganizationalUnit+ :: Text -- ^ 'uouOrganizationalUnitId'+ -> UpdateOrganizationalUnit+updateOrganizationalUnit pOrganizationalUnitId_ =+ UpdateOrganizationalUnit'+ {_uouName = Nothing, _uouOrganizationalUnitId = pOrganizationalUnitId_}+++-- | The new name that you want to assign to the OU. The <http://wikipedia.org/wiki/regex regex pattern> that is used to validate this parameter is a string of any of the characters in the ASCII character range.+uouName :: Lens' UpdateOrganizationalUnit (Maybe Text)+uouName = lens _uouName (\ s a -> s{_uouName = a});++-- | The unique identifier (ID) of the OU that you want to rename. You can get the ID from the 'ListOrganizationalUnitsForParent' operation. The <http://wikipedia.org/wiki/regex regex pattern> for an organizational unit ID string requires "ou-" followed by from 4 to 32 lower-case letters or digits (the ID of the root that contains the OU) followed by a second "-" dash and from 8 to 32 additional lower-case letters or digits.+uouOrganizationalUnitId :: Lens' UpdateOrganizationalUnit Text+uouOrganizationalUnitId = lens _uouOrganizationalUnitId (\ s a -> s{_uouOrganizationalUnitId = a});++instance AWSRequest UpdateOrganizationalUnit where+ type Rs UpdateOrganizationalUnit =+ UpdateOrganizationalUnitResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ UpdateOrganizationalUnitResponse' <$>+ (x .?> "OrganizationalUnit") <*> (pure (fromEnum s)))++instance Hashable UpdateOrganizationalUnit where++instance NFData UpdateOrganizationalUnit where++instance ToHeaders UpdateOrganizationalUnit where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.UpdateOrganizationalUnit"+ :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON UpdateOrganizationalUnit where+ toJSON UpdateOrganizationalUnit'{..}+ = object+ (catMaybes+ [("Name" .=) <$> _uouName,+ Just+ ("OrganizationalUnitId" .=+ _uouOrganizationalUnitId)])++instance ToPath UpdateOrganizationalUnit where+ toPath = const "/"++instance ToQuery UpdateOrganizationalUnit where+ toQuery = const mempty++-- | /See:/ 'updateOrganizationalUnitResponse' smart constructor.+data UpdateOrganizationalUnitResponse = UpdateOrganizationalUnitResponse'+ { _uoursOrganizationalUnit :: !(Maybe OrganizationalUnit)+ , _uoursResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdateOrganizationalUnitResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'uoursOrganizationalUnit' - A structure that contains the details about the specified OU, including its new name.+--+-- * 'uoursResponseStatus' - -- | The response status code.+updateOrganizationalUnitResponse+ :: Int -- ^ 'uoursResponseStatus'+ -> UpdateOrganizationalUnitResponse+updateOrganizationalUnitResponse pResponseStatus_ =+ UpdateOrganizationalUnitResponse'+ {_uoursOrganizationalUnit = Nothing, _uoursResponseStatus = pResponseStatus_}+++-- | A structure that contains the details about the specified OU, including its new name.+uoursOrganizationalUnit :: Lens' UpdateOrganizationalUnitResponse (Maybe OrganizationalUnit)+uoursOrganizationalUnit = lens _uoursOrganizationalUnit (\ s a -> s{_uoursOrganizationalUnit = a});++-- | -- | The response status code.+uoursResponseStatus :: Lens' UpdateOrganizationalUnitResponse Int+uoursResponseStatus = lens _uoursResponseStatus (\ s a -> s{_uoursResponseStatus = a});++instance NFData UpdateOrganizationalUnitResponse+ where
+ gen/Network/AWS/Organizations/UpdatePolicy.hs view
@@ -0,0 +1,168 @@+{-# 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.Organizations.UpdatePolicy+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates an existing policy with a new name, description, or content. If any parameter is not supplied, that value remains unchanged. Note that you cannot change a policy's type.+--+--+-- This operation can be called only from the organization's master account.+--+module Network.AWS.Organizations.UpdatePolicy+ (+ -- * Creating a Request+ updatePolicy+ , UpdatePolicy+ -- * Request Lenses+ , upContent+ , upName+ , upDescription+ , upPolicyId++ -- * Destructuring the Response+ , updatePolicyResponse+ , UpdatePolicyResponse+ -- * Response Lenses+ , uprsPolicy+ , uprsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Organizations.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'updatePolicy' smart constructor.+data UpdatePolicy = UpdatePolicy'+ { _upContent :: !(Maybe Text)+ , _upName :: !(Maybe Text)+ , _upDescription :: !(Maybe Text)+ , _upPolicyId :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdatePolicy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'upContent' - If provided, the new content for the policy. The text must be correctly formatted JSON that complies with the syntax for the policy's type. For more information, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html Service Control Policy Syntax> in the /AWS Organizations User Guide/ .+--+-- * 'upName' - If provided, the new name for the policy. The <http://wikipedia.org/wiki/regex regex pattern> that is used to validate this parameter is a string of any of the characters in the ASCII character range.+--+-- * 'upDescription' - If provided, the new description for the policy.+--+-- * 'upPolicyId' - The unique identifier (ID) of the policy that you want to update. The <http://wikipedia.org/wiki/regex regex pattern> for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.+updatePolicy+ :: Text -- ^ 'upPolicyId'+ -> UpdatePolicy+updatePolicy pPolicyId_ =+ UpdatePolicy'+ { _upContent = Nothing+ , _upName = Nothing+ , _upDescription = Nothing+ , _upPolicyId = pPolicyId_+ }+++-- | If provided, the new content for the policy. The text must be correctly formatted JSON that complies with the syntax for the policy's type. For more information, see <http://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html Service Control Policy Syntax> in the /AWS Organizations User Guide/ .+upContent :: Lens' UpdatePolicy (Maybe Text)+upContent = lens _upContent (\ s a -> s{_upContent = a});++-- | If provided, the new name for the policy. The <http://wikipedia.org/wiki/regex regex pattern> that is used to validate this parameter is a string of any of the characters in the ASCII character range.+upName :: Lens' UpdatePolicy (Maybe Text)+upName = lens _upName (\ s a -> s{_upName = a});++-- | If provided, the new description for the policy.+upDescription :: Lens' UpdatePolicy (Maybe Text)+upDescription = lens _upDescription (\ s a -> s{_upDescription = a});++-- | The unique identifier (ID) of the policy that you want to update. The <http://wikipedia.org/wiki/regex regex pattern> for a policy ID string requires "p-" followed by from 8 to 128 lower-case letters or digits.+upPolicyId :: Lens' UpdatePolicy Text+upPolicyId = lens _upPolicyId (\ s a -> s{_upPolicyId = a});++instance AWSRequest UpdatePolicy where+ type Rs UpdatePolicy = UpdatePolicyResponse+ request = postJSON organizations+ response+ = receiveJSON+ (\ s h x ->+ UpdatePolicyResponse' <$>+ (x .?> "Policy") <*> (pure (fromEnum s)))++instance Hashable UpdatePolicy where++instance NFData UpdatePolicy where++instance ToHeaders UpdatePolicy where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("AWSOrganizationsV20161128.UpdatePolicy" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON UpdatePolicy where+ toJSON UpdatePolicy'{..}+ = object+ (catMaybes+ [("Content" .=) <$> _upContent,+ ("Name" .=) <$> _upName,+ ("Description" .=) <$> _upDescription,+ Just ("PolicyId" .= _upPolicyId)])++instance ToPath UpdatePolicy where+ toPath = const "/"++instance ToQuery UpdatePolicy where+ toQuery = const mempty++-- | /See:/ 'updatePolicyResponse' smart constructor.+data UpdatePolicyResponse = UpdatePolicyResponse'+ { _uprsPolicy :: !(Maybe Policy)+ , _uprsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'UpdatePolicyResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'uprsPolicy' - A structure that contains details about the updated policy, showing the requested changes.+--+-- * 'uprsResponseStatus' - -- | The response status code.+updatePolicyResponse+ :: Int -- ^ 'uprsResponseStatus'+ -> UpdatePolicyResponse+updatePolicyResponse pResponseStatus_ =+ UpdatePolicyResponse'+ {_uprsPolicy = Nothing, _uprsResponseStatus = pResponseStatus_}+++-- | A structure that contains details about the updated policy, showing the requested changes.+uprsPolicy :: Lens' UpdatePolicyResponse (Maybe Policy)+uprsPolicy = lens _uprsPolicy (\ s a -> s{_uprsPolicy = a});++-- | -- | The response status code.+uprsResponseStatus :: Lens' UpdatePolicyResponse Int+uprsResponseStatus = lens _uprsResponseStatus (\ s a -> s{_uprsResponseStatus = a});++instance NFData UpdatePolicyResponse where
+ gen/Network/AWS/Organizations/Waiters.hs view
@@ -0,0 +1,21 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.Organizations.Waiters+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.Organizations.Waiters where++import Network.AWS.Lens+import Network.AWS.Organizations.Types+import Network.AWS.Prelude+import Network.AWS.Waiter
+ src/.gitkeep view
+ test/Main.hs view
@@ -0,0 +1,21 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Main+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Main (main) where++import Test.Tasty+import Test.AWS.Organizations+import Test.AWS.Organizations.Internal++main :: IO ()+main = defaultMain $ testGroup "Organizations"+ [ testGroup "tests" tests+ , testGroup "fixtures" fixtures+ ]
+ test/Test/AWS/Gen/Organizations.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.Organizations+-- Copyright : (c) 2013-2017 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.Gen.Organizations where++import Data.Proxy+import Network.AWS.Organizations+import Test.AWS.Fixture+import Test.AWS.Organizations.Internal+import Test.AWS.Prelude+import Test.Tasty++-- Auto-generated: the actual test selection needs to be manually placed into+-- the top-level so that real test data can be incrementally added.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+-- [ testGroup "request"+-- [ requestListHandshakesForAccount $+-- listHandshakesForAccount+--+-- , requestDescribeAccount $+-- describeAccount+--+-- , requestListPolicies $+-- listPolicies+--+-- , requestCreatePolicy $+-- createPolicy+--+-- , requestListRoots $+-- listRoots+--+-- , requestAcceptHandshake $+-- acceptHandshake+--+-- , requestCreateOrganization $+-- createOrganization+--+-- , requestEnableAllFeatures $+-- enableAllFeatures+--+-- , requestDeleteOrganization $+-- deleteOrganization+--+-- , requestDescribeHandshake $+-- describeHandshake+--+-- , requestDescribePolicy $+-- describePolicy+--+-- , requestLeaveOrganization $+-- leaveOrganization+--+-- , requestMoveAccount $+-- moveAccount+--+-- , requestListAccounts $+-- listAccounts+--+-- , requestInviteAccountToOrganization $+-- inviteAccountToOrganization+--+-- , requestListOrganizationalUnitsForParent $+-- listOrganizationalUnitsForParent+--+-- , requestCancelHandshake $+-- cancelHandshake+--+-- , requestListChildren $+-- listChildren+--+-- , requestDeletePolicy $+-- deletePolicy+--+-- , requestUpdatePolicy $+-- updatePolicy+--+-- , requestEnablePolicyType $+-- enablePolicyType+--+-- , requestDisablePolicyType $+-- disablePolicyType+--+-- , requestDescribeCreateAccountStatus $+-- describeCreateAccountStatus+--+-- , requestCreateOrganizationalUnit $+-- createOrganizationalUnit+--+-- , requestListAccountsForParent $+-- listAccountsForParent+--+-- , requestDetachPolicy $+-- detachPolicy+--+-- , requestRemoveAccountFromOrganization $+-- removeAccountFromOrganization+--+-- , requestDescribeOrganizationalUnit $+-- describeOrganizationalUnit+--+-- , requestListParents $+-- listParents+--+-- , requestCreateAccount $+-- createAccount+--+-- , requestListCreateAccountStatus $+-- listCreateAccountStatus+--+-- , requestListTargetsForPolicy $+-- listTargetsForPolicy+--+-- , requestDeclineHandshake $+-- declineHandshake+--+-- , requestAttachPolicy $+-- attachPolicy+--+-- , requestListPoliciesForTarget $+-- listPoliciesForTarget+--+-- , requestDescribeOrganization $+-- describeOrganization+--+-- , requestListHandshakesForOrganization $+-- listHandshakesForOrganization+--+-- , requestDeleteOrganizationalUnit $+-- deleteOrganizationalUnit+--+-- , requestUpdateOrganizationalUnit $+-- updateOrganizationalUnit+--+-- ]++-- , testGroup "response"+-- [ responseListHandshakesForAccount $+-- listHandshakesForAccountResponse+--+-- , responseDescribeAccount $+-- describeAccountResponse+--+-- , responseListPolicies $+-- listPoliciesResponse+--+-- , responseCreatePolicy $+-- createPolicyResponse+--+-- , responseListRoots $+-- listRootsResponse+--+-- , responseAcceptHandshake $+-- acceptHandshakeResponse+--+-- , responseCreateOrganization $+-- createOrganizationResponse+--+-- , responseEnableAllFeatures $+-- enableAllFeaturesResponse+--+-- , responseDeleteOrganization $+-- deleteOrganizationResponse+--+-- , responseDescribeHandshake $+-- describeHandshakeResponse+--+-- , responseDescribePolicy $+-- describePolicyResponse+--+-- , responseLeaveOrganization $+-- leaveOrganizationResponse+--+-- , responseMoveAccount $+-- moveAccountResponse+--+-- , responseListAccounts $+-- listAccountsResponse+--+-- , responseInviteAccountToOrganization $+-- inviteAccountToOrganizationResponse+--+-- , responseListOrganizationalUnitsForParent $+-- listOrganizationalUnitsForParentResponse+--+-- , responseCancelHandshake $+-- cancelHandshakeResponse+--+-- , responseListChildren $+-- listChildrenResponse+--+-- , responseDeletePolicy $+-- deletePolicyResponse+--+-- , responseUpdatePolicy $+-- updatePolicyResponse+--+-- , responseEnablePolicyType $+-- enablePolicyTypeResponse+--+-- , responseDisablePolicyType $+-- disablePolicyTypeResponse+--+-- , responseDescribeCreateAccountStatus $+-- describeCreateAccountStatusResponse+--+-- , responseCreateOrganizationalUnit $+-- createOrganizationalUnitResponse+--+-- , responseListAccountsForParent $+-- listAccountsForParentResponse+--+-- , responseDetachPolicy $+-- detachPolicyResponse+--+-- , responseRemoveAccountFromOrganization $+-- removeAccountFromOrganizationResponse+--+-- , responseDescribeOrganizationalUnit $+-- describeOrganizationalUnitResponse+--+-- , responseListParents $+-- listParentsResponse+--+-- , responseCreateAccount $+-- createAccountResponse+--+-- , responseListCreateAccountStatus $+-- listCreateAccountStatusResponse+--+-- , responseListTargetsForPolicy $+-- listTargetsForPolicyResponse+--+-- , responseDeclineHandshake $+-- declineHandshakeResponse+--+-- , responseAttachPolicy $+-- attachPolicyResponse+--+-- , responseListPoliciesForTarget $+-- listPoliciesForTargetResponse+--+-- , responseDescribeOrganization $+-- describeOrganizationResponse+--+-- , responseListHandshakesForOrganization $+-- listHandshakesForOrganizationResponse+--+-- , responseDeleteOrganizationalUnit $+-- deleteOrganizationalUnitResponse+--+-- , responseUpdateOrganizationalUnit $+-- updateOrganizationalUnitResponse+--+-- ]+-- ]++-- Requests++requestListHandshakesForAccount :: ListHandshakesForAccount -> TestTree+requestListHandshakesForAccount = req+ "ListHandshakesForAccount"+ "fixture/ListHandshakesForAccount.yaml"++requestDescribeAccount :: DescribeAccount -> TestTree+requestDescribeAccount = req+ "DescribeAccount"+ "fixture/DescribeAccount.yaml"++requestListPolicies :: ListPolicies -> TestTree+requestListPolicies = req+ "ListPolicies"+ "fixture/ListPolicies.yaml"++requestCreatePolicy :: CreatePolicy -> TestTree+requestCreatePolicy = req+ "CreatePolicy"+ "fixture/CreatePolicy.yaml"++requestListRoots :: ListRoots -> TestTree+requestListRoots = req+ "ListRoots"+ "fixture/ListRoots.yaml"++requestAcceptHandshake :: AcceptHandshake -> TestTree+requestAcceptHandshake = req+ "AcceptHandshake"+ "fixture/AcceptHandshake.yaml"++requestCreateOrganization :: CreateOrganization -> TestTree+requestCreateOrganization = req+ "CreateOrganization"+ "fixture/CreateOrganization.yaml"++requestEnableAllFeatures :: EnableAllFeatures -> TestTree+requestEnableAllFeatures = req+ "EnableAllFeatures"+ "fixture/EnableAllFeatures.yaml"++requestDeleteOrganization :: DeleteOrganization -> TestTree+requestDeleteOrganization = req+ "DeleteOrganization"+ "fixture/DeleteOrganization.yaml"++requestDescribeHandshake :: DescribeHandshake -> TestTree+requestDescribeHandshake = req+ "DescribeHandshake"+ "fixture/DescribeHandshake.yaml"++requestDescribePolicy :: DescribePolicy -> TestTree+requestDescribePolicy = req+ "DescribePolicy"+ "fixture/DescribePolicy.yaml"++requestLeaveOrganization :: LeaveOrganization -> TestTree+requestLeaveOrganization = req+ "LeaveOrganization"+ "fixture/LeaveOrganization.yaml"++requestMoveAccount :: MoveAccount -> TestTree+requestMoveAccount = req+ "MoveAccount"+ "fixture/MoveAccount.yaml"++requestListAccounts :: ListAccounts -> TestTree+requestListAccounts = req+ "ListAccounts"+ "fixture/ListAccounts.yaml"++requestInviteAccountToOrganization :: InviteAccountToOrganization -> TestTree+requestInviteAccountToOrganization = req+ "InviteAccountToOrganization"+ "fixture/InviteAccountToOrganization.yaml"++requestListOrganizationalUnitsForParent :: ListOrganizationalUnitsForParent -> TestTree+requestListOrganizationalUnitsForParent = req+ "ListOrganizationalUnitsForParent"+ "fixture/ListOrganizationalUnitsForParent.yaml"++requestCancelHandshake :: CancelHandshake -> TestTree+requestCancelHandshake = req+ "CancelHandshake"+ "fixture/CancelHandshake.yaml"++requestListChildren :: ListChildren -> TestTree+requestListChildren = req+ "ListChildren"+ "fixture/ListChildren.yaml"++requestDeletePolicy :: DeletePolicy -> TestTree+requestDeletePolicy = req+ "DeletePolicy"+ "fixture/DeletePolicy.yaml"++requestUpdatePolicy :: UpdatePolicy -> TestTree+requestUpdatePolicy = req+ "UpdatePolicy"+ "fixture/UpdatePolicy.yaml"++requestEnablePolicyType :: EnablePolicyType -> TestTree+requestEnablePolicyType = req+ "EnablePolicyType"+ "fixture/EnablePolicyType.yaml"++requestDisablePolicyType :: DisablePolicyType -> TestTree+requestDisablePolicyType = req+ "DisablePolicyType"+ "fixture/DisablePolicyType.yaml"++requestDescribeCreateAccountStatus :: DescribeCreateAccountStatus -> TestTree+requestDescribeCreateAccountStatus = req+ "DescribeCreateAccountStatus"+ "fixture/DescribeCreateAccountStatus.yaml"++requestCreateOrganizationalUnit :: CreateOrganizationalUnit -> TestTree+requestCreateOrganizationalUnit = req+ "CreateOrganizationalUnit"+ "fixture/CreateOrganizationalUnit.yaml"++requestListAccountsForParent :: ListAccountsForParent -> TestTree+requestListAccountsForParent = req+ "ListAccountsForParent"+ "fixture/ListAccountsForParent.yaml"++requestDetachPolicy :: DetachPolicy -> TestTree+requestDetachPolicy = req+ "DetachPolicy"+ "fixture/DetachPolicy.yaml"++requestRemoveAccountFromOrganization :: RemoveAccountFromOrganization -> TestTree+requestRemoveAccountFromOrganization = req+ "RemoveAccountFromOrganization"+ "fixture/RemoveAccountFromOrganization.yaml"++requestDescribeOrganizationalUnit :: DescribeOrganizationalUnit -> TestTree+requestDescribeOrganizationalUnit = req+ "DescribeOrganizationalUnit"+ "fixture/DescribeOrganizationalUnit.yaml"++requestListParents :: ListParents -> TestTree+requestListParents = req+ "ListParents"+ "fixture/ListParents.yaml"++requestCreateAccount :: CreateAccount -> TestTree+requestCreateAccount = req+ "CreateAccount"+ "fixture/CreateAccount.yaml"++requestListCreateAccountStatus :: ListCreateAccountStatus -> TestTree+requestListCreateAccountStatus = req+ "ListCreateAccountStatus"+ "fixture/ListCreateAccountStatus.yaml"++requestListTargetsForPolicy :: ListTargetsForPolicy -> TestTree+requestListTargetsForPolicy = req+ "ListTargetsForPolicy"+ "fixture/ListTargetsForPolicy.yaml"++requestDeclineHandshake :: DeclineHandshake -> TestTree+requestDeclineHandshake = req+ "DeclineHandshake"+ "fixture/DeclineHandshake.yaml"++requestAttachPolicy :: AttachPolicy -> TestTree+requestAttachPolicy = req+ "AttachPolicy"+ "fixture/AttachPolicy.yaml"++requestListPoliciesForTarget :: ListPoliciesForTarget -> TestTree+requestListPoliciesForTarget = req+ "ListPoliciesForTarget"+ "fixture/ListPoliciesForTarget.yaml"++requestDescribeOrganization :: DescribeOrganization -> TestTree+requestDescribeOrganization = req+ "DescribeOrganization"+ "fixture/DescribeOrganization.yaml"++requestListHandshakesForOrganization :: ListHandshakesForOrganization -> TestTree+requestListHandshakesForOrganization = req+ "ListHandshakesForOrganization"+ "fixture/ListHandshakesForOrganization.yaml"++requestDeleteOrganizationalUnit :: DeleteOrganizationalUnit -> TestTree+requestDeleteOrganizationalUnit = req+ "DeleteOrganizationalUnit"+ "fixture/DeleteOrganizationalUnit.yaml"++requestUpdateOrganizationalUnit :: UpdateOrganizationalUnit -> TestTree+requestUpdateOrganizationalUnit = req+ "UpdateOrganizationalUnit"+ "fixture/UpdateOrganizationalUnit.yaml"++-- Responses++responseListHandshakesForAccount :: ListHandshakesForAccountResponse -> TestTree+responseListHandshakesForAccount = res+ "ListHandshakesForAccountResponse"+ "fixture/ListHandshakesForAccountResponse.proto"+ organizations+ (Proxy :: Proxy ListHandshakesForAccount)++responseDescribeAccount :: DescribeAccountResponse -> TestTree+responseDescribeAccount = res+ "DescribeAccountResponse"+ "fixture/DescribeAccountResponse.proto"+ organizations+ (Proxy :: Proxy DescribeAccount)++responseListPolicies :: ListPoliciesResponse -> TestTree+responseListPolicies = res+ "ListPoliciesResponse"+ "fixture/ListPoliciesResponse.proto"+ organizations+ (Proxy :: Proxy ListPolicies)++responseCreatePolicy :: CreatePolicyResponse -> TestTree+responseCreatePolicy = res+ "CreatePolicyResponse"+ "fixture/CreatePolicyResponse.proto"+ organizations+ (Proxy :: Proxy CreatePolicy)++responseListRoots :: ListRootsResponse -> TestTree+responseListRoots = res+ "ListRootsResponse"+ "fixture/ListRootsResponse.proto"+ organizations+ (Proxy :: Proxy ListRoots)++responseAcceptHandshake :: AcceptHandshakeResponse -> TestTree+responseAcceptHandshake = res+ "AcceptHandshakeResponse"+ "fixture/AcceptHandshakeResponse.proto"+ organizations+ (Proxy :: Proxy AcceptHandshake)++responseCreateOrganization :: CreateOrganizationResponse -> TestTree+responseCreateOrganization = res+ "CreateOrganizationResponse"+ "fixture/CreateOrganizationResponse.proto"+ organizations+ (Proxy :: Proxy CreateOrganization)++responseEnableAllFeatures :: EnableAllFeaturesResponse -> TestTree+responseEnableAllFeatures = res+ "EnableAllFeaturesResponse"+ "fixture/EnableAllFeaturesResponse.proto"+ organizations+ (Proxy :: Proxy EnableAllFeatures)++responseDeleteOrganization :: DeleteOrganizationResponse -> TestTree+responseDeleteOrganization = res+ "DeleteOrganizationResponse"+ "fixture/DeleteOrganizationResponse.proto"+ organizations+ (Proxy :: Proxy DeleteOrganization)++responseDescribeHandshake :: DescribeHandshakeResponse -> TestTree+responseDescribeHandshake = res+ "DescribeHandshakeResponse"+ "fixture/DescribeHandshakeResponse.proto"+ organizations+ (Proxy :: Proxy DescribeHandshake)++responseDescribePolicy :: DescribePolicyResponse -> TestTree+responseDescribePolicy = res+ "DescribePolicyResponse"+ "fixture/DescribePolicyResponse.proto"+ organizations+ (Proxy :: Proxy DescribePolicy)++responseLeaveOrganization :: LeaveOrganizationResponse -> TestTree+responseLeaveOrganization = res+ "LeaveOrganizationResponse"+ "fixture/LeaveOrganizationResponse.proto"+ organizations+ (Proxy :: Proxy LeaveOrganization)++responseMoveAccount :: MoveAccountResponse -> TestTree+responseMoveAccount = res+ "MoveAccountResponse"+ "fixture/MoveAccountResponse.proto"+ organizations+ (Proxy :: Proxy MoveAccount)++responseListAccounts :: ListAccountsResponse -> TestTree+responseListAccounts = res+ "ListAccountsResponse"+ "fixture/ListAccountsResponse.proto"+ organizations+ (Proxy :: Proxy ListAccounts)++responseInviteAccountToOrganization :: InviteAccountToOrganizationResponse -> TestTree+responseInviteAccountToOrganization = res+ "InviteAccountToOrganizationResponse"+ "fixture/InviteAccountToOrganizationResponse.proto"+ organizations+ (Proxy :: Proxy InviteAccountToOrganization)++responseListOrganizationalUnitsForParent :: ListOrganizationalUnitsForParentResponse -> TestTree+responseListOrganizationalUnitsForParent = res+ "ListOrganizationalUnitsForParentResponse"+ "fixture/ListOrganizationalUnitsForParentResponse.proto"+ organizations+ (Proxy :: Proxy ListOrganizationalUnitsForParent)++responseCancelHandshake :: CancelHandshakeResponse -> TestTree+responseCancelHandshake = res+ "CancelHandshakeResponse"+ "fixture/CancelHandshakeResponse.proto"+ organizations+ (Proxy :: Proxy CancelHandshake)++responseListChildren :: ListChildrenResponse -> TestTree+responseListChildren = res+ "ListChildrenResponse"+ "fixture/ListChildrenResponse.proto"+ organizations+ (Proxy :: Proxy ListChildren)++responseDeletePolicy :: DeletePolicyResponse -> TestTree+responseDeletePolicy = res+ "DeletePolicyResponse"+ "fixture/DeletePolicyResponse.proto"+ organizations+ (Proxy :: Proxy DeletePolicy)++responseUpdatePolicy :: UpdatePolicyResponse -> TestTree+responseUpdatePolicy = res+ "UpdatePolicyResponse"+ "fixture/UpdatePolicyResponse.proto"+ organizations+ (Proxy :: Proxy UpdatePolicy)++responseEnablePolicyType :: EnablePolicyTypeResponse -> TestTree+responseEnablePolicyType = res+ "EnablePolicyTypeResponse"+ "fixture/EnablePolicyTypeResponse.proto"+ organizations+ (Proxy :: Proxy EnablePolicyType)++responseDisablePolicyType :: DisablePolicyTypeResponse -> TestTree+responseDisablePolicyType = res+ "DisablePolicyTypeResponse"+ "fixture/DisablePolicyTypeResponse.proto"+ organizations+ (Proxy :: Proxy DisablePolicyType)++responseDescribeCreateAccountStatus :: DescribeCreateAccountStatusResponse -> TestTree+responseDescribeCreateAccountStatus = res+ "DescribeCreateAccountStatusResponse"+ "fixture/DescribeCreateAccountStatusResponse.proto"+ organizations+ (Proxy :: Proxy DescribeCreateAccountStatus)++responseCreateOrganizationalUnit :: CreateOrganizationalUnitResponse -> TestTree+responseCreateOrganizationalUnit = res+ "CreateOrganizationalUnitResponse"+ "fixture/CreateOrganizationalUnitResponse.proto"+ organizations+ (Proxy :: Proxy CreateOrganizationalUnit)++responseListAccountsForParent :: ListAccountsForParentResponse -> TestTree+responseListAccountsForParent = res+ "ListAccountsForParentResponse"+ "fixture/ListAccountsForParentResponse.proto"+ organizations+ (Proxy :: Proxy ListAccountsForParent)++responseDetachPolicy :: DetachPolicyResponse -> TestTree+responseDetachPolicy = res+ "DetachPolicyResponse"+ "fixture/DetachPolicyResponse.proto"+ organizations+ (Proxy :: Proxy DetachPolicy)++responseRemoveAccountFromOrganization :: RemoveAccountFromOrganizationResponse -> TestTree+responseRemoveAccountFromOrganization = res+ "RemoveAccountFromOrganizationResponse"+ "fixture/RemoveAccountFromOrganizationResponse.proto"+ organizations+ (Proxy :: Proxy RemoveAccountFromOrganization)++responseDescribeOrganizationalUnit :: DescribeOrganizationalUnitResponse -> TestTree+responseDescribeOrganizationalUnit = res+ "DescribeOrganizationalUnitResponse"+ "fixture/DescribeOrganizationalUnitResponse.proto"+ organizations+ (Proxy :: Proxy DescribeOrganizationalUnit)++responseListParents :: ListParentsResponse -> TestTree+responseListParents = res+ "ListParentsResponse"+ "fixture/ListParentsResponse.proto"+ organizations+ (Proxy :: Proxy ListParents)++responseCreateAccount :: CreateAccountResponse -> TestTree+responseCreateAccount = res+ "CreateAccountResponse"+ "fixture/CreateAccountResponse.proto"+ organizations+ (Proxy :: Proxy CreateAccount)++responseListCreateAccountStatus :: ListCreateAccountStatusResponse -> TestTree+responseListCreateAccountStatus = res+ "ListCreateAccountStatusResponse"+ "fixture/ListCreateAccountStatusResponse.proto"+ organizations+ (Proxy :: Proxy ListCreateAccountStatus)++responseListTargetsForPolicy :: ListTargetsForPolicyResponse -> TestTree+responseListTargetsForPolicy = res+ "ListTargetsForPolicyResponse"+ "fixture/ListTargetsForPolicyResponse.proto"+ organizations+ (Proxy :: Proxy ListTargetsForPolicy)++responseDeclineHandshake :: DeclineHandshakeResponse -> TestTree+responseDeclineHandshake = res+ "DeclineHandshakeResponse"+ "fixture/DeclineHandshakeResponse.proto"+ organizations+ (Proxy :: Proxy DeclineHandshake)++responseAttachPolicy :: AttachPolicyResponse -> TestTree+responseAttachPolicy = res+ "AttachPolicyResponse"+ "fixture/AttachPolicyResponse.proto"+ organizations+ (Proxy :: Proxy AttachPolicy)++responseListPoliciesForTarget :: ListPoliciesForTargetResponse -> TestTree+responseListPoliciesForTarget = res+ "ListPoliciesForTargetResponse"+ "fixture/ListPoliciesForTargetResponse.proto"+ organizations+ (Proxy :: Proxy ListPoliciesForTarget)++responseDescribeOrganization :: DescribeOrganizationResponse -> TestTree+responseDescribeOrganization = res+ "DescribeOrganizationResponse"+ "fixture/DescribeOrganizationResponse.proto"+ organizations+ (Proxy :: Proxy DescribeOrganization)++responseListHandshakesForOrganization :: ListHandshakesForOrganizationResponse -> TestTree+responseListHandshakesForOrganization = res+ "ListHandshakesForOrganizationResponse"+ "fixture/ListHandshakesForOrganizationResponse.proto"+ organizations+ (Proxy :: Proxy ListHandshakesForOrganization)++responseDeleteOrganizationalUnit :: DeleteOrganizationalUnitResponse -> TestTree+responseDeleteOrganizationalUnit = res+ "DeleteOrganizationalUnitResponse"+ "fixture/DeleteOrganizationalUnitResponse.proto"+ organizations+ (Proxy :: Proxy DeleteOrganizationalUnit)++responseUpdateOrganizationalUnit :: UpdateOrganizationalUnitResponse -> TestTree+responseUpdateOrganizationalUnit = res+ "UpdateOrganizationalUnitResponse"+ "fixture/UpdateOrganizationalUnitResponse.proto"+ organizations+ (Proxy :: Proxy UpdateOrganizationalUnit)
+ test/Test/AWS/Organizations.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.AWS.Organizations+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.Organizations+ ( tests+ , fixtures+ ) where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/AWS/Organizations/Internal.hs view
@@ -0,0 +1,9 @@+-- |+-- Module : Test.AWS.Organizations.Internal+-- Copyright : (c) 2013-2016 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.Organizations.Internal where