amazonka-detective (empty) → 2.0
raw patch · 99 files changed
+8525/−0 lines, 99 filesdep +amazonka-coredep +amazonka-detectivedep +amazonka-test
Dependencies added: amazonka-core, amazonka-detective, amazonka-test, base, bytestring, case-insensitive, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +44/−0
- amazonka-detective.cabal +122/−0
- fixture/AcceptInvitation.yaml +10/−0
- fixture/AcceptInvitationResponse.proto +0/−0
- fixture/BatchGetGraphMemberDatasources.yaml +10/−0
- fixture/BatchGetGraphMemberDatasourcesResponse.proto +0/−0
- fixture/BatchGetMembershipDatasources.yaml +10/−0
- fixture/BatchGetMembershipDatasourcesResponse.proto +0/−0
- fixture/CreateGraph.yaml +10/−0
- fixture/CreateGraphResponse.proto +0/−0
- fixture/CreateMembers.yaml +10/−0
- fixture/CreateMembersResponse.proto +0/−0
- fixture/DeleteGraph.yaml +10/−0
- fixture/DeleteGraphResponse.proto +0/−0
- fixture/DeleteMembers.yaml +10/−0
- fixture/DeleteMembersResponse.proto +0/−0
- fixture/DescribeOrganizationConfiguration.yaml +10/−0
- fixture/DescribeOrganizationConfigurationResponse.proto +0/−0
- fixture/DisableOrganizationAdminAccount.yaml +10/−0
- fixture/DisableOrganizationAdminAccountResponse.proto +0/−0
- fixture/DisassociateMembership.yaml +10/−0
- fixture/DisassociateMembershipResponse.proto +0/−0
- fixture/EnableOrganizationAdminAccount.yaml +10/−0
- fixture/EnableOrganizationAdminAccountResponse.proto +0/−0
- fixture/GetMembers.yaml +10/−0
- fixture/GetMembersResponse.proto +0/−0
- fixture/ListDatasourcePackages.yaml +10/−0
- fixture/ListDatasourcePackagesResponse.proto +0/−0
- fixture/ListGraphs.yaml +10/−0
- fixture/ListGraphsResponse.proto +0/−0
- fixture/ListInvitations.yaml +10/−0
- fixture/ListInvitationsResponse.proto +0/−0
- fixture/ListMembers.yaml +10/−0
- fixture/ListMembersResponse.proto +0/−0
- fixture/ListOrganizationAdminAccounts.yaml +10/−0
- fixture/ListOrganizationAdminAccountsResponse.proto +0/−0
- fixture/ListTagsForResource.yaml +10/−0
- fixture/ListTagsForResourceResponse.proto +0/−0
- fixture/RejectInvitation.yaml +10/−0
- fixture/RejectInvitationResponse.proto +0/−0
- fixture/StartMonitoringMember.yaml +10/−0
- fixture/StartMonitoringMemberResponse.proto +0/−0
- fixture/TagResource.yaml +10/−0
- fixture/TagResourceResponse.proto +0/−0
- fixture/UntagResource.yaml +10/−0
- fixture/UntagResourceResponse.proto +0/−0
- fixture/UpdateDatasourcePackages.yaml +10/−0
- fixture/UpdateDatasourcePackagesResponse.proto +0/−0
- fixture/UpdateOrganizationConfiguration.yaml +10/−0
- fixture/UpdateOrganizationConfigurationResponse.proto +0/−0
- gen/Amazonka/Detective.hs +377/−0
- gen/Amazonka/Detective/AcceptInvitation.hs +144/−0
- gen/Amazonka/Detective/BatchGetGraphMemberDatasources.hs +234/−0
- gen/Amazonka/Detective/BatchGetMembershipDatasources.hs +198/−0
- gen/Amazonka/Detective/CreateGraph.hs +187/−0
- gen/Amazonka/Detective/CreateMembers.hs +306/−0
- gen/Amazonka/Detective/DeleteGraph.hs +130/−0
- gen/Amazonka/Detective/DeleteMembers.hs +231/−0
- gen/Amazonka/Detective/DescribeOrganizationConfiguration.hs +205/−0
- gen/Amazonka/Detective/DisableOrganizationAdminAccount.hs +138/−0
- gen/Amazonka/Detective/DisassociateMembership.hs +150/−0
- gen/Amazonka/Detective/EnableOrganizationAdminAccount.hs +172/−0
- gen/Amazonka/Detective/GetMembers.hs +228/−0
- gen/Amazonka/Detective/Lens.hs +236/−0
- gen/Amazonka/Detective/ListDatasourcePackages.hs +226/−0
- gen/Amazonka/Detective/ListGraphs.hs +213/−0
- gen/Amazonka/Detective/ListInvitations.hs +219/−0
- gen/Amazonka/Detective/ListMembers.hs +257/−0
- gen/Amazonka/Detective/ListOrganizationAdminAccounts.hs +212/−0
- gen/Amazonka/Detective/ListTagsForResource.hs +162/−0
- gen/Amazonka/Detective/RejectInvitation.hs +144/−0
- gen/Amazonka/Detective/StartMonitoringMember.hs +168/−0
- gen/Amazonka/Detective/TagResource.hs +172/−0
- gen/Amazonka/Detective/Types.hs +278/−0
- gen/Amazonka/Detective/Types/Account.hs +91/−0
- gen/Amazonka/Detective/Types/Administrator.hs +106/−0
- gen/Amazonka/Detective/Types/DatasourcePackage.hs +71/−0
- gen/Amazonka/Detective/Types/DatasourcePackageIngestDetail.hs +93/−0
- gen/Amazonka/Detective/Types/DatasourcePackageIngestState.hs +76/−0
- gen/Amazonka/Detective/Types/DatasourcePackageUsageInfo.hs +94/−0
- gen/Amazonka/Detective/Types/Graph.hs +87/−0
- gen/Amazonka/Detective/Types/InvitationType.hs +71/−0
- gen/Amazonka/Detective/Types/MemberDetail.hs +475/−0
- gen/Amazonka/Detective/Types/MemberDisabledReason.hs +71/−0
- gen/Amazonka/Detective/Types/MemberStatus.hs +86/−0
- gen/Amazonka/Detective/Types/MembershipDatasources.hs +102/−0
- gen/Amazonka/Detective/Types/TimestampForCollection.hs +78/−0
- gen/Amazonka/Detective/Types/UnprocessedAccount.hs +88/−0
- gen/Amazonka/Detective/Types/UnprocessedGraph.hs +87/−0
- gen/Amazonka/Detective/UntagResource.hs +166/−0
- gen/Amazonka/Detective/UpdateDatasourcePackages.hs +157/−0
- gen/Amazonka/Detective/UpdateOrganizationConfiguration.hs +173/−0
- gen/Amazonka/Detective/Waiters.hs +24/−0
- src/.gitkeep +0/−0
- test/Main.hs +23/−0
- test/Test/Amazonka/Detective.hs +20/−0
- test/Test/Amazonka/Detective/Internal.hs +8/−0
- test/Test/Amazonka/Gen/Detective.hs +518/−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,44 @@+# Amazon Detective SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2018-10-26@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-detective)+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 [Amazonka.Detective](http://hackage.haskell.org/package/amazonka-detective/docs/Amazonka-Detective.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-detective` 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.
+ amazonka-detective.cabal view
@@ -0,0 +1,122 @@+cabal-version: 2.2+name: amazonka-detective+version: 2.0+synopsis: Amazon Detective 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>, Jack Kelly <jack@jackkelly.name>++copyright: Copyright (c) 2013-2023 Brendan Hay+category: AWS+build-type: Simple+extra-source-files:+ fixture/*.proto+ fixture/*.yaml+ README.md+ src/.gitkeep++description:+ Derived from API version @2018-10-26@ of the AWS service descriptions, licensed under Apache 2.0.+ .+ 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.+ .+ It is recommended to use generic lenses or optics from packages such as <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify optional fields and deconstruct responses.+ .+ Generated lenses can be found in "Amazonka.Detective.Lens" and are+ suitable for use with a lens package such as <http://hackage.haskell.org/package/lens lens> or <http://hackage.haskell.org/package/lens-family-core lens-family-core>.+ .+ See "Amazonka.Detective" and the <https://aws.amazon.com/documentation/ AWS documentation> to get started.++source-repository head+ type: git+ location: git://github.com/brendanhay/amazonka.git+ subdir: amazonka-detective++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:+ Amazonka.Detective+ Amazonka.Detective.AcceptInvitation+ Amazonka.Detective.BatchGetGraphMemberDatasources+ Amazonka.Detective.BatchGetMembershipDatasources+ Amazonka.Detective.CreateGraph+ Amazonka.Detective.CreateMembers+ Amazonka.Detective.DeleteGraph+ Amazonka.Detective.DeleteMembers+ Amazonka.Detective.DescribeOrganizationConfiguration+ Amazonka.Detective.DisableOrganizationAdminAccount+ Amazonka.Detective.DisassociateMembership+ Amazonka.Detective.EnableOrganizationAdminAccount+ Amazonka.Detective.GetMembers+ Amazonka.Detective.Lens+ Amazonka.Detective.ListDatasourcePackages+ Amazonka.Detective.ListGraphs+ Amazonka.Detective.ListInvitations+ Amazonka.Detective.ListMembers+ Amazonka.Detective.ListOrganizationAdminAccounts+ Amazonka.Detective.ListTagsForResource+ Amazonka.Detective.RejectInvitation+ Amazonka.Detective.StartMonitoringMember+ Amazonka.Detective.TagResource+ Amazonka.Detective.Types+ Amazonka.Detective.Types.Account+ Amazonka.Detective.Types.Administrator+ Amazonka.Detective.Types.DatasourcePackage+ Amazonka.Detective.Types.DatasourcePackageIngestDetail+ Amazonka.Detective.Types.DatasourcePackageIngestState+ Amazonka.Detective.Types.DatasourcePackageUsageInfo+ Amazonka.Detective.Types.Graph+ Amazonka.Detective.Types.InvitationType+ Amazonka.Detective.Types.MemberDetail+ Amazonka.Detective.Types.MemberDisabledReason+ Amazonka.Detective.Types.MembershipDatasources+ Amazonka.Detective.Types.MemberStatus+ Amazonka.Detective.Types.TimestampForCollection+ Amazonka.Detective.Types.UnprocessedAccount+ Amazonka.Detective.Types.UnprocessedGraph+ Amazonka.Detective.UntagResource+ Amazonka.Detective.UpdateDatasourcePackages+ Amazonka.Detective.UpdateOrganizationConfiguration+ Amazonka.Detective.Waiters++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , base >=4.12 && <5++test-suite amazonka-detective-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.Amazonka.Detective+ Test.Amazonka.Detective.Internal+ Test.Amazonka.Gen.Detective++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , amazonka-detective+ , amazonka-test >=2.0 && <2.1+ , base+ , bytestring+ , case-insensitive+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/AcceptInvitation.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/AcceptInvitationResponse.proto view
+ fixture/BatchGetGraphMemberDatasources.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/BatchGetGraphMemberDatasourcesResponse.proto view
+ fixture/BatchGetMembershipDatasources.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/BatchGetMembershipDatasourcesResponse.proto view
+ fixture/CreateGraph.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/CreateGraphResponse.proto view
+ fixture/CreateMembers.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/CreateMembersResponse.proto view
+ fixture/DeleteGraph.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/DeleteGraphResponse.proto view
+ fixture/DeleteMembers.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/DeleteMembersResponse.proto view
+ fixture/DescribeOrganizationConfiguration.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/DescribeOrganizationConfigurationResponse.proto view
+ fixture/DisableOrganizationAdminAccount.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/DisableOrganizationAdminAccountResponse.proto view
+ fixture/DisassociateMembership.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/DisassociateMembershipResponse.proto view
+ fixture/EnableOrganizationAdminAccount.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/EnableOrganizationAdminAccountResponse.proto view
+ fixture/GetMembers.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/GetMembersResponse.proto view
+ fixture/ListDatasourcePackages.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/ListDatasourcePackagesResponse.proto view
+ fixture/ListGraphs.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/ListGraphsResponse.proto view
+ fixture/ListInvitations.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/ListInvitationsResponse.proto view
+ fixture/ListMembers.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/ListMembersResponse.proto view
+ fixture/ListOrganizationAdminAccounts.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/ListOrganizationAdminAccountsResponse.proto view
+ fixture/ListTagsForResource.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/ListTagsForResourceResponse.proto view
+ fixture/RejectInvitation.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/RejectInvitationResponse.proto view
+ fixture/StartMonitoringMember.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/StartMonitoringMemberResponse.proto view
+ fixture/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/TagResourceResponse.proto view
+ fixture/UntagResource.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.us-east-1.amazonaws.com+ Content-Type: application/x-www-form-urlencoded; charset=utf-8+ X-Amz-Content-SHA256: abcdef+ X-Amz-Date: 20091028T223200Z+body:+ ''
+ fixture/UntagResourceResponse.proto view
+ fixture/UpdateDatasourcePackages.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/UpdateDatasourcePackagesResponse.proto view
+ fixture/UpdateOrganizationConfiguration.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/api.detective/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: api.detective.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/UpdateOrganizationConfigurationResponse.proto view
+ gen/Amazonka/Detective.hs view
@@ -0,0 +1,377 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Amazonka.Detective+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Derived from API version @2018-10-26@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- Detective uses machine learning and purpose-built visualizations to help+-- you to analyze and investigate security issues across your Amazon Web+-- Services (Amazon Web Services) workloads. Detective automatically+-- extracts time-based events such as login attempts, API calls, and+-- network traffic from CloudTrail and Amazon Virtual Private Cloud (Amazon+-- VPC) flow logs. It also extracts findings detected by Amazon GuardDuty.+--+-- The Detective API primarily supports the creation and management of+-- behavior graphs. A behavior graph contains the extracted data from a set+-- of member accounts, and is created and managed by an administrator+-- account.+--+-- To add a member account to the behavior graph, the administrator account+-- sends an invitation to the account. When the account accepts the+-- invitation, it becomes a member account in the behavior graph.+--+-- Detective is also integrated with Organizations. The organization+-- management account designates the Detective administrator account for+-- the organization. That account becomes the administrator account for the+-- organization behavior graph. The Detective administrator account is also+-- the delegated administrator account for Detective in Organizations.+--+-- The Detective administrator account can enable any organization account+-- as a member account in the organization behavior graph. The organization+-- accounts do not receive invitations. The Detective administrator account+-- can also invite other accounts to the organization behavior graph.+--+-- Every behavior graph is specific to a Region. You can only use the API+-- to manage behavior graphs that belong to the Region that is associated+-- with the currently selected endpoint.+--+-- The administrator account for a behavior graph can use the Detective API+-- to do the following:+--+-- - Enable and disable Detective. Enabling Detective creates a new+-- behavior graph.+--+-- - View the list of member accounts in a behavior graph.+--+-- - Add member accounts to a behavior graph.+--+-- - Remove member accounts from a behavior graph.+--+-- - Apply tags to a behavior graph.+--+-- The organization management account can use the Detective API to select+-- the delegated administrator for Detective.+--+-- The Detective administrator account for an organization can use the+-- Detective API to do the following:+--+-- - Perform all of the functions of an administrator account.+--+-- - Determine whether to automatically enable new organization accounts+-- as member accounts in the organization behavior graph.+--+-- An invited member account can use the Detective API to do the following:+--+-- - View the list of behavior graphs that they are invited to.+--+-- - Accept an invitation to contribute to a behavior graph.+--+-- - Decline an invitation to contribute to a behavior graph.+--+-- - Remove their account from a behavior graph.+--+-- All API actions are logged as CloudTrail events. See+-- <https://docs.aws.amazon.com/detective/latest/adminguide/logging-using-cloudtrail.html Logging Detective API Calls with CloudTrail>.+--+-- We replaced the term \"master account\" with the term \"administrator+-- account.\" An administrator account is used to centrally manage multiple+-- accounts. In the case of Detective, the administrator account manages+-- the accounts in their behavior graph.+module Amazonka.Detective+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ -- $errors++ -- ** AccessDeniedException+ _AccessDeniedException,++ -- ** ConflictException+ _ConflictException,++ -- ** InternalServerException+ _InternalServerException,++ -- ** ResourceNotFoundException+ _ResourceNotFoundException,++ -- ** ServiceQuotaExceededException+ _ServiceQuotaExceededException,++ -- ** TooManyRequestsException+ _TooManyRequestsException,++ -- ** ValidationException+ _ValidationException,++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** AcceptInvitation+ AcceptInvitation (AcceptInvitation'),+ newAcceptInvitation,+ AcceptInvitationResponse (AcceptInvitationResponse'),+ newAcceptInvitationResponse,++ -- ** BatchGetGraphMemberDatasources+ BatchGetGraphMemberDatasources (BatchGetGraphMemberDatasources'),+ newBatchGetGraphMemberDatasources,+ BatchGetGraphMemberDatasourcesResponse (BatchGetGraphMemberDatasourcesResponse'),+ newBatchGetGraphMemberDatasourcesResponse,++ -- ** BatchGetMembershipDatasources+ BatchGetMembershipDatasources (BatchGetMembershipDatasources'),+ newBatchGetMembershipDatasources,+ BatchGetMembershipDatasourcesResponse (BatchGetMembershipDatasourcesResponse'),+ newBatchGetMembershipDatasourcesResponse,++ -- ** CreateGraph+ CreateGraph (CreateGraph'),+ newCreateGraph,+ CreateGraphResponse (CreateGraphResponse'),+ newCreateGraphResponse,++ -- ** CreateMembers+ CreateMembers (CreateMembers'),+ newCreateMembers,+ CreateMembersResponse (CreateMembersResponse'),+ newCreateMembersResponse,++ -- ** DeleteGraph+ DeleteGraph (DeleteGraph'),+ newDeleteGraph,+ DeleteGraphResponse (DeleteGraphResponse'),+ newDeleteGraphResponse,++ -- ** DeleteMembers+ DeleteMembers (DeleteMembers'),+ newDeleteMembers,+ DeleteMembersResponse (DeleteMembersResponse'),+ newDeleteMembersResponse,++ -- ** DescribeOrganizationConfiguration+ DescribeOrganizationConfiguration (DescribeOrganizationConfiguration'),+ newDescribeOrganizationConfiguration,+ DescribeOrganizationConfigurationResponse (DescribeOrganizationConfigurationResponse'),+ newDescribeOrganizationConfigurationResponse,++ -- ** DisableOrganizationAdminAccount+ DisableOrganizationAdminAccount (DisableOrganizationAdminAccount'),+ newDisableOrganizationAdminAccount,+ DisableOrganizationAdminAccountResponse (DisableOrganizationAdminAccountResponse'),+ newDisableOrganizationAdminAccountResponse,++ -- ** DisassociateMembership+ DisassociateMembership (DisassociateMembership'),+ newDisassociateMembership,+ DisassociateMembershipResponse (DisassociateMembershipResponse'),+ newDisassociateMembershipResponse,++ -- ** EnableOrganizationAdminAccount+ EnableOrganizationAdminAccount (EnableOrganizationAdminAccount'),+ newEnableOrganizationAdminAccount,+ EnableOrganizationAdminAccountResponse (EnableOrganizationAdminAccountResponse'),+ newEnableOrganizationAdminAccountResponse,++ -- ** GetMembers+ GetMembers (GetMembers'),+ newGetMembers,+ GetMembersResponse (GetMembersResponse'),+ newGetMembersResponse,++ -- ** ListDatasourcePackages+ ListDatasourcePackages (ListDatasourcePackages'),+ newListDatasourcePackages,+ ListDatasourcePackagesResponse (ListDatasourcePackagesResponse'),+ newListDatasourcePackagesResponse,++ -- ** ListGraphs+ ListGraphs (ListGraphs'),+ newListGraphs,+ ListGraphsResponse (ListGraphsResponse'),+ newListGraphsResponse,++ -- ** ListInvitations+ ListInvitations (ListInvitations'),+ newListInvitations,+ ListInvitationsResponse (ListInvitationsResponse'),+ newListInvitationsResponse,++ -- ** ListMembers+ ListMembers (ListMembers'),+ newListMembers,+ ListMembersResponse (ListMembersResponse'),+ newListMembersResponse,++ -- ** ListOrganizationAdminAccounts+ ListOrganizationAdminAccounts (ListOrganizationAdminAccounts'),+ newListOrganizationAdminAccounts,+ ListOrganizationAdminAccountsResponse (ListOrganizationAdminAccountsResponse'),+ newListOrganizationAdminAccountsResponse,++ -- ** ListTagsForResource+ ListTagsForResource (ListTagsForResource'),+ newListTagsForResource,+ ListTagsForResourceResponse (ListTagsForResourceResponse'),+ newListTagsForResourceResponse,++ -- ** RejectInvitation+ RejectInvitation (RejectInvitation'),+ newRejectInvitation,+ RejectInvitationResponse (RejectInvitationResponse'),+ newRejectInvitationResponse,++ -- ** StartMonitoringMember+ StartMonitoringMember (StartMonitoringMember'),+ newStartMonitoringMember,+ StartMonitoringMemberResponse (StartMonitoringMemberResponse'),+ newStartMonitoringMemberResponse,++ -- ** TagResource+ TagResource (TagResource'),+ newTagResource,+ TagResourceResponse (TagResourceResponse'),+ newTagResourceResponse,++ -- ** UntagResource+ UntagResource (UntagResource'),+ newUntagResource,+ UntagResourceResponse (UntagResourceResponse'),+ newUntagResourceResponse,++ -- ** UpdateDatasourcePackages+ UpdateDatasourcePackages (UpdateDatasourcePackages'),+ newUpdateDatasourcePackages,+ UpdateDatasourcePackagesResponse (UpdateDatasourcePackagesResponse'),+ newUpdateDatasourcePackagesResponse,++ -- ** UpdateOrganizationConfiguration+ UpdateOrganizationConfiguration (UpdateOrganizationConfiguration'),+ newUpdateOrganizationConfiguration,+ UpdateOrganizationConfigurationResponse (UpdateOrganizationConfigurationResponse'),+ newUpdateOrganizationConfigurationResponse,++ -- * Types++ -- ** DatasourcePackage+ DatasourcePackage (..),++ -- ** DatasourcePackageIngestState+ DatasourcePackageIngestState (..),++ -- ** InvitationType+ InvitationType (..),++ -- ** MemberDisabledReason+ MemberDisabledReason (..),++ -- ** MemberStatus+ MemberStatus (..),++ -- ** Account+ Account (Account'),+ newAccount,++ -- ** Administrator+ Administrator (Administrator'),+ newAdministrator,++ -- ** DatasourcePackageIngestDetail+ DatasourcePackageIngestDetail (DatasourcePackageIngestDetail'),+ newDatasourcePackageIngestDetail,++ -- ** DatasourcePackageUsageInfo+ DatasourcePackageUsageInfo (DatasourcePackageUsageInfo'),+ newDatasourcePackageUsageInfo,++ -- ** Graph+ Graph (Graph'),+ newGraph,++ -- ** MemberDetail+ MemberDetail (MemberDetail'),+ newMemberDetail,++ -- ** MembershipDatasources+ MembershipDatasources (MembershipDatasources'),+ newMembershipDatasources,++ -- ** TimestampForCollection+ TimestampForCollection (TimestampForCollection'),+ newTimestampForCollection,++ -- ** UnprocessedAccount+ UnprocessedAccount (UnprocessedAccount'),+ newUnprocessedAccount,++ -- ** UnprocessedGraph+ UnprocessedGraph (UnprocessedGraph'),+ newUnprocessedGraph,+ )+where++import Amazonka.Detective.AcceptInvitation+import Amazonka.Detective.BatchGetGraphMemberDatasources+import Amazonka.Detective.BatchGetMembershipDatasources+import Amazonka.Detective.CreateGraph+import Amazonka.Detective.CreateMembers+import Amazonka.Detective.DeleteGraph+import Amazonka.Detective.DeleteMembers+import Amazonka.Detective.DescribeOrganizationConfiguration+import Amazonka.Detective.DisableOrganizationAdminAccount+import Amazonka.Detective.DisassociateMembership+import Amazonka.Detective.EnableOrganizationAdminAccount+import Amazonka.Detective.GetMembers+import Amazonka.Detective.Lens+import Amazonka.Detective.ListDatasourcePackages+import Amazonka.Detective.ListGraphs+import Amazonka.Detective.ListInvitations+import Amazonka.Detective.ListMembers+import Amazonka.Detective.ListOrganizationAdminAccounts+import Amazonka.Detective.ListTagsForResource+import Amazonka.Detective.RejectInvitation+import Amazonka.Detective.StartMonitoringMember+import Amazonka.Detective.TagResource+import Amazonka.Detective.Types+import Amazonka.Detective.UntagResource+import Amazonka.Detective.UpdateDatasourcePackages+import Amazonka.Detective.UpdateOrganizationConfiguration+import Amazonka.Detective.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 'Detective'.++-- $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/Amazonka/Detective/AcceptInvitation.hs view
@@ -0,0 +1,144 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.AcceptInvitation+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Accepts an invitation for the member account to contribute data to a+-- behavior graph. This operation can only be called by an invited member+-- account.+--+-- The request provides the ARN of behavior graph.+--+-- The member account status in the graph must be @INVITED@.+module Amazonka.Detective.AcceptInvitation+ ( -- * Creating a Request+ AcceptInvitation (..),+ newAcceptInvitation,++ -- * Request Lenses+ acceptInvitation_graphArn,++ -- * Destructuring the Response+ AcceptInvitationResponse (..),+ newAcceptInvitationResponse,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newAcceptInvitation' smart constructor.+data AcceptInvitation = AcceptInvitation'+ { -- | The ARN of the behavior graph that the member account is accepting the+ -- invitation for.+ --+ -- The member account status in the behavior graph must be @INVITED@.+ graphArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AcceptInvitation' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'graphArn', 'acceptInvitation_graphArn' - The ARN of the behavior graph that the member account is accepting the+-- invitation for.+--+-- The member account status in the behavior graph must be @INVITED@.+newAcceptInvitation ::+ -- | 'graphArn'+ Prelude.Text ->+ AcceptInvitation+newAcceptInvitation pGraphArn_ =+ AcceptInvitation' {graphArn = pGraphArn_}++-- | The ARN of the behavior graph that the member account is accepting the+-- invitation for.+--+-- The member account status in the behavior graph must be @INVITED@.+acceptInvitation_graphArn :: Lens.Lens' AcceptInvitation Prelude.Text+acceptInvitation_graphArn = Lens.lens (\AcceptInvitation' {graphArn} -> graphArn) (\s@AcceptInvitation' {} a -> s {graphArn = a} :: AcceptInvitation)++instance Core.AWSRequest AcceptInvitation where+ type+ AWSResponse AcceptInvitation =+ AcceptInvitationResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveNull AcceptInvitationResponse'++instance Prelude.Hashable AcceptInvitation where+ hashWithSalt _salt AcceptInvitation' {..} =+ _salt `Prelude.hashWithSalt` graphArn++instance Prelude.NFData AcceptInvitation where+ rnf AcceptInvitation' {..} = Prelude.rnf graphArn++instance Data.ToHeaders AcceptInvitation where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON AcceptInvitation where+ toJSON AcceptInvitation' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("GraphArn" Data..= graphArn)]+ )++instance Data.ToPath AcceptInvitation where+ toPath = Prelude.const "/invitation"++instance Data.ToQuery AcceptInvitation where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newAcceptInvitationResponse' smart constructor.+data AcceptInvitationResponse = AcceptInvitationResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AcceptInvitationResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newAcceptInvitationResponse ::+ AcceptInvitationResponse+newAcceptInvitationResponse =+ AcceptInvitationResponse'++instance Prelude.NFData AcceptInvitationResponse where+ rnf _ = ()
+ gen/Amazonka/Detective/BatchGetGraphMemberDatasources.hs view
@@ -0,0 +1,234 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.BatchGetGraphMemberDatasources+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Gets data source package information for the behavior graph.+module Amazonka.Detective.BatchGetGraphMemberDatasources+ ( -- * Creating a Request+ BatchGetGraphMemberDatasources (..),+ newBatchGetGraphMemberDatasources,++ -- * Request Lenses+ batchGetGraphMemberDatasources_graphArn,+ batchGetGraphMemberDatasources_accountIds,++ -- * Destructuring the Response+ BatchGetGraphMemberDatasourcesResponse (..),+ newBatchGetGraphMemberDatasourcesResponse,++ -- * Response Lenses+ batchGetGraphMemberDatasourcesResponse_memberDatasources,+ batchGetGraphMemberDatasourcesResponse_unprocessedAccounts,+ batchGetGraphMemberDatasourcesResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newBatchGetGraphMemberDatasources' smart constructor.+data BatchGetGraphMemberDatasources = BatchGetGraphMemberDatasources'+ { -- | The ARN of the behavior graph.+ graphArn :: Prelude.Text,+ -- | The list of Amazon Web Services accounts to get data source package+ -- information on.+ accountIds :: Prelude.NonEmpty Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchGetGraphMemberDatasources' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'graphArn', 'batchGetGraphMemberDatasources_graphArn' - The ARN of the behavior graph.+--+-- 'accountIds', 'batchGetGraphMemberDatasources_accountIds' - The list of Amazon Web Services accounts to get data source package+-- information on.+newBatchGetGraphMemberDatasources ::+ -- | 'graphArn'+ Prelude.Text ->+ -- | 'accountIds'+ Prelude.NonEmpty Prelude.Text ->+ BatchGetGraphMemberDatasources+newBatchGetGraphMemberDatasources+ pGraphArn_+ pAccountIds_ =+ BatchGetGraphMemberDatasources'+ { graphArn =+ pGraphArn_,+ accountIds =+ Lens.coerced Lens.# pAccountIds_+ }++-- | The ARN of the behavior graph.+batchGetGraphMemberDatasources_graphArn :: Lens.Lens' BatchGetGraphMemberDatasources Prelude.Text+batchGetGraphMemberDatasources_graphArn = Lens.lens (\BatchGetGraphMemberDatasources' {graphArn} -> graphArn) (\s@BatchGetGraphMemberDatasources' {} a -> s {graphArn = a} :: BatchGetGraphMemberDatasources)++-- | The list of Amazon Web Services accounts to get data source package+-- information on.+batchGetGraphMemberDatasources_accountIds :: Lens.Lens' BatchGetGraphMemberDatasources (Prelude.NonEmpty Prelude.Text)+batchGetGraphMemberDatasources_accountIds = Lens.lens (\BatchGetGraphMemberDatasources' {accountIds} -> accountIds) (\s@BatchGetGraphMemberDatasources' {} a -> s {accountIds = a} :: BatchGetGraphMemberDatasources) Prelude.. Lens.coerced++instance+ Core.AWSRequest+ BatchGetGraphMemberDatasources+ where+ type+ AWSResponse BatchGetGraphMemberDatasources =+ BatchGetGraphMemberDatasourcesResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ BatchGetGraphMemberDatasourcesResponse'+ Prelude.<$> ( x+ Data..?> "MemberDatasources"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> ( x+ Data..?> "UnprocessedAccounts"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ BatchGetGraphMemberDatasources+ where+ hashWithSalt+ _salt+ BatchGetGraphMemberDatasources' {..} =+ _salt+ `Prelude.hashWithSalt` graphArn+ `Prelude.hashWithSalt` accountIds++instance+ Prelude.NFData+ BatchGetGraphMemberDatasources+ where+ rnf BatchGetGraphMemberDatasources' {..} =+ Prelude.rnf graphArn+ `Prelude.seq` Prelude.rnf accountIds++instance+ Data.ToHeaders+ BatchGetGraphMemberDatasources+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON BatchGetGraphMemberDatasources where+ toJSON BatchGetGraphMemberDatasources' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("GraphArn" Data..= graphArn),+ Prelude.Just ("AccountIds" Data..= accountIds)+ ]+ )++instance Data.ToPath BatchGetGraphMemberDatasources where+ toPath = Prelude.const "/graph/datasources/get"++instance Data.ToQuery BatchGetGraphMemberDatasources where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newBatchGetGraphMemberDatasourcesResponse' smart constructor.+data BatchGetGraphMemberDatasourcesResponse = BatchGetGraphMemberDatasourcesResponse'+ { -- | Details on the status of data source packages for members of the+ -- behavior graph.+ memberDatasources :: Prelude.Maybe [MembershipDatasources],+ -- | Accounts that data source package information could not be retrieved+ -- for.+ unprocessedAccounts :: Prelude.Maybe [UnprocessedAccount],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchGetGraphMemberDatasourcesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'memberDatasources', 'batchGetGraphMemberDatasourcesResponse_memberDatasources' - Details on the status of data source packages for members of the+-- behavior graph.+--+-- 'unprocessedAccounts', 'batchGetGraphMemberDatasourcesResponse_unprocessedAccounts' - Accounts that data source package information could not be retrieved+-- for.+--+-- 'httpStatus', 'batchGetGraphMemberDatasourcesResponse_httpStatus' - The response's http status code.+newBatchGetGraphMemberDatasourcesResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ BatchGetGraphMemberDatasourcesResponse+newBatchGetGraphMemberDatasourcesResponse+ pHttpStatus_ =+ BatchGetGraphMemberDatasourcesResponse'+ { memberDatasources =+ Prelude.Nothing,+ unprocessedAccounts =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Details on the status of data source packages for members of the+-- behavior graph.+batchGetGraphMemberDatasourcesResponse_memberDatasources :: Lens.Lens' BatchGetGraphMemberDatasourcesResponse (Prelude.Maybe [MembershipDatasources])+batchGetGraphMemberDatasourcesResponse_memberDatasources = Lens.lens (\BatchGetGraphMemberDatasourcesResponse' {memberDatasources} -> memberDatasources) (\s@BatchGetGraphMemberDatasourcesResponse' {} a -> s {memberDatasources = a} :: BatchGetGraphMemberDatasourcesResponse) Prelude.. Lens.mapping Lens.coerced++-- | Accounts that data source package information could not be retrieved+-- for.+batchGetGraphMemberDatasourcesResponse_unprocessedAccounts :: Lens.Lens' BatchGetGraphMemberDatasourcesResponse (Prelude.Maybe [UnprocessedAccount])+batchGetGraphMemberDatasourcesResponse_unprocessedAccounts = Lens.lens (\BatchGetGraphMemberDatasourcesResponse' {unprocessedAccounts} -> unprocessedAccounts) (\s@BatchGetGraphMemberDatasourcesResponse' {} a -> s {unprocessedAccounts = a} :: BatchGetGraphMemberDatasourcesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+batchGetGraphMemberDatasourcesResponse_httpStatus :: Lens.Lens' BatchGetGraphMemberDatasourcesResponse Prelude.Int+batchGetGraphMemberDatasourcesResponse_httpStatus = Lens.lens (\BatchGetGraphMemberDatasourcesResponse' {httpStatus} -> httpStatus) (\s@BatchGetGraphMemberDatasourcesResponse' {} a -> s {httpStatus = a} :: BatchGetGraphMemberDatasourcesResponse)++instance+ Prelude.NFData+ BatchGetGraphMemberDatasourcesResponse+ where+ rnf BatchGetGraphMemberDatasourcesResponse' {..} =+ Prelude.rnf memberDatasources+ `Prelude.seq` Prelude.rnf unprocessedAccounts+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Detective/BatchGetMembershipDatasources.hs view
@@ -0,0 +1,198 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.BatchGetMembershipDatasources+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Gets information on the data source package history for an account.+module Amazonka.Detective.BatchGetMembershipDatasources+ ( -- * Creating a Request+ BatchGetMembershipDatasources (..),+ newBatchGetMembershipDatasources,++ -- * Request Lenses+ batchGetMembershipDatasources_graphArns,++ -- * Destructuring the Response+ BatchGetMembershipDatasourcesResponse (..),+ newBatchGetMembershipDatasourcesResponse,++ -- * Response Lenses+ batchGetMembershipDatasourcesResponse_membershipDatasources,+ batchGetMembershipDatasourcesResponse_unprocessedGraphs,+ batchGetMembershipDatasourcesResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newBatchGetMembershipDatasources' smart constructor.+data BatchGetMembershipDatasources = BatchGetMembershipDatasources'+ { -- | The ARN of the behavior graph.+ graphArns :: Prelude.NonEmpty Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchGetMembershipDatasources' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'graphArns', 'batchGetMembershipDatasources_graphArns' - The ARN of the behavior graph.+newBatchGetMembershipDatasources ::+ -- | 'graphArns'+ Prelude.NonEmpty Prelude.Text ->+ BatchGetMembershipDatasources+newBatchGetMembershipDatasources pGraphArns_ =+ BatchGetMembershipDatasources'+ { graphArns =+ Lens.coerced Lens.# pGraphArns_+ }++-- | The ARN of the behavior graph.+batchGetMembershipDatasources_graphArns :: Lens.Lens' BatchGetMembershipDatasources (Prelude.NonEmpty Prelude.Text)+batchGetMembershipDatasources_graphArns = Lens.lens (\BatchGetMembershipDatasources' {graphArns} -> graphArns) (\s@BatchGetMembershipDatasources' {} a -> s {graphArns = a} :: BatchGetMembershipDatasources) Prelude.. Lens.coerced++instance+ Core.AWSRequest+ BatchGetMembershipDatasources+ where+ type+ AWSResponse BatchGetMembershipDatasources =+ BatchGetMembershipDatasourcesResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ BatchGetMembershipDatasourcesResponse'+ Prelude.<$> ( x+ Data..?> "MembershipDatasources"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> ( x+ Data..?> "UnprocessedGraphs"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ BatchGetMembershipDatasources+ where+ hashWithSalt _salt BatchGetMembershipDatasources' {..} =+ _salt `Prelude.hashWithSalt` graphArns++instance Prelude.NFData BatchGetMembershipDatasources where+ rnf BatchGetMembershipDatasources' {..} =+ Prelude.rnf graphArns++instance Data.ToHeaders BatchGetMembershipDatasources where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON BatchGetMembershipDatasources where+ toJSON BatchGetMembershipDatasources' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("GraphArns" Data..= graphArns)]+ )++instance Data.ToPath BatchGetMembershipDatasources where+ toPath = Prelude.const "/membership/datasources/get"++instance Data.ToQuery BatchGetMembershipDatasources where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newBatchGetMembershipDatasourcesResponse' smart constructor.+data BatchGetMembershipDatasourcesResponse = BatchGetMembershipDatasourcesResponse'+ { -- | Details on the data source package history for an member of the behavior+ -- graph.+ membershipDatasources :: Prelude.Maybe [MembershipDatasources],+ -- | Graphs that data source package information could not be retrieved for.+ unprocessedGraphs :: Prelude.Maybe [UnprocessedGraph],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchGetMembershipDatasourcesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'membershipDatasources', 'batchGetMembershipDatasourcesResponse_membershipDatasources' - Details on the data source package history for an member of the behavior+-- graph.+--+-- 'unprocessedGraphs', 'batchGetMembershipDatasourcesResponse_unprocessedGraphs' - Graphs that data source package information could not be retrieved for.+--+-- 'httpStatus', 'batchGetMembershipDatasourcesResponse_httpStatus' - The response's http status code.+newBatchGetMembershipDatasourcesResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ BatchGetMembershipDatasourcesResponse+newBatchGetMembershipDatasourcesResponse pHttpStatus_ =+ BatchGetMembershipDatasourcesResponse'+ { membershipDatasources =+ Prelude.Nothing,+ unprocessedGraphs = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Details on the data source package history for an member of the behavior+-- graph.+batchGetMembershipDatasourcesResponse_membershipDatasources :: Lens.Lens' BatchGetMembershipDatasourcesResponse (Prelude.Maybe [MembershipDatasources])+batchGetMembershipDatasourcesResponse_membershipDatasources = Lens.lens (\BatchGetMembershipDatasourcesResponse' {membershipDatasources} -> membershipDatasources) (\s@BatchGetMembershipDatasourcesResponse' {} a -> s {membershipDatasources = a} :: BatchGetMembershipDatasourcesResponse) Prelude.. Lens.mapping Lens.coerced++-- | Graphs that data source package information could not be retrieved for.+batchGetMembershipDatasourcesResponse_unprocessedGraphs :: Lens.Lens' BatchGetMembershipDatasourcesResponse (Prelude.Maybe [UnprocessedGraph])+batchGetMembershipDatasourcesResponse_unprocessedGraphs = Lens.lens (\BatchGetMembershipDatasourcesResponse' {unprocessedGraphs} -> unprocessedGraphs) (\s@BatchGetMembershipDatasourcesResponse' {} a -> s {unprocessedGraphs = a} :: BatchGetMembershipDatasourcesResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+batchGetMembershipDatasourcesResponse_httpStatus :: Lens.Lens' BatchGetMembershipDatasourcesResponse Prelude.Int+batchGetMembershipDatasourcesResponse_httpStatus = Lens.lens (\BatchGetMembershipDatasourcesResponse' {httpStatus} -> httpStatus) (\s@BatchGetMembershipDatasourcesResponse' {} a -> s {httpStatus = a} :: BatchGetMembershipDatasourcesResponse)++instance+ Prelude.NFData+ BatchGetMembershipDatasourcesResponse+ where+ rnf BatchGetMembershipDatasourcesResponse' {..} =+ Prelude.rnf membershipDatasources+ `Prelude.seq` Prelude.rnf unprocessedGraphs+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Detective/CreateGraph.hs view
@@ -0,0 +1,187 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.CreateGraph+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a new behavior graph for the calling account, and sets that+-- account as the administrator account. This operation is called by the+-- account that is enabling Detective.+--+-- Before you try to enable Detective, make sure that your account has been+-- enrolled in Amazon GuardDuty for at least 48 hours. If you do not meet+-- this requirement, you cannot enable Detective. If you do meet the+-- GuardDuty prerequisite, then when you make the request to enable+-- Detective, it checks whether your data volume is within the Detective+-- quota. If it exceeds the quota, then you cannot enable Detective.+--+-- The operation also enables Detective for the calling account in the+-- currently selected Region. It returns the ARN of the new behavior graph.+--+-- @CreateGraph@ triggers a process to create the corresponding data tables+-- for the new behavior graph.+--+-- An account can only be the administrator account for one behavior graph+-- within a Region. If the same account calls @CreateGraph@ with the same+-- administrator account, it always returns the same behavior graph ARN. It+-- does not create a new behavior graph.+module Amazonka.Detective.CreateGraph+ ( -- * Creating a Request+ CreateGraph (..),+ newCreateGraph,++ -- * Request Lenses+ createGraph_tags,++ -- * Destructuring the Response+ CreateGraphResponse (..),+ newCreateGraphResponse,++ -- * Response Lenses+ createGraphResponse_graphArn,+ createGraphResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateGraph' smart constructor.+data CreateGraph = CreateGraph'+ { -- | The tags to assign to the new behavior graph. You can add up to 50 tags.+ -- For each tag, you provide the tag key and the tag value. Each tag key+ -- can contain up to 128 characters. Each tag value can contain up to 256+ -- characters.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateGraph' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'tags', 'createGraph_tags' - The tags to assign to the new behavior graph. You can add up to 50 tags.+-- For each tag, you provide the tag key and the tag value. Each tag key+-- can contain up to 128 characters. Each tag value can contain up to 256+-- characters.+newCreateGraph ::+ CreateGraph+newCreateGraph = CreateGraph' {tags = Prelude.Nothing}++-- | The tags to assign to the new behavior graph. You can add up to 50 tags.+-- For each tag, you provide the tag key and the tag value. Each tag key+-- can contain up to 128 characters. Each tag value can contain up to 256+-- characters.+createGraph_tags :: Lens.Lens' CreateGraph (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createGraph_tags = Lens.lens (\CreateGraph' {tags} -> tags) (\s@CreateGraph' {} a -> s {tags = a} :: CreateGraph) Prelude.. Lens.mapping Lens.coerced++instance Core.AWSRequest CreateGraph where+ type AWSResponse CreateGraph = CreateGraphResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateGraphResponse'+ Prelude.<$> (x Data..?> "GraphArn")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateGraph where+ hashWithSalt _salt CreateGraph' {..} =+ _salt `Prelude.hashWithSalt` tags++instance Prelude.NFData CreateGraph where+ rnf CreateGraph' {..} = Prelude.rnf tags++instance Data.ToHeaders CreateGraph where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateGraph where+ toJSON CreateGraph' {..} =+ Data.object+ ( Prelude.catMaybes+ [("Tags" Data..=) Prelude.<$> tags]+ )++instance Data.ToPath CreateGraph where+ toPath = Prelude.const "/graph"++instance Data.ToQuery CreateGraph where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateGraphResponse' smart constructor.+data CreateGraphResponse = CreateGraphResponse'+ { -- | The ARN of the new behavior graph.+ graphArn :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateGraphResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'graphArn', 'createGraphResponse_graphArn' - The ARN of the new behavior graph.+--+-- 'httpStatus', 'createGraphResponse_httpStatus' - The response's http status code.+newCreateGraphResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateGraphResponse+newCreateGraphResponse pHttpStatus_ =+ CreateGraphResponse'+ { graphArn = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The ARN of the new behavior graph.+createGraphResponse_graphArn :: Lens.Lens' CreateGraphResponse (Prelude.Maybe Prelude.Text)+createGraphResponse_graphArn = Lens.lens (\CreateGraphResponse' {graphArn} -> graphArn) (\s@CreateGraphResponse' {} a -> s {graphArn = a} :: CreateGraphResponse)++-- | The response's http status code.+createGraphResponse_httpStatus :: Lens.Lens' CreateGraphResponse Prelude.Int+createGraphResponse_httpStatus = Lens.lens (\CreateGraphResponse' {httpStatus} -> httpStatus) (\s@CreateGraphResponse' {} a -> s {httpStatus = a} :: CreateGraphResponse)++instance Prelude.NFData CreateGraphResponse where+ rnf CreateGraphResponse' {..} =+ Prelude.rnf graphArn+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Detective/CreateMembers.hs view
@@ -0,0 +1,306 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.CreateMembers+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- @CreateMembers@ is used to send invitations to accounts. For the+-- organization behavior graph, the Detective administrator account uses+-- @CreateMembers@ to enable organization accounts as member accounts.+--+-- For invited accounts, @CreateMembers@ sends a request to invite the+-- specified Amazon Web Services accounts to be member accounts in the+-- behavior graph. This operation can only be called by the administrator+-- account for a behavior graph.+--+-- @CreateMembers@ verifies the accounts and then invites the verified+-- accounts. The administrator can optionally specify to not send+-- invitation emails to the member accounts. This would be used when the+-- administrator manages their member accounts centrally.+--+-- For organization accounts in the organization behavior graph,+-- @CreateMembers@ attempts to enable the accounts. The organization+-- accounts do not receive invitations.+--+-- The request provides the behavior graph ARN and the list of accounts to+-- invite or to enable.+--+-- The response separates the requested accounts into two lists:+--+-- - The accounts that @CreateMembers@ was able to process. For invited+-- accounts, includes member accounts that are being verified, that+-- have passed verification and are to be invited, and that have failed+-- verification. For organization accounts in the organization behavior+-- graph, includes accounts that can be enabled and that cannot be+-- enabled.+--+-- - The accounts that @CreateMembers@ was unable to process. This list+-- includes accounts that were already invited to be member accounts in+-- the behavior graph.+module Amazonka.Detective.CreateMembers+ ( -- * Creating a Request+ CreateMembers (..),+ newCreateMembers,++ -- * Request Lenses+ createMembers_disableEmailNotification,+ createMembers_message,+ createMembers_graphArn,+ createMembers_accounts,++ -- * Destructuring the Response+ CreateMembersResponse (..),+ newCreateMembersResponse,++ -- * Response Lenses+ createMembersResponse_members,+ createMembersResponse_unprocessedAccounts,+ createMembersResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateMembers' smart constructor.+data CreateMembers = CreateMembers'+ { -- | if set to @true@, then the invited accounts do not receive email+ -- notifications. By default, this is set to @false@, and the invited+ -- accounts receive email notifications.+ --+ -- Organization accounts in the organization behavior graph do not receive+ -- email notifications.+ disableEmailNotification :: Prelude.Maybe Prelude.Bool,+ -- | Customized message text to include in the invitation email message to+ -- the invited member accounts.+ message :: Prelude.Maybe Prelude.Text,+ -- | The ARN of the behavior graph.+ graphArn :: Prelude.Text,+ -- | The list of Amazon Web Services accounts to invite or to enable. You can+ -- invite or enable up to 50 accounts at a time. For each invited account,+ -- the account list contains the account identifier and the Amazon Web+ -- Services account root user email address. For organization accounts in+ -- the organization behavior graph, the email address is not required.+ accounts :: Prelude.NonEmpty Account+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateMembers' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'disableEmailNotification', 'createMembers_disableEmailNotification' - if set to @true@, then the invited accounts do not receive email+-- notifications. By default, this is set to @false@, and the invited+-- accounts receive email notifications.+--+-- Organization accounts in the organization behavior graph do not receive+-- email notifications.+--+-- 'message', 'createMembers_message' - Customized message text to include in the invitation email message to+-- the invited member accounts.+--+-- 'graphArn', 'createMembers_graphArn' - The ARN of the behavior graph.+--+-- 'accounts', 'createMembers_accounts' - The list of Amazon Web Services accounts to invite or to enable. You can+-- invite or enable up to 50 accounts at a time. For each invited account,+-- the account list contains the account identifier and the Amazon Web+-- Services account root user email address. For organization accounts in+-- the organization behavior graph, the email address is not required.+newCreateMembers ::+ -- | 'graphArn'+ Prelude.Text ->+ -- | 'accounts'+ Prelude.NonEmpty Account ->+ CreateMembers+newCreateMembers pGraphArn_ pAccounts_ =+ CreateMembers'+ { disableEmailNotification =+ Prelude.Nothing,+ message = Prelude.Nothing,+ graphArn = pGraphArn_,+ accounts = Lens.coerced Lens.# pAccounts_+ }++-- | if set to @true@, then the invited accounts do not receive email+-- notifications. By default, this is set to @false@, and the invited+-- accounts receive email notifications.+--+-- Organization accounts in the organization behavior graph do not receive+-- email notifications.+createMembers_disableEmailNotification :: Lens.Lens' CreateMembers (Prelude.Maybe Prelude.Bool)+createMembers_disableEmailNotification = Lens.lens (\CreateMembers' {disableEmailNotification} -> disableEmailNotification) (\s@CreateMembers' {} a -> s {disableEmailNotification = a} :: CreateMembers)++-- | Customized message text to include in the invitation email message to+-- the invited member accounts.+createMembers_message :: Lens.Lens' CreateMembers (Prelude.Maybe Prelude.Text)+createMembers_message = Lens.lens (\CreateMembers' {message} -> message) (\s@CreateMembers' {} a -> s {message = a} :: CreateMembers)++-- | The ARN of the behavior graph.+createMembers_graphArn :: Lens.Lens' CreateMembers Prelude.Text+createMembers_graphArn = Lens.lens (\CreateMembers' {graphArn} -> graphArn) (\s@CreateMembers' {} a -> s {graphArn = a} :: CreateMembers)++-- | The list of Amazon Web Services accounts to invite or to enable. You can+-- invite or enable up to 50 accounts at a time. For each invited account,+-- the account list contains the account identifier and the Amazon Web+-- Services account root user email address. For organization accounts in+-- the organization behavior graph, the email address is not required.+createMembers_accounts :: Lens.Lens' CreateMembers (Prelude.NonEmpty Account)+createMembers_accounts = Lens.lens (\CreateMembers' {accounts} -> accounts) (\s@CreateMembers' {} a -> s {accounts = a} :: CreateMembers) Prelude.. Lens.coerced++instance Core.AWSRequest CreateMembers where+ type+ AWSResponse CreateMembers =+ CreateMembersResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateMembersResponse'+ Prelude.<$> (x Data..?> "Members" Core..!@ Prelude.mempty)+ Prelude.<*> ( x+ Data..?> "UnprocessedAccounts"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateMembers where+ hashWithSalt _salt CreateMembers' {..} =+ _salt+ `Prelude.hashWithSalt` disableEmailNotification+ `Prelude.hashWithSalt` message+ `Prelude.hashWithSalt` graphArn+ `Prelude.hashWithSalt` accounts++instance Prelude.NFData CreateMembers where+ rnf CreateMembers' {..} =+ Prelude.rnf disableEmailNotification+ `Prelude.seq` Prelude.rnf message+ `Prelude.seq` Prelude.rnf graphArn+ `Prelude.seq` Prelude.rnf accounts++instance Data.ToHeaders CreateMembers where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateMembers where+ toJSON CreateMembers' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("DisableEmailNotification" Data..=)+ Prelude.<$> disableEmailNotification,+ ("Message" Data..=) Prelude.<$> message,+ Prelude.Just ("GraphArn" Data..= graphArn),+ Prelude.Just ("Accounts" Data..= accounts)+ ]+ )++instance Data.ToPath CreateMembers where+ toPath = Prelude.const "/graph/members"++instance Data.ToQuery CreateMembers where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateMembersResponse' smart constructor.+data CreateMembersResponse = CreateMembersResponse'+ { -- | The set of member account invitation or enablement requests that+ -- Detective was able to process. This includes accounts that are being+ -- verified, that failed verification, and that passed verification and are+ -- being sent an invitation or are being enabled.+ members :: Prelude.Maybe [MemberDetail],+ -- | The list of accounts for which Detective was unable to process the+ -- invitation or enablement request. For each account, the list provides+ -- the reason why the request could not be processed. The list includes+ -- accounts that are already member accounts in the behavior graph.+ unprocessedAccounts :: Prelude.Maybe [UnprocessedAccount],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateMembersResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'members', 'createMembersResponse_members' - The set of member account invitation or enablement requests that+-- Detective was able to process. This includes accounts that are being+-- verified, that failed verification, and that passed verification and are+-- being sent an invitation or are being enabled.+--+-- 'unprocessedAccounts', 'createMembersResponse_unprocessedAccounts' - The list of accounts for which Detective was unable to process the+-- invitation or enablement request. For each account, the list provides+-- the reason why the request could not be processed. The list includes+-- accounts that are already member accounts in the behavior graph.+--+-- 'httpStatus', 'createMembersResponse_httpStatus' - The response's http status code.+newCreateMembersResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateMembersResponse+newCreateMembersResponse pHttpStatus_ =+ CreateMembersResponse'+ { members = Prelude.Nothing,+ unprocessedAccounts = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The set of member account invitation or enablement requests that+-- Detective was able to process. This includes accounts that are being+-- verified, that failed verification, and that passed verification and are+-- being sent an invitation or are being enabled.+createMembersResponse_members :: Lens.Lens' CreateMembersResponse (Prelude.Maybe [MemberDetail])+createMembersResponse_members = Lens.lens (\CreateMembersResponse' {members} -> members) (\s@CreateMembersResponse' {} a -> s {members = a} :: CreateMembersResponse) Prelude.. Lens.mapping Lens.coerced++-- | The list of accounts for which Detective was unable to process the+-- invitation or enablement request. For each account, the list provides+-- the reason why the request could not be processed. The list includes+-- accounts that are already member accounts in the behavior graph.+createMembersResponse_unprocessedAccounts :: Lens.Lens' CreateMembersResponse (Prelude.Maybe [UnprocessedAccount])+createMembersResponse_unprocessedAccounts = Lens.lens (\CreateMembersResponse' {unprocessedAccounts} -> unprocessedAccounts) (\s@CreateMembersResponse' {} a -> s {unprocessedAccounts = a} :: CreateMembersResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+createMembersResponse_httpStatus :: Lens.Lens' CreateMembersResponse Prelude.Int+createMembersResponse_httpStatus = Lens.lens (\CreateMembersResponse' {httpStatus} -> httpStatus) (\s@CreateMembersResponse' {} a -> s {httpStatus = a} :: CreateMembersResponse)++instance Prelude.NFData CreateMembersResponse where+ rnf CreateMembersResponse' {..} =+ Prelude.rnf members+ `Prelude.seq` Prelude.rnf unprocessedAccounts+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Detective/DeleteGraph.hs view
@@ -0,0 +1,130 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.DeleteGraph+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Disables the specified behavior graph and queues it to be deleted. This+-- operation removes the behavior graph from each member account\'s list of+-- behavior graphs.+--+-- @DeleteGraph@ can only be called by the administrator account for a+-- behavior graph.+module Amazonka.Detective.DeleteGraph+ ( -- * Creating a Request+ DeleteGraph (..),+ newDeleteGraph,++ -- * Request Lenses+ deleteGraph_graphArn,++ -- * Destructuring the Response+ DeleteGraphResponse (..),+ newDeleteGraphResponse,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteGraph' smart constructor.+data DeleteGraph = DeleteGraph'+ { -- | The ARN of the behavior graph to disable.+ graphArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteGraph' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'graphArn', 'deleteGraph_graphArn' - The ARN of the behavior graph to disable.+newDeleteGraph ::+ -- | 'graphArn'+ Prelude.Text ->+ DeleteGraph+newDeleteGraph pGraphArn_ =+ DeleteGraph' {graphArn = pGraphArn_}++-- | The ARN of the behavior graph to disable.+deleteGraph_graphArn :: Lens.Lens' DeleteGraph Prelude.Text+deleteGraph_graphArn = Lens.lens (\DeleteGraph' {graphArn} -> graphArn) (\s@DeleteGraph' {} a -> s {graphArn = a} :: DeleteGraph)++instance Core.AWSRequest DeleteGraph where+ type AWSResponse DeleteGraph = DeleteGraphResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response = Response.receiveNull DeleteGraphResponse'++instance Prelude.Hashable DeleteGraph where+ hashWithSalt _salt DeleteGraph' {..} =+ _salt `Prelude.hashWithSalt` graphArn++instance Prelude.NFData DeleteGraph where+ rnf DeleteGraph' {..} = Prelude.rnf graphArn++instance Data.ToHeaders DeleteGraph where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DeleteGraph where+ toJSON DeleteGraph' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("GraphArn" Data..= graphArn)]+ )++instance Data.ToPath DeleteGraph where+ toPath = Prelude.const "/graph/removal"++instance Data.ToQuery DeleteGraph where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteGraphResponse' smart constructor.+data DeleteGraphResponse = DeleteGraphResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteGraphResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newDeleteGraphResponse ::+ DeleteGraphResponse+newDeleteGraphResponse = DeleteGraphResponse'++instance Prelude.NFData DeleteGraphResponse where+ rnf _ = ()
+ gen/Amazonka/Detective/DeleteMembers.hs view
@@ -0,0 +1,231 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.DeleteMembers+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes the specified member accounts from the behavior graph. The+-- removed accounts no longer contribute data to the behavior graph. This+-- operation can only be called by the administrator account for the+-- behavior graph.+--+-- For invited accounts, the removed accounts are deleted from the list of+-- accounts in the behavior graph. To restore the account, the+-- administrator account must send another invitation.+--+-- For organization accounts in the organization behavior graph, the+-- Detective administrator account can always enable the organization+-- account again. Organization accounts that are not enabled as member+-- accounts are not included in the @ListMembers@ results for the+-- organization behavior graph.+--+-- An administrator account cannot use @DeleteMembers@ to remove their own+-- account from the behavior graph. To disable a behavior graph, the+-- administrator account uses the @DeleteGraph@ API method.+module Amazonka.Detective.DeleteMembers+ ( -- * Creating a Request+ DeleteMembers (..),+ newDeleteMembers,++ -- * Request Lenses+ deleteMembers_graphArn,+ deleteMembers_accountIds,++ -- * Destructuring the Response+ DeleteMembersResponse (..),+ newDeleteMembersResponse,++ -- * Response Lenses+ deleteMembersResponse_accountIds,+ deleteMembersResponse_unprocessedAccounts,+ deleteMembersResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteMembers' smart constructor.+data DeleteMembers = DeleteMembers'+ { -- | The ARN of the behavior graph to remove members from.+ graphArn :: Prelude.Text,+ -- | The list of Amazon Web Services account identifiers for the member+ -- accounts to remove from the behavior graph. You can remove up to 50+ -- member accounts at a time.+ accountIds :: Prelude.NonEmpty Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteMembers' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'graphArn', 'deleteMembers_graphArn' - The ARN of the behavior graph to remove members from.+--+-- 'accountIds', 'deleteMembers_accountIds' - The list of Amazon Web Services account identifiers for the member+-- accounts to remove from the behavior graph. You can remove up to 50+-- member accounts at a time.+newDeleteMembers ::+ -- | 'graphArn'+ Prelude.Text ->+ -- | 'accountIds'+ Prelude.NonEmpty Prelude.Text ->+ DeleteMembers+newDeleteMembers pGraphArn_ pAccountIds_ =+ DeleteMembers'+ { graphArn = pGraphArn_,+ accountIds = Lens.coerced Lens.# pAccountIds_+ }++-- | The ARN of the behavior graph to remove members from.+deleteMembers_graphArn :: Lens.Lens' DeleteMembers Prelude.Text+deleteMembers_graphArn = Lens.lens (\DeleteMembers' {graphArn} -> graphArn) (\s@DeleteMembers' {} a -> s {graphArn = a} :: DeleteMembers)++-- | The list of Amazon Web Services account identifiers for the member+-- accounts to remove from the behavior graph. You can remove up to 50+-- member accounts at a time.+deleteMembers_accountIds :: Lens.Lens' DeleteMembers (Prelude.NonEmpty Prelude.Text)+deleteMembers_accountIds = Lens.lens (\DeleteMembers' {accountIds} -> accountIds) (\s@DeleteMembers' {} a -> s {accountIds = a} :: DeleteMembers) Prelude.. Lens.coerced++instance Core.AWSRequest DeleteMembers where+ type+ AWSResponse DeleteMembers =+ DeleteMembersResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DeleteMembersResponse'+ Prelude.<$> (x Data..?> "AccountIds")+ Prelude.<*> ( x+ Data..?> "UnprocessedAccounts"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeleteMembers where+ hashWithSalt _salt DeleteMembers' {..} =+ _salt+ `Prelude.hashWithSalt` graphArn+ `Prelude.hashWithSalt` accountIds++instance Prelude.NFData DeleteMembers where+ rnf DeleteMembers' {..} =+ Prelude.rnf graphArn+ `Prelude.seq` Prelude.rnf accountIds++instance Data.ToHeaders DeleteMembers where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DeleteMembers where+ toJSON DeleteMembers' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("GraphArn" Data..= graphArn),+ Prelude.Just ("AccountIds" Data..= accountIds)+ ]+ )++instance Data.ToPath DeleteMembers where+ toPath = Prelude.const "/graph/members/removal"++instance Data.ToQuery DeleteMembers where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteMembersResponse' smart constructor.+data DeleteMembersResponse = DeleteMembersResponse'+ { -- | The list of Amazon Web Services account identifiers for the member+ -- accounts that Detective successfully removed from the behavior graph.+ accountIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),+ -- | The list of member accounts that Detective was not able to remove from+ -- the behavior graph. For each member account, provides the reason that+ -- the deletion could not be processed.+ unprocessedAccounts :: Prelude.Maybe [UnprocessedAccount],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteMembersResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountIds', 'deleteMembersResponse_accountIds' - The list of Amazon Web Services account identifiers for the member+-- accounts that Detective successfully removed from the behavior graph.+--+-- 'unprocessedAccounts', 'deleteMembersResponse_unprocessedAccounts' - The list of member accounts that Detective was not able to remove from+-- the behavior graph. For each member account, provides the reason that+-- the deletion could not be processed.+--+-- 'httpStatus', 'deleteMembersResponse_httpStatus' - The response's http status code.+newDeleteMembersResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteMembersResponse+newDeleteMembersResponse pHttpStatus_ =+ DeleteMembersResponse'+ { accountIds =+ Prelude.Nothing,+ unprocessedAccounts = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The list of Amazon Web Services account identifiers for the member+-- accounts that Detective successfully removed from the behavior graph.+deleteMembersResponse_accountIds :: Lens.Lens' DeleteMembersResponse (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))+deleteMembersResponse_accountIds = Lens.lens (\DeleteMembersResponse' {accountIds} -> accountIds) (\s@DeleteMembersResponse' {} a -> s {accountIds = a} :: DeleteMembersResponse) Prelude.. Lens.mapping Lens.coerced++-- | The list of member accounts that Detective was not able to remove from+-- the behavior graph. For each member account, provides the reason that+-- the deletion could not be processed.+deleteMembersResponse_unprocessedAccounts :: Lens.Lens' DeleteMembersResponse (Prelude.Maybe [UnprocessedAccount])+deleteMembersResponse_unprocessedAccounts = Lens.lens (\DeleteMembersResponse' {unprocessedAccounts} -> unprocessedAccounts) (\s@DeleteMembersResponse' {} a -> s {unprocessedAccounts = a} :: DeleteMembersResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+deleteMembersResponse_httpStatus :: Lens.Lens' DeleteMembersResponse Prelude.Int+deleteMembersResponse_httpStatus = Lens.lens (\DeleteMembersResponse' {httpStatus} -> httpStatus) (\s@DeleteMembersResponse' {} a -> s {httpStatus = a} :: DeleteMembersResponse)++instance Prelude.NFData DeleteMembersResponse where+ rnf DeleteMembersResponse' {..} =+ Prelude.rnf accountIds+ `Prelude.seq` Prelude.rnf unprocessedAccounts+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Detective/DescribeOrganizationConfiguration.hs view
@@ -0,0 +1,205 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.DescribeOrganizationConfiguration+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns information about the configuration for the organization+-- behavior graph. Currently indicates whether to automatically enable new+-- organization accounts as member accounts.+--+-- Can only be called by the Detective administrator account for the+-- organization.+module Amazonka.Detective.DescribeOrganizationConfiguration+ ( -- * Creating a Request+ DescribeOrganizationConfiguration (..),+ newDescribeOrganizationConfiguration,++ -- * Request Lenses+ describeOrganizationConfiguration_graphArn,++ -- * Destructuring the Response+ DescribeOrganizationConfigurationResponse (..),+ newDescribeOrganizationConfigurationResponse,++ -- * Response Lenses+ describeOrganizationConfigurationResponse_autoEnable,+ describeOrganizationConfigurationResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDescribeOrganizationConfiguration' smart constructor.+data DescribeOrganizationConfiguration = DescribeOrganizationConfiguration'+ { -- | The ARN of the organization behavior graph.+ graphArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeOrganizationConfiguration' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'graphArn', 'describeOrganizationConfiguration_graphArn' - The ARN of the organization behavior graph.+newDescribeOrganizationConfiguration ::+ -- | 'graphArn'+ Prelude.Text ->+ DescribeOrganizationConfiguration+newDescribeOrganizationConfiguration pGraphArn_ =+ DescribeOrganizationConfiguration'+ { graphArn =+ pGraphArn_+ }++-- | The ARN of the organization behavior graph.+describeOrganizationConfiguration_graphArn :: Lens.Lens' DescribeOrganizationConfiguration Prelude.Text+describeOrganizationConfiguration_graphArn = Lens.lens (\DescribeOrganizationConfiguration' {graphArn} -> graphArn) (\s@DescribeOrganizationConfiguration' {} a -> s {graphArn = a} :: DescribeOrganizationConfiguration)++instance+ Core.AWSRequest+ DescribeOrganizationConfiguration+ where+ type+ AWSResponse DescribeOrganizationConfiguration =+ DescribeOrganizationConfigurationResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DescribeOrganizationConfigurationResponse'+ Prelude.<$> (x Data..?> "AutoEnable")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ DescribeOrganizationConfiguration+ where+ hashWithSalt+ _salt+ DescribeOrganizationConfiguration' {..} =+ _salt `Prelude.hashWithSalt` graphArn++instance+ Prelude.NFData+ DescribeOrganizationConfiguration+ where+ rnf DescribeOrganizationConfiguration' {..} =+ Prelude.rnf graphArn++instance+ Data.ToHeaders+ DescribeOrganizationConfiguration+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance+ Data.ToJSON+ DescribeOrganizationConfiguration+ where+ toJSON DescribeOrganizationConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("GraphArn" Data..= graphArn)]+ )++instance+ Data.ToPath+ DescribeOrganizationConfiguration+ where+ toPath =+ Prelude.const+ "/orgs/describeOrganizationConfiguration"++instance+ Data.ToQuery+ DescribeOrganizationConfiguration+ where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeOrganizationConfigurationResponse' smart constructor.+data DescribeOrganizationConfigurationResponse = DescribeOrganizationConfigurationResponse'+ { -- | Indicates whether to automatically enable new organization accounts as+ -- member accounts in the organization behavior graph.+ autoEnable :: Prelude.Maybe Prelude.Bool,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DescribeOrganizationConfigurationResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'autoEnable', 'describeOrganizationConfigurationResponse_autoEnable' - Indicates whether to automatically enable new organization accounts as+-- member accounts in the organization behavior graph.+--+-- 'httpStatus', 'describeOrganizationConfigurationResponse_httpStatus' - The response's http status code.+newDescribeOrganizationConfigurationResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeOrganizationConfigurationResponse+newDescribeOrganizationConfigurationResponse+ pHttpStatus_ =+ DescribeOrganizationConfigurationResponse'+ { autoEnable =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Indicates whether to automatically enable new organization accounts as+-- member accounts in the organization behavior graph.+describeOrganizationConfigurationResponse_autoEnable :: Lens.Lens' DescribeOrganizationConfigurationResponse (Prelude.Maybe Prelude.Bool)+describeOrganizationConfigurationResponse_autoEnable = Lens.lens (\DescribeOrganizationConfigurationResponse' {autoEnable} -> autoEnable) (\s@DescribeOrganizationConfigurationResponse' {} a -> s {autoEnable = a} :: DescribeOrganizationConfigurationResponse)++-- | The response's http status code.+describeOrganizationConfigurationResponse_httpStatus :: Lens.Lens' DescribeOrganizationConfigurationResponse Prelude.Int+describeOrganizationConfigurationResponse_httpStatus = Lens.lens (\DescribeOrganizationConfigurationResponse' {httpStatus} -> httpStatus) (\s@DescribeOrganizationConfigurationResponse' {} a -> s {httpStatus = a} :: DescribeOrganizationConfigurationResponse)++instance+ Prelude.NFData+ DescribeOrganizationConfigurationResponse+ where+ rnf DescribeOrganizationConfigurationResponse' {..} =+ Prelude.rnf autoEnable+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Detective/DisableOrganizationAdminAccount.hs view
@@ -0,0 +1,138 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.DisableOrganizationAdminAccount+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes the Detective administrator account in the current Region.+-- Deletes the organization behavior graph.+--+-- Can only be called by the organization management account.+--+-- Removing the Detective administrator account does not affect the+-- delegated administrator account for Detective in Organizations.+--+-- To remove the delegated administrator account in Organizations, use the+-- Organizations API. Removing the delegated administrator account also+-- removes the Detective administrator account in all Regions, except for+-- Regions where the Detective administrator account is the organization+-- management account.+module Amazonka.Detective.DisableOrganizationAdminAccount+ ( -- * Creating a Request+ DisableOrganizationAdminAccount (..),+ newDisableOrganizationAdminAccount,++ -- * Destructuring the Response+ DisableOrganizationAdminAccountResponse (..),+ newDisableOrganizationAdminAccountResponse,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDisableOrganizationAdminAccount' smart constructor.+data DisableOrganizationAdminAccount = DisableOrganizationAdminAccount'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisableOrganizationAdminAccount' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newDisableOrganizationAdminAccount ::+ DisableOrganizationAdminAccount+newDisableOrganizationAdminAccount =+ DisableOrganizationAdminAccount'++instance+ Core.AWSRequest+ DisableOrganizationAdminAccount+ where+ type+ AWSResponse DisableOrganizationAdminAccount =+ DisableOrganizationAdminAccountResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveNull+ DisableOrganizationAdminAccountResponse'++instance+ Prelude.Hashable+ DisableOrganizationAdminAccount+ where+ hashWithSalt _salt _ =+ _salt `Prelude.hashWithSalt` ()++instance+ Prelude.NFData+ DisableOrganizationAdminAccount+ where+ rnf _ = ()++instance+ Data.ToHeaders+ DisableOrganizationAdminAccount+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DisableOrganizationAdminAccount where+ toJSON = Prelude.const (Data.Object Prelude.mempty)++instance Data.ToPath DisableOrganizationAdminAccount where+ toPath = Prelude.const "/orgs/disableAdminAccount"++instance Data.ToQuery DisableOrganizationAdminAccount where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDisableOrganizationAdminAccountResponse' smart constructor.+data DisableOrganizationAdminAccountResponse = DisableOrganizationAdminAccountResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisableOrganizationAdminAccountResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newDisableOrganizationAdminAccountResponse ::+ DisableOrganizationAdminAccountResponse+newDisableOrganizationAdminAccountResponse =+ DisableOrganizationAdminAccountResponse'++instance+ Prelude.NFData+ DisableOrganizationAdminAccountResponse+ where+ rnf _ = ()
+ gen/Amazonka/Detective/DisassociateMembership.hs view
@@ -0,0 +1,150 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.DisassociateMembership+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes the member account from the specified behavior graph. This+-- operation can only be called by an invited member account that has the+-- @ENABLED@ status.+--+-- @DisassociateMembership@ cannot be called by an organization account in+-- the organization behavior graph. For the organization behavior graph,+-- the Detective administrator account determines which organization+-- accounts to enable or disable as member accounts.+module Amazonka.Detective.DisassociateMembership+ ( -- * Creating a Request+ DisassociateMembership (..),+ newDisassociateMembership,++ -- * Request Lenses+ disassociateMembership_graphArn,++ -- * Destructuring the Response+ DisassociateMembershipResponse (..),+ newDisassociateMembershipResponse,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDisassociateMembership' smart constructor.+data DisassociateMembership = DisassociateMembership'+ { -- | The ARN of the behavior graph to remove the member account from.+ --+ -- The member account\'s member status in the behavior graph must be+ -- @ENABLED@.+ graphArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisassociateMembership' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'graphArn', 'disassociateMembership_graphArn' - The ARN of the behavior graph to remove the member account from.+--+-- The member account\'s member status in the behavior graph must be+-- @ENABLED@.+newDisassociateMembership ::+ -- | 'graphArn'+ Prelude.Text ->+ DisassociateMembership+newDisassociateMembership pGraphArn_ =+ DisassociateMembership' {graphArn = pGraphArn_}++-- | The ARN of the behavior graph to remove the member account from.+--+-- The member account\'s member status in the behavior graph must be+-- @ENABLED@.+disassociateMembership_graphArn :: Lens.Lens' DisassociateMembership Prelude.Text+disassociateMembership_graphArn = Lens.lens (\DisassociateMembership' {graphArn} -> graphArn) (\s@DisassociateMembership' {} a -> s {graphArn = a} :: DisassociateMembership)++instance Core.AWSRequest DisassociateMembership where+ type+ AWSResponse DisassociateMembership =+ DisassociateMembershipResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveNull+ DisassociateMembershipResponse'++instance Prelude.Hashable DisassociateMembership where+ hashWithSalt _salt DisassociateMembership' {..} =+ _salt `Prelude.hashWithSalt` graphArn++instance Prelude.NFData DisassociateMembership where+ rnf DisassociateMembership' {..} =+ Prelude.rnf graphArn++instance Data.ToHeaders DisassociateMembership where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DisassociateMembership where+ toJSON DisassociateMembership' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("GraphArn" Data..= graphArn)]+ )++instance Data.ToPath DisassociateMembership where+ toPath = Prelude.const "/membership/removal"++instance Data.ToQuery DisassociateMembership where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDisassociateMembershipResponse' smart constructor.+data DisassociateMembershipResponse = DisassociateMembershipResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisassociateMembershipResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newDisassociateMembershipResponse ::+ DisassociateMembershipResponse+newDisassociateMembershipResponse =+ DisassociateMembershipResponse'++instance+ Prelude.NFData+ DisassociateMembershipResponse+ where+ rnf _ = ()
+ gen/Amazonka/Detective/EnableOrganizationAdminAccount.hs view
@@ -0,0 +1,172 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.EnableOrganizationAdminAccount+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Designates the Detective administrator account for the organization in+-- the current Region.+--+-- If the account does not have Detective enabled, then enables Detective+-- for that account and creates a new behavior graph.+--+-- Can only be called by the organization management account.+--+-- If the organization has a delegated administrator account in+-- Organizations, then the Detective administrator account must be either+-- the delegated administrator account or the organization management+-- account.+--+-- If the organization does not have a delegated administrator account in+-- Organizations, then you can choose any account in the organization. If+-- you choose an account other than the organization management account,+-- Detective calls Organizations to make that account the delegated+-- administrator account for Detective. The organization management account+-- cannot be the delegated administrator account.+module Amazonka.Detective.EnableOrganizationAdminAccount+ ( -- * Creating a Request+ EnableOrganizationAdminAccount (..),+ newEnableOrganizationAdminAccount,++ -- * Request Lenses+ enableOrganizationAdminAccount_accountId,++ -- * Destructuring the Response+ EnableOrganizationAdminAccountResponse (..),+ newEnableOrganizationAdminAccountResponse,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newEnableOrganizationAdminAccount' smart constructor.+data EnableOrganizationAdminAccount = EnableOrganizationAdminAccount'+ { -- | The Amazon Web Services account identifier of the account to designate+ -- as the Detective administrator account for the organization.+ accountId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EnableOrganizationAdminAccount' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountId', 'enableOrganizationAdminAccount_accountId' - The Amazon Web Services account identifier of the account to designate+-- as the Detective administrator account for the organization.+newEnableOrganizationAdminAccount ::+ -- | 'accountId'+ Prelude.Text ->+ EnableOrganizationAdminAccount+newEnableOrganizationAdminAccount pAccountId_ =+ EnableOrganizationAdminAccount'+ { accountId =+ pAccountId_+ }++-- | The Amazon Web Services account identifier of the account to designate+-- as the Detective administrator account for the organization.+enableOrganizationAdminAccount_accountId :: Lens.Lens' EnableOrganizationAdminAccount Prelude.Text+enableOrganizationAdminAccount_accountId = Lens.lens (\EnableOrganizationAdminAccount' {accountId} -> accountId) (\s@EnableOrganizationAdminAccount' {} a -> s {accountId = a} :: EnableOrganizationAdminAccount)++instance+ Core.AWSRequest+ EnableOrganizationAdminAccount+ where+ type+ AWSResponse EnableOrganizationAdminAccount =+ EnableOrganizationAdminAccountResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveNull+ EnableOrganizationAdminAccountResponse'++instance+ Prelude.Hashable+ EnableOrganizationAdminAccount+ where+ hashWithSalt+ _salt+ EnableOrganizationAdminAccount' {..} =+ _salt `Prelude.hashWithSalt` accountId++instance+ Prelude.NFData+ EnableOrganizationAdminAccount+ where+ rnf EnableOrganizationAdminAccount' {..} =+ Prelude.rnf accountId++instance+ Data.ToHeaders+ EnableOrganizationAdminAccount+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON EnableOrganizationAdminAccount where+ toJSON EnableOrganizationAdminAccount' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("AccountId" Data..= accountId)]+ )++instance Data.ToPath EnableOrganizationAdminAccount where+ toPath = Prelude.const "/orgs/enableAdminAccount"++instance Data.ToQuery EnableOrganizationAdminAccount where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newEnableOrganizationAdminAccountResponse' smart constructor.+data EnableOrganizationAdminAccountResponse = EnableOrganizationAdminAccountResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EnableOrganizationAdminAccountResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newEnableOrganizationAdminAccountResponse ::+ EnableOrganizationAdminAccountResponse+newEnableOrganizationAdminAccountResponse =+ EnableOrganizationAdminAccountResponse'++instance+ Prelude.NFData+ EnableOrganizationAdminAccountResponse+ where+ rnf _ = ()
+ gen/Amazonka/Detective/GetMembers.hs view
@@ -0,0 +1,228 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.GetMembers+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns the membership details for specified member accounts for a+-- behavior graph.+module Amazonka.Detective.GetMembers+ ( -- * Creating a Request+ GetMembers (..),+ newGetMembers,++ -- * Request Lenses+ getMembers_graphArn,+ getMembers_accountIds,++ -- * Destructuring the Response+ GetMembersResponse (..),+ newGetMembersResponse,++ -- * Response Lenses+ getMembersResponse_memberDetails,+ getMembersResponse_unprocessedAccounts,+ getMembersResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetMembers' smart constructor.+data GetMembers = GetMembers'+ { -- | The ARN of the behavior graph for which to request the member details.+ graphArn :: Prelude.Text,+ -- | The list of Amazon Web Services account identifiers for the member+ -- account for which to return member details. You can request details for+ -- up to 50 member accounts at a time.+ --+ -- You cannot use @GetMembers@ to retrieve information about member+ -- accounts that were removed from the behavior graph.+ accountIds :: Prelude.NonEmpty Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetMembers' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'graphArn', 'getMembers_graphArn' - The ARN of the behavior graph for which to request the member details.+--+-- 'accountIds', 'getMembers_accountIds' - The list of Amazon Web Services account identifiers for the member+-- account for which to return member details. You can request details for+-- up to 50 member accounts at a time.+--+-- You cannot use @GetMembers@ to retrieve information about member+-- accounts that were removed from the behavior graph.+newGetMembers ::+ -- | 'graphArn'+ Prelude.Text ->+ -- | 'accountIds'+ Prelude.NonEmpty Prelude.Text ->+ GetMembers+newGetMembers pGraphArn_ pAccountIds_ =+ GetMembers'+ { graphArn = pGraphArn_,+ accountIds = Lens.coerced Lens.# pAccountIds_+ }++-- | The ARN of the behavior graph for which to request the member details.+getMembers_graphArn :: Lens.Lens' GetMembers Prelude.Text+getMembers_graphArn = Lens.lens (\GetMembers' {graphArn} -> graphArn) (\s@GetMembers' {} a -> s {graphArn = a} :: GetMembers)++-- | The list of Amazon Web Services account identifiers for the member+-- account for which to return member details. You can request details for+-- up to 50 member accounts at a time.+--+-- You cannot use @GetMembers@ to retrieve information about member+-- accounts that were removed from the behavior graph.+getMembers_accountIds :: Lens.Lens' GetMembers (Prelude.NonEmpty Prelude.Text)+getMembers_accountIds = Lens.lens (\GetMembers' {accountIds} -> accountIds) (\s@GetMembers' {} a -> s {accountIds = a} :: GetMembers) Prelude.. Lens.coerced++instance Core.AWSRequest GetMembers where+ type AWSResponse GetMembers = GetMembersResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetMembersResponse'+ Prelude.<$> (x Data..?> "MemberDetails" Core..!@ Prelude.mempty)+ Prelude.<*> ( x+ Data..?> "UnprocessedAccounts"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetMembers where+ hashWithSalt _salt GetMembers' {..} =+ _salt+ `Prelude.hashWithSalt` graphArn+ `Prelude.hashWithSalt` accountIds++instance Prelude.NFData GetMembers where+ rnf GetMembers' {..} =+ Prelude.rnf graphArn+ `Prelude.seq` Prelude.rnf accountIds++instance Data.ToHeaders GetMembers where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON GetMembers where+ toJSON GetMembers' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("GraphArn" Data..= graphArn),+ Prelude.Just ("AccountIds" Data..= accountIds)+ ]+ )++instance Data.ToPath GetMembers where+ toPath = Prelude.const "/graph/members/get"++instance Data.ToQuery GetMembers where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetMembersResponse' smart constructor.+data GetMembersResponse = GetMembersResponse'+ { -- | The member account details that Detective is returning in response to+ -- the request.+ memberDetails :: Prelude.Maybe [MemberDetail],+ -- | The requested member accounts for which Detective was unable to return+ -- member details.+ --+ -- For each account, provides the reason why the request could not be+ -- processed.+ unprocessedAccounts :: Prelude.Maybe [UnprocessedAccount],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetMembersResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'memberDetails', 'getMembersResponse_memberDetails' - The member account details that Detective is returning in response to+-- the request.+--+-- 'unprocessedAccounts', 'getMembersResponse_unprocessedAccounts' - The requested member accounts for which Detective was unable to return+-- member details.+--+-- For each account, provides the reason why the request could not be+-- processed.+--+-- 'httpStatus', 'getMembersResponse_httpStatus' - The response's http status code.+newGetMembersResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetMembersResponse+newGetMembersResponse pHttpStatus_ =+ GetMembersResponse'+ { memberDetails =+ Prelude.Nothing,+ unprocessedAccounts = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The member account details that Detective is returning in response to+-- the request.+getMembersResponse_memberDetails :: Lens.Lens' GetMembersResponse (Prelude.Maybe [MemberDetail])+getMembersResponse_memberDetails = Lens.lens (\GetMembersResponse' {memberDetails} -> memberDetails) (\s@GetMembersResponse' {} a -> s {memberDetails = a} :: GetMembersResponse) Prelude.. Lens.mapping Lens.coerced++-- | The requested member accounts for which Detective was unable to return+-- member details.+--+-- For each account, provides the reason why the request could not be+-- processed.+getMembersResponse_unprocessedAccounts :: Lens.Lens' GetMembersResponse (Prelude.Maybe [UnprocessedAccount])+getMembersResponse_unprocessedAccounts = Lens.lens (\GetMembersResponse' {unprocessedAccounts} -> unprocessedAccounts) (\s@GetMembersResponse' {} a -> s {unprocessedAccounts = a} :: GetMembersResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+getMembersResponse_httpStatus :: Lens.Lens' GetMembersResponse Prelude.Int+getMembersResponse_httpStatus = Lens.lens (\GetMembersResponse' {httpStatus} -> httpStatus) (\s@GetMembersResponse' {} a -> s {httpStatus = a} :: GetMembersResponse)++instance Prelude.NFData GetMembersResponse where+ rnf GetMembersResponse' {..} =+ Prelude.rnf memberDetails+ `Prelude.seq` Prelude.rnf unprocessedAccounts+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Detective/Lens.hs view
@@ -0,0 +1,236 @@+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.Lens+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.Detective.Lens+ ( -- * Operations++ -- ** AcceptInvitation+ acceptInvitation_graphArn,++ -- ** BatchGetGraphMemberDatasources+ batchGetGraphMemberDatasources_graphArn,+ batchGetGraphMemberDatasources_accountIds,+ batchGetGraphMemberDatasourcesResponse_memberDatasources,+ batchGetGraphMemberDatasourcesResponse_unprocessedAccounts,+ batchGetGraphMemberDatasourcesResponse_httpStatus,++ -- ** BatchGetMembershipDatasources+ batchGetMembershipDatasources_graphArns,+ batchGetMembershipDatasourcesResponse_membershipDatasources,+ batchGetMembershipDatasourcesResponse_unprocessedGraphs,+ batchGetMembershipDatasourcesResponse_httpStatus,++ -- ** CreateGraph+ createGraph_tags,+ createGraphResponse_graphArn,+ createGraphResponse_httpStatus,++ -- ** CreateMembers+ createMembers_disableEmailNotification,+ createMembers_message,+ createMembers_graphArn,+ createMembers_accounts,+ createMembersResponse_members,+ createMembersResponse_unprocessedAccounts,+ createMembersResponse_httpStatus,++ -- ** DeleteGraph+ deleteGraph_graphArn,++ -- ** DeleteMembers+ deleteMembers_graphArn,+ deleteMembers_accountIds,+ deleteMembersResponse_accountIds,+ deleteMembersResponse_unprocessedAccounts,+ deleteMembersResponse_httpStatus,++ -- ** DescribeOrganizationConfiguration+ describeOrganizationConfiguration_graphArn,+ describeOrganizationConfigurationResponse_autoEnable,+ describeOrganizationConfigurationResponse_httpStatus,++ -- ** DisableOrganizationAdminAccount++ -- ** DisassociateMembership+ disassociateMembership_graphArn,++ -- ** EnableOrganizationAdminAccount+ enableOrganizationAdminAccount_accountId,++ -- ** GetMembers+ getMembers_graphArn,+ getMembers_accountIds,+ getMembersResponse_memberDetails,+ getMembersResponse_unprocessedAccounts,+ getMembersResponse_httpStatus,++ -- ** ListDatasourcePackages+ listDatasourcePackages_maxResults,+ listDatasourcePackages_nextToken,+ listDatasourcePackages_graphArn,+ listDatasourcePackagesResponse_datasourcePackages,+ listDatasourcePackagesResponse_nextToken,+ listDatasourcePackagesResponse_httpStatus,++ -- ** ListGraphs+ listGraphs_maxResults,+ listGraphs_nextToken,+ listGraphsResponse_graphList,+ listGraphsResponse_nextToken,+ listGraphsResponse_httpStatus,++ -- ** ListInvitations+ listInvitations_maxResults,+ listInvitations_nextToken,+ listInvitationsResponse_invitations,+ listInvitationsResponse_nextToken,+ listInvitationsResponse_httpStatus,++ -- ** ListMembers+ listMembers_maxResults,+ listMembers_nextToken,+ listMembers_graphArn,+ listMembersResponse_memberDetails,+ listMembersResponse_nextToken,+ listMembersResponse_httpStatus,++ -- ** ListOrganizationAdminAccounts+ listOrganizationAdminAccounts_maxResults,+ listOrganizationAdminAccounts_nextToken,+ listOrganizationAdminAccountsResponse_administrators,+ listOrganizationAdminAccountsResponse_nextToken,+ listOrganizationAdminAccountsResponse_httpStatus,++ -- ** ListTagsForResource+ listTagsForResource_resourceArn,+ listTagsForResourceResponse_tags,+ listTagsForResourceResponse_httpStatus,++ -- ** RejectInvitation+ rejectInvitation_graphArn,++ -- ** StartMonitoringMember+ startMonitoringMember_graphArn,+ startMonitoringMember_accountId,++ -- ** TagResource+ tagResource_resourceArn,+ tagResource_tags,+ tagResourceResponse_httpStatus,++ -- ** UntagResource+ untagResource_resourceArn,+ untagResource_tagKeys,+ untagResourceResponse_httpStatus,++ -- ** UpdateDatasourcePackages+ updateDatasourcePackages_graphArn,+ updateDatasourcePackages_datasourcePackages,++ -- ** UpdateOrganizationConfiguration+ updateOrganizationConfiguration_autoEnable,+ updateOrganizationConfiguration_graphArn,++ -- * Types++ -- ** Account+ account_accountId,+ account_emailAddress,++ -- ** Administrator+ administrator_accountId,+ administrator_delegationTime,+ administrator_graphArn,++ -- ** DatasourcePackageIngestDetail+ datasourcePackageIngestDetail_datasourcePackageIngestState,+ datasourcePackageIngestDetail_lastIngestStateChange,++ -- ** DatasourcePackageUsageInfo+ datasourcePackageUsageInfo_volumeUsageInBytes,+ datasourcePackageUsageInfo_volumeUsageUpdateTime,++ -- ** Graph+ graph_arn,+ graph_createdTime,++ -- ** MemberDetail+ memberDetail_accountId,+ memberDetail_administratorId,+ memberDetail_datasourcePackageIngestStates,+ memberDetail_disabledReason,+ memberDetail_emailAddress,+ memberDetail_graphArn,+ memberDetail_invitationType,+ memberDetail_invitedTime,+ memberDetail_masterId,+ memberDetail_percentOfGraphUtilization,+ memberDetail_percentOfGraphUtilizationUpdatedTime,+ memberDetail_status,+ memberDetail_updatedTime,+ memberDetail_volumeUsageByDatasourcePackage,+ memberDetail_volumeUsageInBytes,+ memberDetail_volumeUsageUpdatedTime,++ -- ** MembershipDatasources+ membershipDatasources_accountId,+ membershipDatasources_datasourcePackageIngestHistory,+ membershipDatasources_graphArn,++ -- ** TimestampForCollection+ timestampForCollection_timestamp,++ -- ** UnprocessedAccount+ unprocessedAccount_accountId,+ unprocessedAccount_reason,++ -- ** UnprocessedGraph+ unprocessedGraph_graphArn,+ unprocessedGraph_reason,+ )+where++import Amazonka.Detective.AcceptInvitation+import Amazonka.Detective.BatchGetGraphMemberDatasources+import Amazonka.Detective.BatchGetMembershipDatasources+import Amazonka.Detective.CreateGraph+import Amazonka.Detective.CreateMembers+import Amazonka.Detective.DeleteGraph+import Amazonka.Detective.DeleteMembers+import Amazonka.Detective.DescribeOrganizationConfiguration+import Amazonka.Detective.DisableOrganizationAdminAccount+import Amazonka.Detective.DisassociateMembership+import Amazonka.Detective.EnableOrganizationAdminAccount+import Amazonka.Detective.GetMembers+import Amazonka.Detective.ListDatasourcePackages+import Amazonka.Detective.ListGraphs+import Amazonka.Detective.ListInvitations+import Amazonka.Detective.ListMembers+import Amazonka.Detective.ListOrganizationAdminAccounts+import Amazonka.Detective.ListTagsForResource+import Amazonka.Detective.RejectInvitation+import Amazonka.Detective.StartMonitoringMember+import Amazonka.Detective.TagResource+import Amazonka.Detective.Types.Account+import Amazonka.Detective.Types.Administrator+import Amazonka.Detective.Types.DatasourcePackageIngestDetail+import Amazonka.Detective.Types.DatasourcePackageUsageInfo+import Amazonka.Detective.Types.Graph+import Amazonka.Detective.Types.MemberDetail+import Amazonka.Detective.Types.MembershipDatasources+import Amazonka.Detective.Types.TimestampForCollection+import Amazonka.Detective.Types.UnprocessedAccount+import Amazonka.Detective.Types.UnprocessedGraph+import Amazonka.Detective.UntagResource+import Amazonka.Detective.UpdateDatasourcePackages+import Amazonka.Detective.UpdateOrganizationConfiguration
+ gen/Amazonka/Detective/ListDatasourcePackages.hs view
@@ -0,0 +1,226 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.ListDatasourcePackages+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists data source packages in the behavior graph.+module Amazonka.Detective.ListDatasourcePackages+ ( -- * Creating a Request+ ListDatasourcePackages (..),+ newListDatasourcePackages,++ -- * Request Lenses+ listDatasourcePackages_maxResults,+ listDatasourcePackages_nextToken,+ listDatasourcePackages_graphArn,++ -- * Destructuring the Response+ ListDatasourcePackagesResponse (..),+ newListDatasourcePackagesResponse,++ -- * Response Lenses+ listDatasourcePackagesResponse_datasourcePackages,+ listDatasourcePackagesResponse_nextToken,+ listDatasourcePackagesResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListDatasourcePackages' smart constructor.+data ListDatasourcePackages = ListDatasourcePackages'+ { -- | The maximum number of results to return.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | For requests to get the next page of results, the pagination token that+ -- was returned with the previous set of results. The initial request does+ -- not include a pagination token.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The ARN of the behavior graph.+ graphArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListDatasourcePackages' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'listDatasourcePackages_maxResults' - The maximum number of results to return.+--+-- 'nextToken', 'listDatasourcePackages_nextToken' - For requests to get the next page of results, the pagination token that+-- was returned with the previous set of results. The initial request does+-- not include a pagination token.+--+-- 'graphArn', 'listDatasourcePackages_graphArn' - The ARN of the behavior graph.+newListDatasourcePackages ::+ -- | 'graphArn'+ Prelude.Text ->+ ListDatasourcePackages+newListDatasourcePackages pGraphArn_ =+ ListDatasourcePackages'+ { maxResults =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ graphArn = pGraphArn_+ }++-- | The maximum number of results to return.+listDatasourcePackages_maxResults :: Lens.Lens' ListDatasourcePackages (Prelude.Maybe Prelude.Natural)+listDatasourcePackages_maxResults = Lens.lens (\ListDatasourcePackages' {maxResults} -> maxResults) (\s@ListDatasourcePackages' {} a -> s {maxResults = a} :: ListDatasourcePackages)++-- | For requests to get the next page of results, the pagination token that+-- was returned with the previous set of results. The initial request does+-- not include a pagination token.+listDatasourcePackages_nextToken :: Lens.Lens' ListDatasourcePackages (Prelude.Maybe Prelude.Text)+listDatasourcePackages_nextToken = Lens.lens (\ListDatasourcePackages' {nextToken} -> nextToken) (\s@ListDatasourcePackages' {} a -> s {nextToken = a} :: ListDatasourcePackages)++-- | The ARN of the behavior graph.+listDatasourcePackages_graphArn :: Lens.Lens' ListDatasourcePackages Prelude.Text+listDatasourcePackages_graphArn = Lens.lens (\ListDatasourcePackages' {graphArn} -> graphArn) (\s@ListDatasourcePackages' {} a -> s {graphArn = a} :: ListDatasourcePackages)++instance Core.AWSRequest ListDatasourcePackages where+ type+ AWSResponse ListDatasourcePackages =+ ListDatasourcePackagesResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListDatasourcePackagesResponse'+ Prelude.<$> ( x+ Data..?> "DatasourcePackages"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListDatasourcePackages where+ hashWithSalt _salt ListDatasourcePackages' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` graphArn++instance Prelude.NFData ListDatasourcePackages where+ rnf ListDatasourcePackages' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf graphArn++instance Data.ToHeaders ListDatasourcePackages where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListDatasourcePackages where+ toJSON ListDatasourcePackages' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken,+ Prelude.Just ("GraphArn" Data..= graphArn)+ ]+ )++instance Data.ToPath ListDatasourcePackages where+ toPath = Prelude.const "/graph/datasources/list"++instance Data.ToQuery ListDatasourcePackages where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListDatasourcePackagesResponse' smart constructor.+data ListDatasourcePackagesResponse = ListDatasourcePackagesResponse'+ { -- | Details on the data source packages active in the behavior graph.+ datasourcePackages :: Prelude.Maybe (Prelude.HashMap DatasourcePackage DatasourcePackageIngestDetail),+ -- | For requests to get the next page of results, the pagination token that+ -- was returned with the previous set of results. The initial request does+ -- not include a pagination token.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListDatasourcePackagesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'datasourcePackages', 'listDatasourcePackagesResponse_datasourcePackages' - Details on the data source packages active in the behavior graph.+--+-- 'nextToken', 'listDatasourcePackagesResponse_nextToken' - For requests to get the next page of results, the pagination token that+-- was returned with the previous set of results. The initial request does+-- not include a pagination token.+--+-- 'httpStatus', 'listDatasourcePackagesResponse_httpStatus' - The response's http status code.+newListDatasourcePackagesResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListDatasourcePackagesResponse+newListDatasourcePackagesResponse pHttpStatus_ =+ ListDatasourcePackagesResponse'+ { datasourcePackages =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Details on the data source packages active in the behavior graph.+listDatasourcePackagesResponse_datasourcePackages :: Lens.Lens' ListDatasourcePackagesResponse (Prelude.Maybe (Prelude.HashMap DatasourcePackage DatasourcePackageIngestDetail))+listDatasourcePackagesResponse_datasourcePackages = Lens.lens (\ListDatasourcePackagesResponse' {datasourcePackages} -> datasourcePackages) (\s@ListDatasourcePackagesResponse' {} a -> s {datasourcePackages = a} :: ListDatasourcePackagesResponse) Prelude.. Lens.mapping Lens.coerced++-- | For requests to get the next page of results, the pagination token that+-- was returned with the previous set of results. The initial request does+-- not include a pagination token.+listDatasourcePackagesResponse_nextToken :: Lens.Lens' ListDatasourcePackagesResponse (Prelude.Maybe Prelude.Text)+listDatasourcePackagesResponse_nextToken = Lens.lens (\ListDatasourcePackagesResponse' {nextToken} -> nextToken) (\s@ListDatasourcePackagesResponse' {} a -> s {nextToken = a} :: ListDatasourcePackagesResponse)++-- | The response's http status code.+listDatasourcePackagesResponse_httpStatus :: Lens.Lens' ListDatasourcePackagesResponse Prelude.Int+listDatasourcePackagesResponse_httpStatus = Lens.lens (\ListDatasourcePackagesResponse' {httpStatus} -> httpStatus) (\s@ListDatasourcePackagesResponse' {} a -> s {httpStatus = a} :: ListDatasourcePackagesResponse)++instance+ Prelude.NFData+ ListDatasourcePackagesResponse+ where+ rnf ListDatasourcePackagesResponse' {..} =+ Prelude.rnf datasourcePackages+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Detective/ListGraphs.hs view
@@ -0,0 +1,213 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.ListGraphs+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns the list of behavior graphs that the calling account is an+-- administrator account of. This operation can only be called by an+-- administrator account.+--+-- Because an account can currently only be the administrator of one+-- behavior graph within a Region, the results always contain a single+-- behavior graph.+module Amazonka.Detective.ListGraphs+ ( -- * Creating a Request+ ListGraphs (..),+ newListGraphs,++ -- * Request Lenses+ listGraphs_maxResults,+ listGraphs_nextToken,++ -- * Destructuring the Response+ ListGraphsResponse (..),+ newListGraphsResponse,++ -- * Response Lenses+ listGraphsResponse_graphList,+ listGraphsResponse_nextToken,+ listGraphsResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListGraphs' smart constructor.+data ListGraphs = ListGraphs'+ { -- | The maximum number of graphs to return at a time. The total must be less+ -- than the overall limit on the number of results to return, which is+ -- currently 200.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | For requests to get the next page of results, the pagination token that+ -- was returned with the previous set of results. The initial request does+ -- not include a pagination token.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListGraphs' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'listGraphs_maxResults' - The maximum number of graphs to return at a time. The total must be less+-- than the overall limit on the number of results to return, which is+-- currently 200.+--+-- 'nextToken', 'listGraphs_nextToken' - For requests to get the next page of results, the pagination token that+-- was returned with the previous set of results. The initial request does+-- not include a pagination token.+newListGraphs ::+ ListGraphs+newListGraphs =+ ListGraphs'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of graphs to return at a time. The total must be less+-- than the overall limit on the number of results to return, which is+-- currently 200.+listGraphs_maxResults :: Lens.Lens' ListGraphs (Prelude.Maybe Prelude.Natural)+listGraphs_maxResults = Lens.lens (\ListGraphs' {maxResults} -> maxResults) (\s@ListGraphs' {} a -> s {maxResults = a} :: ListGraphs)++-- | For requests to get the next page of results, the pagination token that+-- was returned with the previous set of results. The initial request does+-- not include a pagination token.+listGraphs_nextToken :: Lens.Lens' ListGraphs (Prelude.Maybe Prelude.Text)+listGraphs_nextToken = Lens.lens (\ListGraphs' {nextToken} -> nextToken) (\s@ListGraphs' {} a -> s {nextToken = a} :: ListGraphs)++instance Core.AWSRequest ListGraphs where+ type AWSResponse ListGraphs = ListGraphsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListGraphsResponse'+ Prelude.<$> (x Data..?> "GraphList" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListGraphs where+ hashWithSalt _salt ListGraphs' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListGraphs where+ rnf ListGraphs' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListGraphs where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListGraphs where+ toJSON ListGraphs' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken+ ]+ )++instance Data.ToPath ListGraphs where+ toPath = Prelude.const "/graphs/list"++instance Data.ToQuery ListGraphs where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListGraphsResponse' smart constructor.+data ListGraphsResponse = ListGraphsResponse'+ { -- | A list of behavior graphs that the account is an administrator account+ -- for.+ graphList :: Prelude.Maybe [Graph],+ -- | If there are more behavior graphs remaining in the results, then this is+ -- the pagination token to use to request the next page of behavior graphs.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListGraphsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'graphList', 'listGraphsResponse_graphList' - A list of behavior graphs that the account is an administrator account+-- for.+--+-- 'nextToken', 'listGraphsResponse_nextToken' - If there are more behavior graphs remaining in the results, then this is+-- the pagination token to use to request the next page of behavior graphs.+--+-- 'httpStatus', 'listGraphsResponse_httpStatus' - The response's http status code.+newListGraphsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListGraphsResponse+newListGraphsResponse pHttpStatus_ =+ ListGraphsResponse'+ { graphList = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | A list of behavior graphs that the account is an administrator account+-- for.+listGraphsResponse_graphList :: Lens.Lens' ListGraphsResponse (Prelude.Maybe [Graph])+listGraphsResponse_graphList = Lens.lens (\ListGraphsResponse' {graphList} -> graphList) (\s@ListGraphsResponse' {} a -> s {graphList = a} :: ListGraphsResponse) Prelude.. Lens.mapping Lens.coerced++-- | If there are more behavior graphs remaining in the results, then this is+-- the pagination token to use to request the next page of behavior graphs.+listGraphsResponse_nextToken :: Lens.Lens' ListGraphsResponse (Prelude.Maybe Prelude.Text)+listGraphsResponse_nextToken = Lens.lens (\ListGraphsResponse' {nextToken} -> nextToken) (\s@ListGraphsResponse' {} a -> s {nextToken = a} :: ListGraphsResponse)++-- | The response's http status code.+listGraphsResponse_httpStatus :: Lens.Lens' ListGraphsResponse Prelude.Int+listGraphsResponse_httpStatus = Lens.lens (\ListGraphsResponse' {httpStatus} -> httpStatus) (\s@ListGraphsResponse' {} a -> s {httpStatus = a} :: ListGraphsResponse)++instance Prelude.NFData ListGraphsResponse where+ rnf ListGraphsResponse' {..} =+ Prelude.rnf graphList+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Detective/ListInvitations.hs view
@@ -0,0 +1,219 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.ListInvitations+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves the list of open and accepted behavior graph invitations for+-- the member account. This operation can only be called by an invited+-- member account.+--+-- Open invitations are invitations that the member account has not+-- responded to.+--+-- The results do not include behavior graphs for which the member account+-- declined the invitation. The results also do not include behavior graphs+-- that the member account resigned from or was removed from.+module Amazonka.Detective.ListInvitations+ ( -- * Creating a Request+ ListInvitations (..),+ newListInvitations,++ -- * Request Lenses+ listInvitations_maxResults,+ listInvitations_nextToken,++ -- * Destructuring the Response+ ListInvitationsResponse (..),+ newListInvitationsResponse,++ -- * Response Lenses+ listInvitationsResponse_invitations,+ listInvitationsResponse_nextToken,+ listInvitationsResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListInvitations' smart constructor.+data ListInvitations = ListInvitations'+ { -- | The maximum number of behavior graph invitations to return in the+ -- response. The total must be less than the overall limit on the number of+ -- results to return, which is currently 200.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | For requests to retrieve the next page of results, the pagination token+ -- that was returned with the previous page of results. The initial request+ -- does not include a pagination token.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListInvitations' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'listInvitations_maxResults' - The maximum number of behavior graph invitations to return in the+-- response. The total must be less than the overall limit on the number of+-- results to return, which is currently 200.+--+-- 'nextToken', 'listInvitations_nextToken' - For requests to retrieve the next page of results, the pagination token+-- that was returned with the previous page of results. The initial request+-- does not include a pagination token.+newListInvitations ::+ ListInvitations+newListInvitations =+ ListInvitations'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of behavior graph invitations to return in the+-- response. The total must be less than the overall limit on the number of+-- results to return, which is currently 200.+listInvitations_maxResults :: Lens.Lens' ListInvitations (Prelude.Maybe Prelude.Natural)+listInvitations_maxResults = Lens.lens (\ListInvitations' {maxResults} -> maxResults) (\s@ListInvitations' {} a -> s {maxResults = a} :: ListInvitations)++-- | For requests to retrieve the next page of results, the pagination token+-- that was returned with the previous page of results. The initial request+-- does not include a pagination token.+listInvitations_nextToken :: Lens.Lens' ListInvitations (Prelude.Maybe Prelude.Text)+listInvitations_nextToken = Lens.lens (\ListInvitations' {nextToken} -> nextToken) (\s@ListInvitations' {} a -> s {nextToken = a} :: ListInvitations)++instance Core.AWSRequest ListInvitations where+ type+ AWSResponse ListInvitations =+ ListInvitationsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListInvitationsResponse'+ Prelude.<$> (x Data..?> "Invitations" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListInvitations where+ hashWithSalt _salt ListInvitations' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListInvitations where+ rnf ListInvitations' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListInvitations where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListInvitations where+ toJSON ListInvitations' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken+ ]+ )++instance Data.ToPath ListInvitations where+ toPath = Prelude.const "/invitations/list"++instance Data.ToQuery ListInvitations where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListInvitationsResponse' smart constructor.+data ListInvitationsResponse = ListInvitationsResponse'+ { -- | The list of behavior graphs for which the member account has open or+ -- accepted invitations.+ invitations :: Prelude.Maybe [MemberDetail],+ -- | If there are more behavior graphs remaining in the results, then this is+ -- the pagination token to use to request the next page of behavior graphs.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListInvitationsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'invitations', 'listInvitationsResponse_invitations' - The list of behavior graphs for which the member account has open or+-- accepted invitations.+--+-- 'nextToken', 'listInvitationsResponse_nextToken' - If there are more behavior graphs remaining in the results, then this is+-- the pagination token to use to request the next page of behavior graphs.+--+-- 'httpStatus', 'listInvitationsResponse_httpStatus' - The response's http status code.+newListInvitationsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListInvitationsResponse+newListInvitationsResponse pHttpStatus_ =+ ListInvitationsResponse'+ { invitations =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The list of behavior graphs for which the member account has open or+-- accepted invitations.+listInvitationsResponse_invitations :: Lens.Lens' ListInvitationsResponse (Prelude.Maybe [MemberDetail])+listInvitationsResponse_invitations = Lens.lens (\ListInvitationsResponse' {invitations} -> invitations) (\s@ListInvitationsResponse' {} a -> s {invitations = a} :: ListInvitationsResponse) Prelude.. Lens.mapping Lens.coerced++-- | If there are more behavior graphs remaining in the results, then this is+-- the pagination token to use to request the next page of behavior graphs.+listInvitationsResponse_nextToken :: Lens.Lens' ListInvitationsResponse (Prelude.Maybe Prelude.Text)+listInvitationsResponse_nextToken = Lens.lens (\ListInvitationsResponse' {nextToken} -> nextToken) (\s@ListInvitationsResponse' {} a -> s {nextToken = a} :: ListInvitationsResponse)++-- | The response's http status code.+listInvitationsResponse_httpStatus :: Lens.Lens' ListInvitationsResponse Prelude.Int+listInvitationsResponse_httpStatus = Lens.lens (\ListInvitationsResponse' {httpStatus} -> httpStatus) (\s@ListInvitationsResponse' {} a -> s {httpStatus = a} :: ListInvitationsResponse)++instance Prelude.NFData ListInvitationsResponse where+ rnf ListInvitationsResponse' {..} =+ Prelude.rnf invitations+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Detective/ListMembers.hs view
@@ -0,0 +1,257 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.ListMembers+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves the list of member accounts for a behavior graph.+--+-- For invited accounts, the results do not include member accounts that+-- were removed from the behavior graph.+--+-- For the organization behavior graph, the results do not include+-- organization accounts that the Detective administrator account has not+-- enabled as member accounts.+module Amazonka.Detective.ListMembers+ ( -- * Creating a Request+ ListMembers (..),+ newListMembers,++ -- * Request Lenses+ listMembers_maxResults,+ listMembers_nextToken,+ listMembers_graphArn,++ -- * Destructuring the Response+ ListMembersResponse (..),+ newListMembersResponse,++ -- * Response Lenses+ listMembersResponse_memberDetails,+ listMembersResponse_nextToken,+ listMembersResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListMembers' smart constructor.+data ListMembers = ListMembers'+ { -- | The maximum number of member accounts to include in the response. The+ -- total must be less than the overall limit on the number of results to+ -- return, which is currently 200.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | For requests to retrieve the next page of member account results, the+ -- pagination token that was returned with the previous page of results.+ -- The initial request does not include a pagination token.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The ARN of the behavior graph for which to retrieve the list of member+ -- accounts.+ graphArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListMembers' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'listMembers_maxResults' - The maximum number of member accounts to include in the response. The+-- total must be less than the overall limit on the number of results to+-- return, which is currently 200.+--+-- 'nextToken', 'listMembers_nextToken' - For requests to retrieve the next page of member account results, the+-- pagination token that was returned with the previous page of results.+-- The initial request does not include a pagination token.+--+-- 'graphArn', 'listMembers_graphArn' - The ARN of the behavior graph for which to retrieve the list of member+-- accounts.+newListMembers ::+ -- | 'graphArn'+ Prelude.Text ->+ ListMembers+newListMembers pGraphArn_ =+ ListMembers'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ graphArn = pGraphArn_+ }++-- | The maximum number of member accounts to include in the response. The+-- total must be less than the overall limit on the number of results to+-- return, which is currently 200.+listMembers_maxResults :: Lens.Lens' ListMembers (Prelude.Maybe Prelude.Natural)+listMembers_maxResults = Lens.lens (\ListMembers' {maxResults} -> maxResults) (\s@ListMembers' {} a -> s {maxResults = a} :: ListMembers)++-- | For requests to retrieve the next page of member account results, the+-- pagination token that was returned with the previous page of results.+-- The initial request does not include a pagination token.+listMembers_nextToken :: Lens.Lens' ListMembers (Prelude.Maybe Prelude.Text)+listMembers_nextToken = Lens.lens (\ListMembers' {nextToken} -> nextToken) (\s@ListMembers' {} a -> s {nextToken = a} :: ListMembers)++-- | The ARN of the behavior graph for which to retrieve the list of member+-- accounts.+listMembers_graphArn :: Lens.Lens' ListMembers Prelude.Text+listMembers_graphArn = Lens.lens (\ListMembers' {graphArn} -> graphArn) (\s@ListMembers' {} a -> s {graphArn = a} :: ListMembers)++instance Core.AWSRequest ListMembers where+ type AWSResponse ListMembers = ListMembersResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListMembersResponse'+ Prelude.<$> (x Data..?> "MemberDetails" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListMembers where+ hashWithSalt _salt ListMembers' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` graphArn++instance Prelude.NFData ListMembers where+ rnf ListMembers' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf graphArn++instance Data.ToHeaders ListMembers where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListMembers where+ toJSON ListMembers' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken,+ Prelude.Just ("GraphArn" Data..= graphArn)+ ]+ )++instance Data.ToPath ListMembers where+ toPath = Prelude.const "/graph/members/list"++instance Data.ToQuery ListMembers where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListMembersResponse' smart constructor.+data ListMembersResponse = ListMembersResponse'+ { -- | The list of member accounts in the behavior graph.+ --+ -- For invited accounts, the results include member accounts that did not+ -- pass verification and member accounts that have not yet accepted the+ -- invitation to the behavior graph. The results do not include member+ -- accounts that were removed from the behavior graph.+ --+ -- For the organization behavior graph, the results do not include+ -- organization accounts that the Detective administrator account has not+ -- enabled as member accounts.+ memberDetails :: Prelude.Maybe [MemberDetail],+ -- | If there are more member accounts remaining in the results, then use+ -- this pagination token to request the next page of member accounts.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListMembersResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'memberDetails', 'listMembersResponse_memberDetails' - The list of member accounts in the behavior graph.+--+-- For invited accounts, the results include member accounts that did not+-- pass verification and member accounts that have not yet accepted the+-- invitation to the behavior graph. The results do not include member+-- accounts that were removed from the behavior graph.+--+-- For the organization behavior graph, the results do not include+-- organization accounts that the Detective administrator account has not+-- enabled as member accounts.+--+-- 'nextToken', 'listMembersResponse_nextToken' - If there are more member accounts remaining in the results, then use+-- this pagination token to request the next page of member accounts.+--+-- 'httpStatus', 'listMembersResponse_httpStatus' - The response's http status code.+newListMembersResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListMembersResponse+newListMembersResponse pHttpStatus_ =+ ListMembersResponse'+ { memberDetails =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The list of member accounts in the behavior graph.+--+-- For invited accounts, the results include member accounts that did not+-- pass verification and member accounts that have not yet accepted the+-- invitation to the behavior graph. The results do not include member+-- accounts that were removed from the behavior graph.+--+-- For the organization behavior graph, the results do not include+-- organization accounts that the Detective administrator account has not+-- enabled as member accounts.+listMembersResponse_memberDetails :: Lens.Lens' ListMembersResponse (Prelude.Maybe [MemberDetail])+listMembersResponse_memberDetails = Lens.lens (\ListMembersResponse' {memberDetails} -> memberDetails) (\s@ListMembersResponse' {} a -> s {memberDetails = a} :: ListMembersResponse) Prelude.. Lens.mapping Lens.coerced++-- | If there are more member accounts remaining in the results, then use+-- this pagination token to request the next page of member accounts.+listMembersResponse_nextToken :: Lens.Lens' ListMembersResponse (Prelude.Maybe Prelude.Text)+listMembersResponse_nextToken = Lens.lens (\ListMembersResponse' {nextToken} -> nextToken) (\s@ListMembersResponse' {} a -> s {nextToken = a} :: ListMembersResponse)++-- | The response's http status code.+listMembersResponse_httpStatus :: Lens.Lens' ListMembersResponse Prelude.Int+listMembersResponse_httpStatus = Lens.lens (\ListMembersResponse' {httpStatus} -> httpStatus) (\s@ListMembersResponse' {} a -> s {httpStatus = a} :: ListMembersResponse)++instance Prelude.NFData ListMembersResponse where+ rnf ListMembersResponse' {..} =+ Prelude.rnf memberDetails+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Detective/ListOrganizationAdminAccounts.hs view
@@ -0,0 +1,212 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.ListOrganizationAdminAccounts+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns information about the Detective administrator account for an+-- organization. Can only be called by the organization management account.+module Amazonka.Detective.ListOrganizationAdminAccounts+ ( -- * Creating a Request+ ListOrganizationAdminAccounts (..),+ newListOrganizationAdminAccounts,++ -- * Request Lenses+ listOrganizationAdminAccounts_maxResults,+ listOrganizationAdminAccounts_nextToken,++ -- * Destructuring the Response+ ListOrganizationAdminAccountsResponse (..),+ newListOrganizationAdminAccountsResponse,++ -- * Response Lenses+ listOrganizationAdminAccountsResponse_administrators,+ listOrganizationAdminAccountsResponse_nextToken,+ listOrganizationAdminAccountsResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListOrganizationAdminAccounts' smart constructor.+data ListOrganizationAdminAccounts = ListOrganizationAdminAccounts'+ { -- | The maximum number of results to return.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | For requests to get the next page of results, the pagination token that+ -- was returned with the previous set of results. The initial request does+ -- not include a pagination token.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListOrganizationAdminAccounts' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'maxResults', 'listOrganizationAdminAccounts_maxResults' - The maximum number of results to return.+--+-- 'nextToken', 'listOrganizationAdminAccounts_nextToken' - For requests to get the next page of results, the pagination token that+-- was returned with the previous set of results. The initial request does+-- not include a pagination token.+newListOrganizationAdminAccounts ::+ ListOrganizationAdminAccounts+newListOrganizationAdminAccounts =+ ListOrganizationAdminAccounts'+ { maxResults =+ Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of results to return.+listOrganizationAdminAccounts_maxResults :: Lens.Lens' ListOrganizationAdminAccounts (Prelude.Maybe Prelude.Natural)+listOrganizationAdminAccounts_maxResults = Lens.lens (\ListOrganizationAdminAccounts' {maxResults} -> maxResults) (\s@ListOrganizationAdminAccounts' {} a -> s {maxResults = a} :: ListOrganizationAdminAccounts)++-- | For requests to get the next page of results, the pagination token that+-- was returned with the previous set of results. The initial request does+-- not include a pagination token.+listOrganizationAdminAccounts_nextToken :: Lens.Lens' ListOrganizationAdminAccounts (Prelude.Maybe Prelude.Text)+listOrganizationAdminAccounts_nextToken = Lens.lens (\ListOrganizationAdminAccounts' {nextToken} -> nextToken) (\s@ListOrganizationAdminAccounts' {} a -> s {nextToken = a} :: ListOrganizationAdminAccounts)++instance+ Core.AWSRequest+ ListOrganizationAdminAccounts+ where+ type+ AWSResponse ListOrganizationAdminAccounts =+ ListOrganizationAdminAccountsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListOrganizationAdminAccountsResponse'+ Prelude.<$> (x Data..?> "Administrators" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ ListOrganizationAdminAccounts+ where+ hashWithSalt _salt ListOrganizationAdminAccounts' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListOrganizationAdminAccounts where+ rnf ListOrganizationAdminAccounts' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListOrganizationAdminAccounts where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListOrganizationAdminAccounts where+ toJSON ListOrganizationAdminAccounts' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken+ ]+ )++instance Data.ToPath ListOrganizationAdminAccounts where+ toPath = Prelude.const "/orgs/adminAccountslist"++instance Data.ToQuery ListOrganizationAdminAccounts where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListOrganizationAdminAccountsResponse' smart constructor.+data ListOrganizationAdminAccountsResponse = ListOrganizationAdminAccountsResponse'+ { -- | The list of Detective administrator accounts.+ administrators :: Prelude.Maybe [Administrator],+ -- | If there are more accounts remaining in the results, then this is the+ -- pagination token to use to request the next page of accounts.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListOrganizationAdminAccountsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'administrators', 'listOrganizationAdminAccountsResponse_administrators' - The list of Detective administrator accounts.+--+-- 'nextToken', 'listOrganizationAdminAccountsResponse_nextToken' - If there are more accounts remaining in the results, then this is the+-- pagination token to use to request the next page of accounts.+--+-- 'httpStatus', 'listOrganizationAdminAccountsResponse_httpStatus' - The response's http status code.+newListOrganizationAdminAccountsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListOrganizationAdminAccountsResponse+newListOrganizationAdminAccountsResponse pHttpStatus_ =+ ListOrganizationAdminAccountsResponse'+ { administrators =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The list of Detective administrator accounts.+listOrganizationAdminAccountsResponse_administrators :: Lens.Lens' ListOrganizationAdminAccountsResponse (Prelude.Maybe [Administrator])+listOrganizationAdminAccountsResponse_administrators = Lens.lens (\ListOrganizationAdminAccountsResponse' {administrators} -> administrators) (\s@ListOrganizationAdminAccountsResponse' {} a -> s {administrators = a} :: ListOrganizationAdminAccountsResponse) Prelude.. Lens.mapping Lens.coerced++-- | If there are more accounts remaining in the results, then this is the+-- pagination token to use to request the next page of accounts.+listOrganizationAdminAccountsResponse_nextToken :: Lens.Lens' ListOrganizationAdminAccountsResponse (Prelude.Maybe Prelude.Text)+listOrganizationAdminAccountsResponse_nextToken = Lens.lens (\ListOrganizationAdminAccountsResponse' {nextToken} -> nextToken) (\s@ListOrganizationAdminAccountsResponse' {} a -> s {nextToken = a} :: ListOrganizationAdminAccountsResponse)++-- | The response's http status code.+listOrganizationAdminAccountsResponse_httpStatus :: Lens.Lens' ListOrganizationAdminAccountsResponse Prelude.Int+listOrganizationAdminAccountsResponse_httpStatus = Lens.lens (\ListOrganizationAdminAccountsResponse' {httpStatus} -> httpStatus) (\s@ListOrganizationAdminAccountsResponse' {} a -> s {httpStatus = a} :: ListOrganizationAdminAccountsResponse)++instance+ Prelude.NFData+ ListOrganizationAdminAccountsResponse+ where+ rnf ListOrganizationAdminAccountsResponse' {..} =+ Prelude.rnf administrators+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Detective/ListTagsForResource.hs view
@@ -0,0 +1,162 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.ListTagsForResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns the tag values that are assigned to a behavior graph.+module Amazonka.Detective.ListTagsForResource+ ( -- * Creating a Request+ ListTagsForResource (..),+ newListTagsForResource,++ -- * Request Lenses+ listTagsForResource_resourceArn,++ -- * Destructuring the Response+ ListTagsForResourceResponse (..),+ newListTagsForResourceResponse,++ -- * Response Lenses+ listTagsForResourceResponse_tags,+ listTagsForResourceResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListTagsForResource' smart constructor.+data ListTagsForResource = ListTagsForResource'+ { -- | The ARN of the behavior graph for which to retrieve the tag values.+ resourceArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsForResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'listTagsForResource_resourceArn' - The ARN of the behavior graph for which to retrieve the tag values.+newListTagsForResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ ListTagsForResource+newListTagsForResource pResourceArn_ =+ ListTagsForResource' {resourceArn = pResourceArn_}++-- | The ARN of the behavior graph for which to retrieve the tag values.+listTagsForResource_resourceArn :: Lens.Lens' ListTagsForResource Prelude.Text+listTagsForResource_resourceArn = Lens.lens (\ListTagsForResource' {resourceArn} -> resourceArn) (\s@ListTagsForResource' {} a -> s {resourceArn = a} :: ListTagsForResource)++instance Core.AWSRequest ListTagsForResource where+ type+ AWSResponse ListTagsForResource =+ ListTagsForResourceResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListTagsForResourceResponse'+ Prelude.<$> (x Data..?> "Tags" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListTagsForResource where+ hashWithSalt _salt ListTagsForResource' {..} =+ _salt `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData ListTagsForResource where+ rnf ListTagsForResource' {..} =+ Prelude.rnf resourceArn++instance Data.ToHeaders ListTagsForResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListTagsForResource where+ toPath ListTagsForResource' {..} =+ Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery ListTagsForResource where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListTagsForResourceResponse' smart constructor.+data ListTagsForResourceResponse = ListTagsForResourceResponse'+ { -- | The tag values that are assigned to the behavior graph. The request+ -- returns up to 50 tag values.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsForResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'tags', 'listTagsForResourceResponse_tags' - The tag values that are assigned to the behavior graph. The request+-- returns up to 50 tag values.+--+-- 'httpStatus', 'listTagsForResourceResponse_httpStatus' - The response's http status code.+newListTagsForResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListTagsForResourceResponse+newListTagsForResourceResponse pHttpStatus_ =+ ListTagsForResourceResponse'+ { tags =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The tag values that are assigned to the behavior graph. The request+-- returns up to 50 tag values.+listTagsForResourceResponse_tags :: Lens.Lens' ListTagsForResourceResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+listTagsForResourceResponse_tags = Lens.lens (\ListTagsForResourceResponse' {tags} -> tags) (\s@ListTagsForResourceResponse' {} a -> s {tags = a} :: ListTagsForResourceResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listTagsForResourceResponse_httpStatus :: Lens.Lens' ListTagsForResourceResponse Prelude.Int+listTagsForResourceResponse_httpStatus = Lens.lens (\ListTagsForResourceResponse' {httpStatus} -> httpStatus) (\s@ListTagsForResourceResponse' {} a -> s {httpStatus = a} :: ListTagsForResourceResponse)++instance Prelude.NFData ListTagsForResourceResponse where+ rnf ListTagsForResourceResponse' {..} =+ Prelude.rnf tags+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Detective/RejectInvitation.hs view
@@ -0,0 +1,144 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.RejectInvitation+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Rejects an invitation to contribute the account data to a behavior+-- graph. This operation must be called by an invited member account that+-- has the @INVITED@ status.+--+-- @RejectInvitation@ cannot be called by an organization account in the+-- organization behavior graph. In the organization behavior graph,+-- organization accounts do not receive an invitation.+module Amazonka.Detective.RejectInvitation+ ( -- * Creating a Request+ RejectInvitation (..),+ newRejectInvitation,++ -- * Request Lenses+ rejectInvitation_graphArn,++ -- * Destructuring the Response+ RejectInvitationResponse (..),+ newRejectInvitationResponse,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newRejectInvitation' smart constructor.+data RejectInvitation = RejectInvitation'+ { -- | The ARN of the behavior graph to reject the invitation to.+ --+ -- The member account\'s current member status in the behavior graph must+ -- be @INVITED@.+ graphArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RejectInvitation' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'graphArn', 'rejectInvitation_graphArn' - The ARN of the behavior graph to reject the invitation to.+--+-- The member account\'s current member status in the behavior graph must+-- be @INVITED@.+newRejectInvitation ::+ -- | 'graphArn'+ Prelude.Text ->+ RejectInvitation+newRejectInvitation pGraphArn_ =+ RejectInvitation' {graphArn = pGraphArn_}++-- | The ARN of the behavior graph to reject the invitation to.+--+-- The member account\'s current member status in the behavior graph must+-- be @INVITED@.+rejectInvitation_graphArn :: Lens.Lens' RejectInvitation Prelude.Text+rejectInvitation_graphArn = Lens.lens (\RejectInvitation' {graphArn} -> graphArn) (\s@RejectInvitation' {} a -> s {graphArn = a} :: RejectInvitation)++instance Core.AWSRequest RejectInvitation where+ type+ AWSResponse RejectInvitation =+ RejectInvitationResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveNull RejectInvitationResponse'++instance Prelude.Hashable RejectInvitation where+ hashWithSalt _salt RejectInvitation' {..} =+ _salt `Prelude.hashWithSalt` graphArn++instance Prelude.NFData RejectInvitation where+ rnf RejectInvitation' {..} = Prelude.rnf graphArn++instance Data.ToHeaders RejectInvitation where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON RejectInvitation where+ toJSON RejectInvitation' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("GraphArn" Data..= graphArn)]+ )++instance Data.ToPath RejectInvitation where+ toPath = Prelude.const "/invitation/removal"++instance Data.ToQuery RejectInvitation where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newRejectInvitationResponse' smart constructor.+data RejectInvitationResponse = RejectInvitationResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RejectInvitationResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newRejectInvitationResponse ::+ RejectInvitationResponse+newRejectInvitationResponse =+ RejectInvitationResponse'++instance Prelude.NFData RejectInvitationResponse where+ rnf _ = ()
+ gen/Amazonka/Detective/StartMonitoringMember.hs view
@@ -0,0 +1,168 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.StartMonitoringMember+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Sends a request to enable data ingest for a member account that has a+-- status of @ACCEPTED_BUT_DISABLED@.+--+-- For valid member accounts, the status is updated as follows.+--+-- - If Detective enabled the member account, then the new status is+-- @ENABLED@.+--+-- - If Detective cannot enable the member account, the status remains+-- @ACCEPTED_BUT_DISABLED@.+module Amazonka.Detective.StartMonitoringMember+ ( -- * Creating a Request+ StartMonitoringMember (..),+ newStartMonitoringMember,++ -- * Request Lenses+ startMonitoringMember_graphArn,+ startMonitoringMember_accountId,++ -- * Destructuring the Response+ StartMonitoringMemberResponse (..),+ newStartMonitoringMemberResponse,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newStartMonitoringMember' smart constructor.+data StartMonitoringMember = StartMonitoringMember'+ { -- | The ARN of the behavior graph.+ graphArn :: Prelude.Text,+ -- | The account ID of the member account to try to enable.+ --+ -- The account must be an invited member account with a status of+ -- @ACCEPTED_BUT_DISABLED@.+ accountId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'StartMonitoringMember' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'graphArn', 'startMonitoringMember_graphArn' - The ARN of the behavior graph.+--+-- 'accountId', 'startMonitoringMember_accountId' - The account ID of the member account to try to enable.+--+-- The account must be an invited member account with a status of+-- @ACCEPTED_BUT_DISABLED@.+newStartMonitoringMember ::+ -- | 'graphArn'+ Prelude.Text ->+ -- | 'accountId'+ Prelude.Text ->+ StartMonitoringMember+newStartMonitoringMember pGraphArn_ pAccountId_ =+ StartMonitoringMember'+ { graphArn = pGraphArn_,+ accountId = pAccountId_+ }++-- | The ARN of the behavior graph.+startMonitoringMember_graphArn :: Lens.Lens' StartMonitoringMember Prelude.Text+startMonitoringMember_graphArn = Lens.lens (\StartMonitoringMember' {graphArn} -> graphArn) (\s@StartMonitoringMember' {} a -> s {graphArn = a} :: StartMonitoringMember)++-- | The account ID of the member account to try to enable.+--+-- The account must be an invited member account with a status of+-- @ACCEPTED_BUT_DISABLED@.+startMonitoringMember_accountId :: Lens.Lens' StartMonitoringMember Prelude.Text+startMonitoringMember_accountId = Lens.lens (\StartMonitoringMember' {accountId} -> accountId) (\s@StartMonitoringMember' {} a -> s {accountId = a} :: StartMonitoringMember)++instance Core.AWSRequest StartMonitoringMember where+ type+ AWSResponse StartMonitoringMember =+ StartMonitoringMemberResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveNull StartMonitoringMemberResponse'++instance Prelude.Hashable StartMonitoringMember where+ hashWithSalt _salt StartMonitoringMember' {..} =+ _salt+ `Prelude.hashWithSalt` graphArn+ `Prelude.hashWithSalt` accountId++instance Prelude.NFData StartMonitoringMember where+ rnf StartMonitoringMember' {..} =+ Prelude.rnf graphArn+ `Prelude.seq` Prelude.rnf accountId++instance Data.ToHeaders StartMonitoringMember where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON StartMonitoringMember where+ toJSON StartMonitoringMember' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("GraphArn" Data..= graphArn),+ Prelude.Just ("AccountId" Data..= accountId)+ ]+ )++instance Data.ToPath StartMonitoringMember where+ toPath =+ Prelude.const "/graph/member/monitoringstate"++instance Data.ToQuery StartMonitoringMember where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newStartMonitoringMemberResponse' smart constructor.+data StartMonitoringMemberResponse = StartMonitoringMemberResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'StartMonitoringMemberResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newStartMonitoringMemberResponse ::+ StartMonitoringMemberResponse+newStartMonitoringMemberResponse =+ StartMonitoringMemberResponse'++instance Prelude.NFData StartMonitoringMemberResponse where+ rnf _ = ()
+ gen/Amazonka/Detective/TagResource.hs view
@@ -0,0 +1,172 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.TagResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Applies tag values to a behavior graph.+module Amazonka.Detective.TagResource+ ( -- * Creating a Request+ TagResource (..),+ newTagResource,++ -- * Request Lenses+ tagResource_resourceArn,+ tagResource_tags,++ -- * Destructuring the Response+ TagResourceResponse (..),+ newTagResourceResponse,++ -- * Response Lenses+ tagResourceResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newTagResource' smart constructor.+data TagResource = TagResource'+ { -- | The ARN of the behavior graph to assign the tags to.+ resourceArn :: Prelude.Text,+ -- | The tags to assign to the behavior graph. You can add up to 50 tags. For+ -- each tag, you provide the tag key and the tag value. Each tag key can+ -- contain up to 128 characters. Each tag value can contain up to 256+ -- characters.+ tags :: Prelude.HashMap Prelude.Text Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'tagResource_resourceArn' - The ARN of the behavior graph to assign the tags to.+--+-- 'tags', 'tagResource_tags' - The tags to assign to the behavior graph. You can add up to 50 tags. For+-- each tag, you provide the tag key and the tag value. Each tag key can+-- contain up to 128 characters. Each tag value can contain up to 256+-- characters.+newTagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ TagResource+newTagResource pResourceArn_ =+ TagResource'+ { resourceArn = pResourceArn_,+ tags = Prelude.mempty+ }++-- | The ARN of the behavior graph to assign the tags to.+tagResource_resourceArn :: Lens.Lens' TagResource Prelude.Text+tagResource_resourceArn = Lens.lens (\TagResource' {resourceArn} -> resourceArn) (\s@TagResource' {} a -> s {resourceArn = a} :: TagResource)++-- | The tags to assign to the behavior graph. You can add up to 50 tags. For+-- each tag, you provide the tag key and the tag value. Each tag key can+-- contain up to 128 characters. Each tag value can contain up to 256+-- characters.+tagResource_tags :: Lens.Lens' TagResource (Prelude.HashMap Prelude.Text Prelude.Text)+tagResource_tags = Lens.lens (\TagResource' {tags} -> tags) (\s@TagResource' {} a -> s {tags = a} :: TagResource) Prelude.. Lens.coerced++instance Core.AWSRequest TagResource where+ type AWSResponse TagResource = TagResourceResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ TagResourceResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable TagResource where+ hashWithSalt _salt TagResource' {..} =+ _salt+ `Prelude.hashWithSalt` resourceArn+ `Prelude.hashWithSalt` tags++instance Prelude.NFData TagResource where+ rnf TagResource' {..} =+ Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf tags++instance Data.ToHeaders TagResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON TagResource where+ toJSON TagResource' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("Tags" Data..= tags)]+ )++instance Data.ToPath TagResource where+ toPath TagResource' {..} =+ Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery TagResource where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newTagResourceResponse' smart constructor.+data TagResourceResponse = TagResourceResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'tagResourceResponse_httpStatus' - The response's http status code.+newTagResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ TagResourceResponse+newTagResourceResponse pHttpStatus_ =+ TagResourceResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+tagResourceResponse_httpStatus :: Lens.Lens' TagResourceResponse Prelude.Int+tagResourceResponse_httpStatus = Lens.lens (\TagResourceResponse' {httpStatus} -> httpStatus) (\s@TagResourceResponse' {} a -> s {httpStatus = a} :: TagResourceResponse)++instance Prelude.NFData TagResourceResponse where+ rnf TagResourceResponse' {..} = Prelude.rnf httpStatus
+ gen/Amazonka/Detective/Types.hs view
@@ -0,0 +1,278 @@+{-# LANGUAGE DisambiguateRecordFields #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.Types+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.Detective.Types+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ _AccessDeniedException,+ _ConflictException,+ _InternalServerException,+ _ResourceNotFoundException,+ _ServiceQuotaExceededException,+ _TooManyRequestsException,+ _ValidationException,++ -- * DatasourcePackage+ DatasourcePackage (..),++ -- * DatasourcePackageIngestState+ DatasourcePackageIngestState (..),++ -- * InvitationType+ InvitationType (..),++ -- * MemberDisabledReason+ MemberDisabledReason (..),++ -- * MemberStatus+ MemberStatus (..),++ -- * Account+ Account (..),+ newAccount,+ account_accountId,+ account_emailAddress,++ -- * Administrator+ Administrator (..),+ newAdministrator,+ administrator_accountId,+ administrator_delegationTime,+ administrator_graphArn,++ -- * DatasourcePackageIngestDetail+ DatasourcePackageIngestDetail (..),+ newDatasourcePackageIngestDetail,+ datasourcePackageIngestDetail_datasourcePackageIngestState,+ datasourcePackageIngestDetail_lastIngestStateChange,++ -- * DatasourcePackageUsageInfo+ DatasourcePackageUsageInfo (..),+ newDatasourcePackageUsageInfo,+ datasourcePackageUsageInfo_volumeUsageInBytes,+ datasourcePackageUsageInfo_volumeUsageUpdateTime,++ -- * Graph+ Graph (..),+ newGraph,+ graph_arn,+ graph_createdTime,++ -- * MemberDetail+ MemberDetail (..),+ newMemberDetail,+ memberDetail_accountId,+ memberDetail_administratorId,+ memberDetail_datasourcePackageIngestStates,+ memberDetail_disabledReason,+ memberDetail_emailAddress,+ memberDetail_graphArn,+ memberDetail_invitationType,+ memberDetail_invitedTime,+ memberDetail_masterId,+ memberDetail_percentOfGraphUtilization,+ memberDetail_percentOfGraphUtilizationUpdatedTime,+ memberDetail_status,+ memberDetail_updatedTime,+ memberDetail_volumeUsageByDatasourcePackage,+ memberDetail_volumeUsageInBytes,+ memberDetail_volumeUsageUpdatedTime,++ -- * MembershipDatasources+ MembershipDatasources (..),+ newMembershipDatasources,+ membershipDatasources_accountId,+ membershipDatasources_datasourcePackageIngestHistory,+ membershipDatasources_graphArn,++ -- * TimestampForCollection+ TimestampForCollection (..),+ newTimestampForCollection,+ timestampForCollection_timestamp,++ -- * UnprocessedAccount+ UnprocessedAccount (..),+ newUnprocessedAccount,+ unprocessedAccount_accountId,+ unprocessedAccount_reason,++ -- * UnprocessedGraph+ UnprocessedGraph (..),+ newUnprocessedGraph,+ unprocessedGraph_graphArn,+ unprocessedGraph_reason,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import Amazonka.Detective.Types.Account+import Amazonka.Detective.Types.Administrator+import Amazonka.Detective.Types.DatasourcePackage+import Amazonka.Detective.Types.DatasourcePackageIngestDetail+import Amazonka.Detective.Types.DatasourcePackageIngestState+import Amazonka.Detective.Types.DatasourcePackageUsageInfo+import Amazonka.Detective.Types.Graph+import Amazonka.Detective.Types.InvitationType+import Amazonka.Detective.Types.MemberDetail+import Amazonka.Detective.Types.MemberDisabledReason+import Amazonka.Detective.Types.MemberStatus+import Amazonka.Detective.Types.MembershipDatasources+import Amazonka.Detective.Types.TimestampForCollection+import Amazonka.Detective.Types.UnprocessedAccount+import Amazonka.Detective.Types.UnprocessedGraph+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2018-10-26@ of the Amazon Detective SDK configuration.+defaultService :: Core.Service+defaultService =+ Core.Service+ { Core.abbrev = "Detective",+ Core.signer = Sign.v4,+ Core.endpointPrefix = "api.detective",+ Core.signingName = "detective",+ Core.version = "2018-10-26",+ Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+ Core.endpoint = Core.defaultEndpoint defaultService,+ Core.timeout = Prelude.Just 70,+ Core.check = Core.statusSuccess,+ Core.error = Core.parseJSONError "Detective",+ Core.retry = retry+ }+ where+ retry =+ Core.Exponential+ { Core.base = 5.0e-2,+ Core.growth = 2,+ Core.attempts = 5,+ Core.check = check+ }+ check e+ | Lens.has (Core.hasStatus 502) e =+ Prelude.Just "bad_gateway"+ | Lens.has (Core.hasStatus 504) e =+ Prelude.Just "gateway_timeout"+ | Lens.has (Core.hasStatus 500) e =+ Prelude.Just "general_server_error"+ | Lens.has (Core.hasStatus 509) e =+ Prelude.Just "limit_exceeded"+ | Lens.has+ ( Core.hasCode "RequestThrottledException"+ Prelude.. Core.hasStatus 400+ )+ e =+ Prelude.Just "request_throttled_exception"+ | Lens.has (Core.hasStatus 503) e =+ Prelude.Just "service_unavailable"+ | Lens.has+ ( Core.hasCode "ThrottledException"+ Prelude.. Core.hasStatus 400+ )+ e =+ Prelude.Just "throttled_exception"+ | Lens.has+ ( Core.hasCode "Throttling"+ Prelude.. Core.hasStatus 400+ )+ e =+ Prelude.Just "throttling"+ | Lens.has+ ( Core.hasCode "ThrottlingException"+ Prelude.. Core.hasStatus 400+ )+ e =+ Prelude.Just "throttling_exception"+ | Lens.has+ ( Core.hasCode+ "ProvisionedThroughputExceededException"+ Prelude.. Core.hasStatus 400+ )+ e =+ Prelude.Just "throughput_exceeded"+ | Lens.has (Core.hasStatus 429) e =+ Prelude.Just "too_many_requests"+ | Prelude.otherwise = Prelude.Nothing++-- | The request issuer does not have permission to access this resource or+-- perform this operation.+_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_AccessDeniedException =+ Core._MatchServiceError+ defaultService+ "AccessDeniedException"+ Prelude.. Core.hasStatus 403++-- | The request attempted an invalid action.+_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ConflictException =+ Core._MatchServiceError+ defaultService+ "ConflictException"+ Prelude.. Core.hasStatus 409++-- | The request was valid but failed because of a problem with the service.+_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalServerException =+ Core._MatchServiceError+ defaultService+ "InternalServerException"+ Prelude.. Core.hasStatus 500++-- | The request refers to a nonexistent resource.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+ Core._MatchServiceError+ defaultService+ "ResourceNotFoundException"+ Prelude.. Core.hasStatus 404++-- | This request cannot be completed for one of the following reasons.+--+-- - The request would cause the number of member accounts in the+-- behavior graph to exceed the maximum allowed. A behavior graph+-- cannot have more than 1200 member accounts.+--+-- - The request would cause the data rate for the behavior graph to+-- exceed the maximum allowed.+--+-- - Detective is unable to verify the data rate for the member account.+-- This is usually because the member account is not enrolled in Amazon+-- GuardDuty.+_ServiceQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceQuotaExceededException =+ Core._MatchServiceError+ defaultService+ "ServiceQuotaExceededException"+ Prelude.. Core.hasStatus 402++-- | The request cannot be completed because too many other requests are+-- occurring at the same time.+_TooManyRequestsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_TooManyRequestsException =+ Core._MatchServiceError+ defaultService+ "TooManyRequestsException"+ Prelude.. Core.hasStatus 429++-- | The request parameters are invalid.+_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ValidationException =+ Core._MatchServiceError+ defaultService+ "ValidationException"+ Prelude.. Core.hasStatus 400
+ gen/Amazonka/Detective/Types/Account.hs view
@@ -0,0 +1,91 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.Types.Account+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.Detective.Types.Account where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | An Amazon Web Services account that is the administrator account of or a+-- member of a behavior graph.+--+-- /See:/ 'newAccount' smart constructor.+data Account = Account'+ { -- | The account identifier of the Amazon Web Services account.+ accountId :: Prelude.Text,+ -- | The Amazon Web Services account root user email address for the Amazon+ -- Web Services account.+ emailAddress :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Account' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountId', 'account_accountId' - The account identifier of the Amazon Web Services account.+--+-- 'emailAddress', 'account_emailAddress' - The Amazon Web Services account root user email address for the Amazon+-- Web Services account.+newAccount ::+ -- | 'accountId'+ Prelude.Text ->+ -- | 'emailAddress'+ Prelude.Text ->+ Account+newAccount pAccountId_ pEmailAddress_ =+ Account'+ { accountId = pAccountId_,+ emailAddress = pEmailAddress_+ }++-- | The account identifier of the Amazon Web Services account.+account_accountId :: Lens.Lens' Account Prelude.Text+account_accountId = Lens.lens (\Account' {accountId} -> accountId) (\s@Account' {} a -> s {accountId = a} :: Account)++-- | The Amazon Web Services account root user email address for the Amazon+-- Web Services account.+account_emailAddress :: Lens.Lens' Account Prelude.Text+account_emailAddress = Lens.lens (\Account' {emailAddress} -> emailAddress) (\s@Account' {} a -> s {emailAddress = a} :: Account)++instance Prelude.Hashable Account where+ hashWithSalt _salt Account' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` emailAddress++instance Prelude.NFData Account where+ rnf Account' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf emailAddress++instance Data.ToJSON Account where+ toJSON Account' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("AccountId" Data..= accountId),+ Prelude.Just ("EmailAddress" Data..= emailAddress)+ ]+ )
+ gen/Amazonka/Detective/Types/Administrator.hs view
@@ -0,0 +1,106 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.Types.Administrator+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.Detective.Types.Administrator where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Information about the Detective administrator account for an+-- organization.+--+-- /See:/ 'newAdministrator' smart constructor.+data Administrator = Administrator'+ { -- | The Amazon Web Services account identifier of the Detective+ -- administrator account for the organization.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | The date and time when the Detective administrator account was enabled.+ -- The value is an ISO8601 formatted string. For example,+ -- @2021-08-18T16:35:56.284Z@.+ delegationTime :: Prelude.Maybe Data.ISO8601,+ -- | The ARN of the organization behavior graph.+ graphArn :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Administrator' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountId', 'administrator_accountId' - The Amazon Web Services account identifier of the Detective+-- administrator account for the organization.+--+-- 'delegationTime', 'administrator_delegationTime' - The date and time when the Detective administrator account was enabled.+-- The value is an ISO8601 formatted string. For example,+-- @2021-08-18T16:35:56.284Z@.+--+-- 'graphArn', 'administrator_graphArn' - The ARN of the organization behavior graph.+newAdministrator ::+ Administrator+newAdministrator =+ Administrator'+ { accountId = Prelude.Nothing,+ delegationTime = Prelude.Nothing,+ graphArn = Prelude.Nothing+ }++-- | The Amazon Web Services account identifier of the Detective+-- administrator account for the organization.+administrator_accountId :: Lens.Lens' Administrator (Prelude.Maybe Prelude.Text)+administrator_accountId = Lens.lens (\Administrator' {accountId} -> accountId) (\s@Administrator' {} a -> s {accountId = a} :: Administrator)++-- | The date and time when the Detective administrator account was enabled.+-- The value is an ISO8601 formatted string. For example,+-- @2021-08-18T16:35:56.284Z@.+administrator_delegationTime :: Lens.Lens' Administrator (Prelude.Maybe Prelude.UTCTime)+administrator_delegationTime = Lens.lens (\Administrator' {delegationTime} -> delegationTime) (\s@Administrator' {} a -> s {delegationTime = a} :: Administrator) Prelude.. Lens.mapping Data._Time++-- | The ARN of the organization behavior graph.+administrator_graphArn :: Lens.Lens' Administrator (Prelude.Maybe Prelude.Text)+administrator_graphArn = Lens.lens (\Administrator' {graphArn} -> graphArn) (\s@Administrator' {} a -> s {graphArn = a} :: Administrator)++instance Data.FromJSON Administrator where+ parseJSON =+ Data.withObject+ "Administrator"+ ( \x ->+ Administrator'+ Prelude.<$> (x Data..:? "AccountId")+ Prelude.<*> (x Data..:? "DelegationTime")+ Prelude.<*> (x Data..:? "GraphArn")+ )++instance Prelude.Hashable Administrator where+ hashWithSalt _salt Administrator' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` delegationTime+ `Prelude.hashWithSalt` graphArn++instance Prelude.NFData Administrator where+ rnf Administrator' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf delegationTime+ `Prelude.seq` Prelude.rnf graphArn
+ gen/Amazonka/Detective/Types/DatasourcePackage.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.Types.DatasourcePackage+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.Detective.Types.DatasourcePackage+ ( DatasourcePackage+ ( ..,+ DatasourcePackage_DETECTIVE_CORE,+ DatasourcePackage_EKS_AUDIT+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype DatasourcePackage = DatasourcePackage'+ { fromDatasourcePackage ::+ Data.Text+ }+ deriving stock+ ( Prelude.Show,+ Prelude.Read,+ Prelude.Eq,+ Prelude.Ord,+ Prelude.Generic+ )+ deriving newtype+ ( Prelude.Hashable,+ Prelude.NFData,+ Data.FromText,+ Data.ToText,+ Data.ToByteString,+ Data.ToLog,+ Data.ToHeader,+ Data.ToQuery,+ Data.FromJSON,+ Data.FromJSONKey,+ Data.ToJSON,+ Data.ToJSONKey,+ Data.FromXML,+ Data.ToXML+ )++pattern DatasourcePackage_DETECTIVE_CORE :: DatasourcePackage+pattern DatasourcePackage_DETECTIVE_CORE = DatasourcePackage' "DETECTIVE_CORE"++pattern DatasourcePackage_EKS_AUDIT :: DatasourcePackage+pattern DatasourcePackage_EKS_AUDIT = DatasourcePackage' "EKS_AUDIT"++{-# COMPLETE+ DatasourcePackage_DETECTIVE_CORE,+ DatasourcePackage_EKS_AUDIT,+ DatasourcePackage'+ #-}
+ gen/Amazonka/Detective/Types/DatasourcePackageIngestDetail.hs view
@@ -0,0 +1,93 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.Types.DatasourcePackageIngestDetail+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.Detective.Types.DatasourcePackageIngestDetail where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types.DatasourcePackageIngestState+import Amazonka.Detective.Types.TimestampForCollection+import qualified Amazonka.Prelude as Prelude++-- | Details about the data source packages ingested by your behavior graph.+--+-- /See:/ 'newDatasourcePackageIngestDetail' smart constructor.+data DatasourcePackageIngestDetail = DatasourcePackageIngestDetail'+ { -- | Details on which data source packages are ingested for a member account.+ datasourcePackageIngestState :: Prelude.Maybe DatasourcePackageIngestState,+ -- | The date a data source package was enabled for this account+ lastIngestStateChange :: Prelude.Maybe (Prelude.HashMap DatasourcePackageIngestState TimestampForCollection)+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DatasourcePackageIngestDetail' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'datasourcePackageIngestState', 'datasourcePackageIngestDetail_datasourcePackageIngestState' - Details on which data source packages are ingested for a member account.+--+-- 'lastIngestStateChange', 'datasourcePackageIngestDetail_lastIngestStateChange' - The date a data source package was enabled for this account+newDatasourcePackageIngestDetail ::+ DatasourcePackageIngestDetail+newDatasourcePackageIngestDetail =+ DatasourcePackageIngestDetail'+ { datasourcePackageIngestState =+ Prelude.Nothing,+ lastIngestStateChange = Prelude.Nothing+ }++-- | Details on which data source packages are ingested for a member account.+datasourcePackageIngestDetail_datasourcePackageIngestState :: Lens.Lens' DatasourcePackageIngestDetail (Prelude.Maybe DatasourcePackageIngestState)+datasourcePackageIngestDetail_datasourcePackageIngestState = Lens.lens (\DatasourcePackageIngestDetail' {datasourcePackageIngestState} -> datasourcePackageIngestState) (\s@DatasourcePackageIngestDetail' {} a -> s {datasourcePackageIngestState = a} :: DatasourcePackageIngestDetail)++-- | The date a data source package was enabled for this account+datasourcePackageIngestDetail_lastIngestStateChange :: Lens.Lens' DatasourcePackageIngestDetail (Prelude.Maybe (Prelude.HashMap DatasourcePackageIngestState TimestampForCollection))+datasourcePackageIngestDetail_lastIngestStateChange = Lens.lens (\DatasourcePackageIngestDetail' {lastIngestStateChange} -> lastIngestStateChange) (\s@DatasourcePackageIngestDetail' {} a -> s {lastIngestStateChange = a} :: DatasourcePackageIngestDetail) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON DatasourcePackageIngestDetail where+ parseJSON =+ Data.withObject+ "DatasourcePackageIngestDetail"+ ( \x ->+ DatasourcePackageIngestDetail'+ Prelude.<$> (x Data..:? "DatasourcePackageIngestState")+ Prelude.<*> ( x+ Data..:? "LastIngestStateChange"+ Data..!= Prelude.mempty+ )+ )++instance+ Prelude.Hashable+ DatasourcePackageIngestDetail+ where+ hashWithSalt _salt DatasourcePackageIngestDetail' {..} =+ _salt+ `Prelude.hashWithSalt` datasourcePackageIngestState+ `Prelude.hashWithSalt` lastIngestStateChange++instance Prelude.NFData DatasourcePackageIngestDetail where+ rnf DatasourcePackageIngestDetail' {..} =+ Prelude.rnf datasourcePackageIngestState+ `Prelude.seq` Prelude.rnf lastIngestStateChange
+ gen/Amazonka/Detective/Types/DatasourcePackageIngestState.hs view
@@ -0,0 +1,76 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.Types.DatasourcePackageIngestState+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.Detective.Types.DatasourcePackageIngestState+ ( DatasourcePackageIngestState+ ( ..,+ DatasourcePackageIngestState_DISABLED,+ DatasourcePackageIngestState_STARTED,+ DatasourcePackageIngestState_STOPPED+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype DatasourcePackageIngestState = DatasourcePackageIngestState'+ { fromDatasourcePackageIngestState ::+ Data.Text+ }+ deriving stock+ ( Prelude.Show,+ Prelude.Read,+ Prelude.Eq,+ Prelude.Ord,+ Prelude.Generic+ )+ deriving newtype+ ( Prelude.Hashable,+ Prelude.NFData,+ Data.FromText,+ Data.ToText,+ Data.ToByteString,+ Data.ToLog,+ Data.ToHeader,+ Data.ToQuery,+ Data.FromJSON,+ Data.FromJSONKey,+ Data.ToJSON,+ Data.ToJSONKey,+ Data.FromXML,+ Data.ToXML+ )++pattern DatasourcePackageIngestState_DISABLED :: DatasourcePackageIngestState+pattern DatasourcePackageIngestState_DISABLED = DatasourcePackageIngestState' "DISABLED"++pattern DatasourcePackageIngestState_STARTED :: DatasourcePackageIngestState+pattern DatasourcePackageIngestState_STARTED = DatasourcePackageIngestState' "STARTED"++pattern DatasourcePackageIngestState_STOPPED :: DatasourcePackageIngestState+pattern DatasourcePackageIngestState_STOPPED = DatasourcePackageIngestState' "STOPPED"++{-# COMPLETE+ DatasourcePackageIngestState_DISABLED,+ DatasourcePackageIngestState_STARTED,+ DatasourcePackageIngestState_STOPPED,+ DatasourcePackageIngestState'+ #-}
+ gen/Amazonka/Detective/Types/DatasourcePackageUsageInfo.hs view
@@ -0,0 +1,94 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.Types.DatasourcePackageUsageInfo+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.Detective.Types.DatasourcePackageUsageInfo where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Information on the usage of a data source package in the behavior graph.+--+-- /See:/ 'newDatasourcePackageUsageInfo' smart constructor.+data DatasourcePackageUsageInfo = DatasourcePackageUsageInfo'+ { -- | Total volume of data in bytes per day ingested for a given data source+ -- package.+ volumeUsageInBytes :: Prelude.Maybe Prelude.Integer,+ -- | The data and time when the member account data volume was last updated.+ -- The value is an ISO8601 formatted string. For example,+ -- @2021-08-18T16:35:56.284Z@.+ volumeUsageUpdateTime :: Prelude.Maybe Data.ISO8601+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DatasourcePackageUsageInfo' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'volumeUsageInBytes', 'datasourcePackageUsageInfo_volumeUsageInBytes' - Total volume of data in bytes per day ingested for a given data source+-- package.+--+-- 'volumeUsageUpdateTime', 'datasourcePackageUsageInfo_volumeUsageUpdateTime' - The data and time when the member account data volume was last updated.+-- The value is an ISO8601 formatted string. For example,+-- @2021-08-18T16:35:56.284Z@.+newDatasourcePackageUsageInfo ::+ DatasourcePackageUsageInfo+newDatasourcePackageUsageInfo =+ DatasourcePackageUsageInfo'+ { volumeUsageInBytes =+ Prelude.Nothing,+ volumeUsageUpdateTime = Prelude.Nothing+ }++-- | Total volume of data in bytes per day ingested for a given data source+-- package.+datasourcePackageUsageInfo_volumeUsageInBytes :: Lens.Lens' DatasourcePackageUsageInfo (Prelude.Maybe Prelude.Integer)+datasourcePackageUsageInfo_volumeUsageInBytes = Lens.lens (\DatasourcePackageUsageInfo' {volumeUsageInBytes} -> volumeUsageInBytes) (\s@DatasourcePackageUsageInfo' {} a -> s {volumeUsageInBytes = a} :: DatasourcePackageUsageInfo)++-- | The data and time when the member account data volume was last updated.+-- The value is an ISO8601 formatted string. For example,+-- @2021-08-18T16:35:56.284Z@.+datasourcePackageUsageInfo_volumeUsageUpdateTime :: Lens.Lens' DatasourcePackageUsageInfo (Prelude.Maybe Prelude.UTCTime)+datasourcePackageUsageInfo_volumeUsageUpdateTime = Lens.lens (\DatasourcePackageUsageInfo' {volumeUsageUpdateTime} -> volumeUsageUpdateTime) (\s@DatasourcePackageUsageInfo' {} a -> s {volumeUsageUpdateTime = a} :: DatasourcePackageUsageInfo) Prelude.. Lens.mapping Data._Time++instance Data.FromJSON DatasourcePackageUsageInfo where+ parseJSON =+ Data.withObject+ "DatasourcePackageUsageInfo"+ ( \x ->+ DatasourcePackageUsageInfo'+ Prelude.<$> (x Data..:? "VolumeUsageInBytes")+ Prelude.<*> (x Data..:? "VolumeUsageUpdateTime")+ )++instance Prelude.Hashable DatasourcePackageUsageInfo where+ hashWithSalt _salt DatasourcePackageUsageInfo' {..} =+ _salt+ `Prelude.hashWithSalt` volumeUsageInBytes+ `Prelude.hashWithSalt` volumeUsageUpdateTime++instance Prelude.NFData DatasourcePackageUsageInfo where+ rnf DatasourcePackageUsageInfo' {..} =+ Prelude.rnf volumeUsageInBytes+ `Prelude.seq` Prelude.rnf volumeUsageUpdateTime
+ gen/Amazonka/Detective/Types/Graph.hs view
@@ -0,0 +1,87 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.Types.Graph+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.Detective.Types.Graph where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A behavior graph in Detective.+--+-- /See:/ 'newGraph' smart constructor.+data Graph = Graph'+ { -- | The ARN of the behavior graph.+ arn :: Prelude.Maybe Prelude.Text,+ -- | The date and time that the behavior graph was created. The value is an+ -- ISO8601 formatted string. For example, @2021-08-18T16:35:56.284Z@.+ createdTime :: Prelude.Maybe Data.ISO8601+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Graph' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'graph_arn' - The ARN of the behavior graph.+--+-- 'createdTime', 'graph_createdTime' - The date and time that the behavior graph was created. The value is an+-- ISO8601 formatted string. For example, @2021-08-18T16:35:56.284Z@.+newGraph ::+ Graph+newGraph =+ Graph'+ { arn = Prelude.Nothing,+ createdTime = Prelude.Nothing+ }++-- | The ARN of the behavior graph.+graph_arn :: Lens.Lens' Graph (Prelude.Maybe Prelude.Text)+graph_arn = Lens.lens (\Graph' {arn} -> arn) (\s@Graph' {} a -> s {arn = a} :: Graph)++-- | The date and time that the behavior graph was created. The value is an+-- ISO8601 formatted string. For example, @2021-08-18T16:35:56.284Z@.+graph_createdTime :: Lens.Lens' Graph (Prelude.Maybe Prelude.UTCTime)+graph_createdTime = Lens.lens (\Graph' {createdTime} -> createdTime) (\s@Graph' {} a -> s {createdTime = a} :: Graph) Prelude.. Lens.mapping Data._Time++instance Data.FromJSON Graph where+ parseJSON =+ Data.withObject+ "Graph"+ ( \x ->+ Graph'+ Prelude.<$> (x Data..:? "Arn")+ Prelude.<*> (x Data..:? "CreatedTime")+ )++instance Prelude.Hashable Graph where+ hashWithSalt _salt Graph' {..} =+ _salt+ `Prelude.hashWithSalt` arn+ `Prelude.hashWithSalt` createdTime++instance Prelude.NFData Graph where+ rnf Graph' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf createdTime
+ gen/Amazonka/Detective/Types/InvitationType.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.Types.InvitationType+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.Detective.Types.InvitationType+ ( InvitationType+ ( ..,+ InvitationType_INVITATION,+ InvitationType_ORGANIZATION+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype InvitationType = InvitationType'+ { fromInvitationType ::+ Data.Text+ }+ deriving stock+ ( Prelude.Show,+ Prelude.Read,+ Prelude.Eq,+ Prelude.Ord,+ Prelude.Generic+ )+ deriving newtype+ ( Prelude.Hashable,+ Prelude.NFData,+ Data.FromText,+ Data.ToText,+ Data.ToByteString,+ Data.ToLog,+ Data.ToHeader,+ Data.ToQuery,+ Data.FromJSON,+ Data.FromJSONKey,+ Data.ToJSON,+ Data.ToJSONKey,+ Data.FromXML,+ Data.ToXML+ )++pattern InvitationType_INVITATION :: InvitationType+pattern InvitationType_INVITATION = InvitationType' "INVITATION"++pattern InvitationType_ORGANIZATION :: InvitationType+pattern InvitationType_ORGANIZATION = InvitationType' "ORGANIZATION"++{-# COMPLETE+ InvitationType_INVITATION,+ InvitationType_ORGANIZATION,+ InvitationType'+ #-}
+ gen/Amazonka/Detective/Types/MemberDetail.hs view
@@ -0,0 +1,475 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.Types.MemberDetail+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.Detective.Types.MemberDetail where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types.DatasourcePackage+import Amazonka.Detective.Types.DatasourcePackageIngestState+import Amazonka.Detective.Types.DatasourcePackageUsageInfo+import Amazonka.Detective.Types.InvitationType+import Amazonka.Detective.Types.MemberDisabledReason+import Amazonka.Detective.Types.MemberStatus+import qualified Amazonka.Prelude as Prelude++-- | Details about a member account in a behavior graph.+--+-- /See:/ 'newMemberDetail' smart constructor.+data MemberDetail = MemberDetail'+ { -- | The Amazon Web Services account identifier for the member account.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Web Services account identifier of the administrator account+ -- for the behavior graph.+ administratorId :: Prelude.Maybe Prelude.Text,+ -- | The state of a data source package for the behavior graph.+ datasourcePackageIngestStates :: Prelude.Maybe (Prelude.HashMap DatasourcePackage DatasourcePackageIngestState),+ -- | For member accounts with a status of @ACCEPTED_BUT_DISABLED@, the reason+ -- that the member account is not enabled.+ --+ -- The reason can have one of the following values:+ --+ -- - @VOLUME_TOO_HIGH@ - Indicates that adding the member account would+ -- cause the data volume for the behavior graph to be too high.+ --+ -- - @VOLUME_UNKNOWN@ - Indicates that Detective is unable to verify the+ -- data volume for the member account. This is usually because the+ -- member account is not enrolled in Amazon GuardDuty.+ disabledReason :: Prelude.Maybe MemberDisabledReason,+ -- | The Amazon Web Services account root user email address for the member+ -- account.+ emailAddress :: Prelude.Maybe Prelude.Text,+ -- | The ARN of the behavior graph.+ graphArn :: Prelude.Maybe Prelude.Text,+ -- | The type of behavior graph membership.+ --+ -- For an organization account in the organization behavior graph, the type+ -- is @ORGANIZATION@.+ --+ -- For an account that was invited to a behavior graph, the type is+ -- @INVITATION@.+ invitationType :: Prelude.Maybe InvitationType,+ -- | For invited accounts, the date and time that Detective sent the+ -- invitation to the account. The value is an ISO8601 formatted string. For+ -- example, @2021-08-18T16:35:56.284Z@.+ invitedTime :: Prelude.Maybe Data.ISO8601,+ -- | The Amazon Web Services account identifier of the administrator account+ -- for the behavior graph.+ masterId :: Prelude.Maybe Prelude.Text,+ -- | The member account data volume as a percentage of the maximum allowed+ -- data volume. 0 indicates 0 percent, and 100 indicates 100 percent.+ --+ -- Note that this is not the percentage of the behavior graph data volume.+ --+ -- For example, the data volume for the behavior graph is 80 GB per day.+ -- The maximum data volume is 160 GB per day. If the data volume for the+ -- member account is 40 GB per day, then @PercentOfGraphUtilization@ is 25.+ -- It represents 25% of the maximum allowed data volume.+ percentOfGraphUtilization :: Prelude.Maybe Prelude.Double,+ -- | The date and time when the graph utilization percentage was last+ -- updated. The value is an ISO8601 formatted string. For example,+ -- @2021-08-18T16:35:56.284Z@.+ percentOfGraphUtilizationUpdatedTime :: Prelude.Maybe Data.ISO8601,+ -- | The current membership status of the member account. The status can have+ -- one of the following values:+ --+ -- - @INVITED@ - For invited accounts only. Indicates that the member was+ -- sent an invitation but has not yet responded.+ --+ -- - @VERIFICATION_IN_PROGRESS@ - For invited accounts only, indicates+ -- that Detective is verifying that the account identifier and email+ -- address provided for the member account match. If they do match,+ -- then Detective sends the invitation. If the email address and+ -- account identifier don\'t match, then the member cannot be added to+ -- the behavior graph.+ --+ -- For organization accounts in the organization behavior graph,+ -- indicates that Detective is verifying that the account belongs to+ -- the organization.+ --+ -- - @VERIFICATION_FAILED@ - For invited accounts only. Indicates that+ -- the account and email address provided for the member account do not+ -- match, and Detective did not send an invitation to the account.+ --+ -- - @ENABLED@ - Indicates that the member account currently contributes+ -- data to the behavior graph. For invited accounts, the member account+ -- accepted the invitation. For organization accounts in the+ -- organization behavior graph, the Detective administrator account+ -- enabled the organization account as a member account.+ --+ -- - @ACCEPTED_BUT_DISABLED@ - The account accepted the invitation, or+ -- was enabled by the Detective administrator account, but is prevented+ -- from contributing data to the behavior graph. @DisabledReason@+ -- provides the reason why the member account is not enabled.+ --+ -- Invited accounts that declined an invitation or that were removed from+ -- the behavior graph are not included. In the organization behavior graph,+ -- organization accounts that the Detective administrator account did not+ -- enable are not included.+ status :: Prelude.Maybe MemberStatus,+ -- | The date and time that the member account was last updated. The value is+ -- an ISO8601 formatted string. For example, @2021-08-18T16:35:56.284Z@.+ updatedTime :: Prelude.Maybe Data.ISO8601,+ -- | Details on the volume of usage for each data source package in a+ -- behavior graph.+ volumeUsageByDatasourcePackage :: Prelude.Maybe (Prelude.HashMap DatasourcePackage DatasourcePackageUsageInfo),+ -- | The data volume in bytes per day for the member account.+ volumeUsageInBytes :: Prelude.Maybe Prelude.Integer,+ -- | The data and time when the member account data volume was last updated.+ -- The value is an ISO8601 formatted string. For example,+ -- @2021-08-18T16:35:56.284Z@.+ volumeUsageUpdatedTime :: Prelude.Maybe Data.ISO8601+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'MemberDetail' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountId', 'memberDetail_accountId' - The Amazon Web Services account identifier for the member account.+--+-- 'administratorId', 'memberDetail_administratorId' - The Amazon Web Services account identifier of the administrator account+-- for the behavior graph.+--+-- 'datasourcePackageIngestStates', 'memberDetail_datasourcePackageIngestStates' - The state of a data source package for the behavior graph.+--+-- 'disabledReason', 'memberDetail_disabledReason' - For member accounts with a status of @ACCEPTED_BUT_DISABLED@, the reason+-- that the member account is not enabled.+--+-- The reason can have one of the following values:+--+-- - @VOLUME_TOO_HIGH@ - Indicates that adding the member account would+-- cause the data volume for the behavior graph to be too high.+--+-- - @VOLUME_UNKNOWN@ - Indicates that Detective is unable to verify the+-- data volume for the member account. This is usually because the+-- member account is not enrolled in Amazon GuardDuty.+--+-- 'emailAddress', 'memberDetail_emailAddress' - The Amazon Web Services account root user email address for the member+-- account.+--+-- 'graphArn', 'memberDetail_graphArn' - The ARN of the behavior graph.+--+-- 'invitationType', 'memberDetail_invitationType' - The type of behavior graph membership.+--+-- For an organization account in the organization behavior graph, the type+-- is @ORGANIZATION@.+--+-- For an account that was invited to a behavior graph, the type is+-- @INVITATION@.+--+-- 'invitedTime', 'memberDetail_invitedTime' - For invited accounts, the date and time that Detective sent the+-- invitation to the account. The value is an ISO8601 formatted string. For+-- example, @2021-08-18T16:35:56.284Z@.+--+-- 'masterId', 'memberDetail_masterId' - The Amazon Web Services account identifier of the administrator account+-- for the behavior graph.+--+-- 'percentOfGraphUtilization', 'memberDetail_percentOfGraphUtilization' - The member account data volume as a percentage of the maximum allowed+-- data volume. 0 indicates 0 percent, and 100 indicates 100 percent.+--+-- Note that this is not the percentage of the behavior graph data volume.+--+-- For example, the data volume for the behavior graph is 80 GB per day.+-- The maximum data volume is 160 GB per day. If the data volume for the+-- member account is 40 GB per day, then @PercentOfGraphUtilization@ is 25.+-- It represents 25% of the maximum allowed data volume.+--+-- 'percentOfGraphUtilizationUpdatedTime', 'memberDetail_percentOfGraphUtilizationUpdatedTime' - The date and time when the graph utilization percentage was last+-- updated. The value is an ISO8601 formatted string. For example,+-- @2021-08-18T16:35:56.284Z@.+--+-- 'status', 'memberDetail_status' - The current membership status of the member account. The status can have+-- one of the following values:+--+-- - @INVITED@ - For invited accounts only. Indicates that the member was+-- sent an invitation but has not yet responded.+--+-- - @VERIFICATION_IN_PROGRESS@ - For invited accounts only, indicates+-- that Detective is verifying that the account identifier and email+-- address provided for the member account match. If they do match,+-- then Detective sends the invitation. If the email address and+-- account identifier don\'t match, then the member cannot be added to+-- the behavior graph.+--+-- For organization accounts in the organization behavior graph,+-- indicates that Detective is verifying that the account belongs to+-- the organization.+--+-- - @VERIFICATION_FAILED@ - For invited accounts only. Indicates that+-- the account and email address provided for the member account do not+-- match, and Detective did not send an invitation to the account.+--+-- - @ENABLED@ - Indicates that the member account currently contributes+-- data to the behavior graph. For invited accounts, the member account+-- accepted the invitation. For organization accounts in the+-- organization behavior graph, the Detective administrator account+-- enabled the organization account as a member account.+--+-- - @ACCEPTED_BUT_DISABLED@ - The account accepted the invitation, or+-- was enabled by the Detective administrator account, but is prevented+-- from contributing data to the behavior graph. @DisabledReason@+-- provides the reason why the member account is not enabled.+--+-- Invited accounts that declined an invitation or that were removed from+-- the behavior graph are not included. In the organization behavior graph,+-- organization accounts that the Detective administrator account did not+-- enable are not included.+--+-- 'updatedTime', 'memberDetail_updatedTime' - The date and time that the member account was last updated. The value is+-- an ISO8601 formatted string. For example, @2021-08-18T16:35:56.284Z@.+--+-- 'volumeUsageByDatasourcePackage', 'memberDetail_volumeUsageByDatasourcePackage' - Details on the volume of usage for each data source package in a+-- behavior graph.+--+-- 'volumeUsageInBytes', 'memberDetail_volumeUsageInBytes' - The data volume in bytes per day for the member account.+--+-- 'volumeUsageUpdatedTime', 'memberDetail_volumeUsageUpdatedTime' - The data and time when the member account data volume was last updated.+-- The value is an ISO8601 formatted string. For example,+-- @2021-08-18T16:35:56.284Z@.+newMemberDetail ::+ MemberDetail+newMemberDetail =+ MemberDetail'+ { accountId = Prelude.Nothing,+ administratorId = Prelude.Nothing,+ datasourcePackageIngestStates = Prelude.Nothing,+ disabledReason = Prelude.Nothing,+ emailAddress = Prelude.Nothing,+ graphArn = Prelude.Nothing,+ invitationType = Prelude.Nothing,+ invitedTime = Prelude.Nothing,+ masterId = Prelude.Nothing,+ percentOfGraphUtilization = Prelude.Nothing,+ percentOfGraphUtilizationUpdatedTime =+ Prelude.Nothing,+ status = Prelude.Nothing,+ updatedTime = Prelude.Nothing,+ volumeUsageByDatasourcePackage = Prelude.Nothing,+ volumeUsageInBytes = Prelude.Nothing,+ volumeUsageUpdatedTime = Prelude.Nothing+ }++-- | The Amazon Web Services account identifier for the member account.+memberDetail_accountId :: Lens.Lens' MemberDetail (Prelude.Maybe Prelude.Text)+memberDetail_accountId = Lens.lens (\MemberDetail' {accountId} -> accountId) (\s@MemberDetail' {} a -> s {accountId = a} :: MemberDetail)++-- | The Amazon Web Services account identifier of the administrator account+-- for the behavior graph.+memberDetail_administratorId :: Lens.Lens' MemberDetail (Prelude.Maybe Prelude.Text)+memberDetail_administratorId = Lens.lens (\MemberDetail' {administratorId} -> administratorId) (\s@MemberDetail' {} a -> s {administratorId = a} :: MemberDetail)++-- | The state of a data source package for the behavior graph.+memberDetail_datasourcePackageIngestStates :: Lens.Lens' MemberDetail (Prelude.Maybe (Prelude.HashMap DatasourcePackage DatasourcePackageIngestState))+memberDetail_datasourcePackageIngestStates = Lens.lens (\MemberDetail' {datasourcePackageIngestStates} -> datasourcePackageIngestStates) (\s@MemberDetail' {} a -> s {datasourcePackageIngestStates = a} :: MemberDetail) Prelude.. Lens.mapping Lens.coerced++-- | For member accounts with a status of @ACCEPTED_BUT_DISABLED@, the reason+-- that the member account is not enabled.+--+-- The reason can have one of the following values:+--+-- - @VOLUME_TOO_HIGH@ - Indicates that adding the member account would+-- cause the data volume for the behavior graph to be too high.+--+-- - @VOLUME_UNKNOWN@ - Indicates that Detective is unable to verify the+-- data volume for the member account. This is usually because the+-- member account is not enrolled in Amazon GuardDuty.+memberDetail_disabledReason :: Lens.Lens' MemberDetail (Prelude.Maybe MemberDisabledReason)+memberDetail_disabledReason = Lens.lens (\MemberDetail' {disabledReason} -> disabledReason) (\s@MemberDetail' {} a -> s {disabledReason = a} :: MemberDetail)++-- | The Amazon Web Services account root user email address for the member+-- account.+memberDetail_emailAddress :: Lens.Lens' MemberDetail (Prelude.Maybe Prelude.Text)+memberDetail_emailAddress = Lens.lens (\MemberDetail' {emailAddress} -> emailAddress) (\s@MemberDetail' {} a -> s {emailAddress = a} :: MemberDetail)++-- | The ARN of the behavior graph.+memberDetail_graphArn :: Lens.Lens' MemberDetail (Prelude.Maybe Prelude.Text)+memberDetail_graphArn = Lens.lens (\MemberDetail' {graphArn} -> graphArn) (\s@MemberDetail' {} a -> s {graphArn = a} :: MemberDetail)++-- | The type of behavior graph membership.+--+-- For an organization account in the organization behavior graph, the type+-- is @ORGANIZATION@.+--+-- For an account that was invited to a behavior graph, the type is+-- @INVITATION@.+memberDetail_invitationType :: Lens.Lens' MemberDetail (Prelude.Maybe InvitationType)+memberDetail_invitationType = Lens.lens (\MemberDetail' {invitationType} -> invitationType) (\s@MemberDetail' {} a -> s {invitationType = a} :: MemberDetail)++-- | For invited accounts, the date and time that Detective sent the+-- invitation to the account. The value is an ISO8601 formatted string. For+-- example, @2021-08-18T16:35:56.284Z@.+memberDetail_invitedTime :: Lens.Lens' MemberDetail (Prelude.Maybe Prelude.UTCTime)+memberDetail_invitedTime = Lens.lens (\MemberDetail' {invitedTime} -> invitedTime) (\s@MemberDetail' {} a -> s {invitedTime = a} :: MemberDetail) Prelude.. Lens.mapping Data._Time++-- | The Amazon Web Services account identifier of the administrator account+-- for the behavior graph.+memberDetail_masterId :: Lens.Lens' MemberDetail (Prelude.Maybe Prelude.Text)+memberDetail_masterId = Lens.lens (\MemberDetail' {masterId} -> masterId) (\s@MemberDetail' {} a -> s {masterId = a} :: MemberDetail)++-- | The member account data volume as a percentage of the maximum allowed+-- data volume. 0 indicates 0 percent, and 100 indicates 100 percent.+--+-- Note that this is not the percentage of the behavior graph data volume.+--+-- For example, the data volume for the behavior graph is 80 GB per day.+-- The maximum data volume is 160 GB per day. If the data volume for the+-- member account is 40 GB per day, then @PercentOfGraphUtilization@ is 25.+-- It represents 25% of the maximum allowed data volume.+memberDetail_percentOfGraphUtilization :: Lens.Lens' MemberDetail (Prelude.Maybe Prelude.Double)+memberDetail_percentOfGraphUtilization = Lens.lens (\MemberDetail' {percentOfGraphUtilization} -> percentOfGraphUtilization) (\s@MemberDetail' {} a -> s {percentOfGraphUtilization = a} :: MemberDetail)++-- | The date and time when the graph utilization percentage was last+-- updated. The value is an ISO8601 formatted string. For example,+-- @2021-08-18T16:35:56.284Z@.+memberDetail_percentOfGraphUtilizationUpdatedTime :: Lens.Lens' MemberDetail (Prelude.Maybe Prelude.UTCTime)+memberDetail_percentOfGraphUtilizationUpdatedTime = Lens.lens (\MemberDetail' {percentOfGraphUtilizationUpdatedTime} -> percentOfGraphUtilizationUpdatedTime) (\s@MemberDetail' {} a -> s {percentOfGraphUtilizationUpdatedTime = a} :: MemberDetail) Prelude.. Lens.mapping Data._Time++-- | The current membership status of the member account. The status can have+-- one of the following values:+--+-- - @INVITED@ - For invited accounts only. Indicates that the member was+-- sent an invitation but has not yet responded.+--+-- - @VERIFICATION_IN_PROGRESS@ - For invited accounts only, indicates+-- that Detective is verifying that the account identifier and email+-- address provided for the member account match. If they do match,+-- then Detective sends the invitation. If the email address and+-- account identifier don\'t match, then the member cannot be added to+-- the behavior graph.+--+-- For organization accounts in the organization behavior graph,+-- indicates that Detective is verifying that the account belongs to+-- the organization.+--+-- - @VERIFICATION_FAILED@ - For invited accounts only. Indicates that+-- the account and email address provided for the member account do not+-- match, and Detective did not send an invitation to the account.+--+-- - @ENABLED@ - Indicates that the member account currently contributes+-- data to the behavior graph. For invited accounts, the member account+-- accepted the invitation. For organization accounts in the+-- organization behavior graph, the Detective administrator account+-- enabled the organization account as a member account.+--+-- - @ACCEPTED_BUT_DISABLED@ - The account accepted the invitation, or+-- was enabled by the Detective administrator account, but is prevented+-- from contributing data to the behavior graph. @DisabledReason@+-- provides the reason why the member account is not enabled.+--+-- Invited accounts that declined an invitation or that were removed from+-- the behavior graph are not included. In the organization behavior graph,+-- organization accounts that the Detective administrator account did not+-- enable are not included.+memberDetail_status :: Lens.Lens' MemberDetail (Prelude.Maybe MemberStatus)+memberDetail_status = Lens.lens (\MemberDetail' {status} -> status) (\s@MemberDetail' {} a -> s {status = a} :: MemberDetail)++-- | The date and time that the member account was last updated. The value is+-- an ISO8601 formatted string. For example, @2021-08-18T16:35:56.284Z@.+memberDetail_updatedTime :: Lens.Lens' MemberDetail (Prelude.Maybe Prelude.UTCTime)+memberDetail_updatedTime = Lens.lens (\MemberDetail' {updatedTime} -> updatedTime) (\s@MemberDetail' {} a -> s {updatedTime = a} :: MemberDetail) Prelude.. Lens.mapping Data._Time++-- | Details on the volume of usage for each data source package in a+-- behavior graph.+memberDetail_volumeUsageByDatasourcePackage :: Lens.Lens' MemberDetail (Prelude.Maybe (Prelude.HashMap DatasourcePackage DatasourcePackageUsageInfo))+memberDetail_volumeUsageByDatasourcePackage = Lens.lens (\MemberDetail' {volumeUsageByDatasourcePackage} -> volumeUsageByDatasourcePackage) (\s@MemberDetail' {} a -> s {volumeUsageByDatasourcePackage = a} :: MemberDetail) Prelude.. Lens.mapping Lens.coerced++-- | The data volume in bytes per day for the member account.+memberDetail_volumeUsageInBytes :: Lens.Lens' MemberDetail (Prelude.Maybe Prelude.Integer)+memberDetail_volumeUsageInBytes = Lens.lens (\MemberDetail' {volumeUsageInBytes} -> volumeUsageInBytes) (\s@MemberDetail' {} a -> s {volumeUsageInBytes = a} :: MemberDetail)++-- | The data and time when the member account data volume was last updated.+-- The value is an ISO8601 formatted string. For example,+-- @2021-08-18T16:35:56.284Z@.+memberDetail_volumeUsageUpdatedTime :: Lens.Lens' MemberDetail (Prelude.Maybe Prelude.UTCTime)+memberDetail_volumeUsageUpdatedTime = Lens.lens (\MemberDetail' {volumeUsageUpdatedTime} -> volumeUsageUpdatedTime) (\s@MemberDetail' {} a -> s {volumeUsageUpdatedTime = a} :: MemberDetail) Prelude.. Lens.mapping Data._Time++instance Data.FromJSON MemberDetail where+ parseJSON =+ Data.withObject+ "MemberDetail"+ ( \x ->+ MemberDetail'+ Prelude.<$> (x Data..:? "AccountId")+ Prelude.<*> (x Data..:? "AdministratorId")+ Prelude.<*> ( x+ Data..:? "DatasourcePackageIngestStates"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..:? "DisabledReason")+ Prelude.<*> (x Data..:? "EmailAddress")+ Prelude.<*> (x Data..:? "GraphArn")+ Prelude.<*> (x Data..:? "InvitationType")+ Prelude.<*> (x Data..:? "InvitedTime")+ Prelude.<*> (x Data..:? "MasterId")+ Prelude.<*> (x Data..:? "PercentOfGraphUtilization")+ Prelude.<*> (x Data..:? "PercentOfGraphUtilizationUpdatedTime")+ Prelude.<*> (x Data..:? "Status")+ Prelude.<*> (x Data..:? "UpdatedTime")+ Prelude.<*> ( x+ Data..:? "VolumeUsageByDatasourcePackage"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..:? "VolumeUsageInBytes")+ Prelude.<*> (x Data..:? "VolumeUsageUpdatedTime")+ )++instance Prelude.Hashable MemberDetail where+ hashWithSalt _salt MemberDetail' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` administratorId+ `Prelude.hashWithSalt` datasourcePackageIngestStates+ `Prelude.hashWithSalt` disabledReason+ `Prelude.hashWithSalt` emailAddress+ `Prelude.hashWithSalt` graphArn+ `Prelude.hashWithSalt` invitationType+ `Prelude.hashWithSalt` invitedTime+ `Prelude.hashWithSalt` masterId+ `Prelude.hashWithSalt` percentOfGraphUtilization+ `Prelude.hashWithSalt` percentOfGraphUtilizationUpdatedTime+ `Prelude.hashWithSalt` status+ `Prelude.hashWithSalt` updatedTime+ `Prelude.hashWithSalt` volumeUsageByDatasourcePackage+ `Prelude.hashWithSalt` volumeUsageInBytes+ `Prelude.hashWithSalt` volumeUsageUpdatedTime++instance Prelude.NFData MemberDetail where+ rnf MemberDetail' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf administratorId+ `Prelude.seq` Prelude.rnf datasourcePackageIngestStates+ `Prelude.seq` Prelude.rnf disabledReason+ `Prelude.seq` Prelude.rnf emailAddress+ `Prelude.seq` Prelude.rnf graphArn+ `Prelude.seq` Prelude.rnf invitationType+ `Prelude.seq` Prelude.rnf invitedTime+ `Prelude.seq` Prelude.rnf masterId+ `Prelude.seq` Prelude.rnf percentOfGraphUtilization+ `Prelude.seq` Prelude.rnf percentOfGraphUtilizationUpdatedTime+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf updatedTime+ `Prelude.seq` Prelude.rnf volumeUsageByDatasourcePackage+ `Prelude.seq` Prelude.rnf volumeUsageInBytes+ `Prelude.seq` Prelude.rnf volumeUsageUpdatedTime
+ gen/Amazonka/Detective/Types/MemberDisabledReason.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.Types.MemberDisabledReason+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.Detective.Types.MemberDisabledReason+ ( MemberDisabledReason+ ( ..,+ MemberDisabledReason_VOLUME_TOO_HIGH,+ MemberDisabledReason_VOLUME_UNKNOWN+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype MemberDisabledReason = MemberDisabledReason'+ { fromMemberDisabledReason ::+ Data.Text+ }+ deriving stock+ ( Prelude.Show,+ Prelude.Read,+ Prelude.Eq,+ Prelude.Ord,+ Prelude.Generic+ )+ deriving newtype+ ( Prelude.Hashable,+ Prelude.NFData,+ Data.FromText,+ Data.ToText,+ Data.ToByteString,+ Data.ToLog,+ Data.ToHeader,+ Data.ToQuery,+ Data.FromJSON,+ Data.FromJSONKey,+ Data.ToJSON,+ Data.ToJSONKey,+ Data.FromXML,+ Data.ToXML+ )++pattern MemberDisabledReason_VOLUME_TOO_HIGH :: MemberDisabledReason+pattern MemberDisabledReason_VOLUME_TOO_HIGH = MemberDisabledReason' "VOLUME_TOO_HIGH"++pattern MemberDisabledReason_VOLUME_UNKNOWN :: MemberDisabledReason+pattern MemberDisabledReason_VOLUME_UNKNOWN = MemberDisabledReason' "VOLUME_UNKNOWN"++{-# COMPLETE+ MemberDisabledReason_VOLUME_TOO_HIGH,+ MemberDisabledReason_VOLUME_UNKNOWN,+ MemberDisabledReason'+ #-}
+ gen/Amazonka/Detective/Types/MemberStatus.hs view
@@ -0,0 +1,86 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.Types.MemberStatus+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.Detective.Types.MemberStatus+ ( MemberStatus+ ( ..,+ MemberStatus_ACCEPTED_BUT_DISABLED,+ MemberStatus_ENABLED,+ MemberStatus_INVITED,+ MemberStatus_VERIFICATION_FAILED,+ MemberStatus_VERIFICATION_IN_PROGRESS+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype MemberStatus = MemberStatus'+ { fromMemberStatus ::+ Data.Text+ }+ deriving stock+ ( Prelude.Show,+ Prelude.Read,+ Prelude.Eq,+ Prelude.Ord,+ Prelude.Generic+ )+ deriving newtype+ ( Prelude.Hashable,+ Prelude.NFData,+ Data.FromText,+ Data.ToText,+ Data.ToByteString,+ Data.ToLog,+ Data.ToHeader,+ Data.ToQuery,+ Data.FromJSON,+ Data.FromJSONKey,+ Data.ToJSON,+ Data.ToJSONKey,+ Data.FromXML,+ Data.ToXML+ )++pattern MemberStatus_ACCEPTED_BUT_DISABLED :: MemberStatus+pattern MemberStatus_ACCEPTED_BUT_DISABLED = MemberStatus' "ACCEPTED_BUT_DISABLED"++pattern MemberStatus_ENABLED :: MemberStatus+pattern MemberStatus_ENABLED = MemberStatus' "ENABLED"++pattern MemberStatus_INVITED :: MemberStatus+pattern MemberStatus_INVITED = MemberStatus' "INVITED"++pattern MemberStatus_VERIFICATION_FAILED :: MemberStatus+pattern MemberStatus_VERIFICATION_FAILED = MemberStatus' "VERIFICATION_FAILED"++pattern MemberStatus_VERIFICATION_IN_PROGRESS :: MemberStatus+pattern MemberStatus_VERIFICATION_IN_PROGRESS = MemberStatus' "VERIFICATION_IN_PROGRESS"++{-# COMPLETE+ MemberStatus_ACCEPTED_BUT_DISABLED,+ MemberStatus_ENABLED,+ MemberStatus_INVITED,+ MemberStatus_VERIFICATION_FAILED,+ MemberStatus_VERIFICATION_IN_PROGRESS,+ MemberStatus'+ #-}
+ gen/Amazonka/Detective/Types/MembershipDatasources.hs view
@@ -0,0 +1,102 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.Types.MembershipDatasources+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.Detective.Types.MembershipDatasources where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types.DatasourcePackage+import Amazonka.Detective.Types.DatasourcePackageIngestState+import Amazonka.Detective.Types.TimestampForCollection+import qualified Amazonka.Prelude as Prelude++-- | Details on data source packages for members of the behavior graph.+--+-- /See:/ 'newMembershipDatasources' smart constructor.+data MembershipDatasources = MembershipDatasources'+ { -- | The account identifier of the Amazon Web Services account.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | Details on when a data source package was added to a behavior graph.+ datasourcePackageIngestHistory :: Prelude.Maybe (Prelude.HashMap DatasourcePackage (Prelude.HashMap DatasourcePackageIngestState TimestampForCollection)),+ -- | The ARN of the organization behavior graph.+ graphArn :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'MembershipDatasources' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountId', 'membershipDatasources_accountId' - The account identifier of the Amazon Web Services account.+--+-- 'datasourcePackageIngestHistory', 'membershipDatasources_datasourcePackageIngestHistory' - Details on when a data source package was added to a behavior graph.+--+-- 'graphArn', 'membershipDatasources_graphArn' - The ARN of the organization behavior graph.+newMembershipDatasources ::+ MembershipDatasources+newMembershipDatasources =+ MembershipDatasources'+ { accountId = Prelude.Nothing,+ datasourcePackageIngestHistory = Prelude.Nothing,+ graphArn = Prelude.Nothing+ }++-- | The account identifier of the Amazon Web Services account.+membershipDatasources_accountId :: Lens.Lens' MembershipDatasources (Prelude.Maybe Prelude.Text)+membershipDatasources_accountId = Lens.lens (\MembershipDatasources' {accountId} -> accountId) (\s@MembershipDatasources' {} a -> s {accountId = a} :: MembershipDatasources)++-- | Details on when a data source package was added to a behavior graph.+membershipDatasources_datasourcePackageIngestHistory :: Lens.Lens' MembershipDatasources (Prelude.Maybe (Prelude.HashMap DatasourcePackage (Prelude.HashMap DatasourcePackageIngestState TimestampForCollection)))+membershipDatasources_datasourcePackageIngestHistory = Lens.lens (\MembershipDatasources' {datasourcePackageIngestHistory} -> datasourcePackageIngestHistory) (\s@MembershipDatasources' {} a -> s {datasourcePackageIngestHistory = a} :: MembershipDatasources) Prelude.. Lens.mapping Lens.coerced++-- | The ARN of the organization behavior graph.+membershipDatasources_graphArn :: Lens.Lens' MembershipDatasources (Prelude.Maybe Prelude.Text)+membershipDatasources_graphArn = Lens.lens (\MembershipDatasources' {graphArn} -> graphArn) (\s@MembershipDatasources' {} a -> s {graphArn = a} :: MembershipDatasources)++instance Data.FromJSON MembershipDatasources where+ parseJSON =+ Data.withObject+ "MembershipDatasources"+ ( \x ->+ MembershipDatasources'+ Prelude.<$> (x Data..:? "AccountId")+ Prelude.<*> ( x+ Data..:? "DatasourcePackageIngestHistory"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..:? "GraphArn")+ )++instance Prelude.Hashable MembershipDatasources where+ hashWithSalt _salt MembershipDatasources' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` datasourcePackageIngestHistory+ `Prelude.hashWithSalt` graphArn++instance Prelude.NFData MembershipDatasources where+ rnf MembershipDatasources' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf datasourcePackageIngestHistory+ `Prelude.seq` Prelude.rnf graphArn
+ gen/Amazonka/Detective/Types/TimestampForCollection.hs view
@@ -0,0 +1,78 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.Types.TimestampForCollection+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.Detective.Types.TimestampForCollection where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Details on when data collection began for a source package.+--+-- /See:/ 'newTimestampForCollection' smart constructor.+data TimestampForCollection = TimestampForCollection'+ { -- | The data and time when data collection began for a source package. The+ -- value is an ISO8601 formatted string. For example,+ -- @2021-08-18T16:35:56.284Z@.+ timestamp :: Prelude.Maybe Data.ISO8601+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TimestampForCollection' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'timestamp', 'timestampForCollection_timestamp' - The data and time when data collection began for a source package. The+-- value is an ISO8601 formatted string. For example,+-- @2021-08-18T16:35:56.284Z@.+newTimestampForCollection ::+ TimestampForCollection+newTimestampForCollection =+ TimestampForCollection'+ { timestamp =+ Prelude.Nothing+ }++-- | The data and time when data collection began for a source package. The+-- value is an ISO8601 formatted string. For example,+-- @2021-08-18T16:35:56.284Z@.+timestampForCollection_timestamp :: Lens.Lens' TimestampForCollection (Prelude.Maybe Prelude.UTCTime)+timestampForCollection_timestamp = Lens.lens (\TimestampForCollection' {timestamp} -> timestamp) (\s@TimestampForCollection' {} a -> s {timestamp = a} :: TimestampForCollection) Prelude.. Lens.mapping Data._Time++instance Data.FromJSON TimestampForCollection where+ parseJSON =+ Data.withObject+ "TimestampForCollection"+ ( \x ->+ TimestampForCollection'+ Prelude.<$> (x Data..:? "Timestamp")+ )++instance Prelude.Hashable TimestampForCollection where+ hashWithSalt _salt TimestampForCollection' {..} =+ _salt `Prelude.hashWithSalt` timestamp++instance Prelude.NFData TimestampForCollection where+ rnf TimestampForCollection' {..} =+ Prelude.rnf timestamp
+ gen/Amazonka/Detective/Types/UnprocessedAccount.hs view
@@ -0,0 +1,88 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.Types.UnprocessedAccount+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.Detective.Types.UnprocessedAccount where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A member account that was included in a request but for which the+-- request could not be processed.+--+-- /See:/ 'newUnprocessedAccount' smart constructor.+data UnprocessedAccount = UnprocessedAccount'+ { -- | The Amazon Web Services account identifier of the member account that+ -- was not processed.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | The reason that the member account request could not be processed.+ reason :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UnprocessedAccount' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accountId', 'unprocessedAccount_accountId' - The Amazon Web Services account identifier of the member account that+-- was not processed.+--+-- 'reason', 'unprocessedAccount_reason' - The reason that the member account request could not be processed.+newUnprocessedAccount ::+ UnprocessedAccount+newUnprocessedAccount =+ UnprocessedAccount'+ { accountId = Prelude.Nothing,+ reason = Prelude.Nothing+ }++-- | The Amazon Web Services account identifier of the member account that+-- was not processed.+unprocessedAccount_accountId :: Lens.Lens' UnprocessedAccount (Prelude.Maybe Prelude.Text)+unprocessedAccount_accountId = Lens.lens (\UnprocessedAccount' {accountId} -> accountId) (\s@UnprocessedAccount' {} a -> s {accountId = a} :: UnprocessedAccount)++-- | The reason that the member account request could not be processed.+unprocessedAccount_reason :: Lens.Lens' UnprocessedAccount (Prelude.Maybe Prelude.Text)+unprocessedAccount_reason = Lens.lens (\UnprocessedAccount' {reason} -> reason) (\s@UnprocessedAccount' {} a -> s {reason = a} :: UnprocessedAccount)++instance Data.FromJSON UnprocessedAccount where+ parseJSON =+ Data.withObject+ "UnprocessedAccount"+ ( \x ->+ UnprocessedAccount'+ Prelude.<$> (x Data..:? "AccountId")+ Prelude.<*> (x Data..:? "Reason")+ )++instance Prelude.Hashable UnprocessedAccount where+ hashWithSalt _salt UnprocessedAccount' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` reason++instance Prelude.NFData UnprocessedAccount where+ rnf UnprocessedAccount' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf reason
+ gen/Amazonka/Detective/Types/UnprocessedGraph.hs view
@@ -0,0 +1,87 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.Types.UnprocessedGraph+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.Detective.Types.UnprocessedGraph where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | Behavior graphs that could not be processed in the request.+--+-- /See:/ 'newUnprocessedGraph' smart constructor.+data UnprocessedGraph = UnprocessedGraph'+ { -- | The ARN of the organization behavior graph.+ graphArn :: Prelude.Maybe Prelude.Text,+ -- | The reason data source package information could not be processed for a+ -- behavior graph.+ reason :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UnprocessedGraph' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'graphArn', 'unprocessedGraph_graphArn' - The ARN of the organization behavior graph.+--+-- 'reason', 'unprocessedGraph_reason' - The reason data source package information could not be processed for a+-- behavior graph.+newUnprocessedGraph ::+ UnprocessedGraph+newUnprocessedGraph =+ UnprocessedGraph'+ { graphArn = Prelude.Nothing,+ reason = Prelude.Nothing+ }++-- | The ARN of the organization behavior graph.+unprocessedGraph_graphArn :: Lens.Lens' UnprocessedGraph (Prelude.Maybe Prelude.Text)+unprocessedGraph_graphArn = Lens.lens (\UnprocessedGraph' {graphArn} -> graphArn) (\s@UnprocessedGraph' {} a -> s {graphArn = a} :: UnprocessedGraph)++-- | The reason data source package information could not be processed for a+-- behavior graph.+unprocessedGraph_reason :: Lens.Lens' UnprocessedGraph (Prelude.Maybe Prelude.Text)+unprocessedGraph_reason = Lens.lens (\UnprocessedGraph' {reason} -> reason) (\s@UnprocessedGraph' {} a -> s {reason = a} :: UnprocessedGraph)++instance Data.FromJSON UnprocessedGraph where+ parseJSON =+ Data.withObject+ "UnprocessedGraph"+ ( \x ->+ UnprocessedGraph'+ Prelude.<$> (x Data..:? "GraphArn")+ Prelude.<*> (x Data..:? "Reason")+ )++instance Prelude.Hashable UnprocessedGraph where+ hashWithSalt _salt UnprocessedGraph' {..} =+ _salt+ `Prelude.hashWithSalt` graphArn+ `Prelude.hashWithSalt` reason++instance Prelude.NFData UnprocessedGraph where+ rnf UnprocessedGraph' {..} =+ Prelude.rnf graphArn+ `Prelude.seq` Prelude.rnf reason
+ gen/Amazonka/Detective/UntagResource.hs view
@@ -0,0 +1,166 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.UntagResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes tags from a behavior graph.+module Amazonka.Detective.UntagResource+ ( -- * Creating a Request+ UntagResource (..),+ newUntagResource,++ -- * Request Lenses+ untagResource_resourceArn,+ untagResource_tagKeys,++ -- * Destructuring the Response+ UntagResourceResponse (..),+ newUntagResourceResponse,++ -- * Response Lenses+ untagResourceResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUntagResource' smart constructor.+data UntagResource = UntagResource'+ { -- | The ARN of the behavior graph to remove the tags from.+ resourceArn :: Prelude.Text,+ -- | The tag keys of the tags to remove from the behavior graph. You can+ -- remove up to 50 tags at a time.+ tagKeys :: Prelude.NonEmpty Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'untagResource_resourceArn' - The ARN of the behavior graph to remove the tags from.+--+-- 'tagKeys', 'untagResource_tagKeys' - The tag keys of the tags to remove from the behavior graph. You can+-- remove up to 50 tags at a time.+newUntagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ -- | 'tagKeys'+ Prelude.NonEmpty Prelude.Text ->+ UntagResource+newUntagResource pResourceArn_ pTagKeys_ =+ UntagResource'+ { resourceArn = pResourceArn_,+ tagKeys = Lens.coerced Lens.# pTagKeys_+ }++-- | The ARN of the behavior graph to remove the tags from.+untagResource_resourceArn :: Lens.Lens' UntagResource Prelude.Text+untagResource_resourceArn = Lens.lens (\UntagResource' {resourceArn} -> resourceArn) (\s@UntagResource' {} a -> s {resourceArn = a} :: UntagResource)++-- | The tag keys of the tags to remove from the behavior graph. You can+-- remove up to 50 tags at a time.+untagResource_tagKeys :: Lens.Lens' UntagResource (Prelude.NonEmpty Prelude.Text)+untagResource_tagKeys = Lens.lens (\UntagResource' {tagKeys} -> tagKeys) (\s@UntagResource' {} a -> s {tagKeys = a} :: UntagResource) Prelude.. Lens.coerced++instance Core.AWSRequest UntagResource where+ type+ AWSResponse UntagResource =+ UntagResourceResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ UntagResourceResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UntagResource where+ hashWithSalt _salt UntagResource' {..} =+ _salt+ `Prelude.hashWithSalt` resourceArn+ `Prelude.hashWithSalt` tagKeys++instance Prelude.NFData UntagResource where+ rnf UntagResource' {..} =+ Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf tagKeys++instance Data.ToHeaders UntagResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath UntagResource where+ toPath UntagResource' {..} =+ Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery UntagResource where+ toQuery UntagResource' {..} =+ Prelude.mconcat+ ["tagKeys" Data.=: Data.toQueryList "member" tagKeys]++-- | /See:/ 'newUntagResourceResponse' smart constructor.+data UntagResourceResponse = UntagResourceResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UntagResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'untagResourceResponse_httpStatus' - The response's http status code.+newUntagResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UntagResourceResponse+newUntagResourceResponse pHttpStatus_ =+ UntagResourceResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+untagResourceResponse_httpStatus :: Lens.Lens' UntagResourceResponse Prelude.Int+untagResourceResponse_httpStatus = Lens.lens (\UntagResourceResponse' {httpStatus} -> httpStatus) (\s@UntagResourceResponse' {} a -> s {httpStatus = a} :: UntagResourceResponse)++instance Prelude.NFData UntagResourceResponse where+ rnf UntagResourceResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/Detective/UpdateDatasourcePackages.hs view
@@ -0,0 +1,157 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.UpdateDatasourcePackages+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Starts a data source packages for the behavior graph.+module Amazonka.Detective.UpdateDatasourcePackages+ ( -- * Creating a Request+ UpdateDatasourcePackages (..),+ newUpdateDatasourcePackages,++ -- * Request Lenses+ updateDatasourcePackages_graphArn,+ updateDatasourcePackages_datasourcePackages,++ -- * Destructuring the Response+ UpdateDatasourcePackagesResponse (..),+ newUpdateDatasourcePackagesResponse,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateDatasourcePackages' smart constructor.+data UpdateDatasourcePackages = UpdateDatasourcePackages'+ { -- | The ARN of the behavior graph.+ graphArn :: Prelude.Text,+ -- | The data source package start for the behavior graph.+ datasourcePackages :: Prelude.NonEmpty DatasourcePackage+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateDatasourcePackages' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'graphArn', 'updateDatasourcePackages_graphArn' - The ARN of the behavior graph.+--+-- 'datasourcePackages', 'updateDatasourcePackages_datasourcePackages' - The data source package start for the behavior graph.+newUpdateDatasourcePackages ::+ -- | 'graphArn'+ Prelude.Text ->+ -- | 'datasourcePackages'+ Prelude.NonEmpty DatasourcePackage ->+ UpdateDatasourcePackages+newUpdateDatasourcePackages+ pGraphArn_+ pDatasourcePackages_ =+ UpdateDatasourcePackages'+ { graphArn = pGraphArn_,+ datasourcePackages =+ Lens.coerced Lens.# pDatasourcePackages_+ }++-- | The ARN of the behavior graph.+updateDatasourcePackages_graphArn :: Lens.Lens' UpdateDatasourcePackages Prelude.Text+updateDatasourcePackages_graphArn = Lens.lens (\UpdateDatasourcePackages' {graphArn} -> graphArn) (\s@UpdateDatasourcePackages' {} a -> s {graphArn = a} :: UpdateDatasourcePackages)++-- | The data source package start for the behavior graph.+updateDatasourcePackages_datasourcePackages :: Lens.Lens' UpdateDatasourcePackages (Prelude.NonEmpty DatasourcePackage)+updateDatasourcePackages_datasourcePackages = Lens.lens (\UpdateDatasourcePackages' {datasourcePackages} -> datasourcePackages) (\s@UpdateDatasourcePackages' {} a -> s {datasourcePackages = a} :: UpdateDatasourcePackages) Prelude.. Lens.coerced++instance Core.AWSRequest UpdateDatasourcePackages where+ type+ AWSResponse UpdateDatasourcePackages =+ UpdateDatasourcePackagesResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveNull+ UpdateDatasourcePackagesResponse'++instance Prelude.Hashable UpdateDatasourcePackages where+ hashWithSalt _salt UpdateDatasourcePackages' {..} =+ _salt+ `Prelude.hashWithSalt` graphArn+ `Prelude.hashWithSalt` datasourcePackages++instance Prelude.NFData UpdateDatasourcePackages where+ rnf UpdateDatasourcePackages' {..} =+ Prelude.rnf graphArn+ `Prelude.seq` Prelude.rnf datasourcePackages++instance Data.ToHeaders UpdateDatasourcePackages where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateDatasourcePackages where+ toJSON UpdateDatasourcePackages' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("GraphArn" Data..= graphArn),+ Prelude.Just+ ("DatasourcePackages" Data..= datasourcePackages)+ ]+ )++instance Data.ToPath UpdateDatasourcePackages where+ toPath = Prelude.const "/graph/datasources/update"++instance Data.ToQuery UpdateDatasourcePackages where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateDatasourcePackagesResponse' smart constructor.+data UpdateDatasourcePackagesResponse = UpdateDatasourcePackagesResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateDatasourcePackagesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newUpdateDatasourcePackagesResponse ::+ UpdateDatasourcePackagesResponse+newUpdateDatasourcePackagesResponse =+ UpdateDatasourcePackagesResponse'++instance+ Prelude.NFData+ UpdateDatasourcePackagesResponse+ where+ rnf _ = ()
+ gen/Amazonka/Detective/UpdateOrganizationConfiguration.hs view
@@ -0,0 +1,173 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.UpdateOrganizationConfiguration+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates the configuration for the Organizations integration in the+-- current Region. Can only be called by the Detective administrator+-- account for the organization.+module Amazonka.Detective.UpdateOrganizationConfiguration+ ( -- * Creating a Request+ UpdateOrganizationConfiguration (..),+ newUpdateOrganizationConfiguration,++ -- * Request Lenses+ updateOrganizationConfiguration_autoEnable,+ updateOrganizationConfiguration_graphArn,++ -- * Destructuring the Response+ UpdateOrganizationConfigurationResponse (..),+ newUpdateOrganizationConfigurationResponse,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateOrganizationConfiguration' smart constructor.+data UpdateOrganizationConfiguration = UpdateOrganizationConfiguration'+ { -- | Indicates whether to automatically enable new organization accounts as+ -- member accounts in the organization behavior graph.+ autoEnable :: Prelude.Maybe Prelude.Bool,+ -- | The ARN of the organization behavior graph.+ graphArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateOrganizationConfiguration' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'autoEnable', 'updateOrganizationConfiguration_autoEnable' - Indicates whether to automatically enable new organization accounts as+-- member accounts in the organization behavior graph.+--+-- 'graphArn', 'updateOrganizationConfiguration_graphArn' - The ARN of the organization behavior graph.+newUpdateOrganizationConfiguration ::+ -- | 'graphArn'+ Prelude.Text ->+ UpdateOrganizationConfiguration+newUpdateOrganizationConfiguration pGraphArn_ =+ UpdateOrganizationConfiguration'+ { autoEnable =+ Prelude.Nothing,+ graphArn = pGraphArn_+ }++-- | Indicates whether to automatically enable new organization accounts as+-- member accounts in the organization behavior graph.+updateOrganizationConfiguration_autoEnable :: Lens.Lens' UpdateOrganizationConfiguration (Prelude.Maybe Prelude.Bool)+updateOrganizationConfiguration_autoEnable = Lens.lens (\UpdateOrganizationConfiguration' {autoEnable} -> autoEnable) (\s@UpdateOrganizationConfiguration' {} a -> s {autoEnable = a} :: UpdateOrganizationConfiguration)++-- | The ARN of the organization behavior graph.+updateOrganizationConfiguration_graphArn :: Lens.Lens' UpdateOrganizationConfiguration Prelude.Text+updateOrganizationConfiguration_graphArn = Lens.lens (\UpdateOrganizationConfiguration' {graphArn} -> graphArn) (\s@UpdateOrganizationConfiguration' {} a -> s {graphArn = a} :: UpdateOrganizationConfiguration)++instance+ Core.AWSRequest+ UpdateOrganizationConfiguration+ where+ type+ AWSResponse UpdateOrganizationConfiguration =+ UpdateOrganizationConfigurationResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveNull+ UpdateOrganizationConfigurationResponse'++instance+ Prelude.Hashable+ UpdateOrganizationConfiguration+ where+ hashWithSalt+ _salt+ UpdateOrganizationConfiguration' {..} =+ _salt+ `Prelude.hashWithSalt` autoEnable+ `Prelude.hashWithSalt` graphArn++instance+ Prelude.NFData+ UpdateOrganizationConfiguration+ where+ rnf UpdateOrganizationConfiguration' {..} =+ Prelude.rnf autoEnable+ `Prelude.seq` Prelude.rnf graphArn++instance+ Data.ToHeaders+ UpdateOrganizationConfiguration+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateOrganizationConfiguration where+ toJSON UpdateOrganizationConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("AutoEnable" Data..=) Prelude.<$> autoEnable,+ Prelude.Just ("GraphArn" Data..= graphArn)+ ]+ )++instance Data.ToPath UpdateOrganizationConfiguration where+ toPath =+ Prelude.const+ "/orgs/updateOrganizationConfiguration"++instance Data.ToQuery UpdateOrganizationConfiguration where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateOrganizationConfigurationResponse' smart constructor.+data UpdateOrganizationConfigurationResponse = UpdateOrganizationConfigurationResponse'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateOrganizationConfigurationResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+newUpdateOrganizationConfigurationResponse ::+ UpdateOrganizationConfigurationResponse+newUpdateOrganizationConfigurationResponse =+ UpdateOrganizationConfigurationResponse'++instance+ Prelude.NFData+ UpdateOrganizationConfigurationResponse+ where+ rnf _ = ()
+ gen/Amazonka/Detective/Waiters.hs view
@@ -0,0 +1,24 @@+{-# LANGUAGE DisambiguateRecordFields #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Detective.Waiters+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.Detective.Waiters where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Detective.Lens+import Amazonka.Detective.Types+import qualified Amazonka.Prelude as Prelude
+ src/.gitkeep view
+ test/Main.hs view
@@ -0,0 +1,23 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Main+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Main (main) where++import Test.Amazonka.Detective+import Test.Amazonka.Detective.Internal+import Test.Tasty++main :: IO ()+main =+ defaultMain $+ testGroup+ "Detective"+ [ testGroup "tests" tests,+ testGroup "fixtures" fixtures+ ]
+ test/Test/Amazonka/Detective.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.Amazonka.Detective+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Test.Amazonka.Detective+ ( tests,+ fixtures,+ )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/Detective/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module : Test.Amazonka.Detective.Internal+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Test.Amazonka.Detective.Internal where
+ test/Test/Amazonka/Gen/Detective.hs view
@@ -0,0 +1,518 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Test.Amazonka.Gen.Detective+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+module Test.Amazonka.Gen.Detective where++import Amazonka.Detective+import qualified Data.Proxy as Proxy+import Test.Amazonka.Detective.Internal+import Test.Amazonka.Fixture+import Test.Amazonka.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"+-- [ requestAcceptInvitation $+-- newAcceptInvitation+--+-- , requestBatchGetGraphMemberDatasources $+-- newBatchGetGraphMemberDatasources+--+-- , requestBatchGetMembershipDatasources $+-- newBatchGetMembershipDatasources+--+-- , requestCreateGraph $+-- newCreateGraph+--+-- , requestCreateMembers $+-- newCreateMembers+--+-- , requestDeleteGraph $+-- newDeleteGraph+--+-- , requestDeleteMembers $+-- newDeleteMembers+--+-- , requestDescribeOrganizationConfiguration $+-- newDescribeOrganizationConfiguration+--+-- , requestDisableOrganizationAdminAccount $+-- newDisableOrganizationAdminAccount+--+-- , requestDisassociateMembership $+-- newDisassociateMembership+--+-- , requestEnableOrganizationAdminAccount $+-- newEnableOrganizationAdminAccount+--+-- , requestGetMembers $+-- newGetMembers+--+-- , requestListDatasourcePackages $+-- newListDatasourcePackages+--+-- , requestListGraphs $+-- newListGraphs+--+-- , requestListInvitations $+-- newListInvitations+--+-- , requestListMembers $+-- newListMembers+--+-- , requestListOrganizationAdminAccounts $+-- newListOrganizationAdminAccounts+--+-- , requestListTagsForResource $+-- newListTagsForResource+--+-- , requestRejectInvitation $+-- newRejectInvitation+--+-- , requestStartMonitoringMember $+-- newStartMonitoringMember+--+-- , requestTagResource $+-- newTagResource+--+-- , requestUntagResource $+-- newUntagResource+--+-- , requestUpdateDatasourcePackages $+-- newUpdateDatasourcePackages+--+-- , requestUpdateOrganizationConfiguration $+-- newUpdateOrganizationConfiguration+--+-- ]++-- , testGroup "response"+-- [ responseAcceptInvitation $+-- newAcceptInvitationResponse+--+-- , responseBatchGetGraphMemberDatasources $+-- newBatchGetGraphMemberDatasourcesResponse+--+-- , responseBatchGetMembershipDatasources $+-- newBatchGetMembershipDatasourcesResponse+--+-- , responseCreateGraph $+-- newCreateGraphResponse+--+-- , responseCreateMembers $+-- newCreateMembersResponse+--+-- , responseDeleteGraph $+-- newDeleteGraphResponse+--+-- , responseDeleteMembers $+-- newDeleteMembersResponse+--+-- , responseDescribeOrganizationConfiguration $+-- newDescribeOrganizationConfigurationResponse+--+-- , responseDisableOrganizationAdminAccount $+-- newDisableOrganizationAdminAccountResponse+--+-- , responseDisassociateMembership $+-- newDisassociateMembershipResponse+--+-- , responseEnableOrganizationAdminAccount $+-- newEnableOrganizationAdminAccountResponse+--+-- , responseGetMembers $+-- newGetMembersResponse+--+-- , responseListDatasourcePackages $+-- newListDatasourcePackagesResponse+--+-- , responseListGraphs $+-- newListGraphsResponse+--+-- , responseListInvitations $+-- newListInvitationsResponse+--+-- , responseListMembers $+-- newListMembersResponse+--+-- , responseListOrganizationAdminAccounts $+-- newListOrganizationAdminAccountsResponse+--+-- , responseListTagsForResource $+-- newListTagsForResourceResponse+--+-- , responseRejectInvitation $+-- newRejectInvitationResponse+--+-- , responseStartMonitoringMember $+-- newStartMonitoringMemberResponse+--+-- , responseTagResource $+-- newTagResourceResponse+--+-- , responseUntagResource $+-- newUntagResourceResponse+--+-- , responseUpdateDatasourcePackages $+-- newUpdateDatasourcePackagesResponse+--+-- , responseUpdateOrganizationConfiguration $+-- newUpdateOrganizationConfigurationResponse+--+-- ]+-- ]++-- Requests++requestAcceptInvitation :: AcceptInvitation -> TestTree+requestAcceptInvitation =+ req+ "AcceptInvitation"+ "fixture/AcceptInvitation.yaml"++requestBatchGetGraphMemberDatasources :: BatchGetGraphMemberDatasources -> TestTree+requestBatchGetGraphMemberDatasources =+ req+ "BatchGetGraphMemberDatasources"+ "fixture/BatchGetGraphMemberDatasources.yaml"++requestBatchGetMembershipDatasources :: BatchGetMembershipDatasources -> TestTree+requestBatchGetMembershipDatasources =+ req+ "BatchGetMembershipDatasources"+ "fixture/BatchGetMembershipDatasources.yaml"++requestCreateGraph :: CreateGraph -> TestTree+requestCreateGraph =+ req+ "CreateGraph"+ "fixture/CreateGraph.yaml"++requestCreateMembers :: CreateMembers -> TestTree+requestCreateMembers =+ req+ "CreateMembers"+ "fixture/CreateMembers.yaml"++requestDeleteGraph :: DeleteGraph -> TestTree+requestDeleteGraph =+ req+ "DeleteGraph"+ "fixture/DeleteGraph.yaml"++requestDeleteMembers :: DeleteMembers -> TestTree+requestDeleteMembers =+ req+ "DeleteMembers"+ "fixture/DeleteMembers.yaml"++requestDescribeOrganizationConfiguration :: DescribeOrganizationConfiguration -> TestTree+requestDescribeOrganizationConfiguration =+ req+ "DescribeOrganizationConfiguration"+ "fixture/DescribeOrganizationConfiguration.yaml"++requestDisableOrganizationAdminAccount :: DisableOrganizationAdminAccount -> TestTree+requestDisableOrganizationAdminAccount =+ req+ "DisableOrganizationAdminAccount"+ "fixture/DisableOrganizationAdminAccount.yaml"++requestDisassociateMembership :: DisassociateMembership -> TestTree+requestDisassociateMembership =+ req+ "DisassociateMembership"+ "fixture/DisassociateMembership.yaml"++requestEnableOrganizationAdminAccount :: EnableOrganizationAdminAccount -> TestTree+requestEnableOrganizationAdminAccount =+ req+ "EnableOrganizationAdminAccount"+ "fixture/EnableOrganizationAdminAccount.yaml"++requestGetMembers :: GetMembers -> TestTree+requestGetMembers =+ req+ "GetMembers"+ "fixture/GetMembers.yaml"++requestListDatasourcePackages :: ListDatasourcePackages -> TestTree+requestListDatasourcePackages =+ req+ "ListDatasourcePackages"+ "fixture/ListDatasourcePackages.yaml"++requestListGraphs :: ListGraphs -> TestTree+requestListGraphs =+ req+ "ListGraphs"+ "fixture/ListGraphs.yaml"++requestListInvitations :: ListInvitations -> TestTree+requestListInvitations =+ req+ "ListInvitations"+ "fixture/ListInvitations.yaml"++requestListMembers :: ListMembers -> TestTree+requestListMembers =+ req+ "ListMembers"+ "fixture/ListMembers.yaml"++requestListOrganizationAdminAccounts :: ListOrganizationAdminAccounts -> TestTree+requestListOrganizationAdminAccounts =+ req+ "ListOrganizationAdminAccounts"+ "fixture/ListOrganizationAdminAccounts.yaml"++requestListTagsForResource :: ListTagsForResource -> TestTree+requestListTagsForResource =+ req+ "ListTagsForResource"+ "fixture/ListTagsForResource.yaml"++requestRejectInvitation :: RejectInvitation -> TestTree+requestRejectInvitation =+ req+ "RejectInvitation"+ "fixture/RejectInvitation.yaml"++requestStartMonitoringMember :: StartMonitoringMember -> TestTree+requestStartMonitoringMember =+ req+ "StartMonitoringMember"+ "fixture/StartMonitoringMember.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+ req+ "TagResource"+ "fixture/TagResource.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+ req+ "UntagResource"+ "fixture/UntagResource.yaml"++requestUpdateDatasourcePackages :: UpdateDatasourcePackages -> TestTree+requestUpdateDatasourcePackages =+ req+ "UpdateDatasourcePackages"+ "fixture/UpdateDatasourcePackages.yaml"++requestUpdateOrganizationConfiguration :: UpdateOrganizationConfiguration -> TestTree+requestUpdateOrganizationConfiguration =+ req+ "UpdateOrganizationConfiguration"+ "fixture/UpdateOrganizationConfiguration.yaml"++-- Responses++responseAcceptInvitation :: AcceptInvitationResponse -> TestTree+responseAcceptInvitation =+ res+ "AcceptInvitationResponse"+ "fixture/AcceptInvitationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy AcceptInvitation)++responseBatchGetGraphMemberDatasources :: BatchGetGraphMemberDatasourcesResponse -> TestTree+responseBatchGetGraphMemberDatasources =+ res+ "BatchGetGraphMemberDatasourcesResponse"+ "fixture/BatchGetGraphMemberDatasourcesResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy BatchGetGraphMemberDatasources)++responseBatchGetMembershipDatasources :: BatchGetMembershipDatasourcesResponse -> TestTree+responseBatchGetMembershipDatasources =+ res+ "BatchGetMembershipDatasourcesResponse"+ "fixture/BatchGetMembershipDatasourcesResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy BatchGetMembershipDatasources)++responseCreateGraph :: CreateGraphResponse -> TestTree+responseCreateGraph =+ res+ "CreateGraphResponse"+ "fixture/CreateGraphResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateGraph)++responseCreateMembers :: CreateMembersResponse -> TestTree+responseCreateMembers =+ res+ "CreateMembersResponse"+ "fixture/CreateMembersResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateMembers)++responseDeleteGraph :: DeleteGraphResponse -> TestTree+responseDeleteGraph =+ res+ "DeleteGraphResponse"+ "fixture/DeleteGraphResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteGraph)++responseDeleteMembers :: DeleteMembersResponse -> TestTree+responseDeleteMembers =+ res+ "DeleteMembersResponse"+ "fixture/DeleteMembersResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteMembers)++responseDescribeOrganizationConfiguration :: DescribeOrganizationConfigurationResponse -> TestTree+responseDescribeOrganizationConfiguration =+ res+ "DescribeOrganizationConfigurationResponse"+ "fixture/DescribeOrganizationConfigurationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeOrganizationConfiguration)++responseDisableOrganizationAdminAccount :: DisableOrganizationAdminAccountResponse -> TestTree+responseDisableOrganizationAdminAccount =+ res+ "DisableOrganizationAdminAccountResponse"+ "fixture/DisableOrganizationAdminAccountResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DisableOrganizationAdminAccount)++responseDisassociateMembership :: DisassociateMembershipResponse -> TestTree+responseDisassociateMembership =+ res+ "DisassociateMembershipResponse"+ "fixture/DisassociateMembershipResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DisassociateMembership)++responseEnableOrganizationAdminAccount :: EnableOrganizationAdminAccountResponse -> TestTree+responseEnableOrganizationAdminAccount =+ res+ "EnableOrganizationAdminAccountResponse"+ "fixture/EnableOrganizationAdminAccountResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy EnableOrganizationAdminAccount)++responseGetMembers :: GetMembersResponse -> TestTree+responseGetMembers =+ res+ "GetMembersResponse"+ "fixture/GetMembersResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetMembers)++responseListDatasourcePackages :: ListDatasourcePackagesResponse -> TestTree+responseListDatasourcePackages =+ res+ "ListDatasourcePackagesResponse"+ "fixture/ListDatasourcePackagesResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListDatasourcePackages)++responseListGraphs :: ListGraphsResponse -> TestTree+responseListGraphs =+ res+ "ListGraphsResponse"+ "fixture/ListGraphsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListGraphs)++responseListInvitations :: ListInvitationsResponse -> TestTree+responseListInvitations =+ res+ "ListInvitationsResponse"+ "fixture/ListInvitationsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListInvitations)++responseListMembers :: ListMembersResponse -> TestTree+responseListMembers =+ res+ "ListMembersResponse"+ "fixture/ListMembersResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListMembers)++responseListOrganizationAdminAccounts :: ListOrganizationAdminAccountsResponse -> TestTree+responseListOrganizationAdminAccounts =+ res+ "ListOrganizationAdminAccountsResponse"+ "fixture/ListOrganizationAdminAccountsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListOrganizationAdminAccounts)++responseListTagsForResource :: ListTagsForResourceResponse -> TestTree+responseListTagsForResource =+ res+ "ListTagsForResourceResponse"+ "fixture/ListTagsForResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListTagsForResource)++responseRejectInvitation :: RejectInvitationResponse -> TestTree+responseRejectInvitation =+ res+ "RejectInvitationResponse"+ "fixture/RejectInvitationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy RejectInvitation)++responseStartMonitoringMember :: StartMonitoringMemberResponse -> TestTree+responseStartMonitoringMember =+ res+ "StartMonitoringMemberResponse"+ "fixture/StartMonitoringMemberResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy StartMonitoringMember)++responseTagResource :: TagResourceResponse -> TestTree+responseTagResource =+ res+ "TagResourceResponse"+ "fixture/TagResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy TagResource)++responseUntagResource :: UntagResourceResponse -> TestTree+responseUntagResource =+ res+ "UntagResourceResponse"+ "fixture/UntagResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UntagResource)++responseUpdateDatasourcePackages :: UpdateDatasourcePackagesResponse -> TestTree+responseUpdateDatasourcePackages =+ res+ "UpdateDatasourcePackagesResponse"+ "fixture/UpdateDatasourcePackagesResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateDatasourcePackages)++responseUpdateOrganizationConfiguration :: UpdateOrganizationConfigurationResponse -> TestTree+responseUpdateOrganizationConfiguration =+ res+ "UpdateOrganizationConfigurationResponse"+ "fixture/UpdateOrganizationConfigurationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateOrganizationConfiguration)