amazonka-inspector2 (empty) → 2.0
raw patch · 249 files changed
+26818/−0 lines, 249 filesdep +amazonka-coredep +amazonka-inspector2dep +amazonka-test
Dependencies added: amazonka-core, amazonka-inspector2, amazonka-test, base, bytestring, case-insensitive, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +44/−0
- amazonka-inspector2.cabal +256/−0
- fixture/AssociateMember.yaml +10/−0
- fixture/AssociateMemberResponse.proto +0/−0
- fixture/BatchGetAccountStatus.yaml +10/−0
- fixture/BatchGetAccountStatusResponse.proto +0/−0
- fixture/BatchGetFreeTrialInfo.yaml +10/−0
- fixture/BatchGetFreeTrialInfoResponse.proto +0/−0
- fixture/CancelFindingsReport.yaml +10/−0
- fixture/CancelFindingsReportResponse.proto +0/−0
- fixture/CreateFilter.yaml +10/−0
- fixture/CreateFilterResponse.proto +0/−0
- fixture/CreateFindingsReport.yaml +10/−0
- fixture/CreateFindingsReportResponse.proto +0/−0
- fixture/DeleteFilter.yaml +10/−0
- fixture/DeleteFilterResponse.proto +0/−0
- fixture/DescribeOrganizationConfiguration.yaml +10/−0
- fixture/DescribeOrganizationConfigurationResponse.proto +0/−0
- fixture/Disable.yaml +10/−0
- fixture/DisableDelegatedAdminAccount.yaml +10/−0
- fixture/DisableDelegatedAdminAccountResponse.proto +0/−0
- fixture/DisableResponse.proto +0/−0
- fixture/DisassociateMember.yaml +10/−0
- fixture/DisassociateMemberResponse.proto +0/−0
- fixture/Enable.yaml +10/−0
- fixture/EnableDelegatedAdminAccount.yaml +10/−0
- fixture/EnableDelegatedAdminAccountResponse.proto +0/−0
- fixture/EnableResponse.proto +0/−0
- fixture/GetConfiguration.yaml +10/−0
- fixture/GetConfigurationResponse.proto +0/−0
- fixture/GetDelegatedAdminAccount.yaml +10/−0
- fixture/GetDelegatedAdminAccountResponse.proto +0/−0
- fixture/GetFindingsReportStatus.yaml +10/−0
- fixture/GetFindingsReportStatusResponse.proto +0/−0
- fixture/GetMember.yaml +10/−0
- fixture/GetMemberResponse.proto +0/−0
- fixture/ListAccountPermissions.yaml +10/−0
- fixture/ListAccountPermissionsResponse.proto +0/−0
- fixture/ListCoverage.yaml +10/−0
- fixture/ListCoverageResponse.proto +0/−0
- fixture/ListCoverageStatistics.yaml +10/−0
- fixture/ListCoverageStatisticsResponse.proto +0/−0
- fixture/ListDelegatedAdminAccounts.yaml +10/−0
- fixture/ListDelegatedAdminAccountsResponse.proto +0/−0
- fixture/ListFilters.yaml +10/−0
- fixture/ListFiltersResponse.proto +0/−0
- fixture/ListFindingAggregations.yaml +10/−0
- fixture/ListFindingAggregationsResponse.proto +0/−0
- fixture/ListFindings.yaml +10/−0
- fixture/ListFindingsResponse.proto +0/−0
- fixture/ListMembers.yaml +10/−0
- fixture/ListMembersResponse.proto +0/−0
- fixture/ListTagsForResource.yaml +10/−0
- fixture/ListTagsForResourceResponse.proto +0/−0
- fixture/ListUsageTotals.yaml +10/−0
- fixture/ListUsageTotalsResponse.proto +0/−0
- fixture/TagResource.yaml +10/−0
- fixture/TagResourceResponse.proto +0/−0
- fixture/UntagResource.yaml +10/−0
- fixture/UntagResourceResponse.proto +0/−0
- fixture/UpdateConfiguration.yaml +10/−0
- fixture/UpdateConfigurationResponse.proto +0/−0
- fixture/UpdateFilter.yaml +10/−0
- fixture/UpdateFilterResponse.proto +0/−0
- fixture/UpdateOrganizationConfiguration.yaml +10/−0
- fixture/UpdateOrganizationConfigurationResponse.proto +0/−0
- gen/Amazonka/Inspector2.hs +819/−0
- gen/Amazonka/Inspector2/AssociateMember.hs +172/−0
- gen/Amazonka/Inspector2/BatchGetAccountStatus.hs +188/−0
- gen/Amazonka/Inspector2/BatchGetFreeTrialInfo.hs +189/−0
- gen/Amazonka/Inspector2/CancelFindingsReport.hs +168/−0
- gen/Amazonka/Inspector2/CreateFilter.hs +247/−0
- gen/Amazonka/Inspector2/CreateFindingsReport.hs +202/−0
- gen/Amazonka/Inspector2/DeleteFilter.hs +162/−0
- gen/Amazonka/Inspector2/DescribeOrganizationConfiguration.hs +191/−0
- gen/Amazonka/Inspector2/Disable.hs +197/−0
- gen/Amazonka/Inspector2/DisableDelegatedAdminAccount.hs +193/−0
- gen/Amazonka/Inspector2/DisassociateMember.hs +175/−0
- gen/Amazonka/Inspector2/Enable.hs +212/−0
- gen/Amazonka/Inspector2/EnableDelegatedAdminAccount.hs +204/−0
- gen/Amazonka/Inspector2/GetConfiguration.hs +147/−0
- gen/Amazonka/Inspector2/GetDelegatedAdminAccount.hs +152/−0
- gen/Amazonka/Inspector2/GetFindingsReportStatus.hs +229/−0
- gen/Amazonka/Inspector2/GetMember.hs +164/−0
- gen/Amazonka/Inspector2/Lens.hs +918/−0
- gen/Amazonka/Inspector2/ListAccountPermissions.hs +253/−0
- gen/Amazonka/Inspector2/ListCoverage.hs +255/−0
- gen/Amazonka/Inspector2/ListCoverageStatistics.hs +272/−0
- gen/Amazonka/Inspector2/ListDelegatedAdminAccounts.hs +245/−0
- gen/Amazonka/Inspector2/ListFilters.hs +253/−0
- gen/Amazonka/Inspector2/ListFindingAggregations.hs +304/−0
- gen/Amazonka/Inspector2/ListFindings.hs +258/−0
- gen/Amazonka/Inspector2/ListMembers.hs +243/−0
- gen/Amazonka/Inspector2/ListTagsForResource.hs +159/−0
- gen/Amazonka/Inspector2/ListUsageTotals.hs +241/−0
- gen/Amazonka/Inspector2/TagResource.hs +163/−0
- gen/Amazonka/Inspector2/Types.hs +1220/−0
- gen/Amazonka/Inspector2/Types/Account.hs +105/−0
- gen/Amazonka/Inspector2/Types/AccountAggregation.hs +112/−0
- gen/Amazonka/Inspector2/Types/AccountAggregationResponse.hs +86/−0
- gen/Amazonka/Inspector2/Types/AccountSortBy.hs +76/−0
- gen/Amazonka/Inspector2/Types/AccountState.hs +108/−0
- gen/Amazonka/Inspector2/Types/AggregationFindingType.hs +71/−0
- gen/Amazonka/Inspector2/Types/AggregationRequest.hs +241/−0
- gen/Amazonka/Inspector2/Types/AggregationResourceType.hs +76/−0
- gen/Amazonka/Inspector2/Types/AggregationResponse.hs +232/−0
- gen/Amazonka/Inspector2/Types/AggregationType.hs +116/−0
- gen/Amazonka/Inspector2/Types/AmiAggregation.hs +99/−0
- gen/Amazonka/Inspector2/Types/AmiAggregationResponse.hs +112/−0
- gen/Amazonka/Inspector2/Types/AmiSortBy.hs +81/−0
- gen/Amazonka/Inspector2/Types/Architecture.hs +71/−0
- gen/Amazonka/Inspector2/Types/AutoEnable.hs +120/−0
- gen/Amazonka/Inspector2/Types/AwsEc2InstanceDetails.hs +181/−0
- gen/Amazonka/Inspector2/Types/AwsEcrContainerAggregation.hs +147/−0
- gen/Amazonka/Inspector2/Types/AwsEcrContainerAggregationResponse.hs +162/−0
- gen/Amazonka/Inspector2/Types/AwsEcrContainerImageDetails.hs +166/−0
- gen/Amazonka/Inspector2/Types/AwsEcrContainerSortBy.hs +76/−0
- gen/Amazonka/Inspector2/Types/AwsLambdaFunctionDetails.hs +218/−0
- gen/Amazonka/Inspector2/Types/Counts.hs +86/−0
- gen/Amazonka/Inspector2/Types/CoverageFilterCriteria.hs +234/−0
- gen/Amazonka/Inspector2/Types/CoverageMapComparison.hs +66/−0
- gen/Amazonka/Inspector2/Types/CoverageMapFilter.hs +100/−0
- gen/Amazonka/Inspector2/Types/CoverageResourceType.hs +81/−0
- gen/Amazonka/Inspector2/Types/CoverageStringComparison.hs +71/−0
- gen/Amazonka/Inspector2/Types/CoverageStringFilter.hs +88/−0
- gen/Amazonka/Inspector2/Types/CoveredResource.hs +150/−0
- gen/Amazonka/Inspector2/Types/Currency.hs +66/−0
- gen/Amazonka/Inspector2/Types/CvssScore.hs +120/−0
- gen/Amazonka/Inspector2/Types/CvssScoreAdjustment.hs +88/−0
- gen/Amazonka/Inspector2/Types/CvssScoreDetails.hs +148/−0
- gen/Amazonka/Inspector2/Types/DateFilter.hs +94/−0
- gen/Amazonka/Inspector2/Types/DelegatedAdmin.hs +89/−0
- gen/Amazonka/Inspector2/Types/DelegatedAdminAccount.hs +89/−0
- gen/Amazonka/Inspector2/Types/DelegatedAdminStatus.hs +71/−0
- gen/Amazonka/Inspector2/Types/Destination.hs +111/−0
- gen/Amazonka/Inspector2/Types/Ec2InstanceAggregation.hs +145/−0
- gen/Amazonka/Inspector2/Types/Ec2InstanceAggregationResponse.hs +157/−0
- gen/Amazonka/Inspector2/Types/Ec2InstanceSortBy.hs +81/−0
- gen/Amazonka/Inspector2/Types/Ec2Metadata.hs +97/−0
- gen/Amazonka/Inspector2/Types/Ec2Platform.hs +76/−0
- gen/Amazonka/Inspector2/Types/EcrConfiguration.hs +88/−0
- gen/Amazonka/Inspector2/Types/EcrConfigurationState.hs +76/−0
- gen/Amazonka/Inspector2/Types/EcrContainerImageMetadata.hs +68/−0
- gen/Amazonka/Inspector2/Types/EcrRepositoryMetadata.hs +86/−0
- gen/Amazonka/Inspector2/Types/EcrRescanDuration.hs +76/−0
- gen/Amazonka/Inspector2/Types/EcrRescanDurationState.hs +115/−0
- gen/Amazonka/Inspector2/Types/EcrRescanDurationStatus.hs +76/−0
- gen/Amazonka/Inspector2/Types/EcrScanFrequency.hs +76/−0
- gen/Amazonka/Inspector2/Types/ErrorCode.hs +131/−0
- gen/Amazonka/Inspector2/Types/ExploitAvailable.hs +71/−0
- gen/Amazonka/Inspector2/Types/ExploitabilityDetails.hs +76/−0
- gen/Amazonka/Inspector2/Types/ExternalReportStatus.hs +81/−0
- gen/Amazonka/Inspector2/Types/FailedAccount.hs +142/−0
- gen/Amazonka/Inspector2/Types/Filter.hs +206/−0
- gen/Amazonka/Inspector2/Types/FilterAction.hs +71/−0
- gen/Amazonka/Inspector2/Types/FilterCriteria.hs +650/−0
- gen/Amazonka/Inspector2/Types/Finding.hs +342/−0
- gen/Amazonka/Inspector2/Types/FindingStatus.hs +76/−0
- gen/Amazonka/Inspector2/Types/FindingType.hs +71/−0
- gen/Amazonka/Inspector2/Types/FindingTypeAggregation.hs +112/−0
- gen/Amazonka/Inspector2/Types/FindingTypeAggregationResponse.hs +94/−0
- gen/Amazonka/Inspector2/Types/FindingTypeSortBy.hs +76/−0
- gen/Amazonka/Inspector2/Types/FixAvailable.hs +76/−0
- gen/Amazonka/Inspector2/Types/FreeTrialAccountInfo.hs +90/−0
- gen/Amazonka/Inspector2/Types/FreeTrialInfo.hs +125/−0
- gen/Amazonka/Inspector2/Types/FreeTrialInfoError.hs +104/−0
- gen/Amazonka/Inspector2/Types/FreeTrialInfoErrorCode.hs +71/−0
- gen/Amazonka/Inspector2/Types/FreeTrialStatus.hs +71/−0
- gen/Amazonka/Inspector2/Types/FreeTrialType.hs +76/−0
- gen/Amazonka/Inspector2/Types/GroupKey.hs +86/−0
- gen/Amazonka/Inspector2/Types/ImageLayerAggregation.hs +123/−0
- gen/Amazonka/Inspector2/Types/ImageLayerAggregationResponse.hs +141/−0
- gen/Amazonka/Inspector2/Types/ImageLayerSortBy.hs +76/−0
- gen/Amazonka/Inspector2/Types/InspectorScoreDetails.hs +73/−0
- gen/Amazonka/Inspector2/Types/LambdaFunctionAggregation.hs +137/−0
- gen/Amazonka/Inspector2/Types/LambdaFunctionAggregationResponse.hs +162/−0
- gen/Amazonka/Inspector2/Types/LambdaFunctionMetadata.hs +113/−0
- gen/Amazonka/Inspector2/Types/LambdaFunctionSortBy.hs +76/−0
- gen/Amazonka/Inspector2/Types/LambdaLayerAggregation.hs +124/−0
- gen/Amazonka/Inspector2/Types/LambdaLayerAggregationResponse.hs +142/−0
- gen/Amazonka/Inspector2/Types/LambdaLayerSortBy.hs +76/−0
- gen/Amazonka/Inspector2/Types/LambdaVpcConfig.hs +108/−0
- gen/Amazonka/Inspector2/Types/MapComparison.hs +66/−0
- gen/Amazonka/Inspector2/Types/MapFilter.hs +111/−0
- gen/Amazonka/Inspector2/Types/Member.hs +112/−0
- gen/Amazonka/Inspector2/Types/NetworkPath.hs +68/−0
- gen/Amazonka/Inspector2/Types/NetworkProtocol.hs +71/−0
- gen/Amazonka/Inspector2/Types/NetworkReachabilityDetails.hs +115/−0
- gen/Amazonka/Inspector2/Types/NumberFilter.hs +95/−0
- gen/Amazonka/Inspector2/Types/Operation.hs +81/−0
- gen/Amazonka/Inspector2/Types/PackageAggregation.hs +99/−0
- gen/Amazonka/Inspector2/Types/PackageAggregationResponse.hs +101/−0
- gen/Amazonka/Inspector2/Types/PackageFilter.hs +164/−0
- gen/Amazonka/Inspector2/Types/PackageManager.hs +141/−0
- gen/Amazonka/Inspector2/Types/PackageSortBy.hs +76/−0
- gen/Amazonka/Inspector2/Types/PackageType.hs +71/−0
- gen/Amazonka/Inspector2/Types/PackageVulnerabilityDetails.hs +204/−0
- gen/Amazonka/Inspector2/Types/Permission.hs +94/−0
- gen/Amazonka/Inspector2/Types/PortRange.hs +84/−0
- gen/Amazonka/Inspector2/Types/PortRangeFilter.hs +94/−0
- gen/Amazonka/Inspector2/Types/Recommendation.hs +83/−0
- gen/Amazonka/Inspector2/Types/RelationshipStatus.hs +121/−0
- gen/Amazonka/Inspector2/Types/Remediation.hs +72/−0
- gen/Amazonka/Inspector2/Types/ReportFormat.hs +71/−0
- gen/Amazonka/Inspector2/Types/ReportingErrorCode.hs +91/−0
- gen/Amazonka/Inspector2/Types/RepositoryAggregation.hs +99/−0
- gen/Amazonka/Inspector2/Types/RepositoryAggregationResponse.hs +116/−0
- gen/Amazonka/Inspector2/Types/RepositorySortBy.hs +81/−0
- gen/Amazonka/Inspector2/Types/Resource.hs +141/−0
- gen/Amazonka/Inspector2/Types/ResourceDetails.hs +108/−0
- gen/Amazonka/Inspector2/Types/ResourceScanMetadata.hs +119/−0
- gen/Amazonka/Inspector2/Types/ResourceScanType.hs +76/−0
- gen/Amazonka/Inspector2/Types/ResourceState.hs +107/−0
- gen/Amazonka/Inspector2/Types/ResourceStatus.hs +105/−0
- gen/Amazonka/Inspector2/Types/ResourceType.hs +81/−0
- gen/Amazonka/Inspector2/Types/Runtime.hs +123/−0
- gen/Amazonka/Inspector2/Types/ScanStatus.hs +90/−0
- gen/Amazonka/Inspector2/Types/ScanStatusCode.hs +71/−0
- gen/Amazonka/Inspector2/Types/ScanStatusReason.hs +151/−0
- gen/Amazonka/Inspector2/Types/ScanType.hs +71/−0
- gen/Amazonka/Inspector2/Types/Service.hs +73/−0
- gen/Amazonka/Inspector2/Types/Severity.hs +91/−0
- gen/Amazonka/Inspector2/Types/SeverityCounts.hs +108/−0
- gen/Amazonka/Inspector2/Types/SortCriteria.hs +89/−0
- gen/Amazonka/Inspector2/Types/SortField.hs +141/−0
- gen/Amazonka/Inspector2/Types/SortOrder.hs +71/−0
- gen/Amazonka/Inspector2/Types/State.hs +111/−0
- gen/Amazonka/Inspector2/Types/Status.hs +88/−0
- gen/Amazonka/Inspector2/Types/Step.hs +88/−0
- gen/Amazonka/Inspector2/Types/StringComparison.hs +76/−0
- gen/Amazonka/Inspector2/Types/StringFilter.hs +98/−0
- gen/Amazonka/Inspector2/Types/TitleAggregation.hs +124/−0
- gen/Amazonka/Inspector2/Types/TitleAggregationResponse.hs +113/−0
- gen/Amazonka/Inspector2/Types/TitleSortBy.hs +76/−0
- gen/Amazonka/Inspector2/Types/Usage.hs +110/−0
- gen/Amazonka/Inspector2/Types/UsageTotal.hs +85/−0
- gen/Amazonka/Inspector2/Types/UsageType.hs +81/−0
- gen/Amazonka/Inspector2/Types/VulnerablePackage.hs +203/−0
- gen/Amazonka/Inspector2/UntagResource.hs +161/−0
- gen/Amazonka/Inspector2/UpdateConfiguration.hs +164/−0
- gen/Amazonka/Inspector2/UpdateFilter.hs +238/−0
- gen/Amazonka/Inspector2/UpdateOrganizationConfiguration.hs +196/−0
- gen/Amazonka/Inspector2/Waiters.hs +24/−0
- src/.gitkeep +0/−0
- test/Main.hs +23/−0
- test/Test/Amazonka/Gen/Inspector2.hs +678/−0
- test/Test/Amazonka/Inspector2.hs +20/−0
- test/Test/Amazonka/Inspector2/Internal.hs +8/−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 Inspector2 SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2020-06-08@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-inspector2)+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.Inspector2](http://hackage.haskell.org/package/amazonka-inspector2/docs/Amazonka-Inspector2.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-inspector2` 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-inspector2.cabal view
@@ -0,0 +1,256 @@+cabal-version: 2.2+name: amazonka-inspector2+version: 2.0+synopsis: Amazon Inspector2 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 @2020-06-08@ 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.Inspector2.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.Inspector2" 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-inspector2++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.Inspector2+ Amazonka.Inspector2.AssociateMember+ Amazonka.Inspector2.BatchGetAccountStatus+ Amazonka.Inspector2.BatchGetFreeTrialInfo+ Amazonka.Inspector2.CancelFindingsReport+ Amazonka.Inspector2.CreateFilter+ Amazonka.Inspector2.CreateFindingsReport+ Amazonka.Inspector2.DeleteFilter+ Amazonka.Inspector2.DescribeOrganizationConfiguration+ Amazonka.Inspector2.Disable+ Amazonka.Inspector2.DisableDelegatedAdminAccount+ Amazonka.Inspector2.DisassociateMember+ Amazonka.Inspector2.Enable+ Amazonka.Inspector2.EnableDelegatedAdminAccount+ Amazonka.Inspector2.GetConfiguration+ Amazonka.Inspector2.GetDelegatedAdminAccount+ Amazonka.Inspector2.GetFindingsReportStatus+ Amazonka.Inspector2.GetMember+ Amazonka.Inspector2.Lens+ Amazonka.Inspector2.ListAccountPermissions+ Amazonka.Inspector2.ListCoverage+ Amazonka.Inspector2.ListCoverageStatistics+ Amazonka.Inspector2.ListDelegatedAdminAccounts+ Amazonka.Inspector2.ListFilters+ Amazonka.Inspector2.ListFindingAggregations+ Amazonka.Inspector2.ListFindings+ Amazonka.Inspector2.ListMembers+ Amazonka.Inspector2.ListTagsForResource+ Amazonka.Inspector2.ListUsageTotals+ Amazonka.Inspector2.TagResource+ Amazonka.Inspector2.Types+ Amazonka.Inspector2.Types.Account+ Amazonka.Inspector2.Types.AccountAggregation+ Amazonka.Inspector2.Types.AccountAggregationResponse+ Amazonka.Inspector2.Types.AccountSortBy+ Amazonka.Inspector2.Types.AccountState+ Amazonka.Inspector2.Types.AggregationFindingType+ Amazonka.Inspector2.Types.AggregationRequest+ Amazonka.Inspector2.Types.AggregationResourceType+ Amazonka.Inspector2.Types.AggregationResponse+ Amazonka.Inspector2.Types.AggregationType+ Amazonka.Inspector2.Types.AmiAggregation+ Amazonka.Inspector2.Types.AmiAggregationResponse+ Amazonka.Inspector2.Types.AmiSortBy+ Amazonka.Inspector2.Types.Architecture+ Amazonka.Inspector2.Types.AutoEnable+ Amazonka.Inspector2.Types.AwsEc2InstanceDetails+ Amazonka.Inspector2.Types.AwsEcrContainerAggregation+ Amazonka.Inspector2.Types.AwsEcrContainerAggregationResponse+ Amazonka.Inspector2.Types.AwsEcrContainerImageDetails+ Amazonka.Inspector2.Types.AwsEcrContainerSortBy+ Amazonka.Inspector2.Types.AwsLambdaFunctionDetails+ Amazonka.Inspector2.Types.Counts+ Amazonka.Inspector2.Types.CoverageFilterCriteria+ Amazonka.Inspector2.Types.CoverageMapComparison+ Amazonka.Inspector2.Types.CoverageMapFilter+ Amazonka.Inspector2.Types.CoverageResourceType+ Amazonka.Inspector2.Types.CoverageStringComparison+ Amazonka.Inspector2.Types.CoverageStringFilter+ Amazonka.Inspector2.Types.CoveredResource+ Amazonka.Inspector2.Types.Currency+ Amazonka.Inspector2.Types.CvssScore+ Amazonka.Inspector2.Types.CvssScoreAdjustment+ Amazonka.Inspector2.Types.CvssScoreDetails+ Amazonka.Inspector2.Types.DateFilter+ Amazonka.Inspector2.Types.DelegatedAdmin+ Amazonka.Inspector2.Types.DelegatedAdminAccount+ Amazonka.Inspector2.Types.DelegatedAdminStatus+ Amazonka.Inspector2.Types.Destination+ Amazonka.Inspector2.Types.Ec2InstanceAggregation+ Amazonka.Inspector2.Types.Ec2InstanceAggregationResponse+ Amazonka.Inspector2.Types.Ec2InstanceSortBy+ Amazonka.Inspector2.Types.Ec2Metadata+ Amazonka.Inspector2.Types.Ec2Platform+ Amazonka.Inspector2.Types.EcrConfiguration+ Amazonka.Inspector2.Types.EcrConfigurationState+ Amazonka.Inspector2.Types.EcrContainerImageMetadata+ Amazonka.Inspector2.Types.EcrRepositoryMetadata+ Amazonka.Inspector2.Types.EcrRescanDuration+ Amazonka.Inspector2.Types.EcrRescanDurationState+ Amazonka.Inspector2.Types.EcrRescanDurationStatus+ Amazonka.Inspector2.Types.EcrScanFrequency+ Amazonka.Inspector2.Types.ErrorCode+ Amazonka.Inspector2.Types.ExploitabilityDetails+ Amazonka.Inspector2.Types.ExploitAvailable+ Amazonka.Inspector2.Types.ExternalReportStatus+ Amazonka.Inspector2.Types.FailedAccount+ Amazonka.Inspector2.Types.Filter+ Amazonka.Inspector2.Types.FilterAction+ Amazonka.Inspector2.Types.FilterCriteria+ Amazonka.Inspector2.Types.Finding+ Amazonka.Inspector2.Types.FindingStatus+ Amazonka.Inspector2.Types.FindingType+ Amazonka.Inspector2.Types.FindingTypeAggregation+ Amazonka.Inspector2.Types.FindingTypeAggregationResponse+ Amazonka.Inspector2.Types.FindingTypeSortBy+ Amazonka.Inspector2.Types.FixAvailable+ Amazonka.Inspector2.Types.FreeTrialAccountInfo+ Amazonka.Inspector2.Types.FreeTrialInfo+ Amazonka.Inspector2.Types.FreeTrialInfoError+ Amazonka.Inspector2.Types.FreeTrialInfoErrorCode+ Amazonka.Inspector2.Types.FreeTrialStatus+ Amazonka.Inspector2.Types.FreeTrialType+ Amazonka.Inspector2.Types.GroupKey+ Amazonka.Inspector2.Types.ImageLayerAggregation+ Amazonka.Inspector2.Types.ImageLayerAggregationResponse+ Amazonka.Inspector2.Types.ImageLayerSortBy+ Amazonka.Inspector2.Types.InspectorScoreDetails+ Amazonka.Inspector2.Types.LambdaFunctionAggregation+ Amazonka.Inspector2.Types.LambdaFunctionAggregationResponse+ Amazonka.Inspector2.Types.LambdaFunctionMetadata+ Amazonka.Inspector2.Types.LambdaFunctionSortBy+ Amazonka.Inspector2.Types.LambdaLayerAggregation+ Amazonka.Inspector2.Types.LambdaLayerAggregationResponse+ Amazonka.Inspector2.Types.LambdaLayerSortBy+ Amazonka.Inspector2.Types.LambdaVpcConfig+ Amazonka.Inspector2.Types.MapComparison+ Amazonka.Inspector2.Types.MapFilter+ Amazonka.Inspector2.Types.Member+ Amazonka.Inspector2.Types.NetworkPath+ Amazonka.Inspector2.Types.NetworkProtocol+ Amazonka.Inspector2.Types.NetworkReachabilityDetails+ Amazonka.Inspector2.Types.NumberFilter+ Amazonka.Inspector2.Types.Operation+ Amazonka.Inspector2.Types.PackageAggregation+ Amazonka.Inspector2.Types.PackageAggregationResponse+ Amazonka.Inspector2.Types.PackageFilter+ Amazonka.Inspector2.Types.PackageManager+ Amazonka.Inspector2.Types.PackageSortBy+ Amazonka.Inspector2.Types.PackageType+ Amazonka.Inspector2.Types.PackageVulnerabilityDetails+ Amazonka.Inspector2.Types.Permission+ Amazonka.Inspector2.Types.PortRange+ Amazonka.Inspector2.Types.PortRangeFilter+ Amazonka.Inspector2.Types.Recommendation+ Amazonka.Inspector2.Types.RelationshipStatus+ Amazonka.Inspector2.Types.Remediation+ Amazonka.Inspector2.Types.ReportFormat+ Amazonka.Inspector2.Types.ReportingErrorCode+ Amazonka.Inspector2.Types.RepositoryAggregation+ Amazonka.Inspector2.Types.RepositoryAggregationResponse+ Amazonka.Inspector2.Types.RepositorySortBy+ Amazonka.Inspector2.Types.Resource+ Amazonka.Inspector2.Types.ResourceDetails+ Amazonka.Inspector2.Types.ResourceScanMetadata+ Amazonka.Inspector2.Types.ResourceScanType+ Amazonka.Inspector2.Types.ResourceState+ Amazonka.Inspector2.Types.ResourceStatus+ Amazonka.Inspector2.Types.ResourceType+ Amazonka.Inspector2.Types.Runtime+ Amazonka.Inspector2.Types.ScanStatus+ Amazonka.Inspector2.Types.ScanStatusCode+ Amazonka.Inspector2.Types.ScanStatusReason+ Amazonka.Inspector2.Types.ScanType+ Amazonka.Inspector2.Types.Service+ Amazonka.Inspector2.Types.Severity+ Amazonka.Inspector2.Types.SeverityCounts+ Amazonka.Inspector2.Types.SortCriteria+ Amazonka.Inspector2.Types.SortField+ Amazonka.Inspector2.Types.SortOrder+ Amazonka.Inspector2.Types.State+ Amazonka.Inspector2.Types.Status+ Amazonka.Inspector2.Types.Step+ Amazonka.Inspector2.Types.StringComparison+ Amazonka.Inspector2.Types.StringFilter+ Amazonka.Inspector2.Types.TitleAggregation+ Amazonka.Inspector2.Types.TitleAggregationResponse+ Amazonka.Inspector2.Types.TitleSortBy+ Amazonka.Inspector2.Types.Usage+ Amazonka.Inspector2.Types.UsageTotal+ Amazonka.Inspector2.Types.UsageType+ Amazonka.Inspector2.Types.VulnerablePackage+ Amazonka.Inspector2.UntagResource+ Amazonka.Inspector2.UpdateConfiguration+ Amazonka.Inspector2.UpdateFilter+ Amazonka.Inspector2.UpdateOrganizationConfiguration+ Amazonka.Inspector2.Waiters++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , base >=4.12 && <5++test-suite amazonka-inspector2-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.Gen.Inspector2+ Test.Amazonka.Inspector2+ Test.Amazonka.Inspector2.Internal++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , amazonka-inspector2+ , amazonka-test >=2.0 && <2.1+ , base+ , bytestring+ , case-insensitive+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/AssociateMember.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/AssociateMemberResponse.proto view
+ fixture/BatchGetAccountStatus.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/BatchGetAccountStatusResponse.proto view
+ fixture/BatchGetFreeTrialInfo.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/BatchGetFreeTrialInfoResponse.proto view
+ fixture/CancelFindingsReport.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/CancelFindingsReportResponse.proto view
+ fixture/CreateFilter.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/CreateFilterResponse.proto view
+ fixture/CreateFindingsReport.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/CreateFindingsReportResponse.proto view
+ fixture/DeleteFilter.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/DeleteFilterResponse.proto view
+ fixture/DescribeOrganizationConfiguration.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/Disable.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/DisableDelegatedAdminAccount.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/DisableDelegatedAdminAccountResponse.proto view
+ fixture/DisableResponse.proto view
+ fixture/DisassociateMember.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/DisassociateMemberResponse.proto view
+ fixture/Enable.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/EnableDelegatedAdminAccount.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/EnableDelegatedAdminAccountResponse.proto view
+ fixture/EnableResponse.proto view
+ fixture/GetConfiguration.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/GetConfigurationResponse.proto view
+ fixture/GetDelegatedAdminAccount.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/GetDelegatedAdminAccountResponse.proto view
+ fixture/GetFindingsReportStatus.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/GetFindingsReportStatusResponse.proto view
+ fixture/GetMember.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/GetMemberResponse.proto view
+ fixture/ListAccountPermissions.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/ListAccountPermissionsResponse.proto view
+ fixture/ListCoverage.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/ListCoverageResponse.proto view
+ fixture/ListCoverageStatistics.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/ListCoverageStatisticsResponse.proto view
+ fixture/ListDelegatedAdminAccounts.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/ListDelegatedAdminAccountsResponse.proto view
+ fixture/ListFilters.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/ListFiltersResponse.proto view
+ fixture/ListFindingAggregations.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/ListFindingAggregationsResponse.proto view
+ fixture/ListFindings.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/ListFindingsResponse.proto view
+ fixture/ListMembers.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/ListTagsForResource.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/ListUsageTotals.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/ListUsageTotalsResponse.proto view
+ fixture/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/UpdateConfiguration.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/UpdateConfigurationResponse.proto view
+ fixture/UpdateFilter.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/UpdateFilterResponse.proto view
+ fixture/UpdateOrganizationConfiguration.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/inspector2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: inspector2.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/Inspector2.hs view
@@ -0,0 +1,819 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Amazonka.Inspector2+-- 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 @2020-06-08@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- Amazon Inspector is a vulnerability discovery service that automates+-- continuous scanning for security vulnerabilities within your Amazon EC2+-- and Amazon ECR environments.+module Amazonka.Inspector2+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ -- $errors++ -- ** AccessDeniedException+ _AccessDeniedException,++ -- ** BadRequestException+ _BadRequestException,++ -- ** ConflictException+ _ConflictException,++ -- ** InternalServerException+ _InternalServerException,++ -- ** ResourceNotFoundException+ _ResourceNotFoundException,++ -- ** ServiceQuotaExceededException+ _ServiceQuotaExceededException,++ -- ** ThrottlingException+ _ThrottlingException,++ -- ** ValidationException+ _ValidationException,++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** AssociateMember+ AssociateMember (AssociateMember'),+ newAssociateMember,+ AssociateMemberResponse (AssociateMemberResponse'),+ newAssociateMemberResponse,++ -- ** BatchGetAccountStatus+ BatchGetAccountStatus (BatchGetAccountStatus'),+ newBatchGetAccountStatus,+ BatchGetAccountStatusResponse (BatchGetAccountStatusResponse'),+ newBatchGetAccountStatusResponse,++ -- ** BatchGetFreeTrialInfo+ BatchGetFreeTrialInfo (BatchGetFreeTrialInfo'),+ newBatchGetFreeTrialInfo,+ BatchGetFreeTrialInfoResponse (BatchGetFreeTrialInfoResponse'),+ newBatchGetFreeTrialInfoResponse,++ -- ** CancelFindingsReport+ CancelFindingsReport (CancelFindingsReport'),+ newCancelFindingsReport,+ CancelFindingsReportResponse (CancelFindingsReportResponse'),+ newCancelFindingsReportResponse,++ -- ** CreateFilter+ CreateFilter (CreateFilter'),+ newCreateFilter,+ CreateFilterResponse (CreateFilterResponse'),+ newCreateFilterResponse,++ -- ** CreateFindingsReport+ CreateFindingsReport (CreateFindingsReport'),+ newCreateFindingsReport,+ CreateFindingsReportResponse (CreateFindingsReportResponse'),+ newCreateFindingsReportResponse,++ -- ** DeleteFilter+ DeleteFilter (DeleteFilter'),+ newDeleteFilter,+ DeleteFilterResponse (DeleteFilterResponse'),+ newDeleteFilterResponse,++ -- ** DescribeOrganizationConfiguration+ DescribeOrganizationConfiguration (DescribeOrganizationConfiguration'),+ newDescribeOrganizationConfiguration,+ DescribeOrganizationConfigurationResponse (DescribeOrganizationConfigurationResponse'),+ newDescribeOrganizationConfigurationResponse,++ -- ** Disable+ Disable (Disable'),+ newDisable,+ DisableResponse (DisableResponse'),+ newDisableResponse,++ -- ** DisableDelegatedAdminAccount+ DisableDelegatedAdminAccount (DisableDelegatedAdminAccount'),+ newDisableDelegatedAdminAccount,+ DisableDelegatedAdminAccountResponse (DisableDelegatedAdminAccountResponse'),+ newDisableDelegatedAdminAccountResponse,++ -- ** DisassociateMember+ DisassociateMember (DisassociateMember'),+ newDisassociateMember,+ DisassociateMemberResponse (DisassociateMemberResponse'),+ newDisassociateMemberResponse,++ -- ** Enable+ Enable (Enable'),+ newEnable,+ EnableResponse (EnableResponse'),+ newEnableResponse,++ -- ** EnableDelegatedAdminAccount+ EnableDelegatedAdminAccount (EnableDelegatedAdminAccount'),+ newEnableDelegatedAdminAccount,+ EnableDelegatedAdminAccountResponse (EnableDelegatedAdminAccountResponse'),+ newEnableDelegatedAdminAccountResponse,++ -- ** GetConfiguration+ GetConfiguration (GetConfiguration'),+ newGetConfiguration,+ GetConfigurationResponse (GetConfigurationResponse'),+ newGetConfigurationResponse,++ -- ** GetDelegatedAdminAccount+ GetDelegatedAdminAccount (GetDelegatedAdminAccount'),+ newGetDelegatedAdminAccount,+ GetDelegatedAdminAccountResponse (GetDelegatedAdminAccountResponse'),+ newGetDelegatedAdminAccountResponse,++ -- ** GetFindingsReportStatus+ GetFindingsReportStatus (GetFindingsReportStatus'),+ newGetFindingsReportStatus,+ GetFindingsReportStatusResponse (GetFindingsReportStatusResponse'),+ newGetFindingsReportStatusResponse,++ -- ** GetMember+ GetMember (GetMember'),+ newGetMember,+ GetMemberResponse (GetMemberResponse'),+ newGetMemberResponse,++ -- ** ListAccountPermissions (Paginated)+ ListAccountPermissions (ListAccountPermissions'),+ newListAccountPermissions,+ ListAccountPermissionsResponse (ListAccountPermissionsResponse'),+ newListAccountPermissionsResponse,++ -- ** ListCoverage (Paginated)+ ListCoverage (ListCoverage'),+ newListCoverage,+ ListCoverageResponse (ListCoverageResponse'),+ newListCoverageResponse,++ -- ** ListCoverageStatistics (Paginated)+ ListCoverageStatistics (ListCoverageStatistics'),+ newListCoverageStatistics,+ ListCoverageStatisticsResponse (ListCoverageStatisticsResponse'),+ newListCoverageStatisticsResponse,++ -- ** ListDelegatedAdminAccounts (Paginated)+ ListDelegatedAdminAccounts (ListDelegatedAdminAccounts'),+ newListDelegatedAdminAccounts,+ ListDelegatedAdminAccountsResponse (ListDelegatedAdminAccountsResponse'),+ newListDelegatedAdminAccountsResponse,++ -- ** ListFilters (Paginated)+ ListFilters (ListFilters'),+ newListFilters,+ ListFiltersResponse (ListFiltersResponse'),+ newListFiltersResponse,++ -- ** ListFindingAggregations (Paginated)+ ListFindingAggregations (ListFindingAggregations'),+ newListFindingAggregations,+ ListFindingAggregationsResponse (ListFindingAggregationsResponse'),+ newListFindingAggregationsResponse,++ -- ** ListFindings (Paginated)+ ListFindings (ListFindings'),+ newListFindings,+ ListFindingsResponse (ListFindingsResponse'),+ newListFindingsResponse,++ -- ** ListMembers (Paginated)+ ListMembers (ListMembers'),+ newListMembers,+ ListMembersResponse (ListMembersResponse'),+ newListMembersResponse,++ -- ** ListTagsForResource+ ListTagsForResource (ListTagsForResource'),+ newListTagsForResource,+ ListTagsForResourceResponse (ListTagsForResourceResponse'),+ newListTagsForResourceResponse,++ -- ** ListUsageTotals (Paginated)+ ListUsageTotals (ListUsageTotals'),+ newListUsageTotals,+ ListUsageTotalsResponse (ListUsageTotalsResponse'),+ newListUsageTotalsResponse,++ -- ** TagResource+ TagResource (TagResource'),+ newTagResource,+ TagResourceResponse (TagResourceResponse'),+ newTagResourceResponse,++ -- ** UntagResource+ UntagResource (UntagResource'),+ newUntagResource,+ UntagResourceResponse (UntagResourceResponse'),+ newUntagResourceResponse,++ -- ** UpdateConfiguration+ UpdateConfiguration (UpdateConfiguration'),+ newUpdateConfiguration,+ UpdateConfigurationResponse (UpdateConfigurationResponse'),+ newUpdateConfigurationResponse,++ -- ** UpdateFilter+ UpdateFilter (UpdateFilter'),+ newUpdateFilter,+ UpdateFilterResponse (UpdateFilterResponse'),+ newUpdateFilterResponse,++ -- ** UpdateOrganizationConfiguration+ UpdateOrganizationConfiguration (UpdateOrganizationConfiguration'),+ newUpdateOrganizationConfiguration,+ UpdateOrganizationConfigurationResponse (UpdateOrganizationConfigurationResponse'),+ newUpdateOrganizationConfigurationResponse,++ -- * Types++ -- ** AccountSortBy+ AccountSortBy (..),++ -- ** AggregationFindingType+ AggregationFindingType (..),++ -- ** AggregationResourceType+ AggregationResourceType (..),++ -- ** AggregationType+ AggregationType (..),++ -- ** AmiSortBy+ AmiSortBy (..),++ -- ** Architecture+ Architecture (..),++ -- ** AwsEcrContainerSortBy+ AwsEcrContainerSortBy (..),++ -- ** CoverageMapComparison+ CoverageMapComparison (..),++ -- ** CoverageResourceType+ CoverageResourceType (..),++ -- ** CoverageStringComparison+ CoverageStringComparison (..),++ -- ** Currency+ Currency (..),++ -- ** DelegatedAdminStatus+ DelegatedAdminStatus (..),++ -- ** Ec2InstanceSortBy+ Ec2InstanceSortBy (..),++ -- ** Ec2Platform+ Ec2Platform (..),++ -- ** EcrRescanDuration+ EcrRescanDuration (..),++ -- ** EcrRescanDurationStatus+ EcrRescanDurationStatus (..),++ -- ** EcrScanFrequency+ EcrScanFrequency (..),++ -- ** ErrorCode+ ErrorCode (..),++ -- ** ExploitAvailable+ ExploitAvailable (..),++ -- ** ExternalReportStatus+ ExternalReportStatus (..),++ -- ** FilterAction+ FilterAction (..),++ -- ** FindingStatus+ FindingStatus (..),++ -- ** FindingType+ FindingType (..),++ -- ** FindingTypeSortBy+ FindingTypeSortBy (..),++ -- ** FixAvailable+ FixAvailable (..),++ -- ** FreeTrialInfoErrorCode+ FreeTrialInfoErrorCode (..),++ -- ** FreeTrialStatus+ FreeTrialStatus (..),++ -- ** FreeTrialType+ FreeTrialType (..),++ -- ** GroupKey+ GroupKey (..),++ -- ** ImageLayerSortBy+ ImageLayerSortBy (..),++ -- ** LambdaFunctionSortBy+ LambdaFunctionSortBy (..),++ -- ** LambdaLayerSortBy+ LambdaLayerSortBy (..),++ -- ** MapComparison+ MapComparison (..),++ -- ** NetworkProtocol+ NetworkProtocol (..),++ -- ** Operation+ Operation (..),++ -- ** PackageManager+ PackageManager (..),++ -- ** PackageSortBy+ PackageSortBy (..),++ -- ** PackageType+ PackageType (..),++ -- ** RelationshipStatus+ RelationshipStatus (..),++ -- ** ReportFormat+ ReportFormat (..),++ -- ** ReportingErrorCode+ ReportingErrorCode (..),++ -- ** RepositorySortBy+ RepositorySortBy (..),++ -- ** ResourceScanType+ ResourceScanType (..),++ -- ** ResourceType+ ResourceType (..),++ -- ** Runtime+ Runtime (..),++ -- ** ScanStatusCode+ ScanStatusCode (..),++ -- ** ScanStatusReason+ ScanStatusReason (..),++ -- ** ScanType+ ScanType (..),++ -- ** Service+ Service (..),++ -- ** Severity+ Severity (..),++ -- ** SortField+ SortField (..),++ -- ** SortOrder+ SortOrder (..),++ -- ** Status+ Status (..),++ -- ** StringComparison+ StringComparison (..),++ -- ** TitleSortBy+ TitleSortBy (..),++ -- ** UsageType+ UsageType (..),++ -- ** Account+ Account (Account'),+ newAccount,++ -- ** AccountAggregation+ AccountAggregation (AccountAggregation'),+ newAccountAggregation,++ -- ** AccountAggregationResponse+ AccountAggregationResponse (AccountAggregationResponse'),+ newAccountAggregationResponse,++ -- ** AccountState+ AccountState (AccountState'),+ newAccountState,++ -- ** AggregationRequest+ AggregationRequest (AggregationRequest'),+ newAggregationRequest,++ -- ** AggregationResponse+ AggregationResponse (AggregationResponse'),+ newAggregationResponse,++ -- ** AmiAggregation+ AmiAggregation (AmiAggregation'),+ newAmiAggregation,++ -- ** AmiAggregationResponse+ AmiAggregationResponse (AmiAggregationResponse'),+ newAmiAggregationResponse,++ -- ** AutoEnable+ AutoEnable (AutoEnable'),+ newAutoEnable,++ -- ** AwsEc2InstanceDetails+ AwsEc2InstanceDetails (AwsEc2InstanceDetails'),+ newAwsEc2InstanceDetails,++ -- ** AwsEcrContainerAggregation+ AwsEcrContainerAggregation (AwsEcrContainerAggregation'),+ newAwsEcrContainerAggregation,++ -- ** AwsEcrContainerAggregationResponse+ AwsEcrContainerAggregationResponse (AwsEcrContainerAggregationResponse'),+ newAwsEcrContainerAggregationResponse,++ -- ** AwsEcrContainerImageDetails+ AwsEcrContainerImageDetails (AwsEcrContainerImageDetails'),+ newAwsEcrContainerImageDetails,++ -- ** AwsLambdaFunctionDetails+ AwsLambdaFunctionDetails (AwsLambdaFunctionDetails'),+ newAwsLambdaFunctionDetails,++ -- ** Counts+ Counts (Counts'),+ newCounts,++ -- ** CoverageFilterCriteria+ CoverageFilterCriteria (CoverageFilterCriteria'),+ newCoverageFilterCriteria,++ -- ** CoverageMapFilter+ CoverageMapFilter (CoverageMapFilter'),+ newCoverageMapFilter,++ -- ** CoverageStringFilter+ CoverageStringFilter (CoverageStringFilter'),+ newCoverageStringFilter,++ -- ** CoveredResource+ CoveredResource (CoveredResource'),+ newCoveredResource,++ -- ** CvssScore+ CvssScore (CvssScore'),+ newCvssScore,++ -- ** CvssScoreAdjustment+ CvssScoreAdjustment (CvssScoreAdjustment'),+ newCvssScoreAdjustment,++ -- ** CvssScoreDetails+ CvssScoreDetails (CvssScoreDetails'),+ newCvssScoreDetails,++ -- ** DateFilter+ DateFilter (DateFilter'),+ newDateFilter,++ -- ** DelegatedAdmin+ DelegatedAdmin (DelegatedAdmin'),+ newDelegatedAdmin,++ -- ** DelegatedAdminAccount+ DelegatedAdminAccount (DelegatedAdminAccount'),+ newDelegatedAdminAccount,++ -- ** Destination+ Destination (Destination'),+ newDestination,++ -- ** Ec2InstanceAggregation+ Ec2InstanceAggregation (Ec2InstanceAggregation'),+ newEc2InstanceAggregation,++ -- ** Ec2InstanceAggregationResponse+ Ec2InstanceAggregationResponse (Ec2InstanceAggregationResponse'),+ newEc2InstanceAggregationResponse,++ -- ** Ec2Metadata+ Ec2Metadata (Ec2Metadata'),+ newEc2Metadata,++ -- ** EcrConfiguration+ EcrConfiguration (EcrConfiguration'),+ newEcrConfiguration,++ -- ** EcrConfigurationState+ EcrConfigurationState (EcrConfigurationState'),+ newEcrConfigurationState,++ -- ** EcrContainerImageMetadata+ EcrContainerImageMetadata (EcrContainerImageMetadata'),+ newEcrContainerImageMetadata,++ -- ** EcrRepositoryMetadata+ EcrRepositoryMetadata (EcrRepositoryMetadata'),+ newEcrRepositoryMetadata,++ -- ** EcrRescanDurationState+ EcrRescanDurationState (EcrRescanDurationState'),+ newEcrRescanDurationState,++ -- ** ExploitabilityDetails+ ExploitabilityDetails (ExploitabilityDetails'),+ newExploitabilityDetails,++ -- ** FailedAccount+ FailedAccount (FailedAccount'),+ newFailedAccount,++ -- ** Filter+ Filter (Filter'),+ newFilter,++ -- ** FilterCriteria+ FilterCriteria (FilterCriteria'),+ newFilterCriteria,++ -- ** Finding+ Finding (Finding'),+ newFinding,++ -- ** FindingTypeAggregation+ FindingTypeAggregation (FindingTypeAggregation'),+ newFindingTypeAggregation,++ -- ** FindingTypeAggregationResponse+ FindingTypeAggregationResponse (FindingTypeAggregationResponse'),+ newFindingTypeAggregationResponse,++ -- ** FreeTrialAccountInfo+ FreeTrialAccountInfo (FreeTrialAccountInfo'),+ newFreeTrialAccountInfo,++ -- ** FreeTrialInfo+ FreeTrialInfo (FreeTrialInfo'),+ newFreeTrialInfo,++ -- ** FreeTrialInfoError+ FreeTrialInfoError (FreeTrialInfoError'),+ newFreeTrialInfoError,++ -- ** ImageLayerAggregation+ ImageLayerAggregation (ImageLayerAggregation'),+ newImageLayerAggregation,++ -- ** ImageLayerAggregationResponse+ ImageLayerAggregationResponse (ImageLayerAggregationResponse'),+ newImageLayerAggregationResponse,++ -- ** InspectorScoreDetails+ InspectorScoreDetails (InspectorScoreDetails'),+ newInspectorScoreDetails,++ -- ** LambdaFunctionAggregation+ LambdaFunctionAggregation (LambdaFunctionAggregation'),+ newLambdaFunctionAggregation,++ -- ** LambdaFunctionAggregationResponse+ LambdaFunctionAggregationResponse (LambdaFunctionAggregationResponse'),+ newLambdaFunctionAggregationResponse,++ -- ** LambdaFunctionMetadata+ LambdaFunctionMetadata (LambdaFunctionMetadata'),+ newLambdaFunctionMetadata,++ -- ** LambdaLayerAggregation+ LambdaLayerAggregation (LambdaLayerAggregation'),+ newLambdaLayerAggregation,++ -- ** LambdaLayerAggregationResponse+ LambdaLayerAggregationResponse (LambdaLayerAggregationResponse'),+ newLambdaLayerAggregationResponse,++ -- ** LambdaVpcConfig+ LambdaVpcConfig (LambdaVpcConfig'),+ newLambdaVpcConfig,++ -- ** MapFilter+ MapFilter (MapFilter'),+ newMapFilter,++ -- ** Member+ Member (Member'),+ newMember,++ -- ** NetworkPath+ NetworkPath (NetworkPath'),+ newNetworkPath,++ -- ** NetworkReachabilityDetails+ NetworkReachabilityDetails (NetworkReachabilityDetails'),+ newNetworkReachabilityDetails,++ -- ** NumberFilter+ NumberFilter (NumberFilter'),+ newNumberFilter,++ -- ** PackageAggregation+ PackageAggregation (PackageAggregation'),+ newPackageAggregation,++ -- ** PackageAggregationResponse+ PackageAggregationResponse (PackageAggregationResponse'),+ newPackageAggregationResponse,++ -- ** PackageFilter+ PackageFilter (PackageFilter'),+ newPackageFilter,++ -- ** PackageVulnerabilityDetails+ PackageVulnerabilityDetails (PackageVulnerabilityDetails'),+ newPackageVulnerabilityDetails,++ -- ** Permission+ Permission (Permission'),+ newPermission,++ -- ** PortRange+ PortRange (PortRange'),+ newPortRange,++ -- ** PortRangeFilter+ PortRangeFilter (PortRangeFilter'),+ newPortRangeFilter,++ -- ** Recommendation+ Recommendation (Recommendation'),+ newRecommendation,++ -- ** Remediation+ Remediation (Remediation'),+ newRemediation,++ -- ** RepositoryAggregation+ RepositoryAggregation (RepositoryAggregation'),+ newRepositoryAggregation,++ -- ** RepositoryAggregationResponse+ RepositoryAggregationResponse (RepositoryAggregationResponse'),+ newRepositoryAggregationResponse,++ -- ** Resource+ Resource (Resource'),+ newResource,++ -- ** ResourceDetails+ ResourceDetails (ResourceDetails'),+ newResourceDetails,++ -- ** ResourceScanMetadata+ ResourceScanMetadata (ResourceScanMetadata'),+ newResourceScanMetadata,++ -- ** ResourceState+ ResourceState (ResourceState'),+ newResourceState,++ -- ** ResourceStatus+ ResourceStatus (ResourceStatus'),+ newResourceStatus,++ -- ** ScanStatus+ ScanStatus (ScanStatus'),+ newScanStatus,++ -- ** SeverityCounts+ SeverityCounts (SeverityCounts'),+ newSeverityCounts,++ -- ** SortCriteria+ SortCriteria (SortCriteria'),+ newSortCriteria,++ -- ** State+ State (State'),+ newState,++ -- ** Step+ Step (Step'),+ newStep,++ -- ** StringFilter+ StringFilter (StringFilter'),+ newStringFilter,++ -- ** TitleAggregation+ TitleAggregation (TitleAggregation'),+ newTitleAggregation,++ -- ** TitleAggregationResponse+ TitleAggregationResponse (TitleAggregationResponse'),+ newTitleAggregationResponse,++ -- ** Usage+ Usage (Usage'),+ newUsage,++ -- ** UsageTotal+ UsageTotal (UsageTotal'),+ newUsageTotal,++ -- ** VulnerablePackage+ VulnerablePackage (VulnerablePackage'),+ newVulnerablePackage,+ )+where++import Amazonka.Inspector2.AssociateMember+import Amazonka.Inspector2.BatchGetAccountStatus+import Amazonka.Inspector2.BatchGetFreeTrialInfo+import Amazonka.Inspector2.CancelFindingsReport+import Amazonka.Inspector2.CreateFilter+import Amazonka.Inspector2.CreateFindingsReport+import Amazonka.Inspector2.DeleteFilter+import Amazonka.Inspector2.DescribeOrganizationConfiguration+import Amazonka.Inspector2.Disable+import Amazonka.Inspector2.DisableDelegatedAdminAccount+import Amazonka.Inspector2.DisassociateMember+import Amazonka.Inspector2.Enable+import Amazonka.Inspector2.EnableDelegatedAdminAccount+import Amazonka.Inspector2.GetConfiguration+import Amazonka.Inspector2.GetDelegatedAdminAccount+import Amazonka.Inspector2.GetFindingsReportStatus+import Amazonka.Inspector2.GetMember+import Amazonka.Inspector2.Lens+import Amazonka.Inspector2.ListAccountPermissions+import Amazonka.Inspector2.ListCoverage+import Amazonka.Inspector2.ListCoverageStatistics+import Amazonka.Inspector2.ListDelegatedAdminAccounts+import Amazonka.Inspector2.ListFilters+import Amazonka.Inspector2.ListFindingAggregations+import Amazonka.Inspector2.ListFindings+import Amazonka.Inspector2.ListMembers+import Amazonka.Inspector2.ListTagsForResource+import Amazonka.Inspector2.ListUsageTotals+import Amazonka.Inspector2.TagResource+import Amazonka.Inspector2.Types+import Amazonka.Inspector2.UntagResource+import Amazonka.Inspector2.UpdateConfiguration+import Amazonka.Inspector2.UpdateFilter+import Amazonka.Inspector2.UpdateOrganizationConfiguration+import Amazonka.Inspector2.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 'Inspector2'.++-- $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/Inspector2/AssociateMember.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.Inspector2.AssociateMember+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Associates an Amazon Web Services account with an Amazon Inspector+-- delegated administrator.+module Amazonka.Inspector2.AssociateMember+ ( -- * Creating a Request+ AssociateMember (..),+ newAssociateMember,++ -- * Request Lenses+ associateMember_accountId,++ -- * Destructuring the Response+ AssociateMemberResponse (..),+ newAssociateMemberResponse,++ -- * Response Lenses+ associateMemberResponse_httpStatus,+ associateMemberResponse_accountId,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newAssociateMember' smart constructor.+data AssociateMember = AssociateMember'+ { -- | The Amazon Web Services account ID of the member account to be+ -- associated.+ accountId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AssociateMember' 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', 'associateMember_accountId' - The Amazon Web Services account ID of the member account to be+-- associated.+newAssociateMember ::+ -- | 'accountId'+ Prelude.Text ->+ AssociateMember+newAssociateMember pAccountId_ =+ AssociateMember' {accountId = pAccountId_}++-- | The Amazon Web Services account ID of the member account to be+-- associated.+associateMember_accountId :: Lens.Lens' AssociateMember Prelude.Text+associateMember_accountId = Lens.lens (\AssociateMember' {accountId} -> accountId) (\s@AssociateMember' {} a -> s {accountId = a} :: AssociateMember)++instance Core.AWSRequest AssociateMember where+ type+ AWSResponse AssociateMember =+ AssociateMemberResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ AssociateMemberResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "accountId")+ )++instance Prelude.Hashable AssociateMember where+ hashWithSalt _salt AssociateMember' {..} =+ _salt `Prelude.hashWithSalt` accountId++instance Prelude.NFData AssociateMember where+ rnf AssociateMember' {..} = Prelude.rnf accountId++instance Data.ToHeaders AssociateMember where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON AssociateMember where+ toJSON AssociateMember' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("accountId" Data..= accountId)]+ )++instance Data.ToPath AssociateMember where+ toPath = Prelude.const "/members/associate"++instance Data.ToQuery AssociateMember where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newAssociateMemberResponse' smart constructor.+data AssociateMemberResponse = AssociateMemberResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The Amazon Web Services account ID of the successfully associated member+ -- account.+ accountId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AssociateMemberResponse' 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', 'associateMemberResponse_httpStatus' - The response's http status code.+--+-- 'accountId', 'associateMemberResponse_accountId' - The Amazon Web Services account ID of the successfully associated member+-- account.+newAssociateMemberResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'accountId'+ Prelude.Text ->+ AssociateMemberResponse+newAssociateMemberResponse pHttpStatus_ pAccountId_ =+ AssociateMemberResponse'+ { httpStatus = pHttpStatus_,+ accountId = pAccountId_+ }++-- | The response's http status code.+associateMemberResponse_httpStatus :: Lens.Lens' AssociateMemberResponse Prelude.Int+associateMemberResponse_httpStatus = Lens.lens (\AssociateMemberResponse' {httpStatus} -> httpStatus) (\s@AssociateMemberResponse' {} a -> s {httpStatus = a} :: AssociateMemberResponse)++-- | The Amazon Web Services account ID of the successfully associated member+-- account.+associateMemberResponse_accountId :: Lens.Lens' AssociateMemberResponse Prelude.Text+associateMemberResponse_accountId = Lens.lens (\AssociateMemberResponse' {accountId} -> accountId) (\s@AssociateMemberResponse' {} a -> s {accountId = a} :: AssociateMemberResponse)++instance Prelude.NFData AssociateMemberResponse where+ rnf AssociateMemberResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf accountId
+ gen/Amazonka/Inspector2/BatchGetAccountStatus.hs view
@@ -0,0 +1,188 @@+{-# 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.Inspector2.BatchGetAccountStatus+-- 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 Amazon Inspector status of multiple Amazon Web Services+-- accounts within your environment.+module Amazonka.Inspector2.BatchGetAccountStatus+ ( -- * Creating a Request+ BatchGetAccountStatus (..),+ newBatchGetAccountStatus,++ -- * Request Lenses+ batchGetAccountStatus_accountIds,++ -- * Destructuring the Response+ BatchGetAccountStatusResponse (..),+ newBatchGetAccountStatusResponse,++ -- * Response Lenses+ batchGetAccountStatusResponse_failedAccounts,+ batchGetAccountStatusResponse_httpStatus,+ batchGetAccountStatusResponse_accounts,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newBatchGetAccountStatus' smart constructor.+data BatchGetAccountStatus = BatchGetAccountStatus'+ { -- | The 12-digit Amazon Web Services account IDs of the accounts to retrieve+ -- Amazon Inspector status for.+ accountIds :: Prelude.Maybe [Prelude.Text]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchGetAccountStatus' 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', 'batchGetAccountStatus_accountIds' - The 12-digit Amazon Web Services account IDs of the accounts to retrieve+-- Amazon Inspector status for.+newBatchGetAccountStatus ::+ BatchGetAccountStatus+newBatchGetAccountStatus =+ BatchGetAccountStatus'+ { accountIds =+ Prelude.Nothing+ }++-- | The 12-digit Amazon Web Services account IDs of the accounts to retrieve+-- Amazon Inspector status for.+batchGetAccountStatus_accountIds :: Lens.Lens' BatchGetAccountStatus (Prelude.Maybe [Prelude.Text])+batchGetAccountStatus_accountIds = Lens.lens (\BatchGetAccountStatus' {accountIds} -> accountIds) (\s@BatchGetAccountStatus' {} a -> s {accountIds = a} :: BatchGetAccountStatus) Prelude.. Lens.mapping Lens.coerced++instance Core.AWSRequest BatchGetAccountStatus where+ type+ AWSResponse BatchGetAccountStatus =+ BatchGetAccountStatusResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ BatchGetAccountStatusResponse'+ Prelude.<$> (x Data..?> "failedAccounts" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..?> "accounts" Core..!@ Prelude.mempty)+ )++instance Prelude.Hashable BatchGetAccountStatus where+ hashWithSalt _salt BatchGetAccountStatus' {..} =+ _salt `Prelude.hashWithSalt` accountIds++instance Prelude.NFData BatchGetAccountStatus where+ rnf BatchGetAccountStatus' {..} =+ Prelude.rnf accountIds++instance Data.ToHeaders BatchGetAccountStatus where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON BatchGetAccountStatus where+ toJSON BatchGetAccountStatus' {..} =+ Data.object+ ( Prelude.catMaybes+ [("accountIds" Data..=) Prelude.<$> accountIds]+ )++instance Data.ToPath BatchGetAccountStatus where+ toPath = Prelude.const "/status/batch/get"++instance Data.ToQuery BatchGetAccountStatus where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newBatchGetAccountStatusResponse' smart constructor.+data BatchGetAccountStatusResponse = BatchGetAccountStatusResponse'+ { -- | An array of objects detailing any accounts that failed to enable Amazon+ -- Inspector and why.+ failedAccounts :: Prelude.Maybe [FailedAccount],+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | An array of objects that provide details on the status of Amazon+ -- Inspector for each of the requested accounts.+ accounts :: [AccountState]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchGetAccountStatusResponse' 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:+--+-- 'failedAccounts', 'batchGetAccountStatusResponse_failedAccounts' - An array of objects detailing any accounts that failed to enable Amazon+-- Inspector and why.+--+-- 'httpStatus', 'batchGetAccountStatusResponse_httpStatus' - The response's http status code.+--+-- 'accounts', 'batchGetAccountStatusResponse_accounts' - An array of objects that provide details on the status of Amazon+-- Inspector for each of the requested accounts.+newBatchGetAccountStatusResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ BatchGetAccountStatusResponse+newBatchGetAccountStatusResponse pHttpStatus_ =+ BatchGetAccountStatusResponse'+ { failedAccounts =+ Prelude.Nothing,+ httpStatus = pHttpStatus_,+ accounts = Prelude.mempty+ }++-- | An array of objects detailing any accounts that failed to enable Amazon+-- Inspector and why.+batchGetAccountStatusResponse_failedAccounts :: Lens.Lens' BatchGetAccountStatusResponse (Prelude.Maybe [FailedAccount])+batchGetAccountStatusResponse_failedAccounts = Lens.lens (\BatchGetAccountStatusResponse' {failedAccounts} -> failedAccounts) (\s@BatchGetAccountStatusResponse' {} a -> s {failedAccounts = a} :: BatchGetAccountStatusResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+batchGetAccountStatusResponse_httpStatus :: Lens.Lens' BatchGetAccountStatusResponse Prelude.Int+batchGetAccountStatusResponse_httpStatus = Lens.lens (\BatchGetAccountStatusResponse' {httpStatus} -> httpStatus) (\s@BatchGetAccountStatusResponse' {} a -> s {httpStatus = a} :: BatchGetAccountStatusResponse)++-- | An array of objects that provide details on the status of Amazon+-- Inspector for each of the requested accounts.+batchGetAccountStatusResponse_accounts :: Lens.Lens' BatchGetAccountStatusResponse [AccountState]+batchGetAccountStatusResponse_accounts = Lens.lens (\BatchGetAccountStatusResponse' {accounts} -> accounts) (\s@BatchGetAccountStatusResponse' {} a -> s {accounts = a} :: BatchGetAccountStatusResponse) Prelude.. Lens.coerced++instance Prelude.NFData BatchGetAccountStatusResponse where+ rnf BatchGetAccountStatusResponse' {..} =+ Prelude.rnf failedAccounts+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf accounts
+ gen/Amazonka/Inspector2/BatchGetFreeTrialInfo.hs view
@@ -0,0 +1,189 @@+{-# 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.Inspector2.BatchGetFreeTrialInfo+-- 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 free trial status for multiple Amazon Web Services accounts.+module Amazonka.Inspector2.BatchGetFreeTrialInfo+ ( -- * Creating a Request+ BatchGetFreeTrialInfo (..),+ newBatchGetFreeTrialInfo,++ -- * Request Lenses+ batchGetFreeTrialInfo_accountIds,++ -- * Destructuring the Response+ BatchGetFreeTrialInfoResponse (..),+ newBatchGetFreeTrialInfoResponse,++ -- * Response Lenses+ batchGetFreeTrialInfoResponse_httpStatus,+ batchGetFreeTrialInfoResponse_accounts,+ batchGetFreeTrialInfoResponse_failedAccounts,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newBatchGetFreeTrialInfo' smart constructor.+data BatchGetFreeTrialInfo = BatchGetFreeTrialInfo'+ { -- | The account IDs to get free trial status for.+ accountIds :: Prelude.NonEmpty Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchGetFreeTrialInfo' 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', 'batchGetFreeTrialInfo_accountIds' - The account IDs to get free trial status for.+newBatchGetFreeTrialInfo ::+ -- | 'accountIds'+ Prelude.NonEmpty Prelude.Text ->+ BatchGetFreeTrialInfo+newBatchGetFreeTrialInfo pAccountIds_ =+ BatchGetFreeTrialInfo'+ { accountIds =+ Lens.coerced Lens.# pAccountIds_+ }++-- | The account IDs to get free trial status for.+batchGetFreeTrialInfo_accountIds :: Lens.Lens' BatchGetFreeTrialInfo (Prelude.NonEmpty Prelude.Text)+batchGetFreeTrialInfo_accountIds = Lens.lens (\BatchGetFreeTrialInfo' {accountIds} -> accountIds) (\s@BatchGetFreeTrialInfo' {} a -> s {accountIds = a} :: BatchGetFreeTrialInfo) Prelude.. Lens.coerced++instance Core.AWSRequest BatchGetFreeTrialInfo where+ type+ AWSResponse BatchGetFreeTrialInfo =+ BatchGetFreeTrialInfoResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ BatchGetFreeTrialInfoResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..?> "accounts" Core..!@ Prelude.mempty)+ Prelude.<*> ( x+ Data..?> "failedAccounts"+ Core..!@ Prelude.mempty+ )+ )++instance Prelude.Hashable BatchGetFreeTrialInfo where+ hashWithSalt _salt BatchGetFreeTrialInfo' {..} =+ _salt `Prelude.hashWithSalt` accountIds++instance Prelude.NFData BatchGetFreeTrialInfo where+ rnf BatchGetFreeTrialInfo' {..} =+ Prelude.rnf accountIds++instance Data.ToHeaders BatchGetFreeTrialInfo where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON BatchGetFreeTrialInfo where+ toJSON BatchGetFreeTrialInfo' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("accountIds" Data..= accountIds)]+ )++instance Data.ToPath BatchGetFreeTrialInfo where+ toPath = Prelude.const "/freetrialinfo/batchget"++instance Data.ToQuery BatchGetFreeTrialInfo where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newBatchGetFreeTrialInfoResponse' smart constructor.+data BatchGetFreeTrialInfoResponse = BatchGetFreeTrialInfoResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | An array of objects that provide Amazon Inspector free trial details for+ -- each of the requested accounts.+ accounts :: [FreeTrialAccountInfo],+ -- | An array of objects detailing any accounts that free trial data could+ -- not be returned for.+ failedAccounts :: [FreeTrialInfoError]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchGetFreeTrialInfoResponse' 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', 'batchGetFreeTrialInfoResponse_httpStatus' - The response's http status code.+--+-- 'accounts', 'batchGetFreeTrialInfoResponse_accounts' - An array of objects that provide Amazon Inspector free trial details for+-- each of the requested accounts.+--+-- 'failedAccounts', 'batchGetFreeTrialInfoResponse_failedAccounts' - An array of objects detailing any accounts that free trial data could+-- not be returned for.+newBatchGetFreeTrialInfoResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ BatchGetFreeTrialInfoResponse+newBatchGetFreeTrialInfoResponse pHttpStatus_ =+ BatchGetFreeTrialInfoResponse'+ { httpStatus =+ pHttpStatus_,+ accounts = Prelude.mempty,+ failedAccounts = Prelude.mempty+ }++-- | The response's http status code.+batchGetFreeTrialInfoResponse_httpStatus :: Lens.Lens' BatchGetFreeTrialInfoResponse Prelude.Int+batchGetFreeTrialInfoResponse_httpStatus = Lens.lens (\BatchGetFreeTrialInfoResponse' {httpStatus} -> httpStatus) (\s@BatchGetFreeTrialInfoResponse' {} a -> s {httpStatus = a} :: BatchGetFreeTrialInfoResponse)++-- | An array of objects that provide Amazon Inspector free trial details for+-- each of the requested accounts.+batchGetFreeTrialInfoResponse_accounts :: Lens.Lens' BatchGetFreeTrialInfoResponse [FreeTrialAccountInfo]+batchGetFreeTrialInfoResponse_accounts = Lens.lens (\BatchGetFreeTrialInfoResponse' {accounts} -> accounts) (\s@BatchGetFreeTrialInfoResponse' {} a -> s {accounts = a} :: BatchGetFreeTrialInfoResponse) Prelude.. Lens.coerced++-- | An array of objects detailing any accounts that free trial data could+-- not be returned for.+batchGetFreeTrialInfoResponse_failedAccounts :: Lens.Lens' BatchGetFreeTrialInfoResponse [FreeTrialInfoError]+batchGetFreeTrialInfoResponse_failedAccounts = Lens.lens (\BatchGetFreeTrialInfoResponse' {failedAccounts} -> failedAccounts) (\s@BatchGetFreeTrialInfoResponse' {} a -> s {failedAccounts = a} :: BatchGetFreeTrialInfoResponse) Prelude.. Lens.coerced++instance Prelude.NFData BatchGetFreeTrialInfoResponse where+ rnf BatchGetFreeTrialInfoResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf accounts+ `Prelude.seq` Prelude.rnf failedAccounts
+ gen/Amazonka/Inspector2/CancelFindingsReport.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.Inspector2.CancelFindingsReport+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Cancels the given findings report.+module Amazonka.Inspector2.CancelFindingsReport+ ( -- * Creating a Request+ CancelFindingsReport (..),+ newCancelFindingsReport,++ -- * Request Lenses+ cancelFindingsReport_reportId,++ -- * Destructuring the Response+ CancelFindingsReportResponse (..),+ newCancelFindingsReportResponse,++ -- * Response Lenses+ cancelFindingsReportResponse_httpStatus,+ cancelFindingsReportResponse_reportId,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCancelFindingsReport' smart constructor.+data CancelFindingsReport = CancelFindingsReport'+ { -- | The ID of the report to be canceled.+ reportId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CancelFindingsReport' 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:+--+-- 'reportId', 'cancelFindingsReport_reportId' - The ID of the report to be canceled.+newCancelFindingsReport ::+ -- | 'reportId'+ Prelude.Text ->+ CancelFindingsReport+newCancelFindingsReport pReportId_ =+ CancelFindingsReport' {reportId = pReportId_}++-- | The ID of the report to be canceled.+cancelFindingsReport_reportId :: Lens.Lens' CancelFindingsReport Prelude.Text+cancelFindingsReport_reportId = Lens.lens (\CancelFindingsReport' {reportId} -> reportId) (\s@CancelFindingsReport' {} a -> s {reportId = a} :: CancelFindingsReport)++instance Core.AWSRequest CancelFindingsReport where+ type+ AWSResponse CancelFindingsReport =+ CancelFindingsReportResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CancelFindingsReportResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "reportId")+ )++instance Prelude.Hashable CancelFindingsReport where+ hashWithSalt _salt CancelFindingsReport' {..} =+ _salt `Prelude.hashWithSalt` reportId++instance Prelude.NFData CancelFindingsReport where+ rnf CancelFindingsReport' {..} = Prelude.rnf reportId++instance Data.ToHeaders CancelFindingsReport where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CancelFindingsReport where+ toJSON CancelFindingsReport' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("reportId" Data..= reportId)]+ )++instance Data.ToPath CancelFindingsReport where+ toPath = Prelude.const "/reporting/cancel"++instance Data.ToQuery CancelFindingsReport where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCancelFindingsReportResponse' smart constructor.+data CancelFindingsReportResponse = CancelFindingsReportResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The ID of the canceled report.+ reportId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CancelFindingsReportResponse' 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', 'cancelFindingsReportResponse_httpStatus' - The response's http status code.+--+-- 'reportId', 'cancelFindingsReportResponse_reportId' - The ID of the canceled report.+newCancelFindingsReportResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'reportId'+ Prelude.Text ->+ CancelFindingsReportResponse+newCancelFindingsReportResponse+ pHttpStatus_+ pReportId_ =+ CancelFindingsReportResponse'+ { httpStatus =+ pHttpStatus_,+ reportId = pReportId_+ }++-- | The response's http status code.+cancelFindingsReportResponse_httpStatus :: Lens.Lens' CancelFindingsReportResponse Prelude.Int+cancelFindingsReportResponse_httpStatus = Lens.lens (\CancelFindingsReportResponse' {httpStatus} -> httpStatus) (\s@CancelFindingsReportResponse' {} a -> s {httpStatus = a} :: CancelFindingsReportResponse)++-- | The ID of the canceled report.+cancelFindingsReportResponse_reportId :: Lens.Lens' CancelFindingsReportResponse Prelude.Text+cancelFindingsReportResponse_reportId = Lens.lens (\CancelFindingsReportResponse' {reportId} -> reportId) (\s@CancelFindingsReportResponse' {} a -> s {reportId = a} :: CancelFindingsReportResponse)++instance Prelude.NFData CancelFindingsReportResponse where+ rnf CancelFindingsReportResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf reportId
+ gen/Amazonka/Inspector2/CreateFilter.hs view
@@ -0,0 +1,247 @@+{-# 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.Inspector2.CreateFilter+-- 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 filter resource using specified filter criteria.+module Amazonka.Inspector2.CreateFilter+ ( -- * Creating a Request+ CreateFilter (..),+ newCreateFilter,++ -- * Request Lenses+ createFilter_description,+ createFilter_reason,+ createFilter_tags,+ createFilter_action,+ createFilter_filterCriteria,+ createFilter_name,++ -- * Destructuring the Response+ CreateFilterResponse (..),+ newCreateFilterResponse,++ -- * Response Lenses+ createFilterResponse_httpStatus,+ createFilterResponse_arn,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateFilter' smart constructor.+data CreateFilter = CreateFilter'+ { -- | A description of the filter.+ description :: Prelude.Maybe Prelude.Text,+ -- | The reason for creating the filter.+ reason :: Prelude.Maybe Prelude.Text,+ -- | A list of tags for the filter.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | Defines the action that is to be applied to the findings that match the+ -- filter.+ action :: FilterAction,+ -- | Defines the criteria to be used in the filter for querying findings.+ filterCriteria :: FilterCriteria,+ -- | The name of the filter. Minimum length of 3. Maximum length of 64. Valid+ -- characters include alphanumeric characters, dot (.), underscore (_), and+ -- dash (-). Spaces are not allowed.+ name :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateFilter' 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:+--+-- 'description', 'createFilter_description' - A description of the filter.+--+-- 'reason', 'createFilter_reason' - The reason for creating the filter.+--+-- 'tags', 'createFilter_tags' - A list of tags for the filter.+--+-- 'action', 'createFilter_action' - Defines the action that is to be applied to the findings that match the+-- filter.+--+-- 'filterCriteria', 'createFilter_filterCriteria' - Defines the criteria to be used in the filter for querying findings.+--+-- 'name', 'createFilter_name' - The name of the filter. Minimum length of 3. Maximum length of 64. Valid+-- characters include alphanumeric characters, dot (.), underscore (_), and+-- dash (-). Spaces are not allowed.+newCreateFilter ::+ -- | 'action'+ FilterAction ->+ -- | 'filterCriteria'+ FilterCriteria ->+ -- | 'name'+ Prelude.Text ->+ CreateFilter+newCreateFilter pAction_ pFilterCriteria_ pName_ =+ CreateFilter'+ { description = Prelude.Nothing,+ reason = Prelude.Nothing,+ tags = Prelude.Nothing,+ action = pAction_,+ filterCriteria = pFilterCriteria_,+ name = pName_+ }++-- | A description of the filter.+createFilter_description :: Lens.Lens' CreateFilter (Prelude.Maybe Prelude.Text)+createFilter_description = Lens.lens (\CreateFilter' {description} -> description) (\s@CreateFilter' {} a -> s {description = a} :: CreateFilter)++-- | The reason for creating the filter.+createFilter_reason :: Lens.Lens' CreateFilter (Prelude.Maybe Prelude.Text)+createFilter_reason = Lens.lens (\CreateFilter' {reason} -> reason) (\s@CreateFilter' {} a -> s {reason = a} :: CreateFilter)++-- | A list of tags for the filter.+createFilter_tags :: Lens.Lens' CreateFilter (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createFilter_tags = Lens.lens (\CreateFilter' {tags} -> tags) (\s@CreateFilter' {} a -> s {tags = a} :: CreateFilter) Prelude.. Lens.mapping Lens.coerced++-- | Defines the action that is to be applied to the findings that match the+-- filter.+createFilter_action :: Lens.Lens' CreateFilter FilterAction+createFilter_action = Lens.lens (\CreateFilter' {action} -> action) (\s@CreateFilter' {} a -> s {action = a} :: CreateFilter)++-- | Defines the criteria to be used in the filter for querying findings.+createFilter_filterCriteria :: Lens.Lens' CreateFilter FilterCriteria+createFilter_filterCriteria = Lens.lens (\CreateFilter' {filterCriteria} -> filterCriteria) (\s@CreateFilter' {} a -> s {filterCriteria = a} :: CreateFilter)++-- | The name of the filter. Minimum length of 3. Maximum length of 64. Valid+-- characters include alphanumeric characters, dot (.), underscore (_), and+-- dash (-). Spaces are not allowed.+createFilter_name :: Lens.Lens' CreateFilter Prelude.Text+createFilter_name = Lens.lens (\CreateFilter' {name} -> name) (\s@CreateFilter' {} a -> s {name = a} :: CreateFilter)++instance Core.AWSRequest CreateFilter where+ type AWSResponse CreateFilter = CreateFilterResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateFilterResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "arn")+ )++instance Prelude.Hashable CreateFilter where+ hashWithSalt _salt CreateFilter' {..} =+ _salt+ `Prelude.hashWithSalt` description+ `Prelude.hashWithSalt` reason+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` action+ `Prelude.hashWithSalt` filterCriteria+ `Prelude.hashWithSalt` name++instance Prelude.NFData CreateFilter where+ rnf CreateFilter' {..} =+ Prelude.rnf description+ `Prelude.seq` Prelude.rnf reason+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf action+ `Prelude.seq` Prelude.rnf filterCriteria+ `Prelude.seq` Prelude.rnf name++instance Data.ToHeaders CreateFilter where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateFilter where+ toJSON CreateFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("description" Data..=) Prelude.<$> description,+ ("reason" Data..=) Prelude.<$> reason,+ ("tags" Data..=) Prelude.<$> tags,+ Prelude.Just ("action" Data..= action),+ Prelude.Just+ ("filterCriteria" Data..= filterCriteria),+ Prelude.Just ("name" Data..= name)+ ]+ )++instance Data.ToPath CreateFilter where+ toPath = Prelude.const "/filters/create"++instance Data.ToQuery CreateFilter where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateFilterResponse' smart constructor.+data CreateFilterResponse = CreateFilterResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The Amazon Resource Number (ARN) of the successfully created filter.+ arn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateFilterResponse' 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', 'createFilterResponse_httpStatus' - The response's http status code.+--+-- 'arn', 'createFilterResponse_arn' - The Amazon Resource Number (ARN) of the successfully created filter.+newCreateFilterResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'arn'+ Prelude.Text ->+ CreateFilterResponse+newCreateFilterResponse pHttpStatus_ pArn_ =+ CreateFilterResponse'+ { httpStatus = pHttpStatus_,+ arn = pArn_+ }++-- | The response's http status code.+createFilterResponse_httpStatus :: Lens.Lens' CreateFilterResponse Prelude.Int+createFilterResponse_httpStatus = Lens.lens (\CreateFilterResponse' {httpStatus} -> httpStatus) (\s@CreateFilterResponse' {} a -> s {httpStatus = a} :: CreateFilterResponse)++-- | The Amazon Resource Number (ARN) of the successfully created filter.+createFilterResponse_arn :: Lens.Lens' CreateFilterResponse Prelude.Text+createFilterResponse_arn = Lens.lens (\CreateFilterResponse' {arn} -> arn) (\s@CreateFilterResponse' {} a -> s {arn = a} :: CreateFilterResponse)++instance Prelude.NFData CreateFilterResponse where+ rnf CreateFilterResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf arn
+ gen/Amazonka/Inspector2/CreateFindingsReport.hs view
@@ -0,0 +1,202 @@+{-# 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.Inspector2.CreateFindingsReport+-- 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 finding report.+module Amazonka.Inspector2.CreateFindingsReport+ ( -- * Creating a Request+ CreateFindingsReport (..),+ newCreateFindingsReport,++ -- * Request Lenses+ createFindingsReport_filterCriteria,+ createFindingsReport_reportFormat,+ createFindingsReport_s3Destination,++ -- * Destructuring the Response+ CreateFindingsReportResponse (..),+ newCreateFindingsReportResponse,++ -- * Response Lenses+ createFindingsReportResponse_reportId,+ createFindingsReportResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newCreateFindingsReport' smart constructor.+data CreateFindingsReport = CreateFindingsReport'+ { -- | The filter criteria to apply to the results of the finding report.+ filterCriteria :: Prelude.Maybe FilterCriteria,+ -- | The format to generate the report in.+ reportFormat :: ReportFormat,+ -- | The Amazon S3 export destination for the report.+ s3Destination :: Destination+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateFindingsReport' 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:+--+-- 'filterCriteria', 'createFindingsReport_filterCriteria' - The filter criteria to apply to the results of the finding report.+--+-- 'reportFormat', 'createFindingsReport_reportFormat' - The format to generate the report in.+--+-- 's3Destination', 'createFindingsReport_s3Destination' - The Amazon S3 export destination for the report.+newCreateFindingsReport ::+ -- | 'reportFormat'+ ReportFormat ->+ -- | 's3Destination'+ Destination ->+ CreateFindingsReport+newCreateFindingsReport+ pReportFormat_+ pS3Destination_ =+ CreateFindingsReport'+ { filterCriteria =+ Prelude.Nothing,+ reportFormat = pReportFormat_,+ s3Destination = pS3Destination_+ }++-- | The filter criteria to apply to the results of the finding report.+createFindingsReport_filterCriteria :: Lens.Lens' CreateFindingsReport (Prelude.Maybe FilterCriteria)+createFindingsReport_filterCriteria = Lens.lens (\CreateFindingsReport' {filterCriteria} -> filterCriteria) (\s@CreateFindingsReport' {} a -> s {filterCriteria = a} :: CreateFindingsReport)++-- | The format to generate the report in.+createFindingsReport_reportFormat :: Lens.Lens' CreateFindingsReport ReportFormat+createFindingsReport_reportFormat = Lens.lens (\CreateFindingsReport' {reportFormat} -> reportFormat) (\s@CreateFindingsReport' {} a -> s {reportFormat = a} :: CreateFindingsReport)++-- | The Amazon S3 export destination for the report.+createFindingsReport_s3Destination :: Lens.Lens' CreateFindingsReport Destination+createFindingsReport_s3Destination = Lens.lens (\CreateFindingsReport' {s3Destination} -> s3Destination) (\s@CreateFindingsReport' {} a -> s {s3Destination = a} :: CreateFindingsReport)++instance Core.AWSRequest CreateFindingsReport where+ type+ AWSResponse CreateFindingsReport =+ CreateFindingsReportResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateFindingsReportResponse'+ Prelude.<$> (x Data..?> "reportId")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateFindingsReport where+ hashWithSalt _salt CreateFindingsReport' {..} =+ _salt+ `Prelude.hashWithSalt` filterCriteria+ `Prelude.hashWithSalt` reportFormat+ `Prelude.hashWithSalt` s3Destination++instance Prelude.NFData CreateFindingsReport where+ rnf CreateFindingsReport' {..} =+ Prelude.rnf filterCriteria+ `Prelude.seq` Prelude.rnf reportFormat+ `Prelude.seq` Prelude.rnf s3Destination++instance Data.ToHeaders CreateFindingsReport where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateFindingsReport where+ toJSON CreateFindingsReport' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("filterCriteria" Data..=)+ Prelude.<$> filterCriteria,+ Prelude.Just ("reportFormat" Data..= reportFormat),+ Prelude.Just+ ("s3Destination" Data..= s3Destination)+ ]+ )++instance Data.ToPath CreateFindingsReport where+ toPath = Prelude.const "/reporting/create"++instance Data.ToQuery CreateFindingsReport where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateFindingsReportResponse' smart constructor.+data CreateFindingsReportResponse = CreateFindingsReportResponse'+ { -- | The ID of the report.+ reportId :: 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 'CreateFindingsReportResponse' 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:+--+-- 'reportId', 'createFindingsReportResponse_reportId' - The ID of the report.+--+-- 'httpStatus', 'createFindingsReportResponse_httpStatus' - The response's http status code.+newCreateFindingsReportResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateFindingsReportResponse+newCreateFindingsReportResponse pHttpStatus_ =+ CreateFindingsReportResponse'+ { reportId =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The ID of the report.+createFindingsReportResponse_reportId :: Lens.Lens' CreateFindingsReportResponse (Prelude.Maybe Prelude.Text)+createFindingsReportResponse_reportId = Lens.lens (\CreateFindingsReportResponse' {reportId} -> reportId) (\s@CreateFindingsReportResponse' {} a -> s {reportId = a} :: CreateFindingsReportResponse)++-- | The response's http status code.+createFindingsReportResponse_httpStatus :: Lens.Lens' CreateFindingsReportResponse Prelude.Int+createFindingsReportResponse_httpStatus = Lens.lens (\CreateFindingsReportResponse' {httpStatus} -> httpStatus) (\s@CreateFindingsReportResponse' {} a -> s {httpStatus = a} :: CreateFindingsReportResponse)++instance Prelude.NFData CreateFindingsReportResponse where+ rnf CreateFindingsReportResponse' {..} =+ Prelude.rnf reportId+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Inspector2/DeleteFilter.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.Inspector2.DeleteFilter+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes a filter resource.+module Amazonka.Inspector2.DeleteFilter+ ( -- * Creating a Request+ DeleteFilter (..),+ newDeleteFilter,++ -- * Request Lenses+ deleteFilter_arn,++ -- * Destructuring the Response+ DeleteFilterResponse (..),+ newDeleteFilterResponse,++ -- * Response Lenses+ deleteFilterResponse_httpStatus,+ deleteFilterResponse_arn,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDeleteFilter' smart constructor.+data DeleteFilter = DeleteFilter'+ { -- | The Amazon Resource Number (ARN) of the filter to be deleted.+ arn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteFilter' 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', 'deleteFilter_arn' - The Amazon Resource Number (ARN) of the filter to be deleted.+newDeleteFilter ::+ -- | 'arn'+ Prelude.Text ->+ DeleteFilter+newDeleteFilter pArn_ = DeleteFilter' {arn = pArn_}++-- | The Amazon Resource Number (ARN) of the filter to be deleted.+deleteFilter_arn :: Lens.Lens' DeleteFilter Prelude.Text+deleteFilter_arn = Lens.lens (\DeleteFilter' {arn} -> arn) (\s@DeleteFilter' {} a -> s {arn = a} :: DeleteFilter)++instance Core.AWSRequest DeleteFilter where+ type AWSResponse DeleteFilter = DeleteFilterResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DeleteFilterResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "arn")+ )++instance Prelude.Hashable DeleteFilter where+ hashWithSalt _salt DeleteFilter' {..} =+ _salt `Prelude.hashWithSalt` arn++instance Prelude.NFData DeleteFilter where+ rnf DeleteFilter' {..} = Prelude.rnf arn++instance Data.ToHeaders DeleteFilter where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DeleteFilter where+ toJSON DeleteFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("arn" Data..= arn)]+ )++instance Data.ToPath DeleteFilter where+ toPath = Prelude.const "/filters/delete"++instance Data.ToQuery DeleteFilter where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteFilterResponse' smart constructor.+data DeleteFilterResponse = DeleteFilterResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The Amazon Resource Number (ARN) of the filter that has been deleted.+ arn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteFilterResponse' 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', 'deleteFilterResponse_httpStatus' - The response's http status code.+--+-- 'arn', 'deleteFilterResponse_arn' - The Amazon Resource Number (ARN) of the filter that has been deleted.+newDeleteFilterResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'arn'+ Prelude.Text ->+ DeleteFilterResponse+newDeleteFilterResponse pHttpStatus_ pArn_ =+ DeleteFilterResponse'+ { httpStatus = pHttpStatus_,+ arn = pArn_+ }++-- | The response's http status code.+deleteFilterResponse_httpStatus :: Lens.Lens' DeleteFilterResponse Prelude.Int+deleteFilterResponse_httpStatus = Lens.lens (\DeleteFilterResponse' {httpStatus} -> httpStatus) (\s@DeleteFilterResponse' {} a -> s {httpStatus = a} :: DeleteFilterResponse)++-- | The Amazon Resource Number (ARN) of the filter that has been deleted.+deleteFilterResponse_arn :: Lens.Lens' DeleteFilterResponse Prelude.Text+deleteFilterResponse_arn = Lens.lens (\DeleteFilterResponse' {arn} -> arn) (\s@DeleteFilterResponse' {} a -> s {arn = a} :: DeleteFilterResponse)++instance Prelude.NFData DeleteFilterResponse where+ rnf DeleteFilterResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf arn
+ gen/Amazonka/Inspector2/DescribeOrganizationConfiguration.hs view
@@ -0,0 +1,191 @@+{-# 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.Inspector2.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)+--+-- Describe Amazon Inspector configuration settings for an Amazon Web+-- Services organization.+module Amazonka.Inspector2.DescribeOrganizationConfiguration+ ( -- * Creating a Request+ DescribeOrganizationConfiguration (..),+ newDescribeOrganizationConfiguration,++ -- * Destructuring the Response+ DescribeOrganizationConfigurationResponse (..),+ newDescribeOrganizationConfigurationResponse,++ -- * Response Lenses+ describeOrganizationConfigurationResponse_autoEnable,+ describeOrganizationConfigurationResponse_maxAccountLimitReached,+ 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.Inspector2.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'+ {+ }+ 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.+newDescribeOrganizationConfiguration ::+ DescribeOrganizationConfiguration+newDescribeOrganizationConfiguration =+ 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.<*> (x Data..?> "maxAccountLimitReached")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ DescribeOrganizationConfiguration+ where+ hashWithSalt _salt _ =+ _salt `Prelude.hashWithSalt` ()++instance+ Prelude.NFData+ DescribeOrganizationConfiguration+ where+ rnf _ = ()++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 = Prelude.const (Data.Object Prelude.mempty)++instance+ Data.ToPath+ DescribeOrganizationConfiguration+ where+ toPath =+ Prelude.const "/organizationconfiguration/describe"++instance+ Data.ToQuery+ DescribeOrganizationConfiguration+ where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDescribeOrganizationConfigurationResponse' smart constructor.+data DescribeOrganizationConfigurationResponse = DescribeOrganizationConfigurationResponse'+ { -- | The scan types are automatically enabled for new members of your+ -- organization.+ autoEnable :: Prelude.Maybe AutoEnable,+ -- | Represents whether your organization has reached the maximum Amazon Web+ -- Services account limit for Amazon Inspector.+ maxAccountLimitReached :: 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' - The scan types are automatically enabled for new members of your+-- organization.+--+-- 'maxAccountLimitReached', 'describeOrganizationConfigurationResponse_maxAccountLimitReached' - Represents whether your organization has reached the maximum Amazon Web+-- Services account limit for Amazon Inspector.+--+-- 'httpStatus', 'describeOrganizationConfigurationResponse_httpStatus' - The response's http status code.+newDescribeOrganizationConfigurationResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DescribeOrganizationConfigurationResponse+newDescribeOrganizationConfigurationResponse+ pHttpStatus_ =+ DescribeOrganizationConfigurationResponse'+ { autoEnable =+ Prelude.Nothing,+ maxAccountLimitReached =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The scan types are automatically enabled for new members of your+-- organization.+describeOrganizationConfigurationResponse_autoEnable :: Lens.Lens' DescribeOrganizationConfigurationResponse (Prelude.Maybe AutoEnable)+describeOrganizationConfigurationResponse_autoEnable = Lens.lens (\DescribeOrganizationConfigurationResponse' {autoEnable} -> autoEnable) (\s@DescribeOrganizationConfigurationResponse' {} a -> s {autoEnable = a} :: DescribeOrganizationConfigurationResponse)++-- | Represents whether your organization has reached the maximum Amazon Web+-- Services account limit for Amazon Inspector.+describeOrganizationConfigurationResponse_maxAccountLimitReached :: Lens.Lens' DescribeOrganizationConfigurationResponse (Prelude.Maybe Prelude.Bool)+describeOrganizationConfigurationResponse_maxAccountLimitReached = Lens.lens (\DescribeOrganizationConfigurationResponse' {maxAccountLimitReached} -> maxAccountLimitReached) (\s@DescribeOrganizationConfigurationResponse' {} a -> s {maxAccountLimitReached = 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 maxAccountLimitReached+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Inspector2/Disable.hs view
@@ -0,0 +1,197 @@+{-# 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.Inspector2.Disable+-- 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 Amazon Inspector scans for one or more Amazon Web Services+-- accounts. Disabling all scan types in an account disables the Amazon+-- Inspector service.+module Amazonka.Inspector2.Disable+ ( -- * Creating a Request+ Disable (..),+ newDisable,++ -- * Request Lenses+ disable_accountIds,+ disable_resourceTypes,++ -- * Destructuring the Response+ DisableResponse (..),+ newDisableResponse,++ -- * Response Lenses+ disableResponse_failedAccounts,+ disableResponse_httpStatus,+ disableResponse_accounts,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDisable' smart constructor.+data Disable = Disable'+ { -- | An array of account IDs you want to disable Amazon Inspector scans for.+ accountIds :: Prelude.Maybe [Prelude.Text],+ -- | The resource scan types you want to disable.+ resourceTypes :: Prelude.Maybe [ResourceScanType]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Disable' 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', 'disable_accountIds' - An array of account IDs you want to disable Amazon Inspector scans for.+--+-- 'resourceTypes', 'disable_resourceTypes' - The resource scan types you want to disable.+newDisable ::+ Disable+newDisable =+ Disable'+ { accountIds = Prelude.Nothing,+ resourceTypes = Prelude.Nothing+ }++-- | An array of account IDs you want to disable Amazon Inspector scans for.+disable_accountIds :: Lens.Lens' Disable (Prelude.Maybe [Prelude.Text])+disable_accountIds = Lens.lens (\Disable' {accountIds} -> accountIds) (\s@Disable' {} a -> s {accountIds = a} :: Disable) Prelude.. Lens.mapping Lens.coerced++-- | The resource scan types you want to disable.+disable_resourceTypes :: Lens.Lens' Disable (Prelude.Maybe [ResourceScanType])+disable_resourceTypes = Lens.lens (\Disable' {resourceTypes} -> resourceTypes) (\s@Disable' {} a -> s {resourceTypes = a} :: Disable) Prelude.. Lens.mapping Lens.coerced++instance Core.AWSRequest Disable where+ type AWSResponse Disable = DisableResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DisableResponse'+ Prelude.<$> (x Data..?> "failedAccounts" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..?> "accounts" Core..!@ Prelude.mempty)+ )++instance Prelude.Hashable Disable where+ hashWithSalt _salt Disable' {..} =+ _salt+ `Prelude.hashWithSalt` accountIds+ `Prelude.hashWithSalt` resourceTypes++instance Prelude.NFData Disable where+ rnf Disable' {..} =+ Prelude.rnf accountIds+ `Prelude.seq` Prelude.rnf resourceTypes++instance Data.ToHeaders Disable where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON Disable where+ toJSON Disable' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("accountIds" Data..=) Prelude.<$> accountIds,+ ("resourceTypes" Data..=) Prelude.<$> resourceTypes+ ]+ )++instance Data.ToPath Disable where+ toPath = Prelude.const "/disable"++instance Data.ToQuery Disable where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDisableResponse' smart constructor.+data DisableResponse = DisableResponse'+ { -- | Information on any accounts for which Amazon Inspector scans could not+ -- be disabled. Details are provided for each account.+ failedAccounts :: Prelude.Maybe [FailedAccount],+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | Information on the accounts that have had Amazon Inspector scans+ -- successfully disabled. Details are provided for each account.+ accounts :: [Account]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisableResponse' 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:+--+-- 'failedAccounts', 'disableResponse_failedAccounts' - Information on any accounts for which Amazon Inspector scans could not+-- be disabled. Details are provided for each account.+--+-- 'httpStatus', 'disableResponse_httpStatus' - The response's http status code.+--+-- 'accounts', 'disableResponse_accounts' - Information on the accounts that have had Amazon Inspector scans+-- successfully disabled. Details are provided for each account.+newDisableResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DisableResponse+newDisableResponse pHttpStatus_ =+ DisableResponse'+ { failedAccounts = Prelude.Nothing,+ httpStatus = pHttpStatus_,+ accounts = Prelude.mempty+ }++-- | Information on any accounts for which Amazon Inspector scans could not+-- be disabled. Details are provided for each account.+disableResponse_failedAccounts :: Lens.Lens' DisableResponse (Prelude.Maybe [FailedAccount])+disableResponse_failedAccounts = Lens.lens (\DisableResponse' {failedAccounts} -> failedAccounts) (\s@DisableResponse' {} a -> s {failedAccounts = a} :: DisableResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+disableResponse_httpStatus :: Lens.Lens' DisableResponse Prelude.Int+disableResponse_httpStatus = Lens.lens (\DisableResponse' {httpStatus} -> httpStatus) (\s@DisableResponse' {} a -> s {httpStatus = a} :: DisableResponse)++-- | Information on the accounts that have had Amazon Inspector scans+-- successfully disabled. Details are provided for each account.+disableResponse_accounts :: Lens.Lens' DisableResponse [Account]+disableResponse_accounts = Lens.lens (\DisableResponse' {accounts} -> accounts) (\s@DisableResponse' {} a -> s {accounts = a} :: DisableResponse) Prelude.. Lens.coerced++instance Prelude.NFData DisableResponse where+ rnf DisableResponse' {..} =+ Prelude.rnf failedAccounts+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf accounts
+ gen/Amazonka/Inspector2/DisableDelegatedAdminAccount.hs view
@@ -0,0 +1,193 @@+{-# 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.Inspector2.DisableDelegatedAdminAccount+-- 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 Amazon Inspector delegated administrator for your+-- organization.+module Amazonka.Inspector2.DisableDelegatedAdminAccount+ ( -- * Creating a Request+ DisableDelegatedAdminAccount (..),+ newDisableDelegatedAdminAccount,++ -- * Request Lenses+ disableDelegatedAdminAccount_delegatedAdminAccountId,++ -- * Destructuring the Response+ DisableDelegatedAdminAccountResponse (..),+ newDisableDelegatedAdminAccountResponse,++ -- * Response Lenses+ disableDelegatedAdminAccountResponse_httpStatus,+ disableDelegatedAdminAccountResponse_delegatedAdminAccountId,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDisableDelegatedAdminAccount' smart constructor.+data DisableDelegatedAdminAccount = DisableDelegatedAdminAccount'+ { -- | The Amazon Web Services account ID of the current Amazon Inspector+ -- delegated administrator.+ delegatedAdminAccountId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisableDelegatedAdminAccount' 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:+--+-- 'delegatedAdminAccountId', 'disableDelegatedAdminAccount_delegatedAdminAccountId' - The Amazon Web Services account ID of the current Amazon Inspector+-- delegated administrator.+newDisableDelegatedAdminAccount ::+ -- | 'delegatedAdminAccountId'+ Prelude.Text ->+ DisableDelegatedAdminAccount+newDisableDelegatedAdminAccount+ pDelegatedAdminAccountId_ =+ DisableDelegatedAdminAccount'+ { delegatedAdminAccountId =+ pDelegatedAdminAccountId_+ }++-- | The Amazon Web Services account ID of the current Amazon Inspector+-- delegated administrator.+disableDelegatedAdminAccount_delegatedAdminAccountId :: Lens.Lens' DisableDelegatedAdminAccount Prelude.Text+disableDelegatedAdminAccount_delegatedAdminAccountId = Lens.lens (\DisableDelegatedAdminAccount' {delegatedAdminAccountId} -> delegatedAdminAccountId) (\s@DisableDelegatedAdminAccount' {} a -> s {delegatedAdminAccountId = a} :: DisableDelegatedAdminAccount)++instance Core.AWSRequest DisableDelegatedAdminAccount where+ type+ AWSResponse DisableDelegatedAdminAccount =+ DisableDelegatedAdminAccountResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DisableDelegatedAdminAccountResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "delegatedAdminAccountId")+ )++instance+ Prelude.Hashable+ DisableDelegatedAdminAccount+ where+ hashWithSalt _salt DisableDelegatedAdminAccount' {..} =+ _salt+ `Prelude.hashWithSalt` delegatedAdminAccountId++instance Prelude.NFData DisableDelegatedAdminAccount where+ rnf DisableDelegatedAdminAccount' {..} =+ Prelude.rnf delegatedAdminAccountId++instance Data.ToHeaders DisableDelegatedAdminAccount where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DisableDelegatedAdminAccount where+ toJSON DisableDelegatedAdminAccount' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ( "delegatedAdminAccountId"+ Data..= delegatedAdminAccountId+ )+ ]+ )++instance Data.ToPath DisableDelegatedAdminAccount where+ toPath =+ Prelude.const "/delegatedadminaccounts/disable"++instance Data.ToQuery DisableDelegatedAdminAccount where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDisableDelegatedAdminAccountResponse' smart constructor.+data DisableDelegatedAdminAccountResponse = DisableDelegatedAdminAccountResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The Amazon Web Services account ID of the successfully disabled+ -- delegated administrator.+ delegatedAdminAccountId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisableDelegatedAdminAccountResponse' 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', 'disableDelegatedAdminAccountResponse_httpStatus' - The response's http status code.+--+-- 'delegatedAdminAccountId', 'disableDelegatedAdminAccountResponse_delegatedAdminAccountId' - The Amazon Web Services account ID of the successfully disabled+-- delegated administrator.+newDisableDelegatedAdminAccountResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'delegatedAdminAccountId'+ Prelude.Text ->+ DisableDelegatedAdminAccountResponse+newDisableDelegatedAdminAccountResponse+ pHttpStatus_+ pDelegatedAdminAccountId_ =+ DisableDelegatedAdminAccountResponse'+ { httpStatus =+ pHttpStatus_,+ delegatedAdminAccountId =+ pDelegatedAdminAccountId_+ }++-- | The response's http status code.+disableDelegatedAdminAccountResponse_httpStatus :: Lens.Lens' DisableDelegatedAdminAccountResponse Prelude.Int+disableDelegatedAdminAccountResponse_httpStatus = Lens.lens (\DisableDelegatedAdminAccountResponse' {httpStatus} -> httpStatus) (\s@DisableDelegatedAdminAccountResponse' {} a -> s {httpStatus = a} :: DisableDelegatedAdminAccountResponse)++-- | The Amazon Web Services account ID of the successfully disabled+-- delegated administrator.+disableDelegatedAdminAccountResponse_delegatedAdminAccountId :: Lens.Lens' DisableDelegatedAdminAccountResponse Prelude.Text+disableDelegatedAdminAccountResponse_delegatedAdminAccountId = Lens.lens (\DisableDelegatedAdminAccountResponse' {delegatedAdminAccountId} -> delegatedAdminAccountId) (\s@DisableDelegatedAdminAccountResponse' {} a -> s {delegatedAdminAccountId = a} :: DisableDelegatedAdminAccountResponse)++instance+ Prelude.NFData+ DisableDelegatedAdminAccountResponse+ where+ rnf DisableDelegatedAdminAccountResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf delegatedAdminAccountId
+ gen/Amazonka/Inspector2/DisassociateMember.hs view
@@ -0,0 +1,175 @@+{-# 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.Inspector2.DisassociateMember+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Disassociates a member account from an Amazon Inspector delegated+-- administrator.+module Amazonka.Inspector2.DisassociateMember+ ( -- * Creating a Request+ DisassociateMember (..),+ newDisassociateMember,++ -- * Request Lenses+ disassociateMember_accountId,++ -- * Destructuring the Response+ DisassociateMemberResponse (..),+ newDisassociateMemberResponse,++ -- * Response Lenses+ disassociateMemberResponse_httpStatus,+ disassociateMemberResponse_accountId,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newDisassociateMember' smart constructor.+data DisassociateMember = DisassociateMember'+ { -- | The Amazon Web Services account ID of the member account to+ -- disassociate.+ accountId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisassociateMember' 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', 'disassociateMember_accountId' - The Amazon Web Services account ID of the member account to+-- disassociate.+newDisassociateMember ::+ -- | 'accountId'+ Prelude.Text ->+ DisassociateMember+newDisassociateMember pAccountId_ =+ DisassociateMember' {accountId = pAccountId_}++-- | The Amazon Web Services account ID of the member account to+-- disassociate.+disassociateMember_accountId :: Lens.Lens' DisassociateMember Prelude.Text+disassociateMember_accountId = Lens.lens (\DisassociateMember' {accountId} -> accountId) (\s@DisassociateMember' {} a -> s {accountId = a} :: DisassociateMember)++instance Core.AWSRequest DisassociateMember where+ type+ AWSResponse DisassociateMember =+ DisassociateMemberResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ DisassociateMemberResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "accountId")+ )++instance Prelude.Hashable DisassociateMember where+ hashWithSalt _salt DisassociateMember' {..} =+ _salt `Prelude.hashWithSalt` accountId++instance Prelude.NFData DisassociateMember where+ rnf DisassociateMember' {..} = Prelude.rnf accountId++instance Data.ToHeaders DisassociateMember where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON DisassociateMember where+ toJSON DisassociateMember' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("accountId" Data..= accountId)]+ )++instance Data.ToPath DisassociateMember where+ toPath = Prelude.const "/members/disassociate"++instance Data.ToQuery DisassociateMember where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDisassociateMemberResponse' smart constructor.+data DisassociateMemberResponse = DisassociateMemberResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The Amazon Web Services account ID of the successfully disassociated+ -- member.+ accountId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DisassociateMemberResponse' 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', 'disassociateMemberResponse_httpStatus' - The response's http status code.+--+-- 'accountId', 'disassociateMemberResponse_accountId' - The Amazon Web Services account ID of the successfully disassociated+-- member.+newDisassociateMemberResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'accountId'+ Prelude.Text ->+ DisassociateMemberResponse+newDisassociateMemberResponse+ pHttpStatus_+ pAccountId_ =+ DisassociateMemberResponse'+ { httpStatus =+ pHttpStatus_,+ accountId = pAccountId_+ }++-- | The response's http status code.+disassociateMemberResponse_httpStatus :: Lens.Lens' DisassociateMemberResponse Prelude.Int+disassociateMemberResponse_httpStatus = Lens.lens (\DisassociateMemberResponse' {httpStatus} -> httpStatus) (\s@DisassociateMemberResponse' {} a -> s {httpStatus = a} :: DisassociateMemberResponse)++-- | The Amazon Web Services account ID of the successfully disassociated+-- member.+disassociateMemberResponse_accountId :: Lens.Lens' DisassociateMemberResponse Prelude.Text+disassociateMemberResponse_accountId = Lens.lens (\DisassociateMemberResponse' {accountId} -> accountId) (\s@DisassociateMemberResponse' {} a -> s {accountId = a} :: DisassociateMemberResponse)++instance Prelude.NFData DisassociateMemberResponse where+ rnf DisassociateMemberResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf accountId
+ gen/Amazonka/Inspector2/Enable.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.Inspector2.Enable+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Enables Amazon Inspector scans for one or more Amazon Web Services+-- accounts.+module Amazonka.Inspector2.Enable+ ( -- * Creating a Request+ Enable (..),+ newEnable,++ -- * Request Lenses+ enable_accountIds,+ enable_clientToken,+ enable_resourceTypes,++ -- * Destructuring the Response+ EnableResponse (..),+ newEnableResponse,++ -- * Response Lenses+ enableResponse_failedAccounts,+ enableResponse_httpStatus,+ enableResponse_accounts,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newEnable' smart constructor.+data Enable = Enable'+ { -- | A list of account IDs you want to enable Amazon Inspector scans for.+ accountIds :: Prelude.Maybe [Prelude.Text],+ -- | The idempotency token for the request.+ clientToken :: Prelude.Maybe Prelude.Text,+ -- | The resource scan types you want to enable.+ resourceTypes :: Prelude.NonEmpty ResourceScanType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Enable' 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', 'enable_accountIds' - A list of account IDs you want to enable Amazon Inspector scans for.+--+-- 'clientToken', 'enable_clientToken' - The idempotency token for the request.+--+-- 'resourceTypes', 'enable_resourceTypes' - The resource scan types you want to enable.+newEnable ::+ -- | 'resourceTypes'+ Prelude.NonEmpty ResourceScanType ->+ Enable+newEnable pResourceTypes_ =+ Enable'+ { accountIds = Prelude.Nothing,+ clientToken = Prelude.Nothing,+ resourceTypes = Lens.coerced Lens.# pResourceTypes_+ }++-- | A list of account IDs you want to enable Amazon Inspector scans for.+enable_accountIds :: Lens.Lens' Enable (Prelude.Maybe [Prelude.Text])+enable_accountIds = Lens.lens (\Enable' {accountIds} -> accountIds) (\s@Enable' {} a -> s {accountIds = a} :: Enable) Prelude.. Lens.mapping Lens.coerced++-- | The idempotency token for the request.+enable_clientToken :: Lens.Lens' Enable (Prelude.Maybe Prelude.Text)+enable_clientToken = Lens.lens (\Enable' {clientToken} -> clientToken) (\s@Enable' {} a -> s {clientToken = a} :: Enable)++-- | The resource scan types you want to enable.+enable_resourceTypes :: Lens.Lens' Enable (Prelude.NonEmpty ResourceScanType)+enable_resourceTypes = Lens.lens (\Enable' {resourceTypes} -> resourceTypes) (\s@Enable' {} a -> s {resourceTypes = a} :: Enable) Prelude.. Lens.coerced++instance Core.AWSRequest Enable where+ type AWSResponse Enable = EnableResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ EnableResponse'+ Prelude.<$> (x Data..?> "failedAccounts" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..?> "accounts" Core..!@ Prelude.mempty)+ )++instance Prelude.Hashable Enable where+ hashWithSalt _salt Enable' {..} =+ _salt+ `Prelude.hashWithSalt` accountIds+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` resourceTypes++instance Prelude.NFData Enable where+ rnf Enable' {..} =+ Prelude.rnf accountIds+ `Prelude.seq` Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf resourceTypes++instance Data.ToHeaders Enable where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON Enable where+ toJSON Enable' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("accountIds" Data..=) Prelude.<$> accountIds,+ ("clientToken" Data..=) Prelude.<$> clientToken,+ Prelude.Just+ ("resourceTypes" Data..= resourceTypes)+ ]+ )++instance Data.ToPath Enable where+ toPath = Prelude.const "/enable"++instance Data.ToQuery Enable where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newEnableResponse' smart constructor.+data EnableResponse = EnableResponse'+ { -- | Information on any accounts for which Amazon Inspector scans could not+ -- be enabled. Details are provided for each account.+ failedAccounts :: Prelude.Maybe [FailedAccount],+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | Information on the accounts that have had Amazon Inspector scans+ -- successfully enabled. Details are provided for each account.+ accounts :: [Account]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EnableResponse' 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:+--+-- 'failedAccounts', 'enableResponse_failedAccounts' - Information on any accounts for which Amazon Inspector scans could not+-- be enabled. Details are provided for each account.+--+-- 'httpStatus', 'enableResponse_httpStatus' - The response's http status code.+--+-- 'accounts', 'enableResponse_accounts' - Information on the accounts that have had Amazon Inspector scans+-- successfully enabled. Details are provided for each account.+newEnableResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ EnableResponse+newEnableResponse pHttpStatus_ =+ EnableResponse'+ { failedAccounts = Prelude.Nothing,+ httpStatus = pHttpStatus_,+ accounts = Prelude.mempty+ }++-- | Information on any accounts for which Amazon Inspector scans could not+-- be enabled. Details are provided for each account.+enableResponse_failedAccounts :: Lens.Lens' EnableResponse (Prelude.Maybe [FailedAccount])+enableResponse_failedAccounts = Lens.lens (\EnableResponse' {failedAccounts} -> failedAccounts) (\s@EnableResponse' {} a -> s {failedAccounts = a} :: EnableResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+enableResponse_httpStatus :: Lens.Lens' EnableResponse Prelude.Int+enableResponse_httpStatus = Lens.lens (\EnableResponse' {httpStatus} -> httpStatus) (\s@EnableResponse' {} a -> s {httpStatus = a} :: EnableResponse)++-- | Information on the accounts that have had Amazon Inspector scans+-- successfully enabled. Details are provided for each account.+enableResponse_accounts :: Lens.Lens' EnableResponse [Account]+enableResponse_accounts = Lens.lens (\EnableResponse' {accounts} -> accounts) (\s@EnableResponse' {} a -> s {accounts = a} :: EnableResponse) Prelude.. Lens.coerced++instance Prelude.NFData EnableResponse where+ rnf EnableResponse' {..} =+ Prelude.rnf failedAccounts+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf accounts
+ gen/Amazonka/Inspector2/EnableDelegatedAdminAccount.hs view
@@ -0,0 +1,204 @@+{-# 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.Inspector2.EnableDelegatedAdminAccount+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Enables the Amazon Inspector delegated administrator for your+-- Organizations organization.+module Amazonka.Inspector2.EnableDelegatedAdminAccount+ ( -- * Creating a Request+ EnableDelegatedAdminAccount (..),+ newEnableDelegatedAdminAccount,++ -- * Request Lenses+ enableDelegatedAdminAccount_clientToken,+ enableDelegatedAdminAccount_delegatedAdminAccountId,++ -- * Destructuring the Response+ EnableDelegatedAdminAccountResponse (..),+ newEnableDelegatedAdminAccountResponse,++ -- * Response Lenses+ enableDelegatedAdminAccountResponse_httpStatus,+ enableDelegatedAdminAccountResponse_delegatedAdminAccountId,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newEnableDelegatedAdminAccount' smart constructor.+data EnableDelegatedAdminAccount = EnableDelegatedAdminAccount'+ { -- | The idempotency token for the request.+ clientToken :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Web Services account ID of the Amazon Inspector delegated+ -- administrator.+ delegatedAdminAccountId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EnableDelegatedAdminAccount' 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:+--+-- 'clientToken', 'enableDelegatedAdminAccount_clientToken' - The idempotency token for the request.+--+-- 'delegatedAdminAccountId', 'enableDelegatedAdminAccount_delegatedAdminAccountId' - The Amazon Web Services account ID of the Amazon Inspector delegated+-- administrator.+newEnableDelegatedAdminAccount ::+ -- | 'delegatedAdminAccountId'+ Prelude.Text ->+ EnableDelegatedAdminAccount+newEnableDelegatedAdminAccount+ pDelegatedAdminAccountId_ =+ EnableDelegatedAdminAccount'+ { clientToken =+ Prelude.Nothing,+ delegatedAdminAccountId =+ pDelegatedAdminAccountId_+ }++-- | The idempotency token for the request.+enableDelegatedAdminAccount_clientToken :: Lens.Lens' EnableDelegatedAdminAccount (Prelude.Maybe Prelude.Text)+enableDelegatedAdminAccount_clientToken = Lens.lens (\EnableDelegatedAdminAccount' {clientToken} -> clientToken) (\s@EnableDelegatedAdminAccount' {} a -> s {clientToken = a} :: EnableDelegatedAdminAccount)++-- | The Amazon Web Services account ID of the Amazon Inspector delegated+-- administrator.+enableDelegatedAdminAccount_delegatedAdminAccountId :: Lens.Lens' EnableDelegatedAdminAccount Prelude.Text+enableDelegatedAdminAccount_delegatedAdminAccountId = Lens.lens (\EnableDelegatedAdminAccount' {delegatedAdminAccountId} -> delegatedAdminAccountId) (\s@EnableDelegatedAdminAccount' {} a -> s {delegatedAdminAccountId = a} :: EnableDelegatedAdminAccount)++instance Core.AWSRequest EnableDelegatedAdminAccount where+ type+ AWSResponse EnableDelegatedAdminAccount =+ EnableDelegatedAdminAccountResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ EnableDelegatedAdminAccountResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "delegatedAdminAccountId")+ )++instance Prelude.Hashable EnableDelegatedAdminAccount where+ hashWithSalt _salt EnableDelegatedAdminAccount' {..} =+ _salt+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` delegatedAdminAccountId++instance Prelude.NFData EnableDelegatedAdminAccount where+ rnf EnableDelegatedAdminAccount' {..} =+ Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf delegatedAdminAccountId++instance Data.ToHeaders EnableDelegatedAdminAccount where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON EnableDelegatedAdminAccount where+ toJSON EnableDelegatedAdminAccount' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("clientToken" Data..=) Prelude.<$> clientToken,+ Prelude.Just+ ( "delegatedAdminAccountId"+ Data..= delegatedAdminAccountId+ )+ ]+ )++instance Data.ToPath EnableDelegatedAdminAccount where+ toPath =+ Prelude.const "/delegatedadminaccounts/enable"++instance Data.ToQuery EnableDelegatedAdminAccount where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newEnableDelegatedAdminAccountResponse' smart constructor.+data EnableDelegatedAdminAccountResponse = EnableDelegatedAdminAccountResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The Amazon Web Services account ID of the successfully Amazon Inspector+ -- delegated administrator.+ delegatedAdminAccountId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EnableDelegatedAdminAccountResponse' 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', 'enableDelegatedAdminAccountResponse_httpStatus' - The response's http status code.+--+-- 'delegatedAdminAccountId', 'enableDelegatedAdminAccountResponse_delegatedAdminAccountId' - The Amazon Web Services account ID of the successfully Amazon Inspector+-- delegated administrator.+newEnableDelegatedAdminAccountResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'delegatedAdminAccountId'+ Prelude.Text ->+ EnableDelegatedAdminAccountResponse+newEnableDelegatedAdminAccountResponse+ pHttpStatus_+ pDelegatedAdminAccountId_ =+ EnableDelegatedAdminAccountResponse'+ { httpStatus =+ pHttpStatus_,+ delegatedAdminAccountId =+ pDelegatedAdminAccountId_+ }++-- | The response's http status code.+enableDelegatedAdminAccountResponse_httpStatus :: Lens.Lens' EnableDelegatedAdminAccountResponse Prelude.Int+enableDelegatedAdminAccountResponse_httpStatus = Lens.lens (\EnableDelegatedAdminAccountResponse' {httpStatus} -> httpStatus) (\s@EnableDelegatedAdminAccountResponse' {} a -> s {httpStatus = a} :: EnableDelegatedAdminAccountResponse)++-- | The Amazon Web Services account ID of the successfully Amazon Inspector+-- delegated administrator.+enableDelegatedAdminAccountResponse_delegatedAdminAccountId :: Lens.Lens' EnableDelegatedAdminAccountResponse Prelude.Text+enableDelegatedAdminAccountResponse_delegatedAdminAccountId = Lens.lens (\EnableDelegatedAdminAccountResponse' {delegatedAdminAccountId} -> delegatedAdminAccountId) (\s@EnableDelegatedAdminAccountResponse' {} a -> s {delegatedAdminAccountId = a} :: EnableDelegatedAdminAccountResponse)++instance+ Prelude.NFData+ EnableDelegatedAdminAccountResponse+ where+ rnf EnableDelegatedAdminAccountResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf delegatedAdminAccountId
+ gen/Amazonka/Inspector2/GetConfiguration.hs view
@@ -0,0 +1,147 @@+{-# 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.Inspector2.GetConfiguration+-- 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 setting configurations for Inspector scans.+module Amazonka.Inspector2.GetConfiguration+ ( -- * Creating a Request+ GetConfiguration (..),+ newGetConfiguration,++ -- * Destructuring the Response+ GetConfigurationResponse (..),+ newGetConfigurationResponse,++ -- * Response Lenses+ getConfigurationResponse_ecrConfiguration,+ getConfigurationResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetConfiguration' smart constructor.+data GetConfiguration = GetConfiguration'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetConfiguration' 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.+newGetConfiguration ::+ GetConfiguration+newGetConfiguration = GetConfiguration'++instance Core.AWSRequest GetConfiguration where+ type+ AWSResponse GetConfiguration =+ GetConfigurationResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetConfigurationResponse'+ Prelude.<$> (x Data..?> "ecrConfiguration")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetConfiguration where+ hashWithSalt _salt _ =+ _salt `Prelude.hashWithSalt` ()++instance Prelude.NFData GetConfiguration where+ rnf _ = ()++instance Data.ToHeaders GetConfiguration where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON GetConfiguration where+ toJSON = Prelude.const (Data.Object Prelude.mempty)++instance Data.ToPath GetConfiguration where+ toPath = Prelude.const "/configuration/get"++instance Data.ToQuery GetConfiguration where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetConfigurationResponse' smart constructor.+data GetConfigurationResponse = GetConfigurationResponse'+ { -- | Specifies how the ECR automated re-scan duration is currently configured+ -- for your environment.+ ecrConfiguration :: Prelude.Maybe EcrConfigurationState,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetConfigurationResponse' 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:+--+-- 'ecrConfiguration', 'getConfigurationResponse_ecrConfiguration' - Specifies how the ECR automated re-scan duration is currently configured+-- for your environment.+--+-- 'httpStatus', 'getConfigurationResponse_httpStatus' - The response's http status code.+newGetConfigurationResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetConfigurationResponse+newGetConfigurationResponse pHttpStatus_ =+ GetConfigurationResponse'+ { ecrConfiguration =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Specifies how the ECR automated re-scan duration is currently configured+-- for your environment.+getConfigurationResponse_ecrConfiguration :: Lens.Lens' GetConfigurationResponse (Prelude.Maybe EcrConfigurationState)+getConfigurationResponse_ecrConfiguration = Lens.lens (\GetConfigurationResponse' {ecrConfiguration} -> ecrConfiguration) (\s@GetConfigurationResponse' {} a -> s {ecrConfiguration = a} :: GetConfigurationResponse)++-- | The response's http status code.+getConfigurationResponse_httpStatus :: Lens.Lens' GetConfigurationResponse Prelude.Int+getConfigurationResponse_httpStatus = Lens.lens (\GetConfigurationResponse' {httpStatus} -> httpStatus) (\s@GetConfigurationResponse' {} a -> s {httpStatus = a} :: GetConfigurationResponse)++instance Prelude.NFData GetConfigurationResponse where+ rnf GetConfigurationResponse' {..} =+ Prelude.rnf ecrConfiguration+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Inspector2/GetDelegatedAdminAccount.hs view
@@ -0,0 +1,152 @@+{-# 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.Inspector2.GetDelegatedAdminAccount+-- 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 information about the Amazon Inspector delegated administrator+-- for your organization.+module Amazonka.Inspector2.GetDelegatedAdminAccount+ ( -- * Creating a Request+ GetDelegatedAdminAccount (..),+ newGetDelegatedAdminAccount,++ -- * Destructuring the Response+ GetDelegatedAdminAccountResponse (..),+ newGetDelegatedAdminAccountResponse,++ -- * Response Lenses+ getDelegatedAdminAccountResponse_delegatedAdmin,+ getDelegatedAdminAccountResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetDelegatedAdminAccount' smart constructor.+data GetDelegatedAdminAccount = GetDelegatedAdminAccount'+ {+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetDelegatedAdminAccount' 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.+newGetDelegatedAdminAccount ::+ GetDelegatedAdminAccount+newGetDelegatedAdminAccount =+ GetDelegatedAdminAccount'++instance Core.AWSRequest GetDelegatedAdminAccount where+ type+ AWSResponse GetDelegatedAdminAccount =+ GetDelegatedAdminAccountResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetDelegatedAdminAccountResponse'+ Prelude.<$> (x Data..?> "delegatedAdmin")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetDelegatedAdminAccount where+ hashWithSalt _salt _ =+ _salt `Prelude.hashWithSalt` ()++instance Prelude.NFData GetDelegatedAdminAccount where+ rnf _ = ()++instance Data.ToHeaders GetDelegatedAdminAccount where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON GetDelegatedAdminAccount where+ toJSON = Prelude.const (Data.Object Prelude.mempty)++instance Data.ToPath GetDelegatedAdminAccount where+ toPath = Prelude.const "/delegatedadminaccounts/get"++instance Data.ToQuery GetDelegatedAdminAccount where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetDelegatedAdminAccountResponse' smart constructor.+data GetDelegatedAdminAccountResponse = GetDelegatedAdminAccountResponse'+ { -- | The Amazon Web Services account ID of the Amazon Inspector delegated+ -- administrator.+ delegatedAdmin :: Prelude.Maybe DelegatedAdmin,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetDelegatedAdminAccountResponse' 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:+--+-- 'delegatedAdmin', 'getDelegatedAdminAccountResponse_delegatedAdmin' - The Amazon Web Services account ID of the Amazon Inspector delegated+-- administrator.+--+-- 'httpStatus', 'getDelegatedAdminAccountResponse_httpStatus' - The response's http status code.+newGetDelegatedAdminAccountResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetDelegatedAdminAccountResponse+newGetDelegatedAdminAccountResponse pHttpStatus_ =+ GetDelegatedAdminAccountResponse'+ { delegatedAdmin =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Web Services account ID of the Amazon Inspector delegated+-- administrator.+getDelegatedAdminAccountResponse_delegatedAdmin :: Lens.Lens' GetDelegatedAdminAccountResponse (Prelude.Maybe DelegatedAdmin)+getDelegatedAdminAccountResponse_delegatedAdmin = Lens.lens (\GetDelegatedAdminAccountResponse' {delegatedAdmin} -> delegatedAdmin) (\s@GetDelegatedAdminAccountResponse' {} a -> s {delegatedAdmin = a} :: GetDelegatedAdminAccountResponse)++-- | The response's http status code.+getDelegatedAdminAccountResponse_httpStatus :: Lens.Lens' GetDelegatedAdminAccountResponse Prelude.Int+getDelegatedAdminAccountResponse_httpStatus = Lens.lens (\GetDelegatedAdminAccountResponse' {httpStatus} -> httpStatus) (\s@GetDelegatedAdminAccountResponse' {} a -> s {httpStatus = a} :: GetDelegatedAdminAccountResponse)++instance+ Prelude.NFData+ GetDelegatedAdminAccountResponse+ where+ rnf GetDelegatedAdminAccountResponse' {..} =+ Prelude.rnf delegatedAdmin+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Inspector2/GetFindingsReportStatus.hs view
@@ -0,0 +1,229 @@+{-# 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.Inspector2.GetFindingsReportStatus+-- 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 the status of a findings report.+module Amazonka.Inspector2.GetFindingsReportStatus+ ( -- * Creating a Request+ GetFindingsReportStatus (..),+ newGetFindingsReportStatus,++ -- * Request Lenses+ getFindingsReportStatus_reportId,++ -- * Destructuring the Response+ GetFindingsReportStatusResponse (..),+ newGetFindingsReportStatusResponse,++ -- * Response Lenses+ getFindingsReportStatusResponse_destination,+ getFindingsReportStatusResponse_errorCode,+ getFindingsReportStatusResponse_errorMessage,+ getFindingsReportStatusResponse_filterCriteria,+ getFindingsReportStatusResponse_reportId,+ getFindingsReportStatusResponse_status,+ getFindingsReportStatusResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetFindingsReportStatus' smart constructor.+data GetFindingsReportStatus = GetFindingsReportStatus'+ { -- | The ID of the report to retrieve the status of.+ reportId :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetFindingsReportStatus' 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:+--+-- 'reportId', 'getFindingsReportStatus_reportId' - The ID of the report to retrieve the status of.+newGetFindingsReportStatus ::+ GetFindingsReportStatus+newGetFindingsReportStatus =+ GetFindingsReportStatus'+ { reportId =+ Prelude.Nothing+ }++-- | The ID of the report to retrieve the status of.+getFindingsReportStatus_reportId :: Lens.Lens' GetFindingsReportStatus (Prelude.Maybe Prelude.Text)+getFindingsReportStatus_reportId = Lens.lens (\GetFindingsReportStatus' {reportId} -> reportId) (\s@GetFindingsReportStatus' {} a -> s {reportId = a} :: GetFindingsReportStatus)++instance Core.AWSRequest GetFindingsReportStatus where+ type+ AWSResponse GetFindingsReportStatus =+ GetFindingsReportStatusResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetFindingsReportStatusResponse'+ Prelude.<$> (x Data..?> "destination")+ Prelude.<*> (x Data..?> "errorCode")+ Prelude.<*> (x Data..?> "errorMessage")+ Prelude.<*> (x Data..?> "filterCriteria")+ Prelude.<*> (x Data..?> "reportId")+ Prelude.<*> (x Data..?> "status")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetFindingsReportStatus where+ hashWithSalt _salt GetFindingsReportStatus' {..} =+ _salt `Prelude.hashWithSalt` reportId++instance Prelude.NFData GetFindingsReportStatus where+ rnf GetFindingsReportStatus' {..} =+ Prelude.rnf reportId++instance Data.ToHeaders GetFindingsReportStatus where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON GetFindingsReportStatus where+ toJSON GetFindingsReportStatus' {..} =+ Data.object+ ( Prelude.catMaybes+ [("reportId" Data..=) Prelude.<$> reportId]+ )++instance Data.ToPath GetFindingsReportStatus where+ toPath = Prelude.const "/reporting/status/get"++instance Data.ToQuery GetFindingsReportStatus where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetFindingsReportStatusResponse' smart constructor.+data GetFindingsReportStatusResponse = GetFindingsReportStatusResponse'+ { -- | The destination of the report.+ destination :: Prelude.Maybe Destination,+ -- | The error code of the report.+ errorCode :: Prelude.Maybe ReportingErrorCode,+ -- | The error message of the report.+ errorMessage :: Prelude.Maybe Prelude.Text,+ -- | The filter criteria associated with the report.+ filterCriteria :: Prelude.Maybe FilterCriteria,+ -- | The ID of the report.+ reportId :: Prelude.Maybe Prelude.Text,+ -- | The status of the report.+ status :: Prelude.Maybe ExternalReportStatus,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetFindingsReportStatusResponse' 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:+--+-- 'destination', 'getFindingsReportStatusResponse_destination' - The destination of the report.+--+-- 'errorCode', 'getFindingsReportStatusResponse_errorCode' - The error code of the report.+--+-- 'errorMessage', 'getFindingsReportStatusResponse_errorMessage' - The error message of the report.+--+-- 'filterCriteria', 'getFindingsReportStatusResponse_filterCriteria' - The filter criteria associated with the report.+--+-- 'reportId', 'getFindingsReportStatusResponse_reportId' - The ID of the report.+--+-- 'status', 'getFindingsReportStatusResponse_status' - The status of the report.+--+-- 'httpStatus', 'getFindingsReportStatusResponse_httpStatus' - The response's http status code.+newGetFindingsReportStatusResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetFindingsReportStatusResponse+newGetFindingsReportStatusResponse pHttpStatus_ =+ GetFindingsReportStatusResponse'+ { destination =+ Prelude.Nothing,+ errorCode = Prelude.Nothing,+ errorMessage = Prelude.Nothing,+ filterCriteria = Prelude.Nothing,+ reportId = Prelude.Nothing,+ status = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The destination of the report.+getFindingsReportStatusResponse_destination :: Lens.Lens' GetFindingsReportStatusResponse (Prelude.Maybe Destination)+getFindingsReportStatusResponse_destination = Lens.lens (\GetFindingsReportStatusResponse' {destination} -> destination) (\s@GetFindingsReportStatusResponse' {} a -> s {destination = a} :: GetFindingsReportStatusResponse)++-- | The error code of the report.+getFindingsReportStatusResponse_errorCode :: Lens.Lens' GetFindingsReportStatusResponse (Prelude.Maybe ReportingErrorCode)+getFindingsReportStatusResponse_errorCode = Lens.lens (\GetFindingsReportStatusResponse' {errorCode} -> errorCode) (\s@GetFindingsReportStatusResponse' {} a -> s {errorCode = a} :: GetFindingsReportStatusResponse)++-- | The error message of the report.+getFindingsReportStatusResponse_errorMessage :: Lens.Lens' GetFindingsReportStatusResponse (Prelude.Maybe Prelude.Text)+getFindingsReportStatusResponse_errorMessage = Lens.lens (\GetFindingsReportStatusResponse' {errorMessage} -> errorMessage) (\s@GetFindingsReportStatusResponse' {} a -> s {errorMessage = a} :: GetFindingsReportStatusResponse)++-- | The filter criteria associated with the report.+getFindingsReportStatusResponse_filterCriteria :: Lens.Lens' GetFindingsReportStatusResponse (Prelude.Maybe FilterCriteria)+getFindingsReportStatusResponse_filterCriteria = Lens.lens (\GetFindingsReportStatusResponse' {filterCriteria} -> filterCriteria) (\s@GetFindingsReportStatusResponse' {} a -> s {filterCriteria = a} :: GetFindingsReportStatusResponse)++-- | The ID of the report.+getFindingsReportStatusResponse_reportId :: Lens.Lens' GetFindingsReportStatusResponse (Prelude.Maybe Prelude.Text)+getFindingsReportStatusResponse_reportId = Lens.lens (\GetFindingsReportStatusResponse' {reportId} -> reportId) (\s@GetFindingsReportStatusResponse' {} a -> s {reportId = a} :: GetFindingsReportStatusResponse)++-- | The status of the report.+getFindingsReportStatusResponse_status :: Lens.Lens' GetFindingsReportStatusResponse (Prelude.Maybe ExternalReportStatus)+getFindingsReportStatusResponse_status = Lens.lens (\GetFindingsReportStatusResponse' {status} -> status) (\s@GetFindingsReportStatusResponse' {} a -> s {status = a} :: GetFindingsReportStatusResponse)++-- | The response's http status code.+getFindingsReportStatusResponse_httpStatus :: Lens.Lens' GetFindingsReportStatusResponse Prelude.Int+getFindingsReportStatusResponse_httpStatus = Lens.lens (\GetFindingsReportStatusResponse' {httpStatus} -> httpStatus) (\s@GetFindingsReportStatusResponse' {} a -> s {httpStatus = a} :: GetFindingsReportStatusResponse)++instance+ Prelude.NFData+ GetFindingsReportStatusResponse+ where+ rnf GetFindingsReportStatusResponse' {..} =+ Prelude.rnf destination+ `Prelude.seq` Prelude.rnf errorCode+ `Prelude.seq` Prelude.rnf errorMessage+ `Prelude.seq` Prelude.rnf filterCriteria+ `Prelude.seq` Prelude.rnf reportId+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Inspector2/GetMember.hs view
@@ -0,0 +1,164 @@+{-# 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.Inspector2.GetMember+-- 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 member information for your organization.+module Amazonka.Inspector2.GetMember+ ( -- * Creating a Request+ GetMember (..),+ newGetMember,++ -- * Request Lenses+ getMember_accountId,++ -- * Destructuring the Response+ GetMemberResponse (..),+ newGetMemberResponse,++ -- * Response Lenses+ getMemberResponse_member,+ getMemberResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newGetMember' smart constructor.+data GetMember = GetMember'+ { -- | The Amazon Web Services account ID of the member account to retrieve+ -- information on.+ accountId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetMember' 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', 'getMember_accountId' - The Amazon Web Services account ID of the member account to retrieve+-- information on.+newGetMember ::+ -- | 'accountId'+ Prelude.Text ->+ GetMember+newGetMember pAccountId_ =+ GetMember' {accountId = pAccountId_}++-- | The Amazon Web Services account ID of the member account to retrieve+-- information on.+getMember_accountId :: Lens.Lens' GetMember Prelude.Text+getMember_accountId = Lens.lens (\GetMember' {accountId} -> accountId) (\s@GetMember' {} a -> s {accountId = a} :: GetMember)++instance Core.AWSRequest GetMember where+ type AWSResponse GetMember = GetMemberResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetMemberResponse'+ Prelude.<$> (x Data..?> "member")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetMember where+ hashWithSalt _salt GetMember' {..} =+ _salt `Prelude.hashWithSalt` accountId++instance Prelude.NFData GetMember where+ rnf GetMember' {..} = Prelude.rnf accountId++instance Data.ToHeaders GetMember where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON GetMember where+ toJSON GetMember' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("accountId" Data..= accountId)]+ )++instance Data.ToPath GetMember where+ toPath = Prelude.const "/members/get"++instance Data.ToQuery GetMember where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetMemberResponse' smart constructor.+data GetMemberResponse = GetMemberResponse'+ { -- | Details of the retrieved member account.+ member :: Prelude.Maybe Member,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetMemberResponse' 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:+--+-- 'member', 'getMemberResponse_member' - Details of the retrieved member account.+--+-- 'httpStatus', 'getMemberResponse_httpStatus' - The response's http status code.+newGetMemberResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetMemberResponse+newGetMemberResponse pHttpStatus_ =+ GetMemberResponse'+ { member = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Details of the retrieved member account.+getMemberResponse_member :: Lens.Lens' GetMemberResponse (Prelude.Maybe Member)+getMemberResponse_member = Lens.lens (\GetMemberResponse' {member} -> member) (\s@GetMemberResponse' {} a -> s {member = a} :: GetMemberResponse)++-- | The response's http status code.+getMemberResponse_httpStatus :: Lens.Lens' GetMemberResponse Prelude.Int+getMemberResponse_httpStatus = Lens.lens (\GetMemberResponse' {httpStatus} -> httpStatus) (\s@GetMemberResponse' {} a -> s {httpStatus = a} :: GetMemberResponse)++instance Prelude.NFData GetMemberResponse where+ rnf GetMemberResponse' {..} =+ Prelude.rnf member+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Inspector2/Lens.hs view
@@ -0,0 +1,918 @@+{-# 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.Inspector2.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.Inspector2.Lens+ ( -- * Operations++ -- ** AssociateMember+ associateMember_accountId,+ associateMemberResponse_httpStatus,+ associateMemberResponse_accountId,++ -- ** BatchGetAccountStatus+ batchGetAccountStatus_accountIds,+ batchGetAccountStatusResponse_failedAccounts,+ batchGetAccountStatusResponse_httpStatus,+ batchGetAccountStatusResponse_accounts,++ -- ** BatchGetFreeTrialInfo+ batchGetFreeTrialInfo_accountIds,+ batchGetFreeTrialInfoResponse_httpStatus,+ batchGetFreeTrialInfoResponse_accounts,+ batchGetFreeTrialInfoResponse_failedAccounts,++ -- ** CancelFindingsReport+ cancelFindingsReport_reportId,+ cancelFindingsReportResponse_httpStatus,+ cancelFindingsReportResponse_reportId,++ -- ** CreateFilter+ createFilter_description,+ createFilter_reason,+ createFilter_tags,+ createFilter_action,+ createFilter_filterCriteria,+ createFilter_name,+ createFilterResponse_httpStatus,+ createFilterResponse_arn,++ -- ** CreateFindingsReport+ createFindingsReport_filterCriteria,+ createFindingsReport_reportFormat,+ createFindingsReport_s3Destination,+ createFindingsReportResponse_reportId,+ createFindingsReportResponse_httpStatus,++ -- ** DeleteFilter+ deleteFilter_arn,+ deleteFilterResponse_httpStatus,+ deleteFilterResponse_arn,++ -- ** DescribeOrganizationConfiguration+ describeOrganizationConfigurationResponse_autoEnable,+ describeOrganizationConfigurationResponse_maxAccountLimitReached,+ describeOrganizationConfigurationResponse_httpStatus,++ -- ** Disable+ disable_accountIds,+ disable_resourceTypes,+ disableResponse_failedAccounts,+ disableResponse_httpStatus,+ disableResponse_accounts,++ -- ** DisableDelegatedAdminAccount+ disableDelegatedAdminAccount_delegatedAdminAccountId,+ disableDelegatedAdminAccountResponse_httpStatus,+ disableDelegatedAdminAccountResponse_delegatedAdminAccountId,++ -- ** DisassociateMember+ disassociateMember_accountId,+ disassociateMemberResponse_httpStatus,+ disassociateMemberResponse_accountId,++ -- ** Enable+ enable_accountIds,+ enable_clientToken,+ enable_resourceTypes,+ enableResponse_failedAccounts,+ enableResponse_httpStatus,+ enableResponse_accounts,++ -- ** EnableDelegatedAdminAccount+ enableDelegatedAdminAccount_clientToken,+ enableDelegatedAdminAccount_delegatedAdminAccountId,+ enableDelegatedAdminAccountResponse_httpStatus,+ enableDelegatedAdminAccountResponse_delegatedAdminAccountId,++ -- ** GetConfiguration+ getConfigurationResponse_ecrConfiguration,+ getConfigurationResponse_httpStatus,++ -- ** GetDelegatedAdminAccount+ getDelegatedAdminAccountResponse_delegatedAdmin,+ getDelegatedAdminAccountResponse_httpStatus,++ -- ** GetFindingsReportStatus+ getFindingsReportStatus_reportId,+ getFindingsReportStatusResponse_destination,+ getFindingsReportStatusResponse_errorCode,+ getFindingsReportStatusResponse_errorMessage,+ getFindingsReportStatusResponse_filterCriteria,+ getFindingsReportStatusResponse_reportId,+ getFindingsReportStatusResponse_status,+ getFindingsReportStatusResponse_httpStatus,++ -- ** GetMember+ getMember_accountId,+ getMemberResponse_member,+ getMemberResponse_httpStatus,++ -- ** ListAccountPermissions+ listAccountPermissions_maxResults,+ listAccountPermissions_nextToken,+ listAccountPermissions_service,+ listAccountPermissionsResponse_nextToken,+ listAccountPermissionsResponse_httpStatus,+ listAccountPermissionsResponse_permissions,++ -- ** ListCoverage+ listCoverage_filterCriteria,+ listCoverage_maxResults,+ listCoverage_nextToken,+ listCoverageResponse_coveredResources,+ listCoverageResponse_nextToken,+ listCoverageResponse_httpStatus,++ -- ** ListCoverageStatistics+ listCoverageStatistics_filterCriteria,+ listCoverageStatistics_groupBy,+ listCoverageStatistics_nextToken,+ listCoverageStatisticsResponse_countsByGroup,+ listCoverageStatisticsResponse_nextToken,+ listCoverageStatisticsResponse_httpStatus,+ listCoverageStatisticsResponse_totalCounts,++ -- ** ListDelegatedAdminAccounts+ listDelegatedAdminAccounts_maxResults,+ listDelegatedAdminAccounts_nextToken,+ listDelegatedAdminAccountsResponse_delegatedAdminAccounts,+ listDelegatedAdminAccountsResponse_nextToken,+ listDelegatedAdminAccountsResponse_httpStatus,++ -- ** ListFilters+ listFilters_action,+ listFilters_arns,+ listFilters_maxResults,+ listFilters_nextToken,+ listFiltersResponse_nextToken,+ listFiltersResponse_httpStatus,+ listFiltersResponse_filters,++ -- ** ListFindingAggregations+ listFindingAggregations_accountIds,+ listFindingAggregations_aggregationRequest,+ listFindingAggregations_maxResults,+ listFindingAggregations_nextToken,+ listFindingAggregations_aggregationType,+ listFindingAggregationsResponse_nextToken,+ listFindingAggregationsResponse_responses,+ listFindingAggregationsResponse_httpStatus,+ listFindingAggregationsResponse_aggregationType,++ -- ** ListFindings+ listFindings_filterCriteria,+ listFindings_maxResults,+ listFindings_nextToken,+ listFindings_sortCriteria,+ listFindingsResponse_findings,+ listFindingsResponse_nextToken,+ listFindingsResponse_httpStatus,++ -- ** ListMembers+ listMembers_maxResults,+ listMembers_nextToken,+ listMembers_onlyAssociated,+ listMembersResponse_members,+ listMembersResponse_nextToken,+ listMembersResponse_httpStatus,++ -- ** ListTagsForResource+ listTagsForResource_resourceArn,+ listTagsForResourceResponse_tags,+ listTagsForResourceResponse_httpStatus,++ -- ** ListUsageTotals+ listUsageTotals_accountIds,+ listUsageTotals_maxResults,+ listUsageTotals_nextToken,+ listUsageTotalsResponse_nextToken,+ listUsageTotalsResponse_totals,+ listUsageTotalsResponse_httpStatus,++ -- ** TagResource+ tagResource_resourceArn,+ tagResource_tags,+ tagResourceResponse_httpStatus,++ -- ** UntagResource+ untagResource_resourceArn,+ untagResource_tagKeys,+ untagResourceResponse_httpStatus,++ -- ** UpdateConfiguration+ updateConfiguration_ecrConfiguration,+ updateConfigurationResponse_httpStatus,++ -- ** UpdateFilter+ updateFilter_action,+ updateFilter_description,+ updateFilter_filterCriteria,+ updateFilter_name,+ updateFilter_reason,+ updateFilter_filterArn,+ updateFilterResponse_httpStatus,+ updateFilterResponse_arn,++ -- ** UpdateOrganizationConfiguration+ updateOrganizationConfiguration_autoEnable,+ updateOrganizationConfigurationResponse_httpStatus,+ updateOrganizationConfigurationResponse_autoEnable,++ -- * Types++ -- ** Account+ account_accountId,+ account_resourceStatus,+ account_status,++ -- ** AccountAggregation+ accountAggregation_findingType,+ accountAggregation_resourceType,+ accountAggregation_sortBy,+ accountAggregation_sortOrder,++ -- ** AccountAggregationResponse+ accountAggregationResponse_accountId,+ accountAggregationResponse_severityCounts,++ -- ** AccountState+ accountState_accountId,+ accountState_resourceState,+ accountState_state,++ -- ** AggregationRequest+ aggregationRequest_accountAggregation,+ aggregationRequest_amiAggregation,+ aggregationRequest_awsEcrContainerAggregation,+ aggregationRequest_ec2InstanceAggregation,+ aggregationRequest_findingTypeAggregation,+ aggregationRequest_imageLayerAggregation,+ aggregationRequest_lambdaFunctionAggregation,+ aggregationRequest_lambdaLayerAggregation,+ aggregationRequest_packageAggregation,+ aggregationRequest_repositoryAggregation,+ aggregationRequest_titleAggregation,++ -- ** AggregationResponse+ aggregationResponse_accountAggregation,+ aggregationResponse_amiAggregation,+ aggregationResponse_awsEcrContainerAggregation,+ aggregationResponse_ec2InstanceAggregation,+ aggregationResponse_findingTypeAggregation,+ aggregationResponse_imageLayerAggregation,+ aggregationResponse_lambdaFunctionAggregation,+ aggregationResponse_lambdaLayerAggregation,+ aggregationResponse_packageAggregation,+ aggregationResponse_repositoryAggregation,+ aggregationResponse_titleAggregation,++ -- ** AmiAggregation+ amiAggregation_amis,+ amiAggregation_sortBy,+ amiAggregation_sortOrder,++ -- ** AmiAggregationResponse+ amiAggregationResponse_accountId,+ amiAggregationResponse_affectedInstances,+ amiAggregationResponse_severityCounts,+ amiAggregationResponse_ami,++ -- ** AutoEnable+ autoEnable_lambda,+ autoEnable_ec2,+ autoEnable_ecr,++ -- ** AwsEc2InstanceDetails+ awsEc2InstanceDetails_iamInstanceProfileArn,+ awsEc2InstanceDetails_imageId,+ awsEc2InstanceDetails_ipV4Addresses,+ awsEc2InstanceDetails_ipV6Addresses,+ awsEc2InstanceDetails_keyName,+ awsEc2InstanceDetails_launchedAt,+ awsEc2InstanceDetails_platform,+ awsEc2InstanceDetails_subnetId,+ awsEc2InstanceDetails_type,+ awsEc2InstanceDetails_vpcId,++ -- ** AwsEcrContainerAggregation+ awsEcrContainerAggregation_architectures,+ awsEcrContainerAggregation_imageShas,+ awsEcrContainerAggregation_imageTags,+ awsEcrContainerAggregation_repositories,+ awsEcrContainerAggregation_resourceIds,+ awsEcrContainerAggregation_sortBy,+ awsEcrContainerAggregation_sortOrder,++ -- ** AwsEcrContainerAggregationResponse+ awsEcrContainerAggregationResponse_accountId,+ awsEcrContainerAggregationResponse_architecture,+ awsEcrContainerAggregationResponse_imageSha,+ awsEcrContainerAggregationResponse_imageTags,+ awsEcrContainerAggregationResponse_repository,+ awsEcrContainerAggregationResponse_severityCounts,+ awsEcrContainerAggregationResponse_resourceId,++ -- ** AwsEcrContainerImageDetails+ awsEcrContainerImageDetails_architecture,+ awsEcrContainerImageDetails_author,+ awsEcrContainerImageDetails_imageTags,+ awsEcrContainerImageDetails_platform,+ awsEcrContainerImageDetails_pushedAt,+ awsEcrContainerImageDetails_imageHash,+ awsEcrContainerImageDetails_registry,+ awsEcrContainerImageDetails_repositoryName,++ -- ** AwsLambdaFunctionDetails+ awsLambdaFunctionDetails_architectures,+ awsLambdaFunctionDetails_lastModifiedAt,+ awsLambdaFunctionDetails_layers,+ awsLambdaFunctionDetails_packageType,+ awsLambdaFunctionDetails_vpcConfig,+ awsLambdaFunctionDetails_codeSha256,+ awsLambdaFunctionDetails_executionRoleArn,+ awsLambdaFunctionDetails_functionName,+ awsLambdaFunctionDetails_runtime,+ awsLambdaFunctionDetails_version,++ -- ** Counts+ counts_count,+ counts_groupKey,++ -- ** CoverageFilterCriteria+ coverageFilterCriteria_accountId,+ coverageFilterCriteria_ec2InstanceTags,+ coverageFilterCriteria_ecrImageTags,+ coverageFilterCriteria_ecrRepositoryName,+ coverageFilterCriteria_lambdaFunctionName,+ coverageFilterCriteria_lambdaFunctionRuntime,+ coverageFilterCriteria_lambdaFunctionTags,+ coverageFilterCriteria_resourceId,+ coverageFilterCriteria_resourceType,+ coverageFilterCriteria_scanStatusCode,+ coverageFilterCriteria_scanStatusReason,+ coverageFilterCriteria_scanType,++ -- ** CoverageMapFilter+ coverageMapFilter_value,+ coverageMapFilter_comparison,+ coverageMapFilter_key,++ -- ** CoverageStringFilter+ coverageStringFilter_comparison,+ coverageStringFilter_value,++ -- ** CoveredResource+ coveredResource_resourceMetadata,+ coveredResource_scanStatus,+ coveredResource_accountId,+ coveredResource_resourceId,+ coveredResource_resourceType,+ coveredResource_scanType,++ -- ** CvssScore+ cvssScore_baseScore,+ cvssScore_scoringVector,+ cvssScore_source,+ cvssScore_version,++ -- ** CvssScoreAdjustment+ cvssScoreAdjustment_metric,+ cvssScoreAdjustment_reason,++ -- ** CvssScoreDetails+ cvssScoreDetails_adjustments,+ cvssScoreDetails_cvssSource,+ cvssScoreDetails_score,+ cvssScoreDetails_scoreSource,+ cvssScoreDetails_scoringVector,+ cvssScoreDetails_version,++ -- ** DateFilter+ dateFilter_endInclusive,+ dateFilter_startInclusive,++ -- ** DelegatedAdmin+ delegatedAdmin_accountId,+ delegatedAdmin_relationshipStatus,++ -- ** DelegatedAdminAccount+ delegatedAdminAccount_accountId,+ delegatedAdminAccount_status,++ -- ** Destination+ destination_keyPrefix,+ destination_bucketName,+ destination_kmsKeyArn,++ -- ** Ec2InstanceAggregation+ ec2InstanceAggregation_amis,+ ec2InstanceAggregation_instanceIds,+ ec2InstanceAggregation_instanceTags,+ ec2InstanceAggregation_operatingSystems,+ ec2InstanceAggregation_sortBy,+ ec2InstanceAggregation_sortOrder,++ -- ** Ec2InstanceAggregationResponse+ ec2InstanceAggregationResponse_accountId,+ ec2InstanceAggregationResponse_ami,+ ec2InstanceAggregationResponse_instanceTags,+ ec2InstanceAggregationResponse_networkFindings,+ ec2InstanceAggregationResponse_operatingSystem,+ ec2InstanceAggregationResponse_severityCounts,+ ec2InstanceAggregationResponse_instanceId,++ -- ** Ec2Metadata+ ec2Metadata_amiId,+ ec2Metadata_platform,+ ec2Metadata_tags,++ -- ** EcrConfiguration+ ecrConfiguration_rescanDuration,++ -- ** EcrConfigurationState+ ecrConfigurationState_rescanDurationState,++ -- ** EcrContainerImageMetadata+ ecrContainerImageMetadata_tags,++ -- ** EcrRepositoryMetadata+ ecrRepositoryMetadata_name,+ ecrRepositoryMetadata_scanFrequency,++ -- ** EcrRescanDurationState+ ecrRescanDurationState_rescanDuration,+ ecrRescanDurationState_status,+ ecrRescanDurationState_updatedAt,++ -- ** ExploitabilityDetails+ exploitabilityDetails_lastKnownExploitAt,++ -- ** FailedAccount+ failedAccount_resourceStatus,+ failedAccount_status,+ failedAccount_accountId,+ failedAccount_errorCode,+ failedAccount_errorMessage,++ -- ** Filter+ filter_description,+ filter_reason,+ filter_tags,+ filter_action,+ filter_arn,+ filter_createdAt,+ filter_criteria,+ filter_name,+ filter_ownerId,+ filter_updatedAt,++ -- ** FilterCriteria+ filterCriteria_awsAccountId,+ filterCriteria_componentId,+ filterCriteria_componentType,+ filterCriteria_ec2InstanceImageId,+ filterCriteria_ec2InstanceSubnetId,+ filterCriteria_ec2InstanceVpcId,+ filterCriteria_ecrImageArchitecture,+ filterCriteria_ecrImageHash,+ filterCriteria_ecrImagePushedAt,+ filterCriteria_ecrImageRegistry,+ filterCriteria_ecrImageRepositoryName,+ filterCriteria_ecrImageTags,+ filterCriteria_exploitAvailable,+ filterCriteria_findingArn,+ filterCriteria_findingStatus,+ filterCriteria_findingType,+ filterCriteria_firstObservedAt,+ filterCriteria_fixAvailable,+ filterCriteria_inspectorScore,+ filterCriteria_lambdaFunctionExecutionRoleArn,+ filterCriteria_lambdaFunctionLastModifiedAt,+ filterCriteria_lambdaFunctionLayers,+ filterCriteria_lambdaFunctionName,+ filterCriteria_lambdaFunctionRuntime,+ filterCriteria_lastObservedAt,+ filterCriteria_networkProtocol,+ filterCriteria_portRange,+ filterCriteria_relatedVulnerabilities,+ filterCriteria_resourceId,+ filterCriteria_resourceTags,+ filterCriteria_resourceType,+ filterCriteria_severity,+ filterCriteria_title,+ filterCriteria_updatedAt,+ filterCriteria_vendorSeverity,+ filterCriteria_vulnerabilityId,+ filterCriteria_vulnerabilitySource,+ filterCriteria_vulnerablePackages,++ -- ** Finding+ finding_exploitAvailable,+ finding_exploitabilityDetails,+ finding_fixAvailable,+ finding_inspectorScore,+ finding_inspectorScoreDetails,+ finding_networkReachabilityDetails,+ finding_packageVulnerabilityDetails,+ finding_title,+ finding_updatedAt,+ finding_awsAccountId,+ finding_description,+ finding_findingArn,+ finding_firstObservedAt,+ finding_lastObservedAt,+ finding_remediation,+ finding_resources,+ finding_severity,+ finding_status,+ finding_type,++ -- ** FindingTypeAggregation+ findingTypeAggregation_findingType,+ findingTypeAggregation_resourceType,+ findingTypeAggregation_sortBy,+ findingTypeAggregation_sortOrder,++ -- ** FindingTypeAggregationResponse+ findingTypeAggregationResponse_accountId,+ findingTypeAggregationResponse_severityCounts,++ -- ** FreeTrialAccountInfo+ freeTrialAccountInfo_accountId,+ freeTrialAccountInfo_freeTrialInfo,++ -- ** FreeTrialInfo+ freeTrialInfo_end,+ freeTrialInfo_start,+ freeTrialInfo_status,+ freeTrialInfo_type,++ -- ** FreeTrialInfoError+ freeTrialInfoError_accountId,+ freeTrialInfoError_code,+ freeTrialInfoError_message,++ -- ** ImageLayerAggregation+ imageLayerAggregation_layerHashes,+ imageLayerAggregation_repositories,+ imageLayerAggregation_resourceIds,+ imageLayerAggregation_sortBy,+ imageLayerAggregation_sortOrder,++ -- ** ImageLayerAggregationResponse+ imageLayerAggregationResponse_severityCounts,+ imageLayerAggregationResponse_accountId,+ imageLayerAggregationResponse_layerHash,+ imageLayerAggregationResponse_repository,+ imageLayerAggregationResponse_resourceId,++ -- ** InspectorScoreDetails+ inspectorScoreDetails_adjustedCvss,++ -- ** LambdaFunctionAggregation+ lambdaFunctionAggregation_functionNames,+ lambdaFunctionAggregation_functionTags,+ lambdaFunctionAggregation_resourceIds,+ lambdaFunctionAggregation_runtimes,+ lambdaFunctionAggregation_sortBy,+ lambdaFunctionAggregation_sortOrder,++ -- ** LambdaFunctionAggregationResponse+ lambdaFunctionAggregationResponse_accountId,+ lambdaFunctionAggregationResponse_functionName,+ lambdaFunctionAggregationResponse_lambdaTags,+ lambdaFunctionAggregationResponse_lastModifiedAt,+ lambdaFunctionAggregationResponse_runtime,+ lambdaFunctionAggregationResponse_severityCounts,+ lambdaFunctionAggregationResponse_resourceId,++ -- ** LambdaFunctionMetadata+ lambdaFunctionMetadata_functionName,+ lambdaFunctionMetadata_functionTags,+ lambdaFunctionMetadata_layers,+ lambdaFunctionMetadata_runtime,++ -- ** LambdaLayerAggregation+ lambdaLayerAggregation_functionNames,+ lambdaLayerAggregation_layerArns,+ lambdaLayerAggregation_resourceIds,+ lambdaLayerAggregation_sortBy,+ lambdaLayerAggregation_sortOrder,++ -- ** LambdaLayerAggregationResponse+ lambdaLayerAggregationResponse_severityCounts,+ lambdaLayerAggregationResponse_accountId,+ lambdaLayerAggregationResponse_functionName,+ lambdaLayerAggregationResponse_layerArn,+ lambdaLayerAggregationResponse_resourceId,++ -- ** LambdaVpcConfig+ lambdaVpcConfig_securityGroupIds,+ lambdaVpcConfig_subnetIds,+ lambdaVpcConfig_vpcId,++ -- ** MapFilter+ mapFilter_value,+ mapFilter_comparison,+ mapFilter_key,++ -- ** Member+ member_accountId,+ member_delegatedAdminAccountId,+ member_relationshipStatus,+ member_updatedAt,++ -- ** NetworkPath+ networkPath_steps,++ -- ** NetworkReachabilityDetails+ networkReachabilityDetails_networkPath,+ networkReachabilityDetails_openPortRange,+ networkReachabilityDetails_protocol,++ -- ** NumberFilter+ numberFilter_lowerInclusive,+ numberFilter_upperInclusive,++ -- ** PackageAggregation+ packageAggregation_packageNames,+ packageAggregation_sortBy,+ packageAggregation_sortOrder,++ -- ** PackageAggregationResponse+ packageAggregationResponse_accountId,+ packageAggregationResponse_severityCounts,+ packageAggregationResponse_packageName,++ -- ** PackageFilter+ packageFilter_architecture,+ packageFilter_epoch,+ packageFilter_name,+ packageFilter_release,+ packageFilter_sourceLambdaLayerArn,+ packageFilter_sourceLayerHash,+ packageFilter_version,++ -- ** PackageVulnerabilityDetails+ packageVulnerabilityDetails_cvss,+ packageVulnerabilityDetails_referenceUrls,+ packageVulnerabilityDetails_relatedVulnerabilities,+ packageVulnerabilityDetails_sourceUrl,+ packageVulnerabilityDetails_vendorCreatedAt,+ packageVulnerabilityDetails_vendorSeverity,+ packageVulnerabilityDetails_vendorUpdatedAt,+ packageVulnerabilityDetails_vulnerablePackages,+ packageVulnerabilityDetails_source,+ packageVulnerabilityDetails_vulnerabilityId,++ -- ** Permission+ permission_operation,+ permission_service,++ -- ** PortRange+ portRange_begin,+ portRange_end,++ -- ** PortRangeFilter+ portRangeFilter_beginInclusive,+ portRangeFilter_endInclusive,++ -- ** Recommendation+ recommendation_url,+ recommendation_text,++ -- ** Remediation+ remediation_recommendation,++ -- ** RepositoryAggregation+ repositoryAggregation_repositories,+ repositoryAggregation_sortBy,+ repositoryAggregation_sortOrder,++ -- ** RepositoryAggregationResponse+ repositoryAggregationResponse_accountId,+ repositoryAggregationResponse_affectedImages,+ repositoryAggregationResponse_severityCounts,+ repositoryAggregationResponse_repository,++ -- ** Resource+ resource_details,+ resource_partition,+ resource_region,+ resource_tags,+ resource_id,+ resource_type,++ -- ** ResourceDetails+ resourceDetails_awsEc2Instance,+ resourceDetails_awsEcrContainerImage,+ resourceDetails_awsLambdaFunction,++ -- ** ResourceScanMetadata+ resourceScanMetadata_ec2,+ resourceScanMetadata_ecrImage,+ resourceScanMetadata_ecrRepository,+ resourceScanMetadata_lambdaFunction,++ -- ** ResourceState+ resourceState_lambda,+ resourceState_ec2,+ resourceState_ecr,++ -- ** ResourceStatus+ resourceStatus_lambda,+ resourceStatus_ec2,+ resourceStatus_ecr,++ -- ** ScanStatus+ scanStatus_reason,+ scanStatus_statusCode,++ -- ** SeverityCounts+ severityCounts_all,+ severityCounts_critical,+ severityCounts_high,+ severityCounts_medium,++ -- ** SortCriteria+ sortCriteria_field,+ sortCriteria_sortOrder,++ -- ** State+ state_errorCode,+ state_errorMessage,+ state_status,++ -- ** Step+ step_componentId,+ step_componentType,++ -- ** StringFilter+ stringFilter_comparison,+ stringFilter_value,++ -- ** TitleAggregation+ titleAggregation_resourceType,+ titleAggregation_sortBy,+ titleAggregation_sortOrder,+ titleAggregation_titles,+ titleAggregation_vulnerabilityIds,++ -- ** TitleAggregationResponse+ titleAggregationResponse_accountId,+ titleAggregationResponse_severityCounts,+ titleAggregationResponse_vulnerabilityId,+ titleAggregationResponse_title,++ -- ** Usage+ usage_currency,+ usage_estimatedMonthlyCost,+ usage_total,+ usage_type,++ -- ** UsageTotal+ usageTotal_accountId,+ usageTotal_usage,++ -- ** VulnerablePackage+ vulnerablePackage_arch,+ vulnerablePackage_epoch,+ vulnerablePackage_filePath,+ vulnerablePackage_fixedInVersion,+ vulnerablePackage_packageManager,+ vulnerablePackage_release,+ vulnerablePackage_remediation,+ vulnerablePackage_sourceLambdaLayerArn,+ vulnerablePackage_sourceLayerHash,+ vulnerablePackage_name,+ vulnerablePackage_version,+ )+where++import Amazonka.Inspector2.AssociateMember+import Amazonka.Inspector2.BatchGetAccountStatus+import Amazonka.Inspector2.BatchGetFreeTrialInfo+import Amazonka.Inspector2.CancelFindingsReport+import Amazonka.Inspector2.CreateFilter+import Amazonka.Inspector2.CreateFindingsReport+import Amazonka.Inspector2.DeleteFilter+import Amazonka.Inspector2.DescribeOrganizationConfiguration+import Amazonka.Inspector2.Disable+import Amazonka.Inspector2.DisableDelegatedAdminAccount+import Amazonka.Inspector2.DisassociateMember+import Amazonka.Inspector2.Enable+import Amazonka.Inspector2.EnableDelegatedAdminAccount+import Amazonka.Inspector2.GetConfiguration+import Amazonka.Inspector2.GetDelegatedAdminAccount+import Amazonka.Inspector2.GetFindingsReportStatus+import Amazonka.Inspector2.GetMember+import Amazonka.Inspector2.ListAccountPermissions+import Amazonka.Inspector2.ListCoverage+import Amazonka.Inspector2.ListCoverageStatistics+import Amazonka.Inspector2.ListDelegatedAdminAccounts+import Amazonka.Inspector2.ListFilters+import Amazonka.Inspector2.ListFindingAggregations+import Amazonka.Inspector2.ListFindings+import Amazonka.Inspector2.ListMembers+import Amazonka.Inspector2.ListTagsForResource+import Amazonka.Inspector2.ListUsageTotals+import Amazonka.Inspector2.TagResource+import Amazonka.Inspector2.Types.Account+import Amazonka.Inspector2.Types.AccountAggregation+import Amazonka.Inspector2.Types.AccountAggregationResponse+import Amazonka.Inspector2.Types.AccountState+import Amazonka.Inspector2.Types.AggregationRequest+import Amazonka.Inspector2.Types.AggregationResponse+import Amazonka.Inspector2.Types.AmiAggregation+import Amazonka.Inspector2.Types.AmiAggregationResponse+import Amazonka.Inspector2.Types.AutoEnable+import Amazonka.Inspector2.Types.AwsEc2InstanceDetails+import Amazonka.Inspector2.Types.AwsEcrContainerAggregation+import Amazonka.Inspector2.Types.AwsEcrContainerAggregationResponse+import Amazonka.Inspector2.Types.AwsEcrContainerImageDetails+import Amazonka.Inspector2.Types.AwsLambdaFunctionDetails+import Amazonka.Inspector2.Types.Counts+import Amazonka.Inspector2.Types.CoverageFilterCriteria+import Amazonka.Inspector2.Types.CoverageMapFilter+import Amazonka.Inspector2.Types.CoverageStringFilter+import Amazonka.Inspector2.Types.CoveredResource+import Amazonka.Inspector2.Types.CvssScore+import Amazonka.Inspector2.Types.CvssScoreAdjustment+import Amazonka.Inspector2.Types.CvssScoreDetails+import Amazonka.Inspector2.Types.DateFilter+import Amazonka.Inspector2.Types.DelegatedAdmin+import Amazonka.Inspector2.Types.DelegatedAdminAccount+import Amazonka.Inspector2.Types.Destination+import Amazonka.Inspector2.Types.Ec2InstanceAggregation+import Amazonka.Inspector2.Types.Ec2InstanceAggregationResponse+import Amazonka.Inspector2.Types.Ec2Metadata+import Amazonka.Inspector2.Types.EcrConfiguration+import Amazonka.Inspector2.Types.EcrConfigurationState+import Amazonka.Inspector2.Types.EcrContainerImageMetadata+import Amazonka.Inspector2.Types.EcrRepositoryMetadata+import Amazonka.Inspector2.Types.EcrRescanDurationState+import Amazonka.Inspector2.Types.ExploitabilityDetails+import Amazonka.Inspector2.Types.FailedAccount+import Amazonka.Inspector2.Types.Filter+import Amazonka.Inspector2.Types.FilterCriteria+import Amazonka.Inspector2.Types.Finding+import Amazonka.Inspector2.Types.FindingTypeAggregation+import Amazonka.Inspector2.Types.FindingTypeAggregationResponse+import Amazonka.Inspector2.Types.FreeTrialAccountInfo+import Amazonka.Inspector2.Types.FreeTrialInfo+import Amazonka.Inspector2.Types.FreeTrialInfoError+import Amazonka.Inspector2.Types.ImageLayerAggregation+import Amazonka.Inspector2.Types.ImageLayerAggregationResponse+import Amazonka.Inspector2.Types.InspectorScoreDetails+import Amazonka.Inspector2.Types.LambdaFunctionAggregation+import Amazonka.Inspector2.Types.LambdaFunctionAggregationResponse+import Amazonka.Inspector2.Types.LambdaFunctionMetadata+import Amazonka.Inspector2.Types.LambdaLayerAggregation+import Amazonka.Inspector2.Types.LambdaLayerAggregationResponse+import Amazonka.Inspector2.Types.LambdaVpcConfig+import Amazonka.Inspector2.Types.MapFilter+import Amazonka.Inspector2.Types.Member+import Amazonka.Inspector2.Types.NetworkPath+import Amazonka.Inspector2.Types.NetworkReachabilityDetails+import Amazonka.Inspector2.Types.NumberFilter+import Amazonka.Inspector2.Types.PackageAggregation+import Amazonka.Inspector2.Types.PackageAggregationResponse+import Amazonka.Inspector2.Types.PackageFilter+import Amazonka.Inspector2.Types.PackageVulnerabilityDetails+import Amazonka.Inspector2.Types.Permission+import Amazonka.Inspector2.Types.PortRange+import Amazonka.Inspector2.Types.PortRangeFilter+import Amazonka.Inspector2.Types.Recommendation+import Amazonka.Inspector2.Types.Remediation+import Amazonka.Inspector2.Types.RepositoryAggregation+import Amazonka.Inspector2.Types.RepositoryAggregationResponse+import Amazonka.Inspector2.Types.Resource+import Amazonka.Inspector2.Types.ResourceDetails+import Amazonka.Inspector2.Types.ResourceScanMetadata+import Amazonka.Inspector2.Types.ResourceState+import Amazonka.Inspector2.Types.ResourceStatus+import Amazonka.Inspector2.Types.ScanStatus+import Amazonka.Inspector2.Types.SeverityCounts+import Amazonka.Inspector2.Types.SortCriteria+import Amazonka.Inspector2.Types.State+import Amazonka.Inspector2.Types.Step+import Amazonka.Inspector2.Types.StringFilter+import Amazonka.Inspector2.Types.TitleAggregation+import Amazonka.Inspector2.Types.TitleAggregationResponse+import Amazonka.Inspector2.Types.Usage+import Amazonka.Inspector2.Types.UsageTotal+import Amazonka.Inspector2.Types.VulnerablePackage+import Amazonka.Inspector2.UntagResource+import Amazonka.Inspector2.UpdateConfiguration+import Amazonka.Inspector2.UpdateFilter+import Amazonka.Inspector2.UpdateOrganizationConfiguration
+ gen/Amazonka/Inspector2/ListAccountPermissions.hs view
@@ -0,0 +1,253 @@+{-# 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.Inspector2.ListAccountPermissions+-- 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 the permissions an account has to configure Amazon Inspector.+--+-- This operation returns paginated results.+module Amazonka.Inspector2.ListAccountPermissions+ ( -- * Creating a Request+ ListAccountPermissions (..),+ newListAccountPermissions,++ -- * Request Lenses+ listAccountPermissions_maxResults,+ listAccountPermissions_nextToken,+ listAccountPermissions_service,++ -- * Destructuring the Response+ ListAccountPermissionsResponse (..),+ newListAccountPermissionsResponse,++ -- * Response Lenses+ listAccountPermissionsResponse_nextToken,+ listAccountPermissionsResponse_httpStatus,+ listAccountPermissionsResponse_permissions,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListAccountPermissions' smart constructor.+data ListAccountPermissions = ListAccountPermissions'+ { -- | The maximum number of results to return in the response.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | A token to use for paginating results that are returned in the response.+ -- Set the value of this parameter to null for the first request to a list+ -- action. For subsequent calls, use the @NextToken@ value returned from+ -- the previous request to continue listing results after the first page.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The service scan type to check permissions for.+ service :: Prelude.Maybe Service+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListAccountPermissions' 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', 'listAccountPermissions_maxResults' - The maximum number of results to return in the response.+--+-- 'nextToken', 'listAccountPermissions_nextToken' - A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+--+-- 'service', 'listAccountPermissions_service' - The service scan type to check permissions for.+newListAccountPermissions ::+ ListAccountPermissions+newListAccountPermissions =+ ListAccountPermissions'+ { maxResults =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ service = Prelude.Nothing+ }++-- | The maximum number of results to return in the response.+listAccountPermissions_maxResults :: Lens.Lens' ListAccountPermissions (Prelude.Maybe Prelude.Natural)+listAccountPermissions_maxResults = Lens.lens (\ListAccountPermissions' {maxResults} -> maxResults) (\s@ListAccountPermissions' {} a -> s {maxResults = a} :: ListAccountPermissions)++-- | A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+listAccountPermissions_nextToken :: Lens.Lens' ListAccountPermissions (Prelude.Maybe Prelude.Text)+listAccountPermissions_nextToken = Lens.lens (\ListAccountPermissions' {nextToken} -> nextToken) (\s@ListAccountPermissions' {} a -> s {nextToken = a} :: ListAccountPermissions)++-- | The service scan type to check permissions for.+listAccountPermissions_service :: Lens.Lens' ListAccountPermissions (Prelude.Maybe Service)+listAccountPermissions_service = Lens.lens (\ListAccountPermissions' {service} -> service) (\s@ListAccountPermissions' {} a -> s {service = a} :: ListAccountPermissions)++instance Core.AWSPager ListAccountPermissions where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listAccountPermissionsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^. listAccountPermissionsResponse_permissions+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listAccountPermissions_nextToken+ Lens..~ rs+ Lens.^? listAccountPermissionsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListAccountPermissions where+ type+ AWSResponse ListAccountPermissions =+ ListAccountPermissionsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListAccountPermissionsResponse'+ Prelude.<$> (x Data..?> "nextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..?> "permissions" Core..!@ Prelude.mempty)+ )++instance Prelude.Hashable ListAccountPermissions where+ hashWithSalt _salt ListAccountPermissions' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` service++instance Prelude.NFData ListAccountPermissions where+ rnf ListAccountPermissions' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf service++instance Data.ToHeaders ListAccountPermissions where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListAccountPermissions where+ toJSON ListAccountPermissions' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("maxResults" Data..=) Prelude.<$> maxResults,+ ("nextToken" Data..=) Prelude.<$> nextToken,+ ("service" Data..=) Prelude.<$> service+ ]+ )++instance Data.ToPath ListAccountPermissions where+ toPath = Prelude.const "/accountpermissions/list"++instance Data.ToQuery ListAccountPermissions where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListAccountPermissionsResponse' smart constructor.+data ListAccountPermissionsResponse = ListAccountPermissionsResponse'+ { -- | A token to use for paginating results that are returned in the response.+ -- Set the value of this parameter to null for the first request to a list+ -- action. For subsequent calls, use the @NextToken@ value returned from+ -- the previous request to continue listing results after the first page.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | Contains details on the permissions an account has to configure Amazon+ -- Inspector.+ permissions :: [Permission]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListAccountPermissionsResponse' 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:+--+-- 'nextToken', 'listAccountPermissionsResponse_nextToken' - A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+--+-- 'httpStatus', 'listAccountPermissionsResponse_httpStatus' - The response's http status code.+--+-- 'permissions', 'listAccountPermissionsResponse_permissions' - Contains details on the permissions an account has to configure Amazon+-- Inspector.+newListAccountPermissionsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListAccountPermissionsResponse+newListAccountPermissionsResponse pHttpStatus_ =+ ListAccountPermissionsResponse'+ { nextToken =+ Prelude.Nothing,+ httpStatus = pHttpStatus_,+ permissions = Prelude.mempty+ }++-- | A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+listAccountPermissionsResponse_nextToken :: Lens.Lens' ListAccountPermissionsResponse (Prelude.Maybe Prelude.Text)+listAccountPermissionsResponse_nextToken = Lens.lens (\ListAccountPermissionsResponse' {nextToken} -> nextToken) (\s@ListAccountPermissionsResponse' {} a -> s {nextToken = a} :: ListAccountPermissionsResponse)++-- | The response's http status code.+listAccountPermissionsResponse_httpStatus :: Lens.Lens' ListAccountPermissionsResponse Prelude.Int+listAccountPermissionsResponse_httpStatus = Lens.lens (\ListAccountPermissionsResponse' {httpStatus} -> httpStatus) (\s@ListAccountPermissionsResponse' {} a -> s {httpStatus = a} :: ListAccountPermissionsResponse)++-- | Contains details on the permissions an account has to configure Amazon+-- Inspector.+listAccountPermissionsResponse_permissions :: Lens.Lens' ListAccountPermissionsResponse [Permission]+listAccountPermissionsResponse_permissions = Lens.lens (\ListAccountPermissionsResponse' {permissions} -> permissions) (\s@ListAccountPermissionsResponse' {} a -> s {permissions = a} :: ListAccountPermissionsResponse) Prelude.. Lens.coerced++instance+ Prelude.NFData+ ListAccountPermissionsResponse+ where+ rnf ListAccountPermissionsResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf permissions
+ gen/Amazonka/Inspector2/ListCoverage.hs view
@@ -0,0 +1,255 @@+{-# 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.Inspector2.ListCoverage+-- 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 coverage details for you environment.+--+-- This operation returns paginated results.+module Amazonka.Inspector2.ListCoverage+ ( -- * Creating a Request+ ListCoverage (..),+ newListCoverage,++ -- * Request Lenses+ listCoverage_filterCriteria,+ listCoverage_maxResults,+ listCoverage_nextToken,++ -- * Destructuring the Response+ ListCoverageResponse (..),+ newListCoverageResponse,++ -- * Response Lenses+ listCoverageResponse_coveredResources,+ listCoverageResponse_nextToken,+ listCoverageResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListCoverage' smart constructor.+data ListCoverage = ListCoverage'+ { -- | An object that contains details on the filters to apply to the coverage+ -- data for your environment.+ filterCriteria :: Prelude.Maybe CoverageFilterCriteria,+ -- | The maximum number of results to return in the response.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | A token to use for paginating results that are returned in the response.+ -- Set the value of this parameter to null for the first request to a list+ -- action. For subsequent calls, use the @NextToken@ value returned from+ -- the previous request to continue listing results after the first page.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListCoverage' 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:+--+-- 'filterCriteria', 'listCoverage_filterCriteria' - An object that contains details on the filters to apply to the coverage+-- data for your environment.+--+-- 'maxResults', 'listCoverage_maxResults' - The maximum number of results to return in the response.+--+-- 'nextToken', 'listCoverage_nextToken' - A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+newListCoverage ::+ ListCoverage+newListCoverage =+ ListCoverage'+ { filterCriteria = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | An object that contains details on the filters to apply to the coverage+-- data for your environment.+listCoverage_filterCriteria :: Lens.Lens' ListCoverage (Prelude.Maybe CoverageFilterCriteria)+listCoverage_filterCriteria = Lens.lens (\ListCoverage' {filterCriteria} -> filterCriteria) (\s@ListCoverage' {} a -> s {filterCriteria = a} :: ListCoverage)++-- | The maximum number of results to return in the response.+listCoverage_maxResults :: Lens.Lens' ListCoverage (Prelude.Maybe Prelude.Natural)+listCoverage_maxResults = Lens.lens (\ListCoverage' {maxResults} -> maxResults) (\s@ListCoverage' {} a -> s {maxResults = a} :: ListCoverage)++-- | A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+listCoverage_nextToken :: Lens.Lens' ListCoverage (Prelude.Maybe Prelude.Text)+listCoverage_nextToken = Lens.lens (\ListCoverage' {nextToken} -> nextToken) (\s@ListCoverage' {} a -> s {nextToken = a} :: ListCoverage)++instance Core.AWSPager ListCoverage where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listCoverageResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listCoverageResponse_coveredResources+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listCoverage_nextToken+ Lens..~ rs+ Lens.^? listCoverageResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListCoverage where+ type AWSResponse ListCoverage = ListCoverageResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListCoverageResponse'+ Prelude.<$> ( x+ Data..?> "coveredResources"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "nextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListCoverage where+ hashWithSalt _salt ListCoverage' {..} =+ _salt+ `Prelude.hashWithSalt` filterCriteria+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListCoverage where+ rnf ListCoverage' {..} =+ Prelude.rnf filterCriteria+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListCoverage where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListCoverage where+ toJSON ListCoverage' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("filterCriteria" Data..=)+ Prelude.<$> filterCriteria,+ ("maxResults" Data..=) Prelude.<$> maxResults,+ ("nextToken" Data..=) Prelude.<$> nextToken+ ]+ )++instance Data.ToPath ListCoverage where+ toPath = Prelude.const "/coverage/list"++instance Data.ToQuery ListCoverage where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListCoverageResponse' smart constructor.+data ListCoverageResponse = ListCoverageResponse'+ { -- | An object that contains details on the covered resources in your+ -- environment.+ coveredResources :: Prelude.Maybe [CoveredResource],+ -- | A token to use for paginating results that are returned in the response.+ -- Set the value of this parameter to null for the first request to a list+ -- action. For subsequent calls, use the @NextToken@ value returned from+ -- the previous request to continue listing results after the first page.+ 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 'ListCoverageResponse' 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:+--+-- 'coveredResources', 'listCoverageResponse_coveredResources' - An object that contains details on the covered resources in your+-- environment.+--+-- 'nextToken', 'listCoverageResponse_nextToken' - A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+--+-- 'httpStatus', 'listCoverageResponse_httpStatus' - The response's http status code.+newListCoverageResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListCoverageResponse+newListCoverageResponse pHttpStatus_ =+ ListCoverageResponse'+ { coveredResources =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An object that contains details on the covered resources in your+-- environment.+listCoverageResponse_coveredResources :: Lens.Lens' ListCoverageResponse (Prelude.Maybe [CoveredResource])+listCoverageResponse_coveredResources = Lens.lens (\ListCoverageResponse' {coveredResources} -> coveredResources) (\s@ListCoverageResponse' {} a -> s {coveredResources = a} :: ListCoverageResponse) Prelude.. Lens.mapping Lens.coerced++-- | A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+listCoverageResponse_nextToken :: Lens.Lens' ListCoverageResponse (Prelude.Maybe Prelude.Text)+listCoverageResponse_nextToken = Lens.lens (\ListCoverageResponse' {nextToken} -> nextToken) (\s@ListCoverageResponse' {} a -> s {nextToken = a} :: ListCoverageResponse)++-- | The response's http status code.+listCoverageResponse_httpStatus :: Lens.Lens' ListCoverageResponse Prelude.Int+listCoverageResponse_httpStatus = Lens.lens (\ListCoverageResponse' {httpStatus} -> httpStatus) (\s@ListCoverageResponse' {} a -> s {httpStatus = a} :: ListCoverageResponse)++instance Prelude.NFData ListCoverageResponse where+ rnf ListCoverageResponse' {..} =+ Prelude.rnf coveredResources+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Inspector2/ListCoverageStatistics.hs view
@@ -0,0 +1,272 @@+{-# 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.Inspector2.ListCoverageStatistics+-- 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 Amazon Inspector coverage statistics for your environment.+--+-- This operation returns paginated results.+module Amazonka.Inspector2.ListCoverageStatistics+ ( -- * Creating a Request+ ListCoverageStatistics (..),+ newListCoverageStatistics,++ -- * Request Lenses+ listCoverageStatistics_filterCriteria,+ listCoverageStatistics_groupBy,+ listCoverageStatistics_nextToken,++ -- * Destructuring the Response+ ListCoverageStatisticsResponse (..),+ newListCoverageStatisticsResponse,++ -- * Response Lenses+ listCoverageStatisticsResponse_countsByGroup,+ listCoverageStatisticsResponse_nextToken,+ listCoverageStatisticsResponse_httpStatus,+ listCoverageStatisticsResponse_totalCounts,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListCoverageStatistics' smart constructor.+data ListCoverageStatistics = ListCoverageStatistics'+ { -- | An object that contains details on the filters to apply to the coverage+ -- data for your environment.+ filterCriteria :: Prelude.Maybe CoverageFilterCriteria,+ -- | The value to group the results by.+ groupBy :: Prelude.Maybe GroupKey,+ -- | A token to use for paginating results that are returned in the response.+ -- Set the value of this parameter to null for the first request to a list+ -- action. For subsequent calls, use the @NextToken@ value returned from+ -- the previous request to continue listing results after the first page.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListCoverageStatistics' 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:+--+-- 'filterCriteria', 'listCoverageStatistics_filterCriteria' - An object that contains details on the filters to apply to the coverage+-- data for your environment.+--+-- 'groupBy', 'listCoverageStatistics_groupBy' - The value to group the results by.+--+-- 'nextToken', 'listCoverageStatistics_nextToken' - A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+newListCoverageStatistics ::+ ListCoverageStatistics+newListCoverageStatistics =+ ListCoverageStatistics'+ { filterCriteria =+ Prelude.Nothing,+ groupBy = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | An object that contains details on the filters to apply to the coverage+-- data for your environment.+listCoverageStatistics_filterCriteria :: Lens.Lens' ListCoverageStatistics (Prelude.Maybe CoverageFilterCriteria)+listCoverageStatistics_filterCriteria = Lens.lens (\ListCoverageStatistics' {filterCriteria} -> filterCriteria) (\s@ListCoverageStatistics' {} a -> s {filterCriteria = a} :: ListCoverageStatistics)++-- | The value to group the results by.+listCoverageStatistics_groupBy :: Lens.Lens' ListCoverageStatistics (Prelude.Maybe GroupKey)+listCoverageStatistics_groupBy = Lens.lens (\ListCoverageStatistics' {groupBy} -> groupBy) (\s@ListCoverageStatistics' {} a -> s {groupBy = a} :: ListCoverageStatistics)++-- | A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+listCoverageStatistics_nextToken :: Lens.Lens' ListCoverageStatistics (Prelude.Maybe Prelude.Text)+listCoverageStatistics_nextToken = Lens.lens (\ListCoverageStatistics' {nextToken} -> nextToken) (\s@ListCoverageStatistics' {} a -> s {nextToken = a} :: ListCoverageStatistics)++instance Core.AWSPager ListCoverageStatistics where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listCoverageStatisticsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listCoverageStatisticsResponse_countsByGroup+ Prelude.. Lens._Just+ Prelude.. Lens.to Prelude.toList+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listCoverageStatistics_nextToken+ Lens..~ rs+ Lens.^? listCoverageStatisticsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListCoverageStatistics where+ type+ AWSResponse ListCoverageStatistics =+ ListCoverageStatisticsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListCoverageStatisticsResponse'+ Prelude.<$> (x Data..?> "countsByGroup")+ Prelude.<*> (x Data..?> "nextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "totalCounts")+ )++instance Prelude.Hashable ListCoverageStatistics where+ hashWithSalt _salt ListCoverageStatistics' {..} =+ _salt+ `Prelude.hashWithSalt` filterCriteria+ `Prelude.hashWithSalt` groupBy+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListCoverageStatistics where+ rnf ListCoverageStatistics' {..} =+ Prelude.rnf filterCriteria+ `Prelude.seq` Prelude.rnf groupBy+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListCoverageStatistics where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListCoverageStatistics where+ toJSON ListCoverageStatistics' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("filterCriteria" Data..=)+ Prelude.<$> filterCriteria,+ ("groupBy" Data..=) Prelude.<$> groupBy,+ ("nextToken" Data..=) Prelude.<$> nextToken+ ]+ )++instance Data.ToPath ListCoverageStatistics where+ toPath = Prelude.const "/coverage/statistics/list"++instance Data.ToQuery ListCoverageStatistics where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListCoverageStatisticsResponse' smart constructor.+data ListCoverageStatisticsResponse = ListCoverageStatisticsResponse'+ { -- | An array with the number for each group.+ countsByGroup :: Prelude.Maybe (Prelude.NonEmpty Counts),+ -- | A token to use for paginating results that are returned in the response.+ -- Set the value of this parameter to null for the first request to a list+ -- action. For subsequent calls, use the @NextToken@ value returned from+ -- the previous request to continue listing results after the first page.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The total number for all groups.+ totalCounts :: Prelude.Integer+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListCoverageStatisticsResponse' 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:+--+-- 'countsByGroup', 'listCoverageStatisticsResponse_countsByGroup' - An array with the number for each group.+--+-- 'nextToken', 'listCoverageStatisticsResponse_nextToken' - A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+--+-- 'httpStatus', 'listCoverageStatisticsResponse_httpStatus' - The response's http status code.+--+-- 'totalCounts', 'listCoverageStatisticsResponse_totalCounts' - The total number for all groups.+newListCoverageStatisticsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'totalCounts'+ Prelude.Integer ->+ ListCoverageStatisticsResponse+newListCoverageStatisticsResponse+ pHttpStatus_+ pTotalCounts_ =+ ListCoverageStatisticsResponse'+ { countsByGroup =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_,+ totalCounts = pTotalCounts_+ }++-- | An array with the number for each group.+listCoverageStatisticsResponse_countsByGroup :: Lens.Lens' ListCoverageStatisticsResponse (Prelude.Maybe (Prelude.NonEmpty Counts))+listCoverageStatisticsResponse_countsByGroup = Lens.lens (\ListCoverageStatisticsResponse' {countsByGroup} -> countsByGroup) (\s@ListCoverageStatisticsResponse' {} a -> s {countsByGroup = a} :: ListCoverageStatisticsResponse) Prelude.. Lens.mapping Lens.coerced++-- | A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+listCoverageStatisticsResponse_nextToken :: Lens.Lens' ListCoverageStatisticsResponse (Prelude.Maybe Prelude.Text)+listCoverageStatisticsResponse_nextToken = Lens.lens (\ListCoverageStatisticsResponse' {nextToken} -> nextToken) (\s@ListCoverageStatisticsResponse' {} a -> s {nextToken = a} :: ListCoverageStatisticsResponse)++-- | The response's http status code.+listCoverageStatisticsResponse_httpStatus :: Lens.Lens' ListCoverageStatisticsResponse Prelude.Int+listCoverageStatisticsResponse_httpStatus = Lens.lens (\ListCoverageStatisticsResponse' {httpStatus} -> httpStatus) (\s@ListCoverageStatisticsResponse' {} a -> s {httpStatus = a} :: ListCoverageStatisticsResponse)++-- | The total number for all groups.+listCoverageStatisticsResponse_totalCounts :: Lens.Lens' ListCoverageStatisticsResponse Prelude.Integer+listCoverageStatisticsResponse_totalCounts = Lens.lens (\ListCoverageStatisticsResponse' {totalCounts} -> totalCounts) (\s@ListCoverageStatisticsResponse' {} a -> s {totalCounts = a} :: ListCoverageStatisticsResponse)++instance+ Prelude.NFData+ ListCoverageStatisticsResponse+ where+ rnf ListCoverageStatisticsResponse' {..} =+ Prelude.rnf countsByGroup+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf totalCounts
+ gen/Amazonka/Inspector2/ListDelegatedAdminAccounts.hs view
@@ -0,0 +1,245 @@+{-# 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.Inspector2.ListDelegatedAdminAccounts+-- 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 information about the Amazon Inspector delegated administrator of+-- your organization.+--+-- This operation returns paginated results.+module Amazonka.Inspector2.ListDelegatedAdminAccounts+ ( -- * Creating a Request+ ListDelegatedAdminAccounts (..),+ newListDelegatedAdminAccounts,++ -- * Request Lenses+ listDelegatedAdminAccounts_maxResults,+ listDelegatedAdminAccounts_nextToken,++ -- * Destructuring the Response+ ListDelegatedAdminAccountsResponse (..),+ newListDelegatedAdminAccountsResponse,++ -- * Response Lenses+ listDelegatedAdminAccountsResponse_delegatedAdminAccounts,+ listDelegatedAdminAccountsResponse_nextToken,+ listDelegatedAdminAccountsResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListDelegatedAdminAccounts' smart constructor.+data ListDelegatedAdminAccounts = ListDelegatedAdminAccounts'+ { -- | The maximum number of results to return in the response.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | A token to use for paginating results that are returned in the response.+ -- Set the value of this parameter to null for the first request to a list+ -- action. For subsequent calls, use the @NextToken@ value returned from+ -- the previous request to continue listing results after the first page.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListDelegatedAdminAccounts' 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', 'listDelegatedAdminAccounts_maxResults' - The maximum number of results to return in the response.+--+-- 'nextToken', 'listDelegatedAdminAccounts_nextToken' - A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+newListDelegatedAdminAccounts ::+ ListDelegatedAdminAccounts+newListDelegatedAdminAccounts =+ ListDelegatedAdminAccounts'+ { maxResults =+ Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of results to return in the response.+listDelegatedAdminAccounts_maxResults :: Lens.Lens' ListDelegatedAdminAccounts (Prelude.Maybe Prelude.Natural)+listDelegatedAdminAccounts_maxResults = Lens.lens (\ListDelegatedAdminAccounts' {maxResults} -> maxResults) (\s@ListDelegatedAdminAccounts' {} a -> s {maxResults = a} :: ListDelegatedAdminAccounts)++-- | A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+listDelegatedAdminAccounts_nextToken :: Lens.Lens' ListDelegatedAdminAccounts (Prelude.Maybe Prelude.Text)+listDelegatedAdminAccounts_nextToken = Lens.lens (\ListDelegatedAdminAccounts' {nextToken} -> nextToken) (\s@ListDelegatedAdminAccounts' {} a -> s {nextToken = a} :: ListDelegatedAdminAccounts)++instance Core.AWSPager ListDelegatedAdminAccounts where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listDelegatedAdminAccountsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listDelegatedAdminAccountsResponse_delegatedAdminAccounts+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listDelegatedAdminAccounts_nextToken+ Lens..~ rs+ Lens.^? listDelegatedAdminAccountsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListDelegatedAdminAccounts where+ type+ AWSResponse ListDelegatedAdminAccounts =+ ListDelegatedAdminAccountsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListDelegatedAdminAccountsResponse'+ Prelude.<$> ( x+ Data..?> "delegatedAdminAccounts"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "nextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListDelegatedAdminAccounts where+ hashWithSalt _salt ListDelegatedAdminAccounts' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListDelegatedAdminAccounts where+ rnf ListDelegatedAdminAccounts' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListDelegatedAdminAccounts where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListDelegatedAdminAccounts where+ toJSON ListDelegatedAdminAccounts' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("maxResults" Data..=) Prelude.<$> maxResults,+ ("nextToken" Data..=) Prelude.<$> nextToken+ ]+ )++instance Data.ToPath ListDelegatedAdminAccounts where+ toPath = Prelude.const "/delegatedadminaccounts/list"++instance Data.ToQuery ListDelegatedAdminAccounts where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListDelegatedAdminAccountsResponse' smart constructor.+data ListDelegatedAdminAccountsResponse = ListDelegatedAdminAccountsResponse'+ { -- | Details of the Amazon Inspector delegated administrator of your+ -- organization.+ delegatedAdminAccounts :: Prelude.Maybe [DelegatedAdminAccount],+ -- | A token to use for paginating results that are returned in the response.+ -- Set the value of this parameter to null for the first request to a list+ -- action. For subsequent calls, use the @NextToken@ value returned from+ -- the previous request to continue listing results after the first page.+ 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 'ListDelegatedAdminAccountsResponse' 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:+--+-- 'delegatedAdminAccounts', 'listDelegatedAdminAccountsResponse_delegatedAdminAccounts' - Details of the Amazon Inspector delegated administrator of your+-- organization.+--+-- 'nextToken', 'listDelegatedAdminAccountsResponse_nextToken' - A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+--+-- 'httpStatus', 'listDelegatedAdminAccountsResponse_httpStatus' - The response's http status code.+newListDelegatedAdminAccountsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListDelegatedAdminAccountsResponse+newListDelegatedAdminAccountsResponse pHttpStatus_ =+ ListDelegatedAdminAccountsResponse'+ { delegatedAdminAccounts =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Details of the Amazon Inspector delegated administrator of your+-- organization.+listDelegatedAdminAccountsResponse_delegatedAdminAccounts :: Lens.Lens' ListDelegatedAdminAccountsResponse (Prelude.Maybe [DelegatedAdminAccount])+listDelegatedAdminAccountsResponse_delegatedAdminAccounts = Lens.lens (\ListDelegatedAdminAccountsResponse' {delegatedAdminAccounts} -> delegatedAdminAccounts) (\s@ListDelegatedAdminAccountsResponse' {} a -> s {delegatedAdminAccounts = a} :: ListDelegatedAdminAccountsResponse) Prelude.. Lens.mapping Lens.coerced++-- | A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+listDelegatedAdminAccountsResponse_nextToken :: Lens.Lens' ListDelegatedAdminAccountsResponse (Prelude.Maybe Prelude.Text)+listDelegatedAdminAccountsResponse_nextToken = Lens.lens (\ListDelegatedAdminAccountsResponse' {nextToken} -> nextToken) (\s@ListDelegatedAdminAccountsResponse' {} a -> s {nextToken = a} :: ListDelegatedAdminAccountsResponse)++-- | The response's http status code.+listDelegatedAdminAccountsResponse_httpStatus :: Lens.Lens' ListDelegatedAdminAccountsResponse Prelude.Int+listDelegatedAdminAccountsResponse_httpStatus = Lens.lens (\ListDelegatedAdminAccountsResponse' {httpStatus} -> httpStatus) (\s@ListDelegatedAdminAccountsResponse' {} a -> s {httpStatus = a} :: ListDelegatedAdminAccountsResponse)++instance+ Prelude.NFData+ ListDelegatedAdminAccountsResponse+ where+ rnf ListDelegatedAdminAccountsResponse' {..} =+ Prelude.rnf delegatedAdminAccounts+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Inspector2/ListFilters.hs view
@@ -0,0 +1,253 @@+{-# 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.Inspector2.ListFilters+-- 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 the filters associated with your account.+--+-- This operation returns paginated results.+module Amazonka.Inspector2.ListFilters+ ( -- * Creating a Request+ ListFilters (..),+ newListFilters,++ -- * Request Lenses+ listFilters_action,+ listFilters_arns,+ listFilters_maxResults,+ listFilters_nextToken,++ -- * Destructuring the Response+ ListFiltersResponse (..),+ newListFiltersResponse,++ -- * Response Lenses+ listFiltersResponse_nextToken,+ listFiltersResponse_httpStatus,+ listFiltersResponse_filters,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListFilters' smart constructor.+data ListFilters = ListFilters'+ { -- | The action the filter applies to matched findings.+ action :: Prelude.Maybe FilterAction,+ -- | The Amazon resource number (ARN) of the filter.+ arns :: Prelude.Maybe [Prelude.Text],+ -- | The maximum number of results to return in the response.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | A token to use for paginating results that are returned in the response.+ -- Set the value of this parameter to null for the first request to a list+ -- action. For subsequent calls, use the @NextToken@ value returned from+ -- the previous request to continue listing results after the first page.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListFilters' 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:+--+-- 'action', 'listFilters_action' - The action the filter applies to matched findings.+--+-- 'arns', 'listFilters_arns' - The Amazon resource number (ARN) of the filter.+--+-- 'maxResults', 'listFilters_maxResults' - The maximum number of results to return in the response.+--+-- 'nextToken', 'listFilters_nextToken' - A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+newListFilters ::+ ListFilters+newListFilters =+ ListFilters'+ { action = Prelude.Nothing,+ arns = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The action the filter applies to matched findings.+listFilters_action :: Lens.Lens' ListFilters (Prelude.Maybe FilterAction)+listFilters_action = Lens.lens (\ListFilters' {action} -> action) (\s@ListFilters' {} a -> s {action = a} :: ListFilters)++-- | The Amazon resource number (ARN) of the filter.+listFilters_arns :: Lens.Lens' ListFilters (Prelude.Maybe [Prelude.Text])+listFilters_arns = Lens.lens (\ListFilters' {arns} -> arns) (\s@ListFilters' {} a -> s {arns = a} :: ListFilters) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of results to return in the response.+listFilters_maxResults :: Lens.Lens' ListFilters (Prelude.Maybe Prelude.Natural)+listFilters_maxResults = Lens.lens (\ListFilters' {maxResults} -> maxResults) (\s@ListFilters' {} a -> s {maxResults = a} :: ListFilters)++-- | A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+listFilters_nextToken :: Lens.Lens' ListFilters (Prelude.Maybe Prelude.Text)+listFilters_nextToken = Lens.lens (\ListFilters' {nextToken} -> nextToken) (\s@ListFilters' {} a -> s {nextToken = a} :: ListFilters)++instance Core.AWSPager ListFilters where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listFiltersResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop (rs Lens.^. listFiltersResponse_filters) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listFilters_nextToken+ Lens..~ rs+ Lens.^? listFiltersResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListFilters where+ type AWSResponse ListFilters = ListFiltersResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListFiltersResponse'+ Prelude.<$> (x Data..?> "nextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..?> "filters" Core..!@ Prelude.mempty)+ )++instance Prelude.Hashable ListFilters where+ hashWithSalt _salt ListFilters' {..} =+ _salt+ `Prelude.hashWithSalt` action+ `Prelude.hashWithSalt` arns+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListFilters where+ rnf ListFilters' {..} =+ Prelude.rnf action+ `Prelude.seq` Prelude.rnf arns+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListFilters where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListFilters where+ toJSON ListFilters' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("action" Data..=) Prelude.<$> action,+ ("arns" Data..=) Prelude.<$> arns,+ ("maxResults" Data..=) Prelude.<$> maxResults,+ ("nextToken" Data..=) Prelude.<$> nextToken+ ]+ )++instance Data.ToPath ListFilters where+ toPath = Prelude.const "/filters/list"++instance Data.ToQuery ListFilters where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListFiltersResponse' smart constructor.+data ListFiltersResponse = ListFiltersResponse'+ { -- | A token to use for paginating results that are returned in the response.+ -- Set the value of this parameter to null for the first request to a list+ -- action. For subsequent calls, use the @NextToken@ value returned from+ -- the previous request to continue listing results after the first page.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | Contains details on the filters associated with your account.+ filters :: [Filter]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListFiltersResponse' 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:+--+-- 'nextToken', 'listFiltersResponse_nextToken' - A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+--+-- 'httpStatus', 'listFiltersResponse_httpStatus' - The response's http status code.+--+-- 'filters', 'listFiltersResponse_filters' - Contains details on the filters associated with your account.+newListFiltersResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListFiltersResponse+newListFiltersResponse pHttpStatus_ =+ ListFiltersResponse'+ { nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_,+ filters = Prelude.mempty+ }++-- | A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+listFiltersResponse_nextToken :: Lens.Lens' ListFiltersResponse (Prelude.Maybe Prelude.Text)+listFiltersResponse_nextToken = Lens.lens (\ListFiltersResponse' {nextToken} -> nextToken) (\s@ListFiltersResponse' {} a -> s {nextToken = a} :: ListFiltersResponse)++-- | The response's http status code.+listFiltersResponse_httpStatus :: Lens.Lens' ListFiltersResponse Prelude.Int+listFiltersResponse_httpStatus = Lens.lens (\ListFiltersResponse' {httpStatus} -> httpStatus) (\s@ListFiltersResponse' {} a -> s {httpStatus = a} :: ListFiltersResponse)++-- | Contains details on the filters associated with your account.+listFiltersResponse_filters :: Lens.Lens' ListFiltersResponse [Filter]+listFiltersResponse_filters = Lens.lens (\ListFiltersResponse' {filters} -> filters) (\s@ListFiltersResponse' {} a -> s {filters = a} :: ListFiltersResponse) Prelude.. Lens.coerced++instance Prelude.NFData ListFiltersResponse where+ rnf ListFiltersResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf filters
+ gen/Amazonka/Inspector2/ListFindingAggregations.hs view
@@ -0,0 +1,304 @@+{-# 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.Inspector2.ListFindingAggregations+-- 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 aggregated finding data for your environment based on specific+-- criteria.+--+-- This operation returns paginated results.+module Amazonka.Inspector2.ListFindingAggregations+ ( -- * Creating a Request+ ListFindingAggregations (..),+ newListFindingAggregations,++ -- * Request Lenses+ listFindingAggregations_accountIds,+ listFindingAggregations_aggregationRequest,+ listFindingAggregations_maxResults,+ listFindingAggregations_nextToken,+ listFindingAggregations_aggregationType,++ -- * Destructuring the Response+ ListFindingAggregationsResponse (..),+ newListFindingAggregationsResponse,++ -- * Response Lenses+ listFindingAggregationsResponse_nextToken,+ listFindingAggregationsResponse_responses,+ listFindingAggregationsResponse_httpStatus,+ listFindingAggregationsResponse_aggregationType,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListFindingAggregations' smart constructor.+data ListFindingAggregations = ListFindingAggregations'+ { -- | The Amazon Web Services account IDs to retrieve finding aggregation data+ -- for.+ accountIds :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details of the aggregation request that is used to filter your+ -- aggregation results.+ aggregationRequest :: Prelude.Maybe AggregationRequest,+ -- | The maximum number of results to return in the response.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | A token to use for paginating results that are returned in the response.+ -- Set the value of this parameter to null for the first request to a list+ -- action. For subsequent calls, use the @NextToken@ value returned from+ -- the previous request to continue listing results after the first page.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The type of the aggregation request.+ aggregationType :: AggregationType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListFindingAggregations' 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', 'listFindingAggregations_accountIds' - The Amazon Web Services account IDs to retrieve finding aggregation data+-- for.+--+-- 'aggregationRequest', 'listFindingAggregations_aggregationRequest' - Details of the aggregation request that is used to filter your+-- aggregation results.+--+-- 'maxResults', 'listFindingAggregations_maxResults' - The maximum number of results to return in the response.+--+-- 'nextToken', 'listFindingAggregations_nextToken' - A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+--+-- 'aggregationType', 'listFindingAggregations_aggregationType' - The type of the aggregation request.+newListFindingAggregations ::+ -- | 'aggregationType'+ AggregationType ->+ ListFindingAggregations+newListFindingAggregations pAggregationType_ =+ ListFindingAggregations'+ { accountIds =+ Prelude.Nothing,+ aggregationRequest = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ aggregationType = pAggregationType_+ }++-- | The Amazon Web Services account IDs to retrieve finding aggregation data+-- for.+listFindingAggregations_accountIds :: Lens.Lens' ListFindingAggregations (Prelude.Maybe (Prelude.NonEmpty StringFilter))+listFindingAggregations_accountIds = Lens.lens (\ListFindingAggregations' {accountIds} -> accountIds) (\s@ListFindingAggregations' {} a -> s {accountIds = a} :: ListFindingAggregations) Prelude.. Lens.mapping Lens.coerced++-- | Details of the aggregation request that is used to filter your+-- aggregation results.+listFindingAggregations_aggregationRequest :: Lens.Lens' ListFindingAggregations (Prelude.Maybe AggregationRequest)+listFindingAggregations_aggregationRequest = Lens.lens (\ListFindingAggregations' {aggregationRequest} -> aggregationRequest) (\s@ListFindingAggregations' {} a -> s {aggregationRequest = a} :: ListFindingAggregations)++-- | The maximum number of results to return in the response.+listFindingAggregations_maxResults :: Lens.Lens' ListFindingAggregations (Prelude.Maybe Prelude.Natural)+listFindingAggregations_maxResults = Lens.lens (\ListFindingAggregations' {maxResults} -> maxResults) (\s@ListFindingAggregations' {} a -> s {maxResults = a} :: ListFindingAggregations)++-- | A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+listFindingAggregations_nextToken :: Lens.Lens' ListFindingAggregations (Prelude.Maybe Prelude.Text)+listFindingAggregations_nextToken = Lens.lens (\ListFindingAggregations' {nextToken} -> nextToken) (\s@ListFindingAggregations' {} a -> s {nextToken = a} :: ListFindingAggregations)++-- | The type of the aggregation request.+listFindingAggregations_aggregationType :: Lens.Lens' ListFindingAggregations AggregationType+listFindingAggregations_aggregationType = Lens.lens (\ListFindingAggregations' {aggregationType} -> aggregationType) (\s@ListFindingAggregations' {} a -> s {aggregationType = a} :: ListFindingAggregations)++instance Core.AWSPager ListFindingAggregations where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listFindingAggregationsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listFindingAggregationsResponse_responses+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listFindingAggregations_nextToken+ Lens..~ rs+ Lens.^? listFindingAggregationsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListFindingAggregations where+ type+ AWSResponse ListFindingAggregations =+ ListFindingAggregationsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListFindingAggregationsResponse'+ Prelude.<$> (x Data..?> "nextToken")+ Prelude.<*> (x Data..?> "responses" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "aggregationType")+ )++instance Prelude.Hashable ListFindingAggregations where+ hashWithSalt _salt ListFindingAggregations' {..} =+ _salt+ `Prelude.hashWithSalt` accountIds+ `Prelude.hashWithSalt` aggregationRequest+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` aggregationType++instance Prelude.NFData ListFindingAggregations where+ rnf ListFindingAggregations' {..} =+ Prelude.rnf accountIds+ `Prelude.seq` Prelude.rnf aggregationRequest+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf aggregationType++instance Data.ToHeaders ListFindingAggregations where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListFindingAggregations where+ toJSON ListFindingAggregations' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("accountIds" Data..=) Prelude.<$> accountIds,+ ("aggregationRequest" Data..=)+ Prelude.<$> aggregationRequest,+ ("maxResults" Data..=) Prelude.<$> maxResults,+ ("nextToken" Data..=) Prelude.<$> nextToken,+ Prelude.Just+ ("aggregationType" Data..= aggregationType)+ ]+ )++instance Data.ToPath ListFindingAggregations where+ toPath = Prelude.const "/findings/aggregation/list"++instance Data.ToQuery ListFindingAggregations where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListFindingAggregationsResponse' smart constructor.+data ListFindingAggregationsResponse = ListFindingAggregationsResponse'+ { -- | A token to use for paginating results that are returned in the response.+ -- Set the value of this parameter to null for the first request to a list+ -- action. For subsequent calls, use the @NextToken@ value returned from+ -- the previous request to continue listing results after the first page.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | Objects that contain the results of an aggregation operation.+ responses :: Prelude.Maybe [AggregationResponse],+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The type of aggregation to perform.+ aggregationType :: AggregationType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListFindingAggregationsResponse' 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:+--+-- 'nextToken', 'listFindingAggregationsResponse_nextToken' - A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+--+-- 'responses', 'listFindingAggregationsResponse_responses' - Objects that contain the results of an aggregation operation.+--+-- 'httpStatus', 'listFindingAggregationsResponse_httpStatus' - The response's http status code.+--+-- 'aggregationType', 'listFindingAggregationsResponse_aggregationType' - The type of aggregation to perform.+newListFindingAggregationsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'aggregationType'+ AggregationType ->+ ListFindingAggregationsResponse+newListFindingAggregationsResponse+ pHttpStatus_+ pAggregationType_ =+ ListFindingAggregationsResponse'+ { nextToken =+ Prelude.Nothing,+ responses = Prelude.Nothing,+ httpStatus = pHttpStatus_,+ aggregationType = pAggregationType_+ }++-- | A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+listFindingAggregationsResponse_nextToken :: Lens.Lens' ListFindingAggregationsResponse (Prelude.Maybe Prelude.Text)+listFindingAggregationsResponse_nextToken = Lens.lens (\ListFindingAggregationsResponse' {nextToken} -> nextToken) (\s@ListFindingAggregationsResponse' {} a -> s {nextToken = a} :: ListFindingAggregationsResponse)++-- | Objects that contain the results of an aggregation operation.+listFindingAggregationsResponse_responses :: Lens.Lens' ListFindingAggregationsResponse (Prelude.Maybe [AggregationResponse])+listFindingAggregationsResponse_responses = Lens.lens (\ListFindingAggregationsResponse' {responses} -> responses) (\s@ListFindingAggregationsResponse' {} a -> s {responses = a} :: ListFindingAggregationsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listFindingAggregationsResponse_httpStatus :: Lens.Lens' ListFindingAggregationsResponse Prelude.Int+listFindingAggregationsResponse_httpStatus = Lens.lens (\ListFindingAggregationsResponse' {httpStatus} -> httpStatus) (\s@ListFindingAggregationsResponse' {} a -> s {httpStatus = a} :: ListFindingAggregationsResponse)++-- | The type of aggregation to perform.+listFindingAggregationsResponse_aggregationType :: Lens.Lens' ListFindingAggregationsResponse AggregationType+listFindingAggregationsResponse_aggregationType = Lens.lens (\ListFindingAggregationsResponse' {aggregationType} -> aggregationType) (\s@ListFindingAggregationsResponse' {} a -> s {aggregationType = a} :: ListFindingAggregationsResponse)++instance+ Prelude.NFData+ ListFindingAggregationsResponse+ where+ rnf ListFindingAggregationsResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf responses+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf aggregationType
+ gen/Amazonka/Inspector2/ListFindings.hs view
@@ -0,0 +1,258 @@+{-# 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.Inspector2.ListFindings+-- 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 findings for your environment.+--+-- This operation returns paginated results.+module Amazonka.Inspector2.ListFindings+ ( -- * Creating a Request+ ListFindings (..),+ newListFindings,++ -- * Request Lenses+ listFindings_filterCriteria,+ listFindings_maxResults,+ listFindings_nextToken,+ listFindings_sortCriteria,++ -- * Destructuring the Response+ ListFindingsResponse (..),+ newListFindingsResponse,++ -- * Response Lenses+ listFindingsResponse_findings,+ listFindingsResponse_nextToken,+ listFindingsResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListFindings' smart constructor.+data ListFindings = ListFindings'+ { -- | Details on the filters to apply to your finding results.+ filterCriteria :: Prelude.Maybe FilterCriteria,+ -- | The maximum number of results to return in the response.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | A token to use for paginating results that are returned in the response.+ -- Set the value of this parameter to null for the first request to a list+ -- action. For subsequent calls, use the @NextToken@ value returned from+ -- the previous request to continue listing results after the first page.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | Details on the sort criteria to apply to your finding results.+ sortCriteria :: Prelude.Maybe SortCriteria+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListFindings' 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:+--+-- 'filterCriteria', 'listFindings_filterCriteria' - Details on the filters to apply to your finding results.+--+-- 'maxResults', 'listFindings_maxResults' - The maximum number of results to return in the response.+--+-- 'nextToken', 'listFindings_nextToken' - A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+--+-- 'sortCriteria', 'listFindings_sortCriteria' - Details on the sort criteria to apply to your finding results.+newListFindings ::+ ListFindings+newListFindings =+ ListFindings'+ { filterCriteria = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ sortCriteria = Prelude.Nothing+ }++-- | Details on the filters to apply to your finding results.+listFindings_filterCriteria :: Lens.Lens' ListFindings (Prelude.Maybe FilterCriteria)+listFindings_filterCriteria = Lens.lens (\ListFindings' {filterCriteria} -> filterCriteria) (\s@ListFindings' {} a -> s {filterCriteria = a} :: ListFindings)++-- | The maximum number of results to return in the response.+listFindings_maxResults :: Lens.Lens' ListFindings (Prelude.Maybe Prelude.Natural)+listFindings_maxResults = Lens.lens (\ListFindings' {maxResults} -> maxResults) (\s@ListFindings' {} a -> s {maxResults = a} :: ListFindings)++-- | A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+listFindings_nextToken :: Lens.Lens' ListFindings (Prelude.Maybe Prelude.Text)+listFindings_nextToken = Lens.lens (\ListFindings' {nextToken} -> nextToken) (\s@ListFindings' {} a -> s {nextToken = a} :: ListFindings)++-- | Details on the sort criteria to apply to your finding results.+listFindings_sortCriteria :: Lens.Lens' ListFindings (Prelude.Maybe SortCriteria)+listFindings_sortCriteria = Lens.lens (\ListFindings' {sortCriteria} -> sortCriteria) (\s@ListFindings' {} a -> s {sortCriteria = a} :: ListFindings)++instance Core.AWSPager ListFindings where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listFindingsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listFindingsResponse_findings+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listFindings_nextToken+ Lens..~ rs+ Lens.^? listFindingsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListFindings where+ type AWSResponse ListFindings = ListFindingsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListFindingsResponse'+ Prelude.<$> (x Data..?> "findings" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "nextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListFindings where+ hashWithSalt _salt ListFindings' {..} =+ _salt+ `Prelude.hashWithSalt` filterCriteria+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` sortCriteria++instance Prelude.NFData ListFindings where+ rnf ListFindings' {..} =+ Prelude.rnf filterCriteria+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf sortCriteria++instance Data.ToHeaders ListFindings where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListFindings where+ toJSON ListFindings' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("filterCriteria" Data..=)+ Prelude.<$> filterCriteria,+ ("maxResults" Data..=) Prelude.<$> maxResults,+ ("nextToken" Data..=) Prelude.<$> nextToken,+ ("sortCriteria" Data..=) Prelude.<$> sortCriteria+ ]+ )++instance Data.ToPath ListFindings where+ toPath = Prelude.const "/findings/list"++instance Data.ToQuery ListFindings where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListFindingsResponse' smart constructor.+data ListFindingsResponse = ListFindingsResponse'+ { -- | Contains details on the findings in your environment.+ findings :: Prelude.Maybe [Finding],+ -- | A token to use for paginating results that are returned in the response.+ -- Set the value of this parameter to null for the first request to a list+ -- action. For subsequent calls, use the @NextToken@ value returned from+ -- the previous request to continue listing results after the first page.+ 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 'ListFindingsResponse' 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:+--+-- 'findings', 'listFindingsResponse_findings' - Contains details on the findings in your environment.+--+-- 'nextToken', 'listFindingsResponse_nextToken' - A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+--+-- 'httpStatus', 'listFindingsResponse_httpStatus' - The response's http status code.+newListFindingsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListFindingsResponse+newListFindingsResponse pHttpStatus_ =+ ListFindingsResponse'+ { findings = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | Contains details on the findings in your environment.+listFindingsResponse_findings :: Lens.Lens' ListFindingsResponse (Prelude.Maybe [Finding])+listFindingsResponse_findings = Lens.lens (\ListFindingsResponse' {findings} -> findings) (\s@ListFindingsResponse' {} a -> s {findings = a} :: ListFindingsResponse) Prelude.. Lens.mapping Lens.coerced++-- | A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+listFindingsResponse_nextToken :: Lens.Lens' ListFindingsResponse (Prelude.Maybe Prelude.Text)+listFindingsResponse_nextToken = Lens.lens (\ListFindingsResponse' {nextToken} -> nextToken) (\s@ListFindingsResponse' {} a -> s {nextToken = a} :: ListFindingsResponse)++-- | The response's http status code.+listFindingsResponse_httpStatus :: Lens.Lens' ListFindingsResponse Prelude.Int+listFindingsResponse_httpStatus = Lens.lens (\ListFindingsResponse' {httpStatus} -> httpStatus) (\s@ListFindingsResponse' {} a -> s {httpStatus = a} :: ListFindingsResponse)++instance Prelude.NFData ListFindingsResponse where+ rnf ListFindingsResponse' {..} =+ Prelude.rnf findings+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Inspector2/ListMembers.hs view
@@ -0,0 +1,243 @@+{-# 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.Inspector2.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)+--+-- List members associated with the Amazon Inspector delegated+-- administrator for your organization.+--+-- This operation returns paginated results.+module Amazonka.Inspector2.ListMembers+ ( -- * Creating a Request+ ListMembers (..),+ newListMembers,++ -- * Request Lenses+ listMembers_maxResults,+ listMembers_nextToken,+ listMembers_onlyAssociated,++ -- * Destructuring the Response+ ListMembersResponse (..),+ newListMembersResponse,++ -- * Response Lenses+ listMembersResponse_members,+ 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.Inspector2.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 results to return in the response.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | A token to use for paginating results that are returned in the response.+ -- Set the value of this parameter to null for the first request to a list+ -- action. For subsequent calls, use the @NextToken@ value returned from+ -- the previous request to continue listing results after the first page.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | Specifies whether to list only currently associated members if @True@ or+ -- to list all members within the organization if @False@.+ onlyAssociated :: Prelude.Maybe Prelude.Bool+ }+ 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 results to return in the response.+--+-- 'nextToken', 'listMembers_nextToken' - A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+--+-- 'onlyAssociated', 'listMembers_onlyAssociated' - Specifies whether to list only currently associated members if @True@ or+-- to list all members within the organization if @False@.+newListMembers ::+ ListMembers+newListMembers =+ ListMembers'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ onlyAssociated = Prelude.Nothing+ }++-- | The maximum number of results to return in the response.+listMembers_maxResults :: Lens.Lens' ListMembers (Prelude.Maybe Prelude.Natural)+listMembers_maxResults = Lens.lens (\ListMembers' {maxResults} -> maxResults) (\s@ListMembers' {} a -> s {maxResults = a} :: ListMembers)++-- | A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+listMembers_nextToken :: Lens.Lens' ListMembers (Prelude.Maybe Prelude.Text)+listMembers_nextToken = Lens.lens (\ListMembers' {nextToken} -> nextToken) (\s@ListMembers' {} a -> s {nextToken = a} :: ListMembers)++-- | Specifies whether to list only currently associated members if @True@ or+-- to list all members within the organization if @False@.+listMembers_onlyAssociated :: Lens.Lens' ListMembers (Prelude.Maybe Prelude.Bool)+listMembers_onlyAssociated = Lens.lens (\ListMembers' {onlyAssociated} -> onlyAssociated) (\s@ListMembers' {} a -> s {onlyAssociated = a} :: ListMembers)++instance Core.AWSPager ListMembers where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listMembersResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listMembersResponse_members+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listMembers_nextToken+ Lens..~ rs+ Lens.^? listMembersResponse_nextToken+ Prelude.. Lens._Just++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..?> "members" 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` onlyAssociated++instance Prelude.NFData ListMembers where+ rnf ListMembers' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf onlyAssociated++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,+ ("onlyAssociated" Data..=)+ Prelude.<$> onlyAssociated+ ]+ )++instance Data.ToPath ListMembers where+ toPath = Prelude.const "/members/list"++instance Data.ToQuery ListMembers where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListMembersResponse' smart constructor.+data ListMembersResponse = ListMembersResponse'+ { -- | An object that contains details for each member account.+ members :: Prelude.Maybe [Member],+ -- | The pagination parameter to be used on the next list operation to+ -- retrieve more items.+ 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:+--+-- 'members', 'listMembersResponse_members' - An object that contains details for each member account.+--+-- 'nextToken', 'listMembersResponse_nextToken' - The pagination parameter to be used on the next list operation to+-- retrieve more items.+--+-- 'httpStatus', 'listMembersResponse_httpStatus' - The response's http status code.+newListMembersResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListMembersResponse+newListMembersResponse pHttpStatus_ =+ ListMembersResponse'+ { members = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An object that contains details for each member account.+listMembersResponse_members :: Lens.Lens' ListMembersResponse (Prelude.Maybe [Member])+listMembersResponse_members = Lens.lens (\ListMembersResponse' {members} -> members) (\s@ListMembersResponse' {} a -> s {members = a} :: ListMembersResponse) Prelude.. Lens.mapping Lens.coerced++-- | The pagination parameter to be used on the next list operation to+-- retrieve more items.+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 members+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Inspector2/ListTagsForResource.hs view
@@ -0,0 +1,159 @@+{-# 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.Inspector2.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)+--+-- Lists all tags attached to a given resource.+module Amazonka.Inspector2.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.Inspector2.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 Amazon resource number (ARN) of the resource to list tags of.+ 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 Amazon resource number (ARN) of the resource to list tags of.+newListTagsForResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ ListTagsForResource+newListTagsForResource pResourceArn_ =+ ListTagsForResource' {resourceArn = pResourceArn_}++-- | The Amazon resource number (ARN) of the resource to list tags of.+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 tags associated with the resource.+ 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 tags associated with the resource.+--+-- 'httpStatus', 'listTagsForResourceResponse_httpStatus' - The response's http status code.+newListTagsForResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListTagsForResourceResponse+newListTagsForResourceResponse pHttpStatus_ =+ ListTagsForResourceResponse'+ { tags =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The tags associated with the resource.+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/Inspector2/ListUsageTotals.hs view
@@ -0,0 +1,241 @@+{-# 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.Inspector2.ListUsageTotals+-- 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 the Amazon Inspector usage totals over the last 30 days.+--+-- This operation returns paginated results.+module Amazonka.Inspector2.ListUsageTotals+ ( -- * Creating a Request+ ListUsageTotals (..),+ newListUsageTotals,++ -- * Request Lenses+ listUsageTotals_accountIds,+ listUsageTotals_maxResults,+ listUsageTotals_nextToken,++ -- * Destructuring the Response+ ListUsageTotalsResponse (..),+ newListUsageTotalsResponse,++ -- * Response Lenses+ listUsageTotalsResponse_nextToken,+ listUsageTotalsResponse_totals,+ listUsageTotalsResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newListUsageTotals' smart constructor.+data ListUsageTotals = ListUsageTotals'+ { -- | The Amazon Web Services account IDs to retrieve usage totals for.+ accountIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),+ -- | The maximum number of results to return in the response.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | A token to use for paginating results that are returned in the response.+ -- Set the value of this parameter to null for the first request to a list+ -- action. For subsequent calls, use the @NextToken@ value returned from+ -- the previous request to continue listing results after the first page.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListUsageTotals' 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', 'listUsageTotals_accountIds' - The Amazon Web Services account IDs to retrieve usage totals for.+--+-- 'maxResults', 'listUsageTotals_maxResults' - The maximum number of results to return in the response.+--+-- 'nextToken', 'listUsageTotals_nextToken' - A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+newListUsageTotals ::+ ListUsageTotals+newListUsageTotals =+ ListUsageTotals'+ { accountIds = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The Amazon Web Services account IDs to retrieve usage totals for.+listUsageTotals_accountIds :: Lens.Lens' ListUsageTotals (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))+listUsageTotals_accountIds = Lens.lens (\ListUsageTotals' {accountIds} -> accountIds) (\s@ListUsageTotals' {} a -> s {accountIds = a} :: ListUsageTotals) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of results to return in the response.+listUsageTotals_maxResults :: Lens.Lens' ListUsageTotals (Prelude.Maybe Prelude.Natural)+listUsageTotals_maxResults = Lens.lens (\ListUsageTotals' {maxResults} -> maxResults) (\s@ListUsageTotals' {} a -> s {maxResults = a} :: ListUsageTotals)++-- | A token to use for paginating results that are returned in the response.+-- Set the value of this parameter to null for the first request to a list+-- action. For subsequent calls, use the @NextToken@ value returned from+-- the previous request to continue listing results after the first page.+listUsageTotals_nextToken :: Lens.Lens' ListUsageTotals (Prelude.Maybe Prelude.Text)+listUsageTotals_nextToken = Lens.lens (\ListUsageTotals' {nextToken} -> nextToken) (\s@ListUsageTotals' {} a -> s {nextToken = a} :: ListUsageTotals)++instance Core.AWSPager ListUsageTotals where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listUsageTotalsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listUsageTotalsResponse_totals+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listUsageTotals_nextToken+ Lens..~ rs+ Lens.^? listUsageTotalsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListUsageTotals where+ type+ AWSResponse ListUsageTotals =+ ListUsageTotalsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListUsageTotalsResponse'+ Prelude.<$> (x Data..?> "nextToken")+ Prelude.<*> (x Data..?> "totals" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListUsageTotals where+ hashWithSalt _salt ListUsageTotals' {..} =+ _salt+ `Prelude.hashWithSalt` accountIds+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListUsageTotals where+ rnf ListUsageTotals' {..} =+ Prelude.rnf accountIds+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListUsageTotals where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListUsageTotals where+ toJSON ListUsageTotals' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("accountIds" Data..=) Prelude.<$> accountIds,+ ("maxResults" Data..=) Prelude.<$> maxResults,+ ("nextToken" Data..=) Prelude.<$> nextToken+ ]+ )++instance Data.ToPath ListUsageTotals where+ toPath = Prelude.const "/usage/list"++instance Data.ToQuery ListUsageTotals where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListUsageTotalsResponse' smart constructor.+data ListUsageTotalsResponse = ListUsageTotalsResponse'+ { -- | The pagination parameter to be used on the next list operation to+ -- retrieve more items.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | An object with details on the total usage for the requested account.+ totals :: Prelude.Maybe [UsageTotal],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListUsageTotalsResponse' 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:+--+-- 'nextToken', 'listUsageTotalsResponse_nextToken' - The pagination parameter to be used on the next list operation to+-- retrieve more items.+--+-- 'totals', 'listUsageTotalsResponse_totals' - An object with details on the total usage for the requested account.+--+-- 'httpStatus', 'listUsageTotalsResponse_httpStatus' - The response's http status code.+newListUsageTotalsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListUsageTotalsResponse+newListUsageTotalsResponse pHttpStatus_ =+ ListUsageTotalsResponse'+ { nextToken =+ Prelude.Nothing,+ totals = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The pagination parameter to be used on the next list operation to+-- retrieve more items.+listUsageTotalsResponse_nextToken :: Lens.Lens' ListUsageTotalsResponse (Prelude.Maybe Prelude.Text)+listUsageTotalsResponse_nextToken = Lens.lens (\ListUsageTotalsResponse' {nextToken} -> nextToken) (\s@ListUsageTotalsResponse' {} a -> s {nextToken = a} :: ListUsageTotalsResponse)++-- | An object with details on the total usage for the requested account.+listUsageTotalsResponse_totals :: Lens.Lens' ListUsageTotalsResponse (Prelude.Maybe [UsageTotal])+listUsageTotalsResponse_totals = Lens.lens (\ListUsageTotalsResponse' {totals} -> totals) (\s@ListUsageTotalsResponse' {} a -> s {totals = a} :: ListUsageTotalsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listUsageTotalsResponse_httpStatus :: Lens.Lens' ListUsageTotalsResponse Prelude.Int+listUsageTotalsResponse_httpStatus = Lens.lens (\ListUsageTotalsResponse' {httpStatus} -> httpStatus) (\s@ListUsageTotalsResponse' {} a -> s {httpStatus = a} :: ListUsageTotalsResponse)++instance Prelude.NFData ListUsageTotalsResponse where+ rnf ListUsageTotalsResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf totals+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Inspector2/TagResource.hs view
@@ -0,0 +1,163 @@+{-# 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.Inspector2.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)+--+-- Adds tags to a resource.+module Amazonka.Inspector2.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.Inspector2.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 Amazon Resource Name (ARN) of the resource to apply a tag to.+ resourceArn :: Prelude.Text,+ -- | The tags to be added to a resource.+ 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 Amazon Resource Name (ARN) of the resource to apply a tag to.+--+-- 'tags', 'tagResource_tags' - The tags to be added to a resource.+newTagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ TagResource+newTagResource pResourceArn_ =+ TagResource'+ { resourceArn = pResourceArn_,+ tags = Prelude.mempty+ }++-- | The Amazon Resource Name (ARN) of the resource to apply a tag 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 be added to a resource.+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/Inspector2/Types.hs view
@@ -0,0 +1,1220 @@+{-# 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.Inspector2.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.Inspector2.Types+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ _AccessDeniedException,+ _BadRequestException,+ _ConflictException,+ _InternalServerException,+ _ResourceNotFoundException,+ _ServiceQuotaExceededException,+ _ThrottlingException,+ _ValidationException,++ -- * AccountSortBy+ AccountSortBy (..),++ -- * AggregationFindingType+ AggregationFindingType (..),++ -- * AggregationResourceType+ AggregationResourceType (..),++ -- * AggregationType+ AggregationType (..),++ -- * AmiSortBy+ AmiSortBy (..),++ -- * Architecture+ Architecture (..),++ -- * AwsEcrContainerSortBy+ AwsEcrContainerSortBy (..),++ -- * CoverageMapComparison+ CoverageMapComparison (..),++ -- * CoverageResourceType+ CoverageResourceType (..),++ -- * CoverageStringComparison+ CoverageStringComparison (..),++ -- * Currency+ Currency (..),++ -- * DelegatedAdminStatus+ DelegatedAdminStatus (..),++ -- * Ec2InstanceSortBy+ Ec2InstanceSortBy (..),++ -- * Ec2Platform+ Ec2Platform (..),++ -- * EcrRescanDuration+ EcrRescanDuration (..),++ -- * EcrRescanDurationStatus+ EcrRescanDurationStatus (..),++ -- * EcrScanFrequency+ EcrScanFrequency (..),++ -- * ErrorCode+ ErrorCode (..),++ -- * ExploitAvailable+ ExploitAvailable (..),++ -- * ExternalReportStatus+ ExternalReportStatus (..),++ -- * FilterAction+ FilterAction (..),++ -- * FindingStatus+ FindingStatus (..),++ -- * FindingType+ FindingType (..),++ -- * FindingTypeSortBy+ FindingTypeSortBy (..),++ -- * FixAvailable+ FixAvailable (..),++ -- * FreeTrialInfoErrorCode+ FreeTrialInfoErrorCode (..),++ -- * FreeTrialStatus+ FreeTrialStatus (..),++ -- * FreeTrialType+ FreeTrialType (..),++ -- * GroupKey+ GroupKey (..),++ -- * ImageLayerSortBy+ ImageLayerSortBy (..),++ -- * LambdaFunctionSortBy+ LambdaFunctionSortBy (..),++ -- * LambdaLayerSortBy+ LambdaLayerSortBy (..),++ -- * MapComparison+ MapComparison (..),++ -- * NetworkProtocol+ NetworkProtocol (..),++ -- * Operation+ Operation (..),++ -- * PackageManager+ PackageManager (..),++ -- * PackageSortBy+ PackageSortBy (..),++ -- * PackageType+ PackageType (..),++ -- * RelationshipStatus+ RelationshipStatus (..),++ -- * ReportFormat+ ReportFormat (..),++ -- * ReportingErrorCode+ ReportingErrorCode (..),++ -- * RepositorySortBy+ RepositorySortBy (..),++ -- * ResourceScanType+ ResourceScanType (..),++ -- * ResourceType+ ResourceType (..),++ -- * Runtime+ Runtime (..),++ -- * ScanStatusCode+ ScanStatusCode (..),++ -- * ScanStatusReason+ ScanStatusReason (..),++ -- * ScanType+ ScanType (..),++ -- * Service+ Service (..),++ -- * Severity+ Severity (..),++ -- * SortField+ SortField (..),++ -- * SortOrder+ SortOrder (..),++ -- * Status+ Status (..),++ -- * StringComparison+ StringComparison (..),++ -- * TitleSortBy+ TitleSortBy (..),++ -- * UsageType+ UsageType (..),++ -- * Account+ Account (..),+ newAccount,+ account_accountId,+ account_resourceStatus,+ account_status,++ -- * AccountAggregation+ AccountAggregation (..),+ newAccountAggregation,+ accountAggregation_findingType,+ accountAggregation_resourceType,+ accountAggregation_sortBy,+ accountAggregation_sortOrder,++ -- * AccountAggregationResponse+ AccountAggregationResponse (..),+ newAccountAggregationResponse,+ accountAggregationResponse_accountId,+ accountAggregationResponse_severityCounts,++ -- * AccountState+ AccountState (..),+ newAccountState,+ accountState_accountId,+ accountState_resourceState,+ accountState_state,++ -- * AggregationRequest+ AggregationRequest (..),+ newAggregationRequest,+ aggregationRequest_accountAggregation,+ aggregationRequest_amiAggregation,+ aggregationRequest_awsEcrContainerAggregation,+ aggregationRequest_ec2InstanceAggregation,+ aggregationRequest_findingTypeAggregation,+ aggregationRequest_imageLayerAggregation,+ aggregationRequest_lambdaFunctionAggregation,+ aggregationRequest_lambdaLayerAggregation,+ aggregationRequest_packageAggregation,+ aggregationRequest_repositoryAggregation,+ aggregationRequest_titleAggregation,++ -- * AggregationResponse+ AggregationResponse (..),+ newAggregationResponse,+ aggregationResponse_accountAggregation,+ aggregationResponse_amiAggregation,+ aggregationResponse_awsEcrContainerAggregation,+ aggregationResponse_ec2InstanceAggregation,+ aggregationResponse_findingTypeAggregation,+ aggregationResponse_imageLayerAggregation,+ aggregationResponse_lambdaFunctionAggregation,+ aggregationResponse_lambdaLayerAggregation,+ aggregationResponse_packageAggregation,+ aggregationResponse_repositoryAggregation,+ aggregationResponse_titleAggregation,++ -- * AmiAggregation+ AmiAggregation (..),+ newAmiAggregation,+ amiAggregation_amis,+ amiAggregation_sortBy,+ amiAggregation_sortOrder,++ -- * AmiAggregationResponse+ AmiAggregationResponse (..),+ newAmiAggregationResponse,+ amiAggregationResponse_accountId,+ amiAggregationResponse_affectedInstances,+ amiAggregationResponse_severityCounts,+ amiAggregationResponse_ami,++ -- * AutoEnable+ AutoEnable (..),+ newAutoEnable,+ autoEnable_lambda,+ autoEnable_ec2,+ autoEnable_ecr,++ -- * AwsEc2InstanceDetails+ AwsEc2InstanceDetails (..),+ newAwsEc2InstanceDetails,+ awsEc2InstanceDetails_iamInstanceProfileArn,+ awsEc2InstanceDetails_imageId,+ awsEc2InstanceDetails_ipV4Addresses,+ awsEc2InstanceDetails_ipV6Addresses,+ awsEc2InstanceDetails_keyName,+ awsEc2InstanceDetails_launchedAt,+ awsEc2InstanceDetails_platform,+ awsEc2InstanceDetails_subnetId,+ awsEc2InstanceDetails_type,+ awsEc2InstanceDetails_vpcId,++ -- * AwsEcrContainerAggregation+ AwsEcrContainerAggregation (..),+ newAwsEcrContainerAggregation,+ awsEcrContainerAggregation_architectures,+ awsEcrContainerAggregation_imageShas,+ awsEcrContainerAggregation_imageTags,+ awsEcrContainerAggregation_repositories,+ awsEcrContainerAggregation_resourceIds,+ awsEcrContainerAggregation_sortBy,+ awsEcrContainerAggregation_sortOrder,++ -- * AwsEcrContainerAggregationResponse+ AwsEcrContainerAggregationResponse (..),+ newAwsEcrContainerAggregationResponse,+ awsEcrContainerAggregationResponse_accountId,+ awsEcrContainerAggregationResponse_architecture,+ awsEcrContainerAggregationResponse_imageSha,+ awsEcrContainerAggregationResponse_imageTags,+ awsEcrContainerAggregationResponse_repository,+ awsEcrContainerAggregationResponse_severityCounts,+ awsEcrContainerAggregationResponse_resourceId,++ -- * AwsEcrContainerImageDetails+ AwsEcrContainerImageDetails (..),+ newAwsEcrContainerImageDetails,+ awsEcrContainerImageDetails_architecture,+ awsEcrContainerImageDetails_author,+ awsEcrContainerImageDetails_imageTags,+ awsEcrContainerImageDetails_platform,+ awsEcrContainerImageDetails_pushedAt,+ awsEcrContainerImageDetails_imageHash,+ awsEcrContainerImageDetails_registry,+ awsEcrContainerImageDetails_repositoryName,++ -- * AwsLambdaFunctionDetails+ AwsLambdaFunctionDetails (..),+ newAwsLambdaFunctionDetails,+ awsLambdaFunctionDetails_architectures,+ awsLambdaFunctionDetails_lastModifiedAt,+ awsLambdaFunctionDetails_layers,+ awsLambdaFunctionDetails_packageType,+ awsLambdaFunctionDetails_vpcConfig,+ awsLambdaFunctionDetails_codeSha256,+ awsLambdaFunctionDetails_executionRoleArn,+ awsLambdaFunctionDetails_functionName,+ awsLambdaFunctionDetails_runtime,+ awsLambdaFunctionDetails_version,++ -- * Counts+ Counts (..),+ newCounts,+ counts_count,+ counts_groupKey,++ -- * CoverageFilterCriteria+ CoverageFilterCriteria (..),+ newCoverageFilterCriteria,+ coverageFilterCriteria_accountId,+ coverageFilterCriteria_ec2InstanceTags,+ coverageFilterCriteria_ecrImageTags,+ coverageFilterCriteria_ecrRepositoryName,+ coverageFilterCriteria_lambdaFunctionName,+ coverageFilterCriteria_lambdaFunctionRuntime,+ coverageFilterCriteria_lambdaFunctionTags,+ coverageFilterCriteria_resourceId,+ coverageFilterCriteria_resourceType,+ coverageFilterCriteria_scanStatusCode,+ coverageFilterCriteria_scanStatusReason,+ coverageFilterCriteria_scanType,++ -- * CoverageMapFilter+ CoverageMapFilter (..),+ newCoverageMapFilter,+ coverageMapFilter_value,+ coverageMapFilter_comparison,+ coverageMapFilter_key,++ -- * CoverageStringFilter+ CoverageStringFilter (..),+ newCoverageStringFilter,+ coverageStringFilter_comparison,+ coverageStringFilter_value,++ -- * CoveredResource+ CoveredResource (..),+ newCoveredResource,+ coveredResource_resourceMetadata,+ coveredResource_scanStatus,+ coveredResource_accountId,+ coveredResource_resourceId,+ coveredResource_resourceType,+ coveredResource_scanType,++ -- * CvssScore+ CvssScore (..),+ newCvssScore,+ cvssScore_baseScore,+ cvssScore_scoringVector,+ cvssScore_source,+ cvssScore_version,++ -- * CvssScoreAdjustment+ CvssScoreAdjustment (..),+ newCvssScoreAdjustment,+ cvssScoreAdjustment_metric,+ cvssScoreAdjustment_reason,++ -- * CvssScoreDetails+ CvssScoreDetails (..),+ newCvssScoreDetails,+ cvssScoreDetails_adjustments,+ cvssScoreDetails_cvssSource,+ cvssScoreDetails_score,+ cvssScoreDetails_scoreSource,+ cvssScoreDetails_scoringVector,+ cvssScoreDetails_version,++ -- * DateFilter+ DateFilter (..),+ newDateFilter,+ dateFilter_endInclusive,+ dateFilter_startInclusive,++ -- * DelegatedAdmin+ DelegatedAdmin (..),+ newDelegatedAdmin,+ delegatedAdmin_accountId,+ delegatedAdmin_relationshipStatus,++ -- * DelegatedAdminAccount+ DelegatedAdminAccount (..),+ newDelegatedAdminAccount,+ delegatedAdminAccount_accountId,+ delegatedAdminAccount_status,++ -- * Destination+ Destination (..),+ newDestination,+ destination_keyPrefix,+ destination_bucketName,+ destination_kmsKeyArn,++ -- * Ec2InstanceAggregation+ Ec2InstanceAggregation (..),+ newEc2InstanceAggregation,+ ec2InstanceAggregation_amis,+ ec2InstanceAggregation_instanceIds,+ ec2InstanceAggregation_instanceTags,+ ec2InstanceAggregation_operatingSystems,+ ec2InstanceAggregation_sortBy,+ ec2InstanceAggregation_sortOrder,++ -- * Ec2InstanceAggregationResponse+ Ec2InstanceAggregationResponse (..),+ newEc2InstanceAggregationResponse,+ ec2InstanceAggregationResponse_accountId,+ ec2InstanceAggregationResponse_ami,+ ec2InstanceAggregationResponse_instanceTags,+ ec2InstanceAggregationResponse_networkFindings,+ ec2InstanceAggregationResponse_operatingSystem,+ ec2InstanceAggregationResponse_severityCounts,+ ec2InstanceAggregationResponse_instanceId,++ -- * Ec2Metadata+ Ec2Metadata (..),+ newEc2Metadata,+ ec2Metadata_amiId,+ ec2Metadata_platform,+ ec2Metadata_tags,++ -- * EcrConfiguration+ EcrConfiguration (..),+ newEcrConfiguration,+ ecrConfiguration_rescanDuration,++ -- * EcrConfigurationState+ EcrConfigurationState (..),+ newEcrConfigurationState,+ ecrConfigurationState_rescanDurationState,++ -- * EcrContainerImageMetadata+ EcrContainerImageMetadata (..),+ newEcrContainerImageMetadata,+ ecrContainerImageMetadata_tags,++ -- * EcrRepositoryMetadata+ EcrRepositoryMetadata (..),+ newEcrRepositoryMetadata,+ ecrRepositoryMetadata_name,+ ecrRepositoryMetadata_scanFrequency,++ -- * EcrRescanDurationState+ EcrRescanDurationState (..),+ newEcrRescanDurationState,+ ecrRescanDurationState_rescanDuration,+ ecrRescanDurationState_status,+ ecrRescanDurationState_updatedAt,++ -- * ExploitabilityDetails+ ExploitabilityDetails (..),+ newExploitabilityDetails,+ exploitabilityDetails_lastKnownExploitAt,++ -- * FailedAccount+ FailedAccount (..),+ newFailedAccount,+ failedAccount_resourceStatus,+ failedAccount_status,+ failedAccount_accountId,+ failedAccount_errorCode,+ failedAccount_errorMessage,++ -- * Filter+ Filter (..),+ newFilter,+ filter_description,+ filter_reason,+ filter_tags,+ filter_action,+ filter_arn,+ filter_createdAt,+ filter_criteria,+ filter_name,+ filter_ownerId,+ filter_updatedAt,++ -- * FilterCriteria+ FilterCriteria (..),+ newFilterCriteria,+ filterCriteria_awsAccountId,+ filterCriteria_componentId,+ filterCriteria_componentType,+ filterCriteria_ec2InstanceImageId,+ filterCriteria_ec2InstanceSubnetId,+ filterCriteria_ec2InstanceVpcId,+ filterCriteria_ecrImageArchitecture,+ filterCriteria_ecrImageHash,+ filterCriteria_ecrImagePushedAt,+ filterCriteria_ecrImageRegistry,+ filterCriteria_ecrImageRepositoryName,+ filterCriteria_ecrImageTags,+ filterCriteria_exploitAvailable,+ filterCriteria_findingArn,+ filterCriteria_findingStatus,+ filterCriteria_findingType,+ filterCriteria_firstObservedAt,+ filterCriteria_fixAvailable,+ filterCriteria_inspectorScore,+ filterCriteria_lambdaFunctionExecutionRoleArn,+ filterCriteria_lambdaFunctionLastModifiedAt,+ filterCriteria_lambdaFunctionLayers,+ filterCriteria_lambdaFunctionName,+ filterCriteria_lambdaFunctionRuntime,+ filterCriteria_lastObservedAt,+ filterCriteria_networkProtocol,+ filterCriteria_portRange,+ filterCriteria_relatedVulnerabilities,+ filterCriteria_resourceId,+ filterCriteria_resourceTags,+ filterCriteria_resourceType,+ filterCriteria_severity,+ filterCriteria_title,+ filterCriteria_updatedAt,+ filterCriteria_vendorSeverity,+ filterCriteria_vulnerabilityId,+ filterCriteria_vulnerabilitySource,+ filterCriteria_vulnerablePackages,++ -- * Finding+ Finding (..),+ newFinding,+ finding_exploitAvailable,+ finding_exploitabilityDetails,+ finding_fixAvailable,+ finding_inspectorScore,+ finding_inspectorScoreDetails,+ finding_networkReachabilityDetails,+ finding_packageVulnerabilityDetails,+ finding_title,+ finding_updatedAt,+ finding_awsAccountId,+ finding_description,+ finding_findingArn,+ finding_firstObservedAt,+ finding_lastObservedAt,+ finding_remediation,+ finding_resources,+ finding_severity,+ finding_status,+ finding_type,++ -- * FindingTypeAggregation+ FindingTypeAggregation (..),+ newFindingTypeAggregation,+ findingTypeAggregation_findingType,+ findingTypeAggregation_resourceType,+ findingTypeAggregation_sortBy,+ findingTypeAggregation_sortOrder,++ -- * FindingTypeAggregationResponse+ FindingTypeAggregationResponse (..),+ newFindingTypeAggregationResponse,+ findingTypeAggregationResponse_accountId,+ findingTypeAggregationResponse_severityCounts,++ -- * FreeTrialAccountInfo+ FreeTrialAccountInfo (..),+ newFreeTrialAccountInfo,+ freeTrialAccountInfo_accountId,+ freeTrialAccountInfo_freeTrialInfo,++ -- * FreeTrialInfo+ FreeTrialInfo (..),+ newFreeTrialInfo,+ freeTrialInfo_end,+ freeTrialInfo_start,+ freeTrialInfo_status,+ freeTrialInfo_type,++ -- * FreeTrialInfoError+ FreeTrialInfoError (..),+ newFreeTrialInfoError,+ freeTrialInfoError_accountId,+ freeTrialInfoError_code,+ freeTrialInfoError_message,++ -- * ImageLayerAggregation+ ImageLayerAggregation (..),+ newImageLayerAggregation,+ imageLayerAggregation_layerHashes,+ imageLayerAggregation_repositories,+ imageLayerAggregation_resourceIds,+ imageLayerAggregation_sortBy,+ imageLayerAggregation_sortOrder,++ -- * ImageLayerAggregationResponse+ ImageLayerAggregationResponse (..),+ newImageLayerAggregationResponse,+ imageLayerAggregationResponse_severityCounts,+ imageLayerAggregationResponse_accountId,+ imageLayerAggregationResponse_layerHash,+ imageLayerAggregationResponse_repository,+ imageLayerAggregationResponse_resourceId,++ -- * InspectorScoreDetails+ InspectorScoreDetails (..),+ newInspectorScoreDetails,+ inspectorScoreDetails_adjustedCvss,++ -- * LambdaFunctionAggregation+ LambdaFunctionAggregation (..),+ newLambdaFunctionAggregation,+ lambdaFunctionAggregation_functionNames,+ lambdaFunctionAggregation_functionTags,+ lambdaFunctionAggregation_resourceIds,+ lambdaFunctionAggregation_runtimes,+ lambdaFunctionAggregation_sortBy,+ lambdaFunctionAggregation_sortOrder,++ -- * LambdaFunctionAggregationResponse+ LambdaFunctionAggregationResponse (..),+ newLambdaFunctionAggregationResponse,+ lambdaFunctionAggregationResponse_accountId,+ lambdaFunctionAggregationResponse_functionName,+ lambdaFunctionAggregationResponse_lambdaTags,+ lambdaFunctionAggregationResponse_lastModifiedAt,+ lambdaFunctionAggregationResponse_runtime,+ lambdaFunctionAggregationResponse_severityCounts,+ lambdaFunctionAggregationResponse_resourceId,++ -- * LambdaFunctionMetadata+ LambdaFunctionMetadata (..),+ newLambdaFunctionMetadata,+ lambdaFunctionMetadata_functionName,+ lambdaFunctionMetadata_functionTags,+ lambdaFunctionMetadata_layers,+ lambdaFunctionMetadata_runtime,++ -- * LambdaLayerAggregation+ LambdaLayerAggregation (..),+ newLambdaLayerAggregation,+ lambdaLayerAggregation_functionNames,+ lambdaLayerAggregation_layerArns,+ lambdaLayerAggregation_resourceIds,+ lambdaLayerAggregation_sortBy,+ lambdaLayerAggregation_sortOrder,++ -- * LambdaLayerAggregationResponse+ LambdaLayerAggregationResponse (..),+ newLambdaLayerAggregationResponse,+ lambdaLayerAggregationResponse_severityCounts,+ lambdaLayerAggregationResponse_accountId,+ lambdaLayerAggregationResponse_functionName,+ lambdaLayerAggregationResponse_layerArn,+ lambdaLayerAggregationResponse_resourceId,++ -- * LambdaVpcConfig+ LambdaVpcConfig (..),+ newLambdaVpcConfig,+ lambdaVpcConfig_securityGroupIds,+ lambdaVpcConfig_subnetIds,+ lambdaVpcConfig_vpcId,++ -- * MapFilter+ MapFilter (..),+ newMapFilter,+ mapFilter_value,+ mapFilter_comparison,+ mapFilter_key,++ -- * Member+ Member (..),+ newMember,+ member_accountId,+ member_delegatedAdminAccountId,+ member_relationshipStatus,+ member_updatedAt,++ -- * NetworkPath+ NetworkPath (..),+ newNetworkPath,+ networkPath_steps,++ -- * NetworkReachabilityDetails+ NetworkReachabilityDetails (..),+ newNetworkReachabilityDetails,+ networkReachabilityDetails_networkPath,+ networkReachabilityDetails_openPortRange,+ networkReachabilityDetails_protocol,++ -- * NumberFilter+ NumberFilter (..),+ newNumberFilter,+ numberFilter_lowerInclusive,+ numberFilter_upperInclusive,++ -- * PackageAggregation+ PackageAggregation (..),+ newPackageAggregation,+ packageAggregation_packageNames,+ packageAggregation_sortBy,+ packageAggregation_sortOrder,++ -- * PackageAggregationResponse+ PackageAggregationResponse (..),+ newPackageAggregationResponse,+ packageAggregationResponse_accountId,+ packageAggregationResponse_severityCounts,+ packageAggregationResponse_packageName,++ -- * PackageFilter+ PackageFilter (..),+ newPackageFilter,+ packageFilter_architecture,+ packageFilter_epoch,+ packageFilter_name,+ packageFilter_release,+ packageFilter_sourceLambdaLayerArn,+ packageFilter_sourceLayerHash,+ packageFilter_version,++ -- * PackageVulnerabilityDetails+ PackageVulnerabilityDetails (..),+ newPackageVulnerabilityDetails,+ packageVulnerabilityDetails_cvss,+ packageVulnerabilityDetails_referenceUrls,+ packageVulnerabilityDetails_relatedVulnerabilities,+ packageVulnerabilityDetails_sourceUrl,+ packageVulnerabilityDetails_vendorCreatedAt,+ packageVulnerabilityDetails_vendorSeverity,+ packageVulnerabilityDetails_vendorUpdatedAt,+ packageVulnerabilityDetails_vulnerablePackages,+ packageVulnerabilityDetails_source,+ packageVulnerabilityDetails_vulnerabilityId,++ -- * Permission+ Permission (..),+ newPermission,+ permission_operation,+ permission_service,++ -- * PortRange+ PortRange (..),+ newPortRange,+ portRange_begin,+ portRange_end,++ -- * PortRangeFilter+ PortRangeFilter (..),+ newPortRangeFilter,+ portRangeFilter_beginInclusive,+ portRangeFilter_endInclusive,++ -- * Recommendation+ Recommendation (..),+ newRecommendation,+ recommendation_url,+ recommendation_text,++ -- * Remediation+ Remediation (..),+ newRemediation,+ remediation_recommendation,++ -- * RepositoryAggregation+ RepositoryAggregation (..),+ newRepositoryAggregation,+ repositoryAggregation_repositories,+ repositoryAggregation_sortBy,+ repositoryAggregation_sortOrder,++ -- * RepositoryAggregationResponse+ RepositoryAggregationResponse (..),+ newRepositoryAggregationResponse,+ repositoryAggregationResponse_accountId,+ repositoryAggregationResponse_affectedImages,+ repositoryAggregationResponse_severityCounts,+ repositoryAggregationResponse_repository,++ -- * Resource+ Resource (..),+ newResource,+ resource_details,+ resource_partition,+ resource_region,+ resource_tags,+ resource_id,+ resource_type,++ -- * ResourceDetails+ ResourceDetails (..),+ newResourceDetails,+ resourceDetails_awsEc2Instance,+ resourceDetails_awsEcrContainerImage,+ resourceDetails_awsLambdaFunction,++ -- * ResourceScanMetadata+ ResourceScanMetadata (..),+ newResourceScanMetadata,+ resourceScanMetadata_ec2,+ resourceScanMetadata_ecrImage,+ resourceScanMetadata_ecrRepository,+ resourceScanMetadata_lambdaFunction,++ -- * ResourceState+ ResourceState (..),+ newResourceState,+ resourceState_lambda,+ resourceState_ec2,+ resourceState_ecr,++ -- * ResourceStatus+ ResourceStatus (..),+ newResourceStatus,+ resourceStatus_lambda,+ resourceStatus_ec2,+ resourceStatus_ecr,++ -- * ScanStatus+ ScanStatus (..),+ newScanStatus,+ scanStatus_reason,+ scanStatus_statusCode,++ -- * SeverityCounts+ SeverityCounts (..),+ newSeverityCounts,+ severityCounts_all,+ severityCounts_critical,+ severityCounts_high,+ severityCounts_medium,++ -- * SortCriteria+ SortCriteria (..),+ newSortCriteria,+ sortCriteria_field,+ sortCriteria_sortOrder,++ -- * State+ State (..),+ newState,+ state_errorCode,+ state_errorMessage,+ state_status,++ -- * Step+ Step (..),+ newStep,+ step_componentId,+ step_componentType,++ -- * StringFilter+ StringFilter (..),+ newStringFilter,+ stringFilter_comparison,+ stringFilter_value,++ -- * TitleAggregation+ TitleAggregation (..),+ newTitleAggregation,+ titleAggregation_resourceType,+ titleAggregation_sortBy,+ titleAggregation_sortOrder,+ titleAggregation_titles,+ titleAggregation_vulnerabilityIds,++ -- * TitleAggregationResponse+ TitleAggregationResponse (..),+ newTitleAggregationResponse,+ titleAggregationResponse_accountId,+ titleAggregationResponse_severityCounts,+ titleAggregationResponse_vulnerabilityId,+ titleAggregationResponse_title,++ -- * Usage+ Usage (..),+ newUsage,+ usage_currency,+ usage_estimatedMonthlyCost,+ usage_total,+ usage_type,++ -- * UsageTotal+ UsageTotal (..),+ newUsageTotal,+ usageTotal_accountId,+ usageTotal_usage,++ -- * VulnerablePackage+ VulnerablePackage (..),+ newVulnerablePackage,+ vulnerablePackage_arch,+ vulnerablePackage_epoch,+ vulnerablePackage_filePath,+ vulnerablePackage_fixedInVersion,+ vulnerablePackage_packageManager,+ vulnerablePackage_release,+ vulnerablePackage_remediation,+ vulnerablePackage_sourceLambdaLayerArn,+ vulnerablePackage_sourceLayerHash,+ vulnerablePackage_name,+ vulnerablePackage_version,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import Amazonka.Inspector2.Types.Account+import Amazonka.Inspector2.Types.AccountAggregation+import Amazonka.Inspector2.Types.AccountAggregationResponse+import Amazonka.Inspector2.Types.AccountSortBy+import Amazonka.Inspector2.Types.AccountState+import Amazonka.Inspector2.Types.AggregationFindingType+import Amazonka.Inspector2.Types.AggregationRequest+import Amazonka.Inspector2.Types.AggregationResourceType+import Amazonka.Inspector2.Types.AggregationResponse+import Amazonka.Inspector2.Types.AggregationType+import Amazonka.Inspector2.Types.AmiAggregation+import Amazonka.Inspector2.Types.AmiAggregationResponse+import Amazonka.Inspector2.Types.AmiSortBy+import Amazonka.Inspector2.Types.Architecture+import Amazonka.Inspector2.Types.AutoEnable+import Amazonka.Inspector2.Types.AwsEc2InstanceDetails+import Amazonka.Inspector2.Types.AwsEcrContainerAggregation+import Amazonka.Inspector2.Types.AwsEcrContainerAggregationResponse+import Amazonka.Inspector2.Types.AwsEcrContainerImageDetails+import Amazonka.Inspector2.Types.AwsEcrContainerSortBy+import Amazonka.Inspector2.Types.AwsLambdaFunctionDetails+import Amazonka.Inspector2.Types.Counts+import Amazonka.Inspector2.Types.CoverageFilterCriteria+import Amazonka.Inspector2.Types.CoverageMapComparison+import Amazonka.Inspector2.Types.CoverageMapFilter+import Amazonka.Inspector2.Types.CoverageResourceType+import Amazonka.Inspector2.Types.CoverageStringComparison+import Amazonka.Inspector2.Types.CoverageStringFilter+import Amazonka.Inspector2.Types.CoveredResource+import Amazonka.Inspector2.Types.Currency+import Amazonka.Inspector2.Types.CvssScore+import Amazonka.Inspector2.Types.CvssScoreAdjustment+import Amazonka.Inspector2.Types.CvssScoreDetails+import Amazonka.Inspector2.Types.DateFilter+import Amazonka.Inspector2.Types.DelegatedAdmin+import Amazonka.Inspector2.Types.DelegatedAdminAccount+import Amazonka.Inspector2.Types.DelegatedAdminStatus+import Amazonka.Inspector2.Types.Destination+import Amazonka.Inspector2.Types.Ec2InstanceAggregation+import Amazonka.Inspector2.Types.Ec2InstanceAggregationResponse+import Amazonka.Inspector2.Types.Ec2InstanceSortBy+import Amazonka.Inspector2.Types.Ec2Metadata+import Amazonka.Inspector2.Types.Ec2Platform+import Amazonka.Inspector2.Types.EcrConfiguration+import Amazonka.Inspector2.Types.EcrConfigurationState+import Amazonka.Inspector2.Types.EcrContainerImageMetadata+import Amazonka.Inspector2.Types.EcrRepositoryMetadata+import Amazonka.Inspector2.Types.EcrRescanDuration+import Amazonka.Inspector2.Types.EcrRescanDurationState+import Amazonka.Inspector2.Types.EcrRescanDurationStatus+import Amazonka.Inspector2.Types.EcrScanFrequency+import Amazonka.Inspector2.Types.ErrorCode+import Amazonka.Inspector2.Types.ExploitAvailable+import Amazonka.Inspector2.Types.ExploitabilityDetails+import Amazonka.Inspector2.Types.ExternalReportStatus+import Amazonka.Inspector2.Types.FailedAccount+import Amazonka.Inspector2.Types.Filter+import Amazonka.Inspector2.Types.FilterAction+import Amazonka.Inspector2.Types.FilterCriteria+import Amazonka.Inspector2.Types.Finding+import Amazonka.Inspector2.Types.FindingStatus+import Amazonka.Inspector2.Types.FindingType+import Amazonka.Inspector2.Types.FindingTypeAggregation+import Amazonka.Inspector2.Types.FindingTypeAggregationResponse+import Amazonka.Inspector2.Types.FindingTypeSortBy+import Amazonka.Inspector2.Types.FixAvailable+import Amazonka.Inspector2.Types.FreeTrialAccountInfo+import Amazonka.Inspector2.Types.FreeTrialInfo+import Amazonka.Inspector2.Types.FreeTrialInfoError+import Amazonka.Inspector2.Types.FreeTrialInfoErrorCode+import Amazonka.Inspector2.Types.FreeTrialStatus+import Amazonka.Inspector2.Types.FreeTrialType+import Amazonka.Inspector2.Types.GroupKey+import Amazonka.Inspector2.Types.ImageLayerAggregation+import Amazonka.Inspector2.Types.ImageLayerAggregationResponse+import Amazonka.Inspector2.Types.ImageLayerSortBy+import Amazonka.Inspector2.Types.InspectorScoreDetails+import Amazonka.Inspector2.Types.LambdaFunctionAggregation+import Amazonka.Inspector2.Types.LambdaFunctionAggregationResponse+import Amazonka.Inspector2.Types.LambdaFunctionMetadata+import Amazonka.Inspector2.Types.LambdaFunctionSortBy+import Amazonka.Inspector2.Types.LambdaLayerAggregation+import Amazonka.Inspector2.Types.LambdaLayerAggregationResponse+import Amazonka.Inspector2.Types.LambdaLayerSortBy+import Amazonka.Inspector2.Types.LambdaVpcConfig+import Amazonka.Inspector2.Types.MapComparison+import Amazonka.Inspector2.Types.MapFilter+import Amazonka.Inspector2.Types.Member+import Amazonka.Inspector2.Types.NetworkPath+import Amazonka.Inspector2.Types.NetworkProtocol+import Amazonka.Inspector2.Types.NetworkReachabilityDetails+import Amazonka.Inspector2.Types.NumberFilter+import Amazonka.Inspector2.Types.Operation+import Amazonka.Inspector2.Types.PackageAggregation+import Amazonka.Inspector2.Types.PackageAggregationResponse+import Amazonka.Inspector2.Types.PackageFilter+import Amazonka.Inspector2.Types.PackageManager+import Amazonka.Inspector2.Types.PackageSortBy+import Amazonka.Inspector2.Types.PackageType+import Amazonka.Inspector2.Types.PackageVulnerabilityDetails+import Amazonka.Inspector2.Types.Permission+import Amazonka.Inspector2.Types.PortRange+import Amazonka.Inspector2.Types.PortRangeFilter+import Amazonka.Inspector2.Types.Recommendation+import Amazonka.Inspector2.Types.RelationshipStatus+import Amazonka.Inspector2.Types.Remediation+import Amazonka.Inspector2.Types.ReportFormat+import Amazonka.Inspector2.Types.ReportingErrorCode+import Amazonka.Inspector2.Types.RepositoryAggregation+import Amazonka.Inspector2.Types.RepositoryAggregationResponse+import Amazonka.Inspector2.Types.RepositorySortBy+import Amazonka.Inspector2.Types.Resource+import Amazonka.Inspector2.Types.ResourceDetails+import Amazonka.Inspector2.Types.ResourceScanMetadata+import Amazonka.Inspector2.Types.ResourceScanType+import Amazonka.Inspector2.Types.ResourceState+import Amazonka.Inspector2.Types.ResourceStatus+import Amazonka.Inspector2.Types.ResourceType+import Amazonka.Inspector2.Types.Runtime+import Amazonka.Inspector2.Types.ScanStatus+import Amazonka.Inspector2.Types.ScanStatusCode+import Amazonka.Inspector2.Types.ScanStatusReason+import Amazonka.Inspector2.Types.ScanType+import Amazonka.Inspector2.Types.Service+import Amazonka.Inspector2.Types.Severity+import Amazonka.Inspector2.Types.SeverityCounts+import Amazonka.Inspector2.Types.SortCriteria+import Amazonka.Inspector2.Types.SortField+import Amazonka.Inspector2.Types.SortOrder+import Amazonka.Inspector2.Types.State+import Amazonka.Inspector2.Types.Status+import Amazonka.Inspector2.Types.Step+import Amazonka.Inspector2.Types.StringComparison+import Amazonka.Inspector2.Types.StringFilter+import Amazonka.Inspector2.Types.TitleAggregation+import Amazonka.Inspector2.Types.TitleAggregationResponse+import Amazonka.Inspector2.Types.TitleSortBy+import Amazonka.Inspector2.Types.Usage+import Amazonka.Inspector2.Types.UsageTotal+import Amazonka.Inspector2.Types.UsageType+import Amazonka.Inspector2.Types.VulnerablePackage+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2020-06-08@ of the Amazon Inspector2 SDK configuration.+defaultService :: Core.Service+defaultService =+ Core.Service+ { Core.abbrev = "Inspector2",+ Core.signer = Sign.v4,+ Core.endpointPrefix = "inspector2",+ Core.signingName = "inspector2",+ Core.version = "2020-06-08",+ Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+ Core.endpoint = Core.defaultEndpoint defaultService,+ Core.timeout = Prelude.Just 70,+ Core.check = Core.statusSuccess,+ Core.error = Core.parseJSONError "Inspector2",+ 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++-- | You do not have sufficient access to perform this action.+_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_AccessDeniedException =+ Core._MatchServiceError+ defaultService+ "AccessDeniedException"+ Prelude.. Core.hasStatus 403++-- | One or more tags submitted as part of the request is not valid.+_BadRequestException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_BadRequestException =+ Core._MatchServiceError+ defaultService+ "BadRequestException"+ Prelude.. Core.hasStatus 400++-- | A conflict occurred.+_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ConflictException =+ Core._MatchServiceError+ defaultService+ "ConflictException"+ Prelude.. Core.hasStatus 409++-- | The request has failed due to an internal failure of the Amazon+-- Inspector service.+_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalServerException =+ Core._MatchServiceError+ defaultService+ "InternalServerException"+ Prelude.. Core.hasStatus 500++-- | The operation tried to access an invalid resource. Make sure the+-- resource is specified correctly.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+ Core._MatchServiceError+ defaultService+ "ResourceNotFoundException"+ Prelude.. Core.hasStatus 404++-- | You have exceeded your service quota. To perform the requested action,+-- remove some of the relevant resources, or use Service Quotas to request+-- a service quota increase.+_ServiceQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceQuotaExceededException =+ Core._MatchServiceError+ defaultService+ "ServiceQuotaExceededException"+ Prelude.. Core.hasStatus 402++-- | The limit on the number of requests per second was exceeded.+_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ThrottlingException =+ Core._MatchServiceError+ defaultService+ "ThrottlingException"+ Prelude.. Core.hasStatus 429++-- | The request has failed validation due to missing required fields or+-- having invalid inputs.+_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ValidationException =+ Core._MatchServiceError+ defaultService+ "ValidationException"+ Prelude.. Core.hasStatus 400
+ gen/Amazonka/Inspector2/Types/Account.hs view
@@ -0,0 +1,105 @@+{-# 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.Inspector2.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.Inspector2.Types.Account where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.ResourceStatus+import Amazonka.Inspector2.Types.Status+import qualified Amazonka.Prelude as Prelude++-- | An Amazon Web Services account within your environment that Amazon+-- Inspector has been enabled for.+--+-- /See:/ 'newAccount' smart constructor.+data Account = Account'+ { -- | The ID of the Amazon Web Services account.+ accountId :: Prelude.Text,+ -- | Details of the status of Amazon Inspector scans by resource type.+ resourceStatus :: ResourceStatus,+ -- | The status of Amazon Inspector for the account.+ status :: Status+ }+ 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 ID of the Amazon Web Services account.+--+-- 'resourceStatus', 'account_resourceStatus' - Details of the status of Amazon Inspector scans by resource type.+--+-- 'status', 'account_status' - The status of Amazon Inspector for the account.+newAccount ::+ -- | 'accountId'+ Prelude.Text ->+ -- | 'resourceStatus'+ ResourceStatus ->+ -- | 'status'+ Status ->+ Account+newAccount pAccountId_ pResourceStatus_ pStatus_ =+ Account'+ { accountId = pAccountId_,+ resourceStatus = pResourceStatus_,+ status = pStatus_+ }++-- | The ID 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)++-- | Details of the status of Amazon Inspector scans by resource type.+account_resourceStatus :: Lens.Lens' Account ResourceStatus+account_resourceStatus = Lens.lens (\Account' {resourceStatus} -> resourceStatus) (\s@Account' {} a -> s {resourceStatus = a} :: Account)++-- | The status of Amazon Inspector for the account.+account_status :: Lens.Lens' Account Status+account_status = Lens.lens (\Account' {status} -> status) (\s@Account' {} a -> s {status = a} :: Account)++instance Data.FromJSON Account where+ parseJSON =+ Data.withObject+ "Account"+ ( \x ->+ Account'+ Prelude.<$> (x Data..: "accountId")+ Prelude.<*> (x Data..: "resourceStatus")+ Prelude.<*> (x Data..: "status")+ )++instance Prelude.Hashable Account where+ hashWithSalt _salt Account' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` resourceStatus+ `Prelude.hashWithSalt` status++instance Prelude.NFData Account where+ rnf Account' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf resourceStatus+ `Prelude.seq` Prelude.rnf status
+ gen/Amazonka/Inspector2/Types/AccountAggregation.hs view
@@ -0,0 +1,112 @@+{-# 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.Inspector2.Types.AccountAggregation+-- 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.Inspector2.Types.AccountAggregation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.AccountSortBy+import Amazonka.Inspector2.Types.AggregationFindingType+import Amazonka.Inspector2.Types.AggregationResourceType+import Amazonka.Inspector2.Types.SortOrder+import qualified Amazonka.Prelude as Prelude++-- | An object that contains details about an aggregation response based on+-- Amazon Web Services accounts.+--+-- /See:/ 'newAccountAggregation' smart constructor.+data AccountAggregation = AccountAggregation'+ { -- | The type of finding.+ findingType :: Prelude.Maybe AggregationFindingType,+ -- | The type of resource.+ resourceType :: Prelude.Maybe AggregationResourceType,+ -- | The value to sort by.+ sortBy :: Prelude.Maybe AccountSortBy,+ -- | The sort order (ascending or descending).+ sortOrder :: Prelude.Maybe SortOrder+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AccountAggregation' 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:+--+-- 'findingType', 'accountAggregation_findingType' - The type of finding.+--+-- 'resourceType', 'accountAggregation_resourceType' - The type of resource.+--+-- 'sortBy', 'accountAggregation_sortBy' - The value to sort by.+--+-- 'sortOrder', 'accountAggregation_sortOrder' - The sort order (ascending or descending).+newAccountAggregation ::+ AccountAggregation+newAccountAggregation =+ AccountAggregation'+ { findingType = Prelude.Nothing,+ resourceType = Prelude.Nothing,+ sortBy = Prelude.Nothing,+ sortOrder = Prelude.Nothing+ }++-- | The type of finding.+accountAggregation_findingType :: Lens.Lens' AccountAggregation (Prelude.Maybe AggregationFindingType)+accountAggregation_findingType = Lens.lens (\AccountAggregation' {findingType} -> findingType) (\s@AccountAggregation' {} a -> s {findingType = a} :: AccountAggregation)++-- | The type of resource.+accountAggregation_resourceType :: Lens.Lens' AccountAggregation (Prelude.Maybe AggregationResourceType)+accountAggregation_resourceType = Lens.lens (\AccountAggregation' {resourceType} -> resourceType) (\s@AccountAggregation' {} a -> s {resourceType = a} :: AccountAggregation)++-- | The value to sort by.+accountAggregation_sortBy :: Lens.Lens' AccountAggregation (Prelude.Maybe AccountSortBy)+accountAggregation_sortBy = Lens.lens (\AccountAggregation' {sortBy} -> sortBy) (\s@AccountAggregation' {} a -> s {sortBy = a} :: AccountAggregation)++-- | The sort order (ascending or descending).+accountAggregation_sortOrder :: Lens.Lens' AccountAggregation (Prelude.Maybe SortOrder)+accountAggregation_sortOrder = Lens.lens (\AccountAggregation' {sortOrder} -> sortOrder) (\s@AccountAggregation' {} a -> s {sortOrder = a} :: AccountAggregation)++instance Prelude.Hashable AccountAggregation where+ hashWithSalt _salt AccountAggregation' {..} =+ _salt+ `Prelude.hashWithSalt` findingType+ `Prelude.hashWithSalt` resourceType+ `Prelude.hashWithSalt` sortBy+ `Prelude.hashWithSalt` sortOrder++instance Prelude.NFData AccountAggregation where+ rnf AccountAggregation' {..} =+ Prelude.rnf findingType+ `Prelude.seq` Prelude.rnf resourceType+ `Prelude.seq` Prelude.rnf sortBy+ `Prelude.seq` Prelude.rnf sortOrder++instance Data.ToJSON AccountAggregation where+ toJSON AccountAggregation' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("findingType" Data..=) Prelude.<$> findingType,+ ("resourceType" Data..=) Prelude.<$> resourceType,+ ("sortBy" Data..=) Prelude.<$> sortBy,+ ("sortOrder" Data..=) Prelude.<$> sortOrder+ ]+ )
+ gen/Amazonka/Inspector2/Types/AccountAggregationResponse.hs view
@@ -0,0 +1,86 @@+{-# 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.Inspector2.Types.AccountAggregationResponse+-- 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.Inspector2.Types.AccountAggregationResponse where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.SeverityCounts+import qualified Amazonka.Prelude as Prelude++-- | An aggregation of findings by Amazon Web Services account ID.+--+-- /See:/ 'newAccountAggregationResponse' smart constructor.+data AccountAggregationResponse = AccountAggregationResponse'+ { -- | The Amazon Web Services account ID.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | The number of findings by severity.+ severityCounts :: Prelude.Maybe SeverityCounts+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AccountAggregationResponse' 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', 'accountAggregationResponse_accountId' - The Amazon Web Services account ID.+--+-- 'severityCounts', 'accountAggregationResponse_severityCounts' - The number of findings by severity.+newAccountAggregationResponse ::+ AccountAggregationResponse+newAccountAggregationResponse =+ AccountAggregationResponse'+ { accountId =+ Prelude.Nothing,+ severityCounts = Prelude.Nothing+ }++-- | The Amazon Web Services account ID.+accountAggregationResponse_accountId :: Lens.Lens' AccountAggregationResponse (Prelude.Maybe Prelude.Text)+accountAggregationResponse_accountId = Lens.lens (\AccountAggregationResponse' {accountId} -> accountId) (\s@AccountAggregationResponse' {} a -> s {accountId = a} :: AccountAggregationResponse)++-- | The number of findings by severity.+accountAggregationResponse_severityCounts :: Lens.Lens' AccountAggregationResponse (Prelude.Maybe SeverityCounts)+accountAggregationResponse_severityCounts = Lens.lens (\AccountAggregationResponse' {severityCounts} -> severityCounts) (\s@AccountAggregationResponse' {} a -> s {severityCounts = a} :: AccountAggregationResponse)++instance Data.FromJSON AccountAggregationResponse where+ parseJSON =+ Data.withObject+ "AccountAggregationResponse"+ ( \x ->+ AccountAggregationResponse'+ Prelude.<$> (x Data..:? "accountId")+ Prelude.<*> (x Data..:? "severityCounts")+ )++instance Prelude.Hashable AccountAggregationResponse where+ hashWithSalt _salt AccountAggregationResponse' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` severityCounts++instance Prelude.NFData AccountAggregationResponse where+ rnf AccountAggregationResponse' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf severityCounts
+ gen/Amazonka/Inspector2/Types/AccountSortBy.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.Inspector2.Types.AccountSortBy+-- 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.Inspector2.Types.AccountSortBy+ ( AccountSortBy+ ( ..,+ AccountSortBy_ALL,+ AccountSortBy_CRITICAL,+ AccountSortBy_HIGH+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype AccountSortBy = AccountSortBy'+ { fromAccountSortBy ::+ 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 AccountSortBy_ALL :: AccountSortBy+pattern AccountSortBy_ALL = AccountSortBy' "ALL"++pattern AccountSortBy_CRITICAL :: AccountSortBy+pattern AccountSortBy_CRITICAL = AccountSortBy' "CRITICAL"++pattern AccountSortBy_HIGH :: AccountSortBy+pattern AccountSortBy_HIGH = AccountSortBy' "HIGH"++{-# COMPLETE+ AccountSortBy_ALL,+ AccountSortBy_CRITICAL,+ AccountSortBy_HIGH,+ AccountSortBy'+ #-}
+ gen/Amazonka/Inspector2/Types/AccountState.hs view
@@ -0,0 +1,108 @@+{-# 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.Inspector2.Types.AccountState+-- 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.Inspector2.Types.AccountState where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.ResourceState+import Amazonka.Inspector2.Types.State+import qualified Amazonka.Prelude as Prelude++-- | An object with details the status of an Amazon Web Services account+-- within your Amazon Inspector environment.+--+-- /See:/ 'newAccountState' smart constructor.+data AccountState = AccountState'+ { -- | The Amazon Web Services account ID.+ accountId :: Prelude.Text,+ -- | An object detailing which resources Amazon Inspector is enabled to scan+ -- for the account.+ resourceState :: ResourceState,+ -- | An object detailing the status of Amazon Inspector for the account.+ state :: State+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AccountState' 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', 'accountState_accountId' - The Amazon Web Services account ID.+--+-- 'resourceState', 'accountState_resourceState' - An object detailing which resources Amazon Inspector is enabled to scan+-- for the account.+--+-- 'state', 'accountState_state' - An object detailing the status of Amazon Inspector for the account.+newAccountState ::+ -- | 'accountId'+ Prelude.Text ->+ -- | 'resourceState'+ ResourceState ->+ -- | 'state'+ State ->+ AccountState+newAccountState pAccountId_ pResourceState_ pState_ =+ AccountState'+ { accountId = pAccountId_,+ resourceState = pResourceState_,+ state = pState_+ }++-- | The Amazon Web Services account ID.+accountState_accountId :: Lens.Lens' AccountState Prelude.Text+accountState_accountId = Lens.lens (\AccountState' {accountId} -> accountId) (\s@AccountState' {} a -> s {accountId = a} :: AccountState)++-- | An object detailing which resources Amazon Inspector is enabled to scan+-- for the account.+accountState_resourceState :: Lens.Lens' AccountState ResourceState+accountState_resourceState = Lens.lens (\AccountState' {resourceState} -> resourceState) (\s@AccountState' {} a -> s {resourceState = a} :: AccountState)++-- | An object detailing the status of Amazon Inspector for the account.+accountState_state :: Lens.Lens' AccountState State+accountState_state = Lens.lens (\AccountState' {state} -> state) (\s@AccountState' {} a -> s {state = a} :: AccountState)++instance Data.FromJSON AccountState where+ parseJSON =+ Data.withObject+ "AccountState"+ ( \x ->+ AccountState'+ Prelude.<$> (x Data..: "accountId")+ Prelude.<*> (x Data..: "resourceState")+ Prelude.<*> (x Data..: "state")+ )++instance Prelude.Hashable AccountState where+ hashWithSalt _salt AccountState' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` resourceState+ `Prelude.hashWithSalt` state++instance Prelude.NFData AccountState where+ rnf AccountState' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf resourceState+ `Prelude.seq` Prelude.rnf state
+ gen/Amazonka/Inspector2/Types/AggregationFindingType.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.Inspector2.Types.AggregationFindingType+-- 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.Inspector2.Types.AggregationFindingType+ ( AggregationFindingType+ ( ..,+ AggregationFindingType_NETWORK_REACHABILITY,+ AggregationFindingType_PACKAGE_VULNERABILITY+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype AggregationFindingType = AggregationFindingType'+ { fromAggregationFindingType ::+ 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 AggregationFindingType_NETWORK_REACHABILITY :: AggregationFindingType+pattern AggregationFindingType_NETWORK_REACHABILITY = AggregationFindingType' "NETWORK_REACHABILITY"++pattern AggregationFindingType_PACKAGE_VULNERABILITY :: AggregationFindingType+pattern AggregationFindingType_PACKAGE_VULNERABILITY = AggregationFindingType' "PACKAGE_VULNERABILITY"++{-# COMPLETE+ AggregationFindingType_NETWORK_REACHABILITY,+ AggregationFindingType_PACKAGE_VULNERABILITY,+ AggregationFindingType'+ #-}
+ gen/Amazonka/Inspector2/Types/AggregationRequest.hs view
@@ -0,0 +1,241 @@+{-# 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.Inspector2.Types.AggregationRequest+-- 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.Inspector2.Types.AggregationRequest where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.AccountAggregation+import Amazonka.Inspector2.Types.AmiAggregation+import Amazonka.Inspector2.Types.AwsEcrContainerAggregation+import Amazonka.Inspector2.Types.Ec2InstanceAggregation+import Amazonka.Inspector2.Types.FindingTypeAggregation+import Amazonka.Inspector2.Types.ImageLayerAggregation+import Amazonka.Inspector2.Types.LambdaFunctionAggregation+import Amazonka.Inspector2.Types.LambdaLayerAggregation+import Amazonka.Inspector2.Types.PackageAggregation+import Amazonka.Inspector2.Types.RepositoryAggregation+import Amazonka.Inspector2.Types.TitleAggregation+import qualified Amazonka.Prelude as Prelude++-- | Contains details about an aggregation request.+--+-- /See:/ 'newAggregationRequest' smart constructor.+data AggregationRequest = AggregationRequest'+ { -- | An object that contains details about an aggregation request based on+ -- Amazon Web Services account IDs.+ accountAggregation :: Prelude.Maybe AccountAggregation,+ -- | An object that contains details about an aggregation request based on+ -- Amazon Machine Images (AMIs).+ amiAggregation :: Prelude.Maybe AmiAggregation,+ -- | An object that contains details about an aggregation request based on+ -- Amazon ECR container images.+ awsEcrContainerAggregation :: Prelude.Maybe AwsEcrContainerAggregation,+ -- | An object that contains details about an aggregation request based on+ -- Amazon EC2 instances.+ ec2InstanceAggregation :: Prelude.Maybe Ec2InstanceAggregation,+ -- | An object that contains details about an aggregation request based on+ -- finding types.+ findingTypeAggregation :: Prelude.Maybe FindingTypeAggregation,+ -- | An object that contains details about an aggregation request based on+ -- container image layers.+ imageLayerAggregation :: Prelude.Maybe ImageLayerAggregation,+ -- | Returns an object with findings aggregated by AWS Lambda function.+ lambdaFunctionAggregation :: Prelude.Maybe LambdaFunctionAggregation,+ -- | Returns an object with findings aggregated by AWS Lambda layer.+ lambdaLayerAggregation :: Prelude.Maybe LambdaLayerAggregation,+ -- | An object that contains details about an aggregation request based on+ -- operating system package type.+ packageAggregation :: Prelude.Maybe PackageAggregation,+ -- | An object that contains details about an aggregation request based on+ -- Amazon ECR repositories.+ repositoryAggregation :: Prelude.Maybe RepositoryAggregation,+ -- | An object that contains details about an aggregation request based on+ -- finding title.+ titleAggregation :: Prelude.Maybe TitleAggregation+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AggregationRequest' 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:+--+-- 'accountAggregation', 'aggregationRequest_accountAggregation' - An object that contains details about an aggregation request based on+-- Amazon Web Services account IDs.+--+-- 'amiAggregation', 'aggregationRequest_amiAggregation' - An object that contains details about an aggregation request based on+-- Amazon Machine Images (AMIs).+--+-- 'awsEcrContainerAggregation', 'aggregationRequest_awsEcrContainerAggregation' - An object that contains details about an aggregation request based on+-- Amazon ECR container images.+--+-- 'ec2InstanceAggregation', 'aggregationRequest_ec2InstanceAggregation' - An object that contains details about an aggregation request based on+-- Amazon EC2 instances.+--+-- 'findingTypeAggregation', 'aggregationRequest_findingTypeAggregation' - An object that contains details about an aggregation request based on+-- finding types.+--+-- 'imageLayerAggregation', 'aggregationRequest_imageLayerAggregation' - An object that contains details about an aggregation request based on+-- container image layers.+--+-- 'lambdaFunctionAggregation', 'aggregationRequest_lambdaFunctionAggregation' - Returns an object with findings aggregated by AWS Lambda function.+--+-- 'lambdaLayerAggregation', 'aggregationRequest_lambdaLayerAggregation' - Returns an object with findings aggregated by AWS Lambda layer.+--+-- 'packageAggregation', 'aggregationRequest_packageAggregation' - An object that contains details about an aggregation request based on+-- operating system package type.+--+-- 'repositoryAggregation', 'aggregationRequest_repositoryAggregation' - An object that contains details about an aggregation request based on+-- Amazon ECR repositories.+--+-- 'titleAggregation', 'aggregationRequest_titleAggregation' - An object that contains details about an aggregation request based on+-- finding title.+newAggregationRequest ::+ AggregationRequest+newAggregationRequest =+ AggregationRequest'+ { accountAggregation =+ Prelude.Nothing,+ amiAggregation = Prelude.Nothing,+ awsEcrContainerAggregation = Prelude.Nothing,+ ec2InstanceAggregation = Prelude.Nothing,+ findingTypeAggregation = Prelude.Nothing,+ imageLayerAggregation = Prelude.Nothing,+ lambdaFunctionAggregation = Prelude.Nothing,+ lambdaLayerAggregation = Prelude.Nothing,+ packageAggregation = Prelude.Nothing,+ repositoryAggregation = Prelude.Nothing,+ titleAggregation = Prelude.Nothing+ }++-- | An object that contains details about an aggregation request based on+-- Amazon Web Services account IDs.+aggregationRequest_accountAggregation :: Lens.Lens' AggregationRequest (Prelude.Maybe AccountAggregation)+aggregationRequest_accountAggregation = Lens.lens (\AggregationRequest' {accountAggregation} -> accountAggregation) (\s@AggregationRequest' {} a -> s {accountAggregation = a} :: AggregationRequest)++-- | An object that contains details about an aggregation request based on+-- Amazon Machine Images (AMIs).+aggregationRequest_amiAggregation :: Lens.Lens' AggregationRequest (Prelude.Maybe AmiAggregation)+aggregationRequest_amiAggregation = Lens.lens (\AggregationRequest' {amiAggregation} -> amiAggregation) (\s@AggregationRequest' {} a -> s {amiAggregation = a} :: AggregationRequest)++-- | An object that contains details about an aggregation request based on+-- Amazon ECR container images.+aggregationRequest_awsEcrContainerAggregation :: Lens.Lens' AggregationRequest (Prelude.Maybe AwsEcrContainerAggregation)+aggregationRequest_awsEcrContainerAggregation = Lens.lens (\AggregationRequest' {awsEcrContainerAggregation} -> awsEcrContainerAggregation) (\s@AggregationRequest' {} a -> s {awsEcrContainerAggregation = a} :: AggregationRequest)++-- | An object that contains details about an aggregation request based on+-- Amazon EC2 instances.+aggregationRequest_ec2InstanceAggregation :: Lens.Lens' AggregationRequest (Prelude.Maybe Ec2InstanceAggregation)+aggregationRequest_ec2InstanceAggregation = Lens.lens (\AggregationRequest' {ec2InstanceAggregation} -> ec2InstanceAggregation) (\s@AggregationRequest' {} a -> s {ec2InstanceAggregation = a} :: AggregationRequest)++-- | An object that contains details about an aggregation request based on+-- finding types.+aggregationRequest_findingTypeAggregation :: Lens.Lens' AggregationRequest (Prelude.Maybe FindingTypeAggregation)+aggregationRequest_findingTypeAggregation = Lens.lens (\AggregationRequest' {findingTypeAggregation} -> findingTypeAggregation) (\s@AggregationRequest' {} a -> s {findingTypeAggregation = a} :: AggregationRequest)++-- | An object that contains details about an aggregation request based on+-- container image layers.+aggregationRequest_imageLayerAggregation :: Lens.Lens' AggregationRequest (Prelude.Maybe ImageLayerAggregation)+aggregationRequest_imageLayerAggregation = Lens.lens (\AggregationRequest' {imageLayerAggregation} -> imageLayerAggregation) (\s@AggregationRequest' {} a -> s {imageLayerAggregation = a} :: AggregationRequest)++-- | Returns an object with findings aggregated by AWS Lambda function.+aggregationRequest_lambdaFunctionAggregation :: Lens.Lens' AggregationRequest (Prelude.Maybe LambdaFunctionAggregation)+aggregationRequest_lambdaFunctionAggregation = Lens.lens (\AggregationRequest' {lambdaFunctionAggregation} -> lambdaFunctionAggregation) (\s@AggregationRequest' {} a -> s {lambdaFunctionAggregation = a} :: AggregationRequest)++-- | Returns an object with findings aggregated by AWS Lambda layer.+aggregationRequest_lambdaLayerAggregation :: Lens.Lens' AggregationRequest (Prelude.Maybe LambdaLayerAggregation)+aggregationRequest_lambdaLayerAggregation = Lens.lens (\AggregationRequest' {lambdaLayerAggregation} -> lambdaLayerAggregation) (\s@AggregationRequest' {} a -> s {lambdaLayerAggregation = a} :: AggregationRequest)++-- | An object that contains details about an aggregation request based on+-- operating system package type.+aggregationRequest_packageAggregation :: Lens.Lens' AggregationRequest (Prelude.Maybe PackageAggregation)+aggregationRequest_packageAggregation = Lens.lens (\AggregationRequest' {packageAggregation} -> packageAggregation) (\s@AggregationRequest' {} a -> s {packageAggregation = a} :: AggregationRequest)++-- | An object that contains details about an aggregation request based on+-- Amazon ECR repositories.+aggregationRequest_repositoryAggregation :: Lens.Lens' AggregationRequest (Prelude.Maybe RepositoryAggregation)+aggregationRequest_repositoryAggregation = Lens.lens (\AggregationRequest' {repositoryAggregation} -> repositoryAggregation) (\s@AggregationRequest' {} a -> s {repositoryAggregation = a} :: AggregationRequest)++-- | An object that contains details about an aggregation request based on+-- finding title.+aggregationRequest_titleAggregation :: Lens.Lens' AggregationRequest (Prelude.Maybe TitleAggregation)+aggregationRequest_titleAggregation = Lens.lens (\AggregationRequest' {titleAggregation} -> titleAggregation) (\s@AggregationRequest' {} a -> s {titleAggregation = a} :: AggregationRequest)++instance Prelude.Hashable AggregationRequest where+ hashWithSalt _salt AggregationRequest' {..} =+ _salt+ `Prelude.hashWithSalt` accountAggregation+ `Prelude.hashWithSalt` amiAggregation+ `Prelude.hashWithSalt` awsEcrContainerAggregation+ `Prelude.hashWithSalt` ec2InstanceAggregation+ `Prelude.hashWithSalt` findingTypeAggregation+ `Prelude.hashWithSalt` imageLayerAggregation+ `Prelude.hashWithSalt` lambdaFunctionAggregation+ `Prelude.hashWithSalt` lambdaLayerAggregation+ `Prelude.hashWithSalt` packageAggregation+ `Prelude.hashWithSalt` repositoryAggregation+ `Prelude.hashWithSalt` titleAggregation++instance Prelude.NFData AggregationRequest where+ rnf AggregationRequest' {..} =+ Prelude.rnf accountAggregation+ `Prelude.seq` Prelude.rnf amiAggregation+ `Prelude.seq` Prelude.rnf awsEcrContainerAggregation+ `Prelude.seq` Prelude.rnf ec2InstanceAggregation+ `Prelude.seq` Prelude.rnf findingTypeAggregation+ `Prelude.seq` Prelude.rnf imageLayerAggregation+ `Prelude.seq` Prelude.rnf lambdaFunctionAggregation+ `Prelude.seq` Prelude.rnf lambdaLayerAggregation+ `Prelude.seq` Prelude.rnf packageAggregation+ `Prelude.seq` Prelude.rnf repositoryAggregation+ `Prelude.seq` Prelude.rnf titleAggregation++instance Data.ToJSON AggregationRequest where+ toJSON AggregationRequest' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("accountAggregation" Data..=)+ Prelude.<$> accountAggregation,+ ("amiAggregation" Data..=)+ Prelude.<$> amiAggregation,+ ("awsEcrContainerAggregation" Data..=)+ Prelude.<$> awsEcrContainerAggregation,+ ("ec2InstanceAggregation" Data..=)+ Prelude.<$> ec2InstanceAggregation,+ ("findingTypeAggregation" Data..=)+ Prelude.<$> findingTypeAggregation,+ ("imageLayerAggregation" Data..=)+ Prelude.<$> imageLayerAggregation,+ ("lambdaFunctionAggregation" Data..=)+ Prelude.<$> lambdaFunctionAggregation,+ ("lambdaLayerAggregation" Data..=)+ Prelude.<$> lambdaLayerAggregation,+ ("packageAggregation" Data..=)+ Prelude.<$> packageAggregation,+ ("repositoryAggregation" Data..=)+ Prelude.<$> repositoryAggregation,+ ("titleAggregation" Data..=)+ Prelude.<$> titleAggregation+ ]+ )
+ gen/Amazonka/Inspector2/Types/AggregationResourceType.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.Inspector2.Types.AggregationResourceType+-- 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.Inspector2.Types.AggregationResourceType+ ( AggregationResourceType+ ( ..,+ AggregationResourceType_AWS_EC2_INSTANCE,+ AggregationResourceType_AWS_ECR_CONTAINER_IMAGE,+ AggregationResourceType_AWS_LAMBDA_FUNCTION+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype AggregationResourceType = AggregationResourceType'+ { fromAggregationResourceType ::+ 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 AggregationResourceType_AWS_EC2_INSTANCE :: AggregationResourceType+pattern AggregationResourceType_AWS_EC2_INSTANCE = AggregationResourceType' "AWS_EC2_INSTANCE"++pattern AggregationResourceType_AWS_ECR_CONTAINER_IMAGE :: AggregationResourceType+pattern AggregationResourceType_AWS_ECR_CONTAINER_IMAGE = AggregationResourceType' "AWS_ECR_CONTAINER_IMAGE"++pattern AggregationResourceType_AWS_LAMBDA_FUNCTION :: AggregationResourceType+pattern AggregationResourceType_AWS_LAMBDA_FUNCTION = AggregationResourceType' "AWS_LAMBDA_FUNCTION"++{-# COMPLETE+ AggregationResourceType_AWS_EC2_INSTANCE,+ AggregationResourceType_AWS_ECR_CONTAINER_IMAGE,+ AggregationResourceType_AWS_LAMBDA_FUNCTION,+ AggregationResourceType'+ #-}
+ gen/Amazonka/Inspector2/Types/AggregationResponse.hs view
@@ -0,0 +1,232 @@+{-# 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.Inspector2.Types.AggregationResponse+-- 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.Inspector2.Types.AggregationResponse where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.AccountAggregationResponse+import Amazonka.Inspector2.Types.AmiAggregationResponse+import Amazonka.Inspector2.Types.AwsEcrContainerAggregationResponse+import Amazonka.Inspector2.Types.Ec2InstanceAggregationResponse+import Amazonka.Inspector2.Types.FindingTypeAggregationResponse+import Amazonka.Inspector2.Types.ImageLayerAggregationResponse+import Amazonka.Inspector2.Types.LambdaFunctionAggregationResponse+import Amazonka.Inspector2.Types.LambdaLayerAggregationResponse+import Amazonka.Inspector2.Types.PackageAggregationResponse+import Amazonka.Inspector2.Types.RepositoryAggregationResponse+import Amazonka.Inspector2.Types.TitleAggregationResponse+import qualified Amazonka.Prelude as Prelude++-- | A structure that contains details about the results of an aggregation+-- type.+--+-- /See:/ 'newAggregationResponse' smart constructor.+data AggregationResponse = AggregationResponse'+ { -- | An object that contains details about an aggregation response based on+ -- Amazon Web Services account IDs.+ accountAggregation :: Prelude.Maybe AccountAggregationResponse,+ -- | An object that contains details about an aggregation response based on+ -- Amazon Machine Images (AMIs).+ amiAggregation :: Prelude.Maybe AmiAggregationResponse,+ -- | An object that contains details about an aggregation response based on+ -- Amazon ECR container images.+ awsEcrContainerAggregation :: Prelude.Maybe AwsEcrContainerAggregationResponse,+ -- | An object that contains details about an aggregation response based on+ -- Amazon EC2 instances.+ ec2InstanceAggregation :: Prelude.Maybe Ec2InstanceAggregationResponse,+ -- | An object that contains details about an aggregation response based on+ -- finding types.+ findingTypeAggregation :: Prelude.Maybe FindingTypeAggregationResponse,+ -- | An object that contains details about an aggregation response based on+ -- container image layers.+ imageLayerAggregation :: Prelude.Maybe ImageLayerAggregationResponse,+ -- | An aggregation of findings by AWS Lambda function.+ lambdaFunctionAggregation :: Prelude.Maybe LambdaFunctionAggregationResponse,+ -- | An aggregation of findings by AWS Lambda layer.+ lambdaLayerAggregation :: Prelude.Maybe LambdaLayerAggregationResponse,+ -- | An object that contains details about an aggregation response based on+ -- operating system package type.+ packageAggregation :: Prelude.Maybe PackageAggregationResponse,+ -- | An object that contains details about an aggregation response based on+ -- Amazon ECR repositories.+ repositoryAggregation :: Prelude.Maybe RepositoryAggregationResponse,+ -- | An object that contains details about an aggregation response based on+ -- finding title.+ titleAggregation :: Prelude.Maybe TitleAggregationResponse+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AggregationResponse' 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:+--+-- 'accountAggregation', 'aggregationResponse_accountAggregation' - An object that contains details about an aggregation response based on+-- Amazon Web Services account IDs.+--+-- 'amiAggregation', 'aggregationResponse_amiAggregation' - An object that contains details about an aggregation response based on+-- Amazon Machine Images (AMIs).+--+-- 'awsEcrContainerAggregation', 'aggregationResponse_awsEcrContainerAggregation' - An object that contains details about an aggregation response based on+-- Amazon ECR container images.+--+-- 'ec2InstanceAggregation', 'aggregationResponse_ec2InstanceAggregation' - An object that contains details about an aggregation response based on+-- Amazon EC2 instances.+--+-- 'findingTypeAggregation', 'aggregationResponse_findingTypeAggregation' - An object that contains details about an aggregation response based on+-- finding types.+--+-- 'imageLayerAggregation', 'aggregationResponse_imageLayerAggregation' - An object that contains details about an aggregation response based on+-- container image layers.+--+-- 'lambdaFunctionAggregation', 'aggregationResponse_lambdaFunctionAggregation' - An aggregation of findings by AWS Lambda function.+--+-- 'lambdaLayerAggregation', 'aggregationResponse_lambdaLayerAggregation' - An aggregation of findings by AWS Lambda layer.+--+-- 'packageAggregation', 'aggregationResponse_packageAggregation' - An object that contains details about an aggregation response based on+-- operating system package type.+--+-- 'repositoryAggregation', 'aggregationResponse_repositoryAggregation' - An object that contains details about an aggregation response based on+-- Amazon ECR repositories.+--+-- 'titleAggregation', 'aggregationResponse_titleAggregation' - An object that contains details about an aggregation response based on+-- finding title.+newAggregationResponse ::+ AggregationResponse+newAggregationResponse =+ AggregationResponse'+ { accountAggregation =+ Prelude.Nothing,+ amiAggregation = Prelude.Nothing,+ awsEcrContainerAggregation = Prelude.Nothing,+ ec2InstanceAggregation = Prelude.Nothing,+ findingTypeAggregation = Prelude.Nothing,+ imageLayerAggregation = Prelude.Nothing,+ lambdaFunctionAggregation = Prelude.Nothing,+ lambdaLayerAggregation = Prelude.Nothing,+ packageAggregation = Prelude.Nothing,+ repositoryAggregation = Prelude.Nothing,+ titleAggregation = Prelude.Nothing+ }++-- | An object that contains details about an aggregation response based on+-- Amazon Web Services account IDs.+aggregationResponse_accountAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe AccountAggregationResponse)+aggregationResponse_accountAggregation = Lens.lens (\AggregationResponse' {accountAggregation} -> accountAggregation) (\s@AggregationResponse' {} a -> s {accountAggregation = a} :: AggregationResponse)++-- | An object that contains details about an aggregation response based on+-- Amazon Machine Images (AMIs).+aggregationResponse_amiAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe AmiAggregationResponse)+aggregationResponse_amiAggregation = Lens.lens (\AggregationResponse' {amiAggregation} -> amiAggregation) (\s@AggregationResponse' {} a -> s {amiAggregation = a} :: AggregationResponse)++-- | An object that contains details about an aggregation response based on+-- Amazon ECR container images.+aggregationResponse_awsEcrContainerAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe AwsEcrContainerAggregationResponse)+aggregationResponse_awsEcrContainerAggregation = Lens.lens (\AggregationResponse' {awsEcrContainerAggregation} -> awsEcrContainerAggregation) (\s@AggregationResponse' {} a -> s {awsEcrContainerAggregation = a} :: AggregationResponse)++-- | An object that contains details about an aggregation response based on+-- Amazon EC2 instances.+aggregationResponse_ec2InstanceAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe Ec2InstanceAggregationResponse)+aggregationResponse_ec2InstanceAggregation = Lens.lens (\AggregationResponse' {ec2InstanceAggregation} -> ec2InstanceAggregation) (\s@AggregationResponse' {} a -> s {ec2InstanceAggregation = a} :: AggregationResponse)++-- | An object that contains details about an aggregation response based on+-- finding types.+aggregationResponse_findingTypeAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe FindingTypeAggregationResponse)+aggregationResponse_findingTypeAggregation = Lens.lens (\AggregationResponse' {findingTypeAggregation} -> findingTypeAggregation) (\s@AggregationResponse' {} a -> s {findingTypeAggregation = a} :: AggregationResponse)++-- | An object that contains details about an aggregation response based on+-- container image layers.+aggregationResponse_imageLayerAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe ImageLayerAggregationResponse)+aggregationResponse_imageLayerAggregation = Lens.lens (\AggregationResponse' {imageLayerAggregation} -> imageLayerAggregation) (\s@AggregationResponse' {} a -> s {imageLayerAggregation = a} :: AggregationResponse)++-- | An aggregation of findings by AWS Lambda function.+aggregationResponse_lambdaFunctionAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe LambdaFunctionAggregationResponse)+aggregationResponse_lambdaFunctionAggregation = Lens.lens (\AggregationResponse' {lambdaFunctionAggregation} -> lambdaFunctionAggregation) (\s@AggregationResponse' {} a -> s {lambdaFunctionAggregation = a} :: AggregationResponse)++-- | An aggregation of findings by AWS Lambda layer.+aggregationResponse_lambdaLayerAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe LambdaLayerAggregationResponse)+aggregationResponse_lambdaLayerAggregation = Lens.lens (\AggregationResponse' {lambdaLayerAggregation} -> lambdaLayerAggregation) (\s@AggregationResponse' {} a -> s {lambdaLayerAggregation = a} :: AggregationResponse)++-- | An object that contains details about an aggregation response based on+-- operating system package type.+aggregationResponse_packageAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe PackageAggregationResponse)+aggregationResponse_packageAggregation = Lens.lens (\AggregationResponse' {packageAggregation} -> packageAggregation) (\s@AggregationResponse' {} a -> s {packageAggregation = a} :: AggregationResponse)++-- | An object that contains details about an aggregation response based on+-- Amazon ECR repositories.+aggregationResponse_repositoryAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe RepositoryAggregationResponse)+aggregationResponse_repositoryAggregation = Lens.lens (\AggregationResponse' {repositoryAggregation} -> repositoryAggregation) (\s@AggregationResponse' {} a -> s {repositoryAggregation = a} :: AggregationResponse)++-- | An object that contains details about an aggregation response based on+-- finding title.+aggregationResponse_titleAggregation :: Lens.Lens' AggregationResponse (Prelude.Maybe TitleAggregationResponse)+aggregationResponse_titleAggregation = Lens.lens (\AggregationResponse' {titleAggregation} -> titleAggregation) (\s@AggregationResponse' {} a -> s {titleAggregation = a} :: AggregationResponse)++instance Data.FromJSON AggregationResponse where+ parseJSON =+ Data.withObject+ "AggregationResponse"+ ( \x ->+ AggregationResponse'+ Prelude.<$> (x Data..:? "accountAggregation")+ Prelude.<*> (x Data..:? "amiAggregation")+ Prelude.<*> (x Data..:? "awsEcrContainerAggregation")+ Prelude.<*> (x Data..:? "ec2InstanceAggregation")+ Prelude.<*> (x Data..:? "findingTypeAggregation")+ Prelude.<*> (x Data..:? "imageLayerAggregation")+ Prelude.<*> (x Data..:? "lambdaFunctionAggregation")+ Prelude.<*> (x Data..:? "lambdaLayerAggregation")+ Prelude.<*> (x Data..:? "packageAggregation")+ Prelude.<*> (x Data..:? "repositoryAggregation")+ Prelude.<*> (x Data..:? "titleAggregation")+ )++instance Prelude.Hashable AggregationResponse where+ hashWithSalt _salt AggregationResponse' {..} =+ _salt+ `Prelude.hashWithSalt` accountAggregation+ `Prelude.hashWithSalt` amiAggregation+ `Prelude.hashWithSalt` awsEcrContainerAggregation+ `Prelude.hashWithSalt` ec2InstanceAggregation+ `Prelude.hashWithSalt` findingTypeAggregation+ `Prelude.hashWithSalt` imageLayerAggregation+ `Prelude.hashWithSalt` lambdaFunctionAggregation+ `Prelude.hashWithSalt` lambdaLayerAggregation+ `Prelude.hashWithSalt` packageAggregation+ `Prelude.hashWithSalt` repositoryAggregation+ `Prelude.hashWithSalt` titleAggregation++instance Prelude.NFData AggregationResponse where+ rnf AggregationResponse' {..} =+ Prelude.rnf accountAggregation+ `Prelude.seq` Prelude.rnf amiAggregation+ `Prelude.seq` Prelude.rnf awsEcrContainerAggregation+ `Prelude.seq` Prelude.rnf ec2InstanceAggregation+ `Prelude.seq` Prelude.rnf findingTypeAggregation+ `Prelude.seq` Prelude.rnf imageLayerAggregation+ `Prelude.seq` Prelude.rnf lambdaFunctionAggregation+ `Prelude.seq` Prelude.rnf lambdaLayerAggregation+ `Prelude.seq` Prelude.rnf packageAggregation+ `Prelude.seq` Prelude.rnf repositoryAggregation+ `Prelude.seq` Prelude.rnf titleAggregation
+ gen/Amazonka/Inspector2/Types/AggregationType.hs view
@@ -0,0 +1,116 @@+{-# 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.Inspector2.Types.AggregationType+-- 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.Inspector2.Types.AggregationType+ ( AggregationType+ ( ..,+ AggregationType_ACCOUNT,+ AggregationType_AMI,+ AggregationType_AWS_EC2_INSTANCE,+ AggregationType_AWS_ECR_CONTAINER,+ AggregationType_AWS_LAMBDA_FUNCTION,+ AggregationType_FINDING_TYPE,+ AggregationType_IMAGE_LAYER,+ AggregationType_LAMBDA_LAYER,+ AggregationType_PACKAGE,+ AggregationType_REPOSITORY,+ AggregationType_TITLE+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype AggregationType = AggregationType'+ { fromAggregationType ::+ 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 AggregationType_ACCOUNT :: AggregationType+pattern AggregationType_ACCOUNT = AggregationType' "ACCOUNT"++pattern AggregationType_AMI :: AggregationType+pattern AggregationType_AMI = AggregationType' "AMI"++pattern AggregationType_AWS_EC2_INSTANCE :: AggregationType+pattern AggregationType_AWS_EC2_INSTANCE = AggregationType' "AWS_EC2_INSTANCE"++pattern AggregationType_AWS_ECR_CONTAINER :: AggregationType+pattern AggregationType_AWS_ECR_CONTAINER = AggregationType' "AWS_ECR_CONTAINER"++pattern AggregationType_AWS_LAMBDA_FUNCTION :: AggregationType+pattern AggregationType_AWS_LAMBDA_FUNCTION = AggregationType' "AWS_LAMBDA_FUNCTION"++pattern AggregationType_FINDING_TYPE :: AggregationType+pattern AggregationType_FINDING_TYPE = AggregationType' "FINDING_TYPE"++pattern AggregationType_IMAGE_LAYER :: AggregationType+pattern AggregationType_IMAGE_LAYER = AggregationType' "IMAGE_LAYER"++pattern AggregationType_LAMBDA_LAYER :: AggregationType+pattern AggregationType_LAMBDA_LAYER = AggregationType' "LAMBDA_LAYER"++pattern AggregationType_PACKAGE :: AggregationType+pattern AggregationType_PACKAGE = AggregationType' "PACKAGE"++pattern AggregationType_REPOSITORY :: AggregationType+pattern AggregationType_REPOSITORY = AggregationType' "REPOSITORY"++pattern AggregationType_TITLE :: AggregationType+pattern AggregationType_TITLE = AggregationType' "TITLE"++{-# COMPLETE+ AggregationType_ACCOUNT,+ AggregationType_AMI,+ AggregationType_AWS_EC2_INSTANCE,+ AggregationType_AWS_ECR_CONTAINER,+ AggregationType_AWS_LAMBDA_FUNCTION,+ AggregationType_FINDING_TYPE,+ AggregationType_IMAGE_LAYER,+ AggregationType_LAMBDA_LAYER,+ AggregationType_PACKAGE,+ AggregationType_REPOSITORY,+ AggregationType_TITLE,+ AggregationType'+ #-}
+ gen/Amazonka/Inspector2/Types/AmiAggregation.hs view
@@ -0,0 +1,99 @@+{-# 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.Inspector2.Types.AmiAggregation+-- 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.Inspector2.Types.AmiAggregation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.AmiSortBy+import Amazonka.Inspector2.Types.SortOrder+import Amazonka.Inspector2.Types.StringFilter+import qualified Amazonka.Prelude as Prelude++-- | The details that define an aggregation based on Amazon machine images+-- (AMIs).+--+-- /See:/ 'newAmiAggregation' smart constructor.+data AmiAggregation = AmiAggregation'+ { -- | The IDs of AMIs to aggregate findings for.+ amis :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The value to sort results by.+ sortBy :: Prelude.Maybe AmiSortBy,+ -- | The order to sort results by.+ sortOrder :: Prelude.Maybe SortOrder+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AmiAggregation' 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:+--+-- 'amis', 'amiAggregation_amis' - The IDs of AMIs to aggregate findings for.+--+-- 'sortBy', 'amiAggregation_sortBy' - The value to sort results by.+--+-- 'sortOrder', 'amiAggregation_sortOrder' - The order to sort results by.+newAmiAggregation ::+ AmiAggregation+newAmiAggregation =+ AmiAggregation'+ { amis = Prelude.Nothing,+ sortBy = Prelude.Nothing,+ sortOrder = Prelude.Nothing+ }++-- | The IDs of AMIs to aggregate findings for.+amiAggregation_amis :: Lens.Lens' AmiAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+amiAggregation_amis = Lens.lens (\AmiAggregation' {amis} -> amis) (\s@AmiAggregation' {} a -> s {amis = a} :: AmiAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The value to sort results by.+amiAggregation_sortBy :: Lens.Lens' AmiAggregation (Prelude.Maybe AmiSortBy)+amiAggregation_sortBy = Lens.lens (\AmiAggregation' {sortBy} -> sortBy) (\s@AmiAggregation' {} a -> s {sortBy = a} :: AmiAggregation)++-- | The order to sort results by.+amiAggregation_sortOrder :: Lens.Lens' AmiAggregation (Prelude.Maybe SortOrder)+amiAggregation_sortOrder = Lens.lens (\AmiAggregation' {sortOrder} -> sortOrder) (\s@AmiAggregation' {} a -> s {sortOrder = a} :: AmiAggregation)++instance Prelude.Hashable AmiAggregation where+ hashWithSalt _salt AmiAggregation' {..} =+ _salt+ `Prelude.hashWithSalt` amis+ `Prelude.hashWithSalt` sortBy+ `Prelude.hashWithSalt` sortOrder++instance Prelude.NFData AmiAggregation where+ rnf AmiAggregation' {..} =+ Prelude.rnf amis+ `Prelude.seq` Prelude.rnf sortBy+ `Prelude.seq` Prelude.rnf sortOrder++instance Data.ToJSON AmiAggregation where+ toJSON AmiAggregation' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("amis" Data..=) Prelude.<$> amis,+ ("sortBy" Data..=) Prelude.<$> sortBy,+ ("sortOrder" Data..=) Prelude.<$> sortOrder+ ]+ )
+ gen/Amazonka/Inspector2/Types/AmiAggregationResponse.hs view
@@ -0,0 +1,112 @@+{-# 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.Inspector2.Types.AmiAggregationResponse+-- 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.Inspector2.Types.AmiAggregationResponse where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.SeverityCounts+import qualified Amazonka.Prelude as Prelude++-- | A response that contains the results of a finding aggregation by AMI.+--+-- /See:/ 'newAmiAggregationResponse' smart constructor.+data AmiAggregationResponse = AmiAggregationResponse'+ { -- | The Amazon Web Services account ID for the AMI.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | The IDs of Amazon EC2 instances using this AMI.+ affectedInstances :: Prelude.Maybe Prelude.Integer,+ -- | An object that contains the count of matched findings per severity.+ severityCounts :: Prelude.Maybe SeverityCounts,+ -- | The ID of the AMI that findings were aggregated for.+ ami :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AmiAggregationResponse' 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', 'amiAggregationResponse_accountId' - The Amazon Web Services account ID for the AMI.+--+-- 'affectedInstances', 'amiAggregationResponse_affectedInstances' - The IDs of Amazon EC2 instances using this AMI.+--+-- 'severityCounts', 'amiAggregationResponse_severityCounts' - An object that contains the count of matched findings per severity.+--+-- 'ami', 'amiAggregationResponse_ami' - The ID of the AMI that findings were aggregated for.+newAmiAggregationResponse ::+ -- | 'ami'+ Prelude.Text ->+ AmiAggregationResponse+newAmiAggregationResponse pAmi_ =+ AmiAggregationResponse'+ { accountId =+ Prelude.Nothing,+ affectedInstances = Prelude.Nothing,+ severityCounts = Prelude.Nothing,+ ami = pAmi_+ }++-- | The Amazon Web Services account ID for the AMI.+amiAggregationResponse_accountId :: Lens.Lens' AmiAggregationResponse (Prelude.Maybe Prelude.Text)+amiAggregationResponse_accountId = Lens.lens (\AmiAggregationResponse' {accountId} -> accountId) (\s@AmiAggregationResponse' {} a -> s {accountId = a} :: AmiAggregationResponse)++-- | The IDs of Amazon EC2 instances using this AMI.+amiAggregationResponse_affectedInstances :: Lens.Lens' AmiAggregationResponse (Prelude.Maybe Prelude.Integer)+amiAggregationResponse_affectedInstances = Lens.lens (\AmiAggregationResponse' {affectedInstances} -> affectedInstances) (\s@AmiAggregationResponse' {} a -> s {affectedInstances = a} :: AmiAggregationResponse)++-- | An object that contains the count of matched findings per severity.+amiAggregationResponse_severityCounts :: Lens.Lens' AmiAggregationResponse (Prelude.Maybe SeverityCounts)+amiAggregationResponse_severityCounts = Lens.lens (\AmiAggregationResponse' {severityCounts} -> severityCounts) (\s@AmiAggregationResponse' {} a -> s {severityCounts = a} :: AmiAggregationResponse)++-- | The ID of the AMI that findings were aggregated for.+amiAggregationResponse_ami :: Lens.Lens' AmiAggregationResponse Prelude.Text+amiAggregationResponse_ami = Lens.lens (\AmiAggregationResponse' {ami} -> ami) (\s@AmiAggregationResponse' {} a -> s {ami = a} :: AmiAggregationResponse)++instance Data.FromJSON AmiAggregationResponse where+ parseJSON =+ Data.withObject+ "AmiAggregationResponse"+ ( \x ->+ AmiAggregationResponse'+ Prelude.<$> (x Data..:? "accountId")+ Prelude.<*> (x Data..:? "affectedInstances")+ Prelude.<*> (x Data..:? "severityCounts")+ Prelude.<*> (x Data..: "ami")+ )++instance Prelude.Hashable AmiAggregationResponse where+ hashWithSalt _salt AmiAggregationResponse' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` affectedInstances+ `Prelude.hashWithSalt` severityCounts+ `Prelude.hashWithSalt` ami++instance Prelude.NFData AmiAggregationResponse where+ rnf AmiAggregationResponse' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf affectedInstances+ `Prelude.seq` Prelude.rnf severityCounts+ `Prelude.seq` Prelude.rnf ami
+ gen/Amazonka/Inspector2/Types/AmiSortBy.hs view
@@ -0,0 +1,81 @@+{-# 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.Inspector2.Types.AmiSortBy+-- 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.Inspector2.Types.AmiSortBy+ ( AmiSortBy+ ( ..,+ AmiSortBy_AFFECTED_INSTANCES,+ AmiSortBy_ALL,+ AmiSortBy_CRITICAL,+ AmiSortBy_HIGH+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype AmiSortBy = AmiSortBy'+ { fromAmiSortBy ::+ 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 AmiSortBy_AFFECTED_INSTANCES :: AmiSortBy+pattern AmiSortBy_AFFECTED_INSTANCES = AmiSortBy' "AFFECTED_INSTANCES"++pattern AmiSortBy_ALL :: AmiSortBy+pattern AmiSortBy_ALL = AmiSortBy' "ALL"++pattern AmiSortBy_CRITICAL :: AmiSortBy+pattern AmiSortBy_CRITICAL = AmiSortBy' "CRITICAL"++pattern AmiSortBy_HIGH :: AmiSortBy+pattern AmiSortBy_HIGH = AmiSortBy' "HIGH"++{-# COMPLETE+ AmiSortBy_AFFECTED_INSTANCES,+ AmiSortBy_ALL,+ AmiSortBy_CRITICAL,+ AmiSortBy_HIGH,+ AmiSortBy'+ #-}
+ gen/Amazonka/Inspector2/Types/Architecture.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.Inspector2.Types.Architecture+-- 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.Inspector2.Types.Architecture+ ( Architecture+ ( ..,+ Architecture_ARM64,+ Architecture_X86_64+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype Architecture = Architecture'+ { fromArchitecture ::+ 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 Architecture_ARM64 :: Architecture+pattern Architecture_ARM64 = Architecture' "ARM64"++pattern Architecture_X86_64 :: Architecture+pattern Architecture_X86_64 = Architecture' "X86_64"++{-# COMPLETE+ Architecture_ARM64,+ Architecture_X86_64,+ Architecture'+ #-}
+ gen/Amazonka/Inspector2/Types/AutoEnable.hs view
@@ -0,0 +1,120 @@+{-# 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.Inspector2.Types.AutoEnable+-- 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.Inspector2.Types.AutoEnable 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++-- | Represents which scan types are automatically enabled for new members of+-- your Amazon Inspector organization.+--+-- /See:/ 'newAutoEnable' smart constructor.+data AutoEnable = AutoEnable'+ { -- | Represents whether AWS Lambda scans are automatically enabled for new+ -- members of your Amazon Inspector organization.+ lambda :: Prelude.Maybe Prelude.Bool,+ -- | Represents whether Amazon EC2 scans are automatically enabled for new+ -- members of your Amazon Inspector organization.+ ec2 :: Prelude.Bool,+ -- | Represents whether Amazon ECR scans are automatically enabled for new+ -- members of your Amazon Inspector organization.+ ecr :: Prelude.Bool+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AutoEnable' 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:+--+-- 'lambda', 'autoEnable_lambda' - Represents whether AWS Lambda scans are automatically enabled for new+-- members of your Amazon Inspector organization.+--+-- 'ec2', 'autoEnable_ec2' - Represents whether Amazon EC2 scans are automatically enabled for new+-- members of your Amazon Inspector organization.+--+-- 'ecr', 'autoEnable_ecr' - Represents whether Amazon ECR scans are automatically enabled for new+-- members of your Amazon Inspector organization.+newAutoEnable ::+ -- | 'ec2'+ Prelude.Bool ->+ -- | 'ecr'+ Prelude.Bool ->+ AutoEnable+newAutoEnable pEc2_ pEcr_ =+ AutoEnable'+ { lambda = Prelude.Nothing,+ ec2 = pEc2_,+ ecr = pEcr_+ }++-- | Represents whether AWS Lambda scans are automatically enabled for new+-- members of your Amazon Inspector organization.+autoEnable_lambda :: Lens.Lens' AutoEnable (Prelude.Maybe Prelude.Bool)+autoEnable_lambda = Lens.lens (\AutoEnable' {lambda} -> lambda) (\s@AutoEnable' {} a -> s {lambda = a} :: AutoEnable)++-- | Represents whether Amazon EC2 scans are automatically enabled for new+-- members of your Amazon Inspector organization.+autoEnable_ec2 :: Lens.Lens' AutoEnable Prelude.Bool+autoEnable_ec2 = Lens.lens (\AutoEnable' {ec2} -> ec2) (\s@AutoEnable' {} a -> s {ec2 = a} :: AutoEnable)++-- | Represents whether Amazon ECR scans are automatically enabled for new+-- members of your Amazon Inspector organization.+autoEnable_ecr :: Lens.Lens' AutoEnable Prelude.Bool+autoEnable_ecr = Lens.lens (\AutoEnable' {ecr} -> ecr) (\s@AutoEnable' {} a -> s {ecr = a} :: AutoEnable)++instance Data.FromJSON AutoEnable where+ parseJSON =+ Data.withObject+ "AutoEnable"+ ( \x ->+ AutoEnable'+ Prelude.<$> (x Data..:? "lambda")+ Prelude.<*> (x Data..: "ec2")+ Prelude.<*> (x Data..: "ecr")+ )++instance Prelude.Hashable AutoEnable where+ hashWithSalt _salt AutoEnable' {..} =+ _salt+ `Prelude.hashWithSalt` lambda+ `Prelude.hashWithSalt` ec2+ `Prelude.hashWithSalt` ecr++instance Prelude.NFData AutoEnable where+ rnf AutoEnable' {..} =+ Prelude.rnf lambda+ `Prelude.seq` Prelude.rnf ec2+ `Prelude.seq` Prelude.rnf ecr++instance Data.ToJSON AutoEnable where+ toJSON AutoEnable' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("lambda" Data..=) Prelude.<$> lambda,+ Prelude.Just ("ec2" Data..= ec2),+ Prelude.Just ("ecr" Data..= ecr)+ ]+ )
+ gen/Amazonka/Inspector2/Types/AwsEc2InstanceDetails.hs view
@@ -0,0 +1,181 @@+{-# 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.Inspector2.Types.AwsEc2InstanceDetails+-- 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.Inspector2.Types.AwsEc2InstanceDetails 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 of the Amazon EC2 instance involved in a finding.+--+-- /See:/ 'newAwsEc2InstanceDetails' smart constructor.+data AwsEc2InstanceDetails = AwsEc2InstanceDetails'+ { -- | The IAM instance profile ARN of the Amazon EC2 instance.+ iamInstanceProfileArn :: Prelude.Maybe Prelude.Text,+ -- | The image ID of the Amazon EC2 instance.+ imageId :: Prelude.Maybe Prelude.Text,+ -- | The IPv4 addresses of the Amazon EC2 instance.+ ipV4Addresses :: Prelude.Maybe [Prelude.Text],+ -- | The IPv6 addresses of the Amazon EC2 instance.+ ipV6Addresses :: Prelude.Maybe [Prelude.Text],+ -- | The name of the key pair used to launch the Amazon EC2 instance.+ keyName :: Prelude.Maybe Prelude.Text,+ -- | The date and time the Amazon EC2 instance was launched at.+ launchedAt :: Prelude.Maybe Data.POSIX,+ -- | The platform of the Amazon EC2 instance.+ platform :: Prelude.Maybe Prelude.Text,+ -- | The subnet ID of the Amazon EC2 instance.+ subnetId :: Prelude.Maybe Prelude.Text,+ -- | The type of the Amazon EC2 instance.+ type' :: Prelude.Maybe Prelude.Text,+ -- | The VPC ID of the Amazon EC2 instance.+ vpcId :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AwsEc2InstanceDetails' 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:+--+-- 'iamInstanceProfileArn', 'awsEc2InstanceDetails_iamInstanceProfileArn' - The IAM instance profile ARN of the Amazon EC2 instance.+--+-- 'imageId', 'awsEc2InstanceDetails_imageId' - The image ID of the Amazon EC2 instance.+--+-- 'ipV4Addresses', 'awsEc2InstanceDetails_ipV4Addresses' - The IPv4 addresses of the Amazon EC2 instance.+--+-- 'ipV6Addresses', 'awsEc2InstanceDetails_ipV6Addresses' - The IPv6 addresses of the Amazon EC2 instance.+--+-- 'keyName', 'awsEc2InstanceDetails_keyName' - The name of the key pair used to launch the Amazon EC2 instance.+--+-- 'launchedAt', 'awsEc2InstanceDetails_launchedAt' - The date and time the Amazon EC2 instance was launched at.+--+-- 'platform', 'awsEc2InstanceDetails_platform' - The platform of the Amazon EC2 instance.+--+-- 'subnetId', 'awsEc2InstanceDetails_subnetId' - The subnet ID of the Amazon EC2 instance.+--+-- 'type'', 'awsEc2InstanceDetails_type' - The type of the Amazon EC2 instance.+--+-- 'vpcId', 'awsEc2InstanceDetails_vpcId' - The VPC ID of the Amazon EC2 instance.+newAwsEc2InstanceDetails ::+ AwsEc2InstanceDetails+newAwsEc2InstanceDetails =+ AwsEc2InstanceDetails'+ { iamInstanceProfileArn =+ Prelude.Nothing,+ imageId = Prelude.Nothing,+ ipV4Addresses = Prelude.Nothing,+ ipV6Addresses = Prelude.Nothing,+ keyName = Prelude.Nothing,+ launchedAt = Prelude.Nothing,+ platform = Prelude.Nothing,+ subnetId = Prelude.Nothing,+ type' = Prelude.Nothing,+ vpcId = Prelude.Nothing+ }++-- | The IAM instance profile ARN of the Amazon EC2 instance.+awsEc2InstanceDetails_iamInstanceProfileArn :: Lens.Lens' AwsEc2InstanceDetails (Prelude.Maybe Prelude.Text)+awsEc2InstanceDetails_iamInstanceProfileArn = Lens.lens (\AwsEc2InstanceDetails' {iamInstanceProfileArn} -> iamInstanceProfileArn) (\s@AwsEc2InstanceDetails' {} a -> s {iamInstanceProfileArn = a} :: AwsEc2InstanceDetails)++-- | The image ID of the Amazon EC2 instance.+awsEc2InstanceDetails_imageId :: Lens.Lens' AwsEc2InstanceDetails (Prelude.Maybe Prelude.Text)+awsEc2InstanceDetails_imageId = Lens.lens (\AwsEc2InstanceDetails' {imageId} -> imageId) (\s@AwsEc2InstanceDetails' {} a -> s {imageId = a} :: AwsEc2InstanceDetails)++-- | The IPv4 addresses of the Amazon EC2 instance.+awsEc2InstanceDetails_ipV4Addresses :: Lens.Lens' AwsEc2InstanceDetails (Prelude.Maybe [Prelude.Text])+awsEc2InstanceDetails_ipV4Addresses = Lens.lens (\AwsEc2InstanceDetails' {ipV4Addresses} -> ipV4Addresses) (\s@AwsEc2InstanceDetails' {} a -> s {ipV4Addresses = a} :: AwsEc2InstanceDetails) Prelude.. Lens.mapping Lens.coerced++-- | The IPv6 addresses of the Amazon EC2 instance.+awsEc2InstanceDetails_ipV6Addresses :: Lens.Lens' AwsEc2InstanceDetails (Prelude.Maybe [Prelude.Text])+awsEc2InstanceDetails_ipV6Addresses = Lens.lens (\AwsEc2InstanceDetails' {ipV6Addresses} -> ipV6Addresses) (\s@AwsEc2InstanceDetails' {} a -> s {ipV6Addresses = a} :: AwsEc2InstanceDetails) Prelude.. Lens.mapping Lens.coerced++-- | The name of the key pair used to launch the Amazon EC2 instance.+awsEc2InstanceDetails_keyName :: Lens.Lens' AwsEc2InstanceDetails (Prelude.Maybe Prelude.Text)+awsEc2InstanceDetails_keyName = Lens.lens (\AwsEc2InstanceDetails' {keyName} -> keyName) (\s@AwsEc2InstanceDetails' {} a -> s {keyName = a} :: AwsEc2InstanceDetails)++-- | The date and time the Amazon EC2 instance was launched at.+awsEc2InstanceDetails_launchedAt :: Lens.Lens' AwsEc2InstanceDetails (Prelude.Maybe Prelude.UTCTime)+awsEc2InstanceDetails_launchedAt = Lens.lens (\AwsEc2InstanceDetails' {launchedAt} -> launchedAt) (\s@AwsEc2InstanceDetails' {} a -> s {launchedAt = a} :: AwsEc2InstanceDetails) Prelude.. Lens.mapping Data._Time++-- | The platform of the Amazon EC2 instance.+awsEc2InstanceDetails_platform :: Lens.Lens' AwsEc2InstanceDetails (Prelude.Maybe Prelude.Text)+awsEc2InstanceDetails_platform = Lens.lens (\AwsEc2InstanceDetails' {platform} -> platform) (\s@AwsEc2InstanceDetails' {} a -> s {platform = a} :: AwsEc2InstanceDetails)++-- | The subnet ID of the Amazon EC2 instance.+awsEc2InstanceDetails_subnetId :: Lens.Lens' AwsEc2InstanceDetails (Prelude.Maybe Prelude.Text)+awsEc2InstanceDetails_subnetId = Lens.lens (\AwsEc2InstanceDetails' {subnetId} -> subnetId) (\s@AwsEc2InstanceDetails' {} a -> s {subnetId = a} :: AwsEc2InstanceDetails)++-- | The type of the Amazon EC2 instance.+awsEc2InstanceDetails_type :: Lens.Lens' AwsEc2InstanceDetails (Prelude.Maybe Prelude.Text)+awsEc2InstanceDetails_type = Lens.lens (\AwsEc2InstanceDetails' {type'} -> type') (\s@AwsEc2InstanceDetails' {} a -> s {type' = a} :: AwsEc2InstanceDetails)++-- | The VPC ID of the Amazon EC2 instance.+awsEc2InstanceDetails_vpcId :: Lens.Lens' AwsEc2InstanceDetails (Prelude.Maybe Prelude.Text)+awsEc2InstanceDetails_vpcId = Lens.lens (\AwsEc2InstanceDetails' {vpcId} -> vpcId) (\s@AwsEc2InstanceDetails' {} a -> s {vpcId = a} :: AwsEc2InstanceDetails)++instance Data.FromJSON AwsEc2InstanceDetails where+ parseJSON =+ Data.withObject+ "AwsEc2InstanceDetails"+ ( \x ->+ AwsEc2InstanceDetails'+ Prelude.<$> (x Data..:? "iamInstanceProfileArn")+ Prelude.<*> (x Data..:? "imageId")+ Prelude.<*> (x Data..:? "ipV4Addresses" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "ipV6Addresses" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "keyName")+ Prelude.<*> (x Data..:? "launchedAt")+ Prelude.<*> (x Data..:? "platform")+ Prelude.<*> (x Data..:? "subnetId")+ Prelude.<*> (x Data..:? "type")+ Prelude.<*> (x Data..:? "vpcId")+ )++instance Prelude.Hashable AwsEc2InstanceDetails where+ hashWithSalt _salt AwsEc2InstanceDetails' {..} =+ _salt+ `Prelude.hashWithSalt` iamInstanceProfileArn+ `Prelude.hashWithSalt` imageId+ `Prelude.hashWithSalt` ipV4Addresses+ `Prelude.hashWithSalt` ipV6Addresses+ `Prelude.hashWithSalt` keyName+ `Prelude.hashWithSalt` launchedAt+ `Prelude.hashWithSalt` platform+ `Prelude.hashWithSalt` subnetId+ `Prelude.hashWithSalt` type'+ `Prelude.hashWithSalt` vpcId++instance Prelude.NFData AwsEc2InstanceDetails where+ rnf AwsEc2InstanceDetails' {..} =+ Prelude.rnf iamInstanceProfileArn+ `Prelude.seq` Prelude.rnf imageId+ `Prelude.seq` Prelude.rnf ipV4Addresses+ `Prelude.seq` Prelude.rnf ipV6Addresses+ `Prelude.seq` Prelude.rnf keyName+ `Prelude.seq` Prelude.rnf launchedAt+ `Prelude.seq` Prelude.rnf platform+ `Prelude.seq` Prelude.rnf subnetId+ `Prelude.seq` Prelude.rnf type'+ `Prelude.seq` Prelude.rnf vpcId
+ gen/Amazonka/Inspector2/Types/AwsEcrContainerAggregation.hs view
@@ -0,0 +1,147 @@+{-# 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.Inspector2.Types.AwsEcrContainerAggregation+-- 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.Inspector2.Types.AwsEcrContainerAggregation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.AwsEcrContainerSortBy+import Amazonka.Inspector2.Types.SortOrder+import Amazonka.Inspector2.Types.StringFilter+import qualified Amazonka.Prelude as Prelude++-- | An aggregation of information about Amazon ECR containers.+--+-- /See:/ 'newAwsEcrContainerAggregation' smart constructor.+data AwsEcrContainerAggregation = AwsEcrContainerAggregation'+ { -- | The architecture of the containers.+ architectures :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The image SHA values.+ imageShas :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The image tags.+ imageTags :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The container repositories.+ repositories :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The container resource IDs.+ resourceIds :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The value to sort by.+ sortBy :: Prelude.Maybe AwsEcrContainerSortBy,+ -- | The sort order (ascending or descending).+ sortOrder :: Prelude.Maybe SortOrder+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AwsEcrContainerAggregation' 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:+--+-- 'architectures', 'awsEcrContainerAggregation_architectures' - The architecture of the containers.+--+-- 'imageShas', 'awsEcrContainerAggregation_imageShas' - The image SHA values.+--+-- 'imageTags', 'awsEcrContainerAggregation_imageTags' - The image tags.+--+-- 'repositories', 'awsEcrContainerAggregation_repositories' - The container repositories.+--+-- 'resourceIds', 'awsEcrContainerAggregation_resourceIds' - The container resource IDs.+--+-- 'sortBy', 'awsEcrContainerAggregation_sortBy' - The value to sort by.+--+-- 'sortOrder', 'awsEcrContainerAggregation_sortOrder' - The sort order (ascending or descending).+newAwsEcrContainerAggregation ::+ AwsEcrContainerAggregation+newAwsEcrContainerAggregation =+ AwsEcrContainerAggregation'+ { architectures =+ Prelude.Nothing,+ imageShas = Prelude.Nothing,+ imageTags = Prelude.Nothing,+ repositories = Prelude.Nothing,+ resourceIds = Prelude.Nothing,+ sortBy = Prelude.Nothing,+ sortOrder = Prelude.Nothing+ }++-- | The architecture of the containers.+awsEcrContainerAggregation_architectures :: Lens.Lens' AwsEcrContainerAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+awsEcrContainerAggregation_architectures = Lens.lens (\AwsEcrContainerAggregation' {architectures} -> architectures) (\s@AwsEcrContainerAggregation' {} a -> s {architectures = a} :: AwsEcrContainerAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The image SHA values.+awsEcrContainerAggregation_imageShas :: Lens.Lens' AwsEcrContainerAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+awsEcrContainerAggregation_imageShas = Lens.lens (\AwsEcrContainerAggregation' {imageShas} -> imageShas) (\s@AwsEcrContainerAggregation' {} a -> s {imageShas = a} :: AwsEcrContainerAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The image tags.+awsEcrContainerAggregation_imageTags :: Lens.Lens' AwsEcrContainerAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+awsEcrContainerAggregation_imageTags = Lens.lens (\AwsEcrContainerAggregation' {imageTags} -> imageTags) (\s@AwsEcrContainerAggregation' {} a -> s {imageTags = a} :: AwsEcrContainerAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The container repositories.+awsEcrContainerAggregation_repositories :: Lens.Lens' AwsEcrContainerAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+awsEcrContainerAggregation_repositories = Lens.lens (\AwsEcrContainerAggregation' {repositories} -> repositories) (\s@AwsEcrContainerAggregation' {} a -> s {repositories = a} :: AwsEcrContainerAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The container resource IDs.+awsEcrContainerAggregation_resourceIds :: Lens.Lens' AwsEcrContainerAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+awsEcrContainerAggregation_resourceIds = Lens.lens (\AwsEcrContainerAggregation' {resourceIds} -> resourceIds) (\s@AwsEcrContainerAggregation' {} a -> s {resourceIds = a} :: AwsEcrContainerAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The value to sort by.+awsEcrContainerAggregation_sortBy :: Lens.Lens' AwsEcrContainerAggregation (Prelude.Maybe AwsEcrContainerSortBy)+awsEcrContainerAggregation_sortBy = Lens.lens (\AwsEcrContainerAggregation' {sortBy} -> sortBy) (\s@AwsEcrContainerAggregation' {} a -> s {sortBy = a} :: AwsEcrContainerAggregation)++-- | The sort order (ascending or descending).+awsEcrContainerAggregation_sortOrder :: Lens.Lens' AwsEcrContainerAggregation (Prelude.Maybe SortOrder)+awsEcrContainerAggregation_sortOrder = Lens.lens (\AwsEcrContainerAggregation' {sortOrder} -> sortOrder) (\s@AwsEcrContainerAggregation' {} a -> s {sortOrder = a} :: AwsEcrContainerAggregation)++instance Prelude.Hashable AwsEcrContainerAggregation where+ hashWithSalt _salt AwsEcrContainerAggregation' {..} =+ _salt+ `Prelude.hashWithSalt` architectures+ `Prelude.hashWithSalt` imageShas+ `Prelude.hashWithSalt` imageTags+ `Prelude.hashWithSalt` repositories+ `Prelude.hashWithSalt` resourceIds+ `Prelude.hashWithSalt` sortBy+ `Prelude.hashWithSalt` sortOrder++instance Prelude.NFData AwsEcrContainerAggregation where+ rnf AwsEcrContainerAggregation' {..} =+ Prelude.rnf architectures+ `Prelude.seq` Prelude.rnf imageShas+ `Prelude.seq` Prelude.rnf imageTags+ `Prelude.seq` Prelude.rnf repositories+ `Prelude.seq` Prelude.rnf resourceIds+ `Prelude.seq` Prelude.rnf sortBy+ `Prelude.seq` Prelude.rnf sortOrder++instance Data.ToJSON AwsEcrContainerAggregation where+ toJSON AwsEcrContainerAggregation' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("architectures" Data..=) Prelude.<$> architectures,+ ("imageShas" Data..=) Prelude.<$> imageShas,+ ("imageTags" Data..=) Prelude.<$> imageTags,+ ("repositories" Data..=) Prelude.<$> repositories,+ ("resourceIds" Data..=) Prelude.<$> resourceIds,+ ("sortBy" Data..=) Prelude.<$> sortBy,+ ("sortOrder" Data..=) Prelude.<$> sortOrder+ ]+ )
+ gen/Amazonka/Inspector2/Types/AwsEcrContainerAggregationResponse.hs view
@@ -0,0 +1,162 @@+{-# 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.Inspector2.Types.AwsEcrContainerAggregationResponse+-- 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.Inspector2.Types.AwsEcrContainerAggregationResponse where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.SeverityCounts+import qualified Amazonka.Prelude as Prelude++-- | An aggregation of information about Amazon ECR containers.+--+-- /See:/ 'newAwsEcrContainerAggregationResponse' smart constructor.+data AwsEcrContainerAggregationResponse = AwsEcrContainerAggregationResponse'+ { -- | The Amazon Web Services account ID of the account that owns the+ -- container.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | The architecture of the container.+ architecture :: Prelude.Maybe Prelude.Text,+ -- | The SHA value of the container image.+ imageSha :: Prelude.Maybe Prelude.Text,+ -- | The container image stags.+ imageTags :: Prelude.Maybe [Prelude.Text],+ -- | The container repository.+ repository :: Prelude.Maybe Prelude.Text,+ -- | The number of finding by severity.+ severityCounts :: Prelude.Maybe SeverityCounts,+ -- | The resource ID of the container.+ resourceId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AwsEcrContainerAggregationResponse' 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', 'awsEcrContainerAggregationResponse_accountId' - The Amazon Web Services account ID of the account that owns the+-- container.+--+-- 'architecture', 'awsEcrContainerAggregationResponse_architecture' - The architecture of the container.+--+-- 'imageSha', 'awsEcrContainerAggregationResponse_imageSha' - The SHA value of the container image.+--+-- 'imageTags', 'awsEcrContainerAggregationResponse_imageTags' - The container image stags.+--+-- 'repository', 'awsEcrContainerAggregationResponse_repository' - The container repository.+--+-- 'severityCounts', 'awsEcrContainerAggregationResponse_severityCounts' - The number of finding by severity.+--+-- 'resourceId', 'awsEcrContainerAggregationResponse_resourceId' - The resource ID of the container.+newAwsEcrContainerAggregationResponse ::+ -- | 'resourceId'+ Prelude.Text ->+ AwsEcrContainerAggregationResponse+newAwsEcrContainerAggregationResponse pResourceId_ =+ AwsEcrContainerAggregationResponse'+ { accountId =+ Prelude.Nothing,+ architecture = Prelude.Nothing,+ imageSha = Prelude.Nothing,+ imageTags = Prelude.Nothing,+ repository = Prelude.Nothing,+ severityCounts = Prelude.Nothing,+ resourceId = pResourceId_+ }++-- | The Amazon Web Services account ID of the account that owns the+-- container.+awsEcrContainerAggregationResponse_accountId :: Lens.Lens' AwsEcrContainerAggregationResponse (Prelude.Maybe Prelude.Text)+awsEcrContainerAggregationResponse_accountId = Lens.lens (\AwsEcrContainerAggregationResponse' {accountId} -> accountId) (\s@AwsEcrContainerAggregationResponse' {} a -> s {accountId = a} :: AwsEcrContainerAggregationResponse)++-- | The architecture of the container.+awsEcrContainerAggregationResponse_architecture :: Lens.Lens' AwsEcrContainerAggregationResponse (Prelude.Maybe Prelude.Text)+awsEcrContainerAggregationResponse_architecture = Lens.lens (\AwsEcrContainerAggregationResponse' {architecture} -> architecture) (\s@AwsEcrContainerAggregationResponse' {} a -> s {architecture = a} :: AwsEcrContainerAggregationResponse)++-- | The SHA value of the container image.+awsEcrContainerAggregationResponse_imageSha :: Lens.Lens' AwsEcrContainerAggregationResponse (Prelude.Maybe Prelude.Text)+awsEcrContainerAggregationResponse_imageSha = Lens.lens (\AwsEcrContainerAggregationResponse' {imageSha} -> imageSha) (\s@AwsEcrContainerAggregationResponse' {} a -> s {imageSha = a} :: AwsEcrContainerAggregationResponse)++-- | The container image stags.+awsEcrContainerAggregationResponse_imageTags :: Lens.Lens' AwsEcrContainerAggregationResponse (Prelude.Maybe [Prelude.Text])+awsEcrContainerAggregationResponse_imageTags = Lens.lens (\AwsEcrContainerAggregationResponse' {imageTags} -> imageTags) (\s@AwsEcrContainerAggregationResponse' {} a -> s {imageTags = a} :: AwsEcrContainerAggregationResponse) Prelude.. Lens.mapping Lens.coerced++-- | The container repository.+awsEcrContainerAggregationResponse_repository :: Lens.Lens' AwsEcrContainerAggregationResponse (Prelude.Maybe Prelude.Text)+awsEcrContainerAggregationResponse_repository = Lens.lens (\AwsEcrContainerAggregationResponse' {repository} -> repository) (\s@AwsEcrContainerAggregationResponse' {} a -> s {repository = a} :: AwsEcrContainerAggregationResponse)++-- | The number of finding by severity.+awsEcrContainerAggregationResponse_severityCounts :: Lens.Lens' AwsEcrContainerAggregationResponse (Prelude.Maybe SeverityCounts)+awsEcrContainerAggregationResponse_severityCounts = Lens.lens (\AwsEcrContainerAggregationResponse' {severityCounts} -> severityCounts) (\s@AwsEcrContainerAggregationResponse' {} a -> s {severityCounts = a} :: AwsEcrContainerAggregationResponse)++-- | The resource ID of the container.+awsEcrContainerAggregationResponse_resourceId :: Lens.Lens' AwsEcrContainerAggregationResponse Prelude.Text+awsEcrContainerAggregationResponse_resourceId = Lens.lens (\AwsEcrContainerAggregationResponse' {resourceId} -> resourceId) (\s@AwsEcrContainerAggregationResponse' {} a -> s {resourceId = a} :: AwsEcrContainerAggregationResponse)++instance+ Data.FromJSON+ AwsEcrContainerAggregationResponse+ where+ parseJSON =+ Data.withObject+ "AwsEcrContainerAggregationResponse"+ ( \x ->+ AwsEcrContainerAggregationResponse'+ Prelude.<$> (x Data..:? "accountId")+ Prelude.<*> (x Data..:? "architecture")+ Prelude.<*> (x Data..:? "imageSha")+ Prelude.<*> (x Data..:? "imageTags" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "repository")+ Prelude.<*> (x Data..:? "severityCounts")+ Prelude.<*> (x Data..: "resourceId")+ )++instance+ Prelude.Hashable+ AwsEcrContainerAggregationResponse+ where+ hashWithSalt+ _salt+ AwsEcrContainerAggregationResponse' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` architecture+ `Prelude.hashWithSalt` imageSha+ `Prelude.hashWithSalt` imageTags+ `Prelude.hashWithSalt` repository+ `Prelude.hashWithSalt` severityCounts+ `Prelude.hashWithSalt` resourceId++instance+ Prelude.NFData+ AwsEcrContainerAggregationResponse+ where+ rnf AwsEcrContainerAggregationResponse' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf architecture+ `Prelude.seq` Prelude.rnf imageSha+ `Prelude.seq` Prelude.rnf imageTags+ `Prelude.seq` Prelude.rnf repository+ `Prelude.seq` Prelude.rnf severityCounts+ `Prelude.seq` Prelude.rnf resourceId
+ gen/Amazonka/Inspector2/Types/AwsEcrContainerImageDetails.hs view
@@ -0,0 +1,166 @@+{-# 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.Inspector2.Types.AwsEcrContainerImageDetails+-- 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.Inspector2.Types.AwsEcrContainerImageDetails 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++-- | The image details of the Amazon ECR container image.+--+-- /See:/ 'newAwsEcrContainerImageDetails' smart constructor.+data AwsEcrContainerImageDetails = AwsEcrContainerImageDetails'+ { -- | The architecture of the Amazon ECR container image.+ architecture :: Prelude.Maybe Prelude.Text,+ -- | The image author of the Amazon ECR container image.+ author :: Prelude.Maybe Prelude.Text,+ -- | The image tags attached to the Amazon ECR container image.+ imageTags :: Prelude.Maybe [Prelude.Text],+ -- | The platform of the Amazon ECR container image.+ platform :: Prelude.Maybe Prelude.Text,+ -- | The date and time the Amazon ECR container image was pushed.+ pushedAt :: Prelude.Maybe Data.POSIX,+ -- | The image hash of the Amazon ECR container image.+ imageHash :: Prelude.Text,+ -- | The registry for the Amazon ECR container image.+ registry :: Prelude.Text,+ -- | The name of the repository the Amazon ECR container image resides in.+ repositoryName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AwsEcrContainerImageDetails' 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:+--+-- 'architecture', 'awsEcrContainerImageDetails_architecture' - The architecture of the Amazon ECR container image.+--+-- 'author', 'awsEcrContainerImageDetails_author' - The image author of the Amazon ECR container image.+--+-- 'imageTags', 'awsEcrContainerImageDetails_imageTags' - The image tags attached to the Amazon ECR container image.+--+-- 'platform', 'awsEcrContainerImageDetails_platform' - The platform of the Amazon ECR container image.+--+-- 'pushedAt', 'awsEcrContainerImageDetails_pushedAt' - The date and time the Amazon ECR container image was pushed.+--+-- 'imageHash', 'awsEcrContainerImageDetails_imageHash' - The image hash of the Amazon ECR container image.+--+-- 'registry', 'awsEcrContainerImageDetails_registry' - The registry for the Amazon ECR container image.+--+-- 'repositoryName', 'awsEcrContainerImageDetails_repositoryName' - The name of the repository the Amazon ECR container image resides in.+newAwsEcrContainerImageDetails ::+ -- | 'imageHash'+ Prelude.Text ->+ -- | 'registry'+ Prelude.Text ->+ -- | 'repositoryName'+ Prelude.Text ->+ AwsEcrContainerImageDetails+newAwsEcrContainerImageDetails+ pImageHash_+ pRegistry_+ pRepositoryName_ =+ AwsEcrContainerImageDetails'+ { architecture =+ Prelude.Nothing,+ author = Prelude.Nothing,+ imageTags = Prelude.Nothing,+ platform = Prelude.Nothing,+ pushedAt = Prelude.Nothing,+ imageHash = pImageHash_,+ registry = pRegistry_,+ repositoryName = pRepositoryName_+ }++-- | The architecture of the Amazon ECR container image.+awsEcrContainerImageDetails_architecture :: Lens.Lens' AwsEcrContainerImageDetails (Prelude.Maybe Prelude.Text)+awsEcrContainerImageDetails_architecture = Lens.lens (\AwsEcrContainerImageDetails' {architecture} -> architecture) (\s@AwsEcrContainerImageDetails' {} a -> s {architecture = a} :: AwsEcrContainerImageDetails)++-- | The image author of the Amazon ECR container image.+awsEcrContainerImageDetails_author :: Lens.Lens' AwsEcrContainerImageDetails (Prelude.Maybe Prelude.Text)+awsEcrContainerImageDetails_author = Lens.lens (\AwsEcrContainerImageDetails' {author} -> author) (\s@AwsEcrContainerImageDetails' {} a -> s {author = a} :: AwsEcrContainerImageDetails)++-- | The image tags attached to the Amazon ECR container image.+awsEcrContainerImageDetails_imageTags :: Lens.Lens' AwsEcrContainerImageDetails (Prelude.Maybe [Prelude.Text])+awsEcrContainerImageDetails_imageTags = Lens.lens (\AwsEcrContainerImageDetails' {imageTags} -> imageTags) (\s@AwsEcrContainerImageDetails' {} a -> s {imageTags = a} :: AwsEcrContainerImageDetails) Prelude.. Lens.mapping Lens.coerced++-- | The platform of the Amazon ECR container image.+awsEcrContainerImageDetails_platform :: Lens.Lens' AwsEcrContainerImageDetails (Prelude.Maybe Prelude.Text)+awsEcrContainerImageDetails_platform = Lens.lens (\AwsEcrContainerImageDetails' {platform} -> platform) (\s@AwsEcrContainerImageDetails' {} a -> s {platform = a} :: AwsEcrContainerImageDetails)++-- | The date and time the Amazon ECR container image was pushed.+awsEcrContainerImageDetails_pushedAt :: Lens.Lens' AwsEcrContainerImageDetails (Prelude.Maybe Prelude.UTCTime)+awsEcrContainerImageDetails_pushedAt = Lens.lens (\AwsEcrContainerImageDetails' {pushedAt} -> pushedAt) (\s@AwsEcrContainerImageDetails' {} a -> s {pushedAt = a} :: AwsEcrContainerImageDetails) Prelude.. Lens.mapping Data._Time++-- | The image hash of the Amazon ECR container image.+awsEcrContainerImageDetails_imageHash :: Lens.Lens' AwsEcrContainerImageDetails Prelude.Text+awsEcrContainerImageDetails_imageHash = Lens.lens (\AwsEcrContainerImageDetails' {imageHash} -> imageHash) (\s@AwsEcrContainerImageDetails' {} a -> s {imageHash = a} :: AwsEcrContainerImageDetails)++-- | The registry for the Amazon ECR container image.+awsEcrContainerImageDetails_registry :: Lens.Lens' AwsEcrContainerImageDetails Prelude.Text+awsEcrContainerImageDetails_registry = Lens.lens (\AwsEcrContainerImageDetails' {registry} -> registry) (\s@AwsEcrContainerImageDetails' {} a -> s {registry = a} :: AwsEcrContainerImageDetails)++-- | The name of the repository the Amazon ECR container image resides in.+awsEcrContainerImageDetails_repositoryName :: Lens.Lens' AwsEcrContainerImageDetails Prelude.Text+awsEcrContainerImageDetails_repositoryName = Lens.lens (\AwsEcrContainerImageDetails' {repositoryName} -> repositoryName) (\s@AwsEcrContainerImageDetails' {} a -> s {repositoryName = a} :: AwsEcrContainerImageDetails)++instance Data.FromJSON AwsEcrContainerImageDetails where+ parseJSON =+ Data.withObject+ "AwsEcrContainerImageDetails"+ ( \x ->+ AwsEcrContainerImageDetails'+ Prelude.<$> (x Data..:? "architecture")+ Prelude.<*> (x Data..:? "author")+ Prelude.<*> (x Data..:? "imageTags" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "platform")+ Prelude.<*> (x Data..:? "pushedAt")+ Prelude.<*> (x Data..: "imageHash")+ Prelude.<*> (x Data..: "registry")+ Prelude.<*> (x Data..: "repositoryName")+ )++instance Prelude.Hashable AwsEcrContainerImageDetails where+ hashWithSalt _salt AwsEcrContainerImageDetails' {..} =+ _salt+ `Prelude.hashWithSalt` architecture+ `Prelude.hashWithSalt` author+ `Prelude.hashWithSalt` imageTags+ `Prelude.hashWithSalt` platform+ `Prelude.hashWithSalt` pushedAt+ `Prelude.hashWithSalt` imageHash+ `Prelude.hashWithSalt` registry+ `Prelude.hashWithSalt` repositoryName++instance Prelude.NFData AwsEcrContainerImageDetails where+ rnf AwsEcrContainerImageDetails' {..} =+ Prelude.rnf architecture+ `Prelude.seq` Prelude.rnf author+ `Prelude.seq` Prelude.rnf imageTags+ `Prelude.seq` Prelude.rnf platform+ `Prelude.seq` Prelude.rnf pushedAt+ `Prelude.seq` Prelude.rnf imageHash+ `Prelude.seq` Prelude.rnf registry+ `Prelude.seq` Prelude.rnf repositoryName
+ gen/Amazonka/Inspector2/Types/AwsEcrContainerSortBy.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.Inspector2.Types.AwsEcrContainerSortBy+-- 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.Inspector2.Types.AwsEcrContainerSortBy+ ( AwsEcrContainerSortBy+ ( ..,+ AwsEcrContainerSortBy_ALL,+ AwsEcrContainerSortBy_CRITICAL,+ AwsEcrContainerSortBy_HIGH+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype AwsEcrContainerSortBy = AwsEcrContainerSortBy'+ { fromAwsEcrContainerSortBy ::+ 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 AwsEcrContainerSortBy_ALL :: AwsEcrContainerSortBy+pattern AwsEcrContainerSortBy_ALL = AwsEcrContainerSortBy' "ALL"++pattern AwsEcrContainerSortBy_CRITICAL :: AwsEcrContainerSortBy+pattern AwsEcrContainerSortBy_CRITICAL = AwsEcrContainerSortBy' "CRITICAL"++pattern AwsEcrContainerSortBy_HIGH :: AwsEcrContainerSortBy+pattern AwsEcrContainerSortBy_HIGH = AwsEcrContainerSortBy' "HIGH"++{-# COMPLETE+ AwsEcrContainerSortBy_ALL,+ AwsEcrContainerSortBy_CRITICAL,+ AwsEcrContainerSortBy_HIGH,+ AwsEcrContainerSortBy'+ #-}
+ gen/Amazonka/Inspector2/Types/AwsLambdaFunctionDetails.hs view
@@ -0,0 +1,218 @@+{-# 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.Inspector2.Types.AwsLambdaFunctionDetails+-- 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.Inspector2.Types.AwsLambdaFunctionDetails where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.Architecture+import Amazonka.Inspector2.Types.LambdaVpcConfig+import Amazonka.Inspector2.Types.PackageType+import Amazonka.Inspector2.Types.Runtime+import qualified Amazonka.Prelude as Prelude++-- | A summary of information about the AWS Lambda function.+--+-- /See:/ 'newAwsLambdaFunctionDetails' smart constructor.+data AwsLambdaFunctionDetails = AwsLambdaFunctionDetails'+ { -- | The instruction set architecture that the AWS Lambda function supports.+ -- Architecture is a string array with one of the valid values. The default+ -- architecture value is @x86_64@.+ architectures :: Prelude.Maybe (Prelude.NonEmpty Architecture),+ -- | The date and time that a user last updated the configuration, in+ -- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601 format>+ lastModifiedAt :: Prelude.Maybe Data.POSIX,+ -- | The AWS Lambda function\'s+ -- <https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html layers>.+ -- A Lambda function can have up to five layers.+ layers :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),+ -- | The type of deployment package. Set to @Image@ for container image and+ -- set @Zip@ for .zip file archive.+ packageType :: Prelude.Maybe PackageType,+ -- | The AWS Lambda function\'s networking configuration.+ vpcConfig :: Prelude.Maybe LambdaVpcConfig,+ -- | The SHA256 hash of the AWS Lambda function\'s deployment package.+ codeSha256 :: Prelude.Text,+ -- | The AWS Lambda function\'s execution role.+ executionRoleArn :: Prelude.Text,+ -- | The name of the AWS Lambda function.+ functionName :: Prelude.Text,+ -- | The runtime environment for the AWS Lambda function.+ runtime :: Runtime,+ -- | The version of the AWS Lambda function.+ version :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AwsLambdaFunctionDetails' 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:+--+-- 'architectures', 'awsLambdaFunctionDetails_architectures' - The instruction set architecture that the AWS Lambda function supports.+-- Architecture is a string array with one of the valid values. The default+-- architecture value is @x86_64@.+--+-- 'lastModifiedAt', 'awsLambdaFunctionDetails_lastModifiedAt' - The date and time that a user last updated the configuration, in+-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601 format>+--+-- 'layers', 'awsLambdaFunctionDetails_layers' - The AWS Lambda function\'s+-- <https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html layers>.+-- A Lambda function can have up to five layers.+--+-- 'packageType', 'awsLambdaFunctionDetails_packageType' - The type of deployment package. Set to @Image@ for container image and+-- set @Zip@ for .zip file archive.+--+-- 'vpcConfig', 'awsLambdaFunctionDetails_vpcConfig' - The AWS Lambda function\'s networking configuration.+--+-- 'codeSha256', 'awsLambdaFunctionDetails_codeSha256' - The SHA256 hash of the AWS Lambda function\'s deployment package.+--+-- 'executionRoleArn', 'awsLambdaFunctionDetails_executionRoleArn' - The AWS Lambda function\'s execution role.+--+-- 'functionName', 'awsLambdaFunctionDetails_functionName' - The name of the AWS Lambda function.+--+-- 'runtime', 'awsLambdaFunctionDetails_runtime' - The runtime environment for the AWS Lambda function.+--+-- 'version', 'awsLambdaFunctionDetails_version' - The version of the AWS Lambda function.+newAwsLambdaFunctionDetails ::+ -- | 'codeSha256'+ Prelude.Text ->+ -- | 'executionRoleArn'+ Prelude.Text ->+ -- | 'functionName'+ Prelude.Text ->+ -- | 'runtime'+ Runtime ->+ -- | 'version'+ Prelude.Text ->+ AwsLambdaFunctionDetails+newAwsLambdaFunctionDetails+ pCodeSha256_+ pExecutionRoleArn_+ pFunctionName_+ pRuntime_+ pVersion_ =+ AwsLambdaFunctionDetails'+ { architectures =+ Prelude.Nothing,+ lastModifiedAt = Prelude.Nothing,+ layers = Prelude.Nothing,+ packageType = Prelude.Nothing,+ vpcConfig = Prelude.Nothing,+ codeSha256 = pCodeSha256_,+ executionRoleArn = pExecutionRoleArn_,+ functionName = pFunctionName_,+ runtime = pRuntime_,+ version = pVersion_+ }++-- | The instruction set architecture that the AWS Lambda function supports.+-- Architecture is a string array with one of the valid values. The default+-- architecture value is @x86_64@.+awsLambdaFunctionDetails_architectures :: Lens.Lens' AwsLambdaFunctionDetails (Prelude.Maybe (Prelude.NonEmpty Architecture))+awsLambdaFunctionDetails_architectures = Lens.lens (\AwsLambdaFunctionDetails' {architectures} -> architectures) (\s@AwsLambdaFunctionDetails' {} a -> s {architectures = a} :: AwsLambdaFunctionDetails) Prelude.. Lens.mapping Lens.coerced++-- | The date and time that a user last updated the configuration, in+-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601 format>+awsLambdaFunctionDetails_lastModifiedAt :: Lens.Lens' AwsLambdaFunctionDetails (Prelude.Maybe Prelude.UTCTime)+awsLambdaFunctionDetails_lastModifiedAt = Lens.lens (\AwsLambdaFunctionDetails' {lastModifiedAt} -> lastModifiedAt) (\s@AwsLambdaFunctionDetails' {} a -> s {lastModifiedAt = a} :: AwsLambdaFunctionDetails) Prelude.. Lens.mapping Data._Time++-- | The AWS Lambda function\'s+-- <https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html layers>.+-- A Lambda function can have up to five layers.+awsLambdaFunctionDetails_layers :: Lens.Lens' AwsLambdaFunctionDetails (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))+awsLambdaFunctionDetails_layers = Lens.lens (\AwsLambdaFunctionDetails' {layers} -> layers) (\s@AwsLambdaFunctionDetails' {} a -> s {layers = a} :: AwsLambdaFunctionDetails) Prelude.. Lens.mapping Lens.coerced++-- | The type of deployment package. Set to @Image@ for container image and+-- set @Zip@ for .zip file archive.+awsLambdaFunctionDetails_packageType :: Lens.Lens' AwsLambdaFunctionDetails (Prelude.Maybe PackageType)+awsLambdaFunctionDetails_packageType = Lens.lens (\AwsLambdaFunctionDetails' {packageType} -> packageType) (\s@AwsLambdaFunctionDetails' {} a -> s {packageType = a} :: AwsLambdaFunctionDetails)++-- | The AWS Lambda function\'s networking configuration.+awsLambdaFunctionDetails_vpcConfig :: Lens.Lens' AwsLambdaFunctionDetails (Prelude.Maybe LambdaVpcConfig)+awsLambdaFunctionDetails_vpcConfig = Lens.lens (\AwsLambdaFunctionDetails' {vpcConfig} -> vpcConfig) (\s@AwsLambdaFunctionDetails' {} a -> s {vpcConfig = a} :: AwsLambdaFunctionDetails)++-- | The SHA256 hash of the AWS Lambda function\'s deployment package.+awsLambdaFunctionDetails_codeSha256 :: Lens.Lens' AwsLambdaFunctionDetails Prelude.Text+awsLambdaFunctionDetails_codeSha256 = Lens.lens (\AwsLambdaFunctionDetails' {codeSha256} -> codeSha256) (\s@AwsLambdaFunctionDetails' {} a -> s {codeSha256 = a} :: AwsLambdaFunctionDetails)++-- | The AWS Lambda function\'s execution role.+awsLambdaFunctionDetails_executionRoleArn :: Lens.Lens' AwsLambdaFunctionDetails Prelude.Text+awsLambdaFunctionDetails_executionRoleArn = Lens.lens (\AwsLambdaFunctionDetails' {executionRoleArn} -> executionRoleArn) (\s@AwsLambdaFunctionDetails' {} a -> s {executionRoleArn = a} :: AwsLambdaFunctionDetails)++-- | The name of the AWS Lambda function.+awsLambdaFunctionDetails_functionName :: Lens.Lens' AwsLambdaFunctionDetails Prelude.Text+awsLambdaFunctionDetails_functionName = Lens.lens (\AwsLambdaFunctionDetails' {functionName} -> functionName) (\s@AwsLambdaFunctionDetails' {} a -> s {functionName = a} :: AwsLambdaFunctionDetails)++-- | The runtime environment for the AWS Lambda function.+awsLambdaFunctionDetails_runtime :: Lens.Lens' AwsLambdaFunctionDetails Runtime+awsLambdaFunctionDetails_runtime = Lens.lens (\AwsLambdaFunctionDetails' {runtime} -> runtime) (\s@AwsLambdaFunctionDetails' {} a -> s {runtime = a} :: AwsLambdaFunctionDetails)++-- | The version of the AWS Lambda function.+awsLambdaFunctionDetails_version :: Lens.Lens' AwsLambdaFunctionDetails Prelude.Text+awsLambdaFunctionDetails_version = Lens.lens (\AwsLambdaFunctionDetails' {version} -> version) (\s@AwsLambdaFunctionDetails' {} a -> s {version = a} :: AwsLambdaFunctionDetails)++instance Data.FromJSON AwsLambdaFunctionDetails where+ parseJSON =+ Data.withObject+ "AwsLambdaFunctionDetails"+ ( \x ->+ AwsLambdaFunctionDetails'+ Prelude.<$> (x Data..:? "architectures")+ Prelude.<*> (x Data..:? "lastModifiedAt")+ Prelude.<*> (x Data..:? "layers")+ Prelude.<*> (x Data..:? "packageType")+ Prelude.<*> (x Data..:? "vpcConfig")+ Prelude.<*> (x Data..: "codeSha256")+ Prelude.<*> (x Data..: "executionRoleArn")+ Prelude.<*> (x Data..: "functionName")+ Prelude.<*> (x Data..: "runtime")+ Prelude.<*> (x Data..: "version")+ )++instance Prelude.Hashable AwsLambdaFunctionDetails where+ hashWithSalt _salt AwsLambdaFunctionDetails' {..} =+ _salt+ `Prelude.hashWithSalt` architectures+ `Prelude.hashWithSalt` lastModifiedAt+ `Prelude.hashWithSalt` layers+ `Prelude.hashWithSalt` packageType+ `Prelude.hashWithSalt` vpcConfig+ `Prelude.hashWithSalt` codeSha256+ `Prelude.hashWithSalt` executionRoleArn+ `Prelude.hashWithSalt` functionName+ `Prelude.hashWithSalt` runtime+ `Prelude.hashWithSalt` version++instance Prelude.NFData AwsLambdaFunctionDetails where+ rnf AwsLambdaFunctionDetails' {..} =+ Prelude.rnf architectures+ `Prelude.seq` Prelude.rnf lastModifiedAt+ `Prelude.seq` Prelude.rnf layers+ `Prelude.seq` Prelude.rnf packageType+ `Prelude.seq` Prelude.rnf vpcConfig+ `Prelude.seq` Prelude.rnf codeSha256+ `Prelude.seq` Prelude.rnf executionRoleArn+ `Prelude.seq` Prelude.rnf functionName+ `Prelude.seq` Prelude.rnf runtime+ `Prelude.seq` Prelude.rnf version
+ gen/Amazonka/Inspector2/Types/Counts.hs view
@@ -0,0 +1,86 @@+{-# 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.Inspector2.Types.Counts+-- 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.Inspector2.Types.Counts where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.GroupKey+import qualified Amazonka.Prelude as Prelude++-- | a structure that contains information on the count of resources within a+-- group.+--+-- /See:/ 'newCounts' smart constructor.+data Counts = Counts'+ { -- | The number of resources.+ count :: Prelude.Maybe Prelude.Integer,+ -- | The key associated with this group+ groupKey :: Prelude.Maybe GroupKey+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Counts' 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:+--+-- 'count', 'counts_count' - The number of resources.+--+-- 'groupKey', 'counts_groupKey' - The key associated with this group+newCounts ::+ Counts+newCounts =+ Counts'+ { count = Prelude.Nothing,+ groupKey = Prelude.Nothing+ }++-- | The number of resources.+counts_count :: Lens.Lens' Counts (Prelude.Maybe Prelude.Integer)+counts_count = Lens.lens (\Counts' {count} -> count) (\s@Counts' {} a -> s {count = a} :: Counts)++-- | The key associated with this group+counts_groupKey :: Lens.Lens' Counts (Prelude.Maybe GroupKey)+counts_groupKey = Lens.lens (\Counts' {groupKey} -> groupKey) (\s@Counts' {} a -> s {groupKey = a} :: Counts)++instance Data.FromJSON Counts where+ parseJSON =+ Data.withObject+ "Counts"+ ( \x ->+ Counts'+ Prelude.<$> (x Data..:? "count")+ Prelude.<*> (x Data..:? "groupKey")+ )++instance Prelude.Hashable Counts where+ hashWithSalt _salt Counts' {..} =+ _salt+ `Prelude.hashWithSalt` count+ `Prelude.hashWithSalt` groupKey++instance Prelude.NFData Counts where+ rnf Counts' {..} =+ Prelude.rnf count+ `Prelude.seq` Prelude.rnf groupKey
+ gen/Amazonka/Inspector2/Types/CoverageFilterCriteria.hs view
@@ -0,0 +1,234 @@+{-# 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.Inspector2.Types.CoverageFilterCriteria+-- 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.Inspector2.Types.CoverageFilterCriteria where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.CoverageMapFilter+import Amazonka.Inspector2.Types.CoverageStringFilter+import qualified Amazonka.Prelude as Prelude++-- | A structure that identifies filter criteria for @GetCoverageStatistics@.+--+-- /See:/ 'newCoverageFilterCriteria' smart constructor.+data CoverageFilterCriteria = CoverageFilterCriteria'+ { -- | An array of Amazon Web Services account IDs to return coverage+ -- statistics for.+ accountId :: Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter),+ -- | The Amazon EC2 instance tags to filter on.+ ec2InstanceTags :: Prelude.Maybe (Prelude.NonEmpty CoverageMapFilter),+ -- | The Amazon ECR image tags to filter on.+ ecrImageTags :: Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter),+ -- | The Amazon ECR repository name to filter on.+ ecrRepositoryName :: Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter),+ -- | Returns coverage statistics for AWS Lambda functions filtered by+ -- function names.+ lambdaFunctionName :: Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter),+ -- | Returns coverage statistics for AWS Lambda functions filtered by+ -- runtime.+ lambdaFunctionRuntime :: Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter),+ -- | Returns coverage statistics for AWS Lambda functions filtered by tag.+ lambdaFunctionTags :: Prelude.Maybe (Prelude.NonEmpty CoverageMapFilter),+ -- | An array of Amazon Web Services resource IDs to return coverage+ -- statistics for.+ resourceId :: Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter),+ -- | An array of Amazon Web Services resource types to return coverage+ -- statistics for. The values can be @AWS_EC2_INSTANCE@ or+ -- @AWS_ECR_REPOSITORY@.+ resourceType :: Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter),+ -- | The scan status code to filter on.+ scanStatusCode :: Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter),+ -- | The scan status reason to filter on.+ scanStatusReason :: Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter),+ -- | An array of Amazon Inspector scan types to return coverage statistics+ -- for.+ scanType :: Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter)+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CoverageFilterCriteria' 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', 'coverageFilterCriteria_accountId' - An array of Amazon Web Services account IDs to return coverage+-- statistics for.+--+-- 'ec2InstanceTags', 'coverageFilterCriteria_ec2InstanceTags' - The Amazon EC2 instance tags to filter on.+--+-- 'ecrImageTags', 'coverageFilterCriteria_ecrImageTags' - The Amazon ECR image tags to filter on.+--+-- 'ecrRepositoryName', 'coverageFilterCriteria_ecrRepositoryName' - The Amazon ECR repository name to filter on.+--+-- 'lambdaFunctionName', 'coverageFilterCriteria_lambdaFunctionName' - Returns coverage statistics for AWS Lambda functions filtered by+-- function names.+--+-- 'lambdaFunctionRuntime', 'coverageFilterCriteria_lambdaFunctionRuntime' - Returns coverage statistics for AWS Lambda functions filtered by+-- runtime.+--+-- 'lambdaFunctionTags', 'coverageFilterCriteria_lambdaFunctionTags' - Returns coverage statistics for AWS Lambda functions filtered by tag.+--+-- 'resourceId', 'coverageFilterCriteria_resourceId' - An array of Amazon Web Services resource IDs to return coverage+-- statistics for.+--+-- 'resourceType', 'coverageFilterCriteria_resourceType' - An array of Amazon Web Services resource types to return coverage+-- statistics for. The values can be @AWS_EC2_INSTANCE@ or+-- @AWS_ECR_REPOSITORY@.+--+-- 'scanStatusCode', 'coverageFilterCriteria_scanStatusCode' - The scan status code to filter on.+--+-- 'scanStatusReason', 'coverageFilterCriteria_scanStatusReason' - The scan status reason to filter on.+--+-- 'scanType', 'coverageFilterCriteria_scanType' - An array of Amazon Inspector scan types to return coverage statistics+-- for.+newCoverageFilterCriteria ::+ CoverageFilterCriteria+newCoverageFilterCriteria =+ CoverageFilterCriteria'+ { accountId =+ Prelude.Nothing,+ ec2InstanceTags = Prelude.Nothing,+ ecrImageTags = Prelude.Nothing,+ ecrRepositoryName = Prelude.Nothing,+ lambdaFunctionName = Prelude.Nothing,+ lambdaFunctionRuntime = Prelude.Nothing,+ lambdaFunctionTags = Prelude.Nothing,+ resourceId = Prelude.Nothing,+ resourceType = Prelude.Nothing,+ scanStatusCode = Prelude.Nothing,+ scanStatusReason = Prelude.Nothing,+ scanType = Prelude.Nothing+ }++-- | An array of Amazon Web Services account IDs to return coverage+-- statistics for.+coverageFilterCriteria_accountId :: Lens.Lens' CoverageFilterCriteria (Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter))+coverageFilterCriteria_accountId = Lens.lens (\CoverageFilterCriteria' {accountId} -> accountId) (\s@CoverageFilterCriteria' {} a -> s {accountId = a} :: CoverageFilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon EC2 instance tags to filter on.+coverageFilterCriteria_ec2InstanceTags :: Lens.Lens' CoverageFilterCriteria (Prelude.Maybe (Prelude.NonEmpty CoverageMapFilter))+coverageFilterCriteria_ec2InstanceTags = Lens.lens (\CoverageFilterCriteria' {ec2InstanceTags} -> ec2InstanceTags) (\s@CoverageFilterCriteria' {} a -> s {ec2InstanceTags = a} :: CoverageFilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon ECR image tags to filter on.+coverageFilterCriteria_ecrImageTags :: Lens.Lens' CoverageFilterCriteria (Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter))+coverageFilterCriteria_ecrImageTags = Lens.lens (\CoverageFilterCriteria' {ecrImageTags} -> ecrImageTags) (\s@CoverageFilterCriteria' {} a -> s {ecrImageTags = a} :: CoverageFilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon ECR repository name to filter on.+coverageFilterCriteria_ecrRepositoryName :: Lens.Lens' CoverageFilterCriteria (Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter))+coverageFilterCriteria_ecrRepositoryName = Lens.lens (\CoverageFilterCriteria' {ecrRepositoryName} -> ecrRepositoryName) (\s@CoverageFilterCriteria' {} a -> s {ecrRepositoryName = a} :: CoverageFilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Returns coverage statistics for AWS Lambda functions filtered by+-- function names.+coverageFilterCriteria_lambdaFunctionName :: Lens.Lens' CoverageFilterCriteria (Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter))+coverageFilterCriteria_lambdaFunctionName = Lens.lens (\CoverageFilterCriteria' {lambdaFunctionName} -> lambdaFunctionName) (\s@CoverageFilterCriteria' {} a -> s {lambdaFunctionName = a} :: CoverageFilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Returns coverage statistics for AWS Lambda functions filtered by+-- runtime.+coverageFilterCriteria_lambdaFunctionRuntime :: Lens.Lens' CoverageFilterCriteria (Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter))+coverageFilterCriteria_lambdaFunctionRuntime = Lens.lens (\CoverageFilterCriteria' {lambdaFunctionRuntime} -> lambdaFunctionRuntime) (\s@CoverageFilterCriteria' {} a -> s {lambdaFunctionRuntime = a} :: CoverageFilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Returns coverage statistics for AWS Lambda functions filtered by tag.+coverageFilterCriteria_lambdaFunctionTags :: Lens.Lens' CoverageFilterCriteria (Prelude.Maybe (Prelude.NonEmpty CoverageMapFilter))+coverageFilterCriteria_lambdaFunctionTags = Lens.lens (\CoverageFilterCriteria' {lambdaFunctionTags} -> lambdaFunctionTags) (\s@CoverageFilterCriteria' {} a -> s {lambdaFunctionTags = a} :: CoverageFilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | An array of Amazon Web Services resource IDs to return coverage+-- statistics for.+coverageFilterCriteria_resourceId :: Lens.Lens' CoverageFilterCriteria (Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter))+coverageFilterCriteria_resourceId = Lens.lens (\CoverageFilterCriteria' {resourceId} -> resourceId) (\s@CoverageFilterCriteria' {} a -> s {resourceId = a} :: CoverageFilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | An array of Amazon Web Services resource types to return coverage+-- statistics for. The values can be @AWS_EC2_INSTANCE@ or+-- @AWS_ECR_REPOSITORY@.+coverageFilterCriteria_resourceType :: Lens.Lens' CoverageFilterCriteria (Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter))+coverageFilterCriteria_resourceType = Lens.lens (\CoverageFilterCriteria' {resourceType} -> resourceType) (\s@CoverageFilterCriteria' {} a -> s {resourceType = a} :: CoverageFilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | The scan status code to filter on.+coverageFilterCriteria_scanStatusCode :: Lens.Lens' CoverageFilterCriteria (Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter))+coverageFilterCriteria_scanStatusCode = Lens.lens (\CoverageFilterCriteria' {scanStatusCode} -> scanStatusCode) (\s@CoverageFilterCriteria' {} a -> s {scanStatusCode = a} :: CoverageFilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | The scan status reason to filter on.+coverageFilterCriteria_scanStatusReason :: Lens.Lens' CoverageFilterCriteria (Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter))+coverageFilterCriteria_scanStatusReason = Lens.lens (\CoverageFilterCriteria' {scanStatusReason} -> scanStatusReason) (\s@CoverageFilterCriteria' {} a -> s {scanStatusReason = a} :: CoverageFilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | An array of Amazon Inspector scan types to return coverage statistics+-- for.+coverageFilterCriteria_scanType :: Lens.Lens' CoverageFilterCriteria (Prelude.Maybe (Prelude.NonEmpty CoverageStringFilter))+coverageFilterCriteria_scanType = Lens.lens (\CoverageFilterCriteria' {scanType} -> scanType) (\s@CoverageFilterCriteria' {} a -> s {scanType = a} :: CoverageFilterCriteria) Prelude.. Lens.mapping Lens.coerced++instance Prelude.Hashable CoverageFilterCriteria where+ hashWithSalt _salt CoverageFilterCriteria' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` ec2InstanceTags+ `Prelude.hashWithSalt` ecrImageTags+ `Prelude.hashWithSalt` ecrRepositoryName+ `Prelude.hashWithSalt` lambdaFunctionName+ `Prelude.hashWithSalt` lambdaFunctionRuntime+ `Prelude.hashWithSalt` lambdaFunctionTags+ `Prelude.hashWithSalt` resourceId+ `Prelude.hashWithSalt` resourceType+ `Prelude.hashWithSalt` scanStatusCode+ `Prelude.hashWithSalt` scanStatusReason+ `Prelude.hashWithSalt` scanType++instance Prelude.NFData CoverageFilterCriteria where+ rnf CoverageFilterCriteria' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf ec2InstanceTags+ `Prelude.seq` Prelude.rnf ecrImageTags+ `Prelude.seq` Prelude.rnf ecrRepositoryName+ `Prelude.seq` Prelude.rnf lambdaFunctionName+ `Prelude.seq` Prelude.rnf lambdaFunctionRuntime+ `Prelude.seq` Prelude.rnf lambdaFunctionTags+ `Prelude.seq` Prelude.rnf resourceId+ `Prelude.seq` Prelude.rnf resourceType+ `Prelude.seq` Prelude.rnf scanStatusCode+ `Prelude.seq` Prelude.rnf scanStatusReason+ `Prelude.seq` Prelude.rnf scanType++instance Data.ToJSON CoverageFilterCriteria where+ toJSON CoverageFilterCriteria' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("accountId" Data..=) Prelude.<$> accountId,+ ("ec2InstanceTags" Data..=)+ Prelude.<$> ec2InstanceTags,+ ("ecrImageTags" Data..=) Prelude.<$> ecrImageTags,+ ("ecrRepositoryName" Data..=)+ Prelude.<$> ecrRepositoryName,+ ("lambdaFunctionName" Data..=)+ Prelude.<$> lambdaFunctionName,+ ("lambdaFunctionRuntime" Data..=)+ Prelude.<$> lambdaFunctionRuntime,+ ("lambdaFunctionTags" Data..=)+ Prelude.<$> lambdaFunctionTags,+ ("resourceId" Data..=) Prelude.<$> resourceId,+ ("resourceType" Data..=) Prelude.<$> resourceType,+ ("scanStatusCode" Data..=)+ Prelude.<$> scanStatusCode,+ ("scanStatusReason" Data..=)+ Prelude.<$> scanStatusReason,+ ("scanType" Data..=) Prelude.<$> scanType+ ]+ )
+ gen/Amazonka/Inspector2/Types/CoverageMapComparison.hs view
@@ -0,0 +1,66 @@+{-# 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.Inspector2.Types.CoverageMapComparison+-- 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.Inspector2.Types.CoverageMapComparison+ ( CoverageMapComparison+ ( ..,+ CoverageMapComparison_EQUALS+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype CoverageMapComparison = CoverageMapComparison'+ { fromCoverageMapComparison ::+ 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 CoverageMapComparison_EQUALS :: CoverageMapComparison+pattern CoverageMapComparison_EQUALS = CoverageMapComparison' "EQUALS"++{-# COMPLETE+ CoverageMapComparison_EQUALS,+ CoverageMapComparison'+ #-}
+ gen/Amazonka/Inspector2/Types/CoverageMapFilter.hs view
@@ -0,0 +1,100 @@+{-# 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.Inspector2.Types.CoverageMapFilter+-- 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.Inspector2.Types.CoverageMapFilter where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.CoverageMapComparison+import qualified Amazonka.Prelude as Prelude++-- | Contains details of a coverage map filter.+--+-- /See:/ 'newCoverageMapFilter' smart constructor.+data CoverageMapFilter = CoverageMapFilter'+ { -- | The tag value associated with the coverage map filter.+ value :: Prelude.Maybe Prelude.Text,+ -- | The operator to compare coverage on.+ comparison :: CoverageMapComparison,+ -- | The tag key associated with the coverage map filter.+ key :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CoverageMapFilter' 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:+--+-- 'value', 'coverageMapFilter_value' - The tag value associated with the coverage map filter.+--+-- 'comparison', 'coverageMapFilter_comparison' - The operator to compare coverage on.+--+-- 'key', 'coverageMapFilter_key' - The tag key associated with the coverage map filter.+newCoverageMapFilter ::+ -- | 'comparison'+ CoverageMapComparison ->+ -- | 'key'+ Prelude.Text ->+ CoverageMapFilter+newCoverageMapFilter pComparison_ pKey_ =+ CoverageMapFilter'+ { value = Prelude.Nothing,+ comparison = pComparison_,+ key = pKey_+ }++-- | The tag value associated with the coverage map filter.+coverageMapFilter_value :: Lens.Lens' CoverageMapFilter (Prelude.Maybe Prelude.Text)+coverageMapFilter_value = Lens.lens (\CoverageMapFilter' {value} -> value) (\s@CoverageMapFilter' {} a -> s {value = a} :: CoverageMapFilter)++-- | The operator to compare coverage on.+coverageMapFilter_comparison :: Lens.Lens' CoverageMapFilter CoverageMapComparison+coverageMapFilter_comparison = Lens.lens (\CoverageMapFilter' {comparison} -> comparison) (\s@CoverageMapFilter' {} a -> s {comparison = a} :: CoverageMapFilter)++-- | The tag key associated with the coverage map filter.+coverageMapFilter_key :: Lens.Lens' CoverageMapFilter Prelude.Text+coverageMapFilter_key = Lens.lens (\CoverageMapFilter' {key} -> key) (\s@CoverageMapFilter' {} a -> s {key = a} :: CoverageMapFilter)++instance Prelude.Hashable CoverageMapFilter where+ hashWithSalt _salt CoverageMapFilter' {..} =+ _salt+ `Prelude.hashWithSalt` value+ `Prelude.hashWithSalt` comparison+ `Prelude.hashWithSalt` key++instance Prelude.NFData CoverageMapFilter where+ rnf CoverageMapFilter' {..} =+ Prelude.rnf value+ `Prelude.seq` Prelude.rnf comparison+ `Prelude.seq` Prelude.rnf key++instance Data.ToJSON CoverageMapFilter where+ toJSON CoverageMapFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("value" Data..=) Prelude.<$> value,+ Prelude.Just ("comparison" Data..= comparison),+ Prelude.Just ("key" Data..= key)+ ]+ )
+ gen/Amazonka/Inspector2/Types/CoverageResourceType.hs view
@@ -0,0 +1,81 @@+{-# 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.Inspector2.Types.CoverageResourceType+-- 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.Inspector2.Types.CoverageResourceType+ ( CoverageResourceType+ ( ..,+ CoverageResourceType_AWS_EC2_INSTANCE,+ CoverageResourceType_AWS_ECR_CONTAINER_IMAGE,+ CoverageResourceType_AWS_ECR_REPOSITORY,+ CoverageResourceType_AWS_LAMBDA_FUNCTION+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype CoverageResourceType = CoverageResourceType'+ { fromCoverageResourceType ::+ 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 CoverageResourceType_AWS_EC2_INSTANCE :: CoverageResourceType+pattern CoverageResourceType_AWS_EC2_INSTANCE = CoverageResourceType' "AWS_EC2_INSTANCE"++pattern CoverageResourceType_AWS_ECR_CONTAINER_IMAGE :: CoverageResourceType+pattern CoverageResourceType_AWS_ECR_CONTAINER_IMAGE = CoverageResourceType' "AWS_ECR_CONTAINER_IMAGE"++pattern CoverageResourceType_AWS_ECR_REPOSITORY :: CoverageResourceType+pattern CoverageResourceType_AWS_ECR_REPOSITORY = CoverageResourceType' "AWS_ECR_REPOSITORY"++pattern CoverageResourceType_AWS_LAMBDA_FUNCTION :: CoverageResourceType+pattern CoverageResourceType_AWS_LAMBDA_FUNCTION = CoverageResourceType' "AWS_LAMBDA_FUNCTION"++{-# COMPLETE+ CoverageResourceType_AWS_EC2_INSTANCE,+ CoverageResourceType_AWS_ECR_CONTAINER_IMAGE,+ CoverageResourceType_AWS_ECR_REPOSITORY,+ CoverageResourceType_AWS_LAMBDA_FUNCTION,+ CoverageResourceType'+ #-}
+ gen/Amazonka/Inspector2/Types/CoverageStringComparison.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.Inspector2.Types.CoverageStringComparison+-- 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.Inspector2.Types.CoverageStringComparison+ ( CoverageStringComparison+ ( ..,+ CoverageStringComparison_EQUALS,+ CoverageStringComparison_NOT_EQUALS+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype CoverageStringComparison = CoverageStringComparison'+ { fromCoverageStringComparison ::+ 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 CoverageStringComparison_EQUALS :: CoverageStringComparison+pattern CoverageStringComparison_EQUALS = CoverageStringComparison' "EQUALS"++pattern CoverageStringComparison_NOT_EQUALS :: CoverageStringComparison+pattern CoverageStringComparison_NOT_EQUALS = CoverageStringComparison' "NOT_EQUALS"++{-# COMPLETE+ CoverageStringComparison_EQUALS,+ CoverageStringComparison_NOT_EQUALS,+ CoverageStringComparison'+ #-}
+ gen/Amazonka/Inspector2/Types/CoverageStringFilter.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.Inspector2.Types.CoverageStringFilter+-- 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.Inspector2.Types.CoverageStringFilter where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.CoverageStringComparison+import qualified Amazonka.Prelude as Prelude++-- | Contains details of a coverage string filter.+--+-- /See:/ 'newCoverageStringFilter' smart constructor.+data CoverageStringFilter = CoverageStringFilter'+ { -- | The operator to compare strings on.+ comparison :: CoverageStringComparison,+ -- | The value to compare strings on.+ value :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CoverageStringFilter' 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:+--+-- 'comparison', 'coverageStringFilter_comparison' - The operator to compare strings on.+--+-- 'value', 'coverageStringFilter_value' - The value to compare strings on.+newCoverageStringFilter ::+ -- | 'comparison'+ CoverageStringComparison ->+ -- | 'value'+ Prelude.Text ->+ CoverageStringFilter+newCoverageStringFilter pComparison_ pValue_ =+ CoverageStringFilter'+ { comparison = pComparison_,+ value = pValue_+ }++-- | The operator to compare strings on.+coverageStringFilter_comparison :: Lens.Lens' CoverageStringFilter CoverageStringComparison+coverageStringFilter_comparison = Lens.lens (\CoverageStringFilter' {comparison} -> comparison) (\s@CoverageStringFilter' {} a -> s {comparison = a} :: CoverageStringFilter)++-- | The value to compare strings on.+coverageStringFilter_value :: Lens.Lens' CoverageStringFilter Prelude.Text+coverageStringFilter_value = Lens.lens (\CoverageStringFilter' {value} -> value) (\s@CoverageStringFilter' {} a -> s {value = a} :: CoverageStringFilter)++instance Prelude.Hashable CoverageStringFilter where+ hashWithSalt _salt CoverageStringFilter' {..} =+ _salt+ `Prelude.hashWithSalt` comparison+ `Prelude.hashWithSalt` value++instance Prelude.NFData CoverageStringFilter where+ rnf CoverageStringFilter' {..} =+ Prelude.rnf comparison+ `Prelude.seq` Prelude.rnf value++instance Data.ToJSON CoverageStringFilter where+ toJSON CoverageStringFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("comparison" Data..= comparison),+ Prelude.Just ("value" Data..= value)+ ]+ )
+ gen/Amazonka/Inspector2/Types/CoveredResource.hs view
@@ -0,0 +1,150 @@+{-# 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.Inspector2.Types.CoveredResource+-- 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.Inspector2.Types.CoveredResource where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.CoverageResourceType+import Amazonka.Inspector2.Types.ResourceScanMetadata+import Amazonka.Inspector2.Types.ScanStatus+import Amazonka.Inspector2.Types.ScanType+import qualified Amazonka.Prelude as Prelude++-- | An object that contains details about a resource covered by Amazon+-- Inspector.+--+-- /See:/ 'newCoveredResource' smart constructor.+data CoveredResource = CoveredResource'+ { -- | An object that contains details about the metadata.+ resourceMetadata :: Prelude.Maybe ResourceScanMetadata,+ -- | The status of the scan covering the resource.+ scanStatus :: Prelude.Maybe ScanStatus,+ -- | The Amazon Web Services account ID of the covered resource.+ accountId :: Prelude.Text,+ -- | The ID of the covered resource.+ resourceId :: Prelude.Text,+ -- | The type of the covered resource.+ resourceType :: CoverageResourceType,+ -- | The Amazon Inspector scan type covering the resource.+ scanType :: ScanType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CoveredResource' 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:+--+-- 'resourceMetadata', 'coveredResource_resourceMetadata' - An object that contains details about the metadata.+--+-- 'scanStatus', 'coveredResource_scanStatus' - The status of the scan covering the resource.+--+-- 'accountId', 'coveredResource_accountId' - The Amazon Web Services account ID of the covered resource.+--+-- 'resourceId', 'coveredResource_resourceId' - The ID of the covered resource.+--+-- 'resourceType', 'coveredResource_resourceType' - The type of the covered resource.+--+-- 'scanType', 'coveredResource_scanType' - The Amazon Inspector scan type covering the resource.+newCoveredResource ::+ -- | 'accountId'+ Prelude.Text ->+ -- | 'resourceId'+ Prelude.Text ->+ -- | 'resourceType'+ CoverageResourceType ->+ -- | 'scanType'+ ScanType ->+ CoveredResource+newCoveredResource+ pAccountId_+ pResourceId_+ pResourceType_+ pScanType_ =+ CoveredResource'+ { resourceMetadata =+ Prelude.Nothing,+ scanStatus = Prelude.Nothing,+ accountId = pAccountId_,+ resourceId = pResourceId_,+ resourceType = pResourceType_,+ scanType = pScanType_+ }++-- | An object that contains details about the metadata.+coveredResource_resourceMetadata :: Lens.Lens' CoveredResource (Prelude.Maybe ResourceScanMetadata)+coveredResource_resourceMetadata = Lens.lens (\CoveredResource' {resourceMetadata} -> resourceMetadata) (\s@CoveredResource' {} a -> s {resourceMetadata = a} :: CoveredResource)++-- | The status of the scan covering the resource.+coveredResource_scanStatus :: Lens.Lens' CoveredResource (Prelude.Maybe ScanStatus)+coveredResource_scanStatus = Lens.lens (\CoveredResource' {scanStatus} -> scanStatus) (\s@CoveredResource' {} a -> s {scanStatus = a} :: CoveredResource)++-- | The Amazon Web Services account ID of the covered resource.+coveredResource_accountId :: Lens.Lens' CoveredResource Prelude.Text+coveredResource_accountId = Lens.lens (\CoveredResource' {accountId} -> accountId) (\s@CoveredResource' {} a -> s {accountId = a} :: CoveredResource)++-- | The ID of the covered resource.+coveredResource_resourceId :: Lens.Lens' CoveredResource Prelude.Text+coveredResource_resourceId = Lens.lens (\CoveredResource' {resourceId} -> resourceId) (\s@CoveredResource' {} a -> s {resourceId = a} :: CoveredResource)++-- | The type of the covered resource.+coveredResource_resourceType :: Lens.Lens' CoveredResource CoverageResourceType+coveredResource_resourceType = Lens.lens (\CoveredResource' {resourceType} -> resourceType) (\s@CoveredResource' {} a -> s {resourceType = a} :: CoveredResource)++-- | The Amazon Inspector scan type covering the resource.+coveredResource_scanType :: Lens.Lens' CoveredResource ScanType+coveredResource_scanType = Lens.lens (\CoveredResource' {scanType} -> scanType) (\s@CoveredResource' {} a -> s {scanType = a} :: CoveredResource)++instance Data.FromJSON CoveredResource where+ parseJSON =+ Data.withObject+ "CoveredResource"+ ( \x ->+ CoveredResource'+ Prelude.<$> (x Data..:? "resourceMetadata")+ Prelude.<*> (x Data..:? "scanStatus")+ Prelude.<*> (x Data..: "accountId")+ Prelude.<*> (x Data..: "resourceId")+ Prelude.<*> (x Data..: "resourceType")+ Prelude.<*> (x Data..: "scanType")+ )++instance Prelude.Hashable CoveredResource where+ hashWithSalt _salt CoveredResource' {..} =+ _salt+ `Prelude.hashWithSalt` resourceMetadata+ `Prelude.hashWithSalt` scanStatus+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` resourceId+ `Prelude.hashWithSalt` resourceType+ `Prelude.hashWithSalt` scanType++instance Prelude.NFData CoveredResource where+ rnf CoveredResource' {..} =+ Prelude.rnf resourceMetadata+ `Prelude.seq` Prelude.rnf scanStatus+ `Prelude.seq` Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf resourceId+ `Prelude.seq` Prelude.rnf resourceType+ `Prelude.seq` Prelude.rnf scanType
+ gen/Amazonka/Inspector2/Types/Currency.hs view
@@ -0,0 +1,66 @@+{-# 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.Inspector2.Types.Currency+-- 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.Inspector2.Types.Currency+ ( Currency+ ( ..,+ Currency_USD+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype Currency = Currency'+ { fromCurrency ::+ 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 Currency_USD :: Currency+pattern Currency_USD = Currency' "USD"++{-# COMPLETE+ Currency_USD,+ Currency'+ #-}
+ gen/Amazonka/Inspector2/Types/CvssScore.hs view
@@ -0,0 +1,120 @@+{-# 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.Inspector2.Types.CvssScore+-- 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.Inspector2.Types.CvssScore 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++-- | The CVSS score for a finding.+--+-- /See:/ 'newCvssScore' smart constructor.+data CvssScore = CvssScore'+ { -- | The base CVSS score used for the finding.+ baseScore :: Prelude.Double,+ -- | The vector string of the CVSS score.+ scoringVector :: Prelude.Text,+ -- | The source of the CVSS score.+ source :: Prelude.Text,+ -- | The version of CVSS used for the score.+ version :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CvssScore' 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:+--+-- 'baseScore', 'cvssScore_baseScore' - The base CVSS score used for the finding.+--+-- 'scoringVector', 'cvssScore_scoringVector' - The vector string of the CVSS score.+--+-- 'source', 'cvssScore_source' - The source of the CVSS score.+--+-- 'version', 'cvssScore_version' - The version of CVSS used for the score.+newCvssScore ::+ -- | 'baseScore'+ Prelude.Double ->+ -- | 'scoringVector'+ Prelude.Text ->+ -- | 'source'+ Prelude.Text ->+ -- | 'version'+ Prelude.Text ->+ CvssScore+newCvssScore+ pBaseScore_+ pScoringVector_+ pSource_+ pVersion_ =+ CvssScore'+ { baseScore = pBaseScore_,+ scoringVector = pScoringVector_,+ source = pSource_,+ version = pVersion_+ }++-- | The base CVSS score used for the finding.+cvssScore_baseScore :: Lens.Lens' CvssScore Prelude.Double+cvssScore_baseScore = Lens.lens (\CvssScore' {baseScore} -> baseScore) (\s@CvssScore' {} a -> s {baseScore = a} :: CvssScore)++-- | The vector string of the CVSS score.+cvssScore_scoringVector :: Lens.Lens' CvssScore Prelude.Text+cvssScore_scoringVector = Lens.lens (\CvssScore' {scoringVector} -> scoringVector) (\s@CvssScore' {} a -> s {scoringVector = a} :: CvssScore)++-- | The source of the CVSS score.+cvssScore_source :: Lens.Lens' CvssScore Prelude.Text+cvssScore_source = Lens.lens (\CvssScore' {source} -> source) (\s@CvssScore' {} a -> s {source = a} :: CvssScore)++-- | The version of CVSS used for the score.+cvssScore_version :: Lens.Lens' CvssScore Prelude.Text+cvssScore_version = Lens.lens (\CvssScore' {version} -> version) (\s@CvssScore' {} a -> s {version = a} :: CvssScore)++instance Data.FromJSON CvssScore where+ parseJSON =+ Data.withObject+ "CvssScore"+ ( \x ->+ CvssScore'+ Prelude.<$> (x Data..: "baseScore")+ Prelude.<*> (x Data..: "scoringVector")+ Prelude.<*> (x Data..: "source")+ Prelude.<*> (x Data..: "version")+ )++instance Prelude.Hashable CvssScore where+ hashWithSalt _salt CvssScore' {..} =+ _salt+ `Prelude.hashWithSalt` baseScore+ `Prelude.hashWithSalt` scoringVector+ `Prelude.hashWithSalt` source+ `Prelude.hashWithSalt` version++instance Prelude.NFData CvssScore where+ rnf CvssScore' {..} =+ Prelude.rnf baseScore+ `Prelude.seq` Prelude.rnf scoringVector+ `Prelude.seq` Prelude.rnf source+ `Prelude.seq` Prelude.rnf version
+ gen/Amazonka/Inspector2/Types/CvssScoreAdjustment.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.Inspector2.Types.CvssScoreAdjustment+-- 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.Inspector2.Types.CvssScoreAdjustment 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 adjustments Amazon Inspector made to the CVSS score for a+-- finding.+--+-- /See:/ 'newCvssScoreAdjustment' smart constructor.+data CvssScoreAdjustment = CvssScoreAdjustment'+ { -- | The metric used to adjust the CVSS score.+ metric :: Prelude.Text,+ -- | The reason the CVSS score has been adjustment.+ reason :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CvssScoreAdjustment' 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:+--+-- 'metric', 'cvssScoreAdjustment_metric' - The metric used to adjust the CVSS score.+--+-- 'reason', 'cvssScoreAdjustment_reason' - The reason the CVSS score has been adjustment.+newCvssScoreAdjustment ::+ -- | 'metric'+ Prelude.Text ->+ -- | 'reason'+ Prelude.Text ->+ CvssScoreAdjustment+newCvssScoreAdjustment pMetric_ pReason_ =+ CvssScoreAdjustment'+ { metric = pMetric_,+ reason = pReason_+ }++-- | The metric used to adjust the CVSS score.+cvssScoreAdjustment_metric :: Lens.Lens' CvssScoreAdjustment Prelude.Text+cvssScoreAdjustment_metric = Lens.lens (\CvssScoreAdjustment' {metric} -> metric) (\s@CvssScoreAdjustment' {} a -> s {metric = a} :: CvssScoreAdjustment)++-- | The reason the CVSS score has been adjustment.+cvssScoreAdjustment_reason :: Lens.Lens' CvssScoreAdjustment Prelude.Text+cvssScoreAdjustment_reason = Lens.lens (\CvssScoreAdjustment' {reason} -> reason) (\s@CvssScoreAdjustment' {} a -> s {reason = a} :: CvssScoreAdjustment)++instance Data.FromJSON CvssScoreAdjustment where+ parseJSON =+ Data.withObject+ "CvssScoreAdjustment"+ ( \x ->+ CvssScoreAdjustment'+ Prelude.<$> (x Data..: "metric")+ Prelude.<*> (x Data..: "reason")+ )++instance Prelude.Hashable CvssScoreAdjustment where+ hashWithSalt _salt CvssScoreAdjustment' {..} =+ _salt+ `Prelude.hashWithSalt` metric+ `Prelude.hashWithSalt` reason++instance Prelude.NFData CvssScoreAdjustment where+ rnf CvssScoreAdjustment' {..} =+ Prelude.rnf metric `Prelude.seq` Prelude.rnf reason
+ gen/Amazonka/Inspector2/Types/CvssScoreDetails.hs view
@@ -0,0 +1,148 @@+{-# 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.Inspector2.Types.CvssScoreDetails+-- 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.Inspector2.Types.CvssScoreDetails where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.CvssScoreAdjustment+import qualified Amazonka.Prelude as Prelude++-- | Information about the CVSS score.+--+-- /See:/ 'newCvssScoreDetails' smart constructor.+data CvssScoreDetails = CvssScoreDetails'+ { -- | An object that contains details about adjustment Amazon Inspector made+ -- to the CVSS score.+ adjustments :: Prelude.Maybe [CvssScoreAdjustment],+ -- | The source of the CVSS data.+ cvssSource :: Prelude.Maybe Prelude.Text,+ -- | The CVSS score.+ score :: Prelude.Double,+ -- | The source for the CVSS score.+ scoreSource :: Prelude.Text,+ -- | The vector for the CVSS score.+ scoringVector :: Prelude.Text,+ -- | The CVSS version used in scoring.+ version :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CvssScoreDetails' 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:+--+-- 'adjustments', 'cvssScoreDetails_adjustments' - An object that contains details about adjustment Amazon Inspector made+-- to the CVSS score.+--+-- 'cvssSource', 'cvssScoreDetails_cvssSource' - The source of the CVSS data.+--+-- 'score', 'cvssScoreDetails_score' - The CVSS score.+--+-- 'scoreSource', 'cvssScoreDetails_scoreSource' - The source for the CVSS score.+--+-- 'scoringVector', 'cvssScoreDetails_scoringVector' - The vector for the CVSS score.+--+-- 'version', 'cvssScoreDetails_version' - The CVSS version used in scoring.+newCvssScoreDetails ::+ -- | 'score'+ Prelude.Double ->+ -- | 'scoreSource'+ Prelude.Text ->+ -- | 'scoringVector'+ Prelude.Text ->+ -- | 'version'+ Prelude.Text ->+ CvssScoreDetails+newCvssScoreDetails+ pScore_+ pScoreSource_+ pScoringVector_+ pVersion_ =+ CvssScoreDetails'+ { adjustments = Prelude.Nothing,+ cvssSource = Prelude.Nothing,+ score = pScore_,+ scoreSource = pScoreSource_,+ scoringVector = pScoringVector_,+ version = pVersion_+ }++-- | An object that contains details about adjustment Amazon Inspector made+-- to the CVSS score.+cvssScoreDetails_adjustments :: Lens.Lens' CvssScoreDetails (Prelude.Maybe [CvssScoreAdjustment])+cvssScoreDetails_adjustments = Lens.lens (\CvssScoreDetails' {adjustments} -> adjustments) (\s@CvssScoreDetails' {} a -> s {adjustments = a} :: CvssScoreDetails) Prelude.. Lens.mapping Lens.coerced++-- | The source of the CVSS data.+cvssScoreDetails_cvssSource :: Lens.Lens' CvssScoreDetails (Prelude.Maybe Prelude.Text)+cvssScoreDetails_cvssSource = Lens.lens (\CvssScoreDetails' {cvssSource} -> cvssSource) (\s@CvssScoreDetails' {} a -> s {cvssSource = a} :: CvssScoreDetails)++-- | The CVSS score.+cvssScoreDetails_score :: Lens.Lens' CvssScoreDetails Prelude.Double+cvssScoreDetails_score = Lens.lens (\CvssScoreDetails' {score} -> score) (\s@CvssScoreDetails' {} a -> s {score = a} :: CvssScoreDetails)++-- | The source for the CVSS score.+cvssScoreDetails_scoreSource :: Lens.Lens' CvssScoreDetails Prelude.Text+cvssScoreDetails_scoreSource = Lens.lens (\CvssScoreDetails' {scoreSource} -> scoreSource) (\s@CvssScoreDetails' {} a -> s {scoreSource = a} :: CvssScoreDetails)++-- | The vector for the CVSS score.+cvssScoreDetails_scoringVector :: Lens.Lens' CvssScoreDetails Prelude.Text+cvssScoreDetails_scoringVector = Lens.lens (\CvssScoreDetails' {scoringVector} -> scoringVector) (\s@CvssScoreDetails' {} a -> s {scoringVector = a} :: CvssScoreDetails)++-- | The CVSS version used in scoring.+cvssScoreDetails_version :: Lens.Lens' CvssScoreDetails Prelude.Text+cvssScoreDetails_version = Lens.lens (\CvssScoreDetails' {version} -> version) (\s@CvssScoreDetails' {} a -> s {version = a} :: CvssScoreDetails)++instance Data.FromJSON CvssScoreDetails where+ parseJSON =+ Data.withObject+ "CvssScoreDetails"+ ( \x ->+ CvssScoreDetails'+ Prelude.<$> (x Data..:? "adjustments" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "cvssSource")+ Prelude.<*> (x Data..: "score")+ Prelude.<*> (x Data..: "scoreSource")+ Prelude.<*> (x Data..: "scoringVector")+ Prelude.<*> (x Data..: "version")+ )++instance Prelude.Hashable CvssScoreDetails where+ hashWithSalt _salt CvssScoreDetails' {..} =+ _salt+ `Prelude.hashWithSalt` adjustments+ `Prelude.hashWithSalt` cvssSource+ `Prelude.hashWithSalt` score+ `Prelude.hashWithSalt` scoreSource+ `Prelude.hashWithSalt` scoringVector+ `Prelude.hashWithSalt` version++instance Prelude.NFData CvssScoreDetails where+ rnf CvssScoreDetails' {..} =+ Prelude.rnf adjustments+ `Prelude.seq` Prelude.rnf cvssSource+ `Prelude.seq` Prelude.rnf score+ `Prelude.seq` Prelude.rnf scoreSource+ `Prelude.seq` Prelude.rnf scoringVector+ `Prelude.seq` Prelude.rnf version
+ gen/Amazonka/Inspector2/Types/DateFilter.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.Inspector2.Types.DateFilter+-- 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.Inspector2.Types.DateFilter 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++-- | Contains details on the time range used to filter findings.+--+-- /See:/ 'newDateFilter' smart constructor.+data DateFilter = DateFilter'+ { -- | A timestamp representing the end of the time period filtered on.+ endInclusive :: Prelude.Maybe Data.POSIX,+ -- | A timestamp representing the start of the time period filtered on.+ startInclusive :: Prelude.Maybe Data.POSIX+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DateFilter' 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:+--+-- 'endInclusive', 'dateFilter_endInclusive' - A timestamp representing the end of the time period filtered on.+--+-- 'startInclusive', 'dateFilter_startInclusive' - A timestamp representing the start of the time period filtered on.+newDateFilter ::+ DateFilter+newDateFilter =+ DateFilter'+ { endInclusive = Prelude.Nothing,+ startInclusive = Prelude.Nothing+ }++-- | A timestamp representing the end of the time period filtered on.+dateFilter_endInclusive :: Lens.Lens' DateFilter (Prelude.Maybe Prelude.UTCTime)+dateFilter_endInclusive = Lens.lens (\DateFilter' {endInclusive} -> endInclusive) (\s@DateFilter' {} a -> s {endInclusive = a} :: DateFilter) Prelude.. Lens.mapping Data._Time++-- | A timestamp representing the start of the time period filtered on.+dateFilter_startInclusive :: Lens.Lens' DateFilter (Prelude.Maybe Prelude.UTCTime)+dateFilter_startInclusive = Lens.lens (\DateFilter' {startInclusive} -> startInclusive) (\s@DateFilter' {} a -> s {startInclusive = a} :: DateFilter) Prelude.. Lens.mapping Data._Time++instance Data.FromJSON DateFilter where+ parseJSON =+ Data.withObject+ "DateFilter"+ ( \x ->+ DateFilter'+ Prelude.<$> (x Data..:? "endInclusive")+ Prelude.<*> (x Data..:? "startInclusive")+ )++instance Prelude.Hashable DateFilter where+ hashWithSalt _salt DateFilter' {..} =+ _salt+ `Prelude.hashWithSalt` endInclusive+ `Prelude.hashWithSalt` startInclusive++instance Prelude.NFData DateFilter where+ rnf DateFilter' {..} =+ Prelude.rnf endInclusive+ `Prelude.seq` Prelude.rnf startInclusive++instance Data.ToJSON DateFilter where+ toJSON DateFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("endInclusive" Data..=) Prelude.<$> endInclusive,+ ("startInclusive" Data..=)+ Prelude.<$> startInclusive+ ]+ )
+ gen/Amazonka/Inspector2/Types/DelegatedAdmin.hs view
@@ -0,0 +1,89 @@+{-# 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.Inspector2.Types.DelegatedAdmin+-- 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.Inspector2.Types.DelegatedAdmin where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.RelationshipStatus+import qualified Amazonka.Prelude as Prelude++-- | Details of the Amazon Inspector delegated administrator for your+-- organization.+--+-- /See:/ 'newDelegatedAdmin' smart constructor.+data DelegatedAdmin = DelegatedAdmin'+ { -- | The Amazon Web Services account ID of the Amazon Inspector delegated+ -- administrator for your organization.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | The status of the Amazon Inspector delegated administrator.+ relationshipStatus :: Prelude.Maybe RelationshipStatus+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DelegatedAdmin' 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', 'delegatedAdmin_accountId' - The Amazon Web Services account ID of the Amazon Inspector delegated+-- administrator for your organization.+--+-- 'relationshipStatus', 'delegatedAdmin_relationshipStatus' - The status of the Amazon Inspector delegated administrator.+newDelegatedAdmin ::+ DelegatedAdmin+newDelegatedAdmin =+ DelegatedAdmin'+ { accountId = Prelude.Nothing,+ relationshipStatus = Prelude.Nothing+ }++-- | The Amazon Web Services account ID of the Amazon Inspector delegated+-- administrator for your organization.+delegatedAdmin_accountId :: Lens.Lens' DelegatedAdmin (Prelude.Maybe Prelude.Text)+delegatedAdmin_accountId = Lens.lens (\DelegatedAdmin' {accountId} -> accountId) (\s@DelegatedAdmin' {} a -> s {accountId = a} :: DelegatedAdmin)++-- | The status of the Amazon Inspector delegated administrator.+delegatedAdmin_relationshipStatus :: Lens.Lens' DelegatedAdmin (Prelude.Maybe RelationshipStatus)+delegatedAdmin_relationshipStatus = Lens.lens (\DelegatedAdmin' {relationshipStatus} -> relationshipStatus) (\s@DelegatedAdmin' {} a -> s {relationshipStatus = a} :: DelegatedAdmin)++instance Data.FromJSON DelegatedAdmin where+ parseJSON =+ Data.withObject+ "DelegatedAdmin"+ ( \x ->+ DelegatedAdmin'+ Prelude.<$> (x Data..:? "accountId")+ Prelude.<*> (x Data..:? "relationshipStatus")+ )++instance Prelude.Hashable DelegatedAdmin where+ hashWithSalt _salt DelegatedAdmin' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` relationshipStatus++instance Prelude.NFData DelegatedAdmin where+ rnf DelegatedAdmin' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf relationshipStatus
+ gen/Amazonka/Inspector2/Types/DelegatedAdminAccount.hs view
@@ -0,0 +1,89 @@+{-# 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.Inspector2.Types.DelegatedAdminAccount+-- 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.Inspector2.Types.DelegatedAdminAccount where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.DelegatedAdminStatus+import qualified Amazonka.Prelude as Prelude++-- | Details of the Amazon Inspector delegated administrator for your+-- organization.+--+-- /See:/ 'newDelegatedAdminAccount' smart constructor.+data DelegatedAdminAccount = DelegatedAdminAccount'+ { -- | The Amazon Web Services account ID of the Amazon Inspector delegated+ -- administrator for your organization.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | The status of the Amazon Inspector delegated administrator.+ status :: Prelude.Maybe DelegatedAdminStatus+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DelegatedAdminAccount' 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', 'delegatedAdminAccount_accountId' - The Amazon Web Services account ID of the Amazon Inspector delegated+-- administrator for your organization.+--+-- 'status', 'delegatedAdminAccount_status' - The status of the Amazon Inspector delegated administrator.+newDelegatedAdminAccount ::+ DelegatedAdminAccount+newDelegatedAdminAccount =+ DelegatedAdminAccount'+ { accountId = Prelude.Nothing,+ status = Prelude.Nothing+ }++-- | The Amazon Web Services account ID of the Amazon Inspector delegated+-- administrator for your organization.+delegatedAdminAccount_accountId :: Lens.Lens' DelegatedAdminAccount (Prelude.Maybe Prelude.Text)+delegatedAdminAccount_accountId = Lens.lens (\DelegatedAdminAccount' {accountId} -> accountId) (\s@DelegatedAdminAccount' {} a -> s {accountId = a} :: DelegatedAdminAccount)++-- | The status of the Amazon Inspector delegated administrator.+delegatedAdminAccount_status :: Lens.Lens' DelegatedAdminAccount (Prelude.Maybe DelegatedAdminStatus)+delegatedAdminAccount_status = Lens.lens (\DelegatedAdminAccount' {status} -> status) (\s@DelegatedAdminAccount' {} a -> s {status = a} :: DelegatedAdminAccount)++instance Data.FromJSON DelegatedAdminAccount where+ parseJSON =+ Data.withObject+ "DelegatedAdminAccount"+ ( \x ->+ DelegatedAdminAccount'+ Prelude.<$> (x Data..:? "accountId")+ Prelude.<*> (x Data..:? "status")+ )++instance Prelude.Hashable DelegatedAdminAccount where+ hashWithSalt _salt DelegatedAdminAccount' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` status++instance Prelude.NFData DelegatedAdminAccount where+ rnf DelegatedAdminAccount' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf status
+ gen/Amazonka/Inspector2/Types/DelegatedAdminStatus.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.Inspector2.Types.DelegatedAdminStatus+-- 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.Inspector2.Types.DelegatedAdminStatus+ ( DelegatedAdminStatus+ ( ..,+ DelegatedAdminStatus_DISABLE_IN_PROGRESS,+ DelegatedAdminStatus_ENABLED+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype DelegatedAdminStatus = DelegatedAdminStatus'+ { fromDelegatedAdminStatus ::+ 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 DelegatedAdminStatus_DISABLE_IN_PROGRESS :: DelegatedAdminStatus+pattern DelegatedAdminStatus_DISABLE_IN_PROGRESS = DelegatedAdminStatus' "DISABLE_IN_PROGRESS"++pattern DelegatedAdminStatus_ENABLED :: DelegatedAdminStatus+pattern DelegatedAdminStatus_ENABLED = DelegatedAdminStatus' "ENABLED"++{-# COMPLETE+ DelegatedAdminStatus_DISABLE_IN_PROGRESS,+ DelegatedAdminStatus_ENABLED,+ DelegatedAdminStatus'+ #-}
+ gen/Amazonka/Inspector2/Types/Destination.hs view
@@ -0,0 +1,111 @@+{-# 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.Inspector2.Types.Destination+-- 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.Inspector2.Types.Destination 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++-- | Contains details of the Amazon S3 bucket and KMS key used to export+-- findings.+--+-- /See:/ 'newDestination' smart constructor.+data Destination = Destination'+ { -- | The prefix of the KMS key used to export findings.+ keyPrefix :: Prelude.Maybe Prelude.Text,+ -- | The name of the Amazon S3 bucket to export findings to.+ bucketName :: Prelude.Text,+ -- | The ARN of the KMS key used to encrypt data when exporting findings.+ kmsKeyArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Destination' 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:+--+-- 'keyPrefix', 'destination_keyPrefix' - The prefix of the KMS key used to export findings.+--+-- 'bucketName', 'destination_bucketName' - The name of the Amazon S3 bucket to export findings to.+--+-- 'kmsKeyArn', 'destination_kmsKeyArn' - The ARN of the KMS key used to encrypt data when exporting findings.+newDestination ::+ -- | 'bucketName'+ Prelude.Text ->+ -- | 'kmsKeyArn'+ Prelude.Text ->+ Destination+newDestination pBucketName_ pKmsKeyArn_ =+ Destination'+ { keyPrefix = Prelude.Nothing,+ bucketName = pBucketName_,+ kmsKeyArn = pKmsKeyArn_+ }++-- | The prefix of the KMS key used to export findings.+destination_keyPrefix :: Lens.Lens' Destination (Prelude.Maybe Prelude.Text)+destination_keyPrefix = Lens.lens (\Destination' {keyPrefix} -> keyPrefix) (\s@Destination' {} a -> s {keyPrefix = a} :: Destination)++-- | The name of the Amazon S3 bucket to export findings to.+destination_bucketName :: Lens.Lens' Destination Prelude.Text+destination_bucketName = Lens.lens (\Destination' {bucketName} -> bucketName) (\s@Destination' {} a -> s {bucketName = a} :: Destination)++-- | The ARN of the KMS key used to encrypt data when exporting findings.+destination_kmsKeyArn :: Lens.Lens' Destination Prelude.Text+destination_kmsKeyArn = Lens.lens (\Destination' {kmsKeyArn} -> kmsKeyArn) (\s@Destination' {} a -> s {kmsKeyArn = a} :: Destination)++instance Data.FromJSON Destination where+ parseJSON =+ Data.withObject+ "Destination"+ ( \x ->+ Destination'+ Prelude.<$> (x Data..:? "keyPrefix")+ Prelude.<*> (x Data..: "bucketName")+ Prelude.<*> (x Data..: "kmsKeyArn")+ )++instance Prelude.Hashable Destination where+ hashWithSalt _salt Destination' {..} =+ _salt+ `Prelude.hashWithSalt` keyPrefix+ `Prelude.hashWithSalt` bucketName+ `Prelude.hashWithSalt` kmsKeyArn++instance Prelude.NFData Destination where+ rnf Destination' {..} =+ Prelude.rnf keyPrefix+ `Prelude.seq` Prelude.rnf bucketName+ `Prelude.seq` Prelude.rnf kmsKeyArn++instance Data.ToJSON Destination where+ toJSON Destination' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("keyPrefix" Data..=) Prelude.<$> keyPrefix,+ Prelude.Just ("bucketName" Data..= bucketName),+ Prelude.Just ("kmsKeyArn" Data..= kmsKeyArn)+ ]+ )
+ gen/Amazonka/Inspector2/Types/Ec2InstanceAggregation.hs view
@@ -0,0 +1,145 @@+{-# 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.Inspector2.Types.Ec2InstanceAggregation+-- 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.Inspector2.Types.Ec2InstanceAggregation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.Ec2InstanceSortBy+import Amazonka.Inspector2.Types.MapFilter+import Amazonka.Inspector2.Types.SortOrder+import Amazonka.Inspector2.Types.StringFilter+import qualified Amazonka.Prelude as Prelude++-- | The details that define an aggregation based on Amazon EC2 instances.+--+-- /See:/ 'newEc2InstanceAggregation' smart constructor.+data Ec2InstanceAggregation = Ec2InstanceAggregation'+ { -- | The AMI IDs associated with the Amazon EC2 instances to aggregate+ -- findings for.+ amis :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The Amazon EC2 instance IDs to aggregate findings for.+ instanceIds :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The Amazon EC2 instance tags to aggregate findings for.+ instanceTags :: Prelude.Maybe (Prelude.NonEmpty MapFilter),+ -- | The operating system types to aggregate findings for. Valid values must+ -- be uppercase and underscore separated, examples are @ORACLE_LINUX_7@ and+ -- @ALPINE_LINUX_3_8@.+ operatingSystems :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The value to sort results by.+ sortBy :: Prelude.Maybe Ec2InstanceSortBy,+ -- | The order to sort results by.+ sortOrder :: Prelude.Maybe SortOrder+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Ec2InstanceAggregation' 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:+--+-- 'amis', 'ec2InstanceAggregation_amis' - The AMI IDs associated with the Amazon EC2 instances to aggregate+-- findings for.+--+-- 'instanceIds', 'ec2InstanceAggregation_instanceIds' - The Amazon EC2 instance IDs to aggregate findings for.+--+-- 'instanceTags', 'ec2InstanceAggregation_instanceTags' - The Amazon EC2 instance tags to aggregate findings for.+--+-- 'operatingSystems', 'ec2InstanceAggregation_operatingSystems' - The operating system types to aggregate findings for. Valid values must+-- be uppercase and underscore separated, examples are @ORACLE_LINUX_7@ and+-- @ALPINE_LINUX_3_8@.+--+-- 'sortBy', 'ec2InstanceAggregation_sortBy' - The value to sort results by.+--+-- 'sortOrder', 'ec2InstanceAggregation_sortOrder' - The order to sort results by.+newEc2InstanceAggregation ::+ Ec2InstanceAggregation+newEc2InstanceAggregation =+ Ec2InstanceAggregation'+ { amis = Prelude.Nothing,+ instanceIds = Prelude.Nothing,+ instanceTags = Prelude.Nothing,+ operatingSystems = Prelude.Nothing,+ sortBy = Prelude.Nothing,+ sortOrder = Prelude.Nothing+ }++-- | The AMI IDs associated with the Amazon EC2 instances to aggregate+-- findings for.+ec2InstanceAggregation_amis :: Lens.Lens' Ec2InstanceAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+ec2InstanceAggregation_amis = Lens.lens (\Ec2InstanceAggregation' {amis} -> amis) (\s@Ec2InstanceAggregation' {} a -> s {amis = a} :: Ec2InstanceAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon EC2 instance IDs to aggregate findings for.+ec2InstanceAggregation_instanceIds :: Lens.Lens' Ec2InstanceAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+ec2InstanceAggregation_instanceIds = Lens.lens (\Ec2InstanceAggregation' {instanceIds} -> instanceIds) (\s@Ec2InstanceAggregation' {} a -> s {instanceIds = a} :: Ec2InstanceAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon EC2 instance tags to aggregate findings for.+ec2InstanceAggregation_instanceTags :: Lens.Lens' Ec2InstanceAggregation (Prelude.Maybe (Prelude.NonEmpty MapFilter))+ec2InstanceAggregation_instanceTags = Lens.lens (\Ec2InstanceAggregation' {instanceTags} -> instanceTags) (\s@Ec2InstanceAggregation' {} a -> s {instanceTags = a} :: Ec2InstanceAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The operating system types to aggregate findings for. Valid values must+-- be uppercase and underscore separated, examples are @ORACLE_LINUX_7@ and+-- @ALPINE_LINUX_3_8@.+ec2InstanceAggregation_operatingSystems :: Lens.Lens' Ec2InstanceAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+ec2InstanceAggregation_operatingSystems = Lens.lens (\Ec2InstanceAggregation' {operatingSystems} -> operatingSystems) (\s@Ec2InstanceAggregation' {} a -> s {operatingSystems = a} :: Ec2InstanceAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The value to sort results by.+ec2InstanceAggregation_sortBy :: Lens.Lens' Ec2InstanceAggregation (Prelude.Maybe Ec2InstanceSortBy)+ec2InstanceAggregation_sortBy = Lens.lens (\Ec2InstanceAggregation' {sortBy} -> sortBy) (\s@Ec2InstanceAggregation' {} a -> s {sortBy = a} :: Ec2InstanceAggregation)++-- | The order to sort results by.+ec2InstanceAggregation_sortOrder :: Lens.Lens' Ec2InstanceAggregation (Prelude.Maybe SortOrder)+ec2InstanceAggregation_sortOrder = Lens.lens (\Ec2InstanceAggregation' {sortOrder} -> sortOrder) (\s@Ec2InstanceAggregation' {} a -> s {sortOrder = a} :: Ec2InstanceAggregation)++instance Prelude.Hashable Ec2InstanceAggregation where+ hashWithSalt _salt Ec2InstanceAggregation' {..} =+ _salt+ `Prelude.hashWithSalt` amis+ `Prelude.hashWithSalt` instanceIds+ `Prelude.hashWithSalt` instanceTags+ `Prelude.hashWithSalt` operatingSystems+ `Prelude.hashWithSalt` sortBy+ `Prelude.hashWithSalt` sortOrder++instance Prelude.NFData Ec2InstanceAggregation where+ rnf Ec2InstanceAggregation' {..} =+ Prelude.rnf amis+ `Prelude.seq` Prelude.rnf instanceIds+ `Prelude.seq` Prelude.rnf instanceTags+ `Prelude.seq` Prelude.rnf operatingSystems+ `Prelude.seq` Prelude.rnf sortBy+ `Prelude.seq` Prelude.rnf sortOrder++instance Data.ToJSON Ec2InstanceAggregation where+ toJSON Ec2InstanceAggregation' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("amis" Data..=) Prelude.<$> amis,+ ("instanceIds" Data..=) Prelude.<$> instanceIds,+ ("instanceTags" Data..=) Prelude.<$> instanceTags,+ ("operatingSystems" Data..=)+ Prelude.<$> operatingSystems,+ ("sortBy" Data..=) Prelude.<$> sortBy,+ ("sortOrder" Data..=) Prelude.<$> sortOrder+ ]+ )
+ gen/Amazonka/Inspector2/Types/Ec2InstanceAggregationResponse.hs view
@@ -0,0 +1,157 @@+{-# 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.Inspector2.Types.Ec2InstanceAggregationResponse+-- 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.Inspector2.Types.Ec2InstanceAggregationResponse where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.SeverityCounts+import qualified Amazonka.Prelude as Prelude++-- | A response that contains the results of a finding aggregation by Amazon+-- EC2 instance.+--+-- /See:/ 'newEc2InstanceAggregationResponse' smart constructor.+data Ec2InstanceAggregationResponse = Ec2InstanceAggregationResponse'+ { -- | The Amazon Web Services account for the Amazon EC2 instance.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Machine Image (AMI) of the Amazon EC2 instance.+ ami :: Prelude.Maybe Prelude.Text,+ -- | The tags attached to the instance.+ instanceTags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The number of network findings for the Amazon EC2 instance.+ networkFindings :: Prelude.Maybe Prelude.Integer,+ -- | The operating system of the Amazon EC2 instance.+ operatingSystem :: Prelude.Maybe Prelude.Text,+ -- | An object that contains the count of matched findings per severity.+ severityCounts :: Prelude.Maybe SeverityCounts,+ -- | The Amazon EC2 instance ID.+ instanceId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Ec2InstanceAggregationResponse' 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', 'ec2InstanceAggregationResponse_accountId' - The Amazon Web Services account for the Amazon EC2 instance.+--+-- 'ami', 'ec2InstanceAggregationResponse_ami' - The Amazon Machine Image (AMI) of the Amazon EC2 instance.+--+-- 'instanceTags', 'ec2InstanceAggregationResponse_instanceTags' - The tags attached to the instance.+--+-- 'networkFindings', 'ec2InstanceAggregationResponse_networkFindings' - The number of network findings for the Amazon EC2 instance.+--+-- 'operatingSystem', 'ec2InstanceAggregationResponse_operatingSystem' - The operating system of the Amazon EC2 instance.+--+-- 'severityCounts', 'ec2InstanceAggregationResponse_severityCounts' - An object that contains the count of matched findings per severity.+--+-- 'instanceId', 'ec2InstanceAggregationResponse_instanceId' - The Amazon EC2 instance ID.+newEc2InstanceAggregationResponse ::+ -- | 'instanceId'+ Prelude.Text ->+ Ec2InstanceAggregationResponse+newEc2InstanceAggregationResponse pInstanceId_ =+ Ec2InstanceAggregationResponse'+ { accountId =+ Prelude.Nothing,+ ami = Prelude.Nothing,+ instanceTags = Prelude.Nothing,+ networkFindings = Prelude.Nothing,+ operatingSystem = Prelude.Nothing,+ severityCounts = Prelude.Nothing,+ instanceId = pInstanceId_+ }++-- | The Amazon Web Services account for the Amazon EC2 instance.+ec2InstanceAggregationResponse_accountId :: Lens.Lens' Ec2InstanceAggregationResponse (Prelude.Maybe Prelude.Text)+ec2InstanceAggregationResponse_accountId = Lens.lens (\Ec2InstanceAggregationResponse' {accountId} -> accountId) (\s@Ec2InstanceAggregationResponse' {} a -> s {accountId = a} :: Ec2InstanceAggregationResponse)++-- | The Amazon Machine Image (AMI) of the Amazon EC2 instance.+ec2InstanceAggregationResponse_ami :: Lens.Lens' Ec2InstanceAggregationResponse (Prelude.Maybe Prelude.Text)+ec2InstanceAggregationResponse_ami = Lens.lens (\Ec2InstanceAggregationResponse' {ami} -> ami) (\s@Ec2InstanceAggregationResponse' {} a -> s {ami = a} :: Ec2InstanceAggregationResponse)++-- | The tags attached to the instance.+ec2InstanceAggregationResponse_instanceTags :: Lens.Lens' Ec2InstanceAggregationResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+ec2InstanceAggregationResponse_instanceTags = Lens.lens (\Ec2InstanceAggregationResponse' {instanceTags} -> instanceTags) (\s@Ec2InstanceAggregationResponse' {} a -> s {instanceTags = a} :: Ec2InstanceAggregationResponse) Prelude.. Lens.mapping Lens.coerced++-- | The number of network findings for the Amazon EC2 instance.+ec2InstanceAggregationResponse_networkFindings :: Lens.Lens' Ec2InstanceAggregationResponse (Prelude.Maybe Prelude.Integer)+ec2InstanceAggregationResponse_networkFindings = Lens.lens (\Ec2InstanceAggregationResponse' {networkFindings} -> networkFindings) (\s@Ec2InstanceAggregationResponse' {} a -> s {networkFindings = a} :: Ec2InstanceAggregationResponse)++-- | The operating system of the Amazon EC2 instance.+ec2InstanceAggregationResponse_operatingSystem :: Lens.Lens' Ec2InstanceAggregationResponse (Prelude.Maybe Prelude.Text)+ec2InstanceAggregationResponse_operatingSystem = Lens.lens (\Ec2InstanceAggregationResponse' {operatingSystem} -> operatingSystem) (\s@Ec2InstanceAggregationResponse' {} a -> s {operatingSystem = a} :: Ec2InstanceAggregationResponse)++-- | An object that contains the count of matched findings per severity.+ec2InstanceAggregationResponse_severityCounts :: Lens.Lens' Ec2InstanceAggregationResponse (Prelude.Maybe SeverityCounts)+ec2InstanceAggregationResponse_severityCounts = Lens.lens (\Ec2InstanceAggregationResponse' {severityCounts} -> severityCounts) (\s@Ec2InstanceAggregationResponse' {} a -> s {severityCounts = a} :: Ec2InstanceAggregationResponse)++-- | The Amazon EC2 instance ID.+ec2InstanceAggregationResponse_instanceId :: Lens.Lens' Ec2InstanceAggregationResponse Prelude.Text+ec2InstanceAggregationResponse_instanceId = Lens.lens (\Ec2InstanceAggregationResponse' {instanceId} -> instanceId) (\s@Ec2InstanceAggregationResponse' {} a -> s {instanceId = a} :: Ec2InstanceAggregationResponse)++instance Data.FromJSON Ec2InstanceAggregationResponse where+ parseJSON =+ Data.withObject+ "Ec2InstanceAggregationResponse"+ ( \x ->+ Ec2InstanceAggregationResponse'+ Prelude.<$> (x Data..:? "accountId")+ Prelude.<*> (x Data..:? "ami")+ Prelude.<*> (x Data..:? "instanceTags" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "networkFindings")+ Prelude.<*> (x Data..:? "operatingSystem")+ Prelude.<*> (x Data..:? "severityCounts")+ Prelude.<*> (x Data..: "instanceId")+ )++instance+ Prelude.Hashable+ Ec2InstanceAggregationResponse+ where+ hashWithSalt+ _salt+ Ec2InstanceAggregationResponse' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` ami+ `Prelude.hashWithSalt` instanceTags+ `Prelude.hashWithSalt` networkFindings+ `Prelude.hashWithSalt` operatingSystem+ `Prelude.hashWithSalt` severityCounts+ `Prelude.hashWithSalt` instanceId++instance+ Prelude.NFData+ Ec2InstanceAggregationResponse+ where+ rnf Ec2InstanceAggregationResponse' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf ami+ `Prelude.seq` Prelude.rnf instanceTags+ `Prelude.seq` Prelude.rnf networkFindings+ `Prelude.seq` Prelude.rnf operatingSystem+ `Prelude.seq` Prelude.rnf severityCounts+ `Prelude.seq` Prelude.rnf instanceId
+ gen/Amazonka/Inspector2/Types/Ec2InstanceSortBy.hs view
@@ -0,0 +1,81 @@+{-# 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.Inspector2.Types.Ec2InstanceSortBy+-- 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.Inspector2.Types.Ec2InstanceSortBy+ ( Ec2InstanceSortBy+ ( ..,+ Ec2InstanceSortBy_ALL,+ Ec2InstanceSortBy_CRITICAL,+ Ec2InstanceSortBy_HIGH,+ Ec2InstanceSortBy_NETWORK_FINDINGS+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype Ec2InstanceSortBy = Ec2InstanceSortBy'+ { fromEc2InstanceSortBy ::+ 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 Ec2InstanceSortBy_ALL :: Ec2InstanceSortBy+pattern Ec2InstanceSortBy_ALL = Ec2InstanceSortBy' "ALL"++pattern Ec2InstanceSortBy_CRITICAL :: Ec2InstanceSortBy+pattern Ec2InstanceSortBy_CRITICAL = Ec2InstanceSortBy' "CRITICAL"++pattern Ec2InstanceSortBy_HIGH :: Ec2InstanceSortBy+pattern Ec2InstanceSortBy_HIGH = Ec2InstanceSortBy' "HIGH"++pattern Ec2InstanceSortBy_NETWORK_FINDINGS :: Ec2InstanceSortBy+pattern Ec2InstanceSortBy_NETWORK_FINDINGS = Ec2InstanceSortBy' "NETWORK_FINDINGS"++{-# COMPLETE+ Ec2InstanceSortBy_ALL,+ Ec2InstanceSortBy_CRITICAL,+ Ec2InstanceSortBy_HIGH,+ Ec2InstanceSortBy_NETWORK_FINDINGS,+ Ec2InstanceSortBy'+ #-}
+ gen/Amazonka/Inspector2/Types/Ec2Metadata.hs view
@@ -0,0 +1,97 @@+{-# 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.Inspector2.Types.Ec2Metadata+-- 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.Inspector2.Types.Ec2Metadata where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.Ec2Platform+import qualified Amazonka.Prelude as Prelude++-- | Meta data details of an Amazon EC2 instance.+--+-- /See:/ 'newEc2Metadata' smart constructor.+data Ec2Metadata = Ec2Metadata'+ { -- | The ID of the Amazon Machine Image (AMI) used to launch the instance.+ amiId :: Prelude.Maybe Prelude.Text,+ -- | The platform of the instance.+ platform :: Prelude.Maybe Ec2Platform,+ -- | The tags attached to the instance.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Ec2Metadata' 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:+--+-- 'amiId', 'ec2Metadata_amiId' - The ID of the Amazon Machine Image (AMI) used to launch the instance.+--+-- 'platform', 'ec2Metadata_platform' - The platform of the instance.+--+-- 'tags', 'ec2Metadata_tags' - The tags attached to the instance.+newEc2Metadata ::+ Ec2Metadata+newEc2Metadata =+ Ec2Metadata'+ { amiId = Prelude.Nothing,+ platform = Prelude.Nothing,+ tags = Prelude.Nothing+ }++-- | The ID of the Amazon Machine Image (AMI) used to launch the instance.+ec2Metadata_amiId :: Lens.Lens' Ec2Metadata (Prelude.Maybe Prelude.Text)+ec2Metadata_amiId = Lens.lens (\Ec2Metadata' {amiId} -> amiId) (\s@Ec2Metadata' {} a -> s {amiId = a} :: Ec2Metadata)++-- | The platform of the instance.+ec2Metadata_platform :: Lens.Lens' Ec2Metadata (Prelude.Maybe Ec2Platform)+ec2Metadata_platform = Lens.lens (\Ec2Metadata' {platform} -> platform) (\s@Ec2Metadata' {} a -> s {platform = a} :: Ec2Metadata)++-- | The tags attached to the instance.+ec2Metadata_tags :: Lens.Lens' Ec2Metadata (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+ec2Metadata_tags = Lens.lens (\Ec2Metadata' {tags} -> tags) (\s@Ec2Metadata' {} a -> s {tags = a} :: Ec2Metadata) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON Ec2Metadata where+ parseJSON =+ Data.withObject+ "Ec2Metadata"+ ( \x ->+ Ec2Metadata'+ Prelude.<$> (x Data..:? "amiId")+ Prelude.<*> (x Data..:? "platform")+ Prelude.<*> (x Data..:? "tags" Data..!= Prelude.mempty)+ )++instance Prelude.Hashable Ec2Metadata where+ hashWithSalt _salt Ec2Metadata' {..} =+ _salt+ `Prelude.hashWithSalt` amiId+ `Prelude.hashWithSalt` platform+ `Prelude.hashWithSalt` tags++instance Prelude.NFData Ec2Metadata where+ rnf Ec2Metadata' {..} =+ Prelude.rnf amiId+ `Prelude.seq` Prelude.rnf platform+ `Prelude.seq` Prelude.rnf tags
+ gen/Amazonka/Inspector2/Types/Ec2Platform.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.Inspector2.Types.Ec2Platform+-- 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.Inspector2.Types.Ec2Platform+ ( Ec2Platform+ ( ..,+ Ec2Platform_LINUX,+ Ec2Platform_UNKNOWN,+ Ec2Platform_WINDOWS+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype Ec2Platform = Ec2Platform'+ { fromEc2Platform ::+ 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 Ec2Platform_LINUX :: Ec2Platform+pattern Ec2Platform_LINUX = Ec2Platform' "LINUX"++pattern Ec2Platform_UNKNOWN :: Ec2Platform+pattern Ec2Platform_UNKNOWN = Ec2Platform' "UNKNOWN"++pattern Ec2Platform_WINDOWS :: Ec2Platform+pattern Ec2Platform_WINDOWS = Ec2Platform' "WINDOWS"++{-# COMPLETE+ Ec2Platform_LINUX,+ Ec2Platform_UNKNOWN,+ Ec2Platform_WINDOWS,+ Ec2Platform'+ #-}
+ gen/Amazonka/Inspector2/Types/EcrConfiguration.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.Inspector2.Types.EcrConfiguration+-- 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.Inspector2.Types.EcrConfiguration where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.EcrRescanDuration+import qualified Amazonka.Prelude as Prelude++-- | Details about the ECR automated re-scan duration setting for your+-- environment.+--+-- /See:/ 'newEcrConfiguration' smart constructor.+data EcrConfiguration = EcrConfiguration'+ { -- | The ECR automated re-scan duration defines how long an ECR image will be+ -- actively scanned by Amazon Inspector. When the number of days since an+ -- image was last pushed exceeds the automated re-scan duration the+ -- monitoring state of that image becomes @inactive@ and all associated+ -- findings are scheduled for closure.+ rescanDuration :: EcrRescanDuration+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EcrConfiguration' 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:+--+-- 'rescanDuration', 'ecrConfiguration_rescanDuration' - The ECR automated re-scan duration defines how long an ECR image will be+-- actively scanned by Amazon Inspector. When the number of days since an+-- image was last pushed exceeds the automated re-scan duration the+-- monitoring state of that image becomes @inactive@ and all associated+-- findings are scheduled for closure.+newEcrConfiguration ::+ -- | 'rescanDuration'+ EcrRescanDuration ->+ EcrConfiguration+newEcrConfiguration pRescanDuration_ =+ EcrConfiguration'+ { rescanDuration =+ pRescanDuration_+ }++-- | The ECR automated re-scan duration defines how long an ECR image will be+-- actively scanned by Amazon Inspector. When the number of days since an+-- image was last pushed exceeds the automated re-scan duration the+-- monitoring state of that image becomes @inactive@ and all associated+-- findings are scheduled for closure.+ecrConfiguration_rescanDuration :: Lens.Lens' EcrConfiguration EcrRescanDuration+ecrConfiguration_rescanDuration = Lens.lens (\EcrConfiguration' {rescanDuration} -> rescanDuration) (\s@EcrConfiguration' {} a -> s {rescanDuration = a} :: EcrConfiguration)++instance Prelude.Hashable EcrConfiguration where+ hashWithSalt _salt EcrConfiguration' {..} =+ _salt `Prelude.hashWithSalt` rescanDuration++instance Prelude.NFData EcrConfiguration where+ rnf EcrConfiguration' {..} =+ Prelude.rnf rescanDuration++instance Data.ToJSON EcrConfiguration where+ toJSON EcrConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("rescanDuration" Data..= rescanDuration)+ ]+ )
+ gen/Amazonka/Inspector2/Types/EcrConfigurationState.hs view
@@ -0,0 +1,76 @@+{-# 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.Inspector2.Types.EcrConfigurationState+-- 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.Inspector2.Types.EcrConfigurationState where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.EcrRescanDurationState+import qualified Amazonka.Prelude as Prelude++-- | Details about the state of the ECR scans for your environment.+--+-- /See:/ 'newEcrConfigurationState' smart constructor.+data EcrConfigurationState = EcrConfigurationState'+ { -- | An object that contains details about the state of the ECR automated+ -- re-scan setting.+ rescanDurationState :: Prelude.Maybe EcrRescanDurationState+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EcrConfigurationState' 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:+--+-- 'rescanDurationState', 'ecrConfigurationState_rescanDurationState' - An object that contains details about the state of the ECR automated+-- re-scan setting.+newEcrConfigurationState ::+ EcrConfigurationState+newEcrConfigurationState =+ EcrConfigurationState'+ { rescanDurationState =+ Prelude.Nothing+ }++-- | An object that contains details about the state of the ECR automated+-- re-scan setting.+ecrConfigurationState_rescanDurationState :: Lens.Lens' EcrConfigurationState (Prelude.Maybe EcrRescanDurationState)+ecrConfigurationState_rescanDurationState = Lens.lens (\EcrConfigurationState' {rescanDurationState} -> rescanDurationState) (\s@EcrConfigurationState' {} a -> s {rescanDurationState = a} :: EcrConfigurationState)++instance Data.FromJSON EcrConfigurationState where+ parseJSON =+ Data.withObject+ "EcrConfigurationState"+ ( \x ->+ EcrConfigurationState'+ Prelude.<$> (x Data..:? "rescanDurationState")+ )++instance Prelude.Hashable EcrConfigurationState where+ hashWithSalt _salt EcrConfigurationState' {..} =+ _salt `Prelude.hashWithSalt` rescanDurationState++instance Prelude.NFData EcrConfigurationState where+ rnf EcrConfigurationState' {..} =+ Prelude.rnf rescanDurationState
+ gen/Amazonka/Inspector2/Types/EcrContainerImageMetadata.hs view
@@ -0,0 +1,68 @@+{-# 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.Inspector2.Types.EcrContainerImageMetadata+-- 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.Inspector2.Types.EcrContainerImageMetadata 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 Amazon ECR image metadata associated with a finding.+--+-- /See:/ 'newEcrContainerImageMetadata' smart constructor.+data EcrContainerImageMetadata = EcrContainerImageMetadata'+ { -- | Tags associated with the Amazon ECR image metadata.+ tags :: Prelude.Maybe [Prelude.Text]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EcrContainerImageMetadata' 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', 'ecrContainerImageMetadata_tags' - Tags associated with the Amazon ECR image metadata.+newEcrContainerImageMetadata ::+ EcrContainerImageMetadata+newEcrContainerImageMetadata =+ EcrContainerImageMetadata' {tags = Prelude.Nothing}++-- | Tags associated with the Amazon ECR image metadata.+ecrContainerImageMetadata_tags :: Lens.Lens' EcrContainerImageMetadata (Prelude.Maybe [Prelude.Text])+ecrContainerImageMetadata_tags = Lens.lens (\EcrContainerImageMetadata' {tags} -> tags) (\s@EcrContainerImageMetadata' {} a -> s {tags = a} :: EcrContainerImageMetadata) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON EcrContainerImageMetadata where+ parseJSON =+ Data.withObject+ "EcrContainerImageMetadata"+ ( \x ->+ EcrContainerImageMetadata'+ Prelude.<$> (x Data..:? "tags" Data..!= Prelude.mempty)+ )++instance Prelude.Hashable EcrContainerImageMetadata where+ hashWithSalt _salt EcrContainerImageMetadata' {..} =+ _salt `Prelude.hashWithSalt` tags++instance Prelude.NFData EcrContainerImageMetadata where+ rnf EcrContainerImageMetadata' {..} = Prelude.rnf tags
+ gen/Amazonka/Inspector2/Types/EcrRepositoryMetadata.hs view
@@ -0,0 +1,86 @@+{-# 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.Inspector2.Types.EcrRepositoryMetadata+-- 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.Inspector2.Types.EcrRepositoryMetadata where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.EcrScanFrequency+import qualified Amazonka.Prelude as Prelude++-- | Information on the Amazon ECR repository metadata associated with a+-- finding.+--+-- /See:/ 'newEcrRepositoryMetadata' smart constructor.+data EcrRepositoryMetadata = EcrRepositoryMetadata'+ { -- | The name of the Amazon ECR repository.+ name :: Prelude.Maybe Prelude.Text,+ -- | The frequency of scans.+ scanFrequency :: Prelude.Maybe EcrScanFrequency+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EcrRepositoryMetadata' 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:+--+-- 'name', 'ecrRepositoryMetadata_name' - The name of the Amazon ECR repository.+--+-- 'scanFrequency', 'ecrRepositoryMetadata_scanFrequency' - The frequency of scans.+newEcrRepositoryMetadata ::+ EcrRepositoryMetadata+newEcrRepositoryMetadata =+ EcrRepositoryMetadata'+ { name = Prelude.Nothing,+ scanFrequency = Prelude.Nothing+ }++-- | The name of the Amazon ECR repository.+ecrRepositoryMetadata_name :: Lens.Lens' EcrRepositoryMetadata (Prelude.Maybe Prelude.Text)+ecrRepositoryMetadata_name = Lens.lens (\EcrRepositoryMetadata' {name} -> name) (\s@EcrRepositoryMetadata' {} a -> s {name = a} :: EcrRepositoryMetadata)++-- | The frequency of scans.+ecrRepositoryMetadata_scanFrequency :: Lens.Lens' EcrRepositoryMetadata (Prelude.Maybe EcrScanFrequency)+ecrRepositoryMetadata_scanFrequency = Lens.lens (\EcrRepositoryMetadata' {scanFrequency} -> scanFrequency) (\s@EcrRepositoryMetadata' {} a -> s {scanFrequency = a} :: EcrRepositoryMetadata)++instance Data.FromJSON EcrRepositoryMetadata where+ parseJSON =+ Data.withObject+ "EcrRepositoryMetadata"+ ( \x ->+ EcrRepositoryMetadata'+ Prelude.<$> (x Data..:? "name")+ Prelude.<*> (x Data..:? "scanFrequency")+ )++instance Prelude.Hashable EcrRepositoryMetadata where+ hashWithSalt _salt EcrRepositoryMetadata' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` scanFrequency++instance Prelude.NFData EcrRepositoryMetadata where+ rnf EcrRepositoryMetadata' {..} =+ Prelude.rnf name+ `Prelude.seq` Prelude.rnf scanFrequency
+ gen/Amazonka/Inspector2/Types/EcrRescanDuration.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.Inspector2.Types.EcrRescanDuration+-- 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.Inspector2.Types.EcrRescanDuration+ ( EcrRescanDuration+ ( ..,+ EcrRescanDuration_DAYS_180,+ EcrRescanDuration_DAYS_30,+ EcrRescanDuration_LIFETIME+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype EcrRescanDuration = EcrRescanDuration'+ { fromEcrRescanDuration ::+ 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 EcrRescanDuration_DAYS_180 :: EcrRescanDuration+pattern EcrRescanDuration_DAYS_180 = EcrRescanDuration' "DAYS_180"++pattern EcrRescanDuration_DAYS_30 :: EcrRescanDuration+pattern EcrRescanDuration_DAYS_30 = EcrRescanDuration' "DAYS_30"++pattern EcrRescanDuration_LIFETIME :: EcrRescanDuration+pattern EcrRescanDuration_LIFETIME = EcrRescanDuration' "LIFETIME"++{-# COMPLETE+ EcrRescanDuration_DAYS_180,+ EcrRescanDuration_DAYS_30,+ EcrRescanDuration_LIFETIME,+ EcrRescanDuration'+ #-}
+ gen/Amazonka/Inspector2/Types/EcrRescanDurationState.hs view
@@ -0,0 +1,115 @@+{-# 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.Inspector2.Types.EcrRescanDurationState+-- 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.Inspector2.Types.EcrRescanDurationState where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.EcrRescanDuration+import Amazonka.Inspector2.Types.EcrRescanDurationStatus+import qualified Amazonka.Prelude as Prelude++-- | Details about the state of any changes to the ECR automated re-scan+-- duration setting.+--+-- /See:/ 'newEcrRescanDurationState' smart constructor.+data EcrRescanDurationState = EcrRescanDurationState'+ { -- | The ECR automated re-scan duration defines how long an ECR image will be+ -- actively scanned by Amazon Inspector. When the number of days since an+ -- image was last pushed exceeds the automated re-scan duration the+ -- monitoring state of that image becomes @inactive@ and all associated+ -- findings are scheduled for closure.+ rescanDuration :: Prelude.Maybe EcrRescanDuration,+ -- | The status of changes to the ECR automated re-scan duration.+ status :: Prelude.Maybe EcrRescanDurationStatus,+ -- | A timestamp representing when the last time the ECR scan duration+ -- setting was changed.+ updatedAt :: Prelude.Maybe Data.POSIX+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EcrRescanDurationState' 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:+--+-- 'rescanDuration', 'ecrRescanDurationState_rescanDuration' - The ECR automated re-scan duration defines how long an ECR image will be+-- actively scanned by Amazon Inspector. When the number of days since an+-- image was last pushed exceeds the automated re-scan duration the+-- monitoring state of that image becomes @inactive@ and all associated+-- findings are scheduled for closure.+--+-- 'status', 'ecrRescanDurationState_status' - The status of changes to the ECR automated re-scan duration.+--+-- 'updatedAt', 'ecrRescanDurationState_updatedAt' - A timestamp representing when the last time the ECR scan duration+-- setting was changed.+newEcrRescanDurationState ::+ EcrRescanDurationState+newEcrRescanDurationState =+ EcrRescanDurationState'+ { rescanDuration =+ Prelude.Nothing,+ status = Prelude.Nothing,+ updatedAt = Prelude.Nothing+ }++-- | The ECR automated re-scan duration defines how long an ECR image will be+-- actively scanned by Amazon Inspector. When the number of days since an+-- image was last pushed exceeds the automated re-scan duration the+-- monitoring state of that image becomes @inactive@ and all associated+-- findings are scheduled for closure.+ecrRescanDurationState_rescanDuration :: Lens.Lens' EcrRescanDurationState (Prelude.Maybe EcrRescanDuration)+ecrRescanDurationState_rescanDuration = Lens.lens (\EcrRescanDurationState' {rescanDuration} -> rescanDuration) (\s@EcrRescanDurationState' {} a -> s {rescanDuration = a} :: EcrRescanDurationState)++-- | The status of changes to the ECR automated re-scan duration.+ecrRescanDurationState_status :: Lens.Lens' EcrRescanDurationState (Prelude.Maybe EcrRescanDurationStatus)+ecrRescanDurationState_status = Lens.lens (\EcrRescanDurationState' {status} -> status) (\s@EcrRescanDurationState' {} a -> s {status = a} :: EcrRescanDurationState)++-- | A timestamp representing when the last time the ECR scan duration+-- setting was changed.+ecrRescanDurationState_updatedAt :: Lens.Lens' EcrRescanDurationState (Prelude.Maybe Prelude.UTCTime)+ecrRescanDurationState_updatedAt = Lens.lens (\EcrRescanDurationState' {updatedAt} -> updatedAt) (\s@EcrRescanDurationState' {} a -> s {updatedAt = a} :: EcrRescanDurationState) Prelude.. Lens.mapping Data._Time++instance Data.FromJSON EcrRescanDurationState where+ parseJSON =+ Data.withObject+ "EcrRescanDurationState"+ ( \x ->+ EcrRescanDurationState'+ Prelude.<$> (x Data..:? "rescanDuration")+ Prelude.<*> (x Data..:? "status")+ Prelude.<*> (x Data..:? "updatedAt")+ )++instance Prelude.Hashable EcrRescanDurationState where+ hashWithSalt _salt EcrRescanDurationState' {..} =+ _salt+ `Prelude.hashWithSalt` rescanDuration+ `Prelude.hashWithSalt` status+ `Prelude.hashWithSalt` updatedAt++instance Prelude.NFData EcrRescanDurationState where+ rnf EcrRescanDurationState' {..} =+ Prelude.rnf rescanDuration+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf updatedAt
+ gen/Amazonka/Inspector2/Types/EcrRescanDurationStatus.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.Inspector2.Types.EcrRescanDurationStatus+-- 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.Inspector2.Types.EcrRescanDurationStatus+ ( EcrRescanDurationStatus+ ( ..,+ EcrRescanDurationStatus_FAILED,+ EcrRescanDurationStatus_PENDING,+ EcrRescanDurationStatus_SUCCESS+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype EcrRescanDurationStatus = EcrRescanDurationStatus'+ { fromEcrRescanDurationStatus ::+ 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 EcrRescanDurationStatus_FAILED :: EcrRescanDurationStatus+pattern EcrRescanDurationStatus_FAILED = EcrRescanDurationStatus' "FAILED"++pattern EcrRescanDurationStatus_PENDING :: EcrRescanDurationStatus+pattern EcrRescanDurationStatus_PENDING = EcrRescanDurationStatus' "PENDING"++pattern EcrRescanDurationStatus_SUCCESS :: EcrRescanDurationStatus+pattern EcrRescanDurationStatus_SUCCESS = EcrRescanDurationStatus' "SUCCESS"++{-# COMPLETE+ EcrRescanDurationStatus_FAILED,+ EcrRescanDurationStatus_PENDING,+ EcrRescanDurationStatus_SUCCESS,+ EcrRescanDurationStatus'+ #-}
+ gen/Amazonka/Inspector2/Types/EcrScanFrequency.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.Inspector2.Types.EcrScanFrequency+-- 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.Inspector2.Types.EcrScanFrequency+ ( EcrScanFrequency+ ( ..,+ EcrScanFrequency_CONTINUOUS_SCAN,+ EcrScanFrequency_MANUAL,+ EcrScanFrequency_SCAN_ON_PUSH+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype EcrScanFrequency = EcrScanFrequency'+ { fromEcrScanFrequency ::+ 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 EcrScanFrequency_CONTINUOUS_SCAN :: EcrScanFrequency+pattern EcrScanFrequency_CONTINUOUS_SCAN = EcrScanFrequency' "CONTINUOUS_SCAN"++pattern EcrScanFrequency_MANUAL :: EcrScanFrequency+pattern EcrScanFrequency_MANUAL = EcrScanFrequency' "MANUAL"++pattern EcrScanFrequency_SCAN_ON_PUSH :: EcrScanFrequency+pattern EcrScanFrequency_SCAN_ON_PUSH = EcrScanFrequency' "SCAN_ON_PUSH"++{-# COMPLETE+ EcrScanFrequency_CONTINUOUS_SCAN,+ EcrScanFrequency_MANUAL,+ EcrScanFrequency_SCAN_ON_PUSH,+ EcrScanFrequency'+ #-}
+ gen/Amazonka/Inspector2/Types/ErrorCode.hs view
@@ -0,0 +1,131 @@+{-# 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.Inspector2.Types.ErrorCode+-- 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.Inspector2.Types.ErrorCode+ ( ErrorCode+ ( ..,+ ErrorCode_ACCESS_DENIED,+ ErrorCode_ACCOUNT_IS_ISOLATED,+ ErrorCode_ALREADY_ENABLED,+ ErrorCode_DISABLE_IN_PROGRESS,+ ErrorCode_DISASSOCIATE_ALL_MEMBERS,+ ErrorCode_ENABLE_IN_PROGRESS,+ ErrorCode_EVENTBRIDGE_THROTTLED,+ ErrorCode_EVENTBRIDGE_UNAVAILABLE,+ ErrorCode_INTERNAL_ERROR,+ ErrorCode_RESOURCE_NOT_FOUND,+ ErrorCode_RESOURCE_SCAN_NOT_DISABLED,+ ErrorCode_SSM_THROTTLED,+ ErrorCode_SSM_UNAVAILABLE,+ ErrorCode_SUSPEND_IN_PROGRESS+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ErrorCode = ErrorCode'+ { fromErrorCode ::+ 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 ErrorCode_ACCESS_DENIED :: ErrorCode+pattern ErrorCode_ACCESS_DENIED = ErrorCode' "ACCESS_DENIED"++pattern ErrorCode_ACCOUNT_IS_ISOLATED :: ErrorCode+pattern ErrorCode_ACCOUNT_IS_ISOLATED = ErrorCode' "ACCOUNT_IS_ISOLATED"++pattern ErrorCode_ALREADY_ENABLED :: ErrorCode+pattern ErrorCode_ALREADY_ENABLED = ErrorCode' "ALREADY_ENABLED"++pattern ErrorCode_DISABLE_IN_PROGRESS :: ErrorCode+pattern ErrorCode_DISABLE_IN_PROGRESS = ErrorCode' "DISABLE_IN_PROGRESS"++pattern ErrorCode_DISASSOCIATE_ALL_MEMBERS :: ErrorCode+pattern ErrorCode_DISASSOCIATE_ALL_MEMBERS = ErrorCode' "DISASSOCIATE_ALL_MEMBERS"++pattern ErrorCode_ENABLE_IN_PROGRESS :: ErrorCode+pattern ErrorCode_ENABLE_IN_PROGRESS = ErrorCode' "ENABLE_IN_PROGRESS"++pattern ErrorCode_EVENTBRIDGE_THROTTLED :: ErrorCode+pattern ErrorCode_EVENTBRIDGE_THROTTLED = ErrorCode' "EVENTBRIDGE_THROTTLED"++pattern ErrorCode_EVENTBRIDGE_UNAVAILABLE :: ErrorCode+pattern ErrorCode_EVENTBRIDGE_UNAVAILABLE = ErrorCode' "EVENTBRIDGE_UNAVAILABLE"++pattern ErrorCode_INTERNAL_ERROR :: ErrorCode+pattern ErrorCode_INTERNAL_ERROR = ErrorCode' "INTERNAL_ERROR"++pattern ErrorCode_RESOURCE_NOT_FOUND :: ErrorCode+pattern ErrorCode_RESOURCE_NOT_FOUND = ErrorCode' "RESOURCE_NOT_FOUND"++pattern ErrorCode_RESOURCE_SCAN_NOT_DISABLED :: ErrorCode+pattern ErrorCode_RESOURCE_SCAN_NOT_DISABLED = ErrorCode' "RESOURCE_SCAN_NOT_DISABLED"++pattern ErrorCode_SSM_THROTTLED :: ErrorCode+pattern ErrorCode_SSM_THROTTLED = ErrorCode' "SSM_THROTTLED"++pattern ErrorCode_SSM_UNAVAILABLE :: ErrorCode+pattern ErrorCode_SSM_UNAVAILABLE = ErrorCode' "SSM_UNAVAILABLE"++pattern ErrorCode_SUSPEND_IN_PROGRESS :: ErrorCode+pattern ErrorCode_SUSPEND_IN_PROGRESS = ErrorCode' "SUSPEND_IN_PROGRESS"++{-# COMPLETE+ ErrorCode_ACCESS_DENIED,+ ErrorCode_ACCOUNT_IS_ISOLATED,+ ErrorCode_ALREADY_ENABLED,+ ErrorCode_DISABLE_IN_PROGRESS,+ ErrorCode_DISASSOCIATE_ALL_MEMBERS,+ ErrorCode_ENABLE_IN_PROGRESS,+ ErrorCode_EVENTBRIDGE_THROTTLED,+ ErrorCode_EVENTBRIDGE_UNAVAILABLE,+ ErrorCode_INTERNAL_ERROR,+ ErrorCode_RESOURCE_NOT_FOUND,+ ErrorCode_RESOURCE_SCAN_NOT_DISABLED,+ ErrorCode_SSM_THROTTLED,+ ErrorCode_SSM_UNAVAILABLE,+ ErrorCode_SUSPEND_IN_PROGRESS,+ ErrorCode'+ #-}
+ gen/Amazonka/Inspector2/Types/ExploitAvailable.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.Inspector2.Types.ExploitAvailable+-- 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.Inspector2.Types.ExploitAvailable+ ( ExploitAvailable+ ( ..,+ ExploitAvailable_NO,+ ExploitAvailable_YES+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ExploitAvailable = ExploitAvailable'+ { fromExploitAvailable ::+ 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 ExploitAvailable_NO :: ExploitAvailable+pattern ExploitAvailable_NO = ExploitAvailable' "NO"++pattern ExploitAvailable_YES :: ExploitAvailable+pattern ExploitAvailable_YES = ExploitAvailable' "YES"++{-# COMPLETE+ ExploitAvailable_NO,+ ExploitAvailable_YES,+ ExploitAvailable'+ #-}
+ gen/Amazonka/Inspector2/Types/ExploitabilityDetails.hs view
@@ -0,0 +1,76 @@+{-# 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.Inspector2.Types.ExploitabilityDetails+-- 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.Inspector2.Types.ExploitabilityDetails 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++-- | The details of an exploit available for a finding discovered in your+-- environment.+--+-- /See:/ 'newExploitabilityDetails' smart constructor.+data ExploitabilityDetails = ExploitabilityDetails'+ { -- | The date and time of the last exploit associated with a finding+ -- discovered in your environment.+ lastKnownExploitAt :: Prelude.Maybe Data.POSIX+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ExploitabilityDetails' 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:+--+-- 'lastKnownExploitAt', 'exploitabilityDetails_lastKnownExploitAt' - The date and time of the last exploit associated with a finding+-- discovered in your environment.+newExploitabilityDetails ::+ ExploitabilityDetails+newExploitabilityDetails =+ ExploitabilityDetails'+ { lastKnownExploitAt =+ Prelude.Nothing+ }++-- | The date and time of the last exploit associated with a finding+-- discovered in your environment.+exploitabilityDetails_lastKnownExploitAt :: Lens.Lens' ExploitabilityDetails (Prelude.Maybe Prelude.UTCTime)+exploitabilityDetails_lastKnownExploitAt = Lens.lens (\ExploitabilityDetails' {lastKnownExploitAt} -> lastKnownExploitAt) (\s@ExploitabilityDetails' {} a -> s {lastKnownExploitAt = a} :: ExploitabilityDetails) Prelude.. Lens.mapping Data._Time++instance Data.FromJSON ExploitabilityDetails where+ parseJSON =+ Data.withObject+ "ExploitabilityDetails"+ ( \x ->+ ExploitabilityDetails'+ Prelude.<$> (x Data..:? "lastKnownExploitAt")+ )++instance Prelude.Hashable ExploitabilityDetails where+ hashWithSalt _salt ExploitabilityDetails' {..} =+ _salt `Prelude.hashWithSalt` lastKnownExploitAt++instance Prelude.NFData ExploitabilityDetails where+ rnf ExploitabilityDetails' {..} =+ Prelude.rnf lastKnownExploitAt
+ gen/Amazonka/Inspector2/Types/ExternalReportStatus.hs view
@@ -0,0 +1,81 @@+{-# 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.Inspector2.Types.ExternalReportStatus+-- 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.Inspector2.Types.ExternalReportStatus+ ( ExternalReportStatus+ ( ..,+ ExternalReportStatus_CANCELLED,+ ExternalReportStatus_FAILED,+ ExternalReportStatus_IN_PROGRESS,+ ExternalReportStatus_SUCCEEDED+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ExternalReportStatus = ExternalReportStatus'+ { fromExternalReportStatus ::+ 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 ExternalReportStatus_CANCELLED :: ExternalReportStatus+pattern ExternalReportStatus_CANCELLED = ExternalReportStatus' "CANCELLED"++pattern ExternalReportStatus_FAILED :: ExternalReportStatus+pattern ExternalReportStatus_FAILED = ExternalReportStatus' "FAILED"++pattern ExternalReportStatus_IN_PROGRESS :: ExternalReportStatus+pattern ExternalReportStatus_IN_PROGRESS = ExternalReportStatus' "IN_PROGRESS"++pattern ExternalReportStatus_SUCCEEDED :: ExternalReportStatus+pattern ExternalReportStatus_SUCCEEDED = ExternalReportStatus' "SUCCEEDED"++{-# COMPLETE+ ExternalReportStatus_CANCELLED,+ ExternalReportStatus_FAILED,+ ExternalReportStatus_IN_PROGRESS,+ ExternalReportStatus_SUCCEEDED,+ ExternalReportStatus'+ #-}
+ gen/Amazonka/Inspector2/Types/FailedAccount.hs view
@@ -0,0 +1,142 @@+{-# 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.Inspector2.Types.FailedAccount+-- 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.Inspector2.Types.FailedAccount where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.ErrorCode+import Amazonka.Inspector2.Types.ResourceStatus+import Amazonka.Inspector2.Types.Status+import qualified Amazonka.Prelude as Prelude++-- | An object with details on why an account failed to enable Amazon+-- Inspector.+--+-- /See:/ 'newFailedAccount' smart constructor.+data FailedAccount = FailedAccount'+ { -- | An object detailing which resources Amazon Inspector is enabled to scan+ -- for the account.+ resourceStatus :: Prelude.Maybe ResourceStatus,+ -- | The status of Amazon Inspector for the account.+ status :: Prelude.Maybe Status,+ -- | The Amazon Web Services account ID.+ accountId :: Prelude.Text,+ -- | The error code explaining why the account failed to enable Amazon+ -- Inspector.+ errorCode :: ErrorCode,+ -- | The error message received when the account failed to enable Amazon+ -- Inspector.+ errorMessage :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'FailedAccount' 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:+--+-- 'resourceStatus', 'failedAccount_resourceStatus' - An object detailing which resources Amazon Inspector is enabled to scan+-- for the account.+--+-- 'status', 'failedAccount_status' - The status of Amazon Inspector for the account.+--+-- 'accountId', 'failedAccount_accountId' - The Amazon Web Services account ID.+--+-- 'errorCode', 'failedAccount_errorCode' - The error code explaining why the account failed to enable Amazon+-- Inspector.+--+-- 'errorMessage', 'failedAccount_errorMessage' - The error message received when the account failed to enable Amazon+-- Inspector.+newFailedAccount ::+ -- | 'accountId'+ Prelude.Text ->+ -- | 'errorCode'+ ErrorCode ->+ -- | 'errorMessage'+ Prelude.Text ->+ FailedAccount+newFailedAccount+ pAccountId_+ pErrorCode_+ pErrorMessage_ =+ FailedAccount'+ { resourceStatus = Prelude.Nothing,+ status = Prelude.Nothing,+ accountId = pAccountId_,+ errorCode = pErrorCode_,+ errorMessage = pErrorMessage_+ }++-- | An object detailing which resources Amazon Inspector is enabled to scan+-- for the account.+failedAccount_resourceStatus :: Lens.Lens' FailedAccount (Prelude.Maybe ResourceStatus)+failedAccount_resourceStatus = Lens.lens (\FailedAccount' {resourceStatus} -> resourceStatus) (\s@FailedAccount' {} a -> s {resourceStatus = a} :: FailedAccount)++-- | The status of Amazon Inspector for the account.+failedAccount_status :: Lens.Lens' FailedAccount (Prelude.Maybe Status)+failedAccount_status = Lens.lens (\FailedAccount' {status} -> status) (\s@FailedAccount' {} a -> s {status = a} :: FailedAccount)++-- | The Amazon Web Services account ID.+failedAccount_accountId :: Lens.Lens' FailedAccount Prelude.Text+failedAccount_accountId = Lens.lens (\FailedAccount' {accountId} -> accountId) (\s@FailedAccount' {} a -> s {accountId = a} :: FailedAccount)++-- | The error code explaining why the account failed to enable Amazon+-- Inspector.+failedAccount_errorCode :: Lens.Lens' FailedAccount ErrorCode+failedAccount_errorCode = Lens.lens (\FailedAccount' {errorCode} -> errorCode) (\s@FailedAccount' {} a -> s {errorCode = a} :: FailedAccount)++-- | The error message received when the account failed to enable Amazon+-- Inspector.+failedAccount_errorMessage :: Lens.Lens' FailedAccount Prelude.Text+failedAccount_errorMessage = Lens.lens (\FailedAccount' {errorMessage} -> errorMessage) (\s@FailedAccount' {} a -> s {errorMessage = a} :: FailedAccount)++instance Data.FromJSON FailedAccount where+ parseJSON =+ Data.withObject+ "FailedAccount"+ ( \x ->+ FailedAccount'+ Prelude.<$> (x Data..:? "resourceStatus")+ Prelude.<*> (x Data..:? "status")+ Prelude.<*> (x Data..: "accountId")+ Prelude.<*> (x Data..: "errorCode")+ Prelude.<*> (x Data..: "errorMessage")+ )++instance Prelude.Hashable FailedAccount where+ hashWithSalt _salt FailedAccount' {..} =+ _salt+ `Prelude.hashWithSalt` resourceStatus+ `Prelude.hashWithSalt` status+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` errorCode+ `Prelude.hashWithSalt` errorMessage++instance Prelude.NFData FailedAccount where+ rnf FailedAccount' {..} =+ Prelude.rnf resourceStatus+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf errorCode+ `Prelude.seq` Prelude.rnf errorMessage
+ gen/Amazonka/Inspector2/Types/Filter.hs view
@@ -0,0 +1,206 @@+{-# 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.Inspector2.Types.Filter+-- 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.Inspector2.Types.Filter where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.FilterAction+import Amazonka.Inspector2.Types.FilterCriteria+import qualified Amazonka.Prelude as Prelude++-- | Details about a filter.+--+-- /See:/ 'newFilter' smart constructor.+data Filter = Filter'+ { -- | A description of the filter.+ description :: Prelude.Maybe Prelude.Text,+ -- | The reason for the filter.+ reason :: Prelude.Maybe Prelude.Text,+ -- | The tags attached to the filter.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The action that is to be applied to the findings that match the filter.+ action :: FilterAction,+ -- | The Amazon Resource Number (ARN) associated with this filter.+ arn :: Prelude.Text,+ -- | The date and time this filter was created at.+ createdAt :: Data.POSIX,+ -- | Details on the filter criteria associated with this filter.+ criteria :: FilterCriteria,+ -- | The name of the filter.+ name :: Prelude.Text,+ -- | The Amazon Web Services account ID of the account that created the+ -- filter.+ ownerId :: Prelude.Text,+ -- | The date and time the filter was last updated at.+ updatedAt :: Data.POSIX+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Filter' 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:+--+-- 'description', 'filter_description' - A description of the filter.+--+-- 'reason', 'filter_reason' - The reason for the filter.+--+-- 'tags', 'filter_tags' - The tags attached to the filter.+--+-- 'action', 'filter_action' - The action that is to be applied to the findings that match the filter.+--+-- 'arn', 'filter_arn' - The Amazon Resource Number (ARN) associated with this filter.+--+-- 'createdAt', 'filter_createdAt' - The date and time this filter was created at.+--+-- 'criteria', 'filter_criteria' - Details on the filter criteria associated with this filter.+--+-- 'name', 'filter_name' - The name of the filter.+--+-- 'ownerId', 'filter_ownerId' - The Amazon Web Services account ID of the account that created the+-- filter.+--+-- 'updatedAt', 'filter_updatedAt' - The date and time the filter was last updated at.+newFilter ::+ -- | 'action'+ FilterAction ->+ -- | 'arn'+ Prelude.Text ->+ -- | 'createdAt'+ Prelude.UTCTime ->+ -- | 'criteria'+ FilterCriteria ->+ -- | 'name'+ Prelude.Text ->+ -- | 'ownerId'+ Prelude.Text ->+ -- | 'updatedAt'+ Prelude.UTCTime ->+ Filter+newFilter+ pAction_+ pArn_+ pCreatedAt_+ pCriteria_+ pName_+ pOwnerId_+ pUpdatedAt_ =+ Filter'+ { description = Prelude.Nothing,+ reason = Prelude.Nothing,+ tags = Prelude.Nothing,+ action = pAction_,+ arn = pArn_,+ createdAt = Data._Time Lens.# pCreatedAt_,+ criteria = pCriteria_,+ name = pName_,+ ownerId = pOwnerId_,+ updatedAt = Data._Time Lens.# pUpdatedAt_+ }++-- | A description of the filter.+filter_description :: Lens.Lens' Filter (Prelude.Maybe Prelude.Text)+filter_description = Lens.lens (\Filter' {description} -> description) (\s@Filter' {} a -> s {description = a} :: Filter)++-- | The reason for the filter.+filter_reason :: Lens.Lens' Filter (Prelude.Maybe Prelude.Text)+filter_reason = Lens.lens (\Filter' {reason} -> reason) (\s@Filter' {} a -> s {reason = a} :: Filter)++-- | The tags attached to the filter.+filter_tags :: Lens.Lens' Filter (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+filter_tags = Lens.lens (\Filter' {tags} -> tags) (\s@Filter' {} a -> s {tags = a} :: Filter) Prelude.. Lens.mapping Lens.coerced++-- | The action that is to be applied to the findings that match the filter.+filter_action :: Lens.Lens' Filter FilterAction+filter_action = Lens.lens (\Filter' {action} -> action) (\s@Filter' {} a -> s {action = a} :: Filter)++-- | The Amazon Resource Number (ARN) associated with this filter.+filter_arn :: Lens.Lens' Filter Prelude.Text+filter_arn = Lens.lens (\Filter' {arn} -> arn) (\s@Filter' {} a -> s {arn = a} :: Filter)++-- | The date and time this filter was created at.+filter_createdAt :: Lens.Lens' Filter Prelude.UTCTime+filter_createdAt = Lens.lens (\Filter' {createdAt} -> createdAt) (\s@Filter' {} a -> s {createdAt = a} :: Filter) Prelude.. Data._Time++-- | Details on the filter criteria associated with this filter.+filter_criteria :: Lens.Lens' Filter FilterCriteria+filter_criteria = Lens.lens (\Filter' {criteria} -> criteria) (\s@Filter' {} a -> s {criteria = a} :: Filter)++-- | The name of the filter.+filter_name :: Lens.Lens' Filter Prelude.Text+filter_name = Lens.lens (\Filter' {name} -> name) (\s@Filter' {} a -> s {name = a} :: Filter)++-- | The Amazon Web Services account ID of the account that created the+-- filter.+filter_ownerId :: Lens.Lens' Filter Prelude.Text+filter_ownerId = Lens.lens (\Filter' {ownerId} -> ownerId) (\s@Filter' {} a -> s {ownerId = a} :: Filter)++-- | The date and time the filter was last updated at.+filter_updatedAt :: Lens.Lens' Filter Prelude.UTCTime+filter_updatedAt = Lens.lens (\Filter' {updatedAt} -> updatedAt) (\s@Filter' {} a -> s {updatedAt = a} :: Filter) Prelude.. Data._Time++instance Data.FromJSON Filter where+ parseJSON =+ Data.withObject+ "Filter"+ ( \x ->+ Filter'+ Prelude.<$> (x Data..:? "description")+ Prelude.<*> (x Data..:? "reason")+ Prelude.<*> (x Data..:? "tags" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..: "action")+ Prelude.<*> (x Data..: "arn")+ Prelude.<*> (x Data..: "createdAt")+ Prelude.<*> (x Data..: "criteria")+ Prelude.<*> (x Data..: "name")+ Prelude.<*> (x Data..: "ownerId")+ Prelude.<*> (x Data..: "updatedAt")+ )++instance Prelude.Hashable Filter where+ hashWithSalt _salt Filter' {..} =+ _salt+ `Prelude.hashWithSalt` description+ `Prelude.hashWithSalt` reason+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` action+ `Prelude.hashWithSalt` arn+ `Prelude.hashWithSalt` createdAt+ `Prelude.hashWithSalt` criteria+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` ownerId+ `Prelude.hashWithSalt` updatedAt++instance Prelude.NFData Filter where+ rnf Filter' {..} =+ Prelude.rnf description+ `Prelude.seq` Prelude.rnf reason+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf action+ `Prelude.seq` Prelude.rnf arn+ `Prelude.seq` Prelude.rnf createdAt+ `Prelude.seq` Prelude.rnf criteria+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf ownerId+ `Prelude.seq` Prelude.rnf updatedAt
+ gen/Amazonka/Inspector2/Types/FilterAction.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.Inspector2.Types.FilterAction+-- 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.Inspector2.Types.FilterAction+ ( FilterAction+ ( ..,+ FilterAction_NONE,+ FilterAction_SUPPRESS+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype FilterAction = FilterAction'+ { fromFilterAction ::+ 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 FilterAction_NONE :: FilterAction+pattern FilterAction_NONE = FilterAction' "NONE"++pattern FilterAction_SUPPRESS :: FilterAction+pattern FilterAction_SUPPRESS = FilterAction' "SUPPRESS"++{-# COMPLETE+ FilterAction_NONE,+ FilterAction_SUPPRESS,+ FilterAction'+ #-}
+ gen/Amazonka/Inspector2/Types/FilterCriteria.hs view
@@ -0,0 +1,650 @@+{-# 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.Inspector2.Types.FilterCriteria+-- 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.Inspector2.Types.FilterCriteria where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.DateFilter+import Amazonka.Inspector2.Types.MapFilter+import Amazonka.Inspector2.Types.NumberFilter+import Amazonka.Inspector2.Types.PackageFilter+import Amazonka.Inspector2.Types.PortRangeFilter+import Amazonka.Inspector2.Types.StringFilter+import qualified Amazonka.Prelude as Prelude++-- | Details on the criteria used to define the filter.+--+-- /See:/ 'newFilterCriteria' smart constructor.+data FilterCriteria = FilterCriteria'+ { -- | Details of the Amazon Web Services account IDs used to filter findings.+ awsAccountId :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details of the component IDs used to filter findings.+ componentId :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details of the component types used to filter findings.+ componentType :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details of the Amazon EC2 instance image IDs used to filter findings.+ ec2InstanceImageId :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details of the Amazon EC2 instance subnet IDs used to filter findings.+ ec2InstanceSubnetId :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details of the Amazon EC2 instance VPC IDs used to filter findings.+ ec2InstanceVpcId :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details of the Amazon ECR image architecture types used to filter+ -- findings.+ ecrImageArchitecture :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details of the Amazon ECR image hashes used to filter findings.+ ecrImageHash :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details on the Amazon ECR image push date and time used to filter+ -- findings.+ ecrImagePushedAt :: Prelude.Maybe (Prelude.NonEmpty DateFilter),+ -- | Details on the Amazon ECR registry used to filter findings.+ ecrImageRegistry :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details on the name of the Amazon ECR repository used to filter+ -- findings.+ ecrImageRepositoryName :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The tags attached to the Amazon ECR container image.+ ecrImageTags :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Filters the list of AWS Lambda findings by the availability of exploits.+ exploitAvailable :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details on the finding ARNs used to filter findings.+ findingArn :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details on the finding status types used to filter findings.+ findingStatus :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details on the finding types used to filter findings.+ findingType :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details on the date and time a finding was first seen used to filter+ -- findings.+ firstObservedAt :: Prelude.Maybe (Prelude.NonEmpty DateFilter),+ -- | Details on whether a fix is available through a version update. This+ -- value can be @YES@, @NO@, or @PARTIAL@. A @PARTIAL@ fix means that some,+ -- but not all, of the packages identified in the finding have fixes+ -- available through updated versions.+ fixAvailable :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The Amazon Inspector score to filter on.+ inspectorScore :: Prelude.Maybe (Prelude.NonEmpty NumberFilter),+ -- | Filters the list of AWS Lambda functions by execution role.+ lambdaFunctionExecutionRoleArn :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Filters the list of AWS Lambda functions by the date and time that a+ -- user last updated the configuration, in+ -- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601 format>+ lambdaFunctionLastModifiedAt :: Prelude.Maybe (Prelude.NonEmpty DateFilter),+ -- | Filters the list of AWS Lambda functions by the function\'s+ -- <https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html layers>.+ -- A Lambda function can have up to five layers.+ lambdaFunctionLayers :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Filters the list of AWS Lambda functions by the name of the function.+ lambdaFunctionName :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Filters the list of AWS Lambda functions by the runtime environment for+ -- the Lambda function.+ lambdaFunctionRuntime :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details on the date and time a finding was last seen used to filter+ -- findings.+ lastObservedAt :: Prelude.Maybe (Prelude.NonEmpty DateFilter),+ -- | Details on the ingress source addresses used to filter findings.+ networkProtocol :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details on the port ranges used to filter findings.+ portRange :: Prelude.Maybe (Prelude.NonEmpty PortRangeFilter),+ -- | Details on the related vulnerabilities used to filter findings.+ relatedVulnerabilities :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details on the resource IDs used to filter findings.+ resourceId :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details on the resource tags used to filter findings.+ resourceTags :: Prelude.Maybe (Prelude.NonEmpty MapFilter),+ -- | Details on the resource types used to filter findings.+ resourceType :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details on the severity used to filter findings.+ severity :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details on the finding title used to filter findings.+ title :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details on the date and time a finding was last updated at used to+ -- filter findings.+ updatedAt :: Prelude.Maybe (Prelude.NonEmpty DateFilter),+ -- | Details on the vendor severity used to filter findings.+ vendorSeverity :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details on the vulnerability ID used to filter findings.+ vulnerabilityId :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details on the vulnerability type used to filter findings.+ vulnerabilitySource :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Details on the vulnerable packages used to filter findings.+ vulnerablePackages :: Prelude.Maybe (Prelude.NonEmpty PackageFilter)+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'FilterCriteria' 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:+--+-- 'awsAccountId', 'filterCriteria_awsAccountId' - Details of the Amazon Web Services account IDs used to filter findings.+--+-- 'componentId', 'filterCriteria_componentId' - Details of the component IDs used to filter findings.+--+-- 'componentType', 'filterCriteria_componentType' - Details of the component types used to filter findings.+--+-- 'ec2InstanceImageId', 'filterCriteria_ec2InstanceImageId' - Details of the Amazon EC2 instance image IDs used to filter findings.+--+-- 'ec2InstanceSubnetId', 'filterCriteria_ec2InstanceSubnetId' - Details of the Amazon EC2 instance subnet IDs used to filter findings.+--+-- 'ec2InstanceVpcId', 'filterCriteria_ec2InstanceVpcId' - Details of the Amazon EC2 instance VPC IDs used to filter findings.+--+-- 'ecrImageArchitecture', 'filterCriteria_ecrImageArchitecture' - Details of the Amazon ECR image architecture types used to filter+-- findings.+--+-- 'ecrImageHash', 'filterCriteria_ecrImageHash' - Details of the Amazon ECR image hashes used to filter findings.+--+-- 'ecrImagePushedAt', 'filterCriteria_ecrImagePushedAt' - Details on the Amazon ECR image push date and time used to filter+-- findings.+--+-- 'ecrImageRegistry', 'filterCriteria_ecrImageRegistry' - Details on the Amazon ECR registry used to filter findings.+--+-- 'ecrImageRepositoryName', 'filterCriteria_ecrImageRepositoryName' - Details on the name of the Amazon ECR repository used to filter+-- findings.+--+-- 'ecrImageTags', 'filterCriteria_ecrImageTags' - The tags attached to the Amazon ECR container image.+--+-- 'exploitAvailable', 'filterCriteria_exploitAvailable' - Filters the list of AWS Lambda findings by the availability of exploits.+--+-- 'findingArn', 'filterCriteria_findingArn' - Details on the finding ARNs used to filter findings.+--+-- 'findingStatus', 'filterCriteria_findingStatus' - Details on the finding status types used to filter findings.+--+-- 'findingType', 'filterCriteria_findingType' - Details on the finding types used to filter findings.+--+-- 'firstObservedAt', 'filterCriteria_firstObservedAt' - Details on the date and time a finding was first seen used to filter+-- findings.+--+-- 'fixAvailable', 'filterCriteria_fixAvailable' - Details on whether a fix is available through a version update. This+-- value can be @YES@, @NO@, or @PARTIAL@. A @PARTIAL@ fix means that some,+-- but not all, of the packages identified in the finding have fixes+-- available through updated versions.+--+-- 'inspectorScore', 'filterCriteria_inspectorScore' - The Amazon Inspector score to filter on.+--+-- 'lambdaFunctionExecutionRoleArn', 'filterCriteria_lambdaFunctionExecutionRoleArn' - Filters the list of AWS Lambda functions by execution role.+--+-- 'lambdaFunctionLastModifiedAt', 'filterCriteria_lambdaFunctionLastModifiedAt' - Filters the list of AWS Lambda functions by the date and time that a+-- user last updated the configuration, in+-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601 format>+--+-- 'lambdaFunctionLayers', 'filterCriteria_lambdaFunctionLayers' - Filters the list of AWS Lambda functions by the function\'s+-- <https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html layers>.+-- A Lambda function can have up to five layers.+--+-- 'lambdaFunctionName', 'filterCriteria_lambdaFunctionName' - Filters the list of AWS Lambda functions by the name of the function.+--+-- 'lambdaFunctionRuntime', 'filterCriteria_lambdaFunctionRuntime' - Filters the list of AWS Lambda functions by the runtime environment for+-- the Lambda function.+--+-- 'lastObservedAt', 'filterCriteria_lastObservedAt' - Details on the date and time a finding was last seen used to filter+-- findings.+--+-- 'networkProtocol', 'filterCriteria_networkProtocol' - Details on the ingress source addresses used to filter findings.+--+-- 'portRange', 'filterCriteria_portRange' - Details on the port ranges used to filter findings.+--+-- 'relatedVulnerabilities', 'filterCriteria_relatedVulnerabilities' - Details on the related vulnerabilities used to filter findings.+--+-- 'resourceId', 'filterCriteria_resourceId' - Details on the resource IDs used to filter findings.+--+-- 'resourceTags', 'filterCriteria_resourceTags' - Details on the resource tags used to filter findings.+--+-- 'resourceType', 'filterCriteria_resourceType' - Details on the resource types used to filter findings.+--+-- 'severity', 'filterCriteria_severity' - Details on the severity used to filter findings.+--+-- 'title', 'filterCriteria_title' - Details on the finding title used to filter findings.+--+-- 'updatedAt', 'filterCriteria_updatedAt' - Details on the date and time a finding was last updated at used to+-- filter findings.+--+-- 'vendorSeverity', 'filterCriteria_vendorSeverity' - Details on the vendor severity used to filter findings.+--+-- 'vulnerabilityId', 'filterCriteria_vulnerabilityId' - Details on the vulnerability ID used to filter findings.+--+-- 'vulnerabilitySource', 'filterCriteria_vulnerabilitySource' - Details on the vulnerability type used to filter findings.+--+-- 'vulnerablePackages', 'filterCriteria_vulnerablePackages' - Details on the vulnerable packages used to filter findings.+newFilterCriteria ::+ FilterCriteria+newFilterCriteria =+ FilterCriteria'+ { awsAccountId = Prelude.Nothing,+ componentId = Prelude.Nothing,+ componentType = Prelude.Nothing,+ ec2InstanceImageId = Prelude.Nothing,+ ec2InstanceSubnetId = Prelude.Nothing,+ ec2InstanceVpcId = Prelude.Nothing,+ ecrImageArchitecture = Prelude.Nothing,+ ecrImageHash = Prelude.Nothing,+ ecrImagePushedAt = Prelude.Nothing,+ ecrImageRegistry = Prelude.Nothing,+ ecrImageRepositoryName = Prelude.Nothing,+ ecrImageTags = Prelude.Nothing,+ exploitAvailable = Prelude.Nothing,+ findingArn = Prelude.Nothing,+ findingStatus = Prelude.Nothing,+ findingType = Prelude.Nothing,+ firstObservedAt = Prelude.Nothing,+ fixAvailable = Prelude.Nothing,+ inspectorScore = Prelude.Nothing,+ lambdaFunctionExecutionRoleArn = Prelude.Nothing,+ lambdaFunctionLastModifiedAt = Prelude.Nothing,+ lambdaFunctionLayers = Prelude.Nothing,+ lambdaFunctionName = Prelude.Nothing,+ lambdaFunctionRuntime = Prelude.Nothing,+ lastObservedAt = Prelude.Nothing,+ networkProtocol = Prelude.Nothing,+ portRange = Prelude.Nothing,+ relatedVulnerabilities = Prelude.Nothing,+ resourceId = Prelude.Nothing,+ resourceTags = Prelude.Nothing,+ resourceType = Prelude.Nothing,+ severity = Prelude.Nothing,+ title = Prelude.Nothing,+ updatedAt = Prelude.Nothing,+ vendorSeverity = Prelude.Nothing,+ vulnerabilityId = Prelude.Nothing,+ vulnerabilitySource = Prelude.Nothing,+ vulnerablePackages = Prelude.Nothing+ }++-- | Details of the Amazon Web Services account IDs used to filter findings.+filterCriteria_awsAccountId :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_awsAccountId = Lens.lens (\FilterCriteria' {awsAccountId} -> awsAccountId) (\s@FilterCriteria' {} a -> s {awsAccountId = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details of the component IDs used to filter findings.+filterCriteria_componentId :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_componentId = Lens.lens (\FilterCriteria' {componentId} -> componentId) (\s@FilterCriteria' {} a -> s {componentId = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details of the component types used to filter findings.+filterCriteria_componentType :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_componentType = Lens.lens (\FilterCriteria' {componentType} -> componentType) (\s@FilterCriteria' {} a -> s {componentType = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details of the Amazon EC2 instance image IDs used to filter findings.+filterCriteria_ec2InstanceImageId :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_ec2InstanceImageId = Lens.lens (\FilterCriteria' {ec2InstanceImageId} -> ec2InstanceImageId) (\s@FilterCriteria' {} a -> s {ec2InstanceImageId = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details of the Amazon EC2 instance subnet IDs used to filter findings.+filterCriteria_ec2InstanceSubnetId :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_ec2InstanceSubnetId = Lens.lens (\FilterCriteria' {ec2InstanceSubnetId} -> ec2InstanceSubnetId) (\s@FilterCriteria' {} a -> s {ec2InstanceSubnetId = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details of the Amazon EC2 instance VPC IDs used to filter findings.+filterCriteria_ec2InstanceVpcId :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_ec2InstanceVpcId = Lens.lens (\FilterCriteria' {ec2InstanceVpcId} -> ec2InstanceVpcId) (\s@FilterCriteria' {} a -> s {ec2InstanceVpcId = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details of the Amazon ECR image architecture types used to filter+-- findings.+filterCriteria_ecrImageArchitecture :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_ecrImageArchitecture = Lens.lens (\FilterCriteria' {ecrImageArchitecture} -> ecrImageArchitecture) (\s@FilterCriteria' {} a -> s {ecrImageArchitecture = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details of the Amazon ECR image hashes used to filter findings.+filterCriteria_ecrImageHash :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_ecrImageHash = Lens.lens (\FilterCriteria' {ecrImageHash} -> ecrImageHash) (\s@FilterCriteria' {} a -> s {ecrImageHash = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the Amazon ECR image push date and time used to filter+-- findings.+filterCriteria_ecrImagePushedAt :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty DateFilter))+filterCriteria_ecrImagePushedAt = Lens.lens (\FilterCriteria' {ecrImagePushedAt} -> ecrImagePushedAt) (\s@FilterCriteria' {} a -> s {ecrImagePushedAt = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the Amazon ECR registry used to filter findings.+filterCriteria_ecrImageRegistry :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_ecrImageRegistry = Lens.lens (\FilterCriteria' {ecrImageRegistry} -> ecrImageRegistry) (\s@FilterCriteria' {} a -> s {ecrImageRegistry = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the name of the Amazon ECR repository used to filter+-- findings.+filterCriteria_ecrImageRepositoryName :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_ecrImageRepositoryName = Lens.lens (\FilterCriteria' {ecrImageRepositoryName} -> ecrImageRepositoryName) (\s@FilterCriteria' {} a -> s {ecrImageRepositoryName = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | The tags attached to the Amazon ECR container image.+filterCriteria_ecrImageTags :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_ecrImageTags = Lens.lens (\FilterCriteria' {ecrImageTags} -> ecrImageTags) (\s@FilterCriteria' {} a -> s {ecrImageTags = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Filters the list of AWS Lambda findings by the availability of exploits.+filterCriteria_exploitAvailable :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_exploitAvailable = Lens.lens (\FilterCriteria' {exploitAvailable} -> exploitAvailable) (\s@FilterCriteria' {} a -> s {exploitAvailable = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the finding ARNs used to filter findings.+filterCriteria_findingArn :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_findingArn = Lens.lens (\FilterCriteria' {findingArn} -> findingArn) (\s@FilterCriteria' {} a -> s {findingArn = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the finding status types used to filter findings.+filterCriteria_findingStatus :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_findingStatus = Lens.lens (\FilterCriteria' {findingStatus} -> findingStatus) (\s@FilterCriteria' {} a -> s {findingStatus = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the finding types used to filter findings.+filterCriteria_findingType :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_findingType = Lens.lens (\FilterCriteria' {findingType} -> findingType) (\s@FilterCriteria' {} a -> s {findingType = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the date and time a finding was first seen used to filter+-- findings.+filterCriteria_firstObservedAt :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty DateFilter))+filterCriteria_firstObservedAt = Lens.lens (\FilterCriteria' {firstObservedAt} -> firstObservedAt) (\s@FilterCriteria' {} a -> s {firstObservedAt = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on whether a fix is available through a version update. This+-- value can be @YES@, @NO@, or @PARTIAL@. A @PARTIAL@ fix means that some,+-- but not all, of the packages identified in the finding have fixes+-- available through updated versions.+filterCriteria_fixAvailable :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_fixAvailable = Lens.lens (\FilterCriteria' {fixAvailable} -> fixAvailable) (\s@FilterCriteria' {} a -> s {fixAvailable = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon Inspector score to filter on.+filterCriteria_inspectorScore :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty NumberFilter))+filterCriteria_inspectorScore = Lens.lens (\FilterCriteria' {inspectorScore} -> inspectorScore) (\s@FilterCriteria' {} a -> s {inspectorScore = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Filters the list of AWS Lambda functions by execution role.+filterCriteria_lambdaFunctionExecutionRoleArn :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_lambdaFunctionExecutionRoleArn = Lens.lens (\FilterCriteria' {lambdaFunctionExecutionRoleArn} -> lambdaFunctionExecutionRoleArn) (\s@FilterCriteria' {} a -> s {lambdaFunctionExecutionRoleArn = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Filters the list of AWS Lambda functions by the date and time that a+-- user last updated the configuration, in+-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601 format>+filterCriteria_lambdaFunctionLastModifiedAt :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty DateFilter))+filterCriteria_lambdaFunctionLastModifiedAt = Lens.lens (\FilterCriteria' {lambdaFunctionLastModifiedAt} -> lambdaFunctionLastModifiedAt) (\s@FilterCriteria' {} a -> s {lambdaFunctionLastModifiedAt = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Filters the list of AWS Lambda functions by the function\'s+-- <https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html layers>.+-- A Lambda function can have up to five layers.+filterCriteria_lambdaFunctionLayers :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_lambdaFunctionLayers = Lens.lens (\FilterCriteria' {lambdaFunctionLayers} -> lambdaFunctionLayers) (\s@FilterCriteria' {} a -> s {lambdaFunctionLayers = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Filters the list of AWS Lambda functions by the name of the function.+filterCriteria_lambdaFunctionName :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_lambdaFunctionName = Lens.lens (\FilterCriteria' {lambdaFunctionName} -> lambdaFunctionName) (\s@FilterCriteria' {} a -> s {lambdaFunctionName = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Filters the list of AWS Lambda functions by the runtime environment for+-- the Lambda function.+filterCriteria_lambdaFunctionRuntime :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_lambdaFunctionRuntime = Lens.lens (\FilterCriteria' {lambdaFunctionRuntime} -> lambdaFunctionRuntime) (\s@FilterCriteria' {} a -> s {lambdaFunctionRuntime = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the date and time a finding was last seen used to filter+-- findings.+filterCriteria_lastObservedAt :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty DateFilter))+filterCriteria_lastObservedAt = Lens.lens (\FilterCriteria' {lastObservedAt} -> lastObservedAt) (\s@FilterCriteria' {} a -> s {lastObservedAt = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the ingress source addresses used to filter findings.+filterCriteria_networkProtocol :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_networkProtocol = Lens.lens (\FilterCriteria' {networkProtocol} -> networkProtocol) (\s@FilterCriteria' {} a -> s {networkProtocol = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the port ranges used to filter findings.+filterCriteria_portRange :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty PortRangeFilter))+filterCriteria_portRange = Lens.lens (\FilterCriteria' {portRange} -> portRange) (\s@FilterCriteria' {} a -> s {portRange = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the related vulnerabilities used to filter findings.+filterCriteria_relatedVulnerabilities :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_relatedVulnerabilities = Lens.lens (\FilterCriteria' {relatedVulnerabilities} -> relatedVulnerabilities) (\s@FilterCriteria' {} a -> s {relatedVulnerabilities = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the resource IDs used to filter findings.+filterCriteria_resourceId :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_resourceId = Lens.lens (\FilterCriteria' {resourceId} -> resourceId) (\s@FilterCriteria' {} a -> s {resourceId = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the resource tags used to filter findings.+filterCriteria_resourceTags :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty MapFilter))+filterCriteria_resourceTags = Lens.lens (\FilterCriteria' {resourceTags} -> resourceTags) (\s@FilterCriteria' {} a -> s {resourceTags = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the resource types used to filter findings.+filterCriteria_resourceType :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_resourceType = Lens.lens (\FilterCriteria' {resourceType} -> resourceType) (\s@FilterCriteria' {} a -> s {resourceType = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the severity used to filter findings.+filterCriteria_severity :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_severity = Lens.lens (\FilterCriteria' {severity} -> severity) (\s@FilterCriteria' {} a -> s {severity = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the finding title used to filter findings.+filterCriteria_title :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_title = Lens.lens (\FilterCriteria' {title} -> title) (\s@FilterCriteria' {} a -> s {title = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the date and time a finding was last updated at used to+-- filter findings.+filterCriteria_updatedAt :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty DateFilter))+filterCriteria_updatedAt = Lens.lens (\FilterCriteria' {updatedAt} -> updatedAt) (\s@FilterCriteria' {} a -> s {updatedAt = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the vendor severity used to filter findings.+filterCriteria_vendorSeverity :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_vendorSeverity = Lens.lens (\FilterCriteria' {vendorSeverity} -> vendorSeverity) (\s@FilterCriteria' {} a -> s {vendorSeverity = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the vulnerability ID used to filter findings.+filterCriteria_vulnerabilityId :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_vulnerabilityId = Lens.lens (\FilterCriteria' {vulnerabilityId} -> vulnerabilityId) (\s@FilterCriteria' {} a -> s {vulnerabilityId = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the vulnerability type used to filter findings.+filterCriteria_vulnerabilitySource :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty StringFilter))+filterCriteria_vulnerabilitySource = Lens.lens (\FilterCriteria' {vulnerabilitySource} -> vulnerabilitySource) (\s@FilterCriteria' {} a -> s {vulnerabilitySource = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++-- | Details on the vulnerable packages used to filter findings.+filterCriteria_vulnerablePackages :: Lens.Lens' FilterCriteria (Prelude.Maybe (Prelude.NonEmpty PackageFilter))+filterCriteria_vulnerablePackages = Lens.lens (\FilterCriteria' {vulnerablePackages} -> vulnerablePackages) (\s@FilterCriteria' {} a -> s {vulnerablePackages = a} :: FilterCriteria) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON FilterCriteria where+ parseJSON =+ Data.withObject+ "FilterCriteria"+ ( \x ->+ FilterCriteria'+ Prelude.<$> (x Data..:? "awsAccountId")+ Prelude.<*> (x Data..:? "componentId")+ Prelude.<*> (x Data..:? "componentType")+ Prelude.<*> (x Data..:? "ec2InstanceImageId")+ Prelude.<*> (x Data..:? "ec2InstanceSubnetId")+ Prelude.<*> (x Data..:? "ec2InstanceVpcId")+ Prelude.<*> (x Data..:? "ecrImageArchitecture")+ Prelude.<*> (x Data..:? "ecrImageHash")+ Prelude.<*> (x Data..:? "ecrImagePushedAt")+ Prelude.<*> (x Data..:? "ecrImageRegistry")+ Prelude.<*> (x Data..:? "ecrImageRepositoryName")+ Prelude.<*> (x Data..:? "ecrImageTags")+ Prelude.<*> (x Data..:? "exploitAvailable")+ Prelude.<*> (x Data..:? "findingArn")+ Prelude.<*> (x Data..:? "findingStatus")+ Prelude.<*> (x Data..:? "findingType")+ Prelude.<*> (x Data..:? "firstObservedAt")+ Prelude.<*> (x Data..:? "fixAvailable")+ Prelude.<*> (x Data..:? "inspectorScore")+ Prelude.<*> (x Data..:? "lambdaFunctionExecutionRoleArn")+ Prelude.<*> (x Data..:? "lambdaFunctionLastModifiedAt")+ Prelude.<*> (x Data..:? "lambdaFunctionLayers")+ Prelude.<*> (x Data..:? "lambdaFunctionName")+ Prelude.<*> (x Data..:? "lambdaFunctionRuntime")+ Prelude.<*> (x Data..:? "lastObservedAt")+ Prelude.<*> (x Data..:? "networkProtocol")+ Prelude.<*> (x Data..:? "portRange")+ Prelude.<*> (x Data..:? "relatedVulnerabilities")+ Prelude.<*> (x Data..:? "resourceId")+ Prelude.<*> (x Data..:? "resourceTags")+ Prelude.<*> (x Data..:? "resourceType")+ Prelude.<*> (x Data..:? "severity")+ Prelude.<*> (x Data..:? "title")+ Prelude.<*> (x Data..:? "updatedAt")+ Prelude.<*> (x Data..:? "vendorSeverity")+ Prelude.<*> (x Data..:? "vulnerabilityId")+ Prelude.<*> (x Data..:? "vulnerabilitySource")+ Prelude.<*> (x Data..:? "vulnerablePackages")+ )++instance Prelude.Hashable FilterCriteria where+ hashWithSalt _salt FilterCriteria' {..} =+ _salt+ `Prelude.hashWithSalt` awsAccountId+ `Prelude.hashWithSalt` componentId+ `Prelude.hashWithSalt` componentType+ `Prelude.hashWithSalt` ec2InstanceImageId+ `Prelude.hashWithSalt` ec2InstanceSubnetId+ `Prelude.hashWithSalt` ec2InstanceVpcId+ `Prelude.hashWithSalt` ecrImageArchitecture+ `Prelude.hashWithSalt` ecrImageHash+ `Prelude.hashWithSalt` ecrImagePushedAt+ `Prelude.hashWithSalt` ecrImageRegistry+ `Prelude.hashWithSalt` ecrImageRepositoryName+ `Prelude.hashWithSalt` ecrImageTags+ `Prelude.hashWithSalt` exploitAvailable+ `Prelude.hashWithSalt` findingArn+ `Prelude.hashWithSalt` findingStatus+ `Prelude.hashWithSalt` findingType+ `Prelude.hashWithSalt` firstObservedAt+ `Prelude.hashWithSalt` fixAvailable+ `Prelude.hashWithSalt` inspectorScore+ `Prelude.hashWithSalt` lambdaFunctionExecutionRoleArn+ `Prelude.hashWithSalt` lambdaFunctionLastModifiedAt+ `Prelude.hashWithSalt` lambdaFunctionLayers+ `Prelude.hashWithSalt` lambdaFunctionName+ `Prelude.hashWithSalt` lambdaFunctionRuntime+ `Prelude.hashWithSalt` lastObservedAt+ `Prelude.hashWithSalt` networkProtocol+ `Prelude.hashWithSalt` portRange+ `Prelude.hashWithSalt` relatedVulnerabilities+ `Prelude.hashWithSalt` resourceId+ `Prelude.hashWithSalt` resourceTags+ `Prelude.hashWithSalt` resourceType+ `Prelude.hashWithSalt` severity+ `Prelude.hashWithSalt` title+ `Prelude.hashWithSalt` updatedAt+ `Prelude.hashWithSalt` vendorSeverity+ `Prelude.hashWithSalt` vulnerabilityId+ `Prelude.hashWithSalt` vulnerabilitySource+ `Prelude.hashWithSalt` vulnerablePackages++instance Prelude.NFData FilterCriteria where+ rnf FilterCriteria' {..} =+ Prelude.rnf awsAccountId+ `Prelude.seq` Prelude.rnf componentId+ `Prelude.seq` Prelude.rnf componentType+ `Prelude.seq` Prelude.rnf ec2InstanceImageId+ `Prelude.seq` Prelude.rnf ec2InstanceSubnetId+ `Prelude.seq` Prelude.rnf ec2InstanceVpcId+ `Prelude.seq` Prelude.rnf ecrImageArchitecture+ `Prelude.seq` Prelude.rnf ecrImageHash+ `Prelude.seq` Prelude.rnf ecrImagePushedAt+ `Prelude.seq` Prelude.rnf ecrImageRegistry+ `Prelude.seq` Prelude.rnf ecrImageRepositoryName+ `Prelude.seq` Prelude.rnf ecrImageTags+ `Prelude.seq` Prelude.rnf exploitAvailable+ `Prelude.seq` Prelude.rnf findingArn+ `Prelude.seq` Prelude.rnf findingStatus+ `Prelude.seq` Prelude.rnf findingType+ `Prelude.seq` Prelude.rnf firstObservedAt+ `Prelude.seq` Prelude.rnf fixAvailable+ `Prelude.seq` Prelude.rnf inspectorScore+ `Prelude.seq` Prelude.rnf+ lambdaFunctionExecutionRoleArn+ `Prelude.seq` Prelude.rnf+ lambdaFunctionLastModifiedAt+ `Prelude.seq` Prelude.rnf+ lambdaFunctionLayers+ `Prelude.seq` Prelude.rnf+ lambdaFunctionName+ `Prelude.seq` Prelude.rnf+ lambdaFunctionRuntime+ `Prelude.seq` Prelude.rnf+ lastObservedAt+ `Prelude.seq` Prelude.rnf+ networkProtocol+ `Prelude.seq` Prelude.rnf+ portRange+ `Prelude.seq` Prelude.rnf+ relatedVulnerabilities+ `Prelude.seq` Prelude.rnf+ resourceId+ `Prelude.seq` Prelude.rnf+ resourceTags+ `Prelude.seq` Prelude.rnf+ resourceType+ `Prelude.seq` Prelude.rnf+ severity+ `Prelude.seq` Prelude.rnf+ title+ `Prelude.seq` Prelude.rnf+ updatedAt+ `Prelude.seq` Prelude.rnf+ vendorSeverity+ `Prelude.seq` Prelude.rnf+ vulnerabilityId+ `Prelude.seq` Prelude.rnf+ vulnerabilitySource+ `Prelude.seq` Prelude.rnf+ vulnerablePackages++instance Data.ToJSON FilterCriteria where+ toJSON FilterCriteria' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("awsAccountId" Data..=) Prelude.<$> awsAccountId,+ ("componentId" Data..=) Prelude.<$> componentId,+ ("componentType" Data..=) Prelude.<$> componentType,+ ("ec2InstanceImageId" Data..=)+ Prelude.<$> ec2InstanceImageId,+ ("ec2InstanceSubnetId" Data..=)+ Prelude.<$> ec2InstanceSubnetId,+ ("ec2InstanceVpcId" Data..=)+ Prelude.<$> ec2InstanceVpcId,+ ("ecrImageArchitecture" Data..=)+ Prelude.<$> ecrImageArchitecture,+ ("ecrImageHash" Data..=) Prelude.<$> ecrImageHash,+ ("ecrImagePushedAt" Data..=)+ Prelude.<$> ecrImagePushedAt,+ ("ecrImageRegistry" Data..=)+ Prelude.<$> ecrImageRegistry,+ ("ecrImageRepositoryName" Data..=)+ Prelude.<$> ecrImageRepositoryName,+ ("ecrImageTags" Data..=) Prelude.<$> ecrImageTags,+ ("exploitAvailable" Data..=)+ Prelude.<$> exploitAvailable,+ ("findingArn" Data..=) Prelude.<$> findingArn,+ ("findingStatus" Data..=) Prelude.<$> findingStatus,+ ("findingType" Data..=) Prelude.<$> findingType,+ ("firstObservedAt" Data..=)+ Prelude.<$> firstObservedAt,+ ("fixAvailable" Data..=) Prelude.<$> fixAvailable,+ ("inspectorScore" Data..=)+ Prelude.<$> inspectorScore,+ ("lambdaFunctionExecutionRoleArn" Data..=)+ Prelude.<$> lambdaFunctionExecutionRoleArn,+ ("lambdaFunctionLastModifiedAt" Data..=)+ Prelude.<$> lambdaFunctionLastModifiedAt,+ ("lambdaFunctionLayers" Data..=)+ Prelude.<$> lambdaFunctionLayers,+ ("lambdaFunctionName" Data..=)+ Prelude.<$> lambdaFunctionName,+ ("lambdaFunctionRuntime" Data..=)+ Prelude.<$> lambdaFunctionRuntime,+ ("lastObservedAt" Data..=)+ Prelude.<$> lastObservedAt,+ ("networkProtocol" Data..=)+ Prelude.<$> networkProtocol,+ ("portRange" Data..=) Prelude.<$> portRange,+ ("relatedVulnerabilities" Data..=)+ Prelude.<$> relatedVulnerabilities,+ ("resourceId" Data..=) Prelude.<$> resourceId,+ ("resourceTags" Data..=) Prelude.<$> resourceTags,+ ("resourceType" Data..=) Prelude.<$> resourceType,+ ("severity" Data..=) Prelude.<$> severity,+ ("title" Data..=) Prelude.<$> title,+ ("updatedAt" Data..=) Prelude.<$> updatedAt,+ ("vendorSeverity" Data..=)+ Prelude.<$> vendorSeverity,+ ("vulnerabilityId" Data..=)+ Prelude.<$> vulnerabilityId,+ ("vulnerabilitySource" Data..=)+ Prelude.<$> vulnerabilitySource,+ ("vulnerablePackages" Data..=)+ Prelude.<$> vulnerablePackages+ ]+ )
+ gen/Amazonka/Inspector2/Types/Finding.hs view
@@ -0,0 +1,342 @@+{-# 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.Inspector2.Types.Finding+-- 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.Inspector2.Types.Finding where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.ExploitAvailable+import Amazonka.Inspector2.Types.ExploitabilityDetails+import Amazonka.Inspector2.Types.FindingStatus+import Amazonka.Inspector2.Types.FindingType+import Amazonka.Inspector2.Types.FixAvailable+import Amazonka.Inspector2.Types.InspectorScoreDetails+import Amazonka.Inspector2.Types.NetworkReachabilityDetails+import Amazonka.Inspector2.Types.PackageVulnerabilityDetails+import Amazonka.Inspector2.Types.Remediation+import Amazonka.Inspector2.Types.Resource+import Amazonka.Inspector2.Types.Severity+import qualified Amazonka.Prelude as Prelude++-- | Details about an Amazon Inspector finding.+--+-- /See:/ 'newFinding' smart constructor.+data Finding = Finding'+ { -- | If a finding discovered in your environment has an exploit available.+ exploitAvailable :: Prelude.Maybe ExploitAvailable,+ -- | The details of an exploit available for a finding discovered in your+ -- environment.+ exploitabilityDetails :: Prelude.Maybe ExploitabilityDetails,+ -- | Details on whether a fix is available through a version update. This+ -- value can be @YES@, @NO@, or @PARTIAL@. A @PARTIAL@ fix means that some,+ -- but not all, of the packages identified in the finding have fixes+ -- available through updated versions.+ fixAvailable :: Prelude.Maybe FixAvailable,+ -- | The Amazon Inspector score given to the finding.+ inspectorScore :: Prelude.Maybe Prelude.Double,+ -- | An object that contains details of the Amazon Inspector score.+ inspectorScoreDetails :: Prelude.Maybe InspectorScoreDetails,+ -- | An object that contains the details of a network reachability finding.+ networkReachabilityDetails :: Prelude.Maybe NetworkReachabilityDetails,+ -- | An object that contains the details of a package vulnerability finding.+ packageVulnerabilityDetails :: Prelude.Maybe PackageVulnerabilityDetails,+ -- | The title of the finding.+ title :: Prelude.Maybe Prelude.Text,+ -- | The date and time the finding was last updated at.+ updatedAt :: Prelude.Maybe Data.POSIX,+ -- | The Amazon Web Services account ID associated with the finding.+ awsAccountId :: Prelude.Text,+ -- | The description of the finding.+ description :: Prelude.Text,+ -- | The Amazon Resource Number (ARN) of the finding.+ findingArn :: Prelude.Text,+ -- | The date and time that the finding was first observed.+ firstObservedAt :: Data.POSIX,+ -- | The date and time that the finding was last observed.+ lastObservedAt :: Data.POSIX,+ -- | An object that contains the details about how to remediate a finding.+ remediation :: Remediation,+ -- | Contains information on the resources involved in a finding.+ resources :: Prelude.NonEmpty Resource,+ -- | The severity of the finding.+ severity :: Severity,+ -- | The status of the finding.+ status :: FindingStatus,+ -- | The type of the finding.+ type' :: FindingType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Finding' 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:+--+-- 'exploitAvailable', 'finding_exploitAvailable' - If a finding discovered in your environment has an exploit available.+--+-- 'exploitabilityDetails', 'finding_exploitabilityDetails' - The details of an exploit available for a finding discovered in your+-- environment.+--+-- 'fixAvailable', 'finding_fixAvailable' - Details on whether a fix is available through a version update. This+-- value can be @YES@, @NO@, or @PARTIAL@. A @PARTIAL@ fix means that some,+-- but not all, of the packages identified in the finding have fixes+-- available through updated versions.+--+-- 'inspectorScore', 'finding_inspectorScore' - The Amazon Inspector score given to the finding.+--+-- 'inspectorScoreDetails', 'finding_inspectorScoreDetails' - An object that contains details of the Amazon Inspector score.+--+-- 'networkReachabilityDetails', 'finding_networkReachabilityDetails' - An object that contains the details of a network reachability finding.+--+-- 'packageVulnerabilityDetails', 'finding_packageVulnerabilityDetails' - An object that contains the details of a package vulnerability finding.+--+-- 'title', 'finding_title' - The title of the finding.+--+-- 'updatedAt', 'finding_updatedAt' - The date and time the finding was last updated at.+--+-- 'awsAccountId', 'finding_awsAccountId' - The Amazon Web Services account ID associated with the finding.+--+-- 'description', 'finding_description' - The description of the finding.+--+-- 'findingArn', 'finding_findingArn' - The Amazon Resource Number (ARN) of the finding.+--+-- 'firstObservedAt', 'finding_firstObservedAt' - The date and time that the finding was first observed.+--+-- 'lastObservedAt', 'finding_lastObservedAt' - The date and time that the finding was last observed.+--+-- 'remediation', 'finding_remediation' - An object that contains the details about how to remediate a finding.+--+-- 'resources', 'finding_resources' - Contains information on the resources involved in a finding.+--+-- 'severity', 'finding_severity' - The severity of the finding.+--+-- 'status', 'finding_status' - The status of the finding.+--+-- 'type'', 'finding_type' - The type of the finding.+newFinding ::+ -- | 'awsAccountId'+ Prelude.Text ->+ -- | 'description'+ Prelude.Text ->+ -- | 'findingArn'+ Prelude.Text ->+ -- | 'firstObservedAt'+ Prelude.UTCTime ->+ -- | 'lastObservedAt'+ Prelude.UTCTime ->+ -- | 'remediation'+ Remediation ->+ -- | 'resources'+ Prelude.NonEmpty Resource ->+ -- | 'severity'+ Severity ->+ -- | 'status'+ FindingStatus ->+ -- | 'type''+ FindingType ->+ Finding+newFinding+ pAwsAccountId_+ pDescription_+ pFindingArn_+ pFirstObservedAt_+ pLastObservedAt_+ pRemediation_+ pResources_+ pSeverity_+ pStatus_+ pType_ =+ Finding'+ { exploitAvailable = Prelude.Nothing,+ exploitabilityDetails = Prelude.Nothing,+ fixAvailable = Prelude.Nothing,+ inspectorScore = Prelude.Nothing,+ inspectorScoreDetails = Prelude.Nothing,+ networkReachabilityDetails = Prelude.Nothing,+ packageVulnerabilityDetails = Prelude.Nothing,+ title = Prelude.Nothing,+ updatedAt = Prelude.Nothing,+ awsAccountId = pAwsAccountId_,+ description = pDescription_,+ findingArn = pFindingArn_,+ firstObservedAt =+ Data._Time Lens.# pFirstObservedAt_,+ lastObservedAt = Data._Time Lens.# pLastObservedAt_,+ remediation = pRemediation_,+ resources = Lens.coerced Lens.# pResources_,+ severity = pSeverity_,+ status = pStatus_,+ type' = pType_+ }++-- | If a finding discovered in your environment has an exploit available.+finding_exploitAvailable :: Lens.Lens' Finding (Prelude.Maybe ExploitAvailable)+finding_exploitAvailable = Lens.lens (\Finding' {exploitAvailable} -> exploitAvailable) (\s@Finding' {} a -> s {exploitAvailable = a} :: Finding)++-- | The details of an exploit available for a finding discovered in your+-- environment.+finding_exploitabilityDetails :: Lens.Lens' Finding (Prelude.Maybe ExploitabilityDetails)+finding_exploitabilityDetails = Lens.lens (\Finding' {exploitabilityDetails} -> exploitabilityDetails) (\s@Finding' {} a -> s {exploitabilityDetails = a} :: Finding)++-- | Details on whether a fix is available through a version update. This+-- value can be @YES@, @NO@, or @PARTIAL@. A @PARTIAL@ fix means that some,+-- but not all, of the packages identified in the finding have fixes+-- available through updated versions.+finding_fixAvailable :: Lens.Lens' Finding (Prelude.Maybe FixAvailable)+finding_fixAvailable = Lens.lens (\Finding' {fixAvailable} -> fixAvailable) (\s@Finding' {} a -> s {fixAvailable = a} :: Finding)++-- | The Amazon Inspector score given to the finding.+finding_inspectorScore :: Lens.Lens' Finding (Prelude.Maybe Prelude.Double)+finding_inspectorScore = Lens.lens (\Finding' {inspectorScore} -> inspectorScore) (\s@Finding' {} a -> s {inspectorScore = a} :: Finding)++-- | An object that contains details of the Amazon Inspector score.+finding_inspectorScoreDetails :: Lens.Lens' Finding (Prelude.Maybe InspectorScoreDetails)+finding_inspectorScoreDetails = Lens.lens (\Finding' {inspectorScoreDetails} -> inspectorScoreDetails) (\s@Finding' {} a -> s {inspectorScoreDetails = a} :: Finding)++-- | An object that contains the details of a network reachability finding.+finding_networkReachabilityDetails :: Lens.Lens' Finding (Prelude.Maybe NetworkReachabilityDetails)+finding_networkReachabilityDetails = Lens.lens (\Finding' {networkReachabilityDetails} -> networkReachabilityDetails) (\s@Finding' {} a -> s {networkReachabilityDetails = a} :: Finding)++-- | An object that contains the details of a package vulnerability finding.+finding_packageVulnerabilityDetails :: Lens.Lens' Finding (Prelude.Maybe PackageVulnerabilityDetails)+finding_packageVulnerabilityDetails = Lens.lens (\Finding' {packageVulnerabilityDetails} -> packageVulnerabilityDetails) (\s@Finding' {} a -> s {packageVulnerabilityDetails = a} :: Finding)++-- | The title of the finding.+finding_title :: Lens.Lens' Finding (Prelude.Maybe Prelude.Text)+finding_title = Lens.lens (\Finding' {title} -> title) (\s@Finding' {} a -> s {title = a} :: Finding)++-- | The date and time the finding was last updated at.+finding_updatedAt :: Lens.Lens' Finding (Prelude.Maybe Prelude.UTCTime)+finding_updatedAt = Lens.lens (\Finding' {updatedAt} -> updatedAt) (\s@Finding' {} a -> s {updatedAt = a} :: Finding) Prelude.. Lens.mapping Data._Time++-- | The Amazon Web Services account ID associated with the finding.+finding_awsAccountId :: Lens.Lens' Finding Prelude.Text+finding_awsAccountId = Lens.lens (\Finding' {awsAccountId} -> awsAccountId) (\s@Finding' {} a -> s {awsAccountId = a} :: Finding)++-- | The description of the finding.+finding_description :: Lens.Lens' Finding Prelude.Text+finding_description = Lens.lens (\Finding' {description} -> description) (\s@Finding' {} a -> s {description = a} :: Finding)++-- | The Amazon Resource Number (ARN) of the finding.+finding_findingArn :: Lens.Lens' Finding Prelude.Text+finding_findingArn = Lens.lens (\Finding' {findingArn} -> findingArn) (\s@Finding' {} a -> s {findingArn = a} :: Finding)++-- | The date and time that the finding was first observed.+finding_firstObservedAt :: Lens.Lens' Finding Prelude.UTCTime+finding_firstObservedAt = Lens.lens (\Finding' {firstObservedAt} -> firstObservedAt) (\s@Finding' {} a -> s {firstObservedAt = a} :: Finding) Prelude.. Data._Time++-- | The date and time that the finding was last observed.+finding_lastObservedAt :: Lens.Lens' Finding Prelude.UTCTime+finding_lastObservedAt = Lens.lens (\Finding' {lastObservedAt} -> lastObservedAt) (\s@Finding' {} a -> s {lastObservedAt = a} :: Finding) Prelude.. Data._Time++-- | An object that contains the details about how to remediate a finding.+finding_remediation :: Lens.Lens' Finding Remediation+finding_remediation = Lens.lens (\Finding' {remediation} -> remediation) (\s@Finding' {} a -> s {remediation = a} :: Finding)++-- | Contains information on the resources involved in a finding.+finding_resources :: Lens.Lens' Finding (Prelude.NonEmpty Resource)+finding_resources = Lens.lens (\Finding' {resources} -> resources) (\s@Finding' {} a -> s {resources = a} :: Finding) Prelude.. Lens.coerced++-- | The severity of the finding.+finding_severity :: Lens.Lens' Finding Severity+finding_severity = Lens.lens (\Finding' {severity} -> severity) (\s@Finding' {} a -> s {severity = a} :: Finding)++-- | The status of the finding.+finding_status :: Lens.Lens' Finding FindingStatus+finding_status = Lens.lens (\Finding' {status} -> status) (\s@Finding' {} a -> s {status = a} :: Finding)++-- | The type of the finding.+finding_type :: Lens.Lens' Finding FindingType+finding_type = Lens.lens (\Finding' {type'} -> type') (\s@Finding' {} a -> s {type' = a} :: Finding)++instance Data.FromJSON Finding where+ parseJSON =+ Data.withObject+ "Finding"+ ( \x ->+ Finding'+ Prelude.<$> (x Data..:? "exploitAvailable")+ Prelude.<*> (x Data..:? "exploitabilityDetails")+ Prelude.<*> (x Data..:? "fixAvailable")+ Prelude.<*> (x Data..:? "inspectorScore")+ Prelude.<*> (x Data..:? "inspectorScoreDetails")+ Prelude.<*> (x Data..:? "networkReachabilityDetails")+ Prelude.<*> (x Data..:? "packageVulnerabilityDetails")+ Prelude.<*> (x Data..:? "title")+ Prelude.<*> (x Data..:? "updatedAt")+ Prelude.<*> (x Data..: "awsAccountId")+ Prelude.<*> (x Data..: "description")+ Prelude.<*> (x Data..: "findingArn")+ Prelude.<*> (x Data..: "firstObservedAt")+ Prelude.<*> (x Data..: "lastObservedAt")+ Prelude.<*> (x Data..: "remediation")+ Prelude.<*> (x Data..: "resources")+ Prelude.<*> (x Data..: "severity")+ Prelude.<*> (x Data..: "status")+ Prelude.<*> (x Data..: "type")+ )++instance Prelude.Hashable Finding where+ hashWithSalt _salt Finding' {..} =+ _salt+ `Prelude.hashWithSalt` exploitAvailable+ `Prelude.hashWithSalt` exploitabilityDetails+ `Prelude.hashWithSalt` fixAvailable+ `Prelude.hashWithSalt` inspectorScore+ `Prelude.hashWithSalt` inspectorScoreDetails+ `Prelude.hashWithSalt` networkReachabilityDetails+ `Prelude.hashWithSalt` packageVulnerabilityDetails+ `Prelude.hashWithSalt` title+ `Prelude.hashWithSalt` updatedAt+ `Prelude.hashWithSalt` awsAccountId+ `Prelude.hashWithSalt` description+ `Prelude.hashWithSalt` findingArn+ `Prelude.hashWithSalt` firstObservedAt+ `Prelude.hashWithSalt` lastObservedAt+ `Prelude.hashWithSalt` remediation+ `Prelude.hashWithSalt` resources+ `Prelude.hashWithSalt` severity+ `Prelude.hashWithSalt` status+ `Prelude.hashWithSalt` type'++instance Prelude.NFData Finding where+ rnf Finding' {..} =+ Prelude.rnf exploitAvailable+ `Prelude.seq` Prelude.rnf exploitabilityDetails+ `Prelude.seq` Prelude.rnf fixAvailable+ `Prelude.seq` Prelude.rnf inspectorScore+ `Prelude.seq` Prelude.rnf inspectorScoreDetails+ `Prelude.seq` Prelude.rnf networkReachabilityDetails+ `Prelude.seq` Prelude.rnf packageVulnerabilityDetails+ `Prelude.seq` Prelude.rnf title+ `Prelude.seq` Prelude.rnf updatedAt+ `Prelude.seq` Prelude.rnf awsAccountId+ `Prelude.seq` Prelude.rnf description+ `Prelude.seq` Prelude.rnf findingArn+ `Prelude.seq` Prelude.rnf firstObservedAt+ `Prelude.seq` Prelude.rnf lastObservedAt+ `Prelude.seq` Prelude.rnf remediation+ `Prelude.seq` Prelude.rnf resources+ `Prelude.seq` Prelude.rnf severity+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf type'
+ gen/Amazonka/Inspector2/Types/FindingStatus.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.Inspector2.Types.FindingStatus+-- 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.Inspector2.Types.FindingStatus+ ( FindingStatus+ ( ..,+ FindingStatus_ACTIVE,+ FindingStatus_CLOSED,+ FindingStatus_SUPPRESSED+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype FindingStatus = FindingStatus'+ { fromFindingStatus ::+ 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 FindingStatus_ACTIVE :: FindingStatus+pattern FindingStatus_ACTIVE = FindingStatus' "ACTIVE"++pattern FindingStatus_CLOSED :: FindingStatus+pattern FindingStatus_CLOSED = FindingStatus' "CLOSED"++pattern FindingStatus_SUPPRESSED :: FindingStatus+pattern FindingStatus_SUPPRESSED = FindingStatus' "SUPPRESSED"++{-# COMPLETE+ FindingStatus_ACTIVE,+ FindingStatus_CLOSED,+ FindingStatus_SUPPRESSED,+ FindingStatus'+ #-}
+ gen/Amazonka/Inspector2/Types/FindingType.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.Inspector2.Types.FindingType+-- 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.Inspector2.Types.FindingType+ ( FindingType+ ( ..,+ FindingType_NETWORK_REACHABILITY,+ FindingType_PACKAGE_VULNERABILITY+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype FindingType = FindingType'+ { fromFindingType ::+ 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 FindingType_NETWORK_REACHABILITY :: FindingType+pattern FindingType_NETWORK_REACHABILITY = FindingType' "NETWORK_REACHABILITY"++pattern FindingType_PACKAGE_VULNERABILITY :: FindingType+pattern FindingType_PACKAGE_VULNERABILITY = FindingType' "PACKAGE_VULNERABILITY"++{-# COMPLETE+ FindingType_NETWORK_REACHABILITY,+ FindingType_PACKAGE_VULNERABILITY,+ FindingType'+ #-}
+ gen/Amazonka/Inspector2/Types/FindingTypeAggregation.hs view
@@ -0,0 +1,112 @@+{-# 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.Inspector2.Types.FindingTypeAggregation+-- 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.Inspector2.Types.FindingTypeAggregation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.AggregationFindingType+import Amazonka.Inspector2.Types.AggregationResourceType+import Amazonka.Inspector2.Types.FindingTypeSortBy+import Amazonka.Inspector2.Types.SortOrder+import qualified Amazonka.Prelude as Prelude++-- | The details that define an aggregation based on finding type.+--+-- /See:/ 'newFindingTypeAggregation' smart constructor.+data FindingTypeAggregation = FindingTypeAggregation'+ { -- | The finding type to aggregate.+ findingType :: Prelude.Maybe AggregationFindingType,+ -- | The resource type to aggregate.+ resourceType :: Prelude.Maybe AggregationResourceType,+ -- | The value to sort results by.+ sortBy :: Prelude.Maybe FindingTypeSortBy,+ -- | The order to sort results by.+ sortOrder :: Prelude.Maybe SortOrder+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'FindingTypeAggregation' 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:+--+-- 'findingType', 'findingTypeAggregation_findingType' - The finding type to aggregate.+--+-- 'resourceType', 'findingTypeAggregation_resourceType' - The resource type to aggregate.+--+-- 'sortBy', 'findingTypeAggregation_sortBy' - The value to sort results by.+--+-- 'sortOrder', 'findingTypeAggregation_sortOrder' - The order to sort results by.+newFindingTypeAggregation ::+ FindingTypeAggregation+newFindingTypeAggregation =+ FindingTypeAggregation'+ { findingType =+ Prelude.Nothing,+ resourceType = Prelude.Nothing,+ sortBy = Prelude.Nothing,+ sortOrder = Prelude.Nothing+ }++-- | The finding type to aggregate.+findingTypeAggregation_findingType :: Lens.Lens' FindingTypeAggregation (Prelude.Maybe AggregationFindingType)+findingTypeAggregation_findingType = Lens.lens (\FindingTypeAggregation' {findingType} -> findingType) (\s@FindingTypeAggregation' {} a -> s {findingType = a} :: FindingTypeAggregation)++-- | The resource type to aggregate.+findingTypeAggregation_resourceType :: Lens.Lens' FindingTypeAggregation (Prelude.Maybe AggregationResourceType)+findingTypeAggregation_resourceType = Lens.lens (\FindingTypeAggregation' {resourceType} -> resourceType) (\s@FindingTypeAggregation' {} a -> s {resourceType = a} :: FindingTypeAggregation)++-- | The value to sort results by.+findingTypeAggregation_sortBy :: Lens.Lens' FindingTypeAggregation (Prelude.Maybe FindingTypeSortBy)+findingTypeAggregation_sortBy = Lens.lens (\FindingTypeAggregation' {sortBy} -> sortBy) (\s@FindingTypeAggregation' {} a -> s {sortBy = a} :: FindingTypeAggregation)++-- | The order to sort results by.+findingTypeAggregation_sortOrder :: Lens.Lens' FindingTypeAggregation (Prelude.Maybe SortOrder)+findingTypeAggregation_sortOrder = Lens.lens (\FindingTypeAggregation' {sortOrder} -> sortOrder) (\s@FindingTypeAggregation' {} a -> s {sortOrder = a} :: FindingTypeAggregation)++instance Prelude.Hashable FindingTypeAggregation where+ hashWithSalt _salt FindingTypeAggregation' {..} =+ _salt+ `Prelude.hashWithSalt` findingType+ `Prelude.hashWithSalt` resourceType+ `Prelude.hashWithSalt` sortBy+ `Prelude.hashWithSalt` sortOrder++instance Prelude.NFData FindingTypeAggregation where+ rnf FindingTypeAggregation' {..} =+ Prelude.rnf findingType+ `Prelude.seq` Prelude.rnf resourceType+ `Prelude.seq` Prelude.rnf sortBy+ `Prelude.seq` Prelude.rnf sortOrder++instance Data.ToJSON FindingTypeAggregation where+ toJSON FindingTypeAggregation' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("findingType" Data..=) Prelude.<$> findingType,+ ("resourceType" Data..=) Prelude.<$> resourceType,+ ("sortBy" Data..=) Prelude.<$> sortBy,+ ("sortOrder" Data..=) Prelude.<$> sortOrder+ ]+ )
+ gen/Amazonka/Inspector2/Types/FindingTypeAggregationResponse.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.Inspector2.Types.FindingTypeAggregationResponse+-- 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.Inspector2.Types.FindingTypeAggregationResponse where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.SeverityCounts+import qualified Amazonka.Prelude as Prelude++-- | A response that contains the results of a finding type aggregation.+--+-- /See:/ 'newFindingTypeAggregationResponse' smart constructor.+data FindingTypeAggregationResponse = FindingTypeAggregationResponse'+ { -- | The ID of the Amazon Web Services account associated with the findings.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | The value to sort results by.+ severityCounts :: Prelude.Maybe SeverityCounts+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'FindingTypeAggregationResponse' 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', 'findingTypeAggregationResponse_accountId' - The ID of the Amazon Web Services account associated with the findings.+--+-- 'severityCounts', 'findingTypeAggregationResponse_severityCounts' - The value to sort results by.+newFindingTypeAggregationResponse ::+ FindingTypeAggregationResponse+newFindingTypeAggregationResponse =+ FindingTypeAggregationResponse'+ { accountId =+ Prelude.Nothing,+ severityCounts = Prelude.Nothing+ }++-- | The ID of the Amazon Web Services account associated with the findings.+findingTypeAggregationResponse_accountId :: Lens.Lens' FindingTypeAggregationResponse (Prelude.Maybe Prelude.Text)+findingTypeAggregationResponse_accountId = Lens.lens (\FindingTypeAggregationResponse' {accountId} -> accountId) (\s@FindingTypeAggregationResponse' {} a -> s {accountId = a} :: FindingTypeAggregationResponse)++-- | The value to sort results by.+findingTypeAggregationResponse_severityCounts :: Lens.Lens' FindingTypeAggregationResponse (Prelude.Maybe SeverityCounts)+findingTypeAggregationResponse_severityCounts = Lens.lens (\FindingTypeAggregationResponse' {severityCounts} -> severityCounts) (\s@FindingTypeAggregationResponse' {} a -> s {severityCounts = a} :: FindingTypeAggregationResponse)++instance Data.FromJSON FindingTypeAggregationResponse where+ parseJSON =+ Data.withObject+ "FindingTypeAggregationResponse"+ ( \x ->+ FindingTypeAggregationResponse'+ Prelude.<$> (x Data..:? "accountId")+ Prelude.<*> (x Data..:? "severityCounts")+ )++instance+ Prelude.Hashable+ FindingTypeAggregationResponse+ where+ hashWithSalt+ _salt+ FindingTypeAggregationResponse' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` severityCounts++instance+ Prelude.NFData+ FindingTypeAggregationResponse+ where+ rnf FindingTypeAggregationResponse' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf severityCounts
+ gen/Amazonka/Inspector2/Types/FindingTypeSortBy.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.Inspector2.Types.FindingTypeSortBy+-- 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.Inspector2.Types.FindingTypeSortBy+ ( FindingTypeSortBy+ ( ..,+ FindingTypeSortBy_ALL,+ FindingTypeSortBy_CRITICAL,+ FindingTypeSortBy_HIGH+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype FindingTypeSortBy = FindingTypeSortBy'+ { fromFindingTypeSortBy ::+ 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 FindingTypeSortBy_ALL :: FindingTypeSortBy+pattern FindingTypeSortBy_ALL = FindingTypeSortBy' "ALL"++pattern FindingTypeSortBy_CRITICAL :: FindingTypeSortBy+pattern FindingTypeSortBy_CRITICAL = FindingTypeSortBy' "CRITICAL"++pattern FindingTypeSortBy_HIGH :: FindingTypeSortBy+pattern FindingTypeSortBy_HIGH = FindingTypeSortBy' "HIGH"++{-# COMPLETE+ FindingTypeSortBy_ALL,+ FindingTypeSortBy_CRITICAL,+ FindingTypeSortBy_HIGH,+ FindingTypeSortBy'+ #-}
+ gen/Amazonka/Inspector2/Types/FixAvailable.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.Inspector2.Types.FixAvailable+-- 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.Inspector2.Types.FixAvailable+ ( FixAvailable+ ( ..,+ FixAvailable_NO,+ FixAvailable_PARTIAL,+ FixAvailable_YES+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype FixAvailable = FixAvailable'+ { fromFixAvailable ::+ 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 FixAvailable_NO :: FixAvailable+pattern FixAvailable_NO = FixAvailable' "NO"++pattern FixAvailable_PARTIAL :: FixAvailable+pattern FixAvailable_PARTIAL = FixAvailable' "PARTIAL"++pattern FixAvailable_YES :: FixAvailable+pattern FixAvailable_YES = FixAvailable' "YES"++{-# COMPLETE+ FixAvailable_NO,+ FixAvailable_PARTIAL,+ FixAvailable_YES,+ FixAvailable'+ #-}
+ gen/Amazonka/Inspector2/Types/FreeTrialAccountInfo.hs view
@@ -0,0 +1,90 @@+{-# 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.Inspector2.Types.FreeTrialAccountInfo+-- 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.Inspector2.Types.FreeTrialAccountInfo where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.FreeTrialInfo+import qualified Amazonka.Prelude as Prelude++-- | Information about the Amazon Inspector free trial for an account.+--+-- /See:/ 'newFreeTrialAccountInfo' smart constructor.+data FreeTrialAccountInfo = FreeTrialAccountInfo'+ { -- | The account associated with the Amazon Inspector free trial information.+ accountId :: Prelude.Text,+ -- | Contains information about the Amazon Inspector free trial for an+ -- account.+ freeTrialInfo :: [FreeTrialInfo]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'FreeTrialAccountInfo' 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', 'freeTrialAccountInfo_accountId' - The account associated with the Amazon Inspector free trial information.+--+-- 'freeTrialInfo', 'freeTrialAccountInfo_freeTrialInfo' - Contains information about the Amazon Inspector free trial for an+-- account.+newFreeTrialAccountInfo ::+ -- | 'accountId'+ Prelude.Text ->+ FreeTrialAccountInfo+newFreeTrialAccountInfo pAccountId_ =+ FreeTrialAccountInfo'+ { accountId = pAccountId_,+ freeTrialInfo = Prelude.mempty+ }++-- | The account associated with the Amazon Inspector free trial information.+freeTrialAccountInfo_accountId :: Lens.Lens' FreeTrialAccountInfo Prelude.Text+freeTrialAccountInfo_accountId = Lens.lens (\FreeTrialAccountInfo' {accountId} -> accountId) (\s@FreeTrialAccountInfo' {} a -> s {accountId = a} :: FreeTrialAccountInfo)++-- | Contains information about the Amazon Inspector free trial for an+-- account.+freeTrialAccountInfo_freeTrialInfo :: Lens.Lens' FreeTrialAccountInfo [FreeTrialInfo]+freeTrialAccountInfo_freeTrialInfo = Lens.lens (\FreeTrialAccountInfo' {freeTrialInfo} -> freeTrialInfo) (\s@FreeTrialAccountInfo' {} a -> s {freeTrialInfo = a} :: FreeTrialAccountInfo) Prelude.. Lens.coerced++instance Data.FromJSON FreeTrialAccountInfo where+ parseJSON =+ Data.withObject+ "FreeTrialAccountInfo"+ ( \x ->+ FreeTrialAccountInfo'+ Prelude.<$> (x Data..: "accountId")+ Prelude.<*> (x Data..:? "freeTrialInfo" Data..!= Prelude.mempty)+ )++instance Prelude.Hashable FreeTrialAccountInfo where+ hashWithSalt _salt FreeTrialAccountInfo' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` freeTrialInfo++instance Prelude.NFData FreeTrialAccountInfo where+ rnf FreeTrialAccountInfo' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf freeTrialInfo
+ gen/Amazonka/Inspector2/Types/FreeTrialInfo.hs view
@@ -0,0 +1,125 @@+{-# 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.Inspector2.Types.FreeTrialInfo+-- 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.Inspector2.Types.FreeTrialInfo where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.FreeTrialStatus+import Amazonka.Inspector2.Types.FreeTrialType+import qualified Amazonka.Prelude as Prelude++-- | An object that contains information about the Amazon Inspector free+-- trial for an account.+--+-- /See:/ 'newFreeTrialInfo' smart constructor.+data FreeTrialInfo = FreeTrialInfo'+ { -- | The date and time that the Amazon Inspector free trail ends for a given+ -- account.+ end :: Data.POSIX,+ -- | The date and time that the Amazon Inspector free trail started for a+ -- given account.+ start :: Data.POSIX,+ -- | The order to sort results by.+ status :: FreeTrialStatus,+ -- | The type of scan covered by the Amazon Inspector free trail.+ type' :: FreeTrialType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'FreeTrialInfo' 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:+--+-- 'end', 'freeTrialInfo_end' - The date and time that the Amazon Inspector free trail ends for a given+-- account.+--+-- 'start', 'freeTrialInfo_start' - The date and time that the Amazon Inspector free trail started for a+-- given account.+--+-- 'status', 'freeTrialInfo_status' - The order to sort results by.+--+-- 'type'', 'freeTrialInfo_type' - The type of scan covered by the Amazon Inspector free trail.+newFreeTrialInfo ::+ -- | 'end'+ Prelude.UTCTime ->+ -- | 'start'+ Prelude.UTCTime ->+ -- | 'status'+ FreeTrialStatus ->+ -- | 'type''+ FreeTrialType ->+ FreeTrialInfo+newFreeTrialInfo pEnd_ pStart_ pStatus_ pType_ =+ FreeTrialInfo'+ { end = Data._Time Lens.# pEnd_,+ start = Data._Time Lens.# pStart_,+ status = pStatus_,+ type' = pType_+ }++-- | The date and time that the Amazon Inspector free trail ends for a given+-- account.+freeTrialInfo_end :: Lens.Lens' FreeTrialInfo Prelude.UTCTime+freeTrialInfo_end = Lens.lens (\FreeTrialInfo' {end} -> end) (\s@FreeTrialInfo' {} a -> s {end = a} :: FreeTrialInfo) Prelude.. Data._Time++-- | The date and time that the Amazon Inspector free trail started for a+-- given account.+freeTrialInfo_start :: Lens.Lens' FreeTrialInfo Prelude.UTCTime+freeTrialInfo_start = Lens.lens (\FreeTrialInfo' {start} -> start) (\s@FreeTrialInfo' {} a -> s {start = a} :: FreeTrialInfo) Prelude.. Data._Time++-- | The order to sort results by.+freeTrialInfo_status :: Lens.Lens' FreeTrialInfo FreeTrialStatus+freeTrialInfo_status = Lens.lens (\FreeTrialInfo' {status} -> status) (\s@FreeTrialInfo' {} a -> s {status = a} :: FreeTrialInfo)++-- | The type of scan covered by the Amazon Inspector free trail.+freeTrialInfo_type :: Lens.Lens' FreeTrialInfo FreeTrialType+freeTrialInfo_type = Lens.lens (\FreeTrialInfo' {type'} -> type') (\s@FreeTrialInfo' {} a -> s {type' = a} :: FreeTrialInfo)++instance Data.FromJSON FreeTrialInfo where+ parseJSON =+ Data.withObject+ "FreeTrialInfo"+ ( \x ->+ FreeTrialInfo'+ Prelude.<$> (x Data..: "end")+ Prelude.<*> (x Data..: "start")+ Prelude.<*> (x Data..: "status")+ Prelude.<*> (x Data..: "type")+ )++instance Prelude.Hashable FreeTrialInfo where+ hashWithSalt _salt FreeTrialInfo' {..} =+ _salt+ `Prelude.hashWithSalt` end+ `Prelude.hashWithSalt` start+ `Prelude.hashWithSalt` status+ `Prelude.hashWithSalt` type'++instance Prelude.NFData FreeTrialInfo where+ rnf FreeTrialInfo' {..} =+ Prelude.rnf end+ `Prelude.seq` Prelude.rnf start+ `Prelude.seq` Prelude.rnf status+ `Prelude.seq` Prelude.rnf type'
+ gen/Amazonka/Inspector2/Types/FreeTrialInfoError.hs view
@@ -0,0 +1,104 @@+{-# 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.Inspector2.Types.FreeTrialInfoError+-- 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.Inspector2.Types.FreeTrialInfoError where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.FreeTrialInfoErrorCode+import qualified Amazonka.Prelude as Prelude++-- | Information about an error received while accessing free trail data for+-- an account.+--+-- /See:/ 'newFreeTrialInfoError' smart constructor.+data FreeTrialInfoError = FreeTrialInfoError'+ { -- | The account associated with the Amazon Inspector free trial information.+ accountId :: Prelude.Text,+ -- | The error code.+ code :: FreeTrialInfoErrorCode,+ -- | The error message returned.+ message :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'FreeTrialInfoError' 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', 'freeTrialInfoError_accountId' - The account associated with the Amazon Inspector free trial information.+--+-- 'code', 'freeTrialInfoError_code' - The error code.+--+-- 'message', 'freeTrialInfoError_message' - The error message returned.+newFreeTrialInfoError ::+ -- | 'accountId'+ Prelude.Text ->+ -- | 'code'+ FreeTrialInfoErrorCode ->+ -- | 'message'+ Prelude.Text ->+ FreeTrialInfoError+newFreeTrialInfoError pAccountId_ pCode_ pMessage_ =+ FreeTrialInfoError'+ { accountId = pAccountId_,+ code = pCode_,+ message = pMessage_+ }++-- | The account associated with the Amazon Inspector free trial information.+freeTrialInfoError_accountId :: Lens.Lens' FreeTrialInfoError Prelude.Text+freeTrialInfoError_accountId = Lens.lens (\FreeTrialInfoError' {accountId} -> accountId) (\s@FreeTrialInfoError' {} a -> s {accountId = a} :: FreeTrialInfoError)++-- | The error code.+freeTrialInfoError_code :: Lens.Lens' FreeTrialInfoError FreeTrialInfoErrorCode+freeTrialInfoError_code = Lens.lens (\FreeTrialInfoError' {code} -> code) (\s@FreeTrialInfoError' {} a -> s {code = a} :: FreeTrialInfoError)++-- | The error message returned.+freeTrialInfoError_message :: Lens.Lens' FreeTrialInfoError Prelude.Text+freeTrialInfoError_message = Lens.lens (\FreeTrialInfoError' {message} -> message) (\s@FreeTrialInfoError' {} a -> s {message = a} :: FreeTrialInfoError)++instance Data.FromJSON FreeTrialInfoError where+ parseJSON =+ Data.withObject+ "FreeTrialInfoError"+ ( \x ->+ FreeTrialInfoError'+ Prelude.<$> (x Data..: "accountId")+ Prelude.<*> (x Data..: "code")+ Prelude.<*> (x Data..: "message")+ )++instance Prelude.Hashable FreeTrialInfoError where+ hashWithSalt _salt FreeTrialInfoError' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` code+ `Prelude.hashWithSalt` message++instance Prelude.NFData FreeTrialInfoError where+ rnf FreeTrialInfoError' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf code+ `Prelude.seq` Prelude.rnf message
+ gen/Amazonka/Inspector2/Types/FreeTrialInfoErrorCode.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.Inspector2.Types.FreeTrialInfoErrorCode+-- 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.Inspector2.Types.FreeTrialInfoErrorCode+ ( FreeTrialInfoErrorCode+ ( ..,+ FreeTrialInfoErrorCode_ACCESS_DENIED,+ FreeTrialInfoErrorCode_INTERNAL_ERROR+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype FreeTrialInfoErrorCode = FreeTrialInfoErrorCode'+ { fromFreeTrialInfoErrorCode ::+ 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 FreeTrialInfoErrorCode_ACCESS_DENIED :: FreeTrialInfoErrorCode+pattern FreeTrialInfoErrorCode_ACCESS_DENIED = FreeTrialInfoErrorCode' "ACCESS_DENIED"++pattern FreeTrialInfoErrorCode_INTERNAL_ERROR :: FreeTrialInfoErrorCode+pattern FreeTrialInfoErrorCode_INTERNAL_ERROR = FreeTrialInfoErrorCode' "INTERNAL_ERROR"++{-# COMPLETE+ FreeTrialInfoErrorCode_ACCESS_DENIED,+ FreeTrialInfoErrorCode_INTERNAL_ERROR,+ FreeTrialInfoErrorCode'+ #-}
+ gen/Amazonka/Inspector2/Types/FreeTrialStatus.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.Inspector2.Types.FreeTrialStatus+-- 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.Inspector2.Types.FreeTrialStatus+ ( FreeTrialStatus+ ( ..,+ FreeTrialStatus_ACTIVE,+ FreeTrialStatus_INACTIVE+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype FreeTrialStatus = FreeTrialStatus'+ { fromFreeTrialStatus ::+ 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 FreeTrialStatus_ACTIVE :: FreeTrialStatus+pattern FreeTrialStatus_ACTIVE = FreeTrialStatus' "ACTIVE"++pattern FreeTrialStatus_INACTIVE :: FreeTrialStatus+pattern FreeTrialStatus_INACTIVE = FreeTrialStatus' "INACTIVE"++{-# COMPLETE+ FreeTrialStatus_ACTIVE,+ FreeTrialStatus_INACTIVE,+ FreeTrialStatus'+ #-}
+ gen/Amazonka/Inspector2/Types/FreeTrialType.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.Inspector2.Types.FreeTrialType+-- 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.Inspector2.Types.FreeTrialType+ ( FreeTrialType+ ( ..,+ FreeTrialType_EC2,+ FreeTrialType_ECR,+ FreeTrialType_LAMBDA+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype FreeTrialType = FreeTrialType'+ { fromFreeTrialType ::+ 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 FreeTrialType_EC2 :: FreeTrialType+pattern FreeTrialType_EC2 = FreeTrialType' "EC2"++pattern FreeTrialType_ECR :: FreeTrialType+pattern FreeTrialType_ECR = FreeTrialType' "ECR"++pattern FreeTrialType_LAMBDA :: FreeTrialType+pattern FreeTrialType_LAMBDA = FreeTrialType' "LAMBDA"++{-# COMPLETE+ FreeTrialType_EC2,+ FreeTrialType_ECR,+ FreeTrialType_LAMBDA,+ FreeTrialType'+ #-}
+ gen/Amazonka/Inspector2/Types/GroupKey.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.Inspector2.Types.GroupKey+-- 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.Inspector2.Types.GroupKey+ ( GroupKey+ ( ..,+ GroupKey_ACCOUNT_ID,+ GroupKey_ECR_REPOSITORY_NAME,+ GroupKey_RESOURCE_TYPE,+ GroupKey_SCAN_STATUS_CODE,+ GroupKey_SCAN_STATUS_REASON+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype GroupKey = GroupKey'+ { fromGroupKey ::+ 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 GroupKey_ACCOUNT_ID :: GroupKey+pattern GroupKey_ACCOUNT_ID = GroupKey' "ACCOUNT_ID"++pattern GroupKey_ECR_REPOSITORY_NAME :: GroupKey+pattern GroupKey_ECR_REPOSITORY_NAME = GroupKey' "ECR_REPOSITORY_NAME"++pattern GroupKey_RESOURCE_TYPE :: GroupKey+pattern GroupKey_RESOURCE_TYPE = GroupKey' "RESOURCE_TYPE"++pattern GroupKey_SCAN_STATUS_CODE :: GroupKey+pattern GroupKey_SCAN_STATUS_CODE = GroupKey' "SCAN_STATUS_CODE"++pattern GroupKey_SCAN_STATUS_REASON :: GroupKey+pattern GroupKey_SCAN_STATUS_REASON = GroupKey' "SCAN_STATUS_REASON"++{-# COMPLETE+ GroupKey_ACCOUNT_ID,+ GroupKey_ECR_REPOSITORY_NAME,+ GroupKey_RESOURCE_TYPE,+ GroupKey_SCAN_STATUS_CODE,+ GroupKey_SCAN_STATUS_REASON,+ GroupKey'+ #-}
+ gen/Amazonka/Inspector2/Types/ImageLayerAggregation.hs view
@@ -0,0 +1,123 @@+{-# 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.Inspector2.Types.ImageLayerAggregation+-- 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.Inspector2.Types.ImageLayerAggregation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.ImageLayerSortBy+import Amazonka.Inspector2.Types.SortOrder+import Amazonka.Inspector2.Types.StringFilter+import qualified Amazonka.Prelude as Prelude++-- | The details that define an aggregation based on container image layers.+--+-- /See:/ 'newImageLayerAggregation' smart constructor.+data ImageLayerAggregation = ImageLayerAggregation'+ { -- | The hashes associated with the layers.+ layerHashes :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The repository associated with the container image hosting the layers.+ repositories :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The ID of the container image layer.+ resourceIds :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The value to sort results by.+ sortBy :: Prelude.Maybe ImageLayerSortBy,+ -- | The order to sort results by.+ sortOrder :: Prelude.Maybe SortOrder+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ImageLayerAggregation' 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:+--+-- 'layerHashes', 'imageLayerAggregation_layerHashes' - The hashes associated with the layers.+--+-- 'repositories', 'imageLayerAggregation_repositories' - The repository associated with the container image hosting the layers.+--+-- 'resourceIds', 'imageLayerAggregation_resourceIds' - The ID of the container image layer.+--+-- 'sortBy', 'imageLayerAggregation_sortBy' - The value to sort results by.+--+-- 'sortOrder', 'imageLayerAggregation_sortOrder' - The order to sort results by.+newImageLayerAggregation ::+ ImageLayerAggregation+newImageLayerAggregation =+ ImageLayerAggregation'+ { layerHashes =+ Prelude.Nothing,+ repositories = Prelude.Nothing,+ resourceIds = Prelude.Nothing,+ sortBy = Prelude.Nothing,+ sortOrder = Prelude.Nothing+ }++-- | The hashes associated with the layers.+imageLayerAggregation_layerHashes :: Lens.Lens' ImageLayerAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+imageLayerAggregation_layerHashes = Lens.lens (\ImageLayerAggregation' {layerHashes} -> layerHashes) (\s@ImageLayerAggregation' {} a -> s {layerHashes = a} :: ImageLayerAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The repository associated with the container image hosting the layers.+imageLayerAggregation_repositories :: Lens.Lens' ImageLayerAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+imageLayerAggregation_repositories = Lens.lens (\ImageLayerAggregation' {repositories} -> repositories) (\s@ImageLayerAggregation' {} a -> s {repositories = a} :: ImageLayerAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The ID of the container image layer.+imageLayerAggregation_resourceIds :: Lens.Lens' ImageLayerAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+imageLayerAggregation_resourceIds = Lens.lens (\ImageLayerAggregation' {resourceIds} -> resourceIds) (\s@ImageLayerAggregation' {} a -> s {resourceIds = a} :: ImageLayerAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The value to sort results by.+imageLayerAggregation_sortBy :: Lens.Lens' ImageLayerAggregation (Prelude.Maybe ImageLayerSortBy)+imageLayerAggregation_sortBy = Lens.lens (\ImageLayerAggregation' {sortBy} -> sortBy) (\s@ImageLayerAggregation' {} a -> s {sortBy = a} :: ImageLayerAggregation)++-- | The order to sort results by.+imageLayerAggregation_sortOrder :: Lens.Lens' ImageLayerAggregation (Prelude.Maybe SortOrder)+imageLayerAggregation_sortOrder = Lens.lens (\ImageLayerAggregation' {sortOrder} -> sortOrder) (\s@ImageLayerAggregation' {} a -> s {sortOrder = a} :: ImageLayerAggregation)++instance Prelude.Hashable ImageLayerAggregation where+ hashWithSalt _salt ImageLayerAggregation' {..} =+ _salt+ `Prelude.hashWithSalt` layerHashes+ `Prelude.hashWithSalt` repositories+ `Prelude.hashWithSalt` resourceIds+ `Prelude.hashWithSalt` sortBy+ `Prelude.hashWithSalt` sortOrder++instance Prelude.NFData ImageLayerAggregation where+ rnf ImageLayerAggregation' {..} =+ Prelude.rnf layerHashes+ `Prelude.seq` Prelude.rnf repositories+ `Prelude.seq` Prelude.rnf resourceIds+ `Prelude.seq` Prelude.rnf sortBy+ `Prelude.seq` Prelude.rnf sortOrder++instance Data.ToJSON ImageLayerAggregation where+ toJSON ImageLayerAggregation' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("layerHashes" Data..=) Prelude.<$> layerHashes,+ ("repositories" Data..=) Prelude.<$> repositories,+ ("resourceIds" Data..=) Prelude.<$> resourceIds,+ ("sortBy" Data..=) Prelude.<$> sortBy,+ ("sortOrder" Data..=) Prelude.<$> sortOrder+ ]+ )
+ gen/Amazonka/Inspector2/Types/ImageLayerAggregationResponse.hs view
@@ -0,0 +1,141 @@+{-# 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.Inspector2.Types.ImageLayerAggregationResponse+-- 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.Inspector2.Types.ImageLayerAggregationResponse where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.SeverityCounts+import qualified Amazonka.Prelude as Prelude++-- | A response that contains the results of a finding aggregation by image+-- layer.+--+-- /See:/ 'newImageLayerAggregationResponse' smart constructor.+data ImageLayerAggregationResponse = ImageLayerAggregationResponse'+ { -- | An object that represents the count of matched findings per severity.+ severityCounts :: Prelude.Maybe SeverityCounts,+ -- | The ID of the Amazon Web Services account that owns the container image+ -- hosting the layer image.+ accountId :: Prelude.Text,+ -- | The layer hash.+ layerHash :: Prelude.Text,+ -- | The repository the layer resides in.+ repository :: Prelude.Text,+ -- | The resource ID of the container image layer.+ resourceId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ImageLayerAggregationResponse' 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:+--+-- 'severityCounts', 'imageLayerAggregationResponse_severityCounts' - An object that represents the count of matched findings per severity.+--+-- 'accountId', 'imageLayerAggregationResponse_accountId' - The ID of the Amazon Web Services account that owns the container image+-- hosting the layer image.+--+-- 'layerHash', 'imageLayerAggregationResponse_layerHash' - The layer hash.+--+-- 'repository', 'imageLayerAggregationResponse_repository' - The repository the layer resides in.+--+-- 'resourceId', 'imageLayerAggregationResponse_resourceId' - The resource ID of the container image layer.+newImageLayerAggregationResponse ::+ -- | 'accountId'+ Prelude.Text ->+ -- | 'layerHash'+ Prelude.Text ->+ -- | 'repository'+ Prelude.Text ->+ -- | 'resourceId'+ Prelude.Text ->+ ImageLayerAggregationResponse+newImageLayerAggregationResponse+ pAccountId_+ pLayerHash_+ pRepository_+ pResourceId_ =+ ImageLayerAggregationResponse'+ { severityCounts =+ Prelude.Nothing,+ accountId = pAccountId_,+ layerHash = pLayerHash_,+ repository = pRepository_,+ resourceId = pResourceId_+ }++-- | An object that represents the count of matched findings per severity.+imageLayerAggregationResponse_severityCounts :: Lens.Lens' ImageLayerAggregationResponse (Prelude.Maybe SeverityCounts)+imageLayerAggregationResponse_severityCounts = Lens.lens (\ImageLayerAggregationResponse' {severityCounts} -> severityCounts) (\s@ImageLayerAggregationResponse' {} a -> s {severityCounts = a} :: ImageLayerAggregationResponse)++-- | The ID of the Amazon Web Services account that owns the container image+-- hosting the layer image.+imageLayerAggregationResponse_accountId :: Lens.Lens' ImageLayerAggregationResponse Prelude.Text+imageLayerAggregationResponse_accountId = Lens.lens (\ImageLayerAggregationResponse' {accountId} -> accountId) (\s@ImageLayerAggregationResponse' {} a -> s {accountId = a} :: ImageLayerAggregationResponse)++-- | The layer hash.+imageLayerAggregationResponse_layerHash :: Lens.Lens' ImageLayerAggregationResponse Prelude.Text+imageLayerAggregationResponse_layerHash = Lens.lens (\ImageLayerAggregationResponse' {layerHash} -> layerHash) (\s@ImageLayerAggregationResponse' {} a -> s {layerHash = a} :: ImageLayerAggregationResponse)++-- | The repository the layer resides in.+imageLayerAggregationResponse_repository :: Lens.Lens' ImageLayerAggregationResponse Prelude.Text+imageLayerAggregationResponse_repository = Lens.lens (\ImageLayerAggregationResponse' {repository} -> repository) (\s@ImageLayerAggregationResponse' {} a -> s {repository = a} :: ImageLayerAggregationResponse)++-- | The resource ID of the container image layer.+imageLayerAggregationResponse_resourceId :: Lens.Lens' ImageLayerAggregationResponse Prelude.Text+imageLayerAggregationResponse_resourceId = Lens.lens (\ImageLayerAggregationResponse' {resourceId} -> resourceId) (\s@ImageLayerAggregationResponse' {} a -> s {resourceId = a} :: ImageLayerAggregationResponse)++instance Data.FromJSON ImageLayerAggregationResponse where+ parseJSON =+ Data.withObject+ "ImageLayerAggregationResponse"+ ( \x ->+ ImageLayerAggregationResponse'+ Prelude.<$> (x Data..:? "severityCounts")+ Prelude.<*> (x Data..: "accountId")+ Prelude.<*> (x Data..: "layerHash")+ Prelude.<*> (x Data..: "repository")+ Prelude.<*> (x Data..: "resourceId")+ )++instance+ Prelude.Hashable+ ImageLayerAggregationResponse+ where+ hashWithSalt _salt ImageLayerAggregationResponse' {..} =+ _salt+ `Prelude.hashWithSalt` severityCounts+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` layerHash+ `Prelude.hashWithSalt` repository+ `Prelude.hashWithSalt` resourceId++instance Prelude.NFData ImageLayerAggregationResponse where+ rnf ImageLayerAggregationResponse' {..} =+ Prelude.rnf severityCounts+ `Prelude.seq` Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf layerHash+ `Prelude.seq` Prelude.rnf repository+ `Prelude.seq` Prelude.rnf resourceId
+ gen/Amazonka/Inspector2/Types/ImageLayerSortBy.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.Inspector2.Types.ImageLayerSortBy+-- 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.Inspector2.Types.ImageLayerSortBy+ ( ImageLayerSortBy+ ( ..,+ ImageLayerSortBy_ALL,+ ImageLayerSortBy_CRITICAL,+ ImageLayerSortBy_HIGH+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ImageLayerSortBy = ImageLayerSortBy'+ { fromImageLayerSortBy ::+ 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 ImageLayerSortBy_ALL :: ImageLayerSortBy+pattern ImageLayerSortBy_ALL = ImageLayerSortBy' "ALL"++pattern ImageLayerSortBy_CRITICAL :: ImageLayerSortBy+pattern ImageLayerSortBy_CRITICAL = ImageLayerSortBy' "CRITICAL"++pattern ImageLayerSortBy_HIGH :: ImageLayerSortBy+pattern ImageLayerSortBy_HIGH = ImageLayerSortBy' "HIGH"++{-# COMPLETE+ ImageLayerSortBy_ALL,+ ImageLayerSortBy_CRITICAL,+ ImageLayerSortBy_HIGH,+ ImageLayerSortBy'+ #-}
+ gen/Amazonka/Inspector2/Types/InspectorScoreDetails.hs view
@@ -0,0 +1,73 @@+{-# 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.Inspector2.Types.InspectorScoreDetails+-- 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.Inspector2.Types.InspectorScoreDetails where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.CvssScoreDetails+import qualified Amazonka.Prelude as Prelude++-- | Information about the Amazon Inspector score given to a finding.+--+-- /See:/ 'newInspectorScoreDetails' smart constructor.+data InspectorScoreDetails = InspectorScoreDetails'+ { -- | An object that contains details about the CVSS score given to a finding.+ adjustedCvss :: Prelude.Maybe CvssScoreDetails+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'InspectorScoreDetails' 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:+--+-- 'adjustedCvss', 'inspectorScoreDetails_adjustedCvss' - An object that contains details about the CVSS score given to a finding.+newInspectorScoreDetails ::+ InspectorScoreDetails+newInspectorScoreDetails =+ InspectorScoreDetails'+ { adjustedCvss =+ Prelude.Nothing+ }++-- | An object that contains details about the CVSS score given to a finding.+inspectorScoreDetails_adjustedCvss :: Lens.Lens' InspectorScoreDetails (Prelude.Maybe CvssScoreDetails)+inspectorScoreDetails_adjustedCvss = Lens.lens (\InspectorScoreDetails' {adjustedCvss} -> adjustedCvss) (\s@InspectorScoreDetails' {} a -> s {adjustedCvss = a} :: InspectorScoreDetails)++instance Data.FromJSON InspectorScoreDetails where+ parseJSON =+ Data.withObject+ "InspectorScoreDetails"+ ( \x ->+ InspectorScoreDetails'+ Prelude.<$> (x Data..:? "adjustedCvss")+ )++instance Prelude.Hashable InspectorScoreDetails where+ hashWithSalt _salt InspectorScoreDetails' {..} =+ _salt `Prelude.hashWithSalt` adjustedCvss++instance Prelude.NFData InspectorScoreDetails where+ rnf InspectorScoreDetails' {..} =+ Prelude.rnf adjustedCvss
+ gen/Amazonka/Inspector2/Types/LambdaFunctionAggregation.hs view
@@ -0,0 +1,137 @@+{-# 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.Inspector2.Types.LambdaFunctionAggregation+-- 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.Inspector2.Types.LambdaFunctionAggregation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.LambdaFunctionSortBy+import Amazonka.Inspector2.Types.MapFilter+import Amazonka.Inspector2.Types.SortOrder+import Amazonka.Inspector2.Types.StringFilter+import qualified Amazonka.Prelude as Prelude++-- | The details that define a findings aggregation based on AWS Lambda+-- functions.+--+-- /See:/ 'newLambdaFunctionAggregation' smart constructor.+data LambdaFunctionAggregation = LambdaFunctionAggregation'+ { -- | The AWS Lambda function names to include in the aggregation results.+ functionNames :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The tags to include in the aggregation results.+ functionTags :: Prelude.Maybe (Prelude.NonEmpty MapFilter),+ -- | The resource IDs to include in the aggregation results.+ resourceIds :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | Returns findings aggregated by AWS Lambda function runtime environments.+ runtimes :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The finding severity to use for sorting the results.+ sortBy :: Prelude.Maybe LambdaFunctionSortBy,+ -- | The order to use for sorting the results.+ sortOrder :: Prelude.Maybe SortOrder+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'LambdaFunctionAggregation' 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:+--+-- 'functionNames', 'lambdaFunctionAggregation_functionNames' - The AWS Lambda function names to include in the aggregation results.+--+-- 'functionTags', 'lambdaFunctionAggregation_functionTags' - The tags to include in the aggregation results.+--+-- 'resourceIds', 'lambdaFunctionAggregation_resourceIds' - The resource IDs to include in the aggregation results.+--+-- 'runtimes', 'lambdaFunctionAggregation_runtimes' - Returns findings aggregated by AWS Lambda function runtime environments.+--+-- 'sortBy', 'lambdaFunctionAggregation_sortBy' - The finding severity to use for sorting the results.+--+-- 'sortOrder', 'lambdaFunctionAggregation_sortOrder' - The order to use for sorting the results.+newLambdaFunctionAggregation ::+ LambdaFunctionAggregation+newLambdaFunctionAggregation =+ LambdaFunctionAggregation'+ { functionNames =+ Prelude.Nothing,+ functionTags = Prelude.Nothing,+ resourceIds = Prelude.Nothing,+ runtimes = Prelude.Nothing,+ sortBy = Prelude.Nothing,+ sortOrder = Prelude.Nothing+ }++-- | The AWS Lambda function names to include in the aggregation results.+lambdaFunctionAggregation_functionNames :: Lens.Lens' LambdaFunctionAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+lambdaFunctionAggregation_functionNames = Lens.lens (\LambdaFunctionAggregation' {functionNames} -> functionNames) (\s@LambdaFunctionAggregation' {} a -> s {functionNames = a} :: LambdaFunctionAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The tags to include in the aggregation results.+lambdaFunctionAggregation_functionTags :: Lens.Lens' LambdaFunctionAggregation (Prelude.Maybe (Prelude.NonEmpty MapFilter))+lambdaFunctionAggregation_functionTags = Lens.lens (\LambdaFunctionAggregation' {functionTags} -> functionTags) (\s@LambdaFunctionAggregation' {} a -> s {functionTags = a} :: LambdaFunctionAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The resource IDs to include in the aggregation results.+lambdaFunctionAggregation_resourceIds :: Lens.Lens' LambdaFunctionAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+lambdaFunctionAggregation_resourceIds = Lens.lens (\LambdaFunctionAggregation' {resourceIds} -> resourceIds) (\s@LambdaFunctionAggregation' {} a -> s {resourceIds = a} :: LambdaFunctionAggregation) Prelude.. Lens.mapping Lens.coerced++-- | Returns findings aggregated by AWS Lambda function runtime environments.+lambdaFunctionAggregation_runtimes :: Lens.Lens' LambdaFunctionAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+lambdaFunctionAggregation_runtimes = Lens.lens (\LambdaFunctionAggregation' {runtimes} -> runtimes) (\s@LambdaFunctionAggregation' {} a -> s {runtimes = a} :: LambdaFunctionAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The finding severity to use for sorting the results.+lambdaFunctionAggregation_sortBy :: Lens.Lens' LambdaFunctionAggregation (Prelude.Maybe LambdaFunctionSortBy)+lambdaFunctionAggregation_sortBy = Lens.lens (\LambdaFunctionAggregation' {sortBy} -> sortBy) (\s@LambdaFunctionAggregation' {} a -> s {sortBy = a} :: LambdaFunctionAggregation)++-- | The order to use for sorting the results.+lambdaFunctionAggregation_sortOrder :: Lens.Lens' LambdaFunctionAggregation (Prelude.Maybe SortOrder)+lambdaFunctionAggregation_sortOrder = Lens.lens (\LambdaFunctionAggregation' {sortOrder} -> sortOrder) (\s@LambdaFunctionAggregation' {} a -> s {sortOrder = a} :: LambdaFunctionAggregation)++instance Prelude.Hashable LambdaFunctionAggregation where+ hashWithSalt _salt LambdaFunctionAggregation' {..} =+ _salt+ `Prelude.hashWithSalt` functionNames+ `Prelude.hashWithSalt` functionTags+ `Prelude.hashWithSalt` resourceIds+ `Prelude.hashWithSalt` runtimes+ `Prelude.hashWithSalt` sortBy+ `Prelude.hashWithSalt` sortOrder++instance Prelude.NFData LambdaFunctionAggregation where+ rnf LambdaFunctionAggregation' {..} =+ Prelude.rnf functionNames+ `Prelude.seq` Prelude.rnf functionTags+ `Prelude.seq` Prelude.rnf resourceIds+ `Prelude.seq` Prelude.rnf runtimes+ `Prelude.seq` Prelude.rnf sortBy+ `Prelude.seq` Prelude.rnf sortOrder++instance Data.ToJSON LambdaFunctionAggregation where+ toJSON LambdaFunctionAggregation' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("functionNames" Data..=) Prelude.<$> functionNames,+ ("functionTags" Data..=) Prelude.<$> functionTags,+ ("resourceIds" Data..=) Prelude.<$> resourceIds,+ ("runtimes" Data..=) Prelude.<$> runtimes,+ ("sortBy" Data..=) Prelude.<$> sortBy,+ ("sortOrder" Data..=) Prelude.<$> sortOrder+ ]+ )
+ gen/Amazonka/Inspector2/Types/LambdaFunctionAggregationResponse.hs view
@@ -0,0 +1,162 @@+{-# 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.Inspector2.Types.LambdaFunctionAggregationResponse+-- 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.Inspector2.Types.LambdaFunctionAggregationResponse where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.SeverityCounts+import qualified Amazonka.Prelude as Prelude++-- | A response that contains the results of an AWS Lambda function finding+-- aggregation.+--+-- /See:/ 'newLambdaFunctionAggregationResponse' smart constructor.+data LambdaFunctionAggregationResponse = LambdaFunctionAggregationResponse'+ { -- | The ID of the AWS account that owns the AWS Lambda function.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | The AWS Lambda function names included in the aggregation results.+ functionName :: Prelude.Maybe Prelude.Text,+ -- | The tags included in the aggregation results.+ lambdaTags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The date that the AWS Lambda function included in the aggregation+ -- results was last changed.+ lastModifiedAt :: Prelude.Maybe Data.POSIX,+ -- | The runtimes included in the aggregation results.+ runtime :: Prelude.Maybe Prelude.Text,+ severityCounts :: Prelude.Maybe SeverityCounts,+ -- | The resource IDs included in the aggregation results.+ resourceId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'LambdaFunctionAggregationResponse' 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', 'lambdaFunctionAggregationResponse_accountId' - The ID of the AWS account that owns the AWS Lambda function.+--+-- 'functionName', 'lambdaFunctionAggregationResponse_functionName' - The AWS Lambda function names included in the aggregation results.+--+-- 'lambdaTags', 'lambdaFunctionAggregationResponse_lambdaTags' - The tags included in the aggregation results.+--+-- 'lastModifiedAt', 'lambdaFunctionAggregationResponse_lastModifiedAt' - The date that the AWS Lambda function included in the aggregation+-- results was last changed.+--+-- 'runtime', 'lambdaFunctionAggregationResponse_runtime' - The runtimes included in the aggregation results.+--+-- 'severityCounts', 'lambdaFunctionAggregationResponse_severityCounts' - Undocumented member.+--+-- 'resourceId', 'lambdaFunctionAggregationResponse_resourceId' - The resource IDs included in the aggregation results.+newLambdaFunctionAggregationResponse ::+ -- | 'resourceId'+ Prelude.Text ->+ LambdaFunctionAggregationResponse+newLambdaFunctionAggregationResponse pResourceId_ =+ LambdaFunctionAggregationResponse'+ { accountId =+ Prelude.Nothing,+ functionName = Prelude.Nothing,+ lambdaTags = Prelude.Nothing,+ lastModifiedAt = Prelude.Nothing,+ runtime = Prelude.Nothing,+ severityCounts = Prelude.Nothing,+ resourceId = pResourceId_+ }++-- | The ID of the AWS account that owns the AWS Lambda function.+lambdaFunctionAggregationResponse_accountId :: Lens.Lens' LambdaFunctionAggregationResponse (Prelude.Maybe Prelude.Text)+lambdaFunctionAggregationResponse_accountId = Lens.lens (\LambdaFunctionAggregationResponse' {accountId} -> accountId) (\s@LambdaFunctionAggregationResponse' {} a -> s {accountId = a} :: LambdaFunctionAggregationResponse)++-- | The AWS Lambda function names included in the aggregation results.+lambdaFunctionAggregationResponse_functionName :: Lens.Lens' LambdaFunctionAggregationResponse (Prelude.Maybe Prelude.Text)+lambdaFunctionAggregationResponse_functionName = Lens.lens (\LambdaFunctionAggregationResponse' {functionName} -> functionName) (\s@LambdaFunctionAggregationResponse' {} a -> s {functionName = a} :: LambdaFunctionAggregationResponse)++-- | The tags included in the aggregation results.+lambdaFunctionAggregationResponse_lambdaTags :: Lens.Lens' LambdaFunctionAggregationResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+lambdaFunctionAggregationResponse_lambdaTags = Lens.lens (\LambdaFunctionAggregationResponse' {lambdaTags} -> lambdaTags) (\s@LambdaFunctionAggregationResponse' {} a -> s {lambdaTags = a} :: LambdaFunctionAggregationResponse) Prelude.. Lens.mapping Lens.coerced++-- | The date that the AWS Lambda function included in the aggregation+-- results was last changed.+lambdaFunctionAggregationResponse_lastModifiedAt :: Lens.Lens' LambdaFunctionAggregationResponse (Prelude.Maybe Prelude.UTCTime)+lambdaFunctionAggregationResponse_lastModifiedAt = Lens.lens (\LambdaFunctionAggregationResponse' {lastModifiedAt} -> lastModifiedAt) (\s@LambdaFunctionAggregationResponse' {} a -> s {lastModifiedAt = a} :: LambdaFunctionAggregationResponse) Prelude.. Lens.mapping Data._Time++-- | The runtimes included in the aggregation results.+lambdaFunctionAggregationResponse_runtime :: Lens.Lens' LambdaFunctionAggregationResponse (Prelude.Maybe Prelude.Text)+lambdaFunctionAggregationResponse_runtime = Lens.lens (\LambdaFunctionAggregationResponse' {runtime} -> runtime) (\s@LambdaFunctionAggregationResponse' {} a -> s {runtime = a} :: LambdaFunctionAggregationResponse)++-- | Undocumented member.+lambdaFunctionAggregationResponse_severityCounts :: Lens.Lens' LambdaFunctionAggregationResponse (Prelude.Maybe SeverityCounts)+lambdaFunctionAggregationResponse_severityCounts = Lens.lens (\LambdaFunctionAggregationResponse' {severityCounts} -> severityCounts) (\s@LambdaFunctionAggregationResponse' {} a -> s {severityCounts = a} :: LambdaFunctionAggregationResponse)++-- | The resource IDs included in the aggregation results.+lambdaFunctionAggregationResponse_resourceId :: Lens.Lens' LambdaFunctionAggregationResponse Prelude.Text+lambdaFunctionAggregationResponse_resourceId = Lens.lens (\LambdaFunctionAggregationResponse' {resourceId} -> resourceId) (\s@LambdaFunctionAggregationResponse' {} a -> s {resourceId = a} :: LambdaFunctionAggregationResponse)++instance+ Data.FromJSON+ LambdaFunctionAggregationResponse+ where+ parseJSON =+ Data.withObject+ "LambdaFunctionAggregationResponse"+ ( \x ->+ LambdaFunctionAggregationResponse'+ Prelude.<$> (x Data..:? "accountId")+ Prelude.<*> (x Data..:? "functionName")+ Prelude.<*> (x Data..:? "lambdaTags" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "lastModifiedAt")+ Prelude.<*> (x Data..:? "runtime")+ Prelude.<*> (x Data..:? "severityCounts")+ Prelude.<*> (x Data..: "resourceId")+ )++instance+ Prelude.Hashable+ LambdaFunctionAggregationResponse+ where+ hashWithSalt+ _salt+ LambdaFunctionAggregationResponse' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` functionName+ `Prelude.hashWithSalt` lambdaTags+ `Prelude.hashWithSalt` lastModifiedAt+ `Prelude.hashWithSalt` runtime+ `Prelude.hashWithSalt` severityCounts+ `Prelude.hashWithSalt` resourceId++instance+ Prelude.NFData+ LambdaFunctionAggregationResponse+ where+ rnf LambdaFunctionAggregationResponse' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf functionName+ `Prelude.seq` Prelude.rnf lambdaTags+ `Prelude.seq` Prelude.rnf lastModifiedAt+ `Prelude.seq` Prelude.rnf runtime+ `Prelude.seq` Prelude.rnf severityCounts+ `Prelude.seq` Prelude.rnf resourceId
+ gen/Amazonka/Inspector2/Types/LambdaFunctionMetadata.hs view
@@ -0,0 +1,113 @@+{-# 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.Inspector2.Types.LambdaFunctionMetadata+-- 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.Inspector2.Types.LambdaFunctionMetadata where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.Runtime+import qualified Amazonka.Prelude as Prelude++-- | The AWS Lambda function metadata.+--+-- /See:/ 'newLambdaFunctionMetadata' smart constructor.+data LambdaFunctionMetadata = LambdaFunctionMetadata'+ { -- | The name of a function.+ functionName :: Prelude.Maybe Prelude.Text,+ -- | The resource tags on an AWS Lambda function.+ functionTags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The layers for an AWS Lambda function. A Lambda function can have up to+ -- five layers.+ layers :: Prelude.Maybe [Prelude.Text],+ -- | An AWS Lambda function\'s runtime.+ runtime :: Prelude.Maybe Runtime+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'LambdaFunctionMetadata' 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:+--+-- 'functionName', 'lambdaFunctionMetadata_functionName' - The name of a function.+--+-- 'functionTags', 'lambdaFunctionMetadata_functionTags' - The resource tags on an AWS Lambda function.+--+-- 'layers', 'lambdaFunctionMetadata_layers' - The layers for an AWS Lambda function. A Lambda function can have up to+-- five layers.+--+-- 'runtime', 'lambdaFunctionMetadata_runtime' - An AWS Lambda function\'s runtime.+newLambdaFunctionMetadata ::+ LambdaFunctionMetadata+newLambdaFunctionMetadata =+ LambdaFunctionMetadata'+ { functionName =+ Prelude.Nothing,+ functionTags = Prelude.Nothing,+ layers = Prelude.Nothing,+ runtime = Prelude.Nothing+ }++-- | The name of a function.+lambdaFunctionMetadata_functionName :: Lens.Lens' LambdaFunctionMetadata (Prelude.Maybe Prelude.Text)+lambdaFunctionMetadata_functionName = Lens.lens (\LambdaFunctionMetadata' {functionName} -> functionName) (\s@LambdaFunctionMetadata' {} a -> s {functionName = a} :: LambdaFunctionMetadata)++-- | The resource tags on an AWS Lambda function.+lambdaFunctionMetadata_functionTags :: Lens.Lens' LambdaFunctionMetadata (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+lambdaFunctionMetadata_functionTags = Lens.lens (\LambdaFunctionMetadata' {functionTags} -> functionTags) (\s@LambdaFunctionMetadata' {} a -> s {functionTags = a} :: LambdaFunctionMetadata) Prelude.. Lens.mapping Lens.coerced++-- | The layers for an AWS Lambda function. A Lambda function can have up to+-- five layers.+lambdaFunctionMetadata_layers :: Lens.Lens' LambdaFunctionMetadata (Prelude.Maybe [Prelude.Text])+lambdaFunctionMetadata_layers = Lens.lens (\LambdaFunctionMetadata' {layers} -> layers) (\s@LambdaFunctionMetadata' {} a -> s {layers = a} :: LambdaFunctionMetadata) Prelude.. Lens.mapping Lens.coerced++-- | An AWS Lambda function\'s runtime.+lambdaFunctionMetadata_runtime :: Lens.Lens' LambdaFunctionMetadata (Prelude.Maybe Runtime)+lambdaFunctionMetadata_runtime = Lens.lens (\LambdaFunctionMetadata' {runtime} -> runtime) (\s@LambdaFunctionMetadata' {} a -> s {runtime = a} :: LambdaFunctionMetadata)++instance Data.FromJSON LambdaFunctionMetadata where+ parseJSON =+ Data.withObject+ "LambdaFunctionMetadata"+ ( \x ->+ LambdaFunctionMetadata'+ Prelude.<$> (x Data..:? "functionName")+ Prelude.<*> (x Data..:? "functionTags" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "layers" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "runtime")+ )++instance Prelude.Hashable LambdaFunctionMetadata where+ hashWithSalt _salt LambdaFunctionMetadata' {..} =+ _salt+ `Prelude.hashWithSalt` functionName+ `Prelude.hashWithSalt` functionTags+ `Prelude.hashWithSalt` layers+ `Prelude.hashWithSalt` runtime++instance Prelude.NFData LambdaFunctionMetadata where+ rnf LambdaFunctionMetadata' {..} =+ Prelude.rnf functionName+ `Prelude.seq` Prelude.rnf functionTags+ `Prelude.seq` Prelude.rnf layers+ `Prelude.seq` Prelude.rnf runtime
+ gen/Amazonka/Inspector2/Types/LambdaFunctionSortBy.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.Inspector2.Types.LambdaFunctionSortBy+-- 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.Inspector2.Types.LambdaFunctionSortBy+ ( LambdaFunctionSortBy+ ( ..,+ LambdaFunctionSortBy_ALL,+ LambdaFunctionSortBy_CRITICAL,+ LambdaFunctionSortBy_HIGH+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype LambdaFunctionSortBy = LambdaFunctionSortBy'+ { fromLambdaFunctionSortBy ::+ 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 LambdaFunctionSortBy_ALL :: LambdaFunctionSortBy+pattern LambdaFunctionSortBy_ALL = LambdaFunctionSortBy' "ALL"++pattern LambdaFunctionSortBy_CRITICAL :: LambdaFunctionSortBy+pattern LambdaFunctionSortBy_CRITICAL = LambdaFunctionSortBy' "CRITICAL"++pattern LambdaFunctionSortBy_HIGH :: LambdaFunctionSortBy+pattern LambdaFunctionSortBy_HIGH = LambdaFunctionSortBy' "HIGH"++{-# COMPLETE+ LambdaFunctionSortBy_ALL,+ LambdaFunctionSortBy_CRITICAL,+ LambdaFunctionSortBy_HIGH,+ LambdaFunctionSortBy'+ #-}
+ gen/Amazonka/Inspector2/Types/LambdaLayerAggregation.hs view
@@ -0,0 +1,124 @@+{-# 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.Inspector2.Types.LambdaLayerAggregation+-- 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.Inspector2.Types.LambdaLayerAggregation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.LambdaLayerSortBy+import Amazonka.Inspector2.Types.SortOrder+import Amazonka.Inspector2.Types.StringFilter+import qualified Amazonka.Prelude as Prelude++-- | The details that define a findings aggregation based on an AWS Lambda+-- function\'s layers.+--+-- /See:/ 'newLambdaLayerAggregation' smart constructor.+data LambdaLayerAggregation = LambdaLayerAggregation'+ { -- | The names of the AWS Lambda functions associated with the layers.+ functionNames :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The Amazon Resource Name (ARN) of the AWS Lambda function layer.+ layerArns :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The resource IDs for the AWS Lambda function layers.+ resourceIds :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The finding severity to use for sorting the results.+ sortBy :: Prelude.Maybe LambdaLayerSortBy,+ -- | The order to use for sorting the results.+ sortOrder :: Prelude.Maybe SortOrder+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'LambdaLayerAggregation' 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:+--+-- 'functionNames', 'lambdaLayerAggregation_functionNames' - The names of the AWS Lambda functions associated with the layers.+--+-- 'layerArns', 'lambdaLayerAggregation_layerArns' - The Amazon Resource Name (ARN) of the AWS Lambda function layer.+--+-- 'resourceIds', 'lambdaLayerAggregation_resourceIds' - The resource IDs for the AWS Lambda function layers.+--+-- 'sortBy', 'lambdaLayerAggregation_sortBy' - The finding severity to use for sorting the results.+--+-- 'sortOrder', 'lambdaLayerAggregation_sortOrder' - The order to use for sorting the results.+newLambdaLayerAggregation ::+ LambdaLayerAggregation+newLambdaLayerAggregation =+ LambdaLayerAggregation'+ { functionNames =+ Prelude.Nothing,+ layerArns = Prelude.Nothing,+ resourceIds = Prelude.Nothing,+ sortBy = Prelude.Nothing,+ sortOrder = Prelude.Nothing+ }++-- | The names of the AWS Lambda functions associated with the layers.+lambdaLayerAggregation_functionNames :: Lens.Lens' LambdaLayerAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+lambdaLayerAggregation_functionNames = Lens.lens (\LambdaLayerAggregation' {functionNames} -> functionNames) (\s@LambdaLayerAggregation' {} a -> s {functionNames = a} :: LambdaLayerAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The Amazon Resource Name (ARN) of the AWS Lambda function layer.+lambdaLayerAggregation_layerArns :: Lens.Lens' LambdaLayerAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+lambdaLayerAggregation_layerArns = Lens.lens (\LambdaLayerAggregation' {layerArns} -> layerArns) (\s@LambdaLayerAggregation' {} a -> s {layerArns = a} :: LambdaLayerAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The resource IDs for the AWS Lambda function layers.+lambdaLayerAggregation_resourceIds :: Lens.Lens' LambdaLayerAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+lambdaLayerAggregation_resourceIds = Lens.lens (\LambdaLayerAggregation' {resourceIds} -> resourceIds) (\s@LambdaLayerAggregation' {} a -> s {resourceIds = a} :: LambdaLayerAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The finding severity to use for sorting the results.+lambdaLayerAggregation_sortBy :: Lens.Lens' LambdaLayerAggregation (Prelude.Maybe LambdaLayerSortBy)+lambdaLayerAggregation_sortBy = Lens.lens (\LambdaLayerAggregation' {sortBy} -> sortBy) (\s@LambdaLayerAggregation' {} a -> s {sortBy = a} :: LambdaLayerAggregation)++-- | The order to use for sorting the results.+lambdaLayerAggregation_sortOrder :: Lens.Lens' LambdaLayerAggregation (Prelude.Maybe SortOrder)+lambdaLayerAggregation_sortOrder = Lens.lens (\LambdaLayerAggregation' {sortOrder} -> sortOrder) (\s@LambdaLayerAggregation' {} a -> s {sortOrder = a} :: LambdaLayerAggregation)++instance Prelude.Hashable LambdaLayerAggregation where+ hashWithSalt _salt LambdaLayerAggregation' {..} =+ _salt+ `Prelude.hashWithSalt` functionNames+ `Prelude.hashWithSalt` layerArns+ `Prelude.hashWithSalt` resourceIds+ `Prelude.hashWithSalt` sortBy+ `Prelude.hashWithSalt` sortOrder++instance Prelude.NFData LambdaLayerAggregation where+ rnf LambdaLayerAggregation' {..} =+ Prelude.rnf functionNames+ `Prelude.seq` Prelude.rnf layerArns+ `Prelude.seq` Prelude.rnf resourceIds+ `Prelude.seq` Prelude.rnf sortBy+ `Prelude.seq` Prelude.rnf sortOrder++instance Data.ToJSON LambdaLayerAggregation where+ toJSON LambdaLayerAggregation' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("functionNames" Data..=) Prelude.<$> functionNames,+ ("layerArns" Data..=) Prelude.<$> layerArns,+ ("resourceIds" Data..=) Prelude.<$> resourceIds,+ ("sortBy" Data..=) Prelude.<$> sortBy,+ ("sortOrder" Data..=) Prelude.<$> sortOrder+ ]+ )
+ gen/Amazonka/Inspector2/Types/LambdaLayerAggregationResponse.hs view
@@ -0,0 +1,142 @@+{-# 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.Inspector2.Types.LambdaLayerAggregationResponse+-- 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.Inspector2.Types.LambdaLayerAggregationResponse where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.SeverityCounts+import qualified Amazonka.Prelude as Prelude++-- | A response that contains the results of an AWS Lambda function layer+-- finding aggregation.+--+-- /See:/ 'newLambdaLayerAggregationResponse' smart constructor.+data LambdaLayerAggregationResponse = LambdaLayerAggregationResponse'+ { severityCounts :: Prelude.Maybe SeverityCounts,+ -- | The account ID of the AWS Lambda function layer.+ accountId :: Prelude.Text,+ -- | The names of the AWS Lambda functions associated with the layers.+ functionName :: Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the AWS Lambda function layer.+ layerArn :: Prelude.Text,+ -- | The Resource ID of the AWS Lambda function layer.+ resourceId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'LambdaLayerAggregationResponse' 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:+--+-- 'severityCounts', 'lambdaLayerAggregationResponse_severityCounts' - Undocumented member.+--+-- 'accountId', 'lambdaLayerAggregationResponse_accountId' - The account ID of the AWS Lambda function layer.+--+-- 'functionName', 'lambdaLayerAggregationResponse_functionName' - The names of the AWS Lambda functions associated with the layers.+--+-- 'layerArn', 'lambdaLayerAggregationResponse_layerArn' - The Amazon Resource Name (ARN) of the AWS Lambda function layer.+--+-- 'resourceId', 'lambdaLayerAggregationResponse_resourceId' - The Resource ID of the AWS Lambda function layer.+newLambdaLayerAggregationResponse ::+ -- | 'accountId'+ Prelude.Text ->+ -- | 'functionName'+ Prelude.Text ->+ -- | 'layerArn'+ Prelude.Text ->+ -- | 'resourceId'+ Prelude.Text ->+ LambdaLayerAggregationResponse+newLambdaLayerAggregationResponse+ pAccountId_+ pFunctionName_+ pLayerArn_+ pResourceId_ =+ LambdaLayerAggregationResponse'+ { severityCounts =+ Prelude.Nothing,+ accountId = pAccountId_,+ functionName = pFunctionName_,+ layerArn = pLayerArn_,+ resourceId = pResourceId_+ }++-- | Undocumented member.+lambdaLayerAggregationResponse_severityCounts :: Lens.Lens' LambdaLayerAggregationResponse (Prelude.Maybe SeverityCounts)+lambdaLayerAggregationResponse_severityCounts = Lens.lens (\LambdaLayerAggregationResponse' {severityCounts} -> severityCounts) (\s@LambdaLayerAggregationResponse' {} a -> s {severityCounts = a} :: LambdaLayerAggregationResponse)++-- | The account ID of the AWS Lambda function layer.+lambdaLayerAggregationResponse_accountId :: Lens.Lens' LambdaLayerAggregationResponse Prelude.Text+lambdaLayerAggregationResponse_accountId = Lens.lens (\LambdaLayerAggregationResponse' {accountId} -> accountId) (\s@LambdaLayerAggregationResponse' {} a -> s {accountId = a} :: LambdaLayerAggregationResponse)++-- | The names of the AWS Lambda functions associated with the layers.+lambdaLayerAggregationResponse_functionName :: Lens.Lens' LambdaLayerAggregationResponse Prelude.Text+lambdaLayerAggregationResponse_functionName = Lens.lens (\LambdaLayerAggregationResponse' {functionName} -> functionName) (\s@LambdaLayerAggregationResponse' {} a -> s {functionName = a} :: LambdaLayerAggregationResponse)++-- | The Amazon Resource Name (ARN) of the AWS Lambda function layer.+lambdaLayerAggregationResponse_layerArn :: Lens.Lens' LambdaLayerAggregationResponse Prelude.Text+lambdaLayerAggregationResponse_layerArn = Lens.lens (\LambdaLayerAggregationResponse' {layerArn} -> layerArn) (\s@LambdaLayerAggregationResponse' {} a -> s {layerArn = a} :: LambdaLayerAggregationResponse)++-- | The Resource ID of the AWS Lambda function layer.+lambdaLayerAggregationResponse_resourceId :: Lens.Lens' LambdaLayerAggregationResponse Prelude.Text+lambdaLayerAggregationResponse_resourceId = Lens.lens (\LambdaLayerAggregationResponse' {resourceId} -> resourceId) (\s@LambdaLayerAggregationResponse' {} a -> s {resourceId = a} :: LambdaLayerAggregationResponse)++instance Data.FromJSON LambdaLayerAggregationResponse where+ parseJSON =+ Data.withObject+ "LambdaLayerAggregationResponse"+ ( \x ->+ LambdaLayerAggregationResponse'+ Prelude.<$> (x Data..:? "severityCounts")+ Prelude.<*> (x Data..: "accountId")+ Prelude.<*> (x Data..: "functionName")+ Prelude.<*> (x Data..: "layerArn")+ Prelude.<*> (x Data..: "resourceId")+ )++instance+ Prelude.Hashable+ LambdaLayerAggregationResponse+ where+ hashWithSalt+ _salt+ LambdaLayerAggregationResponse' {..} =+ _salt+ `Prelude.hashWithSalt` severityCounts+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` functionName+ `Prelude.hashWithSalt` layerArn+ `Prelude.hashWithSalt` resourceId++instance+ Prelude.NFData+ LambdaLayerAggregationResponse+ where+ rnf LambdaLayerAggregationResponse' {..} =+ Prelude.rnf severityCounts+ `Prelude.seq` Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf functionName+ `Prelude.seq` Prelude.rnf layerArn+ `Prelude.seq` Prelude.rnf resourceId
+ gen/Amazonka/Inspector2/Types/LambdaLayerSortBy.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.Inspector2.Types.LambdaLayerSortBy+-- 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.Inspector2.Types.LambdaLayerSortBy+ ( LambdaLayerSortBy+ ( ..,+ LambdaLayerSortBy_ALL,+ LambdaLayerSortBy_CRITICAL,+ LambdaLayerSortBy_HIGH+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype LambdaLayerSortBy = LambdaLayerSortBy'+ { fromLambdaLayerSortBy ::+ 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 LambdaLayerSortBy_ALL :: LambdaLayerSortBy+pattern LambdaLayerSortBy_ALL = LambdaLayerSortBy' "ALL"++pattern LambdaLayerSortBy_CRITICAL :: LambdaLayerSortBy+pattern LambdaLayerSortBy_CRITICAL = LambdaLayerSortBy' "CRITICAL"++pattern LambdaLayerSortBy_HIGH :: LambdaLayerSortBy+pattern LambdaLayerSortBy_HIGH = LambdaLayerSortBy' "HIGH"++{-# COMPLETE+ LambdaLayerSortBy_ALL,+ LambdaLayerSortBy_CRITICAL,+ LambdaLayerSortBy_HIGH,+ LambdaLayerSortBy'+ #-}
+ gen/Amazonka/Inspector2/Types/LambdaVpcConfig.hs view
@@ -0,0 +1,108 @@+{-# 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.Inspector2.Types.LambdaVpcConfig+-- 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.Inspector2.Types.LambdaVpcConfig 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++-- | The VPC security groups and subnets that are attached to an AWS Lambda+-- function. For more information, see+-- <https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html VPC Settings>.+--+-- /See:/ 'newLambdaVpcConfig' smart constructor.+data LambdaVpcConfig = LambdaVpcConfig'+ { -- | The VPC security groups and subnets that are attached to an AWS Lambda+ -- function. For more information, see+ -- <https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html VPC Settings>.+ securityGroupIds :: Prelude.Maybe [Prelude.Text],+ -- | A list of VPC subnet IDs.+ subnetIds :: Prelude.Maybe [Prelude.Text],+ -- | The ID of the VPC.+ vpcId :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'LambdaVpcConfig' 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:+--+-- 'securityGroupIds', 'lambdaVpcConfig_securityGroupIds' - The VPC security groups and subnets that are attached to an AWS Lambda+-- function. For more information, see+-- <https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html VPC Settings>.+--+-- 'subnetIds', 'lambdaVpcConfig_subnetIds' - A list of VPC subnet IDs.+--+-- 'vpcId', 'lambdaVpcConfig_vpcId' - The ID of the VPC.+newLambdaVpcConfig ::+ LambdaVpcConfig+newLambdaVpcConfig =+ LambdaVpcConfig'+ { securityGroupIds =+ Prelude.Nothing,+ subnetIds = Prelude.Nothing,+ vpcId = Prelude.Nothing+ }++-- | The VPC security groups and subnets that are attached to an AWS Lambda+-- function. For more information, see+-- <https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html VPC Settings>.+lambdaVpcConfig_securityGroupIds :: Lens.Lens' LambdaVpcConfig (Prelude.Maybe [Prelude.Text])+lambdaVpcConfig_securityGroupIds = Lens.lens (\LambdaVpcConfig' {securityGroupIds} -> securityGroupIds) (\s@LambdaVpcConfig' {} a -> s {securityGroupIds = a} :: LambdaVpcConfig) Prelude.. Lens.mapping Lens.coerced++-- | A list of VPC subnet IDs.+lambdaVpcConfig_subnetIds :: Lens.Lens' LambdaVpcConfig (Prelude.Maybe [Prelude.Text])+lambdaVpcConfig_subnetIds = Lens.lens (\LambdaVpcConfig' {subnetIds} -> subnetIds) (\s@LambdaVpcConfig' {} a -> s {subnetIds = a} :: LambdaVpcConfig) Prelude.. Lens.mapping Lens.coerced++-- | The ID of the VPC.+lambdaVpcConfig_vpcId :: Lens.Lens' LambdaVpcConfig (Prelude.Maybe Prelude.Text)+lambdaVpcConfig_vpcId = Lens.lens (\LambdaVpcConfig' {vpcId} -> vpcId) (\s@LambdaVpcConfig' {} a -> s {vpcId = a} :: LambdaVpcConfig)++instance Data.FromJSON LambdaVpcConfig where+ parseJSON =+ Data.withObject+ "LambdaVpcConfig"+ ( \x ->+ LambdaVpcConfig'+ Prelude.<$> ( x+ Data..:? "securityGroupIds"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..:? "subnetIds" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "vpcId")+ )++instance Prelude.Hashable LambdaVpcConfig where+ hashWithSalt _salt LambdaVpcConfig' {..} =+ _salt+ `Prelude.hashWithSalt` securityGroupIds+ `Prelude.hashWithSalt` subnetIds+ `Prelude.hashWithSalt` vpcId++instance Prelude.NFData LambdaVpcConfig where+ rnf LambdaVpcConfig' {..} =+ Prelude.rnf securityGroupIds+ `Prelude.seq` Prelude.rnf subnetIds+ `Prelude.seq` Prelude.rnf vpcId
+ gen/Amazonka/Inspector2/Types/MapComparison.hs view
@@ -0,0 +1,66 @@+{-# 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.Inspector2.Types.MapComparison+-- 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.Inspector2.Types.MapComparison+ ( MapComparison+ ( ..,+ MapComparison_EQUALS+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype MapComparison = MapComparison'+ { fromMapComparison ::+ 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 MapComparison_EQUALS :: MapComparison+pattern MapComparison_EQUALS = MapComparison' "EQUALS"++{-# COMPLETE+ MapComparison_EQUALS,+ MapComparison'+ #-}
+ gen/Amazonka/Inspector2/Types/MapFilter.hs view
@@ -0,0 +1,111 @@+{-# 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.Inspector2.Types.MapFilter+-- 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.Inspector2.Types.MapFilter where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.MapComparison+import qualified Amazonka.Prelude as Prelude++-- | An object that describes details of a map filter.+--+-- /See:/ 'newMapFilter' smart constructor.+data MapFilter = MapFilter'+ { -- | The tag value used in the filter.+ value :: Prelude.Maybe Prelude.Text,+ -- | The operator to use when comparing values in the filter.+ comparison :: MapComparison,+ -- | The tag key used in the filter.+ key :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'MapFilter' 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:+--+-- 'value', 'mapFilter_value' - The tag value used in the filter.+--+-- 'comparison', 'mapFilter_comparison' - The operator to use when comparing values in the filter.+--+-- 'key', 'mapFilter_key' - The tag key used in the filter.+newMapFilter ::+ -- | 'comparison'+ MapComparison ->+ -- | 'key'+ Prelude.Text ->+ MapFilter+newMapFilter pComparison_ pKey_ =+ MapFilter'+ { value = Prelude.Nothing,+ comparison = pComparison_,+ key = pKey_+ }++-- | The tag value used in the filter.+mapFilter_value :: Lens.Lens' MapFilter (Prelude.Maybe Prelude.Text)+mapFilter_value = Lens.lens (\MapFilter' {value} -> value) (\s@MapFilter' {} a -> s {value = a} :: MapFilter)++-- | The operator to use when comparing values in the filter.+mapFilter_comparison :: Lens.Lens' MapFilter MapComparison+mapFilter_comparison = Lens.lens (\MapFilter' {comparison} -> comparison) (\s@MapFilter' {} a -> s {comparison = a} :: MapFilter)++-- | The tag key used in the filter.+mapFilter_key :: Lens.Lens' MapFilter Prelude.Text+mapFilter_key = Lens.lens (\MapFilter' {key} -> key) (\s@MapFilter' {} a -> s {key = a} :: MapFilter)++instance Data.FromJSON MapFilter where+ parseJSON =+ Data.withObject+ "MapFilter"+ ( \x ->+ MapFilter'+ Prelude.<$> (x Data..:? "value")+ Prelude.<*> (x Data..: "comparison")+ Prelude.<*> (x Data..: "key")+ )++instance Prelude.Hashable MapFilter where+ hashWithSalt _salt MapFilter' {..} =+ _salt+ `Prelude.hashWithSalt` value+ `Prelude.hashWithSalt` comparison+ `Prelude.hashWithSalt` key++instance Prelude.NFData MapFilter where+ rnf MapFilter' {..} =+ Prelude.rnf value+ `Prelude.seq` Prelude.rnf comparison+ `Prelude.seq` Prelude.rnf key++instance Data.ToJSON MapFilter where+ toJSON MapFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("value" Data..=) Prelude.<$> value,+ Prelude.Just ("comparison" Data..= comparison),+ Prelude.Just ("key" Data..= key)+ ]+ )
+ gen/Amazonka/Inspector2/Types/Member.hs view
@@ -0,0 +1,112 @@+{-# 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.Inspector2.Types.Member+-- 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.Inspector2.Types.Member where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.RelationshipStatus+import qualified Amazonka.Prelude as Prelude++-- | Details on a member account in your organization.+--+-- /See:/ 'newMember' smart constructor.+data Member = Member'+ { -- | The Amazon Web Services account ID of the member account.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Web Services account ID of the Amazon Inspector delegated+ -- administrator for this member account.+ delegatedAdminAccountId :: Prelude.Maybe Prelude.Text,+ -- | The status of the member account.+ relationshipStatus :: Prelude.Maybe RelationshipStatus,+ -- | A timestamp showing when the status of this member was last updated.+ updatedAt :: Prelude.Maybe Data.POSIX+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Member' 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', 'member_accountId' - The Amazon Web Services account ID of the member account.+--+-- 'delegatedAdminAccountId', 'member_delegatedAdminAccountId' - The Amazon Web Services account ID of the Amazon Inspector delegated+-- administrator for this member account.+--+-- 'relationshipStatus', 'member_relationshipStatus' - The status of the member account.+--+-- 'updatedAt', 'member_updatedAt' - A timestamp showing when the status of this member was last updated.+newMember ::+ Member+newMember =+ Member'+ { accountId = Prelude.Nothing,+ delegatedAdminAccountId = Prelude.Nothing,+ relationshipStatus = Prelude.Nothing,+ updatedAt = Prelude.Nothing+ }++-- | The Amazon Web Services account ID of the member account.+member_accountId :: Lens.Lens' Member (Prelude.Maybe Prelude.Text)+member_accountId = Lens.lens (\Member' {accountId} -> accountId) (\s@Member' {} a -> s {accountId = a} :: Member)++-- | The Amazon Web Services account ID of the Amazon Inspector delegated+-- administrator for this member account.+member_delegatedAdminAccountId :: Lens.Lens' Member (Prelude.Maybe Prelude.Text)+member_delegatedAdminAccountId = Lens.lens (\Member' {delegatedAdminAccountId} -> delegatedAdminAccountId) (\s@Member' {} a -> s {delegatedAdminAccountId = a} :: Member)++-- | The status of the member account.+member_relationshipStatus :: Lens.Lens' Member (Prelude.Maybe RelationshipStatus)+member_relationshipStatus = Lens.lens (\Member' {relationshipStatus} -> relationshipStatus) (\s@Member' {} a -> s {relationshipStatus = a} :: Member)++-- | A timestamp showing when the status of this member was last updated.+member_updatedAt :: Lens.Lens' Member (Prelude.Maybe Prelude.UTCTime)+member_updatedAt = Lens.lens (\Member' {updatedAt} -> updatedAt) (\s@Member' {} a -> s {updatedAt = a} :: Member) Prelude.. Lens.mapping Data._Time++instance Data.FromJSON Member where+ parseJSON =+ Data.withObject+ "Member"+ ( \x ->+ Member'+ Prelude.<$> (x Data..:? "accountId")+ Prelude.<*> (x Data..:? "delegatedAdminAccountId")+ Prelude.<*> (x Data..:? "relationshipStatus")+ Prelude.<*> (x Data..:? "updatedAt")+ )++instance Prelude.Hashable Member where+ hashWithSalt _salt Member' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` delegatedAdminAccountId+ `Prelude.hashWithSalt` relationshipStatus+ `Prelude.hashWithSalt` updatedAt++instance Prelude.NFData Member where+ rnf Member' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf delegatedAdminAccountId+ `Prelude.seq` Prelude.rnf relationshipStatus+ `Prelude.seq` Prelude.rnf updatedAt
+ gen/Amazonka/Inspector2/Types/NetworkPath.hs view
@@ -0,0 +1,68 @@+{-# 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.Inspector2.Types.NetworkPath+-- 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.Inspector2.Types.NetworkPath where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.Step+import qualified Amazonka.Prelude as Prelude++-- | Information on the network path associated with a finding.+--+-- /See:/ 'newNetworkPath' smart constructor.+data NetworkPath = NetworkPath'+ { -- | The details on the steps in the network path.+ steps :: Prelude.Maybe (Prelude.NonEmpty Step)+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'NetworkPath' 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:+--+-- 'steps', 'networkPath_steps' - The details on the steps in the network path.+newNetworkPath ::+ NetworkPath+newNetworkPath =+ NetworkPath' {steps = Prelude.Nothing}++-- | The details on the steps in the network path.+networkPath_steps :: Lens.Lens' NetworkPath (Prelude.Maybe (Prelude.NonEmpty Step))+networkPath_steps = Lens.lens (\NetworkPath' {steps} -> steps) (\s@NetworkPath' {} a -> s {steps = a} :: NetworkPath) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON NetworkPath where+ parseJSON =+ Data.withObject+ "NetworkPath"+ ( \x ->+ NetworkPath' Prelude.<$> (x Data..:? "steps")+ )++instance Prelude.Hashable NetworkPath where+ hashWithSalt _salt NetworkPath' {..} =+ _salt `Prelude.hashWithSalt` steps++instance Prelude.NFData NetworkPath where+ rnf NetworkPath' {..} = Prelude.rnf steps
+ gen/Amazonka/Inspector2/Types/NetworkProtocol.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.Inspector2.Types.NetworkProtocol+-- 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.Inspector2.Types.NetworkProtocol+ ( NetworkProtocol+ ( ..,+ NetworkProtocol_TCP,+ NetworkProtocol_UDP+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype NetworkProtocol = NetworkProtocol'+ { fromNetworkProtocol ::+ 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 NetworkProtocol_TCP :: NetworkProtocol+pattern NetworkProtocol_TCP = NetworkProtocol' "TCP"++pattern NetworkProtocol_UDP :: NetworkProtocol+pattern NetworkProtocol_UDP = NetworkProtocol' "UDP"++{-# COMPLETE+ NetworkProtocol_TCP,+ NetworkProtocol_UDP,+ NetworkProtocol'+ #-}
+ gen/Amazonka/Inspector2/Types/NetworkReachabilityDetails.hs view
@@ -0,0 +1,115 @@+{-# 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.Inspector2.Types.NetworkReachabilityDetails+-- 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.Inspector2.Types.NetworkReachabilityDetails where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.NetworkPath+import Amazonka.Inspector2.Types.NetworkProtocol+import Amazonka.Inspector2.Types.PortRange+import qualified Amazonka.Prelude as Prelude++-- | Contains the details of a network reachability finding.+--+-- /See:/ 'newNetworkReachabilityDetails' smart constructor.+data NetworkReachabilityDetails = NetworkReachabilityDetails'+ { -- | An object that contains details about a network path associated with a+ -- finding.+ networkPath :: NetworkPath,+ -- | An object that contains details about the open port range associated+ -- with a finding.+ openPortRange :: PortRange,+ -- | The protocol associated with a finding.+ protocol :: NetworkProtocol+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'NetworkReachabilityDetails' 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:+--+-- 'networkPath', 'networkReachabilityDetails_networkPath' - An object that contains details about a network path associated with a+-- finding.+--+-- 'openPortRange', 'networkReachabilityDetails_openPortRange' - An object that contains details about the open port range associated+-- with a finding.+--+-- 'protocol', 'networkReachabilityDetails_protocol' - The protocol associated with a finding.+newNetworkReachabilityDetails ::+ -- | 'networkPath'+ NetworkPath ->+ -- | 'openPortRange'+ PortRange ->+ -- | 'protocol'+ NetworkProtocol ->+ NetworkReachabilityDetails+newNetworkReachabilityDetails+ pNetworkPath_+ pOpenPortRange_+ pProtocol_ =+ NetworkReachabilityDetails'+ { networkPath =+ pNetworkPath_,+ openPortRange = pOpenPortRange_,+ protocol = pProtocol_+ }++-- | An object that contains details about a network path associated with a+-- finding.+networkReachabilityDetails_networkPath :: Lens.Lens' NetworkReachabilityDetails NetworkPath+networkReachabilityDetails_networkPath = Lens.lens (\NetworkReachabilityDetails' {networkPath} -> networkPath) (\s@NetworkReachabilityDetails' {} a -> s {networkPath = a} :: NetworkReachabilityDetails)++-- | An object that contains details about the open port range associated+-- with a finding.+networkReachabilityDetails_openPortRange :: Lens.Lens' NetworkReachabilityDetails PortRange+networkReachabilityDetails_openPortRange = Lens.lens (\NetworkReachabilityDetails' {openPortRange} -> openPortRange) (\s@NetworkReachabilityDetails' {} a -> s {openPortRange = a} :: NetworkReachabilityDetails)++-- | The protocol associated with a finding.+networkReachabilityDetails_protocol :: Lens.Lens' NetworkReachabilityDetails NetworkProtocol+networkReachabilityDetails_protocol = Lens.lens (\NetworkReachabilityDetails' {protocol} -> protocol) (\s@NetworkReachabilityDetails' {} a -> s {protocol = a} :: NetworkReachabilityDetails)++instance Data.FromJSON NetworkReachabilityDetails where+ parseJSON =+ Data.withObject+ "NetworkReachabilityDetails"+ ( \x ->+ NetworkReachabilityDetails'+ Prelude.<$> (x Data..: "networkPath")+ Prelude.<*> (x Data..: "openPortRange")+ Prelude.<*> (x Data..: "protocol")+ )++instance Prelude.Hashable NetworkReachabilityDetails where+ hashWithSalt _salt NetworkReachabilityDetails' {..} =+ _salt+ `Prelude.hashWithSalt` networkPath+ `Prelude.hashWithSalt` openPortRange+ `Prelude.hashWithSalt` protocol++instance Prelude.NFData NetworkReachabilityDetails where+ rnf NetworkReachabilityDetails' {..} =+ Prelude.rnf networkPath+ `Prelude.seq` Prelude.rnf openPortRange+ `Prelude.seq` Prelude.rnf protocol
+ gen/Amazonka/Inspector2/Types/NumberFilter.hs view
@@ -0,0 +1,95 @@+{-# 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.Inspector2.Types.NumberFilter+-- 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.Inspector2.Types.NumberFilter 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 object that describes the details of a number filter.+--+-- /See:/ 'newNumberFilter' smart constructor.+data NumberFilter = NumberFilter'+ { -- | The lowest number to be included in the filter.+ lowerInclusive :: Prelude.Maybe Prelude.Double,+ -- | The highest number to be included in the filter.+ upperInclusive :: Prelude.Maybe Prelude.Double+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'NumberFilter' 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:+--+-- 'lowerInclusive', 'numberFilter_lowerInclusive' - The lowest number to be included in the filter.+--+-- 'upperInclusive', 'numberFilter_upperInclusive' - The highest number to be included in the filter.+newNumberFilter ::+ NumberFilter+newNumberFilter =+ NumberFilter'+ { lowerInclusive = Prelude.Nothing,+ upperInclusive = Prelude.Nothing+ }++-- | The lowest number to be included in the filter.+numberFilter_lowerInclusive :: Lens.Lens' NumberFilter (Prelude.Maybe Prelude.Double)+numberFilter_lowerInclusive = Lens.lens (\NumberFilter' {lowerInclusive} -> lowerInclusive) (\s@NumberFilter' {} a -> s {lowerInclusive = a} :: NumberFilter)++-- | The highest number to be included in the filter.+numberFilter_upperInclusive :: Lens.Lens' NumberFilter (Prelude.Maybe Prelude.Double)+numberFilter_upperInclusive = Lens.lens (\NumberFilter' {upperInclusive} -> upperInclusive) (\s@NumberFilter' {} a -> s {upperInclusive = a} :: NumberFilter)++instance Data.FromJSON NumberFilter where+ parseJSON =+ Data.withObject+ "NumberFilter"+ ( \x ->+ NumberFilter'+ Prelude.<$> (x Data..:? "lowerInclusive")+ Prelude.<*> (x Data..:? "upperInclusive")+ )++instance Prelude.Hashable NumberFilter where+ hashWithSalt _salt NumberFilter' {..} =+ _salt+ `Prelude.hashWithSalt` lowerInclusive+ `Prelude.hashWithSalt` upperInclusive++instance Prelude.NFData NumberFilter where+ rnf NumberFilter' {..} =+ Prelude.rnf lowerInclusive+ `Prelude.seq` Prelude.rnf upperInclusive++instance Data.ToJSON NumberFilter where+ toJSON NumberFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("lowerInclusive" Data..=)+ Prelude.<$> lowerInclusive,+ ("upperInclusive" Data..=)+ Prelude.<$> upperInclusive+ ]+ )
+ gen/Amazonka/Inspector2/Types/Operation.hs view
@@ -0,0 +1,81 @@+{-# 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.Inspector2.Types.Operation+-- 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.Inspector2.Types.Operation+ ( Operation+ ( ..,+ Operation_DISABLE_REPOSITORY,+ Operation_DISABLE_SCANNING,+ Operation_ENABLE_REPOSITORY,+ Operation_ENABLE_SCANNING+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype Operation = Operation'+ { fromOperation ::+ 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 Operation_DISABLE_REPOSITORY :: Operation+pattern Operation_DISABLE_REPOSITORY = Operation' "DISABLE_REPOSITORY"++pattern Operation_DISABLE_SCANNING :: Operation+pattern Operation_DISABLE_SCANNING = Operation' "DISABLE_SCANNING"++pattern Operation_ENABLE_REPOSITORY :: Operation+pattern Operation_ENABLE_REPOSITORY = Operation' "ENABLE_REPOSITORY"++pattern Operation_ENABLE_SCANNING :: Operation+pattern Operation_ENABLE_SCANNING = Operation' "ENABLE_SCANNING"++{-# COMPLETE+ Operation_DISABLE_REPOSITORY,+ Operation_DISABLE_SCANNING,+ Operation_ENABLE_REPOSITORY,+ Operation_ENABLE_SCANNING,+ Operation'+ #-}
+ gen/Amazonka/Inspector2/Types/PackageAggregation.hs view
@@ -0,0 +1,99 @@+{-# 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.Inspector2.Types.PackageAggregation+-- 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.Inspector2.Types.PackageAggregation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.PackageSortBy+import Amazonka.Inspector2.Types.SortOrder+import Amazonka.Inspector2.Types.StringFilter+import qualified Amazonka.Prelude as Prelude++-- | The details that define an aggregation based on operating system package+-- type.+--+-- /See:/ 'newPackageAggregation' smart constructor.+data PackageAggregation = PackageAggregation'+ { -- | The names of packages to aggregate findings on.+ packageNames :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The value to sort results by.+ sortBy :: Prelude.Maybe PackageSortBy,+ -- | The order to sort results by.+ sortOrder :: Prelude.Maybe SortOrder+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PackageAggregation' 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:+--+-- 'packageNames', 'packageAggregation_packageNames' - The names of packages to aggregate findings on.+--+-- 'sortBy', 'packageAggregation_sortBy' - The value to sort results by.+--+-- 'sortOrder', 'packageAggregation_sortOrder' - The order to sort results by.+newPackageAggregation ::+ PackageAggregation+newPackageAggregation =+ PackageAggregation'+ { packageNames = Prelude.Nothing,+ sortBy = Prelude.Nothing,+ sortOrder = Prelude.Nothing+ }++-- | The names of packages to aggregate findings on.+packageAggregation_packageNames :: Lens.Lens' PackageAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+packageAggregation_packageNames = Lens.lens (\PackageAggregation' {packageNames} -> packageNames) (\s@PackageAggregation' {} a -> s {packageNames = a} :: PackageAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The value to sort results by.+packageAggregation_sortBy :: Lens.Lens' PackageAggregation (Prelude.Maybe PackageSortBy)+packageAggregation_sortBy = Lens.lens (\PackageAggregation' {sortBy} -> sortBy) (\s@PackageAggregation' {} a -> s {sortBy = a} :: PackageAggregation)++-- | The order to sort results by.+packageAggregation_sortOrder :: Lens.Lens' PackageAggregation (Prelude.Maybe SortOrder)+packageAggregation_sortOrder = Lens.lens (\PackageAggregation' {sortOrder} -> sortOrder) (\s@PackageAggregation' {} a -> s {sortOrder = a} :: PackageAggregation)++instance Prelude.Hashable PackageAggregation where+ hashWithSalt _salt PackageAggregation' {..} =+ _salt+ `Prelude.hashWithSalt` packageNames+ `Prelude.hashWithSalt` sortBy+ `Prelude.hashWithSalt` sortOrder++instance Prelude.NFData PackageAggregation where+ rnf PackageAggregation' {..} =+ Prelude.rnf packageNames+ `Prelude.seq` Prelude.rnf sortBy+ `Prelude.seq` Prelude.rnf sortOrder++instance Data.ToJSON PackageAggregation where+ toJSON PackageAggregation' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("packageNames" Data..=) Prelude.<$> packageNames,+ ("sortBy" Data..=) Prelude.<$> sortBy,+ ("sortOrder" Data..=) Prelude.<$> sortOrder+ ]+ )
+ gen/Amazonka/Inspector2/Types/PackageAggregationResponse.hs view
@@ -0,0 +1,101 @@+{-# 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.Inspector2.Types.PackageAggregationResponse+-- 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.Inspector2.Types.PackageAggregationResponse where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.SeverityCounts+import qualified Amazonka.Prelude as Prelude++-- | A response that contains the results of a finding aggregation by image+-- layer.+--+-- /See:/ 'newPackageAggregationResponse' smart constructor.+data PackageAggregationResponse = PackageAggregationResponse'+ { -- | The ID of the Amazon Web Services account associated with the findings.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | An object that contains the count of matched findings per severity.+ severityCounts :: Prelude.Maybe SeverityCounts,+ -- | The name of the operating system package.+ packageName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PackageAggregationResponse' 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', 'packageAggregationResponse_accountId' - The ID of the Amazon Web Services account associated with the findings.+--+-- 'severityCounts', 'packageAggregationResponse_severityCounts' - An object that contains the count of matched findings per severity.+--+-- 'packageName', 'packageAggregationResponse_packageName' - The name of the operating system package.+newPackageAggregationResponse ::+ -- | 'packageName'+ Prelude.Text ->+ PackageAggregationResponse+newPackageAggregationResponse pPackageName_ =+ PackageAggregationResponse'+ { accountId =+ Prelude.Nothing,+ severityCounts = Prelude.Nothing,+ packageName = pPackageName_+ }++-- | The ID of the Amazon Web Services account associated with the findings.+packageAggregationResponse_accountId :: Lens.Lens' PackageAggregationResponse (Prelude.Maybe Prelude.Text)+packageAggregationResponse_accountId = Lens.lens (\PackageAggregationResponse' {accountId} -> accountId) (\s@PackageAggregationResponse' {} a -> s {accountId = a} :: PackageAggregationResponse)++-- | An object that contains the count of matched findings per severity.+packageAggregationResponse_severityCounts :: Lens.Lens' PackageAggregationResponse (Prelude.Maybe SeverityCounts)+packageAggregationResponse_severityCounts = Lens.lens (\PackageAggregationResponse' {severityCounts} -> severityCounts) (\s@PackageAggregationResponse' {} a -> s {severityCounts = a} :: PackageAggregationResponse)++-- | The name of the operating system package.+packageAggregationResponse_packageName :: Lens.Lens' PackageAggregationResponse Prelude.Text+packageAggregationResponse_packageName = Lens.lens (\PackageAggregationResponse' {packageName} -> packageName) (\s@PackageAggregationResponse' {} a -> s {packageName = a} :: PackageAggregationResponse)++instance Data.FromJSON PackageAggregationResponse where+ parseJSON =+ Data.withObject+ "PackageAggregationResponse"+ ( \x ->+ PackageAggregationResponse'+ Prelude.<$> (x Data..:? "accountId")+ Prelude.<*> (x Data..:? "severityCounts")+ Prelude.<*> (x Data..: "packageName")+ )++instance Prelude.Hashable PackageAggregationResponse where+ hashWithSalt _salt PackageAggregationResponse' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` severityCounts+ `Prelude.hashWithSalt` packageName++instance Prelude.NFData PackageAggregationResponse where+ rnf PackageAggregationResponse' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf severityCounts+ `Prelude.seq` Prelude.rnf packageName
+ gen/Amazonka/Inspector2/Types/PackageFilter.hs view
@@ -0,0 +1,164 @@+{-# 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.Inspector2.Types.PackageFilter+-- 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.Inspector2.Types.PackageFilter where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.NumberFilter+import Amazonka.Inspector2.Types.StringFilter+import qualified Amazonka.Prelude as Prelude++-- | Contains information on the details of a package filter.+--+-- /See:/ 'newPackageFilter' smart constructor.+data PackageFilter = PackageFilter'+ { -- | An object that contains details on the package architecture type to+ -- filter on.+ architecture :: Prelude.Maybe StringFilter,+ -- | An object that contains details on the package epoch to filter on.+ epoch :: Prelude.Maybe NumberFilter,+ -- | An object that contains details on the name of the package to filter on.+ name :: Prelude.Maybe StringFilter,+ -- | An object that contains details on the package release to filter on.+ release :: Prelude.Maybe StringFilter,+ sourceLambdaLayerArn :: Prelude.Maybe StringFilter,+ -- | An object that contains details on the source layer hash to filter on.+ sourceLayerHash :: Prelude.Maybe StringFilter,+ -- | The package version to filter on.+ version :: Prelude.Maybe StringFilter+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PackageFilter' 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:+--+-- 'architecture', 'packageFilter_architecture' - An object that contains details on the package architecture type to+-- filter on.+--+-- 'epoch', 'packageFilter_epoch' - An object that contains details on the package epoch to filter on.+--+-- 'name', 'packageFilter_name' - An object that contains details on the name of the package to filter on.+--+-- 'release', 'packageFilter_release' - An object that contains details on the package release to filter on.+--+-- 'sourceLambdaLayerArn', 'packageFilter_sourceLambdaLayerArn' - Undocumented member.+--+-- 'sourceLayerHash', 'packageFilter_sourceLayerHash' - An object that contains details on the source layer hash to filter on.+--+-- 'version', 'packageFilter_version' - The package version to filter on.+newPackageFilter ::+ PackageFilter+newPackageFilter =+ PackageFilter'+ { architecture = Prelude.Nothing,+ epoch = Prelude.Nothing,+ name = Prelude.Nothing,+ release = Prelude.Nothing,+ sourceLambdaLayerArn = Prelude.Nothing,+ sourceLayerHash = Prelude.Nothing,+ version = Prelude.Nothing+ }++-- | An object that contains details on the package architecture type to+-- filter on.+packageFilter_architecture :: Lens.Lens' PackageFilter (Prelude.Maybe StringFilter)+packageFilter_architecture = Lens.lens (\PackageFilter' {architecture} -> architecture) (\s@PackageFilter' {} a -> s {architecture = a} :: PackageFilter)++-- | An object that contains details on the package epoch to filter on.+packageFilter_epoch :: Lens.Lens' PackageFilter (Prelude.Maybe NumberFilter)+packageFilter_epoch = Lens.lens (\PackageFilter' {epoch} -> epoch) (\s@PackageFilter' {} a -> s {epoch = a} :: PackageFilter)++-- | An object that contains details on the name of the package to filter on.+packageFilter_name :: Lens.Lens' PackageFilter (Prelude.Maybe StringFilter)+packageFilter_name = Lens.lens (\PackageFilter' {name} -> name) (\s@PackageFilter' {} a -> s {name = a} :: PackageFilter)++-- | An object that contains details on the package release to filter on.+packageFilter_release :: Lens.Lens' PackageFilter (Prelude.Maybe StringFilter)+packageFilter_release = Lens.lens (\PackageFilter' {release} -> release) (\s@PackageFilter' {} a -> s {release = a} :: PackageFilter)++-- | Undocumented member.+packageFilter_sourceLambdaLayerArn :: Lens.Lens' PackageFilter (Prelude.Maybe StringFilter)+packageFilter_sourceLambdaLayerArn = Lens.lens (\PackageFilter' {sourceLambdaLayerArn} -> sourceLambdaLayerArn) (\s@PackageFilter' {} a -> s {sourceLambdaLayerArn = a} :: PackageFilter)++-- | An object that contains details on the source layer hash to filter on.+packageFilter_sourceLayerHash :: Lens.Lens' PackageFilter (Prelude.Maybe StringFilter)+packageFilter_sourceLayerHash = Lens.lens (\PackageFilter' {sourceLayerHash} -> sourceLayerHash) (\s@PackageFilter' {} a -> s {sourceLayerHash = a} :: PackageFilter)++-- | The package version to filter on.+packageFilter_version :: Lens.Lens' PackageFilter (Prelude.Maybe StringFilter)+packageFilter_version = Lens.lens (\PackageFilter' {version} -> version) (\s@PackageFilter' {} a -> s {version = a} :: PackageFilter)++instance Data.FromJSON PackageFilter where+ parseJSON =+ Data.withObject+ "PackageFilter"+ ( \x ->+ PackageFilter'+ Prelude.<$> (x Data..:? "architecture")+ Prelude.<*> (x Data..:? "epoch")+ Prelude.<*> (x Data..:? "name")+ Prelude.<*> (x Data..:? "release")+ Prelude.<*> (x Data..:? "sourceLambdaLayerArn")+ Prelude.<*> (x Data..:? "sourceLayerHash")+ Prelude.<*> (x Data..:? "version")+ )++instance Prelude.Hashable PackageFilter where+ hashWithSalt _salt PackageFilter' {..} =+ _salt+ `Prelude.hashWithSalt` architecture+ `Prelude.hashWithSalt` epoch+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` release+ `Prelude.hashWithSalt` sourceLambdaLayerArn+ `Prelude.hashWithSalt` sourceLayerHash+ `Prelude.hashWithSalt` version++instance Prelude.NFData PackageFilter where+ rnf PackageFilter' {..} =+ Prelude.rnf architecture+ `Prelude.seq` Prelude.rnf epoch+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf release+ `Prelude.seq` Prelude.rnf sourceLambdaLayerArn+ `Prelude.seq` Prelude.rnf sourceLayerHash+ `Prelude.seq` Prelude.rnf version++instance Data.ToJSON PackageFilter where+ toJSON PackageFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("architecture" Data..=) Prelude.<$> architecture,+ ("epoch" Data..=) Prelude.<$> epoch,+ ("name" Data..=) Prelude.<$> name,+ ("release" Data..=) Prelude.<$> release,+ ("sourceLambdaLayerArn" Data..=)+ Prelude.<$> sourceLambdaLayerArn,+ ("sourceLayerHash" Data..=)+ Prelude.<$> sourceLayerHash,+ ("version" Data..=) Prelude.<$> version+ ]+ )
+ gen/Amazonka/Inspector2/Types/PackageManager.hs view
@@ -0,0 +1,141 @@+{-# 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.Inspector2.Types.PackageManager+-- 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.Inspector2.Types.PackageManager+ ( PackageManager+ ( ..,+ PackageManager_BUNDLER,+ PackageManager_CARGO,+ PackageManager_COMPOSER,+ PackageManager_GOBINARY,+ PackageManager_GOMOD,+ PackageManager_JAR,+ PackageManager_NODEPKG,+ PackageManager_NPM,+ PackageManager_NUGET,+ PackageManager_OS,+ PackageManager_PIP,+ PackageManager_PIPENV,+ PackageManager_POETRY,+ PackageManager_POM,+ PackageManager_PYTHONPKG,+ PackageManager_YARN+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype PackageManager = PackageManager'+ { fromPackageManager ::+ 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 PackageManager_BUNDLER :: PackageManager+pattern PackageManager_BUNDLER = PackageManager' "BUNDLER"++pattern PackageManager_CARGO :: PackageManager+pattern PackageManager_CARGO = PackageManager' "CARGO"++pattern PackageManager_COMPOSER :: PackageManager+pattern PackageManager_COMPOSER = PackageManager' "COMPOSER"++pattern PackageManager_GOBINARY :: PackageManager+pattern PackageManager_GOBINARY = PackageManager' "GOBINARY"++pattern PackageManager_GOMOD :: PackageManager+pattern PackageManager_GOMOD = PackageManager' "GOMOD"++pattern PackageManager_JAR :: PackageManager+pattern PackageManager_JAR = PackageManager' "JAR"++pattern PackageManager_NODEPKG :: PackageManager+pattern PackageManager_NODEPKG = PackageManager' "NODEPKG"++pattern PackageManager_NPM :: PackageManager+pattern PackageManager_NPM = PackageManager' "NPM"++pattern PackageManager_NUGET :: PackageManager+pattern PackageManager_NUGET = PackageManager' "NUGET"++pattern PackageManager_OS :: PackageManager+pattern PackageManager_OS = PackageManager' "OS"++pattern PackageManager_PIP :: PackageManager+pattern PackageManager_PIP = PackageManager' "PIP"++pattern PackageManager_PIPENV :: PackageManager+pattern PackageManager_PIPENV = PackageManager' "PIPENV"++pattern PackageManager_POETRY :: PackageManager+pattern PackageManager_POETRY = PackageManager' "POETRY"++pattern PackageManager_POM :: PackageManager+pattern PackageManager_POM = PackageManager' "POM"++pattern PackageManager_PYTHONPKG :: PackageManager+pattern PackageManager_PYTHONPKG = PackageManager' "PYTHONPKG"++pattern PackageManager_YARN :: PackageManager+pattern PackageManager_YARN = PackageManager' "YARN"++{-# COMPLETE+ PackageManager_BUNDLER,+ PackageManager_CARGO,+ PackageManager_COMPOSER,+ PackageManager_GOBINARY,+ PackageManager_GOMOD,+ PackageManager_JAR,+ PackageManager_NODEPKG,+ PackageManager_NPM,+ PackageManager_NUGET,+ PackageManager_OS,+ PackageManager_PIP,+ PackageManager_PIPENV,+ PackageManager_POETRY,+ PackageManager_POM,+ PackageManager_PYTHONPKG,+ PackageManager_YARN,+ PackageManager'+ #-}
+ gen/Amazonka/Inspector2/Types/PackageSortBy.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.Inspector2.Types.PackageSortBy+-- 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.Inspector2.Types.PackageSortBy+ ( PackageSortBy+ ( ..,+ PackageSortBy_ALL,+ PackageSortBy_CRITICAL,+ PackageSortBy_HIGH+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype PackageSortBy = PackageSortBy'+ { fromPackageSortBy ::+ 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 PackageSortBy_ALL :: PackageSortBy+pattern PackageSortBy_ALL = PackageSortBy' "ALL"++pattern PackageSortBy_CRITICAL :: PackageSortBy+pattern PackageSortBy_CRITICAL = PackageSortBy' "CRITICAL"++pattern PackageSortBy_HIGH :: PackageSortBy+pattern PackageSortBy_HIGH = PackageSortBy' "HIGH"++{-# COMPLETE+ PackageSortBy_ALL,+ PackageSortBy_CRITICAL,+ PackageSortBy_HIGH,+ PackageSortBy'+ #-}
+ gen/Amazonka/Inspector2/Types/PackageType.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.Inspector2.Types.PackageType+-- 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.Inspector2.Types.PackageType+ ( PackageType+ ( ..,+ PackageType_IMAGE,+ PackageType_ZIP+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype PackageType = PackageType'+ { fromPackageType ::+ 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 PackageType_IMAGE :: PackageType+pattern PackageType_IMAGE = PackageType' "IMAGE"++pattern PackageType_ZIP :: PackageType+pattern PackageType_ZIP = PackageType' "ZIP"++{-# COMPLETE+ PackageType_IMAGE,+ PackageType_ZIP,+ PackageType'+ #-}
+ gen/Amazonka/Inspector2/Types/PackageVulnerabilityDetails.hs view
@@ -0,0 +1,204 @@+{-# 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.Inspector2.Types.PackageVulnerabilityDetails+-- 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.Inspector2.Types.PackageVulnerabilityDetails where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.CvssScore+import Amazonka.Inspector2.Types.VulnerablePackage+import qualified Amazonka.Prelude as Prelude++-- | Information about a package vulnerability finding.+--+-- /See:/ 'newPackageVulnerabilityDetails' smart constructor.+data PackageVulnerabilityDetails = PackageVulnerabilityDetails'+ { -- | An object that contains details about the CVSS score of a finding.+ cvss :: Prelude.Maybe [CvssScore],+ -- | One or more URLs that contain details about this vulnerability type.+ referenceUrls :: Prelude.Maybe [Prelude.Text],+ -- | One or more vulnerabilities related to the one identified in this+ -- finding.+ relatedVulnerabilities :: Prelude.Maybe [Prelude.Text],+ -- | A URL to the source of the vulnerability information.+ sourceUrl :: Prelude.Maybe Prelude.Text,+ -- | The date and time that this vulnerability was first added to the+ -- vendor\'s database.+ vendorCreatedAt :: Prelude.Maybe Data.POSIX,+ -- | The severity the vendor has given to this vulnerability type.+ vendorSeverity :: Prelude.Maybe Prelude.Text,+ -- | The date and time the vendor last updated this vulnerability in their+ -- database.+ vendorUpdatedAt :: Prelude.Maybe Data.POSIX,+ -- | The packages impacted by this vulnerability.+ vulnerablePackages :: Prelude.Maybe [VulnerablePackage],+ -- | The source of the vulnerability information.+ source :: Prelude.Text,+ -- | The ID given to this vulnerability.+ vulnerabilityId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PackageVulnerabilityDetails' 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:+--+-- 'cvss', 'packageVulnerabilityDetails_cvss' - An object that contains details about the CVSS score of a finding.+--+-- 'referenceUrls', 'packageVulnerabilityDetails_referenceUrls' - One or more URLs that contain details about this vulnerability type.+--+-- 'relatedVulnerabilities', 'packageVulnerabilityDetails_relatedVulnerabilities' - One or more vulnerabilities related to the one identified in this+-- finding.+--+-- 'sourceUrl', 'packageVulnerabilityDetails_sourceUrl' - A URL to the source of the vulnerability information.+--+-- 'vendorCreatedAt', 'packageVulnerabilityDetails_vendorCreatedAt' - The date and time that this vulnerability was first added to the+-- vendor\'s database.+--+-- 'vendorSeverity', 'packageVulnerabilityDetails_vendorSeverity' - The severity the vendor has given to this vulnerability type.+--+-- 'vendorUpdatedAt', 'packageVulnerabilityDetails_vendorUpdatedAt' - The date and time the vendor last updated this vulnerability in their+-- database.+--+-- 'vulnerablePackages', 'packageVulnerabilityDetails_vulnerablePackages' - The packages impacted by this vulnerability.+--+-- 'source', 'packageVulnerabilityDetails_source' - The source of the vulnerability information.+--+-- 'vulnerabilityId', 'packageVulnerabilityDetails_vulnerabilityId' - The ID given to this vulnerability.+newPackageVulnerabilityDetails ::+ -- | 'source'+ Prelude.Text ->+ -- | 'vulnerabilityId'+ Prelude.Text ->+ PackageVulnerabilityDetails+newPackageVulnerabilityDetails+ pSource_+ pVulnerabilityId_ =+ PackageVulnerabilityDetails'+ { cvss =+ Prelude.Nothing,+ referenceUrls = Prelude.Nothing,+ relatedVulnerabilities = Prelude.Nothing,+ sourceUrl = Prelude.Nothing,+ vendorCreatedAt = Prelude.Nothing,+ vendorSeverity = Prelude.Nothing,+ vendorUpdatedAt = Prelude.Nothing,+ vulnerablePackages = Prelude.Nothing,+ source = pSource_,+ vulnerabilityId = pVulnerabilityId_+ }++-- | An object that contains details about the CVSS score of a finding.+packageVulnerabilityDetails_cvss :: Lens.Lens' PackageVulnerabilityDetails (Prelude.Maybe [CvssScore])+packageVulnerabilityDetails_cvss = Lens.lens (\PackageVulnerabilityDetails' {cvss} -> cvss) (\s@PackageVulnerabilityDetails' {} a -> s {cvss = a} :: PackageVulnerabilityDetails) Prelude.. Lens.mapping Lens.coerced++-- | One or more URLs that contain details about this vulnerability type.+packageVulnerabilityDetails_referenceUrls :: Lens.Lens' PackageVulnerabilityDetails (Prelude.Maybe [Prelude.Text])+packageVulnerabilityDetails_referenceUrls = Lens.lens (\PackageVulnerabilityDetails' {referenceUrls} -> referenceUrls) (\s@PackageVulnerabilityDetails' {} a -> s {referenceUrls = a} :: PackageVulnerabilityDetails) Prelude.. Lens.mapping Lens.coerced++-- | One or more vulnerabilities related to the one identified in this+-- finding.+packageVulnerabilityDetails_relatedVulnerabilities :: Lens.Lens' PackageVulnerabilityDetails (Prelude.Maybe [Prelude.Text])+packageVulnerabilityDetails_relatedVulnerabilities = Lens.lens (\PackageVulnerabilityDetails' {relatedVulnerabilities} -> relatedVulnerabilities) (\s@PackageVulnerabilityDetails' {} a -> s {relatedVulnerabilities = a} :: PackageVulnerabilityDetails) Prelude.. Lens.mapping Lens.coerced++-- | A URL to the source of the vulnerability information.+packageVulnerabilityDetails_sourceUrl :: Lens.Lens' PackageVulnerabilityDetails (Prelude.Maybe Prelude.Text)+packageVulnerabilityDetails_sourceUrl = Lens.lens (\PackageVulnerabilityDetails' {sourceUrl} -> sourceUrl) (\s@PackageVulnerabilityDetails' {} a -> s {sourceUrl = a} :: PackageVulnerabilityDetails)++-- | The date and time that this vulnerability was first added to the+-- vendor\'s database.+packageVulnerabilityDetails_vendorCreatedAt :: Lens.Lens' PackageVulnerabilityDetails (Prelude.Maybe Prelude.UTCTime)+packageVulnerabilityDetails_vendorCreatedAt = Lens.lens (\PackageVulnerabilityDetails' {vendorCreatedAt} -> vendorCreatedAt) (\s@PackageVulnerabilityDetails' {} a -> s {vendorCreatedAt = a} :: PackageVulnerabilityDetails) Prelude.. Lens.mapping Data._Time++-- | The severity the vendor has given to this vulnerability type.+packageVulnerabilityDetails_vendorSeverity :: Lens.Lens' PackageVulnerabilityDetails (Prelude.Maybe Prelude.Text)+packageVulnerabilityDetails_vendorSeverity = Lens.lens (\PackageVulnerabilityDetails' {vendorSeverity} -> vendorSeverity) (\s@PackageVulnerabilityDetails' {} a -> s {vendorSeverity = a} :: PackageVulnerabilityDetails)++-- | The date and time the vendor last updated this vulnerability in their+-- database.+packageVulnerabilityDetails_vendorUpdatedAt :: Lens.Lens' PackageVulnerabilityDetails (Prelude.Maybe Prelude.UTCTime)+packageVulnerabilityDetails_vendorUpdatedAt = Lens.lens (\PackageVulnerabilityDetails' {vendorUpdatedAt} -> vendorUpdatedAt) (\s@PackageVulnerabilityDetails' {} a -> s {vendorUpdatedAt = a} :: PackageVulnerabilityDetails) Prelude.. Lens.mapping Data._Time++-- | The packages impacted by this vulnerability.+packageVulnerabilityDetails_vulnerablePackages :: Lens.Lens' PackageVulnerabilityDetails (Prelude.Maybe [VulnerablePackage])+packageVulnerabilityDetails_vulnerablePackages = Lens.lens (\PackageVulnerabilityDetails' {vulnerablePackages} -> vulnerablePackages) (\s@PackageVulnerabilityDetails' {} a -> s {vulnerablePackages = a} :: PackageVulnerabilityDetails) Prelude.. Lens.mapping Lens.coerced++-- | The source of the vulnerability information.+packageVulnerabilityDetails_source :: Lens.Lens' PackageVulnerabilityDetails Prelude.Text+packageVulnerabilityDetails_source = Lens.lens (\PackageVulnerabilityDetails' {source} -> source) (\s@PackageVulnerabilityDetails' {} a -> s {source = a} :: PackageVulnerabilityDetails)++-- | The ID given to this vulnerability.+packageVulnerabilityDetails_vulnerabilityId :: Lens.Lens' PackageVulnerabilityDetails Prelude.Text+packageVulnerabilityDetails_vulnerabilityId = Lens.lens (\PackageVulnerabilityDetails' {vulnerabilityId} -> vulnerabilityId) (\s@PackageVulnerabilityDetails' {} a -> s {vulnerabilityId = a} :: PackageVulnerabilityDetails)++instance Data.FromJSON PackageVulnerabilityDetails where+ parseJSON =+ Data.withObject+ "PackageVulnerabilityDetails"+ ( \x ->+ PackageVulnerabilityDetails'+ Prelude.<$> (x Data..:? "cvss" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "referenceUrls" Data..!= Prelude.mempty)+ Prelude.<*> ( x+ Data..:? "relatedVulnerabilities"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..:? "sourceUrl")+ Prelude.<*> (x Data..:? "vendorCreatedAt")+ Prelude.<*> (x Data..:? "vendorSeverity")+ Prelude.<*> (x Data..:? "vendorUpdatedAt")+ Prelude.<*> ( x+ Data..:? "vulnerablePackages"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..: "source")+ Prelude.<*> (x Data..: "vulnerabilityId")+ )++instance Prelude.Hashable PackageVulnerabilityDetails where+ hashWithSalt _salt PackageVulnerabilityDetails' {..} =+ _salt+ `Prelude.hashWithSalt` cvss+ `Prelude.hashWithSalt` referenceUrls+ `Prelude.hashWithSalt` relatedVulnerabilities+ `Prelude.hashWithSalt` sourceUrl+ `Prelude.hashWithSalt` vendorCreatedAt+ `Prelude.hashWithSalt` vendorSeverity+ `Prelude.hashWithSalt` vendorUpdatedAt+ `Prelude.hashWithSalt` vulnerablePackages+ `Prelude.hashWithSalt` source+ `Prelude.hashWithSalt` vulnerabilityId++instance Prelude.NFData PackageVulnerabilityDetails where+ rnf PackageVulnerabilityDetails' {..} =+ Prelude.rnf cvss+ `Prelude.seq` Prelude.rnf referenceUrls+ `Prelude.seq` Prelude.rnf relatedVulnerabilities+ `Prelude.seq` Prelude.rnf sourceUrl+ `Prelude.seq` Prelude.rnf vendorCreatedAt+ `Prelude.seq` Prelude.rnf vendorSeverity+ `Prelude.seq` Prelude.rnf vendorUpdatedAt+ `Prelude.seq` Prelude.rnf vulnerablePackages+ `Prelude.seq` Prelude.rnf source+ `Prelude.seq` Prelude.rnf vulnerabilityId
+ gen/Amazonka/Inspector2/Types/Permission.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.Inspector2.Types.Permission+-- 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.Inspector2.Types.Permission where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.Operation+import Amazonka.Inspector2.Types.Service+import qualified Amazonka.Prelude as Prelude++-- | Contains information on the permissions an account has within Amazon+-- Inspector.+--+-- /See:/ 'newPermission' smart constructor.+data Permission = Permission'+ { -- | The operations that can be performed with the given permissions.+ operation :: Operation,+ -- | The services that the permissions allow an account to perform the given+ -- operations for.+ service :: Service+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Permission' 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:+--+-- 'operation', 'permission_operation' - The operations that can be performed with the given permissions.+--+-- 'service', 'permission_service' - The services that the permissions allow an account to perform the given+-- operations for.+newPermission ::+ -- | 'operation'+ Operation ->+ -- | 'service'+ Service ->+ Permission+newPermission pOperation_ pService_ =+ Permission'+ { operation = pOperation_,+ service = pService_+ }++-- | The operations that can be performed with the given permissions.+permission_operation :: Lens.Lens' Permission Operation+permission_operation = Lens.lens (\Permission' {operation} -> operation) (\s@Permission' {} a -> s {operation = a} :: Permission)++-- | The services that the permissions allow an account to perform the given+-- operations for.+permission_service :: Lens.Lens' Permission Service+permission_service = Lens.lens (\Permission' {service} -> service) (\s@Permission' {} a -> s {service = a} :: Permission)++instance Data.FromJSON Permission where+ parseJSON =+ Data.withObject+ "Permission"+ ( \x ->+ Permission'+ Prelude.<$> (x Data..: "operation")+ Prelude.<*> (x Data..: "service")+ )++instance Prelude.Hashable Permission where+ hashWithSalt _salt Permission' {..} =+ _salt+ `Prelude.hashWithSalt` operation+ `Prelude.hashWithSalt` service++instance Prelude.NFData Permission where+ rnf Permission' {..} =+ Prelude.rnf operation+ `Prelude.seq` Prelude.rnf service
+ gen/Amazonka/Inspector2/Types/PortRange.hs view
@@ -0,0 +1,84 @@+{-# 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.Inspector2.Types.PortRange+-- 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.Inspector2.Types.PortRange 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 about the port range associated with a finding.+--+-- /See:/ 'newPortRange' smart constructor.+data PortRange = PortRange'+ { -- | The beginning port in a port range.+ begin :: Prelude.Natural,+ -- | The ending port in a port range.+ end :: Prelude.Natural+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PortRange' 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:+--+-- 'begin', 'portRange_begin' - The beginning port in a port range.+--+-- 'end', 'portRange_end' - The ending port in a port range.+newPortRange ::+ -- | 'begin'+ Prelude.Natural ->+ -- | 'end'+ Prelude.Natural ->+ PortRange+newPortRange pBegin_ pEnd_ =+ PortRange' {begin = pBegin_, end = pEnd_}++-- | The beginning port in a port range.+portRange_begin :: Lens.Lens' PortRange Prelude.Natural+portRange_begin = Lens.lens (\PortRange' {begin} -> begin) (\s@PortRange' {} a -> s {begin = a} :: PortRange)++-- | The ending port in a port range.+portRange_end :: Lens.Lens' PortRange Prelude.Natural+portRange_end = Lens.lens (\PortRange' {end} -> end) (\s@PortRange' {} a -> s {end = a} :: PortRange)++instance Data.FromJSON PortRange where+ parseJSON =+ Data.withObject+ "PortRange"+ ( \x ->+ PortRange'+ Prelude.<$> (x Data..: "begin")+ Prelude.<*> (x Data..: "end")+ )++instance Prelude.Hashable PortRange where+ hashWithSalt _salt PortRange' {..} =+ _salt+ `Prelude.hashWithSalt` begin+ `Prelude.hashWithSalt` end++instance Prelude.NFData PortRange where+ rnf PortRange' {..} =+ Prelude.rnf begin `Prelude.seq` Prelude.rnf end
+ gen/Amazonka/Inspector2/Types/PortRangeFilter.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.Inspector2.Types.PortRangeFilter+-- 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.Inspector2.Types.PortRangeFilter 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 object that describes the details of a port range filter.+--+-- /See:/ 'newPortRangeFilter' smart constructor.+data PortRangeFilter = PortRangeFilter'+ { -- | The port number the port range begins at.+ beginInclusive :: Prelude.Maybe Prelude.Natural,+ -- | The port number the port range ends at.+ endInclusive :: Prelude.Maybe Prelude.Natural+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PortRangeFilter' 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:+--+-- 'beginInclusive', 'portRangeFilter_beginInclusive' - The port number the port range begins at.+--+-- 'endInclusive', 'portRangeFilter_endInclusive' - The port number the port range ends at.+newPortRangeFilter ::+ PortRangeFilter+newPortRangeFilter =+ PortRangeFilter'+ { beginInclusive = Prelude.Nothing,+ endInclusive = Prelude.Nothing+ }++-- | The port number the port range begins at.+portRangeFilter_beginInclusive :: Lens.Lens' PortRangeFilter (Prelude.Maybe Prelude.Natural)+portRangeFilter_beginInclusive = Lens.lens (\PortRangeFilter' {beginInclusive} -> beginInclusive) (\s@PortRangeFilter' {} a -> s {beginInclusive = a} :: PortRangeFilter)++-- | The port number the port range ends at.+portRangeFilter_endInclusive :: Lens.Lens' PortRangeFilter (Prelude.Maybe Prelude.Natural)+portRangeFilter_endInclusive = Lens.lens (\PortRangeFilter' {endInclusive} -> endInclusive) (\s@PortRangeFilter' {} a -> s {endInclusive = a} :: PortRangeFilter)++instance Data.FromJSON PortRangeFilter where+ parseJSON =+ Data.withObject+ "PortRangeFilter"+ ( \x ->+ PortRangeFilter'+ Prelude.<$> (x Data..:? "beginInclusive")+ Prelude.<*> (x Data..:? "endInclusive")+ )++instance Prelude.Hashable PortRangeFilter where+ hashWithSalt _salt PortRangeFilter' {..} =+ _salt+ `Prelude.hashWithSalt` beginInclusive+ `Prelude.hashWithSalt` endInclusive++instance Prelude.NFData PortRangeFilter where+ rnf PortRangeFilter' {..} =+ Prelude.rnf beginInclusive+ `Prelude.seq` Prelude.rnf endInclusive++instance Data.ToJSON PortRangeFilter where+ toJSON PortRangeFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("beginInclusive" Data..=)+ Prelude.<$> beginInclusive,+ ("endInclusive" Data..=) Prelude.<$> endInclusive+ ]+ )
+ gen/Amazonka/Inspector2/Types/Recommendation.hs view
@@ -0,0 +1,83 @@+{-# 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.Inspector2.Types.Recommendation+-- 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.Inspector2.Types.Recommendation 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 about the recommended course of action to remediate the finding.+--+-- /See:/ 'newRecommendation' smart constructor.+data Recommendation = Recommendation'+ { -- | The URL address to the CVE remediation recommendations.+ url :: Prelude.Maybe Prelude.Text,+ -- | The recommended course of action to remediate the finding.+ text :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Recommendation' 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:+--+-- 'url', 'recommendation_url' - The URL address to the CVE remediation recommendations.+--+-- 'text', 'recommendation_text' - The recommended course of action to remediate the finding.+newRecommendation ::+ Recommendation+newRecommendation =+ Recommendation'+ { url = Prelude.Nothing,+ text = Prelude.Nothing+ }++-- | The URL address to the CVE remediation recommendations.+recommendation_url :: Lens.Lens' Recommendation (Prelude.Maybe Prelude.Text)+recommendation_url = Lens.lens (\Recommendation' {url} -> url) (\s@Recommendation' {} a -> s {url = a} :: Recommendation)++-- | The recommended course of action to remediate the finding.+recommendation_text :: Lens.Lens' Recommendation (Prelude.Maybe Prelude.Text)+recommendation_text = Lens.lens (\Recommendation' {text} -> text) (\s@Recommendation' {} a -> s {text = a} :: Recommendation)++instance Data.FromJSON Recommendation where+ parseJSON =+ Data.withObject+ "Recommendation"+ ( \x ->+ Recommendation'+ Prelude.<$> (x Data..:? "Url")+ Prelude.<*> (x Data..:? "text")+ )++instance Prelude.Hashable Recommendation where+ hashWithSalt _salt Recommendation' {..} =+ _salt+ `Prelude.hashWithSalt` url+ `Prelude.hashWithSalt` text++instance Prelude.NFData Recommendation where+ rnf Recommendation' {..} =+ Prelude.rnf url `Prelude.seq` Prelude.rnf text
+ gen/Amazonka/Inspector2/Types/RelationshipStatus.hs view
@@ -0,0 +1,121 @@+{-# 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.Inspector2.Types.RelationshipStatus+-- 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.Inspector2.Types.RelationshipStatus+ ( RelationshipStatus+ ( ..,+ RelationshipStatus_ACCOUNT_SUSPENDED,+ RelationshipStatus_CANNOT_CREATE_DETECTOR_IN_ORG_MASTER,+ RelationshipStatus_CREATED,+ RelationshipStatus_DELETED,+ RelationshipStatus_DISABLED,+ RelationshipStatus_EMAIL_VERIFICATION_FAILED,+ RelationshipStatus_EMAIL_VERIFICATION_IN_PROGRESS,+ RelationshipStatus_ENABLED,+ RelationshipStatus_INVITED,+ RelationshipStatus_REGION_DISABLED,+ RelationshipStatus_REMOVED,+ RelationshipStatus_RESIGNED+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype RelationshipStatus = RelationshipStatus'+ { fromRelationshipStatus ::+ 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 RelationshipStatus_ACCOUNT_SUSPENDED :: RelationshipStatus+pattern RelationshipStatus_ACCOUNT_SUSPENDED = RelationshipStatus' "ACCOUNT_SUSPENDED"++pattern RelationshipStatus_CANNOT_CREATE_DETECTOR_IN_ORG_MASTER :: RelationshipStatus+pattern RelationshipStatus_CANNOT_CREATE_DETECTOR_IN_ORG_MASTER = RelationshipStatus' "CANNOT_CREATE_DETECTOR_IN_ORG_MASTER"++pattern RelationshipStatus_CREATED :: RelationshipStatus+pattern RelationshipStatus_CREATED = RelationshipStatus' "CREATED"++pattern RelationshipStatus_DELETED :: RelationshipStatus+pattern RelationshipStatus_DELETED = RelationshipStatus' "DELETED"++pattern RelationshipStatus_DISABLED :: RelationshipStatus+pattern RelationshipStatus_DISABLED = RelationshipStatus' "DISABLED"++pattern RelationshipStatus_EMAIL_VERIFICATION_FAILED :: RelationshipStatus+pattern RelationshipStatus_EMAIL_VERIFICATION_FAILED = RelationshipStatus' "EMAIL_VERIFICATION_FAILED"++pattern RelationshipStatus_EMAIL_VERIFICATION_IN_PROGRESS :: RelationshipStatus+pattern RelationshipStatus_EMAIL_VERIFICATION_IN_PROGRESS = RelationshipStatus' "EMAIL_VERIFICATION_IN_PROGRESS"++pattern RelationshipStatus_ENABLED :: RelationshipStatus+pattern RelationshipStatus_ENABLED = RelationshipStatus' "ENABLED"++pattern RelationshipStatus_INVITED :: RelationshipStatus+pattern RelationshipStatus_INVITED = RelationshipStatus' "INVITED"++pattern RelationshipStatus_REGION_DISABLED :: RelationshipStatus+pattern RelationshipStatus_REGION_DISABLED = RelationshipStatus' "REGION_DISABLED"++pattern RelationshipStatus_REMOVED :: RelationshipStatus+pattern RelationshipStatus_REMOVED = RelationshipStatus' "REMOVED"++pattern RelationshipStatus_RESIGNED :: RelationshipStatus+pattern RelationshipStatus_RESIGNED = RelationshipStatus' "RESIGNED"++{-# COMPLETE+ RelationshipStatus_ACCOUNT_SUSPENDED,+ RelationshipStatus_CANNOT_CREATE_DETECTOR_IN_ORG_MASTER,+ RelationshipStatus_CREATED,+ RelationshipStatus_DELETED,+ RelationshipStatus_DISABLED,+ RelationshipStatus_EMAIL_VERIFICATION_FAILED,+ RelationshipStatus_EMAIL_VERIFICATION_IN_PROGRESS,+ RelationshipStatus_ENABLED,+ RelationshipStatus_INVITED,+ RelationshipStatus_REGION_DISABLED,+ RelationshipStatus_REMOVED,+ RelationshipStatus_RESIGNED,+ RelationshipStatus'+ #-}
+ gen/Amazonka/Inspector2/Types/Remediation.hs view
@@ -0,0 +1,72 @@+{-# 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.Inspector2.Types.Remediation+-- 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.Inspector2.Types.Remediation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.Recommendation+import qualified Amazonka.Prelude as Prelude++-- | Information on how to remediate a finding.+--+-- /See:/ 'newRemediation' smart constructor.+data Remediation = Remediation'+ { -- | An object that contains information about the recommended course of+ -- action to remediate the finding.+ recommendation :: Prelude.Maybe Recommendation+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Remediation' 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:+--+-- 'recommendation', 'remediation_recommendation' - An object that contains information about the recommended course of+-- action to remediate the finding.+newRemediation ::+ Remediation+newRemediation =+ Remediation' {recommendation = Prelude.Nothing}++-- | An object that contains information about the recommended course of+-- action to remediate the finding.+remediation_recommendation :: Lens.Lens' Remediation (Prelude.Maybe Recommendation)+remediation_recommendation = Lens.lens (\Remediation' {recommendation} -> recommendation) (\s@Remediation' {} a -> s {recommendation = a} :: Remediation)++instance Data.FromJSON Remediation where+ parseJSON =+ Data.withObject+ "Remediation"+ ( \x ->+ Remediation'+ Prelude.<$> (x Data..:? "recommendation")+ )++instance Prelude.Hashable Remediation where+ hashWithSalt _salt Remediation' {..} =+ _salt `Prelude.hashWithSalt` recommendation++instance Prelude.NFData Remediation where+ rnf Remediation' {..} = Prelude.rnf recommendation
+ gen/Amazonka/Inspector2/Types/ReportFormat.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.Inspector2.Types.ReportFormat+-- 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.Inspector2.Types.ReportFormat+ ( ReportFormat+ ( ..,+ ReportFormat_CSV,+ ReportFormat_JSON+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ReportFormat = ReportFormat'+ { fromReportFormat ::+ 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 ReportFormat_CSV :: ReportFormat+pattern ReportFormat_CSV = ReportFormat' "CSV"++pattern ReportFormat_JSON :: ReportFormat+pattern ReportFormat_JSON = ReportFormat' "JSON"++{-# COMPLETE+ ReportFormat_CSV,+ ReportFormat_JSON,+ ReportFormat'+ #-}
+ gen/Amazonka/Inspector2/Types/ReportingErrorCode.hs view
@@ -0,0 +1,91 @@+{-# 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.Inspector2.Types.ReportingErrorCode+-- 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.Inspector2.Types.ReportingErrorCode+ ( ReportingErrorCode+ ( ..,+ ReportingErrorCode_BUCKET_NOT_FOUND,+ ReportingErrorCode_INCOMPATIBLE_BUCKET_REGION,+ ReportingErrorCode_INTERNAL_ERROR,+ ReportingErrorCode_INVALID_PERMISSIONS,+ ReportingErrorCode_MALFORMED_KMS_KEY,+ ReportingErrorCode_NO_FINDINGS_FOUND+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ReportingErrorCode = ReportingErrorCode'+ { fromReportingErrorCode ::+ 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 ReportingErrorCode_BUCKET_NOT_FOUND :: ReportingErrorCode+pattern ReportingErrorCode_BUCKET_NOT_FOUND = ReportingErrorCode' "BUCKET_NOT_FOUND"++pattern ReportingErrorCode_INCOMPATIBLE_BUCKET_REGION :: ReportingErrorCode+pattern ReportingErrorCode_INCOMPATIBLE_BUCKET_REGION = ReportingErrorCode' "INCOMPATIBLE_BUCKET_REGION"++pattern ReportingErrorCode_INTERNAL_ERROR :: ReportingErrorCode+pattern ReportingErrorCode_INTERNAL_ERROR = ReportingErrorCode' "INTERNAL_ERROR"++pattern ReportingErrorCode_INVALID_PERMISSIONS :: ReportingErrorCode+pattern ReportingErrorCode_INVALID_PERMISSIONS = ReportingErrorCode' "INVALID_PERMISSIONS"++pattern ReportingErrorCode_MALFORMED_KMS_KEY :: ReportingErrorCode+pattern ReportingErrorCode_MALFORMED_KMS_KEY = ReportingErrorCode' "MALFORMED_KMS_KEY"++pattern ReportingErrorCode_NO_FINDINGS_FOUND :: ReportingErrorCode+pattern ReportingErrorCode_NO_FINDINGS_FOUND = ReportingErrorCode' "NO_FINDINGS_FOUND"++{-# COMPLETE+ ReportingErrorCode_BUCKET_NOT_FOUND,+ ReportingErrorCode_INCOMPATIBLE_BUCKET_REGION,+ ReportingErrorCode_INTERNAL_ERROR,+ ReportingErrorCode_INVALID_PERMISSIONS,+ ReportingErrorCode_MALFORMED_KMS_KEY,+ ReportingErrorCode_NO_FINDINGS_FOUND,+ ReportingErrorCode'+ #-}
+ gen/Amazonka/Inspector2/Types/RepositoryAggregation.hs view
@@ -0,0 +1,99 @@+{-# 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.Inspector2.Types.RepositoryAggregation+-- 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.Inspector2.Types.RepositoryAggregation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.RepositorySortBy+import Amazonka.Inspector2.Types.SortOrder+import Amazonka.Inspector2.Types.StringFilter+import qualified Amazonka.Prelude as Prelude++-- | The details that define an aggregation based on repository.+--+-- /See:/ 'newRepositoryAggregation' smart constructor.+data RepositoryAggregation = RepositoryAggregation'+ { -- | The names of repositories to aggregate findings on.+ repositories :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The value to sort results by.+ sortBy :: Prelude.Maybe RepositorySortBy,+ -- | The order to sort results by.+ sortOrder :: Prelude.Maybe SortOrder+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RepositoryAggregation' 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:+--+-- 'repositories', 'repositoryAggregation_repositories' - The names of repositories to aggregate findings on.+--+-- 'sortBy', 'repositoryAggregation_sortBy' - The value to sort results by.+--+-- 'sortOrder', 'repositoryAggregation_sortOrder' - The order to sort results by.+newRepositoryAggregation ::+ RepositoryAggregation+newRepositoryAggregation =+ RepositoryAggregation'+ { repositories =+ Prelude.Nothing,+ sortBy = Prelude.Nothing,+ sortOrder = Prelude.Nothing+ }++-- | The names of repositories to aggregate findings on.+repositoryAggregation_repositories :: Lens.Lens' RepositoryAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+repositoryAggregation_repositories = Lens.lens (\RepositoryAggregation' {repositories} -> repositories) (\s@RepositoryAggregation' {} a -> s {repositories = a} :: RepositoryAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The value to sort results by.+repositoryAggregation_sortBy :: Lens.Lens' RepositoryAggregation (Prelude.Maybe RepositorySortBy)+repositoryAggregation_sortBy = Lens.lens (\RepositoryAggregation' {sortBy} -> sortBy) (\s@RepositoryAggregation' {} a -> s {sortBy = a} :: RepositoryAggregation)++-- | The order to sort results by.+repositoryAggregation_sortOrder :: Lens.Lens' RepositoryAggregation (Prelude.Maybe SortOrder)+repositoryAggregation_sortOrder = Lens.lens (\RepositoryAggregation' {sortOrder} -> sortOrder) (\s@RepositoryAggregation' {} a -> s {sortOrder = a} :: RepositoryAggregation)++instance Prelude.Hashable RepositoryAggregation where+ hashWithSalt _salt RepositoryAggregation' {..} =+ _salt+ `Prelude.hashWithSalt` repositories+ `Prelude.hashWithSalt` sortBy+ `Prelude.hashWithSalt` sortOrder++instance Prelude.NFData RepositoryAggregation where+ rnf RepositoryAggregation' {..} =+ Prelude.rnf repositories+ `Prelude.seq` Prelude.rnf sortBy+ `Prelude.seq` Prelude.rnf sortOrder++instance Data.ToJSON RepositoryAggregation where+ toJSON RepositoryAggregation' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("repositories" Data..=) Prelude.<$> repositories,+ ("sortBy" Data..=) Prelude.<$> sortBy,+ ("sortOrder" Data..=) Prelude.<$> sortOrder+ ]+ )
+ gen/Amazonka/Inspector2/Types/RepositoryAggregationResponse.hs view
@@ -0,0 +1,116 @@+{-# 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.Inspector2.Types.RepositoryAggregationResponse+-- 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.Inspector2.Types.RepositoryAggregationResponse where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.SeverityCounts+import qualified Amazonka.Prelude as Prelude++-- | A response that contains details on the results of a finding aggregation+-- by repository.+--+-- /See:/ 'newRepositoryAggregationResponse' smart constructor.+data RepositoryAggregationResponse = RepositoryAggregationResponse'+ { -- | The ID of the Amazon Web Services account associated with the findings.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | The number of container images impacted by the findings.+ affectedImages :: Prelude.Maybe Prelude.Integer,+ -- | An object that represent the count of matched findings per severity.+ severityCounts :: Prelude.Maybe SeverityCounts,+ -- | The name of the repository associated with the findings.+ repository :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RepositoryAggregationResponse' 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', 'repositoryAggregationResponse_accountId' - The ID of the Amazon Web Services account associated with the findings.+--+-- 'affectedImages', 'repositoryAggregationResponse_affectedImages' - The number of container images impacted by the findings.+--+-- 'severityCounts', 'repositoryAggregationResponse_severityCounts' - An object that represent the count of matched findings per severity.+--+-- 'repository', 'repositoryAggregationResponse_repository' - The name of the repository associated with the findings.+newRepositoryAggregationResponse ::+ -- | 'repository'+ Prelude.Text ->+ RepositoryAggregationResponse+newRepositoryAggregationResponse pRepository_ =+ RepositoryAggregationResponse'+ { accountId =+ Prelude.Nothing,+ affectedImages = Prelude.Nothing,+ severityCounts = Prelude.Nothing,+ repository = pRepository_+ }++-- | The ID of the Amazon Web Services account associated with the findings.+repositoryAggregationResponse_accountId :: Lens.Lens' RepositoryAggregationResponse (Prelude.Maybe Prelude.Text)+repositoryAggregationResponse_accountId = Lens.lens (\RepositoryAggregationResponse' {accountId} -> accountId) (\s@RepositoryAggregationResponse' {} a -> s {accountId = a} :: RepositoryAggregationResponse)++-- | The number of container images impacted by the findings.+repositoryAggregationResponse_affectedImages :: Lens.Lens' RepositoryAggregationResponse (Prelude.Maybe Prelude.Integer)+repositoryAggregationResponse_affectedImages = Lens.lens (\RepositoryAggregationResponse' {affectedImages} -> affectedImages) (\s@RepositoryAggregationResponse' {} a -> s {affectedImages = a} :: RepositoryAggregationResponse)++-- | An object that represent the count of matched findings per severity.+repositoryAggregationResponse_severityCounts :: Lens.Lens' RepositoryAggregationResponse (Prelude.Maybe SeverityCounts)+repositoryAggregationResponse_severityCounts = Lens.lens (\RepositoryAggregationResponse' {severityCounts} -> severityCounts) (\s@RepositoryAggregationResponse' {} a -> s {severityCounts = a} :: RepositoryAggregationResponse)++-- | The name of the repository associated with the findings.+repositoryAggregationResponse_repository :: Lens.Lens' RepositoryAggregationResponse Prelude.Text+repositoryAggregationResponse_repository = Lens.lens (\RepositoryAggregationResponse' {repository} -> repository) (\s@RepositoryAggregationResponse' {} a -> s {repository = a} :: RepositoryAggregationResponse)++instance Data.FromJSON RepositoryAggregationResponse where+ parseJSON =+ Data.withObject+ "RepositoryAggregationResponse"+ ( \x ->+ RepositoryAggregationResponse'+ Prelude.<$> (x Data..:? "accountId")+ Prelude.<*> (x Data..:? "affectedImages")+ Prelude.<*> (x Data..:? "severityCounts")+ Prelude.<*> (x Data..: "repository")+ )++instance+ Prelude.Hashable+ RepositoryAggregationResponse+ where+ hashWithSalt _salt RepositoryAggregationResponse' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` affectedImages+ `Prelude.hashWithSalt` severityCounts+ `Prelude.hashWithSalt` repository++instance Prelude.NFData RepositoryAggregationResponse where+ rnf RepositoryAggregationResponse' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf affectedImages+ `Prelude.seq` Prelude.rnf severityCounts+ `Prelude.seq` Prelude.rnf repository
+ gen/Amazonka/Inspector2/Types/RepositorySortBy.hs view
@@ -0,0 +1,81 @@+{-# 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.Inspector2.Types.RepositorySortBy+-- 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.Inspector2.Types.RepositorySortBy+ ( RepositorySortBy+ ( ..,+ RepositorySortBy_AFFECTED_IMAGES,+ RepositorySortBy_ALL,+ RepositorySortBy_CRITICAL,+ RepositorySortBy_HIGH+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype RepositorySortBy = RepositorySortBy'+ { fromRepositorySortBy ::+ 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 RepositorySortBy_AFFECTED_IMAGES :: RepositorySortBy+pattern RepositorySortBy_AFFECTED_IMAGES = RepositorySortBy' "AFFECTED_IMAGES"++pattern RepositorySortBy_ALL :: RepositorySortBy+pattern RepositorySortBy_ALL = RepositorySortBy' "ALL"++pattern RepositorySortBy_CRITICAL :: RepositorySortBy+pattern RepositorySortBy_CRITICAL = RepositorySortBy' "CRITICAL"++pattern RepositorySortBy_HIGH :: RepositorySortBy+pattern RepositorySortBy_HIGH = RepositorySortBy' "HIGH"++{-# COMPLETE+ RepositorySortBy_AFFECTED_IMAGES,+ RepositorySortBy_ALL,+ RepositorySortBy_CRITICAL,+ RepositorySortBy_HIGH,+ RepositorySortBy'+ #-}
+ gen/Amazonka/Inspector2/Types/Resource.hs view
@@ -0,0 +1,141 @@+{-# 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.Inspector2.Types.Resource+-- 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.Inspector2.Types.Resource where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.ResourceDetails+import Amazonka.Inspector2.Types.ResourceType+import qualified Amazonka.Prelude as Prelude++-- | Details about the resource involved in a finding.+--+-- /See:/ 'newResource' smart constructor.+data Resource = Resource'+ { -- | An object that contains details about the resource involved in a+ -- finding.+ details :: Prelude.Maybe ResourceDetails,+ -- | The partition of the resource.+ partition :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Web Services Region the impacted resource is located in.+ region :: Prelude.Maybe Prelude.Text,+ -- | The tags attached to the resource.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The ID of the resource.+ id :: Prelude.Text,+ -- | The type of resource.+ type' :: ResourceType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Resource' 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:+--+-- 'details', 'resource_details' - An object that contains details about the resource involved in a+-- finding.+--+-- 'partition', 'resource_partition' - The partition of the resource.+--+-- 'region', 'resource_region' - The Amazon Web Services Region the impacted resource is located in.+--+-- 'tags', 'resource_tags' - The tags attached to the resource.+--+-- 'id', 'resource_id' - The ID of the resource.+--+-- 'type'', 'resource_type' - The type of resource.+newResource ::+ -- | 'id'+ Prelude.Text ->+ -- | 'type''+ ResourceType ->+ Resource+newResource pId_ pType_ =+ Resource'+ { details = Prelude.Nothing,+ partition = Prelude.Nothing,+ region = Prelude.Nothing,+ tags = Prelude.Nothing,+ id = pId_,+ type' = pType_+ }++-- | An object that contains details about the resource involved in a+-- finding.+resource_details :: Lens.Lens' Resource (Prelude.Maybe ResourceDetails)+resource_details = Lens.lens (\Resource' {details} -> details) (\s@Resource' {} a -> s {details = a} :: Resource)++-- | The partition of the resource.+resource_partition :: Lens.Lens' Resource (Prelude.Maybe Prelude.Text)+resource_partition = Lens.lens (\Resource' {partition} -> partition) (\s@Resource' {} a -> s {partition = a} :: Resource)++-- | The Amazon Web Services Region the impacted resource is located in.+resource_region :: Lens.Lens' Resource (Prelude.Maybe Prelude.Text)+resource_region = Lens.lens (\Resource' {region} -> region) (\s@Resource' {} a -> s {region = a} :: Resource)++-- | The tags attached to the resource.+resource_tags :: Lens.Lens' Resource (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+resource_tags = Lens.lens (\Resource' {tags} -> tags) (\s@Resource' {} a -> s {tags = a} :: Resource) Prelude.. Lens.mapping Lens.coerced++-- | The ID of the resource.+resource_id :: Lens.Lens' Resource Prelude.Text+resource_id = Lens.lens (\Resource' {id} -> id) (\s@Resource' {} a -> s {id = a} :: Resource)++-- | The type of resource.+resource_type :: Lens.Lens' Resource ResourceType+resource_type = Lens.lens (\Resource' {type'} -> type') (\s@Resource' {} a -> s {type' = a} :: Resource)++instance Data.FromJSON Resource where+ parseJSON =+ Data.withObject+ "Resource"+ ( \x ->+ Resource'+ Prelude.<$> (x Data..:? "details")+ Prelude.<*> (x Data..:? "partition")+ Prelude.<*> (x Data..:? "region")+ Prelude.<*> (x Data..:? "tags" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..: "id")+ Prelude.<*> (x Data..: "type")+ )++instance Prelude.Hashable Resource where+ hashWithSalt _salt Resource' {..} =+ _salt+ `Prelude.hashWithSalt` details+ `Prelude.hashWithSalt` partition+ `Prelude.hashWithSalt` region+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` id+ `Prelude.hashWithSalt` type'++instance Prelude.NFData Resource where+ rnf Resource' {..} =+ Prelude.rnf details+ `Prelude.seq` Prelude.rnf partition+ `Prelude.seq` Prelude.rnf region+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf id+ `Prelude.seq` Prelude.rnf type'
+ gen/Amazonka/Inspector2/Types/ResourceDetails.hs view
@@ -0,0 +1,108 @@+{-# 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.Inspector2.Types.ResourceDetails+-- 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.Inspector2.Types.ResourceDetails where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.AwsEc2InstanceDetails+import Amazonka.Inspector2.Types.AwsEcrContainerImageDetails+import Amazonka.Inspector2.Types.AwsLambdaFunctionDetails+import qualified Amazonka.Prelude as Prelude++-- | Contains details about the resource involved in the finding.+--+-- /See:/ 'newResourceDetails' smart constructor.+data ResourceDetails = ResourceDetails'+ { -- | An object that contains details about the Amazon EC2 instance involved+ -- in the finding.+ awsEc2Instance :: Prelude.Maybe AwsEc2InstanceDetails,+ -- | An object that contains details about the Amazon ECR container image+ -- involved in the finding.+ awsEcrContainerImage :: Prelude.Maybe AwsEcrContainerImageDetails,+ -- | A summary of the information about an AWS Lambda function affected by a+ -- finding.+ awsLambdaFunction :: Prelude.Maybe AwsLambdaFunctionDetails+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ResourceDetails' 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:+--+-- 'awsEc2Instance', 'resourceDetails_awsEc2Instance' - An object that contains details about the Amazon EC2 instance involved+-- in the finding.+--+-- 'awsEcrContainerImage', 'resourceDetails_awsEcrContainerImage' - An object that contains details about the Amazon ECR container image+-- involved in the finding.+--+-- 'awsLambdaFunction', 'resourceDetails_awsLambdaFunction' - A summary of the information about an AWS Lambda function affected by a+-- finding.+newResourceDetails ::+ ResourceDetails+newResourceDetails =+ ResourceDetails'+ { awsEc2Instance = Prelude.Nothing,+ awsEcrContainerImage = Prelude.Nothing,+ awsLambdaFunction = Prelude.Nothing+ }++-- | An object that contains details about the Amazon EC2 instance involved+-- in the finding.+resourceDetails_awsEc2Instance :: Lens.Lens' ResourceDetails (Prelude.Maybe AwsEc2InstanceDetails)+resourceDetails_awsEc2Instance = Lens.lens (\ResourceDetails' {awsEc2Instance} -> awsEc2Instance) (\s@ResourceDetails' {} a -> s {awsEc2Instance = a} :: ResourceDetails)++-- | An object that contains details about the Amazon ECR container image+-- involved in the finding.+resourceDetails_awsEcrContainerImage :: Lens.Lens' ResourceDetails (Prelude.Maybe AwsEcrContainerImageDetails)+resourceDetails_awsEcrContainerImage = Lens.lens (\ResourceDetails' {awsEcrContainerImage} -> awsEcrContainerImage) (\s@ResourceDetails' {} a -> s {awsEcrContainerImage = a} :: ResourceDetails)++-- | A summary of the information about an AWS Lambda function affected by a+-- finding.+resourceDetails_awsLambdaFunction :: Lens.Lens' ResourceDetails (Prelude.Maybe AwsLambdaFunctionDetails)+resourceDetails_awsLambdaFunction = Lens.lens (\ResourceDetails' {awsLambdaFunction} -> awsLambdaFunction) (\s@ResourceDetails' {} a -> s {awsLambdaFunction = a} :: ResourceDetails)++instance Data.FromJSON ResourceDetails where+ parseJSON =+ Data.withObject+ "ResourceDetails"+ ( \x ->+ ResourceDetails'+ Prelude.<$> (x Data..:? "awsEc2Instance")+ Prelude.<*> (x Data..:? "awsEcrContainerImage")+ Prelude.<*> (x Data..:? "awsLambdaFunction")+ )++instance Prelude.Hashable ResourceDetails where+ hashWithSalt _salt ResourceDetails' {..} =+ _salt+ `Prelude.hashWithSalt` awsEc2Instance+ `Prelude.hashWithSalt` awsEcrContainerImage+ `Prelude.hashWithSalt` awsLambdaFunction++instance Prelude.NFData ResourceDetails where+ rnf ResourceDetails' {..} =+ Prelude.rnf awsEc2Instance+ `Prelude.seq` Prelude.rnf awsEcrContainerImage+ `Prelude.seq` Prelude.rnf awsLambdaFunction
+ gen/Amazonka/Inspector2/Types/ResourceScanMetadata.hs view
@@ -0,0 +1,119 @@+{-# 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.Inspector2.Types.ResourceScanMetadata+-- 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.Inspector2.Types.ResourceScanMetadata where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.Ec2Metadata+import Amazonka.Inspector2.Types.EcrContainerImageMetadata+import Amazonka.Inspector2.Types.EcrRepositoryMetadata+import Amazonka.Inspector2.Types.LambdaFunctionMetadata+import qualified Amazonka.Prelude as Prelude++-- | An object that contains details about the metadata for an Amazon ECR+-- resource.+--+-- /See:/ 'newResourceScanMetadata' smart constructor.+data ResourceScanMetadata = ResourceScanMetadata'+ { -- | An object that contains metadata details for an Amazon EC2 instance.+ ec2 :: Prelude.Maybe Ec2Metadata,+ -- | An object that contains details about the container metadata for an+ -- Amazon ECR image.+ ecrImage :: Prelude.Maybe EcrContainerImageMetadata,+ -- | An object that contains details about the repository an Amazon ECR image+ -- resides in.+ ecrRepository :: Prelude.Maybe EcrRepositoryMetadata,+ -- | An object that contains metadata details for an AWS Lambda function.+ lambdaFunction :: Prelude.Maybe LambdaFunctionMetadata+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ResourceScanMetadata' 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:+--+-- 'ec2', 'resourceScanMetadata_ec2' - An object that contains metadata details for an Amazon EC2 instance.+--+-- 'ecrImage', 'resourceScanMetadata_ecrImage' - An object that contains details about the container metadata for an+-- Amazon ECR image.+--+-- 'ecrRepository', 'resourceScanMetadata_ecrRepository' - An object that contains details about the repository an Amazon ECR image+-- resides in.+--+-- 'lambdaFunction', 'resourceScanMetadata_lambdaFunction' - An object that contains metadata details for an AWS Lambda function.+newResourceScanMetadata ::+ ResourceScanMetadata+newResourceScanMetadata =+ ResourceScanMetadata'+ { ec2 = Prelude.Nothing,+ ecrImage = Prelude.Nothing,+ ecrRepository = Prelude.Nothing,+ lambdaFunction = Prelude.Nothing+ }++-- | An object that contains metadata details for an Amazon EC2 instance.+resourceScanMetadata_ec2 :: Lens.Lens' ResourceScanMetadata (Prelude.Maybe Ec2Metadata)+resourceScanMetadata_ec2 = Lens.lens (\ResourceScanMetadata' {ec2} -> ec2) (\s@ResourceScanMetadata' {} a -> s {ec2 = a} :: ResourceScanMetadata)++-- | An object that contains details about the container metadata for an+-- Amazon ECR image.+resourceScanMetadata_ecrImage :: Lens.Lens' ResourceScanMetadata (Prelude.Maybe EcrContainerImageMetadata)+resourceScanMetadata_ecrImage = Lens.lens (\ResourceScanMetadata' {ecrImage} -> ecrImage) (\s@ResourceScanMetadata' {} a -> s {ecrImage = a} :: ResourceScanMetadata)++-- | An object that contains details about the repository an Amazon ECR image+-- resides in.+resourceScanMetadata_ecrRepository :: Lens.Lens' ResourceScanMetadata (Prelude.Maybe EcrRepositoryMetadata)+resourceScanMetadata_ecrRepository = Lens.lens (\ResourceScanMetadata' {ecrRepository} -> ecrRepository) (\s@ResourceScanMetadata' {} a -> s {ecrRepository = a} :: ResourceScanMetadata)++-- | An object that contains metadata details for an AWS Lambda function.+resourceScanMetadata_lambdaFunction :: Lens.Lens' ResourceScanMetadata (Prelude.Maybe LambdaFunctionMetadata)+resourceScanMetadata_lambdaFunction = Lens.lens (\ResourceScanMetadata' {lambdaFunction} -> lambdaFunction) (\s@ResourceScanMetadata' {} a -> s {lambdaFunction = a} :: ResourceScanMetadata)++instance Data.FromJSON ResourceScanMetadata where+ parseJSON =+ Data.withObject+ "ResourceScanMetadata"+ ( \x ->+ ResourceScanMetadata'+ Prelude.<$> (x Data..:? "ec2")+ Prelude.<*> (x Data..:? "ecrImage")+ Prelude.<*> (x Data..:? "ecrRepository")+ Prelude.<*> (x Data..:? "lambdaFunction")+ )++instance Prelude.Hashable ResourceScanMetadata where+ hashWithSalt _salt ResourceScanMetadata' {..} =+ _salt+ `Prelude.hashWithSalt` ec2+ `Prelude.hashWithSalt` ecrImage+ `Prelude.hashWithSalt` ecrRepository+ `Prelude.hashWithSalt` lambdaFunction++instance Prelude.NFData ResourceScanMetadata where+ rnf ResourceScanMetadata' {..} =+ Prelude.rnf ec2+ `Prelude.seq` Prelude.rnf ecrImage+ `Prelude.seq` Prelude.rnf ecrRepository+ `Prelude.seq` Prelude.rnf lambdaFunction
+ gen/Amazonka/Inspector2/Types/ResourceScanType.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.Inspector2.Types.ResourceScanType+-- 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.Inspector2.Types.ResourceScanType+ ( ResourceScanType+ ( ..,+ ResourceScanType_EC2,+ ResourceScanType_ECR,+ ResourceScanType_LAMBDA+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ResourceScanType = ResourceScanType'+ { fromResourceScanType ::+ 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 ResourceScanType_EC2 :: ResourceScanType+pattern ResourceScanType_EC2 = ResourceScanType' "EC2"++pattern ResourceScanType_ECR :: ResourceScanType+pattern ResourceScanType_ECR = ResourceScanType' "ECR"++pattern ResourceScanType_LAMBDA :: ResourceScanType+pattern ResourceScanType_LAMBDA = ResourceScanType' "LAMBDA"++{-# COMPLETE+ ResourceScanType_EC2,+ ResourceScanType_ECR,+ ResourceScanType_LAMBDA,+ ResourceScanType'+ #-}
+ gen/Amazonka/Inspector2/Types/ResourceState.hs view
@@ -0,0 +1,107 @@+{-# 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.Inspector2.Types.ResourceState+-- 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.Inspector2.Types.ResourceState where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.State+import qualified Amazonka.Prelude as Prelude++-- | Details the state of Amazon Inspector for each resource type Amazon+-- Inspector scans.+--+-- /See:/ 'newResourceState' smart constructor.+data ResourceState = ResourceState'+ { lambda :: Prelude.Maybe State,+ -- | An object detailing the state of Amazon Inspector scanning for Amazon+ -- EC2 resources.+ ec2 :: State,+ -- | An object detailing the state of Amazon Inspector scanning for Amazon+ -- ECR resources.+ ecr :: State+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ResourceState' 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:+--+-- 'lambda', 'resourceState_lambda' - Undocumented member.+--+-- 'ec2', 'resourceState_ec2' - An object detailing the state of Amazon Inspector scanning for Amazon+-- EC2 resources.+--+-- 'ecr', 'resourceState_ecr' - An object detailing the state of Amazon Inspector scanning for Amazon+-- ECR resources.+newResourceState ::+ -- | 'ec2'+ State ->+ -- | 'ecr'+ State ->+ ResourceState+newResourceState pEc2_ pEcr_ =+ ResourceState'+ { lambda = Prelude.Nothing,+ ec2 = pEc2_,+ ecr = pEcr_+ }++-- | Undocumented member.+resourceState_lambda :: Lens.Lens' ResourceState (Prelude.Maybe State)+resourceState_lambda = Lens.lens (\ResourceState' {lambda} -> lambda) (\s@ResourceState' {} a -> s {lambda = a} :: ResourceState)++-- | An object detailing the state of Amazon Inspector scanning for Amazon+-- EC2 resources.+resourceState_ec2 :: Lens.Lens' ResourceState State+resourceState_ec2 = Lens.lens (\ResourceState' {ec2} -> ec2) (\s@ResourceState' {} a -> s {ec2 = a} :: ResourceState)++-- | An object detailing the state of Amazon Inspector scanning for Amazon+-- ECR resources.+resourceState_ecr :: Lens.Lens' ResourceState State+resourceState_ecr = Lens.lens (\ResourceState' {ecr} -> ecr) (\s@ResourceState' {} a -> s {ecr = a} :: ResourceState)++instance Data.FromJSON ResourceState where+ parseJSON =+ Data.withObject+ "ResourceState"+ ( \x ->+ ResourceState'+ Prelude.<$> (x Data..:? "lambda")+ Prelude.<*> (x Data..: "ec2")+ Prelude.<*> (x Data..: "ecr")+ )++instance Prelude.Hashable ResourceState where+ hashWithSalt _salt ResourceState' {..} =+ _salt+ `Prelude.hashWithSalt` lambda+ `Prelude.hashWithSalt` ec2+ `Prelude.hashWithSalt` ecr++instance Prelude.NFData ResourceState where+ rnf ResourceState' {..} =+ Prelude.rnf lambda+ `Prelude.seq` Prelude.rnf ec2+ `Prelude.seq` Prelude.rnf ecr
+ gen/Amazonka/Inspector2/Types/ResourceStatus.hs view
@@ -0,0 +1,105 @@+{-# 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.Inspector2.Types.ResourceStatus+-- 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.Inspector2.Types.ResourceStatus where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.Status+import qualified Amazonka.Prelude as Prelude++-- | Details the status of Amazon Inspector for each resource type Amazon+-- Inspector scans.+--+-- /See:/ 'newResourceStatus' smart constructor.+data ResourceStatus = ResourceStatus'+ { -- | The status of Amazon Inspector scanning for AWS Lambda function+ -- resources.+ lambda :: Prelude.Maybe Status,+ -- | The status of Amazon Inspector scanning for Amazon EC2 resources.+ ec2 :: Status,+ -- | The status of Amazon Inspector scanning for Amazon ECR resources.+ ecr :: Status+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ResourceStatus' 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:+--+-- 'lambda', 'resourceStatus_lambda' - The status of Amazon Inspector scanning for AWS Lambda function+-- resources.+--+-- 'ec2', 'resourceStatus_ec2' - The status of Amazon Inspector scanning for Amazon EC2 resources.+--+-- 'ecr', 'resourceStatus_ecr' - The status of Amazon Inspector scanning for Amazon ECR resources.+newResourceStatus ::+ -- | 'ec2'+ Status ->+ -- | 'ecr'+ Status ->+ ResourceStatus+newResourceStatus pEc2_ pEcr_ =+ ResourceStatus'+ { lambda = Prelude.Nothing,+ ec2 = pEc2_,+ ecr = pEcr_+ }++-- | The status of Amazon Inspector scanning for AWS Lambda function+-- resources.+resourceStatus_lambda :: Lens.Lens' ResourceStatus (Prelude.Maybe Status)+resourceStatus_lambda = Lens.lens (\ResourceStatus' {lambda} -> lambda) (\s@ResourceStatus' {} a -> s {lambda = a} :: ResourceStatus)++-- | The status of Amazon Inspector scanning for Amazon EC2 resources.+resourceStatus_ec2 :: Lens.Lens' ResourceStatus Status+resourceStatus_ec2 = Lens.lens (\ResourceStatus' {ec2} -> ec2) (\s@ResourceStatus' {} a -> s {ec2 = a} :: ResourceStatus)++-- | The status of Amazon Inspector scanning for Amazon ECR resources.+resourceStatus_ecr :: Lens.Lens' ResourceStatus Status+resourceStatus_ecr = Lens.lens (\ResourceStatus' {ecr} -> ecr) (\s@ResourceStatus' {} a -> s {ecr = a} :: ResourceStatus)++instance Data.FromJSON ResourceStatus where+ parseJSON =+ Data.withObject+ "ResourceStatus"+ ( \x ->+ ResourceStatus'+ Prelude.<$> (x Data..:? "lambda")+ Prelude.<*> (x Data..: "ec2")+ Prelude.<*> (x Data..: "ecr")+ )++instance Prelude.Hashable ResourceStatus where+ hashWithSalt _salt ResourceStatus' {..} =+ _salt+ `Prelude.hashWithSalt` lambda+ `Prelude.hashWithSalt` ec2+ `Prelude.hashWithSalt` ecr++instance Prelude.NFData ResourceStatus where+ rnf ResourceStatus' {..} =+ Prelude.rnf lambda+ `Prelude.seq` Prelude.rnf ec2+ `Prelude.seq` Prelude.rnf ecr
+ gen/Amazonka/Inspector2/Types/ResourceType.hs view
@@ -0,0 +1,81 @@+{-# 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.Inspector2.Types.ResourceType+-- 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.Inspector2.Types.ResourceType+ ( ResourceType+ ( ..,+ ResourceType_AWS_EC2_INSTANCE,+ ResourceType_AWS_ECR_CONTAINER_IMAGE,+ ResourceType_AWS_ECR_REPOSITORY,+ ResourceType_AWS_LAMBDA_FUNCTION+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ResourceType = ResourceType'+ { fromResourceType ::+ 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 ResourceType_AWS_EC2_INSTANCE :: ResourceType+pattern ResourceType_AWS_EC2_INSTANCE = ResourceType' "AWS_EC2_INSTANCE"++pattern ResourceType_AWS_ECR_CONTAINER_IMAGE :: ResourceType+pattern ResourceType_AWS_ECR_CONTAINER_IMAGE = ResourceType' "AWS_ECR_CONTAINER_IMAGE"++pattern ResourceType_AWS_ECR_REPOSITORY :: ResourceType+pattern ResourceType_AWS_ECR_REPOSITORY = ResourceType' "AWS_ECR_REPOSITORY"++pattern ResourceType_AWS_LAMBDA_FUNCTION :: ResourceType+pattern ResourceType_AWS_LAMBDA_FUNCTION = ResourceType' "AWS_LAMBDA_FUNCTION"++{-# COMPLETE+ ResourceType_AWS_EC2_INSTANCE,+ ResourceType_AWS_ECR_CONTAINER_IMAGE,+ ResourceType_AWS_ECR_REPOSITORY,+ ResourceType_AWS_LAMBDA_FUNCTION,+ ResourceType'+ #-}
+ gen/Amazonka/Inspector2/Types/Runtime.hs view
@@ -0,0 +1,123 @@+{-# 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.Inspector2.Types.Runtime+-- 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.Inspector2.Types.Runtime+ ( Runtime+ ( ..,+ Runtime_GO_1_X,+ Runtime_JAVA_11,+ Runtime_JAVA_8,+ Runtime_JAVA_8_AL2,+ Runtime_NODEJS,+ Runtime_NODEJS_12_X,+ Runtime_NODEJS_14_X,+ Runtime_NODEJS_16_X,+ Runtime_NODEJS_18_X,+ Runtime_PYTHON_3_7,+ Runtime_PYTHON_3_8,+ Runtime_PYTHON_3_9,+ Runtime_UNSUPPORTED+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype Runtime = Runtime' {fromRuntime :: 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 Runtime_GO_1_X :: Runtime+pattern Runtime_GO_1_X = Runtime' "GO_1_X"++pattern Runtime_JAVA_11 :: Runtime+pattern Runtime_JAVA_11 = Runtime' "JAVA_11"++pattern Runtime_JAVA_8 :: Runtime+pattern Runtime_JAVA_8 = Runtime' "JAVA_8"++pattern Runtime_JAVA_8_AL2 :: Runtime+pattern Runtime_JAVA_8_AL2 = Runtime' "JAVA_8_AL2"++pattern Runtime_NODEJS :: Runtime+pattern Runtime_NODEJS = Runtime' "NODEJS"++pattern Runtime_NODEJS_12_X :: Runtime+pattern Runtime_NODEJS_12_X = Runtime' "NODEJS_12_X"++pattern Runtime_NODEJS_14_X :: Runtime+pattern Runtime_NODEJS_14_X = Runtime' "NODEJS_14_X"++pattern Runtime_NODEJS_16_X :: Runtime+pattern Runtime_NODEJS_16_X = Runtime' "NODEJS_16_X"++pattern Runtime_NODEJS_18_X :: Runtime+pattern Runtime_NODEJS_18_X = Runtime' "NODEJS_18_X"++pattern Runtime_PYTHON_3_7 :: Runtime+pattern Runtime_PYTHON_3_7 = Runtime' "PYTHON_3_7"++pattern Runtime_PYTHON_3_8 :: Runtime+pattern Runtime_PYTHON_3_8 = Runtime' "PYTHON_3_8"++pattern Runtime_PYTHON_3_9 :: Runtime+pattern Runtime_PYTHON_3_9 = Runtime' "PYTHON_3_9"++pattern Runtime_UNSUPPORTED :: Runtime+pattern Runtime_UNSUPPORTED = Runtime' "UNSUPPORTED"++{-# COMPLETE+ Runtime_GO_1_X,+ Runtime_JAVA_11,+ Runtime_JAVA_8,+ Runtime_JAVA_8_AL2,+ Runtime_NODEJS,+ Runtime_NODEJS_12_X,+ Runtime_NODEJS_14_X,+ Runtime_NODEJS_16_X,+ Runtime_NODEJS_18_X,+ Runtime_PYTHON_3_7,+ Runtime_PYTHON_3_8,+ Runtime_PYTHON_3_9,+ Runtime_UNSUPPORTED,+ Runtime'+ #-}
+ gen/Amazonka/Inspector2/Types/ScanStatus.hs view
@@ -0,0 +1,90 @@+{-# 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.Inspector2.Types.ScanStatus+-- 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.Inspector2.Types.ScanStatus where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.ScanStatusCode+import Amazonka.Inspector2.Types.ScanStatusReason+import qualified Amazonka.Prelude as Prelude++-- | The status of the scan.+--+-- /See:/ 'newScanStatus' smart constructor.+data ScanStatus = ScanStatus'+ { -- | The reason for the scan.+ reason :: ScanStatusReason,+ -- | The status code of the scan.+ statusCode :: ScanStatusCode+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ScanStatus' 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:+--+-- 'reason', 'scanStatus_reason' - The reason for the scan.+--+-- 'statusCode', 'scanStatus_statusCode' - The status code of the scan.+newScanStatus ::+ -- | 'reason'+ ScanStatusReason ->+ -- | 'statusCode'+ ScanStatusCode ->+ ScanStatus+newScanStatus pReason_ pStatusCode_ =+ ScanStatus'+ { reason = pReason_,+ statusCode = pStatusCode_+ }++-- | The reason for the scan.+scanStatus_reason :: Lens.Lens' ScanStatus ScanStatusReason+scanStatus_reason = Lens.lens (\ScanStatus' {reason} -> reason) (\s@ScanStatus' {} a -> s {reason = a} :: ScanStatus)++-- | The status code of the scan.+scanStatus_statusCode :: Lens.Lens' ScanStatus ScanStatusCode+scanStatus_statusCode = Lens.lens (\ScanStatus' {statusCode} -> statusCode) (\s@ScanStatus' {} a -> s {statusCode = a} :: ScanStatus)++instance Data.FromJSON ScanStatus where+ parseJSON =+ Data.withObject+ "ScanStatus"+ ( \x ->+ ScanStatus'+ Prelude.<$> (x Data..: "reason")+ Prelude.<*> (x Data..: "statusCode")+ )++instance Prelude.Hashable ScanStatus where+ hashWithSalt _salt ScanStatus' {..} =+ _salt+ `Prelude.hashWithSalt` reason+ `Prelude.hashWithSalt` statusCode++instance Prelude.NFData ScanStatus where+ rnf ScanStatus' {..} =+ Prelude.rnf reason+ `Prelude.seq` Prelude.rnf statusCode
+ gen/Amazonka/Inspector2/Types/ScanStatusCode.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.Inspector2.Types.ScanStatusCode+-- 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.Inspector2.Types.ScanStatusCode+ ( ScanStatusCode+ ( ..,+ ScanStatusCode_ACTIVE,+ ScanStatusCode_INACTIVE+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ScanStatusCode = ScanStatusCode'+ { fromScanStatusCode ::+ 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 ScanStatusCode_ACTIVE :: ScanStatusCode+pattern ScanStatusCode_ACTIVE = ScanStatusCode' "ACTIVE"++pattern ScanStatusCode_INACTIVE :: ScanStatusCode+pattern ScanStatusCode_INACTIVE = ScanStatusCode' "INACTIVE"++{-# COMPLETE+ ScanStatusCode_ACTIVE,+ ScanStatusCode_INACTIVE,+ ScanStatusCode'+ #-}
+ gen/Amazonka/Inspector2/Types/ScanStatusReason.hs view
@@ -0,0 +1,151 @@+{-# 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.Inspector2.Types.ScanStatusReason+-- 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.Inspector2.Types.ScanStatusReason+ ( ScanStatusReason+ ( ..,+ ScanStatusReason_ACCESS_DENIED,+ ScanStatusReason_EC2_INSTANCE_STOPPED,+ ScanStatusReason_EXCLUDED_BY_TAG,+ ScanStatusReason_IMAGE_SIZE_EXCEEDED,+ ScanStatusReason_INTERNAL_ERROR,+ ScanStatusReason_NO_INVENTORY,+ ScanStatusReason_NO_RESOURCES_FOUND,+ ScanStatusReason_PENDING_DISABLE,+ ScanStatusReason_PENDING_INITIAL_SCAN,+ ScanStatusReason_RESOURCE_TERMINATED,+ ScanStatusReason_SCAN_ELIGIBILITY_EXPIRED,+ ScanStatusReason_SCAN_FREQUENCY_MANUAL,+ ScanStatusReason_SCAN_FREQUENCY_SCAN_ON_PUSH,+ ScanStatusReason_STALE_INVENTORY,+ ScanStatusReason_SUCCESSFUL,+ ScanStatusReason_UNMANAGED_EC2_INSTANCE,+ ScanStatusReason_UNSUPPORTED_OS,+ ScanStatusReason_UNSUPPORTED_RUNTIME+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ScanStatusReason = ScanStatusReason'+ { fromScanStatusReason ::+ 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 ScanStatusReason_ACCESS_DENIED :: ScanStatusReason+pattern ScanStatusReason_ACCESS_DENIED = ScanStatusReason' "ACCESS_DENIED"++pattern ScanStatusReason_EC2_INSTANCE_STOPPED :: ScanStatusReason+pattern ScanStatusReason_EC2_INSTANCE_STOPPED = ScanStatusReason' "EC2_INSTANCE_STOPPED"++pattern ScanStatusReason_EXCLUDED_BY_TAG :: ScanStatusReason+pattern ScanStatusReason_EXCLUDED_BY_TAG = ScanStatusReason' "EXCLUDED_BY_TAG"++pattern ScanStatusReason_IMAGE_SIZE_EXCEEDED :: ScanStatusReason+pattern ScanStatusReason_IMAGE_SIZE_EXCEEDED = ScanStatusReason' "IMAGE_SIZE_EXCEEDED"++pattern ScanStatusReason_INTERNAL_ERROR :: ScanStatusReason+pattern ScanStatusReason_INTERNAL_ERROR = ScanStatusReason' "INTERNAL_ERROR"++pattern ScanStatusReason_NO_INVENTORY :: ScanStatusReason+pattern ScanStatusReason_NO_INVENTORY = ScanStatusReason' "NO_INVENTORY"++pattern ScanStatusReason_NO_RESOURCES_FOUND :: ScanStatusReason+pattern ScanStatusReason_NO_RESOURCES_FOUND = ScanStatusReason' "NO_RESOURCES_FOUND"++pattern ScanStatusReason_PENDING_DISABLE :: ScanStatusReason+pattern ScanStatusReason_PENDING_DISABLE = ScanStatusReason' "PENDING_DISABLE"++pattern ScanStatusReason_PENDING_INITIAL_SCAN :: ScanStatusReason+pattern ScanStatusReason_PENDING_INITIAL_SCAN = ScanStatusReason' "PENDING_INITIAL_SCAN"++pattern ScanStatusReason_RESOURCE_TERMINATED :: ScanStatusReason+pattern ScanStatusReason_RESOURCE_TERMINATED = ScanStatusReason' "RESOURCE_TERMINATED"++pattern ScanStatusReason_SCAN_ELIGIBILITY_EXPIRED :: ScanStatusReason+pattern ScanStatusReason_SCAN_ELIGIBILITY_EXPIRED = ScanStatusReason' "SCAN_ELIGIBILITY_EXPIRED"++pattern ScanStatusReason_SCAN_FREQUENCY_MANUAL :: ScanStatusReason+pattern ScanStatusReason_SCAN_FREQUENCY_MANUAL = ScanStatusReason' "SCAN_FREQUENCY_MANUAL"++pattern ScanStatusReason_SCAN_FREQUENCY_SCAN_ON_PUSH :: ScanStatusReason+pattern ScanStatusReason_SCAN_FREQUENCY_SCAN_ON_PUSH = ScanStatusReason' "SCAN_FREQUENCY_SCAN_ON_PUSH"++pattern ScanStatusReason_STALE_INVENTORY :: ScanStatusReason+pattern ScanStatusReason_STALE_INVENTORY = ScanStatusReason' "STALE_INVENTORY"++pattern ScanStatusReason_SUCCESSFUL :: ScanStatusReason+pattern ScanStatusReason_SUCCESSFUL = ScanStatusReason' "SUCCESSFUL"++pattern ScanStatusReason_UNMANAGED_EC2_INSTANCE :: ScanStatusReason+pattern ScanStatusReason_UNMANAGED_EC2_INSTANCE = ScanStatusReason' "UNMANAGED_EC2_INSTANCE"++pattern ScanStatusReason_UNSUPPORTED_OS :: ScanStatusReason+pattern ScanStatusReason_UNSUPPORTED_OS = ScanStatusReason' "UNSUPPORTED_OS"++pattern ScanStatusReason_UNSUPPORTED_RUNTIME :: ScanStatusReason+pattern ScanStatusReason_UNSUPPORTED_RUNTIME = ScanStatusReason' "UNSUPPORTED_RUNTIME"++{-# COMPLETE+ ScanStatusReason_ACCESS_DENIED,+ ScanStatusReason_EC2_INSTANCE_STOPPED,+ ScanStatusReason_EXCLUDED_BY_TAG,+ ScanStatusReason_IMAGE_SIZE_EXCEEDED,+ ScanStatusReason_INTERNAL_ERROR,+ ScanStatusReason_NO_INVENTORY,+ ScanStatusReason_NO_RESOURCES_FOUND,+ ScanStatusReason_PENDING_DISABLE,+ ScanStatusReason_PENDING_INITIAL_SCAN,+ ScanStatusReason_RESOURCE_TERMINATED,+ ScanStatusReason_SCAN_ELIGIBILITY_EXPIRED,+ ScanStatusReason_SCAN_FREQUENCY_MANUAL,+ ScanStatusReason_SCAN_FREQUENCY_SCAN_ON_PUSH,+ ScanStatusReason_STALE_INVENTORY,+ ScanStatusReason_SUCCESSFUL,+ ScanStatusReason_UNMANAGED_EC2_INSTANCE,+ ScanStatusReason_UNSUPPORTED_OS,+ ScanStatusReason_UNSUPPORTED_RUNTIME,+ ScanStatusReason'+ #-}
+ gen/Amazonka/Inspector2/Types/ScanType.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.Inspector2.Types.ScanType+-- 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.Inspector2.Types.ScanType+ ( ScanType+ ( ..,+ ScanType_NETWORK,+ ScanType_PACKAGE+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ScanType = ScanType'+ { fromScanType ::+ 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 ScanType_NETWORK :: ScanType+pattern ScanType_NETWORK = ScanType' "NETWORK"++pattern ScanType_PACKAGE :: ScanType+pattern ScanType_PACKAGE = ScanType' "PACKAGE"++{-# COMPLETE+ ScanType_NETWORK,+ ScanType_PACKAGE,+ ScanType'+ #-}
+ gen/Amazonka/Inspector2/Types/Service.hs view
@@ -0,0 +1,73 @@+{-# 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.Inspector2.Types.Service+-- 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.Inspector2.Types.Service+ ( Service+ ( ..,+ Service_EC2,+ Service_ECR,+ Service_LAMBDA+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype Service = Service' {fromService :: 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 Service_EC2 :: Service+pattern Service_EC2 = Service' "EC2"++pattern Service_ECR :: Service+pattern Service_ECR = Service' "ECR"++pattern Service_LAMBDA :: Service+pattern Service_LAMBDA = Service' "LAMBDA"++{-# COMPLETE+ Service_EC2,+ Service_ECR,+ Service_LAMBDA,+ Service'+ #-}
+ gen/Amazonka/Inspector2/Types/Severity.hs view
@@ -0,0 +1,91 @@+{-# 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.Inspector2.Types.Severity+-- 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.Inspector2.Types.Severity+ ( Severity+ ( ..,+ Severity_CRITICAL,+ Severity_HIGH,+ Severity_INFORMATIONAL,+ Severity_LOW,+ Severity_MEDIUM,+ Severity_UNTRIAGED+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype Severity = Severity'+ { fromSeverity ::+ 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 Severity_CRITICAL :: Severity+pattern Severity_CRITICAL = Severity' "CRITICAL"++pattern Severity_HIGH :: Severity+pattern Severity_HIGH = Severity' "HIGH"++pattern Severity_INFORMATIONAL :: Severity+pattern Severity_INFORMATIONAL = Severity' "INFORMATIONAL"++pattern Severity_LOW :: Severity+pattern Severity_LOW = Severity' "LOW"++pattern Severity_MEDIUM :: Severity+pattern Severity_MEDIUM = Severity' "MEDIUM"++pattern Severity_UNTRIAGED :: Severity+pattern Severity_UNTRIAGED = Severity' "UNTRIAGED"++{-# COMPLETE+ Severity_CRITICAL,+ Severity_HIGH,+ Severity_INFORMATIONAL,+ Severity_LOW,+ Severity_MEDIUM,+ Severity_UNTRIAGED,+ Severity'+ #-}
+ gen/Amazonka/Inspector2/Types/SeverityCounts.hs view
@@ -0,0 +1,108 @@+{-# 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.Inspector2.Types.SeverityCounts+-- 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.Inspector2.Types.SeverityCounts 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 object that contains the counts of aggregated finding per severity.+--+-- /See:/ 'newSeverityCounts' smart constructor.+data SeverityCounts = SeverityCounts'+ { -- | The total count of findings from all severities.+ all :: Prelude.Maybe Prelude.Integer,+ -- | The total count of critical severity findings.+ critical :: Prelude.Maybe Prelude.Integer,+ -- | The total count of high severity findings.+ high :: Prelude.Maybe Prelude.Integer,+ -- | The total count of medium severity findings.+ medium :: Prelude.Maybe Prelude.Integer+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SeverityCounts' 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:+--+-- 'all', 'severityCounts_all' - The total count of findings from all severities.+--+-- 'critical', 'severityCounts_critical' - The total count of critical severity findings.+--+-- 'high', 'severityCounts_high' - The total count of high severity findings.+--+-- 'medium', 'severityCounts_medium' - The total count of medium severity findings.+newSeverityCounts ::+ SeverityCounts+newSeverityCounts =+ SeverityCounts'+ { all = Prelude.Nothing,+ critical = Prelude.Nothing,+ high = Prelude.Nothing,+ medium = Prelude.Nothing+ }++-- | The total count of findings from all severities.+severityCounts_all :: Lens.Lens' SeverityCounts (Prelude.Maybe Prelude.Integer)+severityCounts_all = Lens.lens (\SeverityCounts' {all} -> all) (\s@SeverityCounts' {} a -> s {all = a} :: SeverityCounts)++-- | The total count of critical severity findings.+severityCounts_critical :: Lens.Lens' SeverityCounts (Prelude.Maybe Prelude.Integer)+severityCounts_critical = Lens.lens (\SeverityCounts' {critical} -> critical) (\s@SeverityCounts' {} a -> s {critical = a} :: SeverityCounts)++-- | The total count of high severity findings.+severityCounts_high :: Lens.Lens' SeverityCounts (Prelude.Maybe Prelude.Integer)+severityCounts_high = Lens.lens (\SeverityCounts' {high} -> high) (\s@SeverityCounts' {} a -> s {high = a} :: SeverityCounts)++-- | The total count of medium severity findings.+severityCounts_medium :: Lens.Lens' SeverityCounts (Prelude.Maybe Prelude.Integer)+severityCounts_medium = Lens.lens (\SeverityCounts' {medium} -> medium) (\s@SeverityCounts' {} a -> s {medium = a} :: SeverityCounts)++instance Data.FromJSON SeverityCounts where+ parseJSON =+ Data.withObject+ "SeverityCounts"+ ( \x ->+ SeverityCounts'+ Prelude.<$> (x Data..:? "all")+ Prelude.<*> (x Data..:? "critical")+ Prelude.<*> (x Data..:? "high")+ Prelude.<*> (x Data..:? "medium")+ )++instance Prelude.Hashable SeverityCounts where+ hashWithSalt _salt SeverityCounts' {..} =+ _salt+ `Prelude.hashWithSalt` all+ `Prelude.hashWithSalt` critical+ `Prelude.hashWithSalt` high+ `Prelude.hashWithSalt` medium++instance Prelude.NFData SeverityCounts where+ rnf SeverityCounts' {..} =+ Prelude.rnf all+ `Prelude.seq` Prelude.rnf critical+ `Prelude.seq` Prelude.rnf high+ `Prelude.seq` Prelude.rnf medium
+ gen/Amazonka/Inspector2/Types/SortCriteria.hs view
@@ -0,0 +1,89 @@+{-# 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.Inspector2.Types.SortCriteria+-- 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.Inspector2.Types.SortCriteria where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.SortField+import Amazonka.Inspector2.Types.SortOrder+import qualified Amazonka.Prelude as Prelude++-- | Details about the criteria used to sort finding results.+--+-- /See:/ 'newSortCriteria' smart constructor.+data SortCriteria = SortCriteria'+ { -- | The finding detail field by which results are sorted.+ field :: SortField,+ -- | The order by which findings are sorted.+ sortOrder :: SortOrder+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SortCriteria' 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:+--+-- 'field', 'sortCriteria_field' - The finding detail field by which results are sorted.+--+-- 'sortOrder', 'sortCriteria_sortOrder' - The order by which findings are sorted.+newSortCriteria ::+ -- | 'field'+ SortField ->+ -- | 'sortOrder'+ SortOrder ->+ SortCriteria+newSortCriteria pField_ pSortOrder_ =+ SortCriteria'+ { field = pField_,+ sortOrder = pSortOrder_+ }++-- | The finding detail field by which results are sorted.+sortCriteria_field :: Lens.Lens' SortCriteria SortField+sortCriteria_field = Lens.lens (\SortCriteria' {field} -> field) (\s@SortCriteria' {} a -> s {field = a} :: SortCriteria)++-- | The order by which findings are sorted.+sortCriteria_sortOrder :: Lens.Lens' SortCriteria SortOrder+sortCriteria_sortOrder = Lens.lens (\SortCriteria' {sortOrder} -> sortOrder) (\s@SortCriteria' {} a -> s {sortOrder = a} :: SortCriteria)++instance Prelude.Hashable SortCriteria where+ hashWithSalt _salt SortCriteria' {..} =+ _salt+ `Prelude.hashWithSalt` field+ `Prelude.hashWithSalt` sortOrder++instance Prelude.NFData SortCriteria where+ rnf SortCriteria' {..} =+ Prelude.rnf field+ `Prelude.seq` Prelude.rnf sortOrder++instance Data.ToJSON SortCriteria where+ toJSON SortCriteria' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("field" Data..= field),+ Prelude.Just ("sortOrder" Data..= sortOrder)+ ]+ )
+ gen/Amazonka/Inspector2/Types/SortField.hs view
@@ -0,0 +1,141 @@+{-# 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.Inspector2.Types.SortField+-- 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.Inspector2.Types.SortField+ ( SortField+ ( ..,+ SortField_AWS_ACCOUNT_ID,+ SortField_COMPONENT_TYPE,+ SortField_ECR_IMAGE_PUSHED_AT,+ SortField_ECR_IMAGE_REGISTRY,+ SortField_ECR_IMAGE_REPOSITORY_NAME,+ SortField_FINDING_STATUS,+ SortField_FINDING_TYPE,+ SortField_FIRST_OBSERVED_AT,+ SortField_INSPECTOR_SCORE,+ SortField_LAST_OBSERVED_AT,+ SortField_NETWORK_PROTOCOL,+ SortField_RESOURCE_TYPE,+ SortField_SEVERITY,+ SortField_VENDOR_SEVERITY,+ SortField_VULNERABILITY_ID,+ SortField_VULNERABILITY_SOURCE+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype SortField = SortField'+ { fromSortField ::+ 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 SortField_AWS_ACCOUNT_ID :: SortField+pattern SortField_AWS_ACCOUNT_ID = SortField' "AWS_ACCOUNT_ID"++pattern SortField_COMPONENT_TYPE :: SortField+pattern SortField_COMPONENT_TYPE = SortField' "COMPONENT_TYPE"++pattern SortField_ECR_IMAGE_PUSHED_AT :: SortField+pattern SortField_ECR_IMAGE_PUSHED_AT = SortField' "ECR_IMAGE_PUSHED_AT"++pattern SortField_ECR_IMAGE_REGISTRY :: SortField+pattern SortField_ECR_IMAGE_REGISTRY = SortField' "ECR_IMAGE_REGISTRY"++pattern SortField_ECR_IMAGE_REPOSITORY_NAME :: SortField+pattern SortField_ECR_IMAGE_REPOSITORY_NAME = SortField' "ECR_IMAGE_REPOSITORY_NAME"++pattern SortField_FINDING_STATUS :: SortField+pattern SortField_FINDING_STATUS = SortField' "FINDING_STATUS"++pattern SortField_FINDING_TYPE :: SortField+pattern SortField_FINDING_TYPE = SortField' "FINDING_TYPE"++pattern SortField_FIRST_OBSERVED_AT :: SortField+pattern SortField_FIRST_OBSERVED_AT = SortField' "FIRST_OBSERVED_AT"++pattern SortField_INSPECTOR_SCORE :: SortField+pattern SortField_INSPECTOR_SCORE = SortField' "INSPECTOR_SCORE"++pattern SortField_LAST_OBSERVED_AT :: SortField+pattern SortField_LAST_OBSERVED_AT = SortField' "LAST_OBSERVED_AT"++pattern SortField_NETWORK_PROTOCOL :: SortField+pattern SortField_NETWORK_PROTOCOL = SortField' "NETWORK_PROTOCOL"++pattern SortField_RESOURCE_TYPE :: SortField+pattern SortField_RESOURCE_TYPE = SortField' "RESOURCE_TYPE"++pattern SortField_SEVERITY :: SortField+pattern SortField_SEVERITY = SortField' "SEVERITY"++pattern SortField_VENDOR_SEVERITY :: SortField+pattern SortField_VENDOR_SEVERITY = SortField' "VENDOR_SEVERITY"++pattern SortField_VULNERABILITY_ID :: SortField+pattern SortField_VULNERABILITY_ID = SortField' "VULNERABILITY_ID"++pattern SortField_VULNERABILITY_SOURCE :: SortField+pattern SortField_VULNERABILITY_SOURCE = SortField' "VULNERABILITY_SOURCE"++{-# COMPLETE+ SortField_AWS_ACCOUNT_ID,+ SortField_COMPONENT_TYPE,+ SortField_ECR_IMAGE_PUSHED_AT,+ SortField_ECR_IMAGE_REGISTRY,+ SortField_ECR_IMAGE_REPOSITORY_NAME,+ SortField_FINDING_STATUS,+ SortField_FINDING_TYPE,+ SortField_FIRST_OBSERVED_AT,+ SortField_INSPECTOR_SCORE,+ SortField_LAST_OBSERVED_AT,+ SortField_NETWORK_PROTOCOL,+ SortField_RESOURCE_TYPE,+ SortField_SEVERITY,+ SortField_VENDOR_SEVERITY,+ SortField_VULNERABILITY_ID,+ SortField_VULNERABILITY_SOURCE,+ SortField'+ #-}
+ gen/Amazonka/Inspector2/Types/SortOrder.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.Inspector2.Types.SortOrder+-- 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.Inspector2.Types.SortOrder+ ( SortOrder+ ( ..,+ SortOrder_ASC,+ SortOrder_DESC+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype SortOrder = SortOrder'+ { fromSortOrder ::+ 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 SortOrder_ASC :: SortOrder+pattern SortOrder_ASC = SortOrder' "ASC"++pattern SortOrder_DESC :: SortOrder+pattern SortOrder_DESC = SortOrder' "DESC"++{-# COMPLETE+ SortOrder_ASC,+ SortOrder_DESC,+ SortOrder'+ #-}
+ gen/Amazonka/Inspector2/Types/State.hs view
@@ -0,0 +1,111 @@+{-# 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.Inspector2.Types.State+-- 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.Inspector2.Types.State where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.ErrorCode+import Amazonka.Inspector2.Types.Status+import qualified Amazonka.Prelude as Prelude++-- | An object that described the state of Amazon Inspector scans for an+-- account.+--+-- /See:/ 'newState' smart constructor.+data State = State'+ { -- | The error code explaining why the account failed to enable Amazon+ -- Inspector.+ errorCode :: ErrorCode,+ -- | The error message received when the account failed to enable Amazon+ -- Inspector.+ errorMessage :: Prelude.Text,+ -- | The status of Amazon Inspector for the account.+ status :: Status+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'State' 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:+--+-- 'errorCode', 'state_errorCode' - The error code explaining why the account failed to enable Amazon+-- Inspector.+--+-- 'errorMessage', 'state_errorMessage' - The error message received when the account failed to enable Amazon+-- Inspector.+--+-- 'status', 'state_status' - The status of Amazon Inspector for the account.+newState ::+ -- | 'errorCode'+ ErrorCode ->+ -- | 'errorMessage'+ Prelude.Text ->+ -- | 'status'+ Status ->+ State+newState pErrorCode_ pErrorMessage_ pStatus_ =+ State'+ { errorCode = pErrorCode_,+ errorMessage = pErrorMessage_,+ status = pStatus_+ }++-- | The error code explaining why the account failed to enable Amazon+-- Inspector.+state_errorCode :: Lens.Lens' State ErrorCode+state_errorCode = Lens.lens (\State' {errorCode} -> errorCode) (\s@State' {} a -> s {errorCode = a} :: State)++-- | The error message received when the account failed to enable Amazon+-- Inspector.+state_errorMessage :: Lens.Lens' State Prelude.Text+state_errorMessage = Lens.lens (\State' {errorMessage} -> errorMessage) (\s@State' {} a -> s {errorMessage = a} :: State)++-- | The status of Amazon Inspector for the account.+state_status :: Lens.Lens' State Status+state_status = Lens.lens (\State' {status} -> status) (\s@State' {} a -> s {status = a} :: State)++instance Data.FromJSON State where+ parseJSON =+ Data.withObject+ "State"+ ( \x ->+ State'+ Prelude.<$> (x Data..: "errorCode")+ Prelude.<*> (x Data..: "errorMessage")+ Prelude.<*> (x Data..: "status")+ )++instance Prelude.Hashable State where+ hashWithSalt _salt State' {..} =+ _salt+ `Prelude.hashWithSalt` errorCode+ `Prelude.hashWithSalt` errorMessage+ `Prelude.hashWithSalt` status++instance Prelude.NFData State where+ rnf State' {..} =+ Prelude.rnf errorCode+ `Prelude.seq` Prelude.rnf errorMessage+ `Prelude.seq` Prelude.rnf status
+ gen/Amazonka/Inspector2/Types/Status.hs view
@@ -0,0 +1,88 @@+{-# 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.Inspector2.Types.Status+-- 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.Inspector2.Types.Status+ ( Status+ ( ..,+ Status_DISABLED,+ Status_DISABLING,+ Status_ENABLED,+ Status_ENABLING,+ Status_SUSPENDED,+ Status_SUSPENDING+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype Status = Status' {fromStatus :: 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 Status_DISABLED :: Status+pattern Status_DISABLED = Status' "DISABLED"++pattern Status_DISABLING :: Status+pattern Status_DISABLING = Status' "DISABLING"++pattern Status_ENABLED :: Status+pattern Status_ENABLED = Status' "ENABLED"++pattern Status_ENABLING :: Status+pattern Status_ENABLING = Status' "ENABLING"++pattern Status_SUSPENDED :: Status+pattern Status_SUSPENDED = Status' "SUSPENDED"++pattern Status_SUSPENDING :: Status+pattern Status_SUSPENDING = Status' "SUSPENDING"++{-# COMPLETE+ Status_DISABLED,+ Status_DISABLING,+ Status_ENABLED,+ Status_ENABLING,+ Status_SUSPENDED,+ Status_SUSPENDING,+ Status'+ #-}
+ gen/Amazonka/Inspector2/Types/Step.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.Inspector2.Types.Step+-- 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.Inspector2.Types.Step 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 about the step associated with a finding.+--+-- /See:/ 'newStep' smart constructor.+data Step = Step'+ { -- | The component ID.+ componentId :: Prelude.Text,+ -- | The component type.+ componentType :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Step' 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:+--+-- 'componentId', 'step_componentId' - The component ID.+--+-- 'componentType', 'step_componentType' - The component type.+newStep ::+ -- | 'componentId'+ Prelude.Text ->+ -- | 'componentType'+ Prelude.Text ->+ Step+newStep pComponentId_ pComponentType_ =+ Step'+ { componentId = pComponentId_,+ componentType = pComponentType_+ }++-- | The component ID.+step_componentId :: Lens.Lens' Step Prelude.Text+step_componentId = Lens.lens (\Step' {componentId} -> componentId) (\s@Step' {} a -> s {componentId = a} :: Step)++-- | The component type.+step_componentType :: Lens.Lens' Step Prelude.Text+step_componentType = Lens.lens (\Step' {componentType} -> componentType) (\s@Step' {} a -> s {componentType = a} :: Step)++instance Data.FromJSON Step where+ parseJSON =+ Data.withObject+ "Step"+ ( \x ->+ Step'+ Prelude.<$> (x Data..: "componentId")+ Prelude.<*> (x Data..: "componentType")+ )++instance Prelude.Hashable Step where+ hashWithSalt _salt Step' {..} =+ _salt+ `Prelude.hashWithSalt` componentId+ `Prelude.hashWithSalt` componentType++instance Prelude.NFData Step where+ rnf Step' {..} =+ Prelude.rnf componentId+ `Prelude.seq` Prelude.rnf componentType
+ gen/Amazonka/Inspector2/Types/StringComparison.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.Inspector2.Types.StringComparison+-- 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.Inspector2.Types.StringComparison+ ( StringComparison+ ( ..,+ StringComparison_EQUALS,+ StringComparison_NOT_EQUALS,+ StringComparison_PREFIX+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype StringComparison = StringComparison'+ { fromStringComparison ::+ 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 StringComparison_EQUALS :: StringComparison+pattern StringComparison_EQUALS = StringComparison' "EQUALS"++pattern StringComparison_NOT_EQUALS :: StringComparison+pattern StringComparison_NOT_EQUALS = StringComparison' "NOT_EQUALS"++pattern StringComparison_PREFIX :: StringComparison+pattern StringComparison_PREFIX = StringComparison' "PREFIX"++{-# COMPLETE+ StringComparison_EQUALS,+ StringComparison_NOT_EQUALS,+ StringComparison_PREFIX,+ StringComparison'+ #-}
+ gen/Amazonka/Inspector2/Types/StringFilter.hs view
@@ -0,0 +1,98 @@+{-# 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.Inspector2.Types.StringFilter+-- 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.Inspector2.Types.StringFilter where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.StringComparison+import qualified Amazonka.Prelude as Prelude++-- | An object that describes the details of a string filter.+--+-- /See:/ 'newStringFilter' smart constructor.+data StringFilter = StringFilter'+ { -- | The operator to use when comparing values in the filter.+ comparison :: StringComparison,+ -- | The value to filter on.+ value :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'StringFilter' 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:+--+-- 'comparison', 'stringFilter_comparison' - The operator to use when comparing values in the filter.+--+-- 'value', 'stringFilter_value' - The value to filter on.+newStringFilter ::+ -- | 'comparison'+ StringComparison ->+ -- | 'value'+ Prelude.Text ->+ StringFilter+newStringFilter pComparison_ pValue_ =+ StringFilter'+ { comparison = pComparison_,+ value = pValue_+ }++-- | The operator to use when comparing values in the filter.+stringFilter_comparison :: Lens.Lens' StringFilter StringComparison+stringFilter_comparison = Lens.lens (\StringFilter' {comparison} -> comparison) (\s@StringFilter' {} a -> s {comparison = a} :: StringFilter)++-- | The value to filter on.+stringFilter_value :: Lens.Lens' StringFilter Prelude.Text+stringFilter_value = Lens.lens (\StringFilter' {value} -> value) (\s@StringFilter' {} a -> s {value = a} :: StringFilter)++instance Data.FromJSON StringFilter where+ parseJSON =+ Data.withObject+ "StringFilter"+ ( \x ->+ StringFilter'+ Prelude.<$> (x Data..: "comparison")+ Prelude.<*> (x Data..: "value")+ )++instance Prelude.Hashable StringFilter where+ hashWithSalt _salt StringFilter' {..} =+ _salt+ `Prelude.hashWithSalt` comparison+ `Prelude.hashWithSalt` value++instance Prelude.NFData StringFilter where+ rnf StringFilter' {..} =+ Prelude.rnf comparison+ `Prelude.seq` Prelude.rnf value++instance Data.ToJSON StringFilter where+ toJSON StringFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("comparison" Data..= comparison),+ Prelude.Just ("value" Data..= value)+ ]+ )
+ gen/Amazonka/Inspector2/Types/TitleAggregation.hs view
@@ -0,0 +1,124 @@+{-# 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.Inspector2.Types.TitleAggregation+-- 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.Inspector2.Types.TitleAggregation where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.AggregationResourceType+import Amazonka.Inspector2.Types.SortOrder+import Amazonka.Inspector2.Types.StringFilter+import Amazonka.Inspector2.Types.TitleSortBy+import qualified Amazonka.Prelude as Prelude++-- | The details that define an aggregation based on finding title.+--+-- /See:/ 'newTitleAggregation' smart constructor.+data TitleAggregation = TitleAggregation'+ { -- | The resource type to aggregate on.+ resourceType :: Prelude.Maybe AggregationResourceType,+ -- | The value to sort results by.+ sortBy :: Prelude.Maybe TitleSortBy,+ -- | The order to sort results by.+ sortOrder :: Prelude.Maybe SortOrder,+ -- | The finding titles to aggregate on.+ titles :: Prelude.Maybe (Prelude.NonEmpty StringFilter),+ -- | The vulnerability IDs of the findings.+ vulnerabilityIds :: Prelude.Maybe (Prelude.NonEmpty StringFilter)+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TitleAggregation' 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:+--+-- 'resourceType', 'titleAggregation_resourceType' - The resource type to aggregate on.+--+-- 'sortBy', 'titleAggregation_sortBy' - The value to sort results by.+--+-- 'sortOrder', 'titleAggregation_sortOrder' - The order to sort results by.+--+-- 'titles', 'titleAggregation_titles' - The finding titles to aggregate on.+--+-- 'vulnerabilityIds', 'titleAggregation_vulnerabilityIds' - The vulnerability IDs of the findings.+newTitleAggregation ::+ TitleAggregation+newTitleAggregation =+ TitleAggregation'+ { resourceType = Prelude.Nothing,+ sortBy = Prelude.Nothing,+ sortOrder = Prelude.Nothing,+ titles = Prelude.Nothing,+ vulnerabilityIds = Prelude.Nothing+ }++-- | The resource type to aggregate on.+titleAggregation_resourceType :: Lens.Lens' TitleAggregation (Prelude.Maybe AggregationResourceType)+titleAggregation_resourceType = Lens.lens (\TitleAggregation' {resourceType} -> resourceType) (\s@TitleAggregation' {} a -> s {resourceType = a} :: TitleAggregation)++-- | The value to sort results by.+titleAggregation_sortBy :: Lens.Lens' TitleAggregation (Prelude.Maybe TitleSortBy)+titleAggregation_sortBy = Lens.lens (\TitleAggregation' {sortBy} -> sortBy) (\s@TitleAggregation' {} a -> s {sortBy = a} :: TitleAggregation)++-- | The order to sort results by.+titleAggregation_sortOrder :: Lens.Lens' TitleAggregation (Prelude.Maybe SortOrder)+titleAggregation_sortOrder = Lens.lens (\TitleAggregation' {sortOrder} -> sortOrder) (\s@TitleAggregation' {} a -> s {sortOrder = a} :: TitleAggregation)++-- | The finding titles to aggregate on.+titleAggregation_titles :: Lens.Lens' TitleAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+titleAggregation_titles = Lens.lens (\TitleAggregation' {titles} -> titles) (\s@TitleAggregation' {} a -> s {titles = a} :: TitleAggregation) Prelude.. Lens.mapping Lens.coerced++-- | The vulnerability IDs of the findings.+titleAggregation_vulnerabilityIds :: Lens.Lens' TitleAggregation (Prelude.Maybe (Prelude.NonEmpty StringFilter))+titleAggregation_vulnerabilityIds = Lens.lens (\TitleAggregation' {vulnerabilityIds} -> vulnerabilityIds) (\s@TitleAggregation' {} a -> s {vulnerabilityIds = a} :: TitleAggregation) Prelude.. Lens.mapping Lens.coerced++instance Prelude.Hashable TitleAggregation where+ hashWithSalt _salt TitleAggregation' {..} =+ _salt+ `Prelude.hashWithSalt` resourceType+ `Prelude.hashWithSalt` sortBy+ `Prelude.hashWithSalt` sortOrder+ `Prelude.hashWithSalt` titles+ `Prelude.hashWithSalt` vulnerabilityIds++instance Prelude.NFData TitleAggregation where+ rnf TitleAggregation' {..} =+ Prelude.rnf resourceType+ `Prelude.seq` Prelude.rnf sortBy+ `Prelude.seq` Prelude.rnf sortOrder+ `Prelude.seq` Prelude.rnf titles+ `Prelude.seq` Prelude.rnf vulnerabilityIds++instance Data.ToJSON TitleAggregation where+ toJSON TitleAggregation' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("resourceType" Data..=) Prelude.<$> resourceType,+ ("sortBy" Data..=) Prelude.<$> sortBy,+ ("sortOrder" Data..=) Prelude.<$> sortOrder,+ ("titles" Data..=) Prelude.<$> titles,+ ("vulnerabilityIds" Data..=)+ Prelude.<$> vulnerabilityIds+ ]+ )
+ gen/Amazonka/Inspector2/Types/TitleAggregationResponse.hs view
@@ -0,0 +1,113 @@+{-# 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.Inspector2.Types.TitleAggregationResponse+-- 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.Inspector2.Types.TitleAggregationResponse where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.SeverityCounts+import qualified Amazonka.Prelude as Prelude++-- | A response that contains details on the results of a finding aggregation+-- by title.+--+-- /See:/ 'newTitleAggregationResponse' smart constructor.+data TitleAggregationResponse = TitleAggregationResponse'+ { -- | The ID of the Amazon Web Services account associated with the findings.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | An object that represent the count of matched findings per severity.+ severityCounts :: Prelude.Maybe SeverityCounts,+ -- | The vulnerability ID of the finding.+ vulnerabilityId :: Prelude.Maybe Prelude.Text,+ -- | The title that the findings were aggregated on.+ title :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TitleAggregationResponse' 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', 'titleAggregationResponse_accountId' - The ID of the Amazon Web Services account associated with the findings.+--+-- 'severityCounts', 'titleAggregationResponse_severityCounts' - An object that represent the count of matched findings per severity.+--+-- 'vulnerabilityId', 'titleAggregationResponse_vulnerabilityId' - The vulnerability ID of the finding.+--+-- 'title', 'titleAggregationResponse_title' - The title that the findings were aggregated on.+newTitleAggregationResponse ::+ -- | 'title'+ Prelude.Text ->+ TitleAggregationResponse+newTitleAggregationResponse pTitle_ =+ TitleAggregationResponse'+ { accountId =+ Prelude.Nothing,+ severityCounts = Prelude.Nothing,+ vulnerabilityId = Prelude.Nothing,+ title = pTitle_+ }++-- | The ID of the Amazon Web Services account associated with the findings.+titleAggregationResponse_accountId :: Lens.Lens' TitleAggregationResponse (Prelude.Maybe Prelude.Text)+titleAggregationResponse_accountId = Lens.lens (\TitleAggregationResponse' {accountId} -> accountId) (\s@TitleAggregationResponse' {} a -> s {accountId = a} :: TitleAggregationResponse)++-- | An object that represent the count of matched findings per severity.+titleAggregationResponse_severityCounts :: Lens.Lens' TitleAggregationResponse (Prelude.Maybe SeverityCounts)+titleAggregationResponse_severityCounts = Lens.lens (\TitleAggregationResponse' {severityCounts} -> severityCounts) (\s@TitleAggregationResponse' {} a -> s {severityCounts = a} :: TitleAggregationResponse)++-- | The vulnerability ID of the finding.+titleAggregationResponse_vulnerabilityId :: Lens.Lens' TitleAggregationResponse (Prelude.Maybe Prelude.Text)+titleAggregationResponse_vulnerabilityId = Lens.lens (\TitleAggregationResponse' {vulnerabilityId} -> vulnerabilityId) (\s@TitleAggregationResponse' {} a -> s {vulnerabilityId = a} :: TitleAggregationResponse)++-- | The title that the findings were aggregated on.+titleAggregationResponse_title :: Lens.Lens' TitleAggregationResponse Prelude.Text+titleAggregationResponse_title = Lens.lens (\TitleAggregationResponse' {title} -> title) (\s@TitleAggregationResponse' {} a -> s {title = a} :: TitleAggregationResponse)++instance Data.FromJSON TitleAggregationResponse where+ parseJSON =+ Data.withObject+ "TitleAggregationResponse"+ ( \x ->+ TitleAggregationResponse'+ Prelude.<$> (x Data..:? "accountId")+ Prelude.<*> (x Data..:? "severityCounts")+ Prelude.<*> (x Data..:? "vulnerabilityId")+ Prelude.<*> (x Data..: "title")+ )++instance Prelude.Hashable TitleAggregationResponse where+ hashWithSalt _salt TitleAggregationResponse' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` severityCounts+ `Prelude.hashWithSalt` vulnerabilityId+ `Prelude.hashWithSalt` title++instance Prelude.NFData TitleAggregationResponse where+ rnf TitleAggregationResponse' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf severityCounts+ `Prelude.seq` Prelude.rnf vulnerabilityId+ `Prelude.seq` Prelude.rnf title
+ gen/Amazonka/Inspector2/Types/TitleSortBy.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.Inspector2.Types.TitleSortBy+-- 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.Inspector2.Types.TitleSortBy+ ( TitleSortBy+ ( ..,+ TitleSortBy_ALL,+ TitleSortBy_CRITICAL,+ TitleSortBy_HIGH+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype TitleSortBy = TitleSortBy'+ { fromTitleSortBy ::+ 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 TitleSortBy_ALL :: TitleSortBy+pattern TitleSortBy_ALL = TitleSortBy' "ALL"++pattern TitleSortBy_CRITICAL :: TitleSortBy+pattern TitleSortBy_CRITICAL = TitleSortBy' "CRITICAL"++pattern TitleSortBy_HIGH :: TitleSortBy+pattern TitleSortBy_HIGH = TitleSortBy' "HIGH"++{-# COMPLETE+ TitleSortBy_ALL,+ TitleSortBy_CRITICAL,+ TitleSortBy_HIGH,+ TitleSortBy'+ #-}
+ gen/Amazonka/Inspector2/Types/Usage.hs view
@@ -0,0 +1,110 @@+{-# 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.Inspector2.Types.Usage+-- 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.Inspector2.Types.Usage where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.Currency+import Amazonka.Inspector2.Types.UsageType+import qualified Amazonka.Prelude as Prelude++-- | Contains usage information about the cost of Amazon Inspector operation.+--+-- /See:/ 'newUsage' smart constructor.+data Usage = Usage'+ { -- | The currency type used when calculating usage data.+ currency :: Prelude.Maybe Currency,+ -- | The estimated monthly cost of Amazon Inspector.+ estimatedMonthlyCost :: Prelude.Maybe Prelude.Double,+ -- | The total of usage.+ total :: Prelude.Maybe Prelude.Double,+ -- | The type scan.+ type' :: Prelude.Maybe UsageType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Usage' 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:+--+-- 'currency', 'usage_currency' - The currency type used when calculating usage data.+--+-- 'estimatedMonthlyCost', 'usage_estimatedMonthlyCost' - The estimated monthly cost of Amazon Inspector.+--+-- 'total', 'usage_total' - The total of usage.+--+-- 'type'', 'usage_type' - The type scan.+newUsage ::+ Usage+newUsage =+ Usage'+ { currency = Prelude.Nothing,+ estimatedMonthlyCost = Prelude.Nothing,+ total = Prelude.Nothing,+ type' = Prelude.Nothing+ }++-- | The currency type used when calculating usage data.+usage_currency :: Lens.Lens' Usage (Prelude.Maybe Currency)+usage_currency = Lens.lens (\Usage' {currency} -> currency) (\s@Usage' {} a -> s {currency = a} :: Usage)++-- | The estimated monthly cost of Amazon Inspector.+usage_estimatedMonthlyCost :: Lens.Lens' Usage (Prelude.Maybe Prelude.Double)+usage_estimatedMonthlyCost = Lens.lens (\Usage' {estimatedMonthlyCost} -> estimatedMonthlyCost) (\s@Usage' {} a -> s {estimatedMonthlyCost = a} :: Usage)++-- | The total of usage.+usage_total :: Lens.Lens' Usage (Prelude.Maybe Prelude.Double)+usage_total = Lens.lens (\Usage' {total} -> total) (\s@Usage' {} a -> s {total = a} :: Usage)++-- | The type scan.+usage_type :: Lens.Lens' Usage (Prelude.Maybe UsageType)+usage_type = Lens.lens (\Usage' {type'} -> type') (\s@Usage' {} a -> s {type' = a} :: Usage)++instance Data.FromJSON Usage where+ parseJSON =+ Data.withObject+ "Usage"+ ( \x ->+ Usage'+ Prelude.<$> (x Data..:? "currency")+ Prelude.<*> (x Data..:? "estimatedMonthlyCost")+ Prelude.<*> (x Data..:? "total")+ Prelude.<*> (x Data..:? "type")+ )++instance Prelude.Hashable Usage where+ hashWithSalt _salt Usage' {..} =+ _salt+ `Prelude.hashWithSalt` currency+ `Prelude.hashWithSalt` estimatedMonthlyCost+ `Prelude.hashWithSalt` total+ `Prelude.hashWithSalt` type'++instance Prelude.NFData Usage where+ rnf Usage' {..} =+ Prelude.rnf currency+ `Prelude.seq` Prelude.rnf estimatedMonthlyCost+ `Prelude.seq` Prelude.rnf total+ `Prelude.seq` Prelude.rnf type'
+ gen/Amazonka/Inspector2/Types/UsageTotal.hs view
@@ -0,0 +1,85 @@+{-# 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.Inspector2.Types.UsageTotal+-- 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.Inspector2.Types.UsageTotal where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.Usage+import qualified Amazonka.Prelude as Prelude++-- | The total of usage for an account ID.+--+-- /See:/ 'newUsageTotal' smart constructor.+data UsageTotal = UsageTotal'+ { -- | The account ID of the account that usage data was retrieved for.+ accountId :: Prelude.Maybe Prelude.Text,+ -- | An object representing the total usage for an account.+ usage :: Prelude.Maybe [Usage]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UsageTotal' 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', 'usageTotal_accountId' - The account ID of the account that usage data was retrieved for.+--+-- 'usage', 'usageTotal_usage' - An object representing the total usage for an account.+newUsageTotal ::+ UsageTotal+newUsageTotal =+ UsageTotal'+ { accountId = Prelude.Nothing,+ usage = Prelude.Nothing+ }++-- | The account ID of the account that usage data was retrieved for.+usageTotal_accountId :: Lens.Lens' UsageTotal (Prelude.Maybe Prelude.Text)+usageTotal_accountId = Lens.lens (\UsageTotal' {accountId} -> accountId) (\s@UsageTotal' {} a -> s {accountId = a} :: UsageTotal)++-- | An object representing the total usage for an account.+usageTotal_usage :: Lens.Lens' UsageTotal (Prelude.Maybe [Usage])+usageTotal_usage = Lens.lens (\UsageTotal' {usage} -> usage) (\s@UsageTotal' {} a -> s {usage = a} :: UsageTotal) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON UsageTotal where+ parseJSON =+ Data.withObject+ "UsageTotal"+ ( \x ->+ UsageTotal'+ Prelude.<$> (x Data..:? "accountId")+ Prelude.<*> (x Data..:? "usage" Data..!= Prelude.mempty)+ )++instance Prelude.Hashable UsageTotal where+ hashWithSalt _salt UsageTotal' {..} =+ _salt+ `Prelude.hashWithSalt` accountId+ `Prelude.hashWithSalt` usage++instance Prelude.NFData UsageTotal where+ rnf UsageTotal' {..} =+ Prelude.rnf accountId+ `Prelude.seq` Prelude.rnf usage
+ gen/Amazonka/Inspector2/Types/UsageType.hs view
@@ -0,0 +1,81 @@+{-# 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.Inspector2.Types.UsageType+-- 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.Inspector2.Types.UsageType+ ( UsageType+ ( ..,+ UsageType_EC2_INSTANCE_HOURS,+ UsageType_ECR_INITIAL_SCAN,+ UsageType_ECR_RESCAN,+ UsageType_LAMBDA_FUNCTION_HOURS+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype UsageType = UsageType'+ { fromUsageType ::+ 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 UsageType_EC2_INSTANCE_HOURS :: UsageType+pattern UsageType_EC2_INSTANCE_HOURS = UsageType' "EC2_INSTANCE_HOURS"++pattern UsageType_ECR_INITIAL_SCAN :: UsageType+pattern UsageType_ECR_INITIAL_SCAN = UsageType' "ECR_INITIAL_SCAN"++pattern UsageType_ECR_RESCAN :: UsageType+pattern UsageType_ECR_RESCAN = UsageType' "ECR_RESCAN"++pattern UsageType_LAMBDA_FUNCTION_HOURS :: UsageType+pattern UsageType_LAMBDA_FUNCTION_HOURS = UsageType' "LAMBDA_FUNCTION_HOURS"++{-# COMPLETE+ UsageType_EC2_INSTANCE_HOURS,+ UsageType_ECR_INITIAL_SCAN,+ UsageType_ECR_RESCAN,+ UsageType_LAMBDA_FUNCTION_HOURS,+ UsageType'+ #-}
+ gen/Amazonka/Inspector2/Types/VulnerablePackage.hs view
@@ -0,0 +1,203 @@+{-# 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.Inspector2.Types.VulnerablePackage+-- 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.Inspector2.Types.VulnerablePackage where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types.PackageManager+import qualified Amazonka.Prelude as Prelude++-- | Information on the vulnerable package identified by a finding.+--+-- /See:/ 'newVulnerablePackage' smart constructor.+data VulnerablePackage = VulnerablePackage'+ { -- | The architecture of the vulnerable package.+ arch :: Prelude.Maybe Prelude.Text,+ -- | The epoch of the vulnerable package.+ epoch :: Prelude.Maybe Prelude.Int,+ -- | The file path of the vulnerable package.+ filePath :: Prelude.Maybe Prelude.Text,+ -- | The version of the package that contains the vulnerability fix.+ fixedInVersion :: Prelude.Maybe Prelude.Text,+ -- | The package manager of the vulnerable package.+ packageManager :: Prelude.Maybe PackageManager,+ -- | The release of the vulnerable package.+ release :: Prelude.Maybe Prelude.Text,+ -- | The code to run in your environment to update packages with a fix+ -- available.+ remediation :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Number (ARN) of the AWS Lambda function affected by+ -- a finding.+ sourceLambdaLayerArn :: Prelude.Maybe Prelude.Text,+ -- | The source layer hash of the vulnerable package.+ sourceLayerHash :: Prelude.Maybe Prelude.Text,+ -- | The name of the vulnerable package.+ name :: Prelude.Text,+ -- | The version of the vulnerable package.+ version :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'VulnerablePackage' 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:+--+-- 'arch', 'vulnerablePackage_arch' - The architecture of the vulnerable package.+--+-- 'epoch', 'vulnerablePackage_epoch' - The epoch of the vulnerable package.+--+-- 'filePath', 'vulnerablePackage_filePath' - The file path of the vulnerable package.+--+-- 'fixedInVersion', 'vulnerablePackage_fixedInVersion' - The version of the package that contains the vulnerability fix.+--+-- 'packageManager', 'vulnerablePackage_packageManager' - The package manager of the vulnerable package.+--+-- 'release', 'vulnerablePackage_release' - The release of the vulnerable package.+--+-- 'remediation', 'vulnerablePackage_remediation' - The code to run in your environment to update packages with a fix+-- available.+--+-- 'sourceLambdaLayerArn', 'vulnerablePackage_sourceLambdaLayerArn' - The Amazon Resource Number (ARN) of the AWS Lambda function affected by+-- a finding.+--+-- 'sourceLayerHash', 'vulnerablePackage_sourceLayerHash' - The source layer hash of the vulnerable package.+--+-- 'name', 'vulnerablePackage_name' - The name of the vulnerable package.+--+-- 'version', 'vulnerablePackage_version' - The version of the vulnerable package.+newVulnerablePackage ::+ -- | 'name'+ Prelude.Text ->+ -- | 'version'+ Prelude.Text ->+ VulnerablePackage+newVulnerablePackage pName_ pVersion_ =+ VulnerablePackage'+ { arch = Prelude.Nothing,+ epoch = Prelude.Nothing,+ filePath = Prelude.Nothing,+ fixedInVersion = Prelude.Nothing,+ packageManager = Prelude.Nothing,+ release = Prelude.Nothing,+ remediation = Prelude.Nothing,+ sourceLambdaLayerArn = Prelude.Nothing,+ sourceLayerHash = Prelude.Nothing,+ name = pName_,+ version = pVersion_+ }++-- | The architecture of the vulnerable package.+vulnerablePackage_arch :: Lens.Lens' VulnerablePackage (Prelude.Maybe Prelude.Text)+vulnerablePackage_arch = Lens.lens (\VulnerablePackage' {arch} -> arch) (\s@VulnerablePackage' {} a -> s {arch = a} :: VulnerablePackage)++-- | The epoch of the vulnerable package.+vulnerablePackage_epoch :: Lens.Lens' VulnerablePackage (Prelude.Maybe Prelude.Int)+vulnerablePackage_epoch = Lens.lens (\VulnerablePackage' {epoch} -> epoch) (\s@VulnerablePackage' {} a -> s {epoch = a} :: VulnerablePackage)++-- | The file path of the vulnerable package.+vulnerablePackage_filePath :: Lens.Lens' VulnerablePackage (Prelude.Maybe Prelude.Text)+vulnerablePackage_filePath = Lens.lens (\VulnerablePackage' {filePath} -> filePath) (\s@VulnerablePackage' {} a -> s {filePath = a} :: VulnerablePackage)++-- | The version of the package that contains the vulnerability fix.+vulnerablePackage_fixedInVersion :: Lens.Lens' VulnerablePackage (Prelude.Maybe Prelude.Text)+vulnerablePackage_fixedInVersion = Lens.lens (\VulnerablePackage' {fixedInVersion} -> fixedInVersion) (\s@VulnerablePackage' {} a -> s {fixedInVersion = a} :: VulnerablePackage)++-- | The package manager of the vulnerable package.+vulnerablePackage_packageManager :: Lens.Lens' VulnerablePackage (Prelude.Maybe PackageManager)+vulnerablePackage_packageManager = Lens.lens (\VulnerablePackage' {packageManager} -> packageManager) (\s@VulnerablePackage' {} a -> s {packageManager = a} :: VulnerablePackage)++-- | The release of the vulnerable package.+vulnerablePackage_release :: Lens.Lens' VulnerablePackage (Prelude.Maybe Prelude.Text)+vulnerablePackage_release = Lens.lens (\VulnerablePackage' {release} -> release) (\s@VulnerablePackage' {} a -> s {release = a} :: VulnerablePackage)++-- | The code to run in your environment to update packages with a fix+-- available.+vulnerablePackage_remediation :: Lens.Lens' VulnerablePackage (Prelude.Maybe Prelude.Text)+vulnerablePackage_remediation = Lens.lens (\VulnerablePackage' {remediation} -> remediation) (\s@VulnerablePackage' {} a -> s {remediation = a} :: VulnerablePackage)++-- | The Amazon Resource Number (ARN) of the AWS Lambda function affected by+-- a finding.+vulnerablePackage_sourceLambdaLayerArn :: Lens.Lens' VulnerablePackage (Prelude.Maybe Prelude.Text)+vulnerablePackage_sourceLambdaLayerArn = Lens.lens (\VulnerablePackage' {sourceLambdaLayerArn} -> sourceLambdaLayerArn) (\s@VulnerablePackage' {} a -> s {sourceLambdaLayerArn = a} :: VulnerablePackage)++-- | The source layer hash of the vulnerable package.+vulnerablePackage_sourceLayerHash :: Lens.Lens' VulnerablePackage (Prelude.Maybe Prelude.Text)+vulnerablePackage_sourceLayerHash = Lens.lens (\VulnerablePackage' {sourceLayerHash} -> sourceLayerHash) (\s@VulnerablePackage' {} a -> s {sourceLayerHash = a} :: VulnerablePackage)++-- | The name of the vulnerable package.+vulnerablePackage_name :: Lens.Lens' VulnerablePackage Prelude.Text+vulnerablePackage_name = Lens.lens (\VulnerablePackage' {name} -> name) (\s@VulnerablePackage' {} a -> s {name = a} :: VulnerablePackage)++-- | The version of the vulnerable package.+vulnerablePackage_version :: Lens.Lens' VulnerablePackage Prelude.Text+vulnerablePackage_version = Lens.lens (\VulnerablePackage' {version} -> version) (\s@VulnerablePackage' {} a -> s {version = a} :: VulnerablePackage)++instance Data.FromJSON VulnerablePackage where+ parseJSON =+ Data.withObject+ "VulnerablePackage"+ ( \x ->+ VulnerablePackage'+ Prelude.<$> (x Data..:? "arch")+ Prelude.<*> (x Data..:? "epoch")+ Prelude.<*> (x Data..:? "filePath")+ Prelude.<*> (x Data..:? "fixedInVersion")+ Prelude.<*> (x Data..:? "packageManager")+ Prelude.<*> (x Data..:? "release")+ Prelude.<*> (x Data..:? "remediation")+ Prelude.<*> (x Data..:? "sourceLambdaLayerArn")+ Prelude.<*> (x Data..:? "sourceLayerHash")+ Prelude.<*> (x Data..: "name")+ Prelude.<*> (x Data..: "version")+ )++instance Prelude.Hashable VulnerablePackage where+ hashWithSalt _salt VulnerablePackage' {..} =+ _salt+ `Prelude.hashWithSalt` arch+ `Prelude.hashWithSalt` epoch+ `Prelude.hashWithSalt` filePath+ `Prelude.hashWithSalt` fixedInVersion+ `Prelude.hashWithSalt` packageManager+ `Prelude.hashWithSalt` release+ `Prelude.hashWithSalt` remediation+ `Prelude.hashWithSalt` sourceLambdaLayerArn+ `Prelude.hashWithSalt` sourceLayerHash+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` version++instance Prelude.NFData VulnerablePackage where+ rnf VulnerablePackage' {..} =+ Prelude.rnf arch+ `Prelude.seq` Prelude.rnf epoch+ `Prelude.seq` Prelude.rnf filePath+ `Prelude.seq` Prelude.rnf fixedInVersion+ `Prelude.seq` Prelude.rnf packageManager+ `Prelude.seq` Prelude.rnf release+ `Prelude.seq` Prelude.rnf remediation+ `Prelude.seq` Prelude.rnf sourceLambdaLayerArn+ `Prelude.seq` Prelude.rnf sourceLayerHash+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf version
+ gen/Amazonka/Inspector2/UntagResource.hs view
@@ -0,0 +1,161 @@+{-# 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.Inspector2.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 resource.+module Amazonka.Inspector2.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.Inspector2.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 Amazon Resource Name (ARN) for the resource to remove tags from.+ resourceArn :: Prelude.Text,+ -- | The tag keys to remove from the resource.+ tagKeys :: [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 Amazon Resource Name (ARN) for the resource to remove tags from.+--+-- 'tagKeys', 'untagResource_tagKeys' - The tag keys to remove from the resource.+newUntagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ UntagResource+newUntagResource pResourceArn_ =+ UntagResource'+ { resourceArn = pResourceArn_,+ tagKeys = Prelude.mempty+ }++-- | The Amazon Resource Name (ARN) for the resource to remove 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 to remove from the resource.+untagResource_tagKeys :: Lens.Lens' UntagResource [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/Inspector2/UpdateConfiguration.hs view
@@ -0,0 +1,164 @@+{-# 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.Inspector2.UpdateConfiguration+-- 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 setting configurations for your Amazon Inspector account. When+-- you use this API as an Amazon Inspector delegated administrator this+-- updates the setting for all accounts you manage. Member accounts in an+-- organization cannot update this setting.+module Amazonka.Inspector2.UpdateConfiguration+ ( -- * Creating a Request+ UpdateConfiguration (..),+ newUpdateConfiguration,++ -- * Request Lenses+ updateConfiguration_ecrConfiguration,++ -- * Destructuring the Response+ UpdateConfigurationResponse (..),+ newUpdateConfigurationResponse,++ -- * Response Lenses+ updateConfigurationResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateConfiguration' smart constructor.+data UpdateConfiguration = UpdateConfiguration'+ { -- | Specifies how the ECR automated re-scan will be updated for your+ -- environment.+ ecrConfiguration :: EcrConfiguration+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateConfiguration' 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:+--+-- 'ecrConfiguration', 'updateConfiguration_ecrConfiguration' - Specifies how the ECR automated re-scan will be updated for your+-- environment.+newUpdateConfiguration ::+ -- | 'ecrConfiguration'+ EcrConfiguration ->+ UpdateConfiguration+newUpdateConfiguration pEcrConfiguration_ =+ UpdateConfiguration'+ { ecrConfiguration =+ pEcrConfiguration_+ }++-- | Specifies how the ECR automated re-scan will be updated for your+-- environment.+updateConfiguration_ecrConfiguration :: Lens.Lens' UpdateConfiguration EcrConfiguration+updateConfiguration_ecrConfiguration = Lens.lens (\UpdateConfiguration' {ecrConfiguration} -> ecrConfiguration) (\s@UpdateConfiguration' {} a -> s {ecrConfiguration = a} :: UpdateConfiguration)++instance Core.AWSRequest UpdateConfiguration where+ type+ AWSResponse UpdateConfiguration =+ UpdateConfigurationResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ UpdateConfigurationResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdateConfiguration where+ hashWithSalt _salt UpdateConfiguration' {..} =+ _salt `Prelude.hashWithSalt` ecrConfiguration++instance Prelude.NFData UpdateConfiguration where+ rnf UpdateConfiguration' {..} =+ Prelude.rnf ecrConfiguration++instance Data.ToHeaders UpdateConfiguration where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateConfiguration where+ toJSON UpdateConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("ecrConfiguration" Data..= ecrConfiguration)+ ]+ )++instance Data.ToPath UpdateConfiguration where+ toPath = Prelude.const "/configuration/update"++instance Data.ToQuery UpdateConfiguration where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateConfigurationResponse' smart constructor.+data UpdateConfigurationResponse = UpdateConfigurationResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateConfigurationResponse' 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', 'updateConfigurationResponse_httpStatus' - The response's http status code.+newUpdateConfigurationResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdateConfigurationResponse+newUpdateConfigurationResponse pHttpStatus_ =+ UpdateConfigurationResponse'+ { httpStatus =+ pHttpStatus_+ }++-- | The response's http status code.+updateConfigurationResponse_httpStatus :: Lens.Lens' UpdateConfigurationResponse Prelude.Int+updateConfigurationResponse_httpStatus = Lens.lens (\UpdateConfigurationResponse' {httpStatus} -> httpStatus) (\s@UpdateConfigurationResponse' {} a -> s {httpStatus = a} :: UpdateConfigurationResponse)++instance Prelude.NFData UpdateConfigurationResponse where+ rnf UpdateConfigurationResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/Inspector2/UpdateFilter.hs view
@@ -0,0 +1,238 @@+{-# 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.Inspector2.UpdateFilter+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Specifies the action that is to be applied to the findings that match+-- the filter.+module Amazonka.Inspector2.UpdateFilter+ ( -- * Creating a Request+ UpdateFilter (..),+ newUpdateFilter,++ -- * Request Lenses+ updateFilter_action,+ updateFilter_description,+ updateFilter_filterCriteria,+ updateFilter_name,+ updateFilter_reason,+ updateFilter_filterArn,++ -- * Destructuring the Response+ UpdateFilterResponse (..),+ newUpdateFilterResponse,++ -- * Response Lenses+ updateFilterResponse_httpStatus,+ updateFilterResponse_arn,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Types+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response++-- | /See:/ 'newUpdateFilter' smart constructor.+data UpdateFilter = UpdateFilter'+ { -- | Specifies the action that is to be applied to the findings that match+ -- the filter.+ action :: Prelude.Maybe FilterAction,+ -- | A description of the filter.+ description :: Prelude.Maybe Prelude.Text,+ -- | Defines the criteria to be update in the filter.+ filterCriteria :: Prelude.Maybe FilterCriteria,+ -- | The name of the filter.+ name :: Prelude.Maybe Prelude.Text,+ -- | The reason the filter was updated.+ reason :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Number (ARN) of the filter to update.+ filterArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateFilter' 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:+--+-- 'action', 'updateFilter_action' - Specifies the action that is to be applied to the findings that match+-- the filter.+--+-- 'description', 'updateFilter_description' - A description of the filter.+--+-- 'filterCriteria', 'updateFilter_filterCriteria' - Defines the criteria to be update in the filter.+--+-- 'name', 'updateFilter_name' - The name of the filter.+--+-- 'reason', 'updateFilter_reason' - The reason the filter was updated.+--+-- 'filterArn', 'updateFilter_filterArn' - The Amazon Resource Number (ARN) of the filter to update.+newUpdateFilter ::+ -- | 'filterArn'+ Prelude.Text ->+ UpdateFilter+newUpdateFilter pFilterArn_ =+ UpdateFilter'+ { action = Prelude.Nothing,+ description = Prelude.Nothing,+ filterCriteria = Prelude.Nothing,+ name = Prelude.Nothing,+ reason = Prelude.Nothing,+ filterArn = pFilterArn_+ }++-- | Specifies the action that is to be applied to the findings that match+-- the filter.+updateFilter_action :: Lens.Lens' UpdateFilter (Prelude.Maybe FilterAction)+updateFilter_action = Lens.lens (\UpdateFilter' {action} -> action) (\s@UpdateFilter' {} a -> s {action = a} :: UpdateFilter)++-- | A description of the filter.+updateFilter_description :: Lens.Lens' UpdateFilter (Prelude.Maybe Prelude.Text)+updateFilter_description = Lens.lens (\UpdateFilter' {description} -> description) (\s@UpdateFilter' {} a -> s {description = a} :: UpdateFilter)++-- | Defines the criteria to be update in the filter.+updateFilter_filterCriteria :: Lens.Lens' UpdateFilter (Prelude.Maybe FilterCriteria)+updateFilter_filterCriteria = Lens.lens (\UpdateFilter' {filterCriteria} -> filterCriteria) (\s@UpdateFilter' {} a -> s {filterCriteria = a} :: UpdateFilter)++-- | The name of the filter.+updateFilter_name :: Lens.Lens' UpdateFilter (Prelude.Maybe Prelude.Text)+updateFilter_name = Lens.lens (\UpdateFilter' {name} -> name) (\s@UpdateFilter' {} a -> s {name = a} :: UpdateFilter)++-- | The reason the filter was updated.+updateFilter_reason :: Lens.Lens' UpdateFilter (Prelude.Maybe Prelude.Text)+updateFilter_reason = Lens.lens (\UpdateFilter' {reason} -> reason) (\s@UpdateFilter' {} a -> s {reason = a} :: UpdateFilter)++-- | The Amazon Resource Number (ARN) of the filter to update.+updateFilter_filterArn :: Lens.Lens' UpdateFilter Prelude.Text+updateFilter_filterArn = Lens.lens (\UpdateFilter' {filterArn} -> filterArn) (\s@UpdateFilter' {} a -> s {filterArn = a} :: UpdateFilter)++instance Core.AWSRequest UpdateFilter where+ type AWSResponse UpdateFilter = UpdateFilterResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UpdateFilterResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "arn")+ )++instance Prelude.Hashable UpdateFilter where+ hashWithSalt _salt UpdateFilter' {..} =+ _salt+ `Prelude.hashWithSalt` action+ `Prelude.hashWithSalt` description+ `Prelude.hashWithSalt` filterCriteria+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` reason+ `Prelude.hashWithSalt` filterArn++instance Prelude.NFData UpdateFilter where+ rnf UpdateFilter' {..} =+ Prelude.rnf action+ `Prelude.seq` Prelude.rnf description+ `Prelude.seq` Prelude.rnf filterCriteria+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf reason+ `Prelude.seq` Prelude.rnf filterArn++instance Data.ToHeaders UpdateFilter where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateFilter where+ toJSON UpdateFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("action" Data..=) Prelude.<$> action,+ ("description" Data..=) Prelude.<$> description,+ ("filterCriteria" Data..=)+ Prelude.<$> filterCriteria,+ ("name" Data..=) Prelude.<$> name,+ ("reason" Data..=) Prelude.<$> reason,+ Prelude.Just ("filterArn" Data..= filterArn)+ ]+ )++instance Data.ToPath UpdateFilter where+ toPath = Prelude.const "/filters/update"++instance Data.ToQuery UpdateFilter where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateFilterResponse' smart constructor.+data UpdateFilterResponse = UpdateFilterResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The Amazon Resource Number (ARN) of the successfully updated filter.+ arn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateFilterResponse' 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', 'updateFilterResponse_httpStatus' - The response's http status code.+--+-- 'arn', 'updateFilterResponse_arn' - The Amazon Resource Number (ARN) of the successfully updated filter.+newUpdateFilterResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'arn'+ Prelude.Text ->+ UpdateFilterResponse+newUpdateFilterResponse pHttpStatus_ pArn_ =+ UpdateFilterResponse'+ { httpStatus = pHttpStatus_,+ arn = pArn_+ }++-- | The response's http status code.+updateFilterResponse_httpStatus :: Lens.Lens' UpdateFilterResponse Prelude.Int+updateFilterResponse_httpStatus = Lens.lens (\UpdateFilterResponse' {httpStatus} -> httpStatus) (\s@UpdateFilterResponse' {} a -> s {httpStatus = a} :: UpdateFilterResponse)++-- | The Amazon Resource Number (ARN) of the successfully updated filter.+updateFilterResponse_arn :: Lens.Lens' UpdateFilterResponse Prelude.Text+updateFilterResponse_arn = Lens.lens (\UpdateFilterResponse' {arn} -> arn) (\s@UpdateFilterResponse' {} a -> s {arn = a} :: UpdateFilterResponse)++instance Prelude.NFData UpdateFilterResponse where+ rnf UpdateFilterResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf arn
+ gen/Amazonka/Inspector2/UpdateOrganizationConfiguration.hs view
@@ -0,0 +1,196 @@+{-# 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.Inspector2.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 configurations for your Amazon Inspector organization.+module Amazonka.Inspector2.UpdateOrganizationConfiguration+ ( -- * Creating a Request+ UpdateOrganizationConfiguration (..),+ newUpdateOrganizationConfiguration,++ -- * Request Lenses+ updateOrganizationConfiguration_autoEnable,++ -- * Destructuring the Response+ UpdateOrganizationConfigurationResponse (..),+ newUpdateOrganizationConfigurationResponse,++ -- * Response Lenses+ updateOrganizationConfigurationResponse_httpStatus,+ updateOrganizationConfigurationResponse_autoEnable,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.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'+ { -- | Defines which scan types are enabled automatically for new members of+ -- your Amazon Inspector organization.+ autoEnable :: AutoEnable+ }+ 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' - Defines which scan types are enabled automatically for new members of+-- your Amazon Inspector organization.+newUpdateOrganizationConfiguration ::+ -- | 'autoEnable'+ AutoEnable ->+ UpdateOrganizationConfiguration+newUpdateOrganizationConfiguration pAutoEnable_ =+ UpdateOrganizationConfiguration'+ { autoEnable =+ pAutoEnable_+ }++-- | Defines which scan types are enabled automatically for new members of+-- your Amazon Inspector organization.+updateOrganizationConfiguration_autoEnable :: Lens.Lens' UpdateOrganizationConfiguration AutoEnable+updateOrganizationConfiguration_autoEnable = Lens.lens (\UpdateOrganizationConfiguration' {autoEnable} -> autoEnable) (\s@UpdateOrganizationConfiguration' {} a -> s {autoEnable = a} :: UpdateOrganizationConfiguration)++instance+ Core.AWSRequest+ UpdateOrganizationConfiguration+ where+ type+ AWSResponse UpdateOrganizationConfiguration =+ UpdateOrganizationConfigurationResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UpdateOrganizationConfigurationResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "autoEnable")+ )++instance+ Prelude.Hashable+ UpdateOrganizationConfiguration+ where+ hashWithSalt+ _salt+ UpdateOrganizationConfiguration' {..} =+ _salt `Prelude.hashWithSalt` autoEnable++instance+ Prelude.NFData+ UpdateOrganizationConfiguration+ where+ rnf UpdateOrganizationConfiguration' {..} =+ Prelude.rnf autoEnable++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+ [Prelude.Just ("autoEnable" Data..= autoEnable)]+ )++instance Data.ToPath UpdateOrganizationConfiguration where+ toPath =+ Prelude.const "/organizationconfiguration/update"++instance Data.ToQuery UpdateOrganizationConfiguration where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateOrganizationConfigurationResponse' smart constructor.+data UpdateOrganizationConfigurationResponse = UpdateOrganizationConfigurationResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The updated status of scan types automatically enabled for new members+ -- of your Amazon Inspector organization.+ autoEnable :: AutoEnable+ }+ 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.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'httpStatus', 'updateOrganizationConfigurationResponse_httpStatus' - The response's http status code.+--+-- 'autoEnable', 'updateOrganizationConfigurationResponse_autoEnable' - The updated status of scan types automatically enabled for new members+-- of your Amazon Inspector organization.+newUpdateOrganizationConfigurationResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'autoEnable'+ AutoEnable ->+ UpdateOrganizationConfigurationResponse+newUpdateOrganizationConfigurationResponse+ pHttpStatus_+ pAutoEnable_ =+ UpdateOrganizationConfigurationResponse'+ { httpStatus =+ pHttpStatus_,+ autoEnable = pAutoEnable_+ }++-- | The response's http status code.+updateOrganizationConfigurationResponse_httpStatus :: Lens.Lens' UpdateOrganizationConfigurationResponse Prelude.Int+updateOrganizationConfigurationResponse_httpStatus = Lens.lens (\UpdateOrganizationConfigurationResponse' {httpStatus} -> httpStatus) (\s@UpdateOrganizationConfigurationResponse' {} a -> s {httpStatus = a} :: UpdateOrganizationConfigurationResponse)++-- | The updated status of scan types automatically enabled for new members+-- of your Amazon Inspector organization.+updateOrganizationConfigurationResponse_autoEnable :: Lens.Lens' UpdateOrganizationConfigurationResponse AutoEnable+updateOrganizationConfigurationResponse_autoEnable = Lens.lens (\UpdateOrganizationConfigurationResponse' {autoEnable} -> autoEnable) (\s@UpdateOrganizationConfigurationResponse' {} a -> s {autoEnable = a} :: UpdateOrganizationConfigurationResponse)++instance+ Prelude.NFData+ UpdateOrganizationConfigurationResponse+ where+ rnf UpdateOrganizationConfigurationResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf autoEnable
+ gen/Amazonka/Inspector2/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.Inspector2.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.Inspector2.Waiters where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import Amazonka.Inspector2.Lens+import Amazonka.Inspector2.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.Inspector2+import Test.Amazonka.Inspector2.Internal+import Test.Tasty++main :: IO ()+main =+ defaultMain $+ testGroup+ "Inspector2"+ [ testGroup "tests" tests,+ testGroup "fixtures" fixtures+ ]
+ test/Test/Amazonka/Gen/Inspector2.hs view
@@ -0,0 +1,678 @@+{-# 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.Inspector2+-- 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.Inspector2 where++import Amazonka.Inspector2+import qualified Data.Proxy as Proxy+import Test.Amazonka.Fixture+import Test.Amazonka.Inspector2.Internal+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"+-- [ requestAssociateMember $+-- newAssociateMember+--+-- , requestBatchGetAccountStatus $+-- newBatchGetAccountStatus+--+-- , requestBatchGetFreeTrialInfo $+-- newBatchGetFreeTrialInfo+--+-- , requestCancelFindingsReport $+-- newCancelFindingsReport+--+-- , requestCreateFilter $+-- newCreateFilter+--+-- , requestCreateFindingsReport $+-- newCreateFindingsReport+--+-- , requestDeleteFilter $+-- newDeleteFilter+--+-- , requestDescribeOrganizationConfiguration $+-- newDescribeOrganizationConfiguration+--+-- , requestDisable $+-- newDisable+--+-- , requestDisableDelegatedAdminAccount $+-- newDisableDelegatedAdminAccount+--+-- , requestDisassociateMember $+-- newDisassociateMember+--+-- , requestEnable $+-- newEnable+--+-- , requestEnableDelegatedAdminAccount $+-- newEnableDelegatedAdminAccount+--+-- , requestGetConfiguration $+-- newGetConfiguration+--+-- , requestGetDelegatedAdminAccount $+-- newGetDelegatedAdminAccount+--+-- , requestGetFindingsReportStatus $+-- newGetFindingsReportStatus+--+-- , requestGetMember $+-- newGetMember+--+-- , requestListAccountPermissions $+-- newListAccountPermissions+--+-- , requestListCoverage $+-- newListCoverage+--+-- , requestListCoverageStatistics $+-- newListCoverageStatistics+--+-- , requestListDelegatedAdminAccounts $+-- newListDelegatedAdminAccounts+--+-- , requestListFilters $+-- newListFilters+--+-- , requestListFindingAggregations $+-- newListFindingAggregations+--+-- , requestListFindings $+-- newListFindings+--+-- , requestListMembers $+-- newListMembers+--+-- , requestListTagsForResource $+-- newListTagsForResource+--+-- , requestListUsageTotals $+-- newListUsageTotals+--+-- , requestTagResource $+-- newTagResource+--+-- , requestUntagResource $+-- newUntagResource+--+-- , requestUpdateConfiguration $+-- newUpdateConfiguration+--+-- , requestUpdateFilter $+-- newUpdateFilter+--+-- , requestUpdateOrganizationConfiguration $+-- newUpdateOrganizationConfiguration+--+-- ]++-- , testGroup "response"+-- [ responseAssociateMember $+-- newAssociateMemberResponse+--+-- , responseBatchGetAccountStatus $+-- newBatchGetAccountStatusResponse+--+-- , responseBatchGetFreeTrialInfo $+-- newBatchGetFreeTrialInfoResponse+--+-- , responseCancelFindingsReport $+-- newCancelFindingsReportResponse+--+-- , responseCreateFilter $+-- newCreateFilterResponse+--+-- , responseCreateFindingsReport $+-- newCreateFindingsReportResponse+--+-- , responseDeleteFilter $+-- newDeleteFilterResponse+--+-- , responseDescribeOrganizationConfiguration $+-- newDescribeOrganizationConfigurationResponse+--+-- , responseDisable $+-- newDisableResponse+--+-- , responseDisableDelegatedAdminAccount $+-- newDisableDelegatedAdminAccountResponse+--+-- , responseDisassociateMember $+-- newDisassociateMemberResponse+--+-- , responseEnable $+-- newEnableResponse+--+-- , responseEnableDelegatedAdminAccount $+-- newEnableDelegatedAdminAccountResponse+--+-- , responseGetConfiguration $+-- newGetConfigurationResponse+--+-- , responseGetDelegatedAdminAccount $+-- newGetDelegatedAdminAccountResponse+--+-- , responseGetFindingsReportStatus $+-- newGetFindingsReportStatusResponse+--+-- , responseGetMember $+-- newGetMemberResponse+--+-- , responseListAccountPermissions $+-- newListAccountPermissionsResponse+--+-- , responseListCoverage $+-- newListCoverageResponse+--+-- , responseListCoverageStatistics $+-- newListCoverageStatisticsResponse+--+-- , responseListDelegatedAdminAccounts $+-- newListDelegatedAdminAccountsResponse+--+-- , responseListFilters $+-- newListFiltersResponse+--+-- , responseListFindingAggregations $+-- newListFindingAggregationsResponse+--+-- , responseListFindings $+-- newListFindingsResponse+--+-- , responseListMembers $+-- newListMembersResponse+--+-- , responseListTagsForResource $+-- newListTagsForResourceResponse+--+-- , responseListUsageTotals $+-- newListUsageTotalsResponse+--+-- , responseTagResource $+-- newTagResourceResponse+--+-- , responseUntagResource $+-- newUntagResourceResponse+--+-- , responseUpdateConfiguration $+-- newUpdateConfigurationResponse+--+-- , responseUpdateFilter $+-- newUpdateFilterResponse+--+-- , responseUpdateOrganizationConfiguration $+-- newUpdateOrganizationConfigurationResponse+--+-- ]+-- ]++-- Requests++requestAssociateMember :: AssociateMember -> TestTree+requestAssociateMember =+ req+ "AssociateMember"+ "fixture/AssociateMember.yaml"++requestBatchGetAccountStatus :: BatchGetAccountStatus -> TestTree+requestBatchGetAccountStatus =+ req+ "BatchGetAccountStatus"+ "fixture/BatchGetAccountStatus.yaml"++requestBatchGetFreeTrialInfo :: BatchGetFreeTrialInfo -> TestTree+requestBatchGetFreeTrialInfo =+ req+ "BatchGetFreeTrialInfo"+ "fixture/BatchGetFreeTrialInfo.yaml"++requestCancelFindingsReport :: CancelFindingsReport -> TestTree+requestCancelFindingsReport =+ req+ "CancelFindingsReport"+ "fixture/CancelFindingsReport.yaml"++requestCreateFilter :: CreateFilter -> TestTree+requestCreateFilter =+ req+ "CreateFilter"+ "fixture/CreateFilter.yaml"++requestCreateFindingsReport :: CreateFindingsReport -> TestTree+requestCreateFindingsReport =+ req+ "CreateFindingsReport"+ "fixture/CreateFindingsReport.yaml"++requestDeleteFilter :: DeleteFilter -> TestTree+requestDeleteFilter =+ req+ "DeleteFilter"+ "fixture/DeleteFilter.yaml"++requestDescribeOrganizationConfiguration :: DescribeOrganizationConfiguration -> TestTree+requestDescribeOrganizationConfiguration =+ req+ "DescribeOrganizationConfiguration"+ "fixture/DescribeOrganizationConfiguration.yaml"++requestDisable :: Disable -> TestTree+requestDisable =+ req+ "Disable"+ "fixture/Disable.yaml"++requestDisableDelegatedAdminAccount :: DisableDelegatedAdminAccount -> TestTree+requestDisableDelegatedAdminAccount =+ req+ "DisableDelegatedAdminAccount"+ "fixture/DisableDelegatedAdminAccount.yaml"++requestDisassociateMember :: DisassociateMember -> TestTree+requestDisassociateMember =+ req+ "DisassociateMember"+ "fixture/DisassociateMember.yaml"++requestEnable :: Enable -> TestTree+requestEnable =+ req+ "Enable"+ "fixture/Enable.yaml"++requestEnableDelegatedAdminAccount :: EnableDelegatedAdminAccount -> TestTree+requestEnableDelegatedAdminAccount =+ req+ "EnableDelegatedAdminAccount"+ "fixture/EnableDelegatedAdminAccount.yaml"++requestGetConfiguration :: GetConfiguration -> TestTree+requestGetConfiguration =+ req+ "GetConfiguration"+ "fixture/GetConfiguration.yaml"++requestGetDelegatedAdminAccount :: GetDelegatedAdminAccount -> TestTree+requestGetDelegatedAdminAccount =+ req+ "GetDelegatedAdminAccount"+ "fixture/GetDelegatedAdminAccount.yaml"++requestGetFindingsReportStatus :: GetFindingsReportStatus -> TestTree+requestGetFindingsReportStatus =+ req+ "GetFindingsReportStatus"+ "fixture/GetFindingsReportStatus.yaml"++requestGetMember :: GetMember -> TestTree+requestGetMember =+ req+ "GetMember"+ "fixture/GetMember.yaml"++requestListAccountPermissions :: ListAccountPermissions -> TestTree+requestListAccountPermissions =+ req+ "ListAccountPermissions"+ "fixture/ListAccountPermissions.yaml"++requestListCoverage :: ListCoverage -> TestTree+requestListCoverage =+ req+ "ListCoverage"+ "fixture/ListCoverage.yaml"++requestListCoverageStatistics :: ListCoverageStatistics -> TestTree+requestListCoverageStatistics =+ req+ "ListCoverageStatistics"+ "fixture/ListCoverageStatistics.yaml"++requestListDelegatedAdminAccounts :: ListDelegatedAdminAccounts -> TestTree+requestListDelegatedAdminAccounts =+ req+ "ListDelegatedAdminAccounts"+ "fixture/ListDelegatedAdminAccounts.yaml"++requestListFilters :: ListFilters -> TestTree+requestListFilters =+ req+ "ListFilters"+ "fixture/ListFilters.yaml"++requestListFindingAggregations :: ListFindingAggregations -> TestTree+requestListFindingAggregations =+ req+ "ListFindingAggregations"+ "fixture/ListFindingAggregations.yaml"++requestListFindings :: ListFindings -> TestTree+requestListFindings =+ req+ "ListFindings"+ "fixture/ListFindings.yaml"++requestListMembers :: ListMembers -> TestTree+requestListMembers =+ req+ "ListMembers"+ "fixture/ListMembers.yaml"++requestListTagsForResource :: ListTagsForResource -> TestTree+requestListTagsForResource =+ req+ "ListTagsForResource"+ "fixture/ListTagsForResource.yaml"++requestListUsageTotals :: ListUsageTotals -> TestTree+requestListUsageTotals =+ req+ "ListUsageTotals"+ "fixture/ListUsageTotals.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+ req+ "TagResource"+ "fixture/TagResource.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+ req+ "UntagResource"+ "fixture/UntagResource.yaml"++requestUpdateConfiguration :: UpdateConfiguration -> TestTree+requestUpdateConfiguration =+ req+ "UpdateConfiguration"+ "fixture/UpdateConfiguration.yaml"++requestUpdateFilter :: UpdateFilter -> TestTree+requestUpdateFilter =+ req+ "UpdateFilter"+ "fixture/UpdateFilter.yaml"++requestUpdateOrganizationConfiguration :: UpdateOrganizationConfiguration -> TestTree+requestUpdateOrganizationConfiguration =+ req+ "UpdateOrganizationConfiguration"+ "fixture/UpdateOrganizationConfiguration.yaml"++-- Responses++responseAssociateMember :: AssociateMemberResponse -> TestTree+responseAssociateMember =+ res+ "AssociateMemberResponse"+ "fixture/AssociateMemberResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy AssociateMember)++responseBatchGetAccountStatus :: BatchGetAccountStatusResponse -> TestTree+responseBatchGetAccountStatus =+ res+ "BatchGetAccountStatusResponse"+ "fixture/BatchGetAccountStatusResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy BatchGetAccountStatus)++responseBatchGetFreeTrialInfo :: BatchGetFreeTrialInfoResponse -> TestTree+responseBatchGetFreeTrialInfo =+ res+ "BatchGetFreeTrialInfoResponse"+ "fixture/BatchGetFreeTrialInfoResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy BatchGetFreeTrialInfo)++responseCancelFindingsReport :: CancelFindingsReportResponse -> TestTree+responseCancelFindingsReport =+ res+ "CancelFindingsReportResponse"+ "fixture/CancelFindingsReportResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CancelFindingsReport)++responseCreateFilter :: CreateFilterResponse -> TestTree+responseCreateFilter =+ res+ "CreateFilterResponse"+ "fixture/CreateFilterResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateFilter)++responseCreateFindingsReport :: CreateFindingsReportResponse -> TestTree+responseCreateFindingsReport =+ res+ "CreateFindingsReportResponse"+ "fixture/CreateFindingsReportResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateFindingsReport)++responseDeleteFilter :: DeleteFilterResponse -> TestTree+responseDeleteFilter =+ res+ "DeleteFilterResponse"+ "fixture/DeleteFilterResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteFilter)++responseDescribeOrganizationConfiguration :: DescribeOrganizationConfigurationResponse -> TestTree+responseDescribeOrganizationConfiguration =+ res+ "DescribeOrganizationConfigurationResponse"+ "fixture/DescribeOrganizationConfigurationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DescribeOrganizationConfiguration)++responseDisable :: DisableResponse -> TestTree+responseDisable =+ res+ "DisableResponse"+ "fixture/DisableResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy Disable)++responseDisableDelegatedAdminAccount :: DisableDelegatedAdminAccountResponse -> TestTree+responseDisableDelegatedAdminAccount =+ res+ "DisableDelegatedAdminAccountResponse"+ "fixture/DisableDelegatedAdminAccountResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DisableDelegatedAdminAccount)++responseDisassociateMember :: DisassociateMemberResponse -> TestTree+responseDisassociateMember =+ res+ "DisassociateMemberResponse"+ "fixture/DisassociateMemberResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DisassociateMember)++responseEnable :: EnableResponse -> TestTree+responseEnable =+ res+ "EnableResponse"+ "fixture/EnableResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy Enable)++responseEnableDelegatedAdminAccount :: EnableDelegatedAdminAccountResponse -> TestTree+responseEnableDelegatedAdminAccount =+ res+ "EnableDelegatedAdminAccountResponse"+ "fixture/EnableDelegatedAdminAccountResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy EnableDelegatedAdminAccount)++responseGetConfiguration :: GetConfigurationResponse -> TestTree+responseGetConfiguration =+ res+ "GetConfigurationResponse"+ "fixture/GetConfigurationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetConfiguration)++responseGetDelegatedAdminAccount :: GetDelegatedAdminAccountResponse -> TestTree+responseGetDelegatedAdminAccount =+ res+ "GetDelegatedAdminAccountResponse"+ "fixture/GetDelegatedAdminAccountResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetDelegatedAdminAccount)++responseGetFindingsReportStatus :: GetFindingsReportStatusResponse -> TestTree+responseGetFindingsReportStatus =+ res+ "GetFindingsReportStatusResponse"+ "fixture/GetFindingsReportStatusResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetFindingsReportStatus)++responseGetMember :: GetMemberResponse -> TestTree+responseGetMember =+ res+ "GetMemberResponse"+ "fixture/GetMemberResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetMember)++responseListAccountPermissions :: ListAccountPermissionsResponse -> TestTree+responseListAccountPermissions =+ res+ "ListAccountPermissionsResponse"+ "fixture/ListAccountPermissionsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListAccountPermissions)++responseListCoverage :: ListCoverageResponse -> TestTree+responseListCoverage =+ res+ "ListCoverageResponse"+ "fixture/ListCoverageResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListCoverage)++responseListCoverageStatistics :: ListCoverageStatisticsResponse -> TestTree+responseListCoverageStatistics =+ res+ "ListCoverageStatisticsResponse"+ "fixture/ListCoverageStatisticsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListCoverageStatistics)++responseListDelegatedAdminAccounts :: ListDelegatedAdminAccountsResponse -> TestTree+responseListDelegatedAdminAccounts =+ res+ "ListDelegatedAdminAccountsResponse"+ "fixture/ListDelegatedAdminAccountsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListDelegatedAdminAccounts)++responseListFilters :: ListFiltersResponse -> TestTree+responseListFilters =+ res+ "ListFiltersResponse"+ "fixture/ListFiltersResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListFilters)++responseListFindingAggregations :: ListFindingAggregationsResponse -> TestTree+responseListFindingAggregations =+ res+ "ListFindingAggregationsResponse"+ "fixture/ListFindingAggregationsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListFindingAggregations)++responseListFindings :: ListFindingsResponse -> TestTree+responseListFindings =+ res+ "ListFindingsResponse"+ "fixture/ListFindingsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListFindings)++responseListMembers :: ListMembersResponse -> TestTree+responseListMembers =+ res+ "ListMembersResponse"+ "fixture/ListMembersResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListMembers)++responseListTagsForResource :: ListTagsForResourceResponse -> TestTree+responseListTagsForResource =+ res+ "ListTagsForResourceResponse"+ "fixture/ListTagsForResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListTagsForResource)++responseListUsageTotals :: ListUsageTotalsResponse -> TestTree+responseListUsageTotals =+ res+ "ListUsageTotalsResponse"+ "fixture/ListUsageTotalsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListUsageTotals)++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)++responseUpdateConfiguration :: UpdateConfigurationResponse -> TestTree+responseUpdateConfiguration =+ res+ "UpdateConfigurationResponse"+ "fixture/UpdateConfigurationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateConfiguration)++responseUpdateFilter :: UpdateFilterResponse -> TestTree+responseUpdateFilter =+ res+ "UpdateFilterResponse"+ "fixture/UpdateFilterResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateFilter)++responseUpdateOrganizationConfiguration :: UpdateOrganizationConfigurationResponse -> TestTree+responseUpdateOrganizationConfiguration =+ res+ "UpdateOrganizationConfigurationResponse"+ "fixture/UpdateOrganizationConfigurationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateOrganizationConfiguration)
+ test/Test/Amazonka/Inspector2.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.Amazonka.Inspector2+-- 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.Inspector2+ ( tests,+ fixtures,+ )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/Inspector2/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module : Test.Amazonka.Inspector2.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.Inspector2.Internal where