amazonka-rum (empty) → 2.0
raw patch · 83 files changed
+8723/−0 lines, 83 filesdep +amazonka-coredep +amazonka-rumdep +amazonka-test
Dependencies added: amazonka-core, amazonka-rum, amazonka-test, base, bytestring, case-insensitive, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +44/−0
- amazonka-rum.cabal +120/−0
- fixture/BatchCreateRumMetricDefinitions.yaml +10/−0
- fixture/BatchCreateRumMetricDefinitionsResponse.proto +0/−0
- fixture/BatchDeleteRumMetricDefinitions.yaml +10/−0
- fixture/BatchDeleteRumMetricDefinitionsResponse.proto +0/−0
- fixture/BatchGetRumMetricDefinitions.yaml +10/−0
- fixture/BatchGetRumMetricDefinitionsResponse.proto +0/−0
- fixture/CreateAppMonitor.yaml +10/−0
- fixture/CreateAppMonitorResponse.proto +0/−0
- fixture/DeleteAppMonitor.yaml +10/−0
- fixture/DeleteAppMonitorResponse.proto +0/−0
- fixture/DeleteRumMetricsDestination.yaml +10/−0
- fixture/DeleteRumMetricsDestinationResponse.proto +0/−0
- fixture/GetAppMonitor.yaml +10/−0
- fixture/GetAppMonitorData.yaml +10/−0
- fixture/GetAppMonitorDataResponse.proto +0/−0
- fixture/GetAppMonitorResponse.proto +0/−0
- fixture/ListAppMonitors.yaml +10/−0
- fixture/ListAppMonitorsResponse.proto +0/−0
- fixture/ListRumMetricsDestinations.yaml +10/−0
- fixture/ListRumMetricsDestinationsResponse.proto +0/−0
- fixture/ListTagsForResource.yaml +10/−0
- fixture/ListTagsForResourceResponse.proto +0/−0
- fixture/PutRumEvents.yaml +10/−0
- fixture/PutRumEventsResponse.proto +0/−0
- fixture/PutRumMetricsDestination.yaml +10/−0
- fixture/PutRumMetricsDestinationResponse.proto +0/−0
- fixture/TagResource.yaml +10/−0
- fixture/TagResourceResponse.proto +0/−0
- fixture/UntagResource.yaml +10/−0
- fixture/UntagResourceResponse.proto +0/−0
- fixture/UpdateAppMonitor.yaml +10/−0
- fixture/UpdateAppMonitorResponse.proto +0/−0
- fixture/UpdateRumMetricDefinition.yaml +10/−0
- fixture/UpdateRumMetricDefinitionResponse.proto +0/−0
- gen/Amazonka/Rum.hs +289/−0
- gen/Amazonka/Rum/BatchCreateRumMetricDefinitions.hs +312/−0
- gen/Amazonka/Rum/BatchDeleteRumMetricDefinitions.hs +285/−0
- gen/Amazonka/Rum/BatchGetRumMetricDefinitions.hs +307/−0
- gen/Amazonka/Rum/CreateAppMonitor.hs +348/−0
- gen/Amazonka/Rum/DeleteAppMonitor.hs +147/−0
- gen/Amazonka/Rum/DeleteRumMetricsDestination.hs +207/−0
- gen/Amazonka/Rum/GetAppMonitor.hs +161/−0
- gen/Amazonka/Rum/GetAppMonitorData.hs +277/−0
- gen/Amazonka/Rum/Lens.hs +272/−0
- gen/Amazonka/Rum/ListAppMonitors.hs +229/−0
- gen/Amazonka/Rum/ListRumMetricsDestinations.hs +262/−0
- gen/Amazonka/Rum/ListTagsForResource.hs +178/−0
- gen/Amazonka/Rum/PutRumEvents.hs +229/−0
- gen/Amazonka/Rum/PutRumMetricsDestination.hs +247/−0
- gen/Amazonka/Rum/TagResource.hs +183/−0
- gen/Amazonka/Rum/Types.hs +318/−0
- gen/Amazonka/Rum/Types/AppMonitor.hs +215/−0
- gen/Amazonka/Rum/Types/AppMonitorConfiguration.hs +312/−0
- gen/Amazonka/Rum/Types/AppMonitorDetails.hs +95/−0
- gen/Amazonka/Rum/Types/AppMonitorSummary.hs +125/−0
- gen/Amazonka/Rum/Types/BatchCreateRumMetricDefinitionsError.hs +120/−0
- gen/Amazonka/Rum/Types/BatchDeleteRumMetricDefinitionsError.hs +120/−0
- gen/Amazonka/Rum/Types/CustomEvents.hs +79/−0
- gen/Amazonka/Rum/Types/CustomEventsStatus.hs +71/−0
- gen/Amazonka/Rum/Types/CwLog.hs +89/−0
- gen/Amazonka/Rum/Types/DataStorage.hs +76/−0
- gen/Amazonka/Rum/Types/MetricDefinition.hs +171/−0
- gen/Amazonka/Rum/Types/MetricDefinitionRequest.hs +390/−0
- gen/Amazonka/Rum/Types/MetricDestination.hs +71/−0
- gen/Amazonka/Rum/Types/MetricDestinationSummary.hs +108/−0
- gen/Amazonka/Rum/Types/QueryFilter.hs +109/−0
- gen/Amazonka/Rum/Types/RumEvent.hs +140/−0
- gen/Amazonka/Rum/Types/StateEnum.hs +76/−0
- gen/Amazonka/Rum/Types/Telemetry.hs +76/−0
- gen/Amazonka/Rum/Types/TimeRange.hs +91/−0
- gen/Amazonka/Rum/Types/UserDetails.hs +90/−0
- gen/Amazonka/Rum/UntagResource.hs +161/−0
- gen/Amazonka/Rum/UpdateAppMonitor.hs +271/−0
- gen/Amazonka/Rum/UpdateRumMetricDefinition.hs +262/−0
- gen/Amazonka/Rum/Waiters.hs +24/−0
- src/.gitkeep +0/−0
- test/Main.hs +23/−0
- test/Test/Amazonka/Gen/Rum.hs +378/−0
- test/Test/Amazonka/Rum.hs +20/−0
- test/Test/Amazonka/Rum/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 CloudWatch RUM SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2018-05-10@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-rum)+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.Rum](http://hackage.haskell.org/package/amazonka-rum/docs/Amazonka-Rum.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-rum` 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-rum.cabal view
@@ -0,0 +1,120 @@+cabal-version: 2.2+name: amazonka-rum+version: 2.0+synopsis: Amazon CloudWatch RUM SDK.+homepage: https://github.com/brendanhay/amazonka+bug-reports: https://github.com/brendanhay/amazonka/issues+license: MPL-2.0+license-file: LICENSE+author: Brendan Hay+maintainer:+ Brendan Hay <brendan.g.hay+amazonka@gmail.com>, Jack Kelly <jack@jackkelly.name>++copyright: Copyright (c) 2013-2023 Brendan Hay+category: AWS+build-type: Simple+extra-source-files:+ fixture/*.proto+ fixture/*.yaml+ README.md+ src/.gitkeep++description:+ Derived from API version @2018-05-10@ 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.Rum.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.Rum" 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-rum++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.Rum+ Amazonka.Rum.BatchCreateRumMetricDefinitions+ Amazonka.Rum.BatchDeleteRumMetricDefinitions+ Amazonka.Rum.BatchGetRumMetricDefinitions+ Amazonka.Rum.CreateAppMonitor+ Amazonka.Rum.DeleteAppMonitor+ Amazonka.Rum.DeleteRumMetricsDestination+ Amazonka.Rum.GetAppMonitor+ Amazonka.Rum.GetAppMonitorData+ Amazonka.Rum.Lens+ Amazonka.Rum.ListAppMonitors+ Amazonka.Rum.ListRumMetricsDestinations+ Amazonka.Rum.ListTagsForResource+ Amazonka.Rum.PutRumEvents+ Amazonka.Rum.PutRumMetricsDestination+ Amazonka.Rum.TagResource+ Amazonka.Rum.Types+ Amazonka.Rum.Types.AppMonitor+ Amazonka.Rum.Types.AppMonitorConfiguration+ Amazonka.Rum.Types.AppMonitorDetails+ Amazonka.Rum.Types.AppMonitorSummary+ Amazonka.Rum.Types.BatchCreateRumMetricDefinitionsError+ Amazonka.Rum.Types.BatchDeleteRumMetricDefinitionsError+ Amazonka.Rum.Types.CustomEvents+ Amazonka.Rum.Types.CustomEventsStatus+ Amazonka.Rum.Types.CwLog+ Amazonka.Rum.Types.DataStorage+ Amazonka.Rum.Types.MetricDefinition+ Amazonka.Rum.Types.MetricDefinitionRequest+ Amazonka.Rum.Types.MetricDestination+ Amazonka.Rum.Types.MetricDestinationSummary+ Amazonka.Rum.Types.QueryFilter+ Amazonka.Rum.Types.RumEvent+ Amazonka.Rum.Types.StateEnum+ Amazonka.Rum.Types.Telemetry+ Amazonka.Rum.Types.TimeRange+ Amazonka.Rum.Types.UserDetails+ Amazonka.Rum.UntagResource+ Amazonka.Rum.UpdateAppMonitor+ Amazonka.Rum.UpdateRumMetricDefinition+ Amazonka.Rum.Waiters++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , base >=4.12 && <5++test-suite amazonka-rum-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.Rum+ Test.Amazonka.Rum+ Test.Amazonka.Rum.Internal++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , amazonka-rum+ , amazonka-test >=2.0 && <2.1+ , base+ , bytestring+ , case-insensitive+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/BatchCreateRumMetricDefinitions.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rum/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: rum.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/BatchCreateRumMetricDefinitionsResponse.proto view
+ fixture/BatchDeleteRumMetricDefinitions.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rum/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: rum.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/BatchDeleteRumMetricDefinitionsResponse.proto view
+ fixture/BatchGetRumMetricDefinitions.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rum/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: rum.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/BatchGetRumMetricDefinitionsResponse.proto view
+ fixture/CreateAppMonitor.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rum/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: rum.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/CreateAppMonitorResponse.proto view
+ fixture/DeleteAppMonitor.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rum/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: rum.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/DeleteAppMonitorResponse.proto view
+ fixture/DeleteRumMetricsDestination.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rum/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: rum.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/DeleteRumMetricsDestinationResponse.proto view
+ fixture/GetAppMonitor.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rum/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: rum.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/GetAppMonitorData.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rum/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: rum.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/GetAppMonitorDataResponse.proto view
+ fixture/GetAppMonitorResponse.proto view
+ fixture/ListAppMonitors.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rum/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: rum.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/ListAppMonitorsResponse.proto view
+ fixture/ListRumMetricsDestinations.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rum/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: rum.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/ListRumMetricsDestinationsResponse.proto view
+ fixture/ListTagsForResource.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rum/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: rum.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/PutRumEvents.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rum/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: rum.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/PutRumEventsResponse.proto view
+ fixture/PutRumMetricsDestination.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rum/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: rum.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/PutRumMetricsDestinationResponse.proto view
+ fixture/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rum/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: rum.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/rum/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: rum.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/UpdateAppMonitor.yaml view
@@ -0,0 +1,10 @@+---+method: PATCH+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rum/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: rum.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/UpdateAppMonitorResponse.proto view
+ fixture/UpdateRumMetricDefinition.yaml view
@@ -0,0 +1,10 @@+---+method: PATCH+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/rum/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: rum.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/UpdateRumMetricDefinitionResponse.proto view
+ gen/Amazonka/Rum.hs view
@@ -0,0 +1,289 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Amazonka.Rum+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Derived from API version @2018-05-10@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- With Amazon CloudWatch RUM, you can perform real-user monitoring to+-- collect client-side data about your web application performance from+-- actual user sessions in real time. The data collected includes page load+-- times, client-side errors, and user behavior. When you view this data,+-- you can see it all aggregated together and also see breakdowns by the+-- browsers and devices that your customers use.+--+-- You can use the collected data to quickly identify and debug client-side+-- performance issues. CloudWatch RUM helps you visualize anomalies in your+-- application performance and find relevant debugging data such as error+-- messages, stack traces, and user sessions. You can also use RUM to+-- understand the range of end-user impact including the number of users,+-- geolocations, and browsers used.+module Amazonka.Rum+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ -- $errors++ -- ** AccessDeniedException+ _AccessDeniedException,++ -- ** ConflictException+ _ConflictException,++ -- ** InternalServerException+ _InternalServerException,++ -- ** ResourceNotFoundException+ _ResourceNotFoundException,++ -- ** ServiceQuotaExceededException+ _ServiceQuotaExceededException,++ -- ** ThrottlingException+ _ThrottlingException,++ -- ** ValidationException+ _ValidationException,++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** BatchCreateRumMetricDefinitions+ BatchCreateRumMetricDefinitions (BatchCreateRumMetricDefinitions'),+ newBatchCreateRumMetricDefinitions,+ BatchCreateRumMetricDefinitionsResponse (BatchCreateRumMetricDefinitionsResponse'),+ newBatchCreateRumMetricDefinitionsResponse,++ -- ** BatchDeleteRumMetricDefinitions+ BatchDeleteRumMetricDefinitions (BatchDeleteRumMetricDefinitions'),+ newBatchDeleteRumMetricDefinitions,+ BatchDeleteRumMetricDefinitionsResponse (BatchDeleteRumMetricDefinitionsResponse'),+ newBatchDeleteRumMetricDefinitionsResponse,++ -- ** BatchGetRumMetricDefinitions (Paginated)+ BatchGetRumMetricDefinitions (BatchGetRumMetricDefinitions'),+ newBatchGetRumMetricDefinitions,+ BatchGetRumMetricDefinitionsResponse (BatchGetRumMetricDefinitionsResponse'),+ newBatchGetRumMetricDefinitionsResponse,++ -- ** CreateAppMonitor+ CreateAppMonitor (CreateAppMonitor'),+ newCreateAppMonitor,+ CreateAppMonitorResponse (CreateAppMonitorResponse'),+ newCreateAppMonitorResponse,++ -- ** DeleteAppMonitor+ DeleteAppMonitor (DeleteAppMonitor'),+ newDeleteAppMonitor,+ DeleteAppMonitorResponse (DeleteAppMonitorResponse'),+ newDeleteAppMonitorResponse,++ -- ** DeleteRumMetricsDestination+ DeleteRumMetricsDestination (DeleteRumMetricsDestination'),+ newDeleteRumMetricsDestination,+ DeleteRumMetricsDestinationResponse (DeleteRumMetricsDestinationResponse'),+ newDeleteRumMetricsDestinationResponse,++ -- ** GetAppMonitor+ GetAppMonitor (GetAppMonitor'),+ newGetAppMonitor,+ GetAppMonitorResponse (GetAppMonitorResponse'),+ newGetAppMonitorResponse,++ -- ** GetAppMonitorData (Paginated)+ GetAppMonitorData (GetAppMonitorData'),+ newGetAppMonitorData,+ GetAppMonitorDataResponse (GetAppMonitorDataResponse'),+ newGetAppMonitorDataResponse,++ -- ** ListAppMonitors (Paginated)+ ListAppMonitors (ListAppMonitors'),+ newListAppMonitors,+ ListAppMonitorsResponse (ListAppMonitorsResponse'),+ newListAppMonitorsResponse,++ -- ** ListRumMetricsDestinations (Paginated)+ ListRumMetricsDestinations (ListRumMetricsDestinations'),+ newListRumMetricsDestinations,+ ListRumMetricsDestinationsResponse (ListRumMetricsDestinationsResponse'),+ newListRumMetricsDestinationsResponse,++ -- ** ListTagsForResource+ ListTagsForResource (ListTagsForResource'),+ newListTagsForResource,+ ListTagsForResourceResponse (ListTagsForResourceResponse'),+ newListTagsForResourceResponse,++ -- ** PutRumEvents+ PutRumEvents (PutRumEvents'),+ newPutRumEvents,+ PutRumEventsResponse (PutRumEventsResponse'),+ newPutRumEventsResponse,++ -- ** PutRumMetricsDestination+ PutRumMetricsDestination (PutRumMetricsDestination'),+ newPutRumMetricsDestination,+ PutRumMetricsDestinationResponse (PutRumMetricsDestinationResponse'),+ newPutRumMetricsDestinationResponse,++ -- ** TagResource+ TagResource (TagResource'),+ newTagResource,+ TagResourceResponse (TagResourceResponse'),+ newTagResourceResponse,++ -- ** UntagResource+ UntagResource (UntagResource'),+ newUntagResource,+ UntagResourceResponse (UntagResourceResponse'),+ newUntagResourceResponse,++ -- ** UpdateAppMonitor+ UpdateAppMonitor (UpdateAppMonitor'),+ newUpdateAppMonitor,+ UpdateAppMonitorResponse (UpdateAppMonitorResponse'),+ newUpdateAppMonitorResponse,++ -- ** UpdateRumMetricDefinition+ UpdateRumMetricDefinition (UpdateRumMetricDefinition'),+ newUpdateRumMetricDefinition,+ UpdateRumMetricDefinitionResponse (UpdateRumMetricDefinitionResponse'),+ newUpdateRumMetricDefinitionResponse,++ -- * Types++ -- ** CustomEventsStatus+ CustomEventsStatus (..),++ -- ** MetricDestination+ MetricDestination (..),++ -- ** StateEnum+ StateEnum (..),++ -- ** Telemetry+ Telemetry (..),++ -- ** AppMonitor+ AppMonitor (AppMonitor'),+ newAppMonitor,++ -- ** AppMonitorConfiguration+ AppMonitorConfiguration (AppMonitorConfiguration'),+ newAppMonitorConfiguration,++ -- ** AppMonitorDetails+ AppMonitorDetails (AppMonitorDetails'),+ newAppMonitorDetails,++ -- ** AppMonitorSummary+ AppMonitorSummary (AppMonitorSummary'),+ newAppMonitorSummary,++ -- ** BatchCreateRumMetricDefinitionsError+ BatchCreateRumMetricDefinitionsError (BatchCreateRumMetricDefinitionsError'),+ newBatchCreateRumMetricDefinitionsError,++ -- ** BatchDeleteRumMetricDefinitionsError+ BatchDeleteRumMetricDefinitionsError (BatchDeleteRumMetricDefinitionsError'),+ newBatchDeleteRumMetricDefinitionsError,++ -- ** CustomEvents+ CustomEvents (CustomEvents'),+ newCustomEvents,++ -- ** CwLog+ CwLog (CwLog'),+ newCwLog,++ -- ** DataStorage+ DataStorage (DataStorage'),+ newDataStorage,++ -- ** MetricDefinition+ MetricDefinition (MetricDefinition'),+ newMetricDefinition,++ -- ** MetricDefinitionRequest+ MetricDefinitionRequest (MetricDefinitionRequest'),+ newMetricDefinitionRequest,++ -- ** MetricDestinationSummary+ MetricDestinationSummary (MetricDestinationSummary'),+ newMetricDestinationSummary,++ -- ** QueryFilter+ QueryFilter (QueryFilter'),+ newQueryFilter,++ -- ** RumEvent+ RumEvent (RumEvent'),+ newRumEvent,++ -- ** TimeRange+ TimeRange (TimeRange'),+ newTimeRange,++ -- ** UserDetails+ UserDetails (UserDetails'),+ newUserDetails,+ )+where++import Amazonka.Rum.BatchCreateRumMetricDefinitions+import Amazonka.Rum.BatchDeleteRumMetricDefinitions+import Amazonka.Rum.BatchGetRumMetricDefinitions+import Amazonka.Rum.CreateAppMonitor+import Amazonka.Rum.DeleteAppMonitor+import Amazonka.Rum.DeleteRumMetricsDestination+import Amazonka.Rum.GetAppMonitor+import Amazonka.Rum.GetAppMonitorData+import Amazonka.Rum.Lens+import Amazonka.Rum.ListAppMonitors+import Amazonka.Rum.ListRumMetricsDestinations+import Amazonka.Rum.ListTagsForResource+import Amazonka.Rum.PutRumEvents+import Amazonka.Rum.PutRumMetricsDestination+import Amazonka.Rum.TagResource+import Amazonka.Rum.Types+import Amazonka.Rum.UntagResource+import Amazonka.Rum.UpdateAppMonitor+import Amazonka.Rum.UpdateRumMetricDefinition+import Amazonka.Rum.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 'Rum'.++-- $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/Rum/BatchCreateRumMetricDefinitions.hs view
@@ -0,0 +1,312 @@+{-# 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.Rum.BatchCreateRumMetricDefinitions+-- 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 extended metrics that you want a CloudWatch RUM app+-- monitor to send to a destination. Valid destinations include CloudWatch+-- and Evidently.+--+-- By default, RUM app monitors send some metrics to CloudWatch. These+-- default metrics are listed in+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-metrics.html CloudWatch metrics that you can collect with CloudWatch RUM>.+--+-- If you also send extended metrics, you can send metrics to Evidently as+-- well as CloudWatch, and you can also optionally send the metrics with+-- additional dimensions. The valid dimension names for the additional+-- dimensions are @BrowserName@, @CountryCode@, @DeviceType@, @FileType@,+-- @OSName@, and @PageId@. For more information, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-vended-metrics.html Extended metrics that you can send to CloudWatch and CloudWatch Evidently>.+--+-- The maximum number of metric definitions that you can specify in one+-- @BatchCreateRumMetricDefinitions@ operation is 200.+--+-- The maximum number of metric definitions that one destination can+-- contain is 2000.+--+-- Extended metrics sent are charged as CloudWatch custom metrics. Each+-- combination of additional dimension name and dimension value counts as a+-- custom metric. For more information, see+-- <https://aws.amazon.com/cloudwatch/pricing/ Amazon CloudWatch Pricing>.+--+-- You must have already created a destination for the metrics before you+-- send them. For more information, see+-- <https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_PutRumMetricsDestination.html PutRumMetricsDestination>.+--+-- If some metric definitions specified in a+-- @BatchCreateRumMetricDefinitions@ operations are not valid, those metric+-- definitions fail and return errors, but all valid metric definitions in+-- the same operation still succeed.+module Amazonka.Rum.BatchCreateRumMetricDefinitions+ ( -- * Creating a Request+ BatchCreateRumMetricDefinitions (..),+ newBatchCreateRumMetricDefinitions,++ -- * Request Lenses+ batchCreateRumMetricDefinitions_destinationArn,+ batchCreateRumMetricDefinitions_appMonitorName,+ batchCreateRumMetricDefinitions_destination,+ batchCreateRumMetricDefinitions_metricDefinitions,++ -- * Destructuring the Response+ BatchCreateRumMetricDefinitionsResponse (..),+ newBatchCreateRumMetricDefinitionsResponse,++ -- * Response Lenses+ batchCreateRumMetricDefinitionsResponse_metricDefinitions,+ batchCreateRumMetricDefinitionsResponse_httpStatus,+ batchCreateRumMetricDefinitionsResponse_errors,+ )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.Rum.Types++-- | /See:/ 'newBatchCreateRumMetricDefinitions' smart constructor.+data BatchCreateRumMetricDefinitions = BatchCreateRumMetricDefinitions'+ { -- | This parameter is required if @Destination@ is @Evidently@. If+ -- @Destination@ is @CloudWatch@, do not use this parameter.+ --+ -- This parameter specifies the ARN of the Evidently experiment that is to+ -- receive the metrics. You must have already defined this experiment as a+ -- valid destination. For more information, see+ -- <https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_PutRumMetricsDestination.html PutRumMetricsDestination>.+ destinationArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the CloudWatch RUM app monitor that is to send the metrics.+ appMonitorName :: Prelude.Text,+ -- | The destination to send the metrics to. Valid values are @CloudWatch@+ -- and @Evidently@. If you specify @Evidently@, you must also specify the+ -- ARN of the CloudWatchEvidently experiment that will receive the metrics+ -- and an IAM role that has permission to write to the experiment.+ destination :: MetricDestination,+ -- | An array of structures which define the metrics that you want to send.+ metricDefinitions :: [MetricDefinitionRequest]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchCreateRumMetricDefinitions' 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:+--+-- 'destinationArn', 'batchCreateRumMetricDefinitions_destinationArn' - This parameter is required if @Destination@ is @Evidently@. If+-- @Destination@ is @CloudWatch@, do not use this parameter.+--+-- This parameter specifies the ARN of the Evidently experiment that is to+-- receive the metrics. You must have already defined this experiment as a+-- valid destination. For more information, see+-- <https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_PutRumMetricsDestination.html PutRumMetricsDestination>.+--+-- 'appMonitorName', 'batchCreateRumMetricDefinitions_appMonitorName' - The name of the CloudWatch RUM app monitor that is to send the metrics.+--+-- 'destination', 'batchCreateRumMetricDefinitions_destination' - The destination to send the metrics to. Valid values are @CloudWatch@+-- and @Evidently@. If you specify @Evidently@, you must also specify the+-- ARN of the CloudWatchEvidently experiment that will receive the metrics+-- and an IAM role that has permission to write to the experiment.+--+-- 'metricDefinitions', 'batchCreateRumMetricDefinitions_metricDefinitions' - An array of structures which define the metrics that you want to send.+newBatchCreateRumMetricDefinitions ::+ -- | 'appMonitorName'+ Prelude.Text ->+ -- | 'destination'+ MetricDestination ->+ BatchCreateRumMetricDefinitions+newBatchCreateRumMetricDefinitions+ pAppMonitorName_+ pDestination_ =+ BatchCreateRumMetricDefinitions'+ { destinationArn =+ Prelude.Nothing,+ appMonitorName = pAppMonitorName_,+ destination = pDestination_,+ metricDefinitions = Prelude.mempty+ }++-- | This parameter is required if @Destination@ is @Evidently@. If+-- @Destination@ is @CloudWatch@, do not use this parameter.+--+-- This parameter specifies the ARN of the Evidently experiment that is to+-- receive the metrics. You must have already defined this experiment as a+-- valid destination. For more information, see+-- <https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_PutRumMetricsDestination.html PutRumMetricsDestination>.+batchCreateRumMetricDefinitions_destinationArn :: Lens.Lens' BatchCreateRumMetricDefinitions (Prelude.Maybe Prelude.Text)+batchCreateRumMetricDefinitions_destinationArn = Lens.lens (\BatchCreateRumMetricDefinitions' {destinationArn} -> destinationArn) (\s@BatchCreateRumMetricDefinitions' {} a -> s {destinationArn = a} :: BatchCreateRumMetricDefinitions)++-- | The name of the CloudWatch RUM app monitor that is to send the metrics.+batchCreateRumMetricDefinitions_appMonitorName :: Lens.Lens' BatchCreateRumMetricDefinitions Prelude.Text+batchCreateRumMetricDefinitions_appMonitorName = Lens.lens (\BatchCreateRumMetricDefinitions' {appMonitorName} -> appMonitorName) (\s@BatchCreateRumMetricDefinitions' {} a -> s {appMonitorName = a} :: BatchCreateRumMetricDefinitions)++-- | The destination to send the metrics to. Valid values are @CloudWatch@+-- and @Evidently@. If you specify @Evidently@, you must also specify the+-- ARN of the CloudWatchEvidently experiment that will receive the metrics+-- and an IAM role that has permission to write to the experiment.+batchCreateRumMetricDefinitions_destination :: Lens.Lens' BatchCreateRumMetricDefinitions MetricDestination+batchCreateRumMetricDefinitions_destination = Lens.lens (\BatchCreateRumMetricDefinitions' {destination} -> destination) (\s@BatchCreateRumMetricDefinitions' {} a -> s {destination = a} :: BatchCreateRumMetricDefinitions)++-- | An array of structures which define the metrics that you want to send.+batchCreateRumMetricDefinitions_metricDefinitions :: Lens.Lens' BatchCreateRumMetricDefinitions [MetricDefinitionRequest]+batchCreateRumMetricDefinitions_metricDefinitions = Lens.lens (\BatchCreateRumMetricDefinitions' {metricDefinitions} -> metricDefinitions) (\s@BatchCreateRumMetricDefinitions' {} a -> s {metricDefinitions = a} :: BatchCreateRumMetricDefinitions) Prelude.. Lens.coerced++instance+ Core.AWSRequest+ BatchCreateRumMetricDefinitions+ where+ type+ AWSResponse BatchCreateRumMetricDefinitions =+ BatchCreateRumMetricDefinitionsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ BatchCreateRumMetricDefinitionsResponse'+ Prelude.<$> ( x+ Data..?> "MetricDefinitions"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..?> "Errors" Core..!@ Prelude.mempty)+ )++instance+ Prelude.Hashable+ BatchCreateRumMetricDefinitions+ where+ hashWithSalt+ _salt+ BatchCreateRumMetricDefinitions' {..} =+ _salt+ `Prelude.hashWithSalt` destinationArn+ `Prelude.hashWithSalt` appMonitorName+ `Prelude.hashWithSalt` destination+ `Prelude.hashWithSalt` metricDefinitions++instance+ Prelude.NFData+ BatchCreateRumMetricDefinitions+ where+ rnf BatchCreateRumMetricDefinitions' {..} =+ Prelude.rnf destinationArn+ `Prelude.seq` Prelude.rnf appMonitorName+ `Prelude.seq` Prelude.rnf destination+ `Prelude.seq` Prelude.rnf metricDefinitions++instance+ Data.ToHeaders+ BatchCreateRumMetricDefinitions+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON BatchCreateRumMetricDefinitions where+ toJSON BatchCreateRumMetricDefinitions' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("DestinationArn" Data..=)+ Prelude.<$> destinationArn,+ Prelude.Just ("Destination" Data..= destination),+ Prelude.Just+ ("MetricDefinitions" Data..= metricDefinitions)+ ]+ )++instance Data.ToPath BatchCreateRumMetricDefinitions where+ toPath BatchCreateRumMetricDefinitions' {..} =+ Prelude.mconcat+ [ "/rummetrics/",+ Data.toBS appMonitorName,+ "/metrics"+ ]++instance Data.ToQuery BatchCreateRumMetricDefinitions where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newBatchCreateRumMetricDefinitionsResponse' smart constructor.+data BatchCreateRumMetricDefinitionsResponse = BatchCreateRumMetricDefinitionsResponse'+ { -- | An array of structures that define the extended metrics.+ metricDefinitions :: Prelude.Maybe [MetricDefinition],+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | An array of error objects, if the operation caused any errors.+ errors :: [BatchCreateRumMetricDefinitionsError]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchCreateRumMetricDefinitionsResponse' 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:+--+-- 'metricDefinitions', 'batchCreateRumMetricDefinitionsResponse_metricDefinitions' - An array of structures that define the extended metrics.+--+-- 'httpStatus', 'batchCreateRumMetricDefinitionsResponse_httpStatus' - The response's http status code.+--+-- 'errors', 'batchCreateRumMetricDefinitionsResponse_errors' - An array of error objects, if the operation caused any errors.+newBatchCreateRumMetricDefinitionsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ BatchCreateRumMetricDefinitionsResponse+newBatchCreateRumMetricDefinitionsResponse+ pHttpStatus_ =+ BatchCreateRumMetricDefinitionsResponse'+ { metricDefinitions =+ Prelude.Nothing,+ httpStatus = pHttpStatus_,+ errors = Prelude.mempty+ }++-- | An array of structures that define the extended metrics.+batchCreateRumMetricDefinitionsResponse_metricDefinitions :: Lens.Lens' BatchCreateRumMetricDefinitionsResponse (Prelude.Maybe [MetricDefinition])+batchCreateRumMetricDefinitionsResponse_metricDefinitions = Lens.lens (\BatchCreateRumMetricDefinitionsResponse' {metricDefinitions} -> metricDefinitions) (\s@BatchCreateRumMetricDefinitionsResponse' {} a -> s {metricDefinitions = a} :: BatchCreateRumMetricDefinitionsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+batchCreateRumMetricDefinitionsResponse_httpStatus :: Lens.Lens' BatchCreateRumMetricDefinitionsResponse Prelude.Int+batchCreateRumMetricDefinitionsResponse_httpStatus = Lens.lens (\BatchCreateRumMetricDefinitionsResponse' {httpStatus} -> httpStatus) (\s@BatchCreateRumMetricDefinitionsResponse' {} a -> s {httpStatus = a} :: BatchCreateRumMetricDefinitionsResponse)++-- | An array of error objects, if the operation caused any errors.+batchCreateRumMetricDefinitionsResponse_errors :: Lens.Lens' BatchCreateRumMetricDefinitionsResponse [BatchCreateRumMetricDefinitionsError]+batchCreateRumMetricDefinitionsResponse_errors = Lens.lens (\BatchCreateRumMetricDefinitionsResponse' {errors} -> errors) (\s@BatchCreateRumMetricDefinitionsResponse' {} a -> s {errors = a} :: BatchCreateRumMetricDefinitionsResponse) Prelude.. Lens.coerced++instance+ Prelude.NFData+ BatchCreateRumMetricDefinitionsResponse+ where+ rnf BatchCreateRumMetricDefinitionsResponse' {..} =+ Prelude.rnf metricDefinitions+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf errors
+ gen/Amazonka/Rum/BatchDeleteRumMetricDefinitions.hs view
@@ -0,0 +1,285 @@+{-# 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.Rum.BatchDeleteRumMetricDefinitions+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Removes the specified metrics from being sent to an extended metrics+-- destination.+--+-- If some metric definition IDs specified in a+-- @BatchDeleteRumMetricDefinitions@ operations are not valid, those metric+-- definitions fail and return errors, but all valid metric definition IDs+-- in the same operation are still deleted.+--+-- The maximum number of metric definitions that you can specify in one+-- @BatchDeleteRumMetricDefinitions@ operation is 200.+module Amazonka.Rum.BatchDeleteRumMetricDefinitions+ ( -- * Creating a Request+ BatchDeleteRumMetricDefinitions (..),+ newBatchDeleteRumMetricDefinitions,++ -- * Request Lenses+ batchDeleteRumMetricDefinitions_destinationArn,+ batchDeleteRumMetricDefinitions_appMonitorName,+ batchDeleteRumMetricDefinitions_destination,+ batchDeleteRumMetricDefinitions_metricDefinitionIds,++ -- * Destructuring the Response+ BatchDeleteRumMetricDefinitionsResponse (..),+ newBatchDeleteRumMetricDefinitionsResponse,++ -- * Response Lenses+ batchDeleteRumMetricDefinitionsResponse_metricDefinitionIds,+ batchDeleteRumMetricDefinitionsResponse_httpStatus,+ batchDeleteRumMetricDefinitionsResponse_errors,+ )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.Rum.Types++-- | /See:/ 'newBatchDeleteRumMetricDefinitions' smart constructor.+data BatchDeleteRumMetricDefinitions = BatchDeleteRumMetricDefinitions'+ { -- | This parameter is required if @Destination@ is @Evidently@. If+ -- @Destination@ is @CloudWatch@, do not use this parameter.+ --+ -- This parameter specifies the ARN of the Evidently experiment that was+ -- receiving the metrics that are being deleted.+ destinationArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the CloudWatch RUM app monitor that is sending these+ -- metrics.+ appMonitorName :: Prelude.Text,+ -- | Defines the destination where you want to stop sending the specified+ -- metrics. Valid values are @CloudWatch@ and @Evidently@. If you specify+ -- @Evidently@, you must also specify the ARN of the CloudWatchEvidently+ -- experiment that is to be the destination and an IAM role that has+ -- permission to write to the experiment.+ destination :: MetricDestination,+ -- | An array of structures which define the metrics that you want to stop+ -- sending.+ metricDefinitionIds :: [Prelude.Text]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchDeleteRumMetricDefinitions' 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:+--+-- 'destinationArn', 'batchDeleteRumMetricDefinitions_destinationArn' - This parameter is required if @Destination@ is @Evidently@. If+-- @Destination@ is @CloudWatch@, do not use this parameter.+--+-- This parameter specifies the ARN of the Evidently experiment that was+-- receiving the metrics that are being deleted.+--+-- 'appMonitorName', 'batchDeleteRumMetricDefinitions_appMonitorName' - The name of the CloudWatch RUM app monitor that is sending these+-- metrics.+--+-- 'destination', 'batchDeleteRumMetricDefinitions_destination' - Defines the destination where you want to stop sending the specified+-- metrics. Valid values are @CloudWatch@ and @Evidently@. If you specify+-- @Evidently@, you must also specify the ARN of the CloudWatchEvidently+-- experiment that is to be the destination and an IAM role that has+-- permission to write to the experiment.+--+-- 'metricDefinitionIds', 'batchDeleteRumMetricDefinitions_metricDefinitionIds' - An array of structures which define the metrics that you want to stop+-- sending.+newBatchDeleteRumMetricDefinitions ::+ -- | 'appMonitorName'+ Prelude.Text ->+ -- | 'destination'+ MetricDestination ->+ BatchDeleteRumMetricDefinitions+newBatchDeleteRumMetricDefinitions+ pAppMonitorName_+ pDestination_ =+ BatchDeleteRumMetricDefinitions'+ { destinationArn =+ Prelude.Nothing,+ appMonitorName = pAppMonitorName_,+ destination = pDestination_,+ metricDefinitionIds = Prelude.mempty+ }++-- | This parameter is required if @Destination@ is @Evidently@. If+-- @Destination@ is @CloudWatch@, do not use this parameter.+--+-- This parameter specifies the ARN of the Evidently experiment that was+-- receiving the metrics that are being deleted.+batchDeleteRumMetricDefinitions_destinationArn :: Lens.Lens' BatchDeleteRumMetricDefinitions (Prelude.Maybe Prelude.Text)+batchDeleteRumMetricDefinitions_destinationArn = Lens.lens (\BatchDeleteRumMetricDefinitions' {destinationArn} -> destinationArn) (\s@BatchDeleteRumMetricDefinitions' {} a -> s {destinationArn = a} :: BatchDeleteRumMetricDefinitions)++-- | The name of the CloudWatch RUM app monitor that is sending these+-- metrics.+batchDeleteRumMetricDefinitions_appMonitorName :: Lens.Lens' BatchDeleteRumMetricDefinitions Prelude.Text+batchDeleteRumMetricDefinitions_appMonitorName = Lens.lens (\BatchDeleteRumMetricDefinitions' {appMonitorName} -> appMonitorName) (\s@BatchDeleteRumMetricDefinitions' {} a -> s {appMonitorName = a} :: BatchDeleteRumMetricDefinitions)++-- | Defines the destination where you want to stop sending the specified+-- metrics. Valid values are @CloudWatch@ and @Evidently@. If you specify+-- @Evidently@, you must also specify the ARN of the CloudWatchEvidently+-- experiment that is to be the destination and an IAM role that has+-- permission to write to the experiment.+batchDeleteRumMetricDefinitions_destination :: Lens.Lens' BatchDeleteRumMetricDefinitions MetricDestination+batchDeleteRumMetricDefinitions_destination = Lens.lens (\BatchDeleteRumMetricDefinitions' {destination} -> destination) (\s@BatchDeleteRumMetricDefinitions' {} a -> s {destination = a} :: BatchDeleteRumMetricDefinitions)++-- | An array of structures which define the metrics that you want to stop+-- sending.+batchDeleteRumMetricDefinitions_metricDefinitionIds :: Lens.Lens' BatchDeleteRumMetricDefinitions [Prelude.Text]+batchDeleteRumMetricDefinitions_metricDefinitionIds = Lens.lens (\BatchDeleteRumMetricDefinitions' {metricDefinitionIds} -> metricDefinitionIds) (\s@BatchDeleteRumMetricDefinitions' {} a -> s {metricDefinitionIds = a} :: BatchDeleteRumMetricDefinitions) Prelude.. Lens.coerced++instance+ Core.AWSRequest+ BatchDeleteRumMetricDefinitions+ where+ type+ AWSResponse BatchDeleteRumMetricDefinitions =+ BatchDeleteRumMetricDefinitionsResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ BatchDeleteRumMetricDefinitionsResponse'+ Prelude.<$> ( x+ Data..?> "MetricDefinitionIds"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..?> "Errors" Core..!@ Prelude.mempty)+ )++instance+ Prelude.Hashable+ BatchDeleteRumMetricDefinitions+ where+ hashWithSalt+ _salt+ BatchDeleteRumMetricDefinitions' {..} =+ _salt+ `Prelude.hashWithSalt` destinationArn+ `Prelude.hashWithSalt` appMonitorName+ `Prelude.hashWithSalt` destination+ `Prelude.hashWithSalt` metricDefinitionIds++instance+ Prelude.NFData+ BatchDeleteRumMetricDefinitions+ where+ rnf BatchDeleteRumMetricDefinitions' {..} =+ Prelude.rnf destinationArn+ `Prelude.seq` Prelude.rnf appMonitorName+ `Prelude.seq` Prelude.rnf destination+ `Prelude.seq` Prelude.rnf metricDefinitionIds++instance+ Data.ToHeaders+ BatchDeleteRumMetricDefinitions+ where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath BatchDeleteRumMetricDefinitions where+ toPath BatchDeleteRumMetricDefinitions' {..} =+ Prelude.mconcat+ [ "/rummetrics/",+ Data.toBS appMonitorName,+ "/metrics"+ ]++instance Data.ToQuery BatchDeleteRumMetricDefinitions where+ toQuery BatchDeleteRumMetricDefinitions' {..} =+ Prelude.mconcat+ [ "destinationArn" Data.=: destinationArn,+ "destination" Data.=: destination,+ "metricDefinitionIds"+ Data.=: Data.toQueryList "member" metricDefinitionIds+ ]++-- | /See:/ 'newBatchDeleteRumMetricDefinitionsResponse' smart constructor.+data BatchDeleteRumMetricDefinitionsResponse = BatchDeleteRumMetricDefinitionsResponse'+ { -- | The IDs of the metric definitions that were deleted.+ metricDefinitionIds :: Prelude.Maybe [Prelude.Text],+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | An array of error objects, if the operation caused any errors.+ errors :: [BatchDeleteRumMetricDefinitionsError]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchDeleteRumMetricDefinitionsResponse' 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:+--+-- 'metricDefinitionIds', 'batchDeleteRumMetricDefinitionsResponse_metricDefinitionIds' - The IDs of the metric definitions that were deleted.+--+-- 'httpStatus', 'batchDeleteRumMetricDefinitionsResponse_httpStatus' - The response's http status code.+--+-- 'errors', 'batchDeleteRumMetricDefinitionsResponse_errors' - An array of error objects, if the operation caused any errors.+newBatchDeleteRumMetricDefinitionsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ BatchDeleteRumMetricDefinitionsResponse+newBatchDeleteRumMetricDefinitionsResponse+ pHttpStatus_ =+ BatchDeleteRumMetricDefinitionsResponse'+ { metricDefinitionIds =+ Prelude.Nothing,+ httpStatus = pHttpStatus_,+ errors = Prelude.mempty+ }++-- | The IDs of the metric definitions that were deleted.+batchDeleteRumMetricDefinitionsResponse_metricDefinitionIds :: Lens.Lens' BatchDeleteRumMetricDefinitionsResponse (Prelude.Maybe [Prelude.Text])+batchDeleteRumMetricDefinitionsResponse_metricDefinitionIds = Lens.lens (\BatchDeleteRumMetricDefinitionsResponse' {metricDefinitionIds} -> metricDefinitionIds) (\s@BatchDeleteRumMetricDefinitionsResponse' {} a -> s {metricDefinitionIds = a} :: BatchDeleteRumMetricDefinitionsResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+batchDeleteRumMetricDefinitionsResponse_httpStatus :: Lens.Lens' BatchDeleteRumMetricDefinitionsResponse Prelude.Int+batchDeleteRumMetricDefinitionsResponse_httpStatus = Lens.lens (\BatchDeleteRumMetricDefinitionsResponse' {httpStatus} -> httpStatus) (\s@BatchDeleteRumMetricDefinitionsResponse' {} a -> s {httpStatus = a} :: BatchDeleteRumMetricDefinitionsResponse)++-- | An array of error objects, if the operation caused any errors.+batchDeleteRumMetricDefinitionsResponse_errors :: Lens.Lens' BatchDeleteRumMetricDefinitionsResponse [BatchDeleteRumMetricDefinitionsError]+batchDeleteRumMetricDefinitionsResponse_errors = Lens.lens (\BatchDeleteRumMetricDefinitionsResponse' {errors} -> errors) (\s@BatchDeleteRumMetricDefinitionsResponse' {} a -> s {errors = a} :: BatchDeleteRumMetricDefinitionsResponse) Prelude.. Lens.coerced++instance+ Prelude.NFData+ BatchDeleteRumMetricDefinitionsResponse+ where+ rnf BatchDeleteRumMetricDefinitionsResponse' {..} =+ Prelude.rnf metricDefinitionIds+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf errors
+ gen/Amazonka/Rum/BatchGetRumMetricDefinitions.hs view
@@ -0,0 +1,307 @@+{-# 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.Rum.BatchGetRumMetricDefinitions+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves the list of metrics and dimensions that a RUM app monitor is+-- sending to a single destination.+--+-- This operation returns paginated results.+module Amazonka.Rum.BatchGetRumMetricDefinitions+ ( -- * Creating a Request+ BatchGetRumMetricDefinitions (..),+ newBatchGetRumMetricDefinitions,++ -- * Request Lenses+ batchGetRumMetricDefinitions_destinationArn,+ batchGetRumMetricDefinitions_maxResults,+ batchGetRumMetricDefinitions_nextToken,+ batchGetRumMetricDefinitions_appMonitorName,+ batchGetRumMetricDefinitions_destination,++ -- * Destructuring the Response+ BatchGetRumMetricDefinitionsResponse (..),+ newBatchGetRumMetricDefinitionsResponse,++ -- * Response Lenses+ batchGetRumMetricDefinitionsResponse_metricDefinitions,+ batchGetRumMetricDefinitionsResponse_nextToken,+ batchGetRumMetricDefinitionsResponse_httpStatus,+ )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.Rum.Types++-- | /See:/ 'newBatchGetRumMetricDefinitions' smart constructor.+data BatchGetRumMetricDefinitions = BatchGetRumMetricDefinitions'+ { -- | This parameter is required if @Destination@ is @Evidently@. If+ -- @Destination@ is @CloudWatch@, do not use this parameter.+ --+ -- This parameter specifies the ARN of the Evidently experiment that+ -- corresponds to the destination.+ destinationArn :: Prelude.Maybe Prelude.Text,+ -- | The maximum number of results to return in one operation. The default is+ -- 50. The maximum that you can specify is 100.+ --+ -- To retrieve the remaining results, make another call with the returned+ -- @NextToken@ value.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | Use the token returned by the previous operation to request the next+ -- page of results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The name of the CloudWatch RUM app monitor that is sending the metrics.+ appMonitorName :: Prelude.Text,+ -- | The type of destination that you want to view metrics for. Valid values+ -- are @CloudWatch@ and @Evidently@.+ destination :: MetricDestination+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchGetRumMetricDefinitions' 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:+--+-- 'destinationArn', 'batchGetRumMetricDefinitions_destinationArn' - This parameter is required if @Destination@ is @Evidently@. If+-- @Destination@ is @CloudWatch@, do not use this parameter.+--+-- This parameter specifies the ARN of the Evidently experiment that+-- corresponds to the destination.+--+-- 'maxResults', 'batchGetRumMetricDefinitions_maxResults' - The maximum number of results to return in one operation. The default is+-- 50. The maximum that you can specify is 100.+--+-- To retrieve the remaining results, make another call with the returned+-- @NextToken@ value.+--+-- 'nextToken', 'batchGetRumMetricDefinitions_nextToken' - Use the token returned by the previous operation to request the next+-- page of results.+--+-- 'appMonitorName', 'batchGetRumMetricDefinitions_appMonitorName' - The name of the CloudWatch RUM app monitor that is sending the metrics.+--+-- 'destination', 'batchGetRumMetricDefinitions_destination' - The type of destination that you want to view metrics for. Valid values+-- are @CloudWatch@ and @Evidently@.+newBatchGetRumMetricDefinitions ::+ -- | 'appMonitorName'+ Prelude.Text ->+ -- | 'destination'+ MetricDestination ->+ BatchGetRumMetricDefinitions+newBatchGetRumMetricDefinitions+ pAppMonitorName_+ pDestination_ =+ BatchGetRumMetricDefinitions'+ { destinationArn =+ Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ appMonitorName = pAppMonitorName_,+ destination = pDestination_+ }++-- | This parameter is required if @Destination@ is @Evidently@. If+-- @Destination@ is @CloudWatch@, do not use this parameter.+--+-- This parameter specifies the ARN of the Evidently experiment that+-- corresponds to the destination.+batchGetRumMetricDefinitions_destinationArn :: Lens.Lens' BatchGetRumMetricDefinitions (Prelude.Maybe Prelude.Text)+batchGetRumMetricDefinitions_destinationArn = Lens.lens (\BatchGetRumMetricDefinitions' {destinationArn} -> destinationArn) (\s@BatchGetRumMetricDefinitions' {} a -> s {destinationArn = a} :: BatchGetRumMetricDefinitions)++-- | The maximum number of results to return in one operation. The default is+-- 50. The maximum that you can specify is 100.+--+-- To retrieve the remaining results, make another call with the returned+-- @NextToken@ value.+batchGetRumMetricDefinitions_maxResults :: Lens.Lens' BatchGetRumMetricDefinitions (Prelude.Maybe Prelude.Natural)+batchGetRumMetricDefinitions_maxResults = Lens.lens (\BatchGetRumMetricDefinitions' {maxResults} -> maxResults) (\s@BatchGetRumMetricDefinitions' {} a -> s {maxResults = a} :: BatchGetRumMetricDefinitions)++-- | Use the token returned by the previous operation to request the next+-- page of results.+batchGetRumMetricDefinitions_nextToken :: Lens.Lens' BatchGetRumMetricDefinitions (Prelude.Maybe Prelude.Text)+batchGetRumMetricDefinitions_nextToken = Lens.lens (\BatchGetRumMetricDefinitions' {nextToken} -> nextToken) (\s@BatchGetRumMetricDefinitions' {} a -> s {nextToken = a} :: BatchGetRumMetricDefinitions)++-- | The name of the CloudWatch RUM app monitor that is sending the metrics.+batchGetRumMetricDefinitions_appMonitorName :: Lens.Lens' BatchGetRumMetricDefinitions Prelude.Text+batchGetRumMetricDefinitions_appMonitorName = Lens.lens (\BatchGetRumMetricDefinitions' {appMonitorName} -> appMonitorName) (\s@BatchGetRumMetricDefinitions' {} a -> s {appMonitorName = a} :: BatchGetRumMetricDefinitions)++-- | The type of destination that you want to view metrics for. Valid values+-- are @CloudWatch@ and @Evidently@.+batchGetRumMetricDefinitions_destination :: Lens.Lens' BatchGetRumMetricDefinitions MetricDestination+batchGetRumMetricDefinitions_destination = Lens.lens (\BatchGetRumMetricDefinitions' {destination} -> destination) (\s@BatchGetRumMetricDefinitions' {} a -> s {destination = a} :: BatchGetRumMetricDefinitions)++instance Core.AWSPager BatchGetRumMetricDefinitions where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? batchGetRumMetricDefinitionsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? batchGetRumMetricDefinitionsResponse_metricDefinitions+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& batchGetRumMetricDefinitions_nextToken+ Lens..~ rs+ Lens.^? batchGetRumMetricDefinitionsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest BatchGetRumMetricDefinitions where+ type+ AWSResponse BatchGetRumMetricDefinitions =+ BatchGetRumMetricDefinitionsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ BatchGetRumMetricDefinitionsResponse'+ Prelude.<$> ( x+ Data..?> "MetricDefinitions"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance+ Prelude.Hashable+ BatchGetRumMetricDefinitions+ where+ hashWithSalt _salt BatchGetRumMetricDefinitions' {..} =+ _salt+ `Prelude.hashWithSalt` destinationArn+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` appMonitorName+ `Prelude.hashWithSalt` destination++instance Prelude.NFData BatchGetRumMetricDefinitions where+ rnf BatchGetRumMetricDefinitions' {..} =+ Prelude.rnf destinationArn+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf appMonitorName+ `Prelude.seq` Prelude.rnf destination++instance Data.ToHeaders BatchGetRumMetricDefinitions where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath BatchGetRumMetricDefinitions where+ toPath BatchGetRumMetricDefinitions' {..} =+ Prelude.mconcat+ [ "/rummetrics/",+ Data.toBS appMonitorName,+ "/metrics"+ ]++instance Data.ToQuery BatchGetRumMetricDefinitions where+ toQuery BatchGetRumMetricDefinitions' {..} =+ Prelude.mconcat+ [ "destinationArn" Data.=: destinationArn,+ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken,+ "destination" Data.=: destination+ ]++-- | /See:/ 'newBatchGetRumMetricDefinitionsResponse' smart constructor.+data BatchGetRumMetricDefinitionsResponse = BatchGetRumMetricDefinitionsResponse'+ { -- | An array of structures that display information about the metrics that+ -- are sent by the specified app monitor to the specified destination.+ metricDefinitions :: Prelude.Maybe [MetricDefinition],+ -- | A token that you can use in a subsequent operation to retrieve the next+ -- set of results.+ 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 'BatchGetRumMetricDefinitionsResponse' 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:+--+-- 'metricDefinitions', 'batchGetRumMetricDefinitionsResponse_metricDefinitions' - An array of structures that display information about the metrics that+-- are sent by the specified app monitor to the specified destination.+--+-- 'nextToken', 'batchGetRumMetricDefinitionsResponse_nextToken' - A token that you can use in a subsequent operation to retrieve the next+-- set of results.+--+-- 'httpStatus', 'batchGetRumMetricDefinitionsResponse_httpStatus' - The response's http status code.+newBatchGetRumMetricDefinitionsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ BatchGetRumMetricDefinitionsResponse+newBatchGetRumMetricDefinitionsResponse pHttpStatus_ =+ BatchGetRumMetricDefinitionsResponse'+ { metricDefinitions =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An array of structures that display information about the metrics that+-- are sent by the specified app monitor to the specified destination.+batchGetRumMetricDefinitionsResponse_metricDefinitions :: Lens.Lens' BatchGetRumMetricDefinitionsResponse (Prelude.Maybe [MetricDefinition])+batchGetRumMetricDefinitionsResponse_metricDefinitions = Lens.lens (\BatchGetRumMetricDefinitionsResponse' {metricDefinitions} -> metricDefinitions) (\s@BatchGetRumMetricDefinitionsResponse' {} a -> s {metricDefinitions = a} :: BatchGetRumMetricDefinitionsResponse) Prelude.. Lens.mapping Lens.coerced++-- | A token that you can use in a subsequent operation to retrieve the next+-- set of results.+batchGetRumMetricDefinitionsResponse_nextToken :: Lens.Lens' BatchGetRumMetricDefinitionsResponse (Prelude.Maybe Prelude.Text)+batchGetRumMetricDefinitionsResponse_nextToken = Lens.lens (\BatchGetRumMetricDefinitionsResponse' {nextToken} -> nextToken) (\s@BatchGetRumMetricDefinitionsResponse' {} a -> s {nextToken = a} :: BatchGetRumMetricDefinitionsResponse)++-- | The response's http status code.+batchGetRumMetricDefinitionsResponse_httpStatus :: Lens.Lens' BatchGetRumMetricDefinitionsResponse Prelude.Int+batchGetRumMetricDefinitionsResponse_httpStatus = Lens.lens (\BatchGetRumMetricDefinitionsResponse' {httpStatus} -> httpStatus) (\s@BatchGetRumMetricDefinitionsResponse' {} a -> s {httpStatus = a} :: BatchGetRumMetricDefinitionsResponse)++instance+ Prelude.NFData+ BatchGetRumMetricDefinitionsResponse+ where+ rnf BatchGetRumMetricDefinitionsResponse' {..} =+ Prelude.rnf metricDefinitions+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Rum/CreateAppMonitor.hs view
@@ -0,0 +1,348 @@+{-# 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.Rum.CreateAppMonitor+-- 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 Amazon CloudWatch RUM app monitor, which collects telemetry+-- data from your application and sends that data to RUM. The data includes+-- performance and reliability information such as page load time,+-- client-side errors, and user behavior.+--+-- You use this operation only to create a new app monitor. To update an+-- existing app monitor, use+-- <https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_UpdateAppMonitor.html UpdateAppMonitor>+-- instead.+--+-- After you create an app monitor, sign in to the CloudWatch RUM console+-- to get the JavaScript code snippet to add to your web application. For+-- more information, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-find-code-snippet.html How do I find a code snippet that I\'ve already generated?>+module Amazonka.Rum.CreateAppMonitor+ ( -- * Creating a Request+ CreateAppMonitor (..),+ newCreateAppMonitor,++ -- * Request Lenses+ createAppMonitor_appMonitorConfiguration,+ createAppMonitor_customEvents,+ createAppMonitor_cwLogEnabled,+ createAppMonitor_tags,+ createAppMonitor_domain,+ createAppMonitor_name,++ -- * Destructuring the Response+ CreateAppMonitorResponse (..),+ newCreateAppMonitorResponse,++ -- * Response Lenses+ createAppMonitorResponse_id,+ createAppMonitorResponse_httpStatus,+ )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.Rum.Types++-- | /See:/ 'newCreateAppMonitor' smart constructor.+data CreateAppMonitor = CreateAppMonitor'+ { -- | A structure that contains much of the configuration data for the app+ -- monitor. If you are using Amazon Cognito for authorization, you must+ -- include this structure in your request, and it must include the ID of+ -- the Amazon Cognito identity pool to use for authorization. If you don\'t+ -- include @AppMonitorConfiguration@, you must set up your own+ -- authorization method. For more information, see+ -- <https://docs.aws.amazon.com/monitoring/CloudWatch-RUM-get-started-authorization.html Authorize your application to send data to Amazon Web Services>.+ --+ -- If you omit this argument, the sample rate used for RUM is set to 10% of+ -- the user sessions.+ appMonitorConfiguration :: Prelude.Maybe AppMonitorConfiguration,+ -- | Specifies whether this app monitor allows the web client to define and+ -- send custom events. If you omit this parameter, custom events are+ -- @DISABLED@.+ --+ -- For more information about custom events, see+ -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-custom-events.html Send custom events>.+ customEvents :: Prelude.Maybe CustomEvents,+ -- | Data collected by RUM is kept by RUM for 30 days and then deleted. This+ -- parameter specifies whether RUM sends a copy of this telemetry data to+ -- Amazon CloudWatch Logs in your account. This enables you to keep the+ -- telemetry data for more than 30 days, but it does incur Amazon+ -- CloudWatch Logs charges.+ --+ -- If you omit this parameter, the default is @false@.+ cwLogEnabled :: Prelude.Maybe Prelude.Bool,+ -- | Assigns one or more tags (key-value pairs) to the app monitor.+ --+ -- Tags can help you organize and categorize your resources. You can also+ -- use them to scope user permissions by granting a user permission to+ -- access or change only resources with certain tag values.+ --+ -- Tags don\'t have any semantic meaning to Amazon Web Services and are+ -- interpreted strictly as strings of characters.+ --+ -- You can associate as many as 50 tags with an app monitor.+ --+ -- For more information, see+ -- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services resources>.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The top-level internet domain name for which your application has+ -- administrative authority.+ domain :: Prelude.Text,+ -- | A name for the app monitor.+ name :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateAppMonitor' 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:+--+-- 'appMonitorConfiguration', 'createAppMonitor_appMonitorConfiguration' - A structure that contains much of the configuration data for the app+-- monitor. If you are using Amazon Cognito for authorization, you must+-- include this structure in your request, and it must include the ID of+-- the Amazon Cognito identity pool to use for authorization. If you don\'t+-- include @AppMonitorConfiguration@, you must set up your own+-- authorization method. For more information, see+-- <https://docs.aws.amazon.com/monitoring/CloudWatch-RUM-get-started-authorization.html Authorize your application to send data to Amazon Web Services>.+--+-- If you omit this argument, the sample rate used for RUM is set to 10% of+-- the user sessions.+--+-- 'customEvents', 'createAppMonitor_customEvents' - Specifies whether this app monitor allows the web client to define and+-- send custom events. If you omit this parameter, custom events are+-- @DISABLED@.+--+-- For more information about custom events, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-custom-events.html Send custom events>.+--+-- 'cwLogEnabled', 'createAppMonitor_cwLogEnabled' - Data collected by RUM is kept by RUM for 30 days and then deleted. This+-- parameter specifies whether RUM sends a copy of this telemetry data to+-- Amazon CloudWatch Logs in your account. This enables you to keep the+-- telemetry data for more than 30 days, but it does incur Amazon+-- CloudWatch Logs charges.+--+-- If you omit this parameter, the default is @false@.+--+-- 'tags', 'createAppMonitor_tags' - Assigns one or more tags (key-value pairs) to the app monitor.+--+-- Tags can help you organize and categorize your resources. You can also+-- use them to scope user permissions by granting a user permission to+-- access or change only resources with certain tag values.+--+-- Tags don\'t have any semantic meaning to Amazon Web Services and are+-- interpreted strictly as strings of characters.+--+-- You can associate as many as 50 tags with an app monitor.+--+-- For more information, see+-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services resources>.+--+-- 'domain', 'createAppMonitor_domain' - The top-level internet domain name for which your application has+-- administrative authority.+--+-- 'name', 'createAppMonitor_name' - A name for the app monitor.+newCreateAppMonitor ::+ -- | 'domain'+ Prelude.Text ->+ -- | 'name'+ Prelude.Text ->+ CreateAppMonitor+newCreateAppMonitor pDomain_ pName_ =+ CreateAppMonitor'+ { appMonitorConfiguration =+ Prelude.Nothing,+ customEvents = Prelude.Nothing,+ cwLogEnabled = Prelude.Nothing,+ tags = Prelude.Nothing,+ domain = pDomain_,+ name = pName_+ }++-- | A structure that contains much of the configuration data for the app+-- monitor. If you are using Amazon Cognito for authorization, you must+-- include this structure in your request, and it must include the ID of+-- the Amazon Cognito identity pool to use for authorization. If you don\'t+-- include @AppMonitorConfiguration@, you must set up your own+-- authorization method. For more information, see+-- <https://docs.aws.amazon.com/monitoring/CloudWatch-RUM-get-started-authorization.html Authorize your application to send data to Amazon Web Services>.+--+-- If you omit this argument, the sample rate used for RUM is set to 10% of+-- the user sessions.+createAppMonitor_appMonitorConfiguration :: Lens.Lens' CreateAppMonitor (Prelude.Maybe AppMonitorConfiguration)+createAppMonitor_appMonitorConfiguration = Lens.lens (\CreateAppMonitor' {appMonitorConfiguration} -> appMonitorConfiguration) (\s@CreateAppMonitor' {} a -> s {appMonitorConfiguration = a} :: CreateAppMonitor)++-- | Specifies whether this app monitor allows the web client to define and+-- send custom events. If you omit this parameter, custom events are+-- @DISABLED@.+--+-- For more information about custom events, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-custom-events.html Send custom events>.+createAppMonitor_customEvents :: Lens.Lens' CreateAppMonitor (Prelude.Maybe CustomEvents)+createAppMonitor_customEvents = Lens.lens (\CreateAppMonitor' {customEvents} -> customEvents) (\s@CreateAppMonitor' {} a -> s {customEvents = a} :: CreateAppMonitor)++-- | Data collected by RUM is kept by RUM for 30 days and then deleted. This+-- parameter specifies whether RUM sends a copy of this telemetry data to+-- Amazon CloudWatch Logs in your account. This enables you to keep the+-- telemetry data for more than 30 days, but it does incur Amazon+-- CloudWatch Logs charges.+--+-- If you omit this parameter, the default is @false@.+createAppMonitor_cwLogEnabled :: Lens.Lens' CreateAppMonitor (Prelude.Maybe Prelude.Bool)+createAppMonitor_cwLogEnabled = Lens.lens (\CreateAppMonitor' {cwLogEnabled} -> cwLogEnabled) (\s@CreateAppMonitor' {} a -> s {cwLogEnabled = a} :: CreateAppMonitor)++-- | Assigns one or more tags (key-value pairs) to the app monitor.+--+-- Tags can help you organize and categorize your resources. You can also+-- use them to scope user permissions by granting a user permission to+-- access or change only resources with certain tag values.+--+-- Tags don\'t have any semantic meaning to Amazon Web Services and are+-- interpreted strictly as strings of characters.+--+-- You can associate as many as 50 tags with an app monitor.+--+-- For more information, see+-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services resources>.+createAppMonitor_tags :: Lens.Lens' CreateAppMonitor (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+createAppMonitor_tags = Lens.lens (\CreateAppMonitor' {tags} -> tags) (\s@CreateAppMonitor' {} a -> s {tags = a} :: CreateAppMonitor) Prelude.. Lens.mapping Lens.coerced++-- | The top-level internet domain name for which your application has+-- administrative authority.+createAppMonitor_domain :: Lens.Lens' CreateAppMonitor Prelude.Text+createAppMonitor_domain = Lens.lens (\CreateAppMonitor' {domain} -> domain) (\s@CreateAppMonitor' {} a -> s {domain = a} :: CreateAppMonitor)++-- | A name for the app monitor.+createAppMonitor_name :: Lens.Lens' CreateAppMonitor Prelude.Text+createAppMonitor_name = Lens.lens (\CreateAppMonitor' {name} -> name) (\s@CreateAppMonitor' {} a -> s {name = a} :: CreateAppMonitor)++instance Core.AWSRequest CreateAppMonitor where+ type+ AWSResponse CreateAppMonitor =+ CreateAppMonitorResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateAppMonitorResponse'+ Prelude.<$> (x Data..?> "Id")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable CreateAppMonitor where+ hashWithSalt _salt CreateAppMonitor' {..} =+ _salt+ `Prelude.hashWithSalt` appMonitorConfiguration+ `Prelude.hashWithSalt` customEvents+ `Prelude.hashWithSalt` cwLogEnabled+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` domain+ `Prelude.hashWithSalt` name++instance Prelude.NFData CreateAppMonitor where+ rnf CreateAppMonitor' {..} =+ Prelude.rnf appMonitorConfiguration+ `Prelude.seq` Prelude.rnf customEvents+ `Prelude.seq` Prelude.rnf cwLogEnabled+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf domain+ `Prelude.seq` Prelude.rnf name++instance Data.ToHeaders CreateAppMonitor where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateAppMonitor where+ toJSON CreateAppMonitor' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("AppMonitorConfiguration" Data..=)+ Prelude.<$> appMonitorConfiguration,+ ("CustomEvents" Data..=) Prelude.<$> customEvents,+ ("CwLogEnabled" Data..=) Prelude.<$> cwLogEnabled,+ ("Tags" Data..=) Prelude.<$> tags,+ Prelude.Just ("Domain" Data..= domain),+ Prelude.Just ("Name" Data..= name)+ ]+ )++instance Data.ToPath CreateAppMonitor where+ toPath = Prelude.const "/appmonitor"++instance Data.ToQuery CreateAppMonitor where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateAppMonitorResponse' smart constructor.+data CreateAppMonitorResponse = CreateAppMonitorResponse'+ { -- | The unique ID of the new app monitor.+ id :: 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 'CreateAppMonitorResponse' 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:+--+-- 'id', 'createAppMonitorResponse_id' - The unique ID of the new app monitor.+--+-- 'httpStatus', 'createAppMonitorResponse_httpStatus' - The response's http status code.+newCreateAppMonitorResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ CreateAppMonitorResponse+newCreateAppMonitorResponse pHttpStatus_ =+ CreateAppMonitorResponse'+ { id = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The unique ID of the new app monitor.+createAppMonitorResponse_id :: Lens.Lens' CreateAppMonitorResponse (Prelude.Maybe Prelude.Text)+createAppMonitorResponse_id = Lens.lens (\CreateAppMonitorResponse' {id} -> id) (\s@CreateAppMonitorResponse' {} a -> s {id = a} :: CreateAppMonitorResponse)++-- | The response's http status code.+createAppMonitorResponse_httpStatus :: Lens.Lens' CreateAppMonitorResponse Prelude.Int+createAppMonitorResponse_httpStatus = Lens.lens (\CreateAppMonitorResponse' {httpStatus} -> httpStatus) (\s@CreateAppMonitorResponse' {} a -> s {httpStatus = a} :: CreateAppMonitorResponse)++instance Prelude.NFData CreateAppMonitorResponse where+ rnf CreateAppMonitorResponse' {..} =+ Prelude.rnf id `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Rum/DeleteAppMonitor.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.Rum.DeleteAppMonitor+-- 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 an existing app monitor. This immediately stops the collection+-- of data.+module Amazonka.Rum.DeleteAppMonitor+ ( -- * Creating a Request+ DeleteAppMonitor (..),+ newDeleteAppMonitor,++ -- * Request Lenses+ deleteAppMonitor_name,++ -- * Destructuring the Response+ DeleteAppMonitorResponse (..),+ newDeleteAppMonitorResponse,++ -- * Response Lenses+ deleteAppMonitorResponse_httpStatus,+ )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.Rum.Types++-- | /See:/ 'newDeleteAppMonitor' smart constructor.+data DeleteAppMonitor = DeleteAppMonitor'+ { -- | The name of the app monitor to delete.+ name :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteAppMonitor' 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', 'deleteAppMonitor_name' - The name of the app monitor to delete.+newDeleteAppMonitor ::+ -- | 'name'+ Prelude.Text ->+ DeleteAppMonitor+newDeleteAppMonitor pName_ =+ DeleteAppMonitor' {name = pName_}++-- | The name of the app monitor to delete.+deleteAppMonitor_name :: Lens.Lens' DeleteAppMonitor Prelude.Text+deleteAppMonitor_name = Lens.lens (\DeleteAppMonitor' {name} -> name) (\s@DeleteAppMonitor' {} a -> s {name = a} :: DeleteAppMonitor)++instance Core.AWSRequest DeleteAppMonitor where+ type+ AWSResponse DeleteAppMonitor =+ DeleteAppMonitorResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ DeleteAppMonitorResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeleteAppMonitor where+ hashWithSalt _salt DeleteAppMonitor' {..} =+ _salt `Prelude.hashWithSalt` name++instance Prelude.NFData DeleteAppMonitor where+ rnf DeleteAppMonitor' {..} = Prelude.rnf name++instance Data.ToHeaders DeleteAppMonitor where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DeleteAppMonitor where+ toPath DeleteAppMonitor' {..} =+ Prelude.mconcat ["/appmonitor/", Data.toBS name]++instance Data.ToQuery DeleteAppMonitor where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newDeleteAppMonitorResponse' smart constructor.+data DeleteAppMonitorResponse = DeleteAppMonitorResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteAppMonitorResponse' 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', 'deleteAppMonitorResponse_httpStatus' - The response's http status code.+newDeleteAppMonitorResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteAppMonitorResponse+newDeleteAppMonitorResponse pHttpStatus_ =+ DeleteAppMonitorResponse'+ { httpStatus =+ pHttpStatus_+ }++-- | The response's http status code.+deleteAppMonitorResponse_httpStatus :: Lens.Lens' DeleteAppMonitorResponse Prelude.Int+deleteAppMonitorResponse_httpStatus = Lens.lens (\DeleteAppMonitorResponse' {httpStatus} -> httpStatus) (\s@DeleteAppMonitorResponse' {} a -> s {httpStatus = a} :: DeleteAppMonitorResponse)++instance Prelude.NFData DeleteAppMonitorResponse where+ rnf DeleteAppMonitorResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/Rum/DeleteRumMetricsDestination.hs view
@@ -0,0 +1,207 @@+{-# 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.Rum.DeleteRumMetricsDestination+-- 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 destination for CloudWatch RUM extended metrics, so that the+-- specified app monitor stops sending extended metrics to that+-- destination.+module Amazonka.Rum.DeleteRumMetricsDestination+ ( -- * Creating a Request+ DeleteRumMetricsDestination (..),+ newDeleteRumMetricsDestination,++ -- * Request Lenses+ deleteRumMetricsDestination_destinationArn,+ deleteRumMetricsDestination_appMonitorName,+ deleteRumMetricsDestination_destination,++ -- * Destructuring the Response+ DeleteRumMetricsDestinationResponse (..),+ newDeleteRumMetricsDestinationResponse,++ -- * Response Lenses+ deleteRumMetricsDestinationResponse_httpStatus,+ )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.Rum.Types++-- | /See:/ 'newDeleteRumMetricsDestination' smart constructor.+data DeleteRumMetricsDestination = DeleteRumMetricsDestination'+ { -- | This parameter is required if @Destination@ is @Evidently@. If+ -- @Destination@ is @CloudWatch@, do not use this parameter. This parameter+ -- specifies the ARN of the Evidently experiment that corresponds to the+ -- destination to delete.+ destinationArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the app monitor that is sending metrics to the destination+ -- that you want to delete.+ appMonitorName :: Prelude.Text,+ -- | The type of destination to delete. Valid values are @CloudWatch@ and+ -- @Evidently@.+ destination :: MetricDestination+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteRumMetricsDestination' 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:+--+-- 'destinationArn', 'deleteRumMetricsDestination_destinationArn' - This parameter is required if @Destination@ is @Evidently@. If+-- @Destination@ is @CloudWatch@, do not use this parameter. This parameter+-- specifies the ARN of the Evidently experiment that corresponds to the+-- destination to delete.+--+-- 'appMonitorName', 'deleteRumMetricsDestination_appMonitorName' - The name of the app monitor that is sending metrics to the destination+-- that you want to delete.+--+-- 'destination', 'deleteRumMetricsDestination_destination' - The type of destination to delete. Valid values are @CloudWatch@ and+-- @Evidently@.+newDeleteRumMetricsDestination ::+ -- | 'appMonitorName'+ Prelude.Text ->+ -- | 'destination'+ MetricDestination ->+ DeleteRumMetricsDestination+newDeleteRumMetricsDestination+ pAppMonitorName_+ pDestination_ =+ DeleteRumMetricsDestination'+ { destinationArn =+ Prelude.Nothing,+ appMonitorName = pAppMonitorName_,+ destination = pDestination_+ }++-- | This parameter is required if @Destination@ is @Evidently@. If+-- @Destination@ is @CloudWatch@, do not use this parameter. This parameter+-- specifies the ARN of the Evidently experiment that corresponds to the+-- destination to delete.+deleteRumMetricsDestination_destinationArn :: Lens.Lens' DeleteRumMetricsDestination (Prelude.Maybe Prelude.Text)+deleteRumMetricsDestination_destinationArn = Lens.lens (\DeleteRumMetricsDestination' {destinationArn} -> destinationArn) (\s@DeleteRumMetricsDestination' {} a -> s {destinationArn = a} :: DeleteRumMetricsDestination)++-- | The name of the app monitor that is sending metrics to the destination+-- that you want to delete.+deleteRumMetricsDestination_appMonitorName :: Lens.Lens' DeleteRumMetricsDestination Prelude.Text+deleteRumMetricsDestination_appMonitorName = Lens.lens (\DeleteRumMetricsDestination' {appMonitorName} -> appMonitorName) (\s@DeleteRumMetricsDestination' {} a -> s {appMonitorName = a} :: DeleteRumMetricsDestination)++-- | The type of destination to delete. Valid values are @CloudWatch@ and+-- @Evidently@.+deleteRumMetricsDestination_destination :: Lens.Lens' DeleteRumMetricsDestination MetricDestination+deleteRumMetricsDestination_destination = Lens.lens (\DeleteRumMetricsDestination' {destination} -> destination) (\s@DeleteRumMetricsDestination' {} a -> s {destination = a} :: DeleteRumMetricsDestination)++instance Core.AWSRequest DeleteRumMetricsDestination where+ type+ AWSResponse DeleteRumMetricsDestination =+ DeleteRumMetricsDestinationResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ DeleteRumMetricsDestinationResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeleteRumMetricsDestination where+ hashWithSalt _salt DeleteRumMetricsDestination' {..} =+ _salt+ `Prelude.hashWithSalt` destinationArn+ `Prelude.hashWithSalt` appMonitorName+ `Prelude.hashWithSalt` destination++instance Prelude.NFData DeleteRumMetricsDestination where+ rnf DeleteRumMetricsDestination' {..} =+ Prelude.rnf destinationArn+ `Prelude.seq` Prelude.rnf appMonitorName+ `Prelude.seq` Prelude.rnf destination++instance Data.ToHeaders DeleteRumMetricsDestination where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DeleteRumMetricsDestination where+ toPath DeleteRumMetricsDestination' {..} =+ Prelude.mconcat+ [ "/rummetrics/",+ Data.toBS appMonitorName,+ "/metricsdestination"+ ]++instance Data.ToQuery DeleteRumMetricsDestination where+ toQuery DeleteRumMetricsDestination' {..} =+ Prelude.mconcat+ [ "destinationArn" Data.=: destinationArn,+ "destination" Data.=: destination+ ]++-- | /See:/ 'newDeleteRumMetricsDestinationResponse' smart constructor.+data DeleteRumMetricsDestinationResponse = DeleteRumMetricsDestinationResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteRumMetricsDestinationResponse' 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', 'deleteRumMetricsDestinationResponse_httpStatus' - The response's http status code.+newDeleteRumMetricsDestinationResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteRumMetricsDestinationResponse+newDeleteRumMetricsDestinationResponse pHttpStatus_ =+ DeleteRumMetricsDestinationResponse'+ { httpStatus =+ pHttpStatus_+ }++-- | The response's http status code.+deleteRumMetricsDestinationResponse_httpStatus :: Lens.Lens' DeleteRumMetricsDestinationResponse Prelude.Int+deleteRumMetricsDestinationResponse_httpStatus = Lens.lens (\DeleteRumMetricsDestinationResponse' {httpStatus} -> httpStatus) (\s@DeleteRumMetricsDestinationResponse' {} a -> s {httpStatus = a} :: DeleteRumMetricsDestinationResponse)++instance+ Prelude.NFData+ DeleteRumMetricsDestinationResponse+ where+ rnf DeleteRumMetricsDestinationResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/Rum/GetAppMonitor.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.Rum.GetAppMonitor+-- 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 complete configuration information for one app monitor.+module Amazonka.Rum.GetAppMonitor+ ( -- * Creating a Request+ GetAppMonitor (..),+ newGetAppMonitor,++ -- * Request Lenses+ getAppMonitor_name,++ -- * Destructuring the Response+ GetAppMonitorResponse (..),+ newGetAppMonitorResponse,++ -- * Response Lenses+ getAppMonitorResponse_appMonitor,+ getAppMonitorResponse_httpStatus,+ )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.Rum.Types++-- | /See:/ 'newGetAppMonitor' smart constructor.+data GetAppMonitor = GetAppMonitor'+ { -- | The app monitor to retrieve information for.+ name :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetAppMonitor' 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', 'getAppMonitor_name' - The app monitor to retrieve information for.+newGetAppMonitor ::+ -- | 'name'+ Prelude.Text ->+ GetAppMonitor+newGetAppMonitor pName_ =+ GetAppMonitor' {name = pName_}++-- | The app monitor to retrieve information for.+getAppMonitor_name :: Lens.Lens' GetAppMonitor Prelude.Text+getAppMonitor_name = Lens.lens (\GetAppMonitor' {name} -> name) (\s@GetAppMonitor' {} a -> s {name = a} :: GetAppMonitor)++instance Core.AWSRequest GetAppMonitor where+ type+ AWSResponse GetAppMonitor =+ GetAppMonitorResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetAppMonitorResponse'+ Prelude.<$> (x Data..?> "AppMonitor")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetAppMonitor where+ hashWithSalt _salt GetAppMonitor' {..} =+ _salt `Prelude.hashWithSalt` name++instance Prelude.NFData GetAppMonitor where+ rnf GetAppMonitor' {..} = Prelude.rnf name++instance Data.ToHeaders GetAppMonitor where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath GetAppMonitor where+ toPath GetAppMonitor' {..} =+ Prelude.mconcat ["/appmonitor/", Data.toBS name]++instance Data.ToQuery GetAppMonitor where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetAppMonitorResponse' smart constructor.+data GetAppMonitorResponse = GetAppMonitorResponse'+ { -- | A structure containing all the configuration information for the app+ -- monitor.+ appMonitor :: Prelude.Maybe AppMonitor,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetAppMonitorResponse' 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:+--+-- 'appMonitor', 'getAppMonitorResponse_appMonitor' - A structure containing all the configuration information for the app+-- monitor.+--+-- 'httpStatus', 'getAppMonitorResponse_httpStatus' - The response's http status code.+newGetAppMonitorResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetAppMonitorResponse+newGetAppMonitorResponse pHttpStatus_ =+ GetAppMonitorResponse'+ { appMonitor =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | A structure containing all the configuration information for the app+-- monitor.+getAppMonitorResponse_appMonitor :: Lens.Lens' GetAppMonitorResponse (Prelude.Maybe AppMonitor)+getAppMonitorResponse_appMonitor = Lens.lens (\GetAppMonitorResponse' {appMonitor} -> appMonitor) (\s@GetAppMonitorResponse' {} a -> s {appMonitor = a} :: GetAppMonitorResponse)++-- | The response's http status code.+getAppMonitorResponse_httpStatus :: Lens.Lens' GetAppMonitorResponse Prelude.Int+getAppMonitorResponse_httpStatus = Lens.lens (\GetAppMonitorResponse' {httpStatus} -> httpStatus) (\s@GetAppMonitorResponse' {} a -> s {httpStatus = a} :: GetAppMonitorResponse)++instance Prelude.NFData GetAppMonitorResponse where+ rnf GetAppMonitorResponse' {..} =+ Prelude.rnf appMonitor+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Rum/GetAppMonitorData.hs view
@@ -0,0 +1,277 @@+{-# 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.Rum.GetAppMonitorData+-- 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 raw performance events that RUM has collected from your+-- web application, so that you can do your own processing or analysis of+-- this data.+--+-- This operation returns paginated results.+module Amazonka.Rum.GetAppMonitorData+ ( -- * Creating a Request+ GetAppMonitorData (..),+ newGetAppMonitorData,++ -- * Request Lenses+ getAppMonitorData_filters,+ getAppMonitorData_maxResults,+ getAppMonitorData_nextToken,+ getAppMonitorData_name,+ getAppMonitorData_timeRange,++ -- * Destructuring the Response+ GetAppMonitorDataResponse (..),+ newGetAppMonitorDataResponse,++ -- * Response Lenses+ getAppMonitorDataResponse_events,+ getAppMonitorDataResponse_nextToken,+ getAppMonitorDataResponse_httpStatus,+ )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.Rum.Types++-- | /See:/ 'newGetAppMonitorData' smart constructor.+data GetAppMonitorData = GetAppMonitorData'+ { -- | An array of structures that you can use to filter the results to those+ -- that match one or more sets of key-value pairs that you specify.+ filters :: Prelude.Maybe [QueryFilter],+ -- | The maximum number of results to return in one operation.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | Use the token returned by the previous operation to request the next+ -- page of results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The name of the app monitor that collected the data that you want to+ -- retrieve.+ name :: Prelude.Text,+ -- | A structure that defines the time range that you want to retrieve+ -- results from.+ timeRange :: TimeRange+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetAppMonitorData' 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:+--+-- 'filters', 'getAppMonitorData_filters' - An array of structures that you can use to filter the results to those+-- that match one or more sets of key-value pairs that you specify.+--+-- 'maxResults', 'getAppMonitorData_maxResults' - The maximum number of results to return in one operation.+--+-- 'nextToken', 'getAppMonitorData_nextToken' - Use the token returned by the previous operation to request the next+-- page of results.+--+-- 'name', 'getAppMonitorData_name' - The name of the app monitor that collected the data that you want to+-- retrieve.+--+-- 'timeRange', 'getAppMonitorData_timeRange' - A structure that defines the time range that you want to retrieve+-- results from.+newGetAppMonitorData ::+ -- | 'name'+ Prelude.Text ->+ -- | 'timeRange'+ TimeRange ->+ GetAppMonitorData+newGetAppMonitorData pName_ pTimeRange_ =+ GetAppMonitorData'+ { filters = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ name = pName_,+ timeRange = pTimeRange_+ }++-- | An array of structures that you can use to filter the results to those+-- that match one or more sets of key-value pairs that you specify.+getAppMonitorData_filters :: Lens.Lens' GetAppMonitorData (Prelude.Maybe [QueryFilter])+getAppMonitorData_filters = Lens.lens (\GetAppMonitorData' {filters} -> filters) (\s@GetAppMonitorData' {} a -> s {filters = a} :: GetAppMonitorData) Prelude.. Lens.mapping Lens.coerced++-- | The maximum number of results to return in one operation.+getAppMonitorData_maxResults :: Lens.Lens' GetAppMonitorData (Prelude.Maybe Prelude.Natural)+getAppMonitorData_maxResults = Lens.lens (\GetAppMonitorData' {maxResults} -> maxResults) (\s@GetAppMonitorData' {} a -> s {maxResults = a} :: GetAppMonitorData)++-- | Use the token returned by the previous operation to request the next+-- page of results.+getAppMonitorData_nextToken :: Lens.Lens' GetAppMonitorData (Prelude.Maybe Prelude.Text)+getAppMonitorData_nextToken = Lens.lens (\GetAppMonitorData' {nextToken} -> nextToken) (\s@GetAppMonitorData' {} a -> s {nextToken = a} :: GetAppMonitorData)++-- | The name of the app monitor that collected the data that you want to+-- retrieve.+getAppMonitorData_name :: Lens.Lens' GetAppMonitorData Prelude.Text+getAppMonitorData_name = Lens.lens (\GetAppMonitorData' {name} -> name) (\s@GetAppMonitorData' {} a -> s {name = a} :: GetAppMonitorData)++-- | A structure that defines the time range that you want to retrieve+-- results from.+getAppMonitorData_timeRange :: Lens.Lens' GetAppMonitorData TimeRange+getAppMonitorData_timeRange = Lens.lens (\GetAppMonitorData' {timeRange} -> timeRange) (\s@GetAppMonitorData' {} a -> s {timeRange = a} :: GetAppMonitorData)++instance Core.AWSPager GetAppMonitorData where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? getAppMonitorDataResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? getAppMonitorDataResponse_events+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& getAppMonitorData_nextToken+ Lens..~ rs+ Lens.^? getAppMonitorDataResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest GetAppMonitorData where+ type+ AWSResponse GetAppMonitorData =+ GetAppMonitorDataResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetAppMonitorDataResponse'+ Prelude.<$> (x Data..?> "Events" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetAppMonitorData where+ hashWithSalt _salt GetAppMonitorData' {..} =+ _salt+ `Prelude.hashWithSalt` filters+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` timeRange++instance Prelude.NFData GetAppMonitorData where+ rnf GetAppMonitorData' {..} =+ Prelude.rnf filters+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf timeRange++instance Data.ToHeaders GetAppMonitorData where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON GetAppMonitorData where+ toJSON GetAppMonitorData' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("Filters" Data..=) Prelude.<$> filters,+ ("MaxResults" Data..=) Prelude.<$> maxResults,+ ("NextToken" Data..=) Prelude.<$> nextToken,+ Prelude.Just ("TimeRange" Data..= timeRange)+ ]+ )++instance Data.ToPath GetAppMonitorData where+ toPath GetAppMonitorData' {..} =+ Prelude.mconcat+ ["/appmonitor/", Data.toBS name, "/data"]++instance Data.ToQuery GetAppMonitorData where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetAppMonitorDataResponse' smart constructor.+data GetAppMonitorDataResponse = GetAppMonitorDataResponse'+ { -- | The events that RUM collected that match your request.+ events :: Prelude.Maybe [Prelude.Text],+ -- | A token that you can use in a subsequent operation to retrieve the next+ -- set of results.+ 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 'GetAppMonitorDataResponse' 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:+--+-- 'events', 'getAppMonitorDataResponse_events' - The events that RUM collected that match your request.+--+-- 'nextToken', 'getAppMonitorDataResponse_nextToken' - A token that you can use in a subsequent operation to retrieve the next+-- set of results.+--+-- 'httpStatus', 'getAppMonitorDataResponse_httpStatus' - The response's http status code.+newGetAppMonitorDataResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetAppMonitorDataResponse+newGetAppMonitorDataResponse pHttpStatus_ =+ GetAppMonitorDataResponse'+ { events =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The events that RUM collected that match your request.+getAppMonitorDataResponse_events :: Lens.Lens' GetAppMonitorDataResponse (Prelude.Maybe [Prelude.Text])+getAppMonitorDataResponse_events = Lens.lens (\GetAppMonitorDataResponse' {events} -> events) (\s@GetAppMonitorDataResponse' {} a -> s {events = a} :: GetAppMonitorDataResponse) Prelude.. Lens.mapping Lens.coerced++-- | A token that you can use in a subsequent operation to retrieve the next+-- set of results.+getAppMonitorDataResponse_nextToken :: Lens.Lens' GetAppMonitorDataResponse (Prelude.Maybe Prelude.Text)+getAppMonitorDataResponse_nextToken = Lens.lens (\GetAppMonitorDataResponse' {nextToken} -> nextToken) (\s@GetAppMonitorDataResponse' {} a -> s {nextToken = a} :: GetAppMonitorDataResponse)++-- | The response's http status code.+getAppMonitorDataResponse_httpStatus :: Lens.Lens' GetAppMonitorDataResponse Prelude.Int+getAppMonitorDataResponse_httpStatus = Lens.lens (\GetAppMonitorDataResponse' {httpStatus} -> httpStatus) (\s@GetAppMonitorDataResponse' {} a -> s {httpStatus = a} :: GetAppMonitorDataResponse)++instance Prelude.NFData GetAppMonitorDataResponse where+ rnf GetAppMonitorDataResponse' {..} =+ Prelude.rnf events+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Rum/Lens.hs view
@@ -0,0 +1,272 @@+{-# 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.Rum.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.Rum.Lens+ ( -- * Operations++ -- ** BatchCreateRumMetricDefinitions+ batchCreateRumMetricDefinitions_destinationArn,+ batchCreateRumMetricDefinitions_appMonitorName,+ batchCreateRumMetricDefinitions_destination,+ batchCreateRumMetricDefinitions_metricDefinitions,+ batchCreateRumMetricDefinitionsResponse_metricDefinitions,+ batchCreateRumMetricDefinitionsResponse_httpStatus,+ batchCreateRumMetricDefinitionsResponse_errors,++ -- ** BatchDeleteRumMetricDefinitions+ batchDeleteRumMetricDefinitions_destinationArn,+ batchDeleteRumMetricDefinitions_appMonitorName,+ batchDeleteRumMetricDefinitions_destination,+ batchDeleteRumMetricDefinitions_metricDefinitionIds,+ batchDeleteRumMetricDefinitionsResponse_metricDefinitionIds,+ batchDeleteRumMetricDefinitionsResponse_httpStatus,+ batchDeleteRumMetricDefinitionsResponse_errors,++ -- ** BatchGetRumMetricDefinitions+ batchGetRumMetricDefinitions_destinationArn,+ batchGetRumMetricDefinitions_maxResults,+ batchGetRumMetricDefinitions_nextToken,+ batchGetRumMetricDefinitions_appMonitorName,+ batchGetRumMetricDefinitions_destination,+ batchGetRumMetricDefinitionsResponse_metricDefinitions,+ batchGetRumMetricDefinitionsResponse_nextToken,+ batchGetRumMetricDefinitionsResponse_httpStatus,++ -- ** CreateAppMonitor+ createAppMonitor_appMonitorConfiguration,+ createAppMonitor_customEvents,+ createAppMonitor_cwLogEnabled,+ createAppMonitor_tags,+ createAppMonitor_domain,+ createAppMonitor_name,+ createAppMonitorResponse_id,+ createAppMonitorResponse_httpStatus,++ -- ** DeleteAppMonitor+ deleteAppMonitor_name,+ deleteAppMonitorResponse_httpStatus,++ -- ** DeleteRumMetricsDestination+ deleteRumMetricsDestination_destinationArn,+ deleteRumMetricsDestination_appMonitorName,+ deleteRumMetricsDestination_destination,+ deleteRumMetricsDestinationResponse_httpStatus,++ -- ** GetAppMonitor+ getAppMonitor_name,+ getAppMonitorResponse_appMonitor,+ getAppMonitorResponse_httpStatus,++ -- ** GetAppMonitorData+ getAppMonitorData_filters,+ getAppMonitorData_maxResults,+ getAppMonitorData_nextToken,+ getAppMonitorData_name,+ getAppMonitorData_timeRange,+ getAppMonitorDataResponse_events,+ getAppMonitorDataResponse_nextToken,+ getAppMonitorDataResponse_httpStatus,++ -- ** ListAppMonitors+ listAppMonitors_maxResults,+ listAppMonitors_nextToken,+ listAppMonitorsResponse_appMonitorSummaries,+ listAppMonitorsResponse_nextToken,+ listAppMonitorsResponse_httpStatus,++ -- ** ListRumMetricsDestinations+ listRumMetricsDestinations_maxResults,+ listRumMetricsDestinations_nextToken,+ listRumMetricsDestinations_appMonitorName,+ listRumMetricsDestinationsResponse_destinations,+ listRumMetricsDestinationsResponse_nextToken,+ listRumMetricsDestinationsResponse_httpStatus,++ -- ** ListTagsForResource+ listTagsForResource_resourceArn,+ listTagsForResourceResponse_httpStatus,+ listTagsForResourceResponse_resourceArn,+ listTagsForResourceResponse_tags,++ -- ** PutRumEvents+ putRumEvents_appMonitorDetails,+ putRumEvents_batchId,+ putRumEvents_id,+ putRumEvents_rumEvents,+ putRumEvents_userDetails,+ putRumEventsResponse_httpStatus,++ -- ** PutRumMetricsDestination+ putRumMetricsDestination_destinationArn,+ putRumMetricsDestination_iamRoleArn,+ putRumMetricsDestination_appMonitorName,+ putRumMetricsDestination_destination,+ putRumMetricsDestinationResponse_httpStatus,++ -- ** TagResource+ tagResource_resourceArn,+ tagResource_tags,+ tagResourceResponse_httpStatus,++ -- ** UntagResource+ untagResource_resourceArn,+ untagResource_tagKeys,+ untagResourceResponse_httpStatus,++ -- ** UpdateAppMonitor+ updateAppMonitor_appMonitorConfiguration,+ updateAppMonitor_customEvents,+ updateAppMonitor_cwLogEnabled,+ updateAppMonitor_domain,+ updateAppMonitor_name,+ updateAppMonitorResponse_httpStatus,++ -- ** UpdateRumMetricDefinition+ updateRumMetricDefinition_destinationArn,+ updateRumMetricDefinition_appMonitorName,+ updateRumMetricDefinition_destination,+ updateRumMetricDefinition_metricDefinition,+ updateRumMetricDefinition_metricDefinitionId,+ updateRumMetricDefinitionResponse_httpStatus,++ -- * Types++ -- ** AppMonitor+ appMonitor_appMonitorConfiguration,+ appMonitor_created,+ appMonitor_customEvents,+ appMonitor_dataStorage,+ appMonitor_domain,+ appMonitor_id,+ appMonitor_lastModified,+ appMonitor_name,+ appMonitor_state,+ appMonitor_tags,++ -- ** AppMonitorConfiguration+ appMonitorConfiguration_allowCookies,+ appMonitorConfiguration_enableXRay,+ appMonitorConfiguration_excludedPages,+ appMonitorConfiguration_favoritePages,+ appMonitorConfiguration_guestRoleArn,+ appMonitorConfiguration_identityPoolId,+ appMonitorConfiguration_includedPages,+ appMonitorConfiguration_sessionSampleRate,+ appMonitorConfiguration_telemetries,++ -- ** AppMonitorDetails+ appMonitorDetails_id,+ appMonitorDetails_name,+ appMonitorDetails_version,++ -- ** AppMonitorSummary+ appMonitorSummary_created,+ appMonitorSummary_id,+ appMonitorSummary_lastModified,+ appMonitorSummary_name,+ appMonitorSummary_state,++ -- ** BatchCreateRumMetricDefinitionsError+ batchCreateRumMetricDefinitionsError_errorCode,+ batchCreateRumMetricDefinitionsError_errorMessage,+ batchCreateRumMetricDefinitionsError_metricDefinition,++ -- ** BatchDeleteRumMetricDefinitionsError+ batchDeleteRumMetricDefinitionsError_errorCode,+ batchDeleteRumMetricDefinitionsError_errorMessage,+ batchDeleteRumMetricDefinitionsError_metricDefinitionId,++ -- ** CustomEvents+ customEvents_status,++ -- ** CwLog+ cwLog_cwLogEnabled,+ cwLog_cwLogGroup,++ -- ** DataStorage+ dataStorage_cwLog,++ -- ** MetricDefinition+ metricDefinition_dimensionKeys,+ metricDefinition_eventPattern,+ metricDefinition_unitLabel,+ metricDefinition_valueKey,+ metricDefinition_metricDefinitionId,+ metricDefinition_name,++ -- ** MetricDefinitionRequest+ metricDefinitionRequest_dimensionKeys,+ metricDefinitionRequest_eventPattern,+ metricDefinitionRequest_unitLabel,+ metricDefinitionRequest_valueKey,+ metricDefinitionRequest_name,++ -- ** MetricDestinationSummary+ metricDestinationSummary_destination,+ metricDestinationSummary_destinationArn,+ metricDestinationSummary_iamRoleArn,++ -- ** QueryFilter+ queryFilter_name,+ queryFilter_values,++ -- ** RumEvent+ rumEvent_metadata,+ rumEvent_details,+ rumEvent_id,+ rumEvent_timestamp,+ rumEvent_type,++ -- ** TimeRange+ timeRange_before,+ timeRange_after,++ -- ** UserDetails+ userDetails_sessionId,+ userDetails_userId,+ )+where++import Amazonka.Rum.BatchCreateRumMetricDefinitions+import Amazonka.Rum.BatchDeleteRumMetricDefinitions+import Amazonka.Rum.BatchGetRumMetricDefinitions+import Amazonka.Rum.CreateAppMonitor+import Amazonka.Rum.DeleteAppMonitor+import Amazonka.Rum.DeleteRumMetricsDestination+import Amazonka.Rum.GetAppMonitor+import Amazonka.Rum.GetAppMonitorData+import Amazonka.Rum.ListAppMonitors+import Amazonka.Rum.ListRumMetricsDestinations+import Amazonka.Rum.ListTagsForResource+import Amazonka.Rum.PutRumEvents+import Amazonka.Rum.PutRumMetricsDestination+import Amazonka.Rum.TagResource+import Amazonka.Rum.Types.AppMonitor+import Amazonka.Rum.Types.AppMonitorConfiguration+import Amazonka.Rum.Types.AppMonitorDetails+import Amazonka.Rum.Types.AppMonitorSummary+import Amazonka.Rum.Types.BatchCreateRumMetricDefinitionsError+import Amazonka.Rum.Types.BatchDeleteRumMetricDefinitionsError+import Amazonka.Rum.Types.CustomEvents+import Amazonka.Rum.Types.CwLog+import Amazonka.Rum.Types.DataStorage+import Amazonka.Rum.Types.MetricDefinition+import Amazonka.Rum.Types.MetricDefinitionRequest+import Amazonka.Rum.Types.MetricDestinationSummary+import Amazonka.Rum.Types.QueryFilter+import Amazonka.Rum.Types.RumEvent+import Amazonka.Rum.Types.TimeRange+import Amazonka.Rum.Types.UserDetails+import Amazonka.Rum.UntagResource+import Amazonka.Rum.UpdateAppMonitor+import Amazonka.Rum.UpdateRumMetricDefinition
+ gen/Amazonka/Rum/ListAppMonitors.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.Rum.ListAppMonitors+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of the Amazon CloudWatch RUM app monitors in the account.+--+-- This operation returns paginated results.+module Amazonka.Rum.ListAppMonitors+ ( -- * Creating a Request+ ListAppMonitors (..),+ newListAppMonitors,++ -- * Request Lenses+ listAppMonitors_maxResults,+ listAppMonitors_nextToken,++ -- * Destructuring the Response+ ListAppMonitorsResponse (..),+ newListAppMonitorsResponse,++ -- * Response Lenses+ listAppMonitorsResponse_appMonitorSummaries,+ listAppMonitorsResponse_nextToken,+ listAppMonitorsResponse_httpStatus,+ )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.Rum.Types++-- | /See:/ 'newListAppMonitors' smart constructor.+data ListAppMonitors = ListAppMonitors'+ { -- | The maximum number of results to return in one operation. The default is+ -- 50. The maximum that you can specify is 100.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | Use the token returned by the previous operation to request the next+ -- page of results.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListAppMonitors' 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', 'listAppMonitors_maxResults' - The maximum number of results to return in one operation. The default is+-- 50. The maximum that you can specify is 100.+--+-- 'nextToken', 'listAppMonitors_nextToken' - Use the token returned by the previous operation to request the next+-- page of results.+newListAppMonitors ::+ ListAppMonitors+newListAppMonitors =+ ListAppMonitors'+ { maxResults = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | The maximum number of results to return in one operation. The default is+-- 50. The maximum that you can specify is 100.+listAppMonitors_maxResults :: Lens.Lens' ListAppMonitors (Prelude.Maybe Prelude.Natural)+listAppMonitors_maxResults = Lens.lens (\ListAppMonitors' {maxResults} -> maxResults) (\s@ListAppMonitors' {} a -> s {maxResults = a} :: ListAppMonitors)++-- | Use the token returned by the previous operation to request the next+-- page of results.+listAppMonitors_nextToken :: Lens.Lens' ListAppMonitors (Prelude.Maybe Prelude.Text)+listAppMonitors_nextToken = Lens.lens (\ListAppMonitors' {nextToken} -> nextToken) (\s@ListAppMonitors' {} a -> s {nextToken = a} :: ListAppMonitors)++instance Core.AWSPager ListAppMonitors where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listAppMonitorsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listAppMonitorsResponse_appMonitorSummaries+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listAppMonitors_nextToken+ Lens..~ rs+ Lens.^? listAppMonitorsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListAppMonitors where+ type+ AWSResponse ListAppMonitors =+ ListAppMonitorsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListAppMonitorsResponse'+ Prelude.<$> ( x+ Data..?> "AppMonitorSummaries"+ Core..!@ Prelude.mempty+ )+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListAppMonitors where+ hashWithSalt _salt ListAppMonitors' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListAppMonitors where+ rnf ListAppMonitors' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListAppMonitors where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON ListAppMonitors where+ toJSON = Prelude.const (Data.Object Prelude.mempty)++instance Data.ToPath ListAppMonitors where+ toPath = Prelude.const "/appmonitors"++instance Data.ToQuery ListAppMonitors where+ toQuery ListAppMonitors' {..} =+ Prelude.mconcat+ [ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListAppMonitorsResponse' smart constructor.+data ListAppMonitorsResponse = ListAppMonitorsResponse'+ { -- | An array of structures that contain information about the returned app+ -- monitors.+ appMonitorSummaries :: Prelude.Maybe [AppMonitorSummary],+ -- | A token that you can use in a subsequent operation to retrieve the next+ -- set of results.+ 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 'ListAppMonitorsResponse' 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:+--+-- 'appMonitorSummaries', 'listAppMonitorsResponse_appMonitorSummaries' - An array of structures that contain information about the returned app+-- monitors.+--+-- 'nextToken', 'listAppMonitorsResponse_nextToken' - A token that you can use in a subsequent operation to retrieve the next+-- set of results.+--+-- 'httpStatus', 'listAppMonitorsResponse_httpStatus' - The response's http status code.+newListAppMonitorsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListAppMonitorsResponse+newListAppMonitorsResponse pHttpStatus_ =+ ListAppMonitorsResponse'+ { appMonitorSummaries =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | An array of structures that contain information about the returned app+-- monitors.+listAppMonitorsResponse_appMonitorSummaries :: Lens.Lens' ListAppMonitorsResponse (Prelude.Maybe [AppMonitorSummary])+listAppMonitorsResponse_appMonitorSummaries = Lens.lens (\ListAppMonitorsResponse' {appMonitorSummaries} -> appMonitorSummaries) (\s@ListAppMonitorsResponse' {} a -> s {appMonitorSummaries = a} :: ListAppMonitorsResponse) Prelude.. Lens.mapping Lens.coerced++-- | A token that you can use in a subsequent operation to retrieve the next+-- set of results.+listAppMonitorsResponse_nextToken :: Lens.Lens' ListAppMonitorsResponse (Prelude.Maybe Prelude.Text)+listAppMonitorsResponse_nextToken = Lens.lens (\ListAppMonitorsResponse' {nextToken} -> nextToken) (\s@ListAppMonitorsResponse' {} a -> s {nextToken = a} :: ListAppMonitorsResponse)++-- | The response's http status code.+listAppMonitorsResponse_httpStatus :: Lens.Lens' ListAppMonitorsResponse Prelude.Int+listAppMonitorsResponse_httpStatus = Lens.lens (\ListAppMonitorsResponse' {httpStatus} -> httpStatus) (\s@ListAppMonitorsResponse' {} a -> s {httpStatus = a} :: ListAppMonitorsResponse)++instance Prelude.NFData ListAppMonitorsResponse where+ rnf ListAppMonitorsResponse' {..} =+ Prelude.rnf appMonitorSummaries+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Rum/ListRumMetricsDestinations.hs view
@@ -0,0 +1,262 @@+{-# 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.Rum.ListRumMetricsDestinations+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns a list of destinations that you have created to receive RUM+-- extended metrics, for the specified app monitor.+--+-- For more information about extended metrics, see+-- <https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_AddRumMetrcs.html AddRumMetrics>.+--+-- This operation returns paginated results.+module Amazonka.Rum.ListRumMetricsDestinations+ ( -- * Creating a Request+ ListRumMetricsDestinations (..),+ newListRumMetricsDestinations,++ -- * Request Lenses+ listRumMetricsDestinations_maxResults,+ listRumMetricsDestinations_nextToken,+ listRumMetricsDestinations_appMonitorName,++ -- * Destructuring the Response+ ListRumMetricsDestinationsResponse (..),+ newListRumMetricsDestinationsResponse,++ -- * Response Lenses+ listRumMetricsDestinationsResponse_destinations,+ listRumMetricsDestinationsResponse_nextToken,+ listRumMetricsDestinationsResponse_httpStatus,+ )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.Rum.Types++-- | /See:/ 'newListRumMetricsDestinations' smart constructor.+data ListRumMetricsDestinations = ListRumMetricsDestinations'+ { -- | The maximum number of results to return in one operation. The default is+ -- 50. The maximum that you can specify is 100.+ --+ -- To retrieve the remaining results, make another call with the returned+ -- @NextToken@ value.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | Use the token returned by the previous operation to request the next+ -- page of results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The name of the app monitor associated with the destinations that you+ -- want to retrieve.+ appMonitorName :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListRumMetricsDestinations' 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', 'listRumMetricsDestinations_maxResults' - The maximum number of results to return in one operation. The default is+-- 50. The maximum that you can specify is 100.+--+-- To retrieve the remaining results, make another call with the returned+-- @NextToken@ value.+--+-- 'nextToken', 'listRumMetricsDestinations_nextToken' - Use the token returned by the previous operation to request the next+-- page of results.+--+-- 'appMonitorName', 'listRumMetricsDestinations_appMonitorName' - The name of the app monitor associated with the destinations that you+-- want to retrieve.+newListRumMetricsDestinations ::+ -- | 'appMonitorName'+ Prelude.Text ->+ ListRumMetricsDestinations+newListRumMetricsDestinations pAppMonitorName_ =+ ListRumMetricsDestinations'+ { maxResults =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ appMonitorName = pAppMonitorName_+ }++-- | The maximum number of results to return in one operation. The default is+-- 50. The maximum that you can specify is 100.+--+-- To retrieve the remaining results, make another call with the returned+-- @NextToken@ value.+listRumMetricsDestinations_maxResults :: Lens.Lens' ListRumMetricsDestinations (Prelude.Maybe Prelude.Natural)+listRumMetricsDestinations_maxResults = Lens.lens (\ListRumMetricsDestinations' {maxResults} -> maxResults) (\s@ListRumMetricsDestinations' {} a -> s {maxResults = a} :: ListRumMetricsDestinations)++-- | Use the token returned by the previous operation to request the next+-- page of results.+listRumMetricsDestinations_nextToken :: Lens.Lens' ListRumMetricsDestinations (Prelude.Maybe Prelude.Text)+listRumMetricsDestinations_nextToken = Lens.lens (\ListRumMetricsDestinations' {nextToken} -> nextToken) (\s@ListRumMetricsDestinations' {} a -> s {nextToken = a} :: ListRumMetricsDestinations)++-- | The name of the app monitor associated with the destinations that you+-- want to retrieve.+listRumMetricsDestinations_appMonitorName :: Lens.Lens' ListRumMetricsDestinations Prelude.Text+listRumMetricsDestinations_appMonitorName = Lens.lens (\ListRumMetricsDestinations' {appMonitorName} -> appMonitorName) (\s@ListRumMetricsDestinations' {} a -> s {appMonitorName = a} :: ListRumMetricsDestinations)++instance Core.AWSPager ListRumMetricsDestinations where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listRumMetricsDestinationsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^? listRumMetricsDestinationsResponse_destinations+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listRumMetricsDestinations_nextToken+ Lens..~ rs+ Lens.^? listRumMetricsDestinationsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListRumMetricsDestinations where+ type+ AWSResponse ListRumMetricsDestinations =+ ListRumMetricsDestinationsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListRumMetricsDestinationsResponse'+ Prelude.<$> (x Data..?> "Destinations" Core..!@ Prelude.mempty)+ Prelude.<*> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListRumMetricsDestinations where+ hashWithSalt _salt ListRumMetricsDestinations' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` appMonitorName++instance Prelude.NFData ListRumMetricsDestinations where+ rnf ListRumMetricsDestinations' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf appMonitorName++instance Data.ToHeaders ListRumMetricsDestinations where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListRumMetricsDestinations where+ toPath ListRumMetricsDestinations' {..} =+ Prelude.mconcat+ [ "/rummetrics/",+ Data.toBS appMonitorName,+ "/metricsdestination"+ ]++instance Data.ToQuery ListRumMetricsDestinations where+ toQuery ListRumMetricsDestinations' {..} =+ Prelude.mconcat+ [ "maxResults" Data.=: maxResults,+ "nextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListRumMetricsDestinationsResponse' smart constructor.+data ListRumMetricsDestinationsResponse = ListRumMetricsDestinationsResponse'+ { -- | The list of CloudWatch RUM extended metrics destinations associated with+ -- the app monitor that you specified.+ destinations :: Prelude.Maybe [MetricDestinationSummary],+ -- | A token that you can use in a subsequent operation to retrieve the next+ -- set of results.+ 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 'ListRumMetricsDestinationsResponse' 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:+--+-- 'destinations', 'listRumMetricsDestinationsResponse_destinations' - The list of CloudWatch RUM extended metrics destinations associated with+-- the app monitor that you specified.+--+-- 'nextToken', 'listRumMetricsDestinationsResponse_nextToken' - A token that you can use in a subsequent operation to retrieve the next+-- set of results.+--+-- 'httpStatus', 'listRumMetricsDestinationsResponse_httpStatus' - The response's http status code.+newListRumMetricsDestinationsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListRumMetricsDestinationsResponse+newListRumMetricsDestinationsResponse pHttpStatus_ =+ ListRumMetricsDestinationsResponse'+ { destinations =+ Prelude.Nothing,+ nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The list of CloudWatch RUM extended metrics destinations associated with+-- the app monitor that you specified.+listRumMetricsDestinationsResponse_destinations :: Lens.Lens' ListRumMetricsDestinationsResponse (Prelude.Maybe [MetricDestinationSummary])+listRumMetricsDestinationsResponse_destinations = Lens.lens (\ListRumMetricsDestinationsResponse' {destinations} -> destinations) (\s@ListRumMetricsDestinationsResponse' {} a -> s {destinations = a} :: ListRumMetricsDestinationsResponse) Prelude.. Lens.mapping Lens.coerced++-- | A token that you can use in a subsequent operation to retrieve the next+-- set of results.+listRumMetricsDestinationsResponse_nextToken :: Lens.Lens' ListRumMetricsDestinationsResponse (Prelude.Maybe Prelude.Text)+listRumMetricsDestinationsResponse_nextToken = Lens.lens (\ListRumMetricsDestinationsResponse' {nextToken} -> nextToken) (\s@ListRumMetricsDestinationsResponse' {} a -> s {nextToken = a} :: ListRumMetricsDestinationsResponse)++-- | The response's http status code.+listRumMetricsDestinationsResponse_httpStatus :: Lens.Lens' ListRumMetricsDestinationsResponse Prelude.Int+listRumMetricsDestinationsResponse_httpStatus = Lens.lens (\ListRumMetricsDestinationsResponse' {httpStatus} -> httpStatus) (\s@ListRumMetricsDestinationsResponse' {} a -> s {httpStatus = a} :: ListRumMetricsDestinationsResponse)++instance+ Prelude.NFData+ ListRumMetricsDestinationsResponse+ where+ rnf ListRumMetricsDestinationsResponse' {..} =+ Prelude.rnf destinations+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Rum/ListTagsForResource.hs view
@@ -0,0 +1,178 @@+{-# 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.Rum.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)+--+-- Displays the tags associated with a CloudWatch RUM resource.+module Amazonka.Rum.ListTagsForResource+ ( -- * Creating a Request+ ListTagsForResource (..),+ newListTagsForResource,++ -- * Request Lenses+ listTagsForResource_resourceArn,++ -- * Destructuring the Response+ ListTagsForResourceResponse (..),+ newListTagsForResourceResponse,++ -- * Response Lenses+ listTagsForResourceResponse_httpStatus,+ listTagsForResourceResponse_resourceArn,+ listTagsForResourceResponse_tags,+ )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.Rum.Types++-- | /See:/ 'newListTagsForResource' smart constructor.+data ListTagsForResource = ListTagsForResource'+ { -- | The ARN of the resource that you want to see the 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 ARN of the resource that you want to see the tags of.+newListTagsForResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ ListTagsForResource+newListTagsForResource pResourceArn_ =+ ListTagsForResource' {resourceArn = pResourceArn_}++-- | The ARN of the resource that you want to see the 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.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "ResourceArn")+ Prelude.<*> (x Data..?> "Tags" Core..!@ Prelude.mempty)+ )++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 response's http status code.+ httpStatus :: Prelude.Int,+ -- | The ARN of the resource that you are viewing.+ resourceArn :: Prelude.Text,+ -- | The list of tag keys and values associated with the resource you+ -- specified.+ tags :: Prelude.HashMap Prelude.Text Prelude.Text+ }+ 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:+--+-- 'httpStatus', 'listTagsForResourceResponse_httpStatus' - The response's http status code.+--+-- 'resourceArn', 'listTagsForResourceResponse_resourceArn' - The ARN of the resource that you are viewing.+--+-- 'tags', 'listTagsForResourceResponse_tags' - The list of tag keys and values associated with the resource you+-- specified.+newListTagsForResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'resourceArn'+ Prelude.Text ->+ ListTagsForResourceResponse+newListTagsForResourceResponse+ pHttpStatus_+ pResourceArn_ =+ ListTagsForResourceResponse'+ { httpStatus =+ pHttpStatus_,+ resourceArn = pResourceArn_,+ tags = Prelude.mempty+ }++-- | 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)++-- | The ARN of the resource that you are viewing.+listTagsForResourceResponse_resourceArn :: Lens.Lens' ListTagsForResourceResponse Prelude.Text+listTagsForResourceResponse_resourceArn = Lens.lens (\ListTagsForResourceResponse' {resourceArn} -> resourceArn) (\s@ListTagsForResourceResponse' {} a -> s {resourceArn = a} :: ListTagsForResourceResponse)++-- | The list of tag keys and values associated with the resource you+-- specified.+listTagsForResourceResponse_tags :: Lens.Lens' ListTagsForResourceResponse (Prelude.HashMap Prelude.Text Prelude.Text)+listTagsForResourceResponse_tags = Lens.lens (\ListTagsForResourceResponse' {tags} -> tags) (\s@ListTagsForResourceResponse' {} a -> s {tags = a} :: ListTagsForResourceResponse) Prelude.. Lens.coerced++instance Prelude.NFData ListTagsForResourceResponse where+ rnf ListTagsForResourceResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf resourceArn+ `Prelude.seq` Prelude.rnf tags
+ gen/Amazonka/Rum/PutRumEvents.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.Rum.PutRumEvents+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Sends telemetry events about your application performance and user+-- behavior to CloudWatch RUM. The code snippet that RUM generates for you+-- to add to your application includes @PutRumEvents@ operations to send+-- this data to RUM.+--+-- Each @PutRumEvents@ operation can send a batch of events from one user+-- session.+module Amazonka.Rum.PutRumEvents+ ( -- * Creating a Request+ PutRumEvents (..),+ newPutRumEvents,++ -- * Request Lenses+ putRumEvents_appMonitorDetails,+ putRumEvents_batchId,+ putRumEvents_id,+ putRumEvents_rumEvents,+ putRumEvents_userDetails,++ -- * Destructuring the Response+ PutRumEventsResponse (..),+ newPutRumEventsResponse,++ -- * Response Lenses+ putRumEventsResponse_httpStatus,+ )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.Rum.Types++-- | /See:/ 'newPutRumEvents' smart constructor.+data PutRumEvents = PutRumEvents'+ { -- | A structure that contains information about the app monitor that+ -- collected this telemetry information.+ appMonitorDetails :: AppMonitorDetails,+ -- | A unique identifier for this batch of RUM event data.+ batchId :: Prelude.Text,+ -- | The ID of the app monitor that is sending this data.+ id :: Prelude.Text,+ -- | An array of structures that contain the telemetry event data.+ rumEvents :: [RumEvent],+ -- | A structure that contains information about the user session that this+ -- batch of events was collected from.+ userDetails :: UserDetails+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutRumEvents' 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:+--+-- 'appMonitorDetails', 'putRumEvents_appMonitorDetails' - A structure that contains information about the app monitor that+-- collected this telemetry information.+--+-- 'batchId', 'putRumEvents_batchId' - A unique identifier for this batch of RUM event data.+--+-- 'id', 'putRumEvents_id' - The ID of the app monitor that is sending this data.+--+-- 'rumEvents', 'putRumEvents_rumEvents' - An array of structures that contain the telemetry event data.+--+-- 'userDetails', 'putRumEvents_userDetails' - A structure that contains information about the user session that this+-- batch of events was collected from.+newPutRumEvents ::+ -- | 'appMonitorDetails'+ AppMonitorDetails ->+ -- | 'batchId'+ Prelude.Text ->+ -- | 'id'+ Prelude.Text ->+ -- | 'userDetails'+ UserDetails ->+ PutRumEvents+newPutRumEvents+ pAppMonitorDetails_+ pBatchId_+ pId_+ pUserDetails_ =+ PutRumEvents'+ { appMonitorDetails =+ pAppMonitorDetails_,+ batchId = pBatchId_,+ id = pId_,+ rumEvents = Prelude.mempty,+ userDetails = pUserDetails_+ }++-- | A structure that contains information about the app monitor that+-- collected this telemetry information.+putRumEvents_appMonitorDetails :: Lens.Lens' PutRumEvents AppMonitorDetails+putRumEvents_appMonitorDetails = Lens.lens (\PutRumEvents' {appMonitorDetails} -> appMonitorDetails) (\s@PutRumEvents' {} a -> s {appMonitorDetails = a} :: PutRumEvents)++-- | A unique identifier for this batch of RUM event data.+putRumEvents_batchId :: Lens.Lens' PutRumEvents Prelude.Text+putRumEvents_batchId = Lens.lens (\PutRumEvents' {batchId} -> batchId) (\s@PutRumEvents' {} a -> s {batchId = a} :: PutRumEvents)++-- | The ID of the app monitor that is sending this data.+putRumEvents_id :: Lens.Lens' PutRumEvents Prelude.Text+putRumEvents_id = Lens.lens (\PutRumEvents' {id} -> id) (\s@PutRumEvents' {} a -> s {id = a} :: PutRumEvents)++-- | An array of structures that contain the telemetry event data.+putRumEvents_rumEvents :: Lens.Lens' PutRumEvents [RumEvent]+putRumEvents_rumEvents = Lens.lens (\PutRumEvents' {rumEvents} -> rumEvents) (\s@PutRumEvents' {} a -> s {rumEvents = a} :: PutRumEvents) Prelude.. Lens.coerced++-- | A structure that contains information about the user session that this+-- batch of events was collected from.+putRumEvents_userDetails :: Lens.Lens' PutRumEvents UserDetails+putRumEvents_userDetails = Lens.lens (\PutRumEvents' {userDetails} -> userDetails) (\s@PutRumEvents' {} a -> s {userDetails = a} :: PutRumEvents)++instance Core.AWSRequest PutRumEvents where+ type AWSResponse PutRumEvents = PutRumEventsResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ PutRumEventsResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable PutRumEvents where+ hashWithSalt _salt PutRumEvents' {..} =+ _salt+ `Prelude.hashWithSalt` appMonitorDetails+ `Prelude.hashWithSalt` batchId+ `Prelude.hashWithSalt` id+ `Prelude.hashWithSalt` rumEvents+ `Prelude.hashWithSalt` userDetails++instance Prelude.NFData PutRumEvents where+ rnf PutRumEvents' {..} =+ Prelude.rnf appMonitorDetails+ `Prelude.seq` Prelude.rnf batchId+ `Prelude.seq` Prelude.rnf id+ `Prelude.seq` Prelude.rnf rumEvents+ `Prelude.seq` Prelude.rnf userDetails++instance Data.ToHeaders PutRumEvents where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON PutRumEvents where+ toJSON PutRumEvents' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just+ ("AppMonitorDetails" Data..= appMonitorDetails),+ Prelude.Just ("BatchId" Data..= batchId),+ Prelude.Just ("RumEvents" Data..= rumEvents),+ Prelude.Just ("UserDetails" Data..= userDetails)+ ]+ )++instance Data.ToPath PutRumEvents where+ toPath PutRumEvents' {..} =+ Prelude.mconcat+ ["/appmonitors/", Data.toBS id, "/"]++instance Data.ToQuery PutRumEvents where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newPutRumEventsResponse' smart constructor.+data PutRumEventsResponse = PutRumEventsResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutRumEventsResponse' 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', 'putRumEventsResponse_httpStatus' - The response's http status code.+newPutRumEventsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ PutRumEventsResponse+newPutRumEventsResponse pHttpStatus_ =+ PutRumEventsResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+putRumEventsResponse_httpStatus :: Lens.Lens' PutRumEventsResponse Prelude.Int+putRumEventsResponse_httpStatus = Lens.lens (\PutRumEventsResponse' {httpStatus} -> httpStatus) (\s@PutRumEventsResponse' {} a -> s {httpStatus = a} :: PutRumEventsResponse)++instance Prelude.NFData PutRumEventsResponse where+ rnf PutRumEventsResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/Rum/PutRumMetricsDestination.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.Rum.PutRumMetricsDestination+-- 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 or updates a destination to receive extended metrics from+-- CloudWatch RUM. You can send extended metrics to CloudWatch or to a+-- CloudWatch Evidently experiment.+--+-- For more information about extended metrics, see+-- <https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_AddRumMetrics.html AddRumMetrics>.+module Amazonka.Rum.PutRumMetricsDestination+ ( -- * Creating a Request+ PutRumMetricsDestination (..),+ newPutRumMetricsDestination,++ -- * Request Lenses+ putRumMetricsDestination_destinationArn,+ putRumMetricsDestination_iamRoleArn,+ putRumMetricsDestination_appMonitorName,+ putRumMetricsDestination_destination,++ -- * Destructuring the Response+ PutRumMetricsDestinationResponse (..),+ newPutRumMetricsDestinationResponse,++ -- * Response Lenses+ putRumMetricsDestinationResponse_httpStatus,+ )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.Rum.Types++-- | /See:/ 'newPutRumMetricsDestination' smart constructor.+data PutRumMetricsDestination = PutRumMetricsDestination'+ { -- | Use this parameter only if @Destination@ is @Evidently@. This parameter+ -- specifies the ARN of the Evidently experiment that will receive the+ -- extended metrics.+ destinationArn :: Prelude.Maybe Prelude.Text,+ -- | This parameter is required if @Destination@ is @Evidently@. If+ -- @Destination@ is @CloudWatch@, do not use this parameter.+ --+ -- This parameter specifies the ARN of an IAM role that RUM will assume to+ -- write to the Evidently experiment that you are sending metrics to. This+ -- role must have permission to write to that experiment.+ iamRoleArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the CloudWatch RUM app monitor that will send the metrics.+ appMonitorName :: Prelude.Text,+ -- | Defines the destination to send the metrics to. Valid values are+ -- @CloudWatch@ and @Evidently@. If you specify @Evidently@, you must also+ -- specify the ARN of the CloudWatchEvidently experiment that is to be the+ -- destination and an IAM role that has permission to write to the+ -- experiment.+ destination :: MetricDestination+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutRumMetricsDestination' 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:+--+-- 'destinationArn', 'putRumMetricsDestination_destinationArn' - Use this parameter only if @Destination@ is @Evidently@. This parameter+-- specifies the ARN of the Evidently experiment that will receive the+-- extended metrics.+--+-- 'iamRoleArn', 'putRumMetricsDestination_iamRoleArn' - This parameter is required if @Destination@ is @Evidently@. If+-- @Destination@ is @CloudWatch@, do not use this parameter.+--+-- This parameter specifies the ARN of an IAM role that RUM will assume to+-- write to the Evidently experiment that you are sending metrics to. This+-- role must have permission to write to that experiment.+--+-- 'appMonitorName', 'putRumMetricsDestination_appMonitorName' - The name of the CloudWatch RUM app monitor that will send the metrics.+--+-- 'destination', 'putRumMetricsDestination_destination' - Defines the destination to send the metrics to. Valid values are+-- @CloudWatch@ and @Evidently@. If you specify @Evidently@, you must also+-- specify the ARN of the CloudWatchEvidently experiment that is to be the+-- destination and an IAM role that has permission to write to the+-- experiment.+newPutRumMetricsDestination ::+ -- | 'appMonitorName'+ Prelude.Text ->+ -- | 'destination'+ MetricDestination ->+ PutRumMetricsDestination+newPutRumMetricsDestination+ pAppMonitorName_+ pDestination_ =+ PutRumMetricsDestination'+ { destinationArn =+ Prelude.Nothing,+ iamRoleArn = Prelude.Nothing,+ appMonitorName = pAppMonitorName_,+ destination = pDestination_+ }++-- | Use this parameter only if @Destination@ is @Evidently@. This parameter+-- specifies the ARN of the Evidently experiment that will receive the+-- extended metrics.+putRumMetricsDestination_destinationArn :: Lens.Lens' PutRumMetricsDestination (Prelude.Maybe Prelude.Text)+putRumMetricsDestination_destinationArn = Lens.lens (\PutRumMetricsDestination' {destinationArn} -> destinationArn) (\s@PutRumMetricsDestination' {} a -> s {destinationArn = a} :: PutRumMetricsDestination)++-- | This parameter is required if @Destination@ is @Evidently@. If+-- @Destination@ is @CloudWatch@, do not use this parameter.+--+-- This parameter specifies the ARN of an IAM role that RUM will assume to+-- write to the Evidently experiment that you are sending metrics to. This+-- role must have permission to write to that experiment.+putRumMetricsDestination_iamRoleArn :: Lens.Lens' PutRumMetricsDestination (Prelude.Maybe Prelude.Text)+putRumMetricsDestination_iamRoleArn = Lens.lens (\PutRumMetricsDestination' {iamRoleArn} -> iamRoleArn) (\s@PutRumMetricsDestination' {} a -> s {iamRoleArn = a} :: PutRumMetricsDestination)++-- | The name of the CloudWatch RUM app monitor that will send the metrics.+putRumMetricsDestination_appMonitorName :: Lens.Lens' PutRumMetricsDestination Prelude.Text+putRumMetricsDestination_appMonitorName = Lens.lens (\PutRumMetricsDestination' {appMonitorName} -> appMonitorName) (\s@PutRumMetricsDestination' {} a -> s {appMonitorName = a} :: PutRumMetricsDestination)++-- | Defines the destination to send the metrics to. Valid values are+-- @CloudWatch@ and @Evidently@. If you specify @Evidently@, you must also+-- specify the ARN of the CloudWatchEvidently experiment that is to be the+-- destination and an IAM role that has permission to write to the+-- experiment.+putRumMetricsDestination_destination :: Lens.Lens' PutRumMetricsDestination MetricDestination+putRumMetricsDestination_destination = Lens.lens (\PutRumMetricsDestination' {destination} -> destination) (\s@PutRumMetricsDestination' {} a -> s {destination = a} :: PutRumMetricsDestination)++instance Core.AWSRequest PutRumMetricsDestination where+ type+ AWSResponse PutRumMetricsDestination =+ PutRumMetricsDestinationResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ PutRumMetricsDestinationResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable PutRumMetricsDestination where+ hashWithSalt _salt PutRumMetricsDestination' {..} =+ _salt+ `Prelude.hashWithSalt` destinationArn+ `Prelude.hashWithSalt` iamRoleArn+ `Prelude.hashWithSalt` appMonitorName+ `Prelude.hashWithSalt` destination++instance Prelude.NFData PutRumMetricsDestination where+ rnf PutRumMetricsDestination' {..} =+ Prelude.rnf destinationArn+ `Prelude.seq` Prelude.rnf iamRoleArn+ `Prelude.seq` Prelude.rnf appMonitorName+ `Prelude.seq` Prelude.rnf destination++instance Data.ToHeaders PutRumMetricsDestination where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON PutRumMetricsDestination where+ toJSON PutRumMetricsDestination' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("DestinationArn" Data..=)+ Prelude.<$> destinationArn,+ ("IamRoleArn" Data..=) Prelude.<$> iamRoleArn,+ Prelude.Just ("Destination" Data..= destination)+ ]+ )++instance Data.ToPath PutRumMetricsDestination where+ toPath PutRumMetricsDestination' {..} =+ Prelude.mconcat+ [ "/rummetrics/",+ Data.toBS appMonitorName,+ "/metricsdestination"+ ]++instance Data.ToQuery PutRumMetricsDestination where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newPutRumMetricsDestinationResponse' smart constructor.+data PutRumMetricsDestinationResponse = PutRumMetricsDestinationResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PutRumMetricsDestinationResponse' 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', 'putRumMetricsDestinationResponse_httpStatus' - The response's http status code.+newPutRumMetricsDestinationResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ PutRumMetricsDestinationResponse+newPutRumMetricsDestinationResponse pHttpStatus_ =+ PutRumMetricsDestinationResponse'+ { httpStatus =+ pHttpStatus_+ }++-- | The response's http status code.+putRumMetricsDestinationResponse_httpStatus :: Lens.Lens' PutRumMetricsDestinationResponse Prelude.Int+putRumMetricsDestinationResponse_httpStatus = Lens.lens (\PutRumMetricsDestinationResponse' {httpStatus} -> httpStatus) (\s@PutRumMetricsDestinationResponse' {} a -> s {httpStatus = a} :: PutRumMetricsDestinationResponse)++instance+ Prelude.NFData+ PutRumMetricsDestinationResponse+ where+ rnf PutRumMetricsDestinationResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/Rum/TagResource.hs view
@@ -0,0 +1,183 @@+{-# 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.Rum.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)+--+-- Assigns one or more tags (key-value pairs) to the specified CloudWatch+-- RUM resource. Currently, the only resources that can be tagged app+-- monitors.+--+-- Tags can help you organize and categorize your resources. You can also+-- use them to scope user permissions by granting a user permission to+-- access or change only resources with certain tag values.+--+-- Tags don\'t have any semantic meaning to Amazon Web Services and are+-- interpreted strictly as strings of characters.+--+-- You can use the @TagResource@ action with a resource that already has+-- tags. If you specify a new tag key for the resource, this tag is+-- appended to the list of tags associated with the alarm. If you specify a+-- tag key that is already associated with the resource, the new tag value+-- that you specify replaces the previous value for that tag.+--+-- You can associate as many as 50 tags with a resource.+--+-- For more information, see+-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services resources>.+module Amazonka.Rum.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 qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.Rum.Types++-- | /See:/ 'newTagResource' smart constructor.+data TagResource = TagResource'+ { -- | The ARN of the CloudWatch RUM resource that you\'re adding tags to.+ resourceArn :: Prelude.Text,+ -- | The list of key-value pairs to associate with the 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 ARN of the CloudWatch RUM resource that you\'re adding tags to.+--+-- 'tags', 'tagResource_tags' - The list of key-value pairs to associate with the resource.+newTagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ TagResource+newTagResource pResourceArn_ =+ TagResource'+ { resourceArn = pResourceArn_,+ tags = Prelude.mempty+ }++-- | The ARN of the CloudWatch RUM resource that you\'re adding tags to.+tagResource_resourceArn :: Lens.Lens' TagResource Prelude.Text+tagResource_resourceArn = Lens.lens (\TagResource' {resourceArn} -> resourceArn) (\s@TagResource' {} a -> s {resourceArn = a} :: TagResource)++-- | The list of key-value pairs to associate with the 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/Rum/Types.hs view
@@ -0,0 +1,318 @@+{-# 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.Rum.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.Rum.Types+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ _AccessDeniedException,+ _ConflictException,+ _InternalServerException,+ _ResourceNotFoundException,+ _ServiceQuotaExceededException,+ _ThrottlingException,+ _ValidationException,++ -- * CustomEventsStatus+ CustomEventsStatus (..),++ -- * MetricDestination+ MetricDestination (..),++ -- * StateEnum+ StateEnum (..),++ -- * Telemetry+ Telemetry (..),++ -- * AppMonitor+ AppMonitor (..),+ newAppMonitor,+ appMonitor_appMonitorConfiguration,+ appMonitor_created,+ appMonitor_customEvents,+ appMonitor_dataStorage,+ appMonitor_domain,+ appMonitor_id,+ appMonitor_lastModified,+ appMonitor_name,+ appMonitor_state,+ appMonitor_tags,++ -- * AppMonitorConfiguration+ AppMonitorConfiguration (..),+ newAppMonitorConfiguration,+ appMonitorConfiguration_allowCookies,+ appMonitorConfiguration_enableXRay,+ appMonitorConfiguration_excludedPages,+ appMonitorConfiguration_favoritePages,+ appMonitorConfiguration_guestRoleArn,+ appMonitorConfiguration_identityPoolId,+ appMonitorConfiguration_includedPages,+ appMonitorConfiguration_sessionSampleRate,+ appMonitorConfiguration_telemetries,++ -- * AppMonitorDetails+ AppMonitorDetails (..),+ newAppMonitorDetails,+ appMonitorDetails_id,+ appMonitorDetails_name,+ appMonitorDetails_version,++ -- * AppMonitorSummary+ AppMonitorSummary (..),+ newAppMonitorSummary,+ appMonitorSummary_created,+ appMonitorSummary_id,+ appMonitorSummary_lastModified,+ appMonitorSummary_name,+ appMonitorSummary_state,++ -- * BatchCreateRumMetricDefinitionsError+ BatchCreateRumMetricDefinitionsError (..),+ newBatchCreateRumMetricDefinitionsError,+ batchCreateRumMetricDefinitionsError_errorCode,+ batchCreateRumMetricDefinitionsError_errorMessage,+ batchCreateRumMetricDefinitionsError_metricDefinition,++ -- * BatchDeleteRumMetricDefinitionsError+ BatchDeleteRumMetricDefinitionsError (..),+ newBatchDeleteRumMetricDefinitionsError,+ batchDeleteRumMetricDefinitionsError_errorCode,+ batchDeleteRumMetricDefinitionsError_errorMessage,+ batchDeleteRumMetricDefinitionsError_metricDefinitionId,++ -- * CustomEvents+ CustomEvents (..),+ newCustomEvents,+ customEvents_status,++ -- * CwLog+ CwLog (..),+ newCwLog,+ cwLog_cwLogEnabled,+ cwLog_cwLogGroup,++ -- * DataStorage+ DataStorage (..),+ newDataStorage,+ dataStorage_cwLog,++ -- * MetricDefinition+ MetricDefinition (..),+ newMetricDefinition,+ metricDefinition_dimensionKeys,+ metricDefinition_eventPattern,+ metricDefinition_unitLabel,+ metricDefinition_valueKey,+ metricDefinition_metricDefinitionId,+ metricDefinition_name,++ -- * MetricDefinitionRequest+ MetricDefinitionRequest (..),+ newMetricDefinitionRequest,+ metricDefinitionRequest_dimensionKeys,+ metricDefinitionRequest_eventPattern,+ metricDefinitionRequest_unitLabel,+ metricDefinitionRequest_valueKey,+ metricDefinitionRequest_name,++ -- * MetricDestinationSummary+ MetricDestinationSummary (..),+ newMetricDestinationSummary,+ metricDestinationSummary_destination,+ metricDestinationSummary_destinationArn,+ metricDestinationSummary_iamRoleArn,++ -- * QueryFilter+ QueryFilter (..),+ newQueryFilter,+ queryFilter_name,+ queryFilter_values,++ -- * RumEvent+ RumEvent (..),+ newRumEvent,+ rumEvent_metadata,+ rumEvent_details,+ rumEvent_id,+ rumEvent_timestamp,+ rumEvent_type,++ -- * TimeRange+ TimeRange (..),+ newTimeRange,+ timeRange_before,+ timeRange_after,++ -- * UserDetails+ UserDetails (..),+ newUserDetails,+ userDetails_sessionId,+ userDetails_userId,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Prelude as Prelude+import Amazonka.Rum.Types.AppMonitor+import Amazonka.Rum.Types.AppMonitorConfiguration+import Amazonka.Rum.Types.AppMonitorDetails+import Amazonka.Rum.Types.AppMonitorSummary+import Amazonka.Rum.Types.BatchCreateRumMetricDefinitionsError+import Amazonka.Rum.Types.BatchDeleteRumMetricDefinitionsError+import Amazonka.Rum.Types.CustomEvents+import Amazonka.Rum.Types.CustomEventsStatus+import Amazonka.Rum.Types.CwLog+import Amazonka.Rum.Types.DataStorage+import Amazonka.Rum.Types.MetricDefinition+import Amazonka.Rum.Types.MetricDefinitionRequest+import Amazonka.Rum.Types.MetricDestination+import Amazonka.Rum.Types.MetricDestinationSummary+import Amazonka.Rum.Types.QueryFilter+import Amazonka.Rum.Types.RumEvent+import Amazonka.Rum.Types.StateEnum+import Amazonka.Rum.Types.Telemetry+import Amazonka.Rum.Types.TimeRange+import Amazonka.Rum.Types.UserDetails+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2018-05-10@ of the Amazon CloudWatch RUM SDK configuration.+defaultService :: Core.Service+defaultService =+ Core.Service+ { Core.abbrev = "Rum",+ Core.signer = Sign.v4,+ Core.endpointPrefix = "rum",+ Core.signingName = "rum",+ Core.version = "2018-05-10",+ Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+ Core.endpoint = Core.defaultEndpoint defaultService,+ Core.timeout = Prelude.Just 70,+ Core.check = Core.statusSuccess,+ Core.error = Core.parseJSONError "Rum",+ 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 don\'t have sufficient permissions to perform this action.+_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_AccessDeniedException =+ Core._MatchServiceError+ defaultService+ "AccessDeniedException"+ Prelude.. Core.hasStatus 403++-- | This operation attempted to create a resource that already exists.+_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ConflictException =+ Core._MatchServiceError+ defaultService+ "ConflictException"+ Prelude.. Core.hasStatus 409++-- | Internal service exception.+_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalServerException =+ Core._MatchServiceError+ defaultService+ "InternalServerException"+ Prelude.. Core.hasStatus 500++-- | Resource not found.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+ Core._MatchServiceError+ defaultService+ "ResourceNotFoundException"+ Prelude.. Core.hasStatus 404++-- | This request exceeds a service quota.+_ServiceQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceQuotaExceededException =+ Core._MatchServiceError+ defaultService+ "ServiceQuotaExceededException"+ Prelude.. Core.hasStatus 402++-- | The request was throttled because of quota limits.+_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ThrottlingException =+ Core._MatchServiceError+ defaultService+ "ThrottlingException"+ Prelude.. Core.hasStatus 429++-- | One of the arguments for the request is not valid.+_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ValidationException =+ Core._MatchServiceError+ defaultService+ "ValidationException"+ Prelude.. Core.hasStatus 400
+ gen/Amazonka/Rum/Types/AppMonitor.hs view
@@ -0,0 +1,215 @@+{-# 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.Rum.Types.AppMonitor+-- 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.Rum.Types.AppMonitor 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+import Amazonka.Rum.Types.AppMonitorConfiguration+import Amazonka.Rum.Types.CustomEvents+import Amazonka.Rum.Types.DataStorage+import Amazonka.Rum.Types.StateEnum++-- | A RUM app monitor collects telemetry data from your application and+-- sends that data to RUM. The data includes performance and reliability+-- information such as page load time, client-side errors, and user+-- behavior.+--+-- /See:/ 'newAppMonitor' smart constructor.+data AppMonitor = AppMonitor'+ { -- | A structure that contains much of the configuration data for the app+ -- monitor.+ appMonitorConfiguration :: Prelude.Maybe AppMonitorConfiguration,+ -- | The date and time that this app monitor was created.+ created :: Prelude.Maybe Prelude.Text,+ -- | Specifies whether this app monitor allows the web client to define and+ -- send custom events.+ --+ -- For more information about custom events, see+ -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-custom-events.html Send custom events>.+ customEvents :: Prelude.Maybe CustomEvents,+ -- | A structure that contains information about whether this app monitor+ -- stores a copy of the telemetry data that RUM collects using CloudWatch+ -- Logs.+ dataStorage :: Prelude.Maybe DataStorage,+ -- | The top-level internet domain name for which your application has+ -- administrative authority.+ domain :: Prelude.Maybe Prelude.Text,+ -- | The unique ID of this app monitor.+ id :: Prelude.Maybe Prelude.Text,+ -- | The date and time of the most recent changes to this app monitor\'s+ -- configuration.+ lastModified :: Prelude.Maybe Prelude.Text,+ -- | The name of the app monitor.+ name :: Prelude.Maybe Prelude.Text,+ -- | The current state of the app monitor.+ state :: Prelude.Maybe StateEnum,+ -- | The list of tag keys and values associated with this app monitor.+ tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AppMonitor' 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:+--+-- 'appMonitorConfiguration', 'appMonitor_appMonitorConfiguration' - A structure that contains much of the configuration data for the app+-- monitor.+--+-- 'created', 'appMonitor_created' - The date and time that this app monitor was created.+--+-- 'customEvents', 'appMonitor_customEvents' - Specifies whether this app monitor allows the web client to define and+-- send custom events.+--+-- For more information about custom events, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-custom-events.html Send custom events>.+--+-- 'dataStorage', 'appMonitor_dataStorage' - A structure that contains information about whether this app monitor+-- stores a copy of the telemetry data that RUM collects using CloudWatch+-- Logs.+--+-- 'domain', 'appMonitor_domain' - The top-level internet domain name for which your application has+-- administrative authority.+--+-- 'id', 'appMonitor_id' - The unique ID of this app monitor.+--+-- 'lastModified', 'appMonitor_lastModified' - The date and time of the most recent changes to this app monitor\'s+-- configuration.+--+-- 'name', 'appMonitor_name' - The name of the app monitor.+--+-- 'state', 'appMonitor_state' - The current state of the app monitor.+--+-- 'tags', 'appMonitor_tags' - The list of tag keys and values associated with this app monitor.+newAppMonitor ::+ AppMonitor+newAppMonitor =+ AppMonitor'+ { appMonitorConfiguration =+ Prelude.Nothing,+ created = Prelude.Nothing,+ customEvents = Prelude.Nothing,+ dataStorage = Prelude.Nothing,+ domain = Prelude.Nothing,+ id = Prelude.Nothing,+ lastModified = Prelude.Nothing,+ name = Prelude.Nothing,+ state = Prelude.Nothing,+ tags = Prelude.Nothing+ }++-- | A structure that contains much of the configuration data for the app+-- monitor.+appMonitor_appMonitorConfiguration :: Lens.Lens' AppMonitor (Prelude.Maybe AppMonitorConfiguration)+appMonitor_appMonitorConfiguration = Lens.lens (\AppMonitor' {appMonitorConfiguration} -> appMonitorConfiguration) (\s@AppMonitor' {} a -> s {appMonitorConfiguration = a} :: AppMonitor)++-- | The date and time that this app monitor was created.+appMonitor_created :: Lens.Lens' AppMonitor (Prelude.Maybe Prelude.Text)+appMonitor_created = Lens.lens (\AppMonitor' {created} -> created) (\s@AppMonitor' {} a -> s {created = a} :: AppMonitor)++-- | Specifies whether this app monitor allows the web client to define and+-- send custom events.+--+-- For more information about custom events, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-custom-events.html Send custom events>.+appMonitor_customEvents :: Lens.Lens' AppMonitor (Prelude.Maybe CustomEvents)+appMonitor_customEvents = Lens.lens (\AppMonitor' {customEvents} -> customEvents) (\s@AppMonitor' {} a -> s {customEvents = a} :: AppMonitor)++-- | A structure that contains information about whether this app monitor+-- stores a copy of the telemetry data that RUM collects using CloudWatch+-- Logs.+appMonitor_dataStorage :: Lens.Lens' AppMonitor (Prelude.Maybe DataStorage)+appMonitor_dataStorage = Lens.lens (\AppMonitor' {dataStorage} -> dataStorage) (\s@AppMonitor' {} a -> s {dataStorage = a} :: AppMonitor)++-- | The top-level internet domain name for which your application has+-- administrative authority.+appMonitor_domain :: Lens.Lens' AppMonitor (Prelude.Maybe Prelude.Text)+appMonitor_domain = Lens.lens (\AppMonitor' {domain} -> domain) (\s@AppMonitor' {} a -> s {domain = a} :: AppMonitor)++-- | The unique ID of this app monitor.+appMonitor_id :: Lens.Lens' AppMonitor (Prelude.Maybe Prelude.Text)+appMonitor_id = Lens.lens (\AppMonitor' {id} -> id) (\s@AppMonitor' {} a -> s {id = a} :: AppMonitor)++-- | The date and time of the most recent changes to this app monitor\'s+-- configuration.+appMonitor_lastModified :: Lens.Lens' AppMonitor (Prelude.Maybe Prelude.Text)+appMonitor_lastModified = Lens.lens (\AppMonitor' {lastModified} -> lastModified) (\s@AppMonitor' {} a -> s {lastModified = a} :: AppMonitor)++-- | The name of the app monitor.+appMonitor_name :: Lens.Lens' AppMonitor (Prelude.Maybe Prelude.Text)+appMonitor_name = Lens.lens (\AppMonitor' {name} -> name) (\s@AppMonitor' {} a -> s {name = a} :: AppMonitor)++-- | The current state of the app monitor.+appMonitor_state :: Lens.Lens' AppMonitor (Prelude.Maybe StateEnum)+appMonitor_state = Lens.lens (\AppMonitor' {state} -> state) (\s@AppMonitor' {} a -> s {state = a} :: AppMonitor)++-- | The list of tag keys and values associated with this app monitor.+appMonitor_tags :: Lens.Lens' AppMonitor (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+appMonitor_tags = Lens.lens (\AppMonitor' {tags} -> tags) (\s@AppMonitor' {} a -> s {tags = a} :: AppMonitor) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON AppMonitor where+ parseJSON =+ Data.withObject+ "AppMonitor"+ ( \x ->+ AppMonitor'+ Prelude.<$> (x Data..:? "AppMonitorConfiguration")+ Prelude.<*> (x Data..:? "Created")+ Prelude.<*> (x Data..:? "CustomEvents")+ Prelude.<*> (x Data..:? "DataStorage")+ Prelude.<*> (x Data..:? "Domain")+ Prelude.<*> (x Data..:? "Id")+ Prelude.<*> (x Data..:? "LastModified")+ Prelude.<*> (x Data..:? "Name")+ Prelude.<*> (x Data..:? "State")+ Prelude.<*> (x Data..:? "Tags" Data..!= Prelude.mempty)+ )++instance Prelude.Hashable AppMonitor where+ hashWithSalt _salt AppMonitor' {..} =+ _salt+ `Prelude.hashWithSalt` appMonitorConfiguration+ `Prelude.hashWithSalt` created+ `Prelude.hashWithSalt` customEvents+ `Prelude.hashWithSalt` dataStorage+ `Prelude.hashWithSalt` domain+ `Prelude.hashWithSalt` id+ `Prelude.hashWithSalt` lastModified+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` state+ `Prelude.hashWithSalt` tags++instance Prelude.NFData AppMonitor where+ rnf AppMonitor' {..} =+ Prelude.rnf appMonitorConfiguration+ `Prelude.seq` Prelude.rnf created+ `Prelude.seq` Prelude.rnf customEvents+ `Prelude.seq` Prelude.rnf dataStorage+ `Prelude.seq` Prelude.rnf domain+ `Prelude.seq` Prelude.rnf id+ `Prelude.seq` Prelude.rnf lastModified+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf state+ `Prelude.seq` Prelude.rnf tags
+ gen/Amazonka/Rum/Types/AppMonitorConfiguration.hs view
@@ -0,0 +1,312 @@+{-# 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.Rum.Types.AppMonitorConfiguration+-- 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.Rum.Types.AppMonitorConfiguration 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+import Amazonka.Rum.Types.Telemetry++-- | This structure contains much of the configuration data for the app+-- monitor.+--+-- /See:/ 'newAppMonitorConfiguration' smart constructor.+data AppMonitorConfiguration = AppMonitorConfiguration'+ { -- | If you set this to @true@, the RUM web client sets two cookies, a+ -- session cookie and a user cookie. The cookies allow the RUM web client+ -- to collect data relating to the number of users an application has and+ -- the behavior of the application across a sequence of events. Cookies are+ -- stored in the top-level domain of the current page.+ allowCookies :: Prelude.Maybe Prelude.Bool,+ -- | If you set this to @true@, RUM enables X-Ray tracing for the user+ -- sessions that RUM samples. RUM adds an X-Ray trace header to allowed+ -- HTTP requests. It also records an X-Ray segment for allowed HTTP+ -- requests. You can see traces and segments from these user sessions in+ -- the X-Ray console and the CloudWatch ServiceLens console. For more+ -- information, see+ -- <https://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html What is X-Ray?>+ enableXRay :: Prelude.Maybe Prelude.Bool,+ -- | A list of URLs in your website or application to exclude from RUM data+ -- collection.+ --+ -- You can\'t include both @ExcludedPages@ and @IncludedPages@ in the same+ -- operation.+ excludedPages :: Prelude.Maybe [Prelude.Text],+ -- | A list of pages in your application that are to be displayed with a+ -- \"favorite\" icon in the CloudWatch RUM console.+ favoritePages :: Prelude.Maybe [Prelude.Text],+ -- | The ARN of the guest IAM role that is attached to the Amazon Cognito+ -- identity pool that is used to authorize the sending of data to RUM.+ guestRoleArn :: Prelude.Maybe Prelude.Text,+ -- | The ID of the Amazon Cognito identity pool that is used to authorize the+ -- sending of data to RUM.+ identityPoolId :: Prelude.Maybe Prelude.Text,+ -- | If this app monitor is to collect data from only certain pages in your+ -- application, this structure lists those pages.+ --+ -- You can\'t include both @ExcludedPages@ and @IncludedPages@ in the same+ -- operation.+ includedPages :: Prelude.Maybe [Prelude.Text],+ -- | Specifies the portion of user sessions to use for RUM data collection.+ -- Choosing a higher portion gives you more data but also incurs more+ -- costs.+ --+ -- The range for this value is 0 to 1 inclusive. Setting this to 1 means+ -- that 100% of user sessions are sampled, and setting it to 0.1 means that+ -- 10% of user sessions are sampled.+ --+ -- If you omit this parameter, the default of 0.1 is used, and 10% of+ -- sessions will be sampled.+ sessionSampleRate :: Prelude.Maybe Prelude.Double,+ -- | An array that lists the types of telemetry data that this app monitor is+ -- to collect.+ --+ -- - @errors@ indicates that RUM collects data about unhandled JavaScript+ -- errors raised by your application.+ --+ -- - @performance@ indicates that RUM collects performance data about how+ -- your application and its resources are loaded and rendered. This+ -- includes Core Web Vitals.+ --+ -- - @http@ indicates that RUM collects data about HTTP errors thrown by+ -- your application.+ telemetries :: Prelude.Maybe [Telemetry]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AppMonitorConfiguration' 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:+--+-- 'allowCookies', 'appMonitorConfiguration_allowCookies' - If you set this to @true@, the RUM web client sets two cookies, a+-- session cookie and a user cookie. The cookies allow the RUM web client+-- to collect data relating to the number of users an application has and+-- the behavior of the application across a sequence of events. Cookies are+-- stored in the top-level domain of the current page.+--+-- 'enableXRay', 'appMonitorConfiguration_enableXRay' - If you set this to @true@, RUM enables X-Ray tracing for the user+-- sessions that RUM samples. RUM adds an X-Ray trace header to allowed+-- HTTP requests. It also records an X-Ray segment for allowed HTTP+-- requests. You can see traces and segments from these user sessions in+-- the X-Ray console and the CloudWatch ServiceLens console. For more+-- information, see+-- <https://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html What is X-Ray?>+--+-- 'excludedPages', 'appMonitorConfiguration_excludedPages' - A list of URLs in your website or application to exclude from RUM data+-- collection.+--+-- You can\'t include both @ExcludedPages@ and @IncludedPages@ in the same+-- operation.+--+-- 'favoritePages', 'appMonitorConfiguration_favoritePages' - A list of pages in your application that are to be displayed with a+-- \"favorite\" icon in the CloudWatch RUM console.+--+-- 'guestRoleArn', 'appMonitorConfiguration_guestRoleArn' - The ARN of the guest IAM role that is attached to the Amazon Cognito+-- identity pool that is used to authorize the sending of data to RUM.+--+-- 'identityPoolId', 'appMonitorConfiguration_identityPoolId' - The ID of the Amazon Cognito identity pool that is used to authorize the+-- sending of data to RUM.+--+-- 'includedPages', 'appMonitorConfiguration_includedPages' - If this app monitor is to collect data from only certain pages in your+-- application, this structure lists those pages.+--+-- You can\'t include both @ExcludedPages@ and @IncludedPages@ in the same+-- operation.+--+-- 'sessionSampleRate', 'appMonitorConfiguration_sessionSampleRate' - Specifies the portion of user sessions to use for RUM data collection.+-- Choosing a higher portion gives you more data but also incurs more+-- costs.+--+-- The range for this value is 0 to 1 inclusive. Setting this to 1 means+-- that 100% of user sessions are sampled, and setting it to 0.1 means that+-- 10% of user sessions are sampled.+--+-- If you omit this parameter, the default of 0.1 is used, and 10% of+-- sessions will be sampled.+--+-- 'telemetries', 'appMonitorConfiguration_telemetries' - An array that lists the types of telemetry data that this app monitor is+-- to collect.+--+-- - @errors@ indicates that RUM collects data about unhandled JavaScript+-- errors raised by your application.+--+-- - @performance@ indicates that RUM collects performance data about how+-- your application and its resources are loaded and rendered. This+-- includes Core Web Vitals.+--+-- - @http@ indicates that RUM collects data about HTTP errors thrown by+-- your application.+newAppMonitorConfiguration ::+ AppMonitorConfiguration+newAppMonitorConfiguration =+ AppMonitorConfiguration'+ { allowCookies =+ Prelude.Nothing,+ enableXRay = Prelude.Nothing,+ excludedPages = Prelude.Nothing,+ favoritePages = Prelude.Nothing,+ guestRoleArn = Prelude.Nothing,+ identityPoolId = Prelude.Nothing,+ includedPages = Prelude.Nothing,+ sessionSampleRate = Prelude.Nothing,+ telemetries = Prelude.Nothing+ }++-- | If you set this to @true@, the RUM web client sets two cookies, a+-- session cookie and a user cookie. The cookies allow the RUM web client+-- to collect data relating to the number of users an application has and+-- the behavior of the application across a sequence of events. Cookies are+-- stored in the top-level domain of the current page.+appMonitorConfiguration_allowCookies :: Lens.Lens' AppMonitorConfiguration (Prelude.Maybe Prelude.Bool)+appMonitorConfiguration_allowCookies = Lens.lens (\AppMonitorConfiguration' {allowCookies} -> allowCookies) (\s@AppMonitorConfiguration' {} a -> s {allowCookies = a} :: AppMonitorConfiguration)++-- | If you set this to @true@, RUM enables X-Ray tracing for the user+-- sessions that RUM samples. RUM adds an X-Ray trace header to allowed+-- HTTP requests. It also records an X-Ray segment for allowed HTTP+-- requests. You can see traces and segments from these user sessions in+-- the X-Ray console and the CloudWatch ServiceLens console. For more+-- information, see+-- <https://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html What is X-Ray?>+appMonitorConfiguration_enableXRay :: Lens.Lens' AppMonitorConfiguration (Prelude.Maybe Prelude.Bool)+appMonitorConfiguration_enableXRay = Lens.lens (\AppMonitorConfiguration' {enableXRay} -> enableXRay) (\s@AppMonitorConfiguration' {} a -> s {enableXRay = a} :: AppMonitorConfiguration)++-- | A list of URLs in your website or application to exclude from RUM data+-- collection.+--+-- You can\'t include both @ExcludedPages@ and @IncludedPages@ in the same+-- operation.+appMonitorConfiguration_excludedPages :: Lens.Lens' AppMonitorConfiguration (Prelude.Maybe [Prelude.Text])+appMonitorConfiguration_excludedPages = Lens.lens (\AppMonitorConfiguration' {excludedPages} -> excludedPages) (\s@AppMonitorConfiguration' {} a -> s {excludedPages = a} :: AppMonitorConfiguration) Prelude.. Lens.mapping Lens.coerced++-- | A list of pages in your application that are to be displayed with a+-- \"favorite\" icon in the CloudWatch RUM console.+appMonitorConfiguration_favoritePages :: Lens.Lens' AppMonitorConfiguration (Prelude.Maybe [Prelude.Text])+appMonitorConfiguration_favoritePages = Lens.lens (\AppMonitorConfiguration' {favoritePages} -> favoritePages) (\s@AppMonitorConfiguration' {} a -> s {favoritePages = a} :: AppMonitorConfiguration) Prelude.. Lens.mapping Lens.coerced++-- | The ARN of the guest IAM role that is attached to the Amazon Cognito+-- identity pool that is used to authorize the sending of data to RUM.+appMonitorConfiguration_guestRoleArn :: Lens.Lens' AppMonitorConfiguration (Prelude.Maybe Prelude.Text)+appMonitorConfiguration_guestRoleArn = Lens.lens (\AppMonitorConfiguration' {guestRoleArn} -> guestRoleArn) (\s@AppMonitorConfiguration' {} a -> s {guestRoleArn = a} :: AppMonitorConfiguration)++-- | The ID of the Amazon Cognito identity pool that is used to authorize the+-- sending of data to RUM.+appMonitorConfiguration_identityPoolId :: Lens.Lens' AppMonitorConfiguration (Prelude.Maybe Prelude.Text)+appMonitorConfiguration_identityPoolId = Lens.lens (\AppMonitorConfiguration' {identityPoolId} -> identityPoolId) (\s@AppMonitorConfiguration' {} a -> s {identityPoolId = a} :: AppMonitorConfiguration)++-- | If this app monitor is to collect data from only certain pages in your+-- application, this structure lists those pages.+--+-- You can\'t include both @ExcludedPages@ and @IncludedPages@ in the same+-- operation.+appMonitorConfiguration_includedPages :: Lens.Lens' AppMonitorConfiguration (Prelude.Maybe [Prelude.Text])+appMonitorConfiguration_includedPages = Lens.lens (\AppMonitorConfiguration' {includedPages} -> includedPages) (\s@AppMonitorConfiguration' {} a -> s {includedPages = a} :: AppMonitorConfiguration) Prelude.. Lens.mapping Lens.coerced++-- | Specifies the portion of user sessions to use for RUM data collection.+-- Choosing a higher portion gives you more data but also incurs more+-- costs.+--+-- The range for this value is 0 to 1 inclusive. Setting this to 1 means+-- that 100% of user sessions are sampled, and setting it to 0.1 means that+-- 10% of user sessions are sampled.+--+-- If you omit this parameter, the default of 0.1 is used, and 10% of+-- sessions will be sampled.+appMonitorConfiguration_sessionSampleRate :: Lens.Lens' AppMonitorConfiguration (Prelude.Maybe Prelude.Double)+appMonitorConfiguration_sessionSampleRate = Lens.lens (\AppMonitorConfiguration' {sessionSampleRate} -> sessionSampleRate) (\s@AppMonitorConfiguration' {} a -> s {sessionSampleRate = a} :: AppMonitorConfiguration)++-- | An array that lists the types of telemetry data that this app monitor is+-- to collect.+--+-- - @errors@ indicates that RUM collects data about unhandled JavaScript+-- errors raised by your application.+--+-- - @performance@ indicates that RUM collects performance data about how+-- your application and its resources are loaded and rendered. This+-- includes Core Web Vitals.+--+-- - @http@ indicates that RUM collects data about HTTP errors thrown by+-- your application.+appMonitorConfiguration_telemetries :: Lens.Lens' AppMonitorConfiguration (Prelude.Maybe [Telemetry])+appMonitorConfiguration_telemetries = Lens.lens (\AppMonitorConfiguration' {telemetries} -> telemetries) (\s@AppMonitorConfiguration' {} a -> s {telemetries = a} :: AppMonitorConfiguration) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON AppMonitorConfiguration where+ parseJSON =+ Data.withObject+ "AppMonitorConfiguration"+ ( \x ->+ AppMonitorConfiguration'+ Prelude.<$> (x Data..:? "AllowCookies")+ Prelude.<*> (x Data..:? "EnableXRay")+ Prelude.<*> (x Data..:? "ExcludedPages" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "FavoritePages" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "GuestRoleArn")+ Prelude.<*> (x Data..:? "IdentityPoolId")+ Prelude.<*> (x Data..:? "IncludedPages" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "SessionSampleRate")+ Prelude.<*> (x Data..:? "Telemetries" Data..!= Prelude.mempty)+ )++instance Prelude.Hashable AppMonitorConfiguration where+ hashWithSalt _salt AppMonitorConfiguration' {..} =+ _salt+ `Prelude.hashWithSalt` allowCookies+ `Prelude.hashWithSalt` enableXRay+ `Prelude.hashWithSalt` excludedPages+ `Prelude.hashWithSalt` favoritePages+ `Prelude.hashWithSalt` guestRoleArn+ `Prelude.hashWithSalt` identityPoolId+ `Prelude.hashWithSalt` includedPages+ `Prelude.hashWithSalt` sessionSampleRate+ `Prelude.hashWithSalt` telemetries++instance Prelude.NFData AppMonitorConfiguration where+ rnf AppMonitorConfiguration' {..} =+ Prelude.rnf allowCookies+ `Prelude.seq` Prelude.rnf enableXRay+ `Prelude.seq` Prelude.rnf excludedPages+ `Prelude.seq` Prelude.rnf favoritePages+ `Prelude.seq` Prelude.rnf guestRoleArn+ `Prelude.seq` Prelude.rnf identityPoolId+ `Prelude.seq` Prelude.rnf includedPages+ `Prelude.seq` Prelude.rnf sessionSampleRate+ `Prelude.seq` Prelude.rnf telemetries++instance Data.ToJSON AppMonitorConfiguration where+ toJSON AppMonitorConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("AllowCookies" Data..=) Prelude.<$> allowCookies,+ ("EnableXRay" Data..=) Prelude.<$> enableXRay,+ ("ExcludedPages" Data..=) Prelude.<$> excludedPages,+ ("FavoritePages" Data..=) Prelude.<$> favoritePages,+ ("GuestRoleArn" Data..=) Prelude.<$> guestRoleArn,+ ("IdentityPoolId" Data..=)+ Prelude.<$> identityPoolId,+ ("IncludedPages" Data..=) Prelude.<$> includedPages,+ ("SessionSampleRate" Data..=)+ Prelude.<$> sessionSampleRate,+ ("Telemetries" Data..=) Prelude.<$> telemetries+ ]+ )
+ gen/Amazonka/Rum/Types/AppMonitorDetails.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.Rum.Types.AppMonitorDetails+-- 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.Rum.Types.AppMonitorDetails where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A structure that contains information about the RUM app monitor.+--+-- /See:/ 'newAppMonitorDetails' smart constructor.+data AppMonitorDetails = AppMonitorDetails'+ { -- | The unique ID of the app monitor.+ id :: Prelude.Maybe Prelude.Text,+ -- | The name of the app monitor.+ name :: Prelude.Maybe Prelude.Text,+ -- | The version of the app monitor.+ version :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AppMonitorDetails' 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:+--+-- 'id', 'appMonitorDetails_id' - The unique ID of the app monitor.+--+-- 'name', 'appMonitorDetails_name' - The name of the app monitor.+--+-- 'version', 'appMonitorDetails_version' - The version of the app monitor.+newAppMonitorDetails ::+ AppMonitorDetails+newAppMonitorDetails =+ AppMonitorDetails'+ { id = Prelude.Nothing,+ name = Prelude.Nothing,+ version = Prelude.Nothing+ }++-- | The unique ID of the app monitor.+appMonitorDetails_id :: Lens.Lens' AppMonitorDetails (Prelude.Maybe Prelude.Text)+appMonitorDetails_id = Lens.lens (\AppMonitorDetails' {id} -> id) (\s@AppMonitorDetails' {} a -> s {id = a} :: AppMonitorDetails)++-- | The name of the app monitor.+appMonitorDetails_name :: Lens.Lens' AppMonitorDetails (Prelude.Maybe Prelude.Text)+appMonitorDetails_name = Lens.lens (\AppMonitorDetails' {name} -> name) (\s@AppMonitorDetails' {} a -> s {name = a} :: AppMonitorDetails)++-- | The version of the app monitor.+appMonitorDetails_version :: Lens.Lens' AppMonitorDetails (Prelude.Maybe Prelude.Text)+appMonitorDetails_version = Lens.lens (\AppMonitorDetails' {version} -> version) (\s@AppMonitorDetails' {} a -> s {version = a} :: AppMonitorDetails)++instance Prelude.Hashable AppMonitorDetails where+ hashWithSalt _salt AppMonitorDetails' {..} =+ _salt+ `Prelude.hashWithSalt` id+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` version++instance Prelude.NFData AppMonitorDetails where+ rnf AppMonitorDetails' {..} =+ Prelude.rnf id+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf version++instance Data.ToJSON AppMonitorDetails where+ toJSON AppMonitorDetails' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("id" Data..=) Prelude.<$> id,+ ("name" Data..=) Prelude.<$> name,+ ("version" Data..=) Prelude.<$> version+ ]+ )
+ gen/Amazonka/Rum/Types/AppMonitorSummary.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.Rum.Types.AppMonitorSummary+-- 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.Rum.Types.AppMonitorSummary 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+import Amazonka.Rum.Types.StateEnum++-- | A structure that includes some data about app monitors and their+-- settings.+--+-- /See:/ 'newAppMonitorSummary' smart constructor.+data AppMonitorSummary = AppMonitorSummary'+ { -- | The date and time that the app monitor was created.+ created :: Prelude.Maybe Prelude.Text,+ -- | The unique ID of this app monitor.+ id :: Prelude.Maybe Prelude.Text,+ -- | The date and time of the most recent changes to this app monitor\'s+ -- configuration.+ lastModified :: Prelude.Maybe Prelude.Text,+ -- | The name of this app monitor.+ name :: Prelude.Maybe Prelude.Text,+ -- | The current state of this app monitor.+ state :: Prelude.Maybe StateEnum+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AppMonitorSummary' 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:+--+-- 'created', 'appMonitorSummary_created' - The date and time that the app monitor was created.+--+-- 'id', 'appMonitorSummary_id' - The unique ID of this app monitor.+--+-- 'lastModified', 'appMonitorSummary_lastModified' - The date and time of the most recent changes to this app monitor\'s+-- configuration.+--+-- 'name', 'appMonitorSummary_name' - The name of this app monitor.+--+-- 'state', 'appMonitorSummary_state' - The current state of this app monitor.+newAppMonitorSummary ::+ AppMonitorSummary+newAppMonitorSummary =+ AppMonitorSummary'+ { created = Prelude.Nothing,+ id = Prelude.Nothing,+ lastModified = Prelude.Nothing,+ name = Prelude.Nothing,+ state = Prelude.Nothing+ }++-- | The date and time that the app monitor was created.+appMonitorSummary_created :: Lens.Lens' AppMonitorSummary (Prelude.Maybe Prelude.Text)+appMonitorSummary_created = Lens.lens (\AppMonitorSummary' {created} -> created) (\s@AppMonitorSummary' {} a -> s {created = a} :: AppMonitorSummary)++-- | The unique ID of this app monitor.+appMonitorSummary_id :: Lens.Lens' AppMonitorSummary (Prelude.Maybe Prelude.Text)+appMonitorSummary_id = Lens.lens (\AppMonitorSummary' {id} -> id) (\s@AppMonitorSummary' {} a -> s {id = a} :: AppMonitorSummary)++-- | The date and time of the most recent changes to this app monitor\'s+-- configuration.+appMonitorSummary_lastModified :: Lens.Lens' AppMonitorSummary (Prelude.Maybe Prelude.Text)+appMonitorSummary_lastModified = Lens.lens (\AppMonitorSummary' {lastModified} -> lastModified) (\s@AppMonitorSummary' {} a -> s {lastModified = a} :: AppMonitorSummary)++-- | The name of this app monitor.+appMonitorSummary_name :: Lens.Lens' AppMonitorSummary (Prelude.Maybe Prelude.Text)+appMonitorSummary_name = Lens.lens (\AppMonitorSummary' {name} -> name) (\s@AppMonitorSummary' {} a -> s {name = a} :: AppMonitorSummary)++-- | The current state of this app monitor.+appMonitorSummary_state :: Lens.Lens' AppMonitorSummary (Prelude.Maybe StateEnum)+appMonitorSummary_state = Lens.lens (\AppMonitorSummary' {state} -> state) (\s@AppMonitorSummary' {} a -> s {state = a} :: AppMonitorSummary)++instance Data.FromJSON AppMonitorSummary where+ parseJSON =+ Data.withObject+ "AppMonitorSummary"+ ( \x ->+ AppMonitorSummary'+ Prelude.<$> (x Data..:? "Created")+ Prelude.<*> (x Data..:? "Id")+ Prelude.<*> (x Data..:? "LastModified")+ Prelude.<*> (x Data..:? "Name")+ Prelude.<*> (x Data..:? "State")+ )++instance Prelude.Hashable AppMonitorSummary where+ hashWithSalt _salt AppMonitorSummary' {..} =+ _salt+ `Prelude.hashWithSalt` created+ `Prelude.hashWithSalt` id+ `Prelude.hashWithSalt` lastModified+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` state++instance Prelude.NFData AppMonitorSummary where+ rnf AppMonitorSummary' {..} =+ Prelude.rnf created+ `Prelude.seq` Prelude.rnf id+ `Prelude.seq` Prelude.rnf lastModified+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf state
+ gen/Amazonka/Rum/Types/BatchCreateRumMetricDefinitionsError.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.Rum.Types.BatchCreateRumMetricDefinitionsError+-- 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.Rum.Types.BatchCreateRumMetricDefinitionsError 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+import Amazonka.Rum.Types.MetricDefinitionRequest++-- | A structure that defines one error caused by a+-- <https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_BatchCreateRumMetricsDefinitions.html BatchCreateRumMetricsDefinitions>+-- operation.+--+-- /See:/ 'newBatchCreateRumMetricDefinitionsError' smart constructor.+data BatchCreateRumMetricDefinitionsError = BatchCreateRumMetricDefinitionsError'+ { -- | The error code.+ errorCode :: Prelude.Text,+ -- | The error message for this metric definition.+ errorMessage :: Prelude.Text,+ -- | The metric definition that caused this error.+ metricDefinition :: MetricDefinitionRequest+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchCreateRumMetricDefinitionsError' 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', 'batchCreateRumMetricDefinitionsError_errorCode' - The error code.+--+-- 'errorMessage', 'batchCreateRumMetricDefinitionsError_errorMessage' - The error message for this metric definition.+--+-- 'metricDefinition', 'batchCreateRumMetricDefinitionsError_metricDefinition' - The metric definition that caused this error.+newBatchCreateRumMetricDefinitionsError ::+ -- | 'errorCode'+ Prelude.Text ->+ -- | 'errorMessage'+ Prelude.Text ->+ -- | 'metricDefinition'+ MetricDefinitionRequest ->+ BatchCreateRumMetricDefinitionsError+newBatchCreateRumMetricDefinitionsError+ pErrorCode_+ pErrorMessage_+ pMetricDefinition_ =+ BatchCreateRumMetricDefinitionsError'+ { errorCode =+ pErrorCode_,+ errorMessage = pErrorMessage_,+ metricDefinition = pMetricDefinition_+ }++-- | The error code.+batchCreateRumMetricDefinitionsError_errorCode :: Lens.Lens' BatchCreateRumMetricDefinitionsError Prelude.Text+batchCreateRumMetricDefinitionsError_errorCode = Lens.lens (\BatchCreateRumMetricDefinitionsError' {errorCode} -> errorCode) (\s@BatchCreateRumMetricDefinitionsError' {} a -> s {errorCode = a} :: BatchCreateRumMetricDefinitionsError)++-- | The error message for this metric definition.+batchCreateRumMetricDefinitionsError_errorMessage :: Lens.Lens' BatchCreateRumMetricDefinitionsError Prelude.Text+batchCreateRumMetricDefinitionsError_errorMessage = Lens.lens (\BatchCreateRumMetricDefinitionsError' {errorMessage} -> errorMessage) (\s@BatchCreateRumMetricDefinitionsError' {} a -> s {errorMessage = a} :: BatchCreateRumMetricDefinitionsError)++-- | The metric definition that caused this error.+batchCreateRumMetricDefinitionsError_metricDefinition :: Lens.Lens' BatchCreateRumMetricDefinitionsError MetricDefinitionRequest+batchCreateRumMetricDefinitionsError_metricDefinition = Lens.lens (\BatchCreateRumMetricDefinitionsError' {metricDefinition} -> metricDefinition) (\s@BatchCreateRumMetricDefinitionsError' {} a -> s {metricDefinition = a} :: BatchCreateRumMetricDefinitionsError)++instance+ Data.FromJSON+ BatchCreateRumMetricDefinitionsError+ where+ parseJSON =+ Data.withObject+ "BatchCreateRumMetricDefinitionsError"+ ( \x ->+ BatchCreateRumMetricDefinitionsError'+ Prelude.<$> (x Data..: "ErrorCode")+ Prelude.<*> (x Data..: "ErrorMessage")+ Prelude.<*> (x Data..: "MetricDefinition")+ )++instance+ Prelude.Hashable+ BatchCreateRumMetricDefinitionsError+ where+ hashWithSalt+ _salt+ BatchCreateRumMetricDefinitionsError' {..} =+ _salt+ `Prelude.hashWithSalt` errorCode+ `Prelude.hashWithSalt` errorMessage+ `Prelude.hashWithSalt` metricDefinition++instance+ Prelude.NFData+ BatchCreateRumMetricDefinitionsError+ where+ rnf BatchCreateRumMetricDefinitionsError' {..} =+ Prelude.rnf errorCode+ `Prelude.seq` Prelude.rnf errorMessage+ `Prelude.seq` Prelude.rnf metricDefinition
+ gen/Amazonka/Rum/Types/BatchDeleteRumMetricDefinitionsError.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.Rum.Types.BatchDeleteRumMetricDefinitionsError+-- 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.Rum.Types.BatchDeleteRumMetricDefinitionsError where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A structure that defines one error caused by a+-- <https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_BatchDeleteRumMetricsDefinitions.html BatchCreateRumMetricsDefinitions>+-- operation.+--+-- /See:/ 'newBatchDeleteRumMetricDefinitionsError' smart constructor.+data BatchDeleteRumMetricDefinitionsError = BatchDeleteRumMetricDefinitionsError'+ { -- | The error code.+ errorCode :: Prelude.Text,+ -- | The error message for this metric definition.+ errorMessage :: Prelude.Text,+ -- | The ID of the metric definition that caused this error.+ metricDefinitionId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'BatchDeleteRumMetricDefinitionsError' 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', 'batchDeleteRumMetricDefinitionsError_errorCode' - The error code.+--+-- 'errorMessage', 'batchDeleteRumMetricDefinitionsError_errorMessage' - The error message for this metric definition.+--+-- 'metricDefinitionId', 'batchDeleteRumMetricDefinitionsError_metricDefinitionId' - The ID of the metric definition that caused this error.+newBatchDeleteRumMetricDefinitionsError ::+ -- | 'errorCode'+ Prelude.Text ->+ -- | 'errorMessage'+ Prelude.Text ->+ -- | 'metricDefinitionId'+ Prelude.Text ->+ BatchDeleteRumMetricDefinitionsError+newBatchDeleteRumMetricDefinitionsError+ pErrorCode_+ pErrorMessage_+ pMetricDefinitionId_ =+ BatchDeleteRumMetricDefinitionsError'+ { errorCode =+ pErrorCode_,+ errorMessage = pErrorMessage_,+ metricDefinitionId =+ pMetricDefinitionId_+ }++-- | The error code.+batchDeleteRumMetricDefinitionsError_errorCode :: Lens.Lens' BatchDeleteRumMetricDefinitionsError Prelude.Text+batchDeleteRumMetricDefinitionsError_errorCode = Lens.lens (\BatchDeleteRumMetricDefinitionsError' {errorCode} -> errorCode) (\s@BatchDeleteRumMetricDefinitionsError' {} a -> s {errorCode = a} :: BatchDeleteRumMetricDefinitionsError)++-- | The error message for this metric definition.+batchDeleteRumMetricDefinitionsError_errorMessage :: Lens.Lens' BatchDeleteRumMetricDefinitionsError Prelude.Text+batchDeleteRumMetricDefinitionsError_errorMessage = Lens.lens (\BatchDeleteRumMetricDefinitionsError' {errorMessage} -> errorMessage) (\s@BatchDeleteRumMetricDefinitionsError' {} a -> s {errorMessage = a} :: BatchDeleteRumMetricDefinitionsError)++-- | The ID of the metric definition that caused this error.+batchDeleteRumMetricDefinitionsError_metricDefinitionId :: Lens.Lens' BatchDeleteRumMetricDefinitionsError Prelude.Text+batchDeleteRumMetricDefinitionsError_metricDefinitionId = Lens.lens (\BatchDeleteRumMetricDefinitionsError' {metricDefinitionId} -> metricDefinitionId) (\s@BatchDeleteRumMetricDefinitionsError' {} a -> s {metricDefinitionId = a} :: BatchDeleteRumMetricDefinitionsError)++instance+ Data.FromJSON+ BatchDeleteRumMetricDefinitionsError+ where+ parseJSON =+ Data.withObject+ "BatchDeleteRumMetricDefinitionsError"+ ( \x ->+ BatchDeleteRumMetricDefinitionsError'+ Prelude.<$> (x Data..: "ErrorCode")+ Prelude.<*> (x Data..: "ErrorMessage")+ Prelude.<*> (x Data..: "MetricDefinitionId")+ )++instance+ Prelude.Hashable+ BatchDeleteRumMetricDefinitionsError+ where+ hashWithSalt+ _salt+ BatchDeleteRumMetricDefinitionsError' {..} =+ _salt+ `Prelude.hashWithSalt` errorCode+ `Prelude.hashWithSalt` errorMessage+ `Prelude.hashWithSalt` metricDefinitionId++instance+ Prelude.NFData+ BatchDeleteRumMetricDefinitionsError+ where+ rnf BatchDeleteRumMetricDefinitionsError' {..} =+ Prelude.rnf errorCode+ `Prelude.seq` Prelude.rnf errorMessage+ `Prelude.seq` Prelude.rnf metricDefinitionId
+ gen/Amazonka/Rum/Types/CustomEvents.hs view
@@ -0,0 +1,79 @@+{-# 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.Rum.Types.CustomEvents+-- 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.Rum.Types.CustomEvents 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+import Amazonka.Rum.Types.CustomEventsStatus++-- | A structure that contains information about custom events for this app+-- monitor.+--+-- /See:/ 'newCustomEvents' smart constructor.+data CustomEvents = CustomEvents'+ { -- | Specifies whether this app monitor allows the web client to define and+ -- send custom events. The default is for custom events to be @DISABLED@.+ status :: Prelude.Maybe CustomEventsStatus+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CustomEvents' 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:+--+-- 'status', 'customEvents_status' - Specifies whether this app monitor allows the web client to define and+-- send custom events. The default is for custom events to be @DISABLED@.+newCustomEvents ::+ CustomEvents+newCustomEvents =+ CustomEvents' {status = Prelude.Nothing}++-- | Specifies whether this app monitor allows the web client to define and+-- send custom events. The default is for custom events to be @DISABLED@.+customEvents_status :: Lens.Lens' CustomEvents (Prelude.Maybe CustomEventsStatus)+customEvents_status = Lens.lens (\CustomEvents' {status} -> status) (\s@CustomEvents' {} a -> s {status = a} :: CustomEvents)++instance Data.FromJSON CustomEvents where+ parseJSON =+ Data.withObject+ "CustomEvents"+ ( \x ->+ CustomEvents' Prelude.<$> (x Data..:? "Status")+ )++instance Prelude.Hashable CustomEvents where+ hashWithSalt _salt CustomEvents' {..} =+ _salt `Prelude.hashWithSalt` status++instance Prelude.NFData CustomEvents where+ rnf CustomEvents' {..} = Prelude.rnf status++instance Data.ToJSON CustomEvents where+ toJSON CustomEvents' {..} =+ Data.object+ ( Prelude.catMaybes+ [("Status" Data..=) Prelude.<$> status]+ )
+ gen/Amazonka/Rum/Types/CustomEventsStatus.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.Rum.Types.CustomEventsStatus+-- 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.Rum.Types.CustomEventsStatus+ ( CustomEventsStatus+ ( ..,+ CustomEventsStatus_DISABLED,+ CustomEventsStatus_ENABLED+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype CustomEventsStatus = CustomEventsStatus'+ { fromCustomEventsStatus ::+ 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 CustomEventsStatus_DISABLED :: CustomEventsStatus+pattern CustomEventsStatus_DISABLED = CustomEventsStatus' "DISABLED"++pattern CustomEventsStatus_ENABLED :: CustomEventsStatus+pattern CustomEventsStatus_ENABLED = CustomEventsStatus' "ENABLED"++{-# COMPLETE+ CustomEventsStatus_DISABLED,+ CustomEventsStatus_ENABLED,+ CustomEventsStatus'+ #-}
+ gen/Amazonka/Rum/Types/CwLog.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.Rum.Types.CwLog+-- 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.Rum.Types.CwLog where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A structure that contains the information about whether the app monitor+-- stores copies of the data that RUM collects in CloudWatch Logs. If it+-- does, this structure also contains the name of the log group.+--+-- /See:/ 'newCwLog' smart constructor.+data CwLog = CwLog'+ { -- | Indicated whether the app monitor stores copies of the data that RUM+ -- collects in CloudWatch Logs.+ cwLogEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The name of the log group where the copies are stored.+ cwLogGroup :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CwLog' 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:+--+-- 'cwLogEnabled', 'cwLog_cwLogEnabled' - Indicated whether the app monitor stores copies of the data that RUM+-- collects in CloudWatch Logs.+--+-- 'cwLogGroup', 'cwLog_cwLogGroup' - The name of the log group where the copies are stored.+newCwLog ::+ CwLog+newCwLog =+ CwLog'+ { cwLogEnabled = Prelude.Nothing,+ cwLogGroup = Prelude.Nothing+ }++-- | Indicated whether the app monitor stores copies of the data that RUM+-- collects in CloudWatch Logs.+cwLog_cwLogEnabled :: Lens.Lens' CwLog (Prelude.Maybe Prelude.Bool)+cwLog_cwLogEnabled = Lens.lens (\CwLog' {cwLogEnabled} -> cwLogEnabled) (\s@CwLog' {} a -> s {cwLogEnabled = a} :: CwLog)++-- | The name of the log group where the copies are stored.+cwLog_cwLogGroup :: Lens.Lens' CwLog (Prelude.Maybe Prelude.Text)+cwLog_cwLogGroup = Lens.lens (\CwLog' {cwLogGroup} -> cwLogGroup) (\s@CwLog' {} a -> s {cwLogGroup = a} :: CwLog)++instance Data.FromJSON CwLog where+ parseJSON =+ Data.withObject+ "CwLog"+ ( \x ->+ CwLog'+ Prelude.<$> (x Data..:? "CwLogEnabled")+ Prelude.<*> (x Data..:? "CwLogGroup")+ )++instance Prelude.Hashable CwLog where+ hashWithSalt _salt CwLog' {..} =+ _salt+ `Prelude.hashWithSalt` cwLogEnabled+ `Prelude.hashWithSalt` cwLogGroup++instance Prelude.NFData CwLog where+ rnf CwLog' {..} =+ Prelude.rnf cwLogEnabled+ `Prelude.seq` Prelude.rnf cwLogGroup
+ gen/Amazonka/Rum/Types/DataStorage.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.Rum.Types.DataStorage+-- 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.Rum.Types.DataStorage 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+import Amazonka.Rum.Types.CwLog++-- | A structure that contains information about whether this app monitor+-- stores a copy of the telemetry data that RUM collects using CloudWatch+-- Logs.+--+-- /See:/ 'newDataStorage' smart constructor.+data DataStorage = DataStorage'+ { -- | A structure that contains the information about whether the app monitor+ -- stores copies of the data that RUM collects in CloudWatch Logs. If it+ -- does, this structure also contains the name of the log group.+ cwLog :: Prelude.Maybe CwLog+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DataStorage' 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:+--+-- 'cwLog', 'dataStorage_cwLog' - A structure that contains the information about whether the app monitor+-- stores copies of the data that RUM collects in CloudWatch Logs. If it+-- does, this structure also contains the name of the log group.+newDataStorage ::+ DataStorage+newDataStorage =+ DataStorage' {cwLog = Prelude.Nothing}++-- | A structure that contains the information about whether the app monitor+-- stores copies of the data that RUM collects in CloudWatch Logs. If it+-- does, this structure also contains the name of the log group.+dataStorage_cwLog :: Lens.Lens' DataStorage (Prelude.Maybe CwLog)+dataStorage_cwLog = Lens.lens (\DataStorage' {cwLog} -> cwLog) (\s@DataStorage' {} a -> s {cwLog = a} :: DataStorage)++instance Data.FromJSON DataStorage where+ parseJSON =+ Data.withObject+ "DataStorage"+ ( \x ->+ DataStorage' Prelude.<$> (x Data..:? "CwLog")+ )++instance Prelude.Hashable DataStorage where+ hashWithSalt _salt DataStorage' {..} =+ _salt `Prelude.hashWithSalt` cwLog++instance Prelude.NFData DataStorage where+ rnf DataStorage' {..} = Prelude.rnf cwLog
+ gen/Amazonka/Rum/Types/MetricDefinition.hs view
@@ -0,0 +1,171 @@+{-# 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.Rum.Types.MetricDefinition+-- 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.Rum.Types.MetricDefinition where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A structure that displays the definition of one extended metric that RUM+-- sends to CloudWatch or CloudWatch Evidently. For more information, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-vended-metrics.html Additional metrics that you can send to CloudWatch and CloudWatch Evidently>.+--+-- /See:/ 'newMetricDefinition' smart constructor.+data MetricDefinition = MetricDefinition'+ { -- | This field is a map of field paths to dimension names. It defines the+ -- dimensions to associate with this metric in CloudWatch The value of this+ -- field is used only if the metric destination is @CloudWatch@. If the+ -- metric destination is @Evidently@, the value of @DimensionKeys@ is+ -- ignored.+ dimensionKeys :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The pattern that defines the metric. RUM checks events that happen in a+ -- user\'s session against the pattern, and events that match the pattern+ -- are sent to the metric destination.+ --+ -- If the metrics destination is @CloudWatch@ and the event also matches a+ -- value in @DimensionKeys@, then the metric is published with the+ -- specified dimensions.+ eventPattern :: Prelude.Maybe Prelude.Text,+ -- | Use this field only if you are sending this metric to CloudWatch. It+ -- defines the CloudWatch metric unit that this metric is measured in.+ unitLabel :: Prelude.Maybe Prelude.Text,+ -- | The field within the event object that the metric value is sourced from.+ valueKey :: Prelude.Maybe Prelude.Text,+ -- | The ID of this metric definition.+ metricDefinitionId :: Prelude.Text,+ -- | The name of the metric that is defined in this structure.+ name :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'MetricDefinition' 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:+--+-- 'dimensionKeys', 'metricDefinition_dimensionKeys' - This field is a map of field paths to dimension names. It defines the+-- dimensions to associate with this metric in CloudWatch The value of this+-- field is used only if the metric destination is @CloudWatch@. If the+-- metric destination is @Evidently@, the value of @DimensionKeys@ is+-- ignored.+--+-- 'eventPattern', 'metricDefinition_eventPattern' - The pattern that defines the metric. RUM checks events that happen in a+-- user\'s session against the pattern, and events that match the pattern+-- are sent to the metric destination.+--+-- If the metrics destination is @CloudWatch@ and the event also matches a+-- value in @DimensionKeys@, then the metric is published with the+-- specified dimensions.+--+-- 'unitLabel', 'metricDefinition_unitLabel' - Use this field only if you are sending this metric to CloudWatch. It+-- defines the CloudWatch metric unit that this metric is measured in.+--+-- 'valueKey', 'metricDefinition_valueKey' - The field within the event object that the metric value is sourced from.+--+-- 'metricDefinitionId', 'metricDefinition_metricDefinitionId' - The ID of this metric definition.+--+-- 'name', 'metricDefinition_name' - The name of the metric that is defined in this structure.+newMetricDefinition ::+ -- | 'metricDefinitionId'+ Prelude.Text ->+ -- | 'name'+ Prelude.Text ->+ MetricDefinition+newMetricDefinition pMetricDefinitionId_ pName_ =+ MetricDefinition'+ { dimensionKeys = Prelude.Nothing,+ eventPattern = Prelude.Nothing,+ unitLabel = Prelude.Nothing,+ valueKey = Prelude.Nothing,+ metricDefinitionId = pMetricDefinitionId_,+ name = pName_+ }++-- | This field is a map of field paths to dimension names. It defines the+-- dimensions to associate with this metric in CloudWatch The value of this+-- field is used only if the metric destination is @CloudWatch@. If the+-- metric destination is @Evidently@, the value of @DimensionKeys@ is+-- ignored.+metricDefinition_dimensionKeys :: Lens.Lens' MetricDefinition (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+metricDefinition_dimensionKeys = Lens.lens (\MetricDefinition' {dimensionKeys} -> dimensionKeys) (\s@MetricDefinition' {} a -> s {dimensionKeys = a} :: MetricDefinition) Prelude.. Lens.mapping Lens.coerced++-- | The pattern that defines the metric. RUM checks events that happen in a+-- user\'s session against the pattern, and events that match the pattern+-- are sent to the metric destination.+--+-- If the metrics destination is @CloudWatch@ and the event also matches a+-- value in @DimensionKeys@, then the metric is published with the+-- specified dimensions.+metricDefinition_eventPattern :: Lens.Lens' MetricDefinition (Prelude.Maybe Prelude.Text)+metricDefinition_eventPattern = Lens.lens (\MetricDefinition' {eventPattern} -> eventPattern) (\s@MetricDefinition' {} a -> s {eventPattern = a} :: MetricDefinition)++-- | Use this field only if you are sending this metric to CloudWatch. It+-- defines the CloudWatch metric unit that this metric is measured in.+metricDefinition_unitLabel :: Lens.Lens' MetricDefinition (Prelude.Maybe Prelude.Text)+metricDefinition_unitLabel = Lens.lens (\MetricDefinition' {unitLabel} -> unitLabel) (\s@MetricDefinition' {} a -> s {unitLabel = a} :: MetricDefinition)++-- | The field within the event object that the metric value is sourced from.+metricDefinition_valueKey :: Lens.Lens' MetricDefinition (Prelude.Maybe Prelude.Text)+metricDefinition_valueKey = Lens.lens (\MetricDefinition' {valueKey} -> valueKey) (\s@MetricDefinition' {} a -> s {valueKey = a} :: MetricDefinition)++-- | The ID of this metric definition.+metricDefinition_metricDefinitionId :: Lens.Lens' MetricDefinition Prelude.Text+metricDefinition_metricDefinitionId = Lens.lens (\MetricDefinition' {metricDefinitionId} -> metricDefinitionId) (\s@MetricDefinition' {} a -> s {metricDefinitionId = a} :: MetricDefinition)++-- | The name of the metric that is defined in this structure.+metricDefinition_name :: Lens.Lens' MetricDefinition Prelude.Text+metricDefinition_name = Lens.lens (\MetricDefinition' {name} -> name) (\s@MetricDefinition' {} a -> s {name = a} :: MetricDefinition)++instance Data.FromJSON MetricDefinition where+ parseJSON =+ Data.withObject+ "MetricDefinition"+ ( \x ->+ MetricDefinition'+ Prelude.<$> (x Data..:? "DimensionKeys" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "EventPattern")+ Prelude.<*> (x Data..:? "UnitLabel")+ Prelude.<*> (x Data..:? "ValueKey")+ Prelude.<*> (x Data..: "MetricDefinitionId")+ Prelude.<*> (x Data..: "Name")+ )++instance Prelude.Hashable MetricDefinition where+ hashWithSalt _salt MetricDefinition' {..} =+ _salt+ `Prelude.hashWithSalt` dimensionKeys+ `Prelude.hashWithSalt` eventPattern+ `Prelude.hashWithSalt` unitLabel+ `Prelude.hashWithSalt` valueKey+ `Prelude.hashWithSalt` metricDefinitionId+ `Prelude.hashWithSalt` name++instance Prelude.NFData MetricDefinition where+ rnf MetricDefinition' {..} =+ Prelude.rnf dimensionKeys+ `Prelude.seq` Prelude.rnf eventPattern+ `Prelude.seq` Prelude.rnf unitLabel+ `Prelude.seq` Prelude.rnf valueKey+ `Prelude.seq` Prelude.rnf metricDefinitionId+ `Prelude.seq` Prelude.rnf name
+ gen/Amazonka/Rum/Types/MetricDefinitionRequest.hs view
@@ -0,0 +1,390 @@+{-# 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.Rum.Types.MetricDefinitionRequest+-- 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.Rum.Types.MetricDefinitionRequest 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++-- | Use this structure to define one extended metric that RUM will send to+-- CloudWatch or CloudWatch Evidently. For more information, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-vended-metrics.html Additional metrics that you can send to CloudWatch and CloudWatch Evidently>.+--+-- Only certain combinations of values for @Name@, @ValueKey@, and+-- @EventPattern@ are valid. In addition to what is displayed in the list+-- below, the @EventPattern@ can also include information used by the+-- @DimensionKeys@ field.+--+-- - If @Name@ is @PerformanceNavigationDuration@, then @ValueKey@must be+-- @event_details.duration@ and the @EventPattern@ must include+-- @{\"event_type\":[\"com.amazon.rum.performance_navigation_event\"]}@+--+-- - If @Name@ is @PerformanceResourceDuration@, then @ValueKey@must be+-- @event_details.duration@ and the @EventPattern@ must include+-- @{\"event_type\":[\"com.amazon.rum.performance_resource_event\"]}@+--+-- - If @Name@ is @NavigationSatisfiedTransaction@, then @ValueKey@must+-- be null and the @EventPattern@ must include+-- @{ \"event_type\": [\"com.amazon.rum.performance_navigation_event\"], \"event_details\": { \"duration\": [{ \"numeric\": [\">\",2000] }] } }@+--+-- - If @Name@ is @NavigationToleratedTransaction@, then @ValueKey@must+-- be null and the @EventPattern@ must include+-- @{ \"event_type\": [\"com.amazon.rum.performance_navigation_event\"], \"event_details\": { \"duration\": [{ \"numeric\": [\">=\",2000,\"\<\"8000] }] } }@+--+-- - If @Name@ is @NavigationFrustratedTransaction@, then @ValueKey@must+-- be null and the @EventPattern@ must include+-- @{ \"event_type\": [\"com.amazon.rum.performance_navigation_event\"], \"event_details\": { \"duration\": [{ \"numeric\": [\">=\",8000] }] } }@+--+-- - If @Name@ is @WebVitalsCumulativeLayoutShift@, then @ValueKey@must+-- be @event_details.value@ and the @EventPattern@ must include+-- @{\"event_type\":[\"com.amazon.rum.cumulative_layout_shift_event\"]}@+--+-- - If @Name@ is @WebVitalsFirstInputDelay@, then @ValueKey@must be+-- @event_details.value@ and the @EventPattern@ must include+-- @{\"event_type\":[\"com.amazon.rum.first_input_delay_event\"]}@+--+-- - If @Name@ is @WebVitalsLargestContentfulPaint@, then @ValueKey@must+-- be @event_details.value@ and the @EventPattern@ must include+-- @{\"event_type\":[\"com.amazon.rum.largest_contentful_paint_event\"]}@+--+-- - If @Name@ is @JsErrorCount@, then @ValueKey@must be null and the+-- @EventPattern@ must include+-- @{\"event_type\":[\"com.amazon.rum.js_error_event\"]}@+--+-- - If @Name@ is @HttpErrorCount@, then @ValueKey@must be null and the+-- @EventPattern@ must include+-- @{\"event_type\":[\"com.amazon.rum.http_event\"]}@+--+-- - If @Name@ is @SessionCount@, then @ValueKey@must be null and the+-- @EventPattern@ must include+-- @{\"event_type\":[\"com.amazon.rum.session_start_event\"]}@+--+-- /See:/ 'newMetricDefinitionRequest' smart constructor.+data MetricDefinitionRequest = MetricDefinitionRequest'+ { -- | Use this field only if you are sending the metric to CloudWatch.+ --+ -- This field is a map of field paths to dimension names. It defines the+ -- dimensions to associate with this metric in CloudWatch. Valid values for+ -- the entries in this field are the following:+ --+ -- - @\"metadata.pageId\": \"PageId\"@+ --+ -- - @\"metadata.browserName\": \"BrowserName\"@+ --+ -- - @\"metadata.deviceType\": \"DeviceType\"@+ --+ -- - @\"metadata.osName\": \"OSName\"@+ --+ -- - @\"metadata.countryCode\": \"CountryCode\"@+ --+ -- - @\"event_details.fileType\": \"FileType\"@+ --+ -- All dimensions listed in this field must also be included in+ -- @EventPattern@.+ dimensionKeys :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),+ -- | The pattern that defines the metric, specified as a JSON object. RUM+ -- checks events that happen in a user\'s session against the pattern, and+ -- events that match the pattern are sent to the metric destination.+ --+ -- When you define extended metrics, the metric definition is not valid if+ -- @EventPattern@ is omitted.+ --+ -- Example event patterns:+ --+ -- - @\'{ \"event_type\": [\"com.amazon.rum.js_error_event\"], \"metadata\": { \"browserName\": [ \"Chrome\", \"Safari\" ], } }\'@+ --+ -- - @\'{ \"event_type\": [\"com.amazon.rum.performance_navigation_event\"], \"metadata\": { \"browserName\": [ \"Chrome\", \"Firefox\" ] }, \"event_details\": { \"duration\": [{ \"numeric\": [ \"\<\", 2000 ] }] } }\'@+ --+ -- - @\'{ \"event_type\": [\"com.amazon.rum.performance_navigation_event\"], \"metadata\": { \"browserName\": [ \"Chrome\", \"Safari\" ], \"countryCode\": [ \"US\" ] }, \"event_details\": { \"duration\": [{ \"numeric\": [ \">=\", 2000, \"\<\", 8000 ] }] } }\'@+ --+ -- If the metrics destination\' is @CloudWatch@ and the event also matches+ -- a value in @DimensionKeys@, then the metric is published with the+ -- specified dimensions.+ eventPattern :: Prelude.Maybe Prelude.Text,+ -- | The CloudWatch metric unit to use for this metric. If you omit this+ -- field, the metric is recorded with no unit.+ unitLabel :: Prelude.Maybe Prelude.Text,+ -- | The field within the event object that the metric value is sourced from.+ --+ -- If you omit this field, a hardcoded value of 1 is pushed as the metric+ -- value. This is useful if you just want to count the number of events+ -- that the filter catches.+ --+ -- If this metric is sent to CloudWatch Evidently, this field will be+ -- passed to Evidently raw and Evidently will handle data extraction from+ -- the event.+ valueKey :: Prelude.Maybe Prelude.Text,+ -- | The name for the metric that is defined in this structure. Valid values+ -- are the following:+ --+ -- - @PerformanceNavigationDuration@+ --+ -- - @PerformanceResourceDuration @+ --+ -- - @NavigationSatisfiedTransaction@+ --+ -- - @NavigationToleratedTransaction@+ --+ -- - @NavigationFrustratedTransaction@+ --+ -- - @WebVitalsCumulativeLayoutShift@+ --+ -- - @WebVitalsFirstInputDelay@+ --+ -- - @WebVitalsLargestContentfulPaint@+ --+ -- - @JsErrorCount@+ --+ -- - @HttpErrorCount@+ --+ -- - @SessionCount@+ name :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'MetricDefinitionRequest' 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:+--+-- 'dimensionKeys', 'metricDefinitionRequest_dimensionKeys' - Use this field only if you are sending the metric to CloudWatch.+--+-- This field is a map of field paths to dimension names. It defines the+-- dimensions to associate with this metric in CloudWatch. Valid values for+-- the entries in this field are the following:+--+-- - @\"metadata.pageId\": \"PageId\"@+--+-- - @\"metadata.browserName\": \"BrowserName\"@+--+-- - @\"metadata.deviceType\": \"DeviceType\"@+--+-- - @\"metadata.osName\": \"OSName\"@+--+-- - @\"metadata.countryCode\": \"CountryCode\"@+--+-- - @\"event_details.fileType\": \"FileType\"@+--+-- All dimensions listed in this field must also be included in+-- @EventPattern@.+--+-- 'eventPattern', 'metricDefinitionRequest_eventPattern' - The pattern that defines the metric, specified as a JSON object. RUM+-- checks events that happen in a user\'s session against the pattern, and+-- events that match the pattern are sent to the metric destination.+--+-- When you define extended metrics, the metric definition is not valid if+-- @EventPattern@ is omitted.+--+-- Example event patterns:+--+-- - @\'{ \"event_type\": [\"com.amazon.rum.js_error_event\"], \"metadata\": { \"browserName\": [ \"Chrome\", \"Safari\" ], } }\'@+--+-- - @\'{ \"event_type\": [\"com.amazon.rum.performance_navigation_event\"], \"metadata\": { \"browserName\": [ \"Chrome\", \"Firefox\" ] }, \"event_details\": { \"duration\": [{ \"numeric\": [ \"\<\", 2000 ] }] } }\'@+--+-- - @\'{ \"event_type\": [\"com.amazon.rum.performance_navigation_event\"], \"metadata\": { \"browserName\": [ \"Chrome\", \"Safari\" ], \"countryCode\": [ \"US\" ] }, \"event_details\": { \"duration\": [{ \"numeric\": [ \">=\", 2000, \"\<\", 8000 ] }] } }\'@+--+-- If the metrics destination\' is @CloudWatch@ and the event also matches+-- a value in @DimensionKeys@, then the metric is published with the+-- specified dimensions.+--+-- 'unitLabel', 'metricDefinitionRequest_unitLabel' - The CloudWatch metric unit to use for this metric. If you omit this+-- field, the metric is recorded with no unit.+--+-- 'valueKey', 'metricDefinitionRequest_valueKey' - The field within the event object that the metric value is sourced from.+--+-- If you omit this field, a hardcoded value of 1 is pushed as the metric+-- value. This is useful if you just want to count the number of events+-- that the filter catches.+--+-- If this metric is sent to CloudWatch Evidently, this field will be+-- passed to Evidently raw and Evidently will handle data extraction from+-- the event.+--+-- 'name', 'metricDefinitionRequest_name' - The name for the metric that is defined in this structure. Valid values+-- are the following:+--+-- - @PerformanceNavigationDuration@+--+-- - @PerformanceResourceDuration @+--+-- - @NavigationSatisfiedTransaction@+--+-- - @NavigationToleratedTransaction@+--+-- - @NavigationFrustratedTransaction@+--+-- - @WebVitalsCumulativeLayoutShift@+--+-- - @WebVitalsFirstInputDelay@+--+-- - @WebVitalsLargestContentfulPaint@+--+-- - @JsErrorCount@+--+-- - @HttpErrorCount@+--+-- - @SessionCount@+newMetricDefinitionRequest ::+ -- | 'name'+ Prelude.Text ->+ MetricDefinitionRequest+newMetricDefinitionRequest pName_ =+ MetricDefinitionRequest'+ { dimensionKeys =+ Prelude.Nothing,+ eventPattern = Prelude.Nothing,+ unitLabel = Prelude.Nothing,+ valueKey = Prelude.Nothing,+ name = pName_+ }++-- | Use this field only if you are sending the metric to CloudWatch.+--+-- This field is a map of field paths to dimension names. It defines the+-- dimensions to associate with this metric in CloudWatch. Valid values for+-- the entries in this field are the following:+--+-- - @\"metadata.pageId\": \"PageId\"@+--+-- - @\"metadata.browserName\": \"BrowserName\"@+--+-- - @\"metadata.deviceType\": \"DeviceType\"@+--+-- - @\"metadata.osName\": \"OSName\"@+--+-- - @\"metadata.countryCode\": \"CountryCode\"@+--+-- - @\"event_details.fileType\": \"FileType\"@+--+-- All dimensions listed in this field must also be included in+-- @EventPattern@.+metricDefinitionRequest_dimensionKeys :: Lens.Lens' MetricDefinitionRequest (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))+metricDefinitionRequest_dimensionKeys = Lens.lens (\MetricDefinitionRequest' {dimensionKeys} -> dimensionKeys) (\s@MetricDefinitionRequest' {} a -> s {dimensionKeys = a} :: MetricDefinitionRequest) Prelude.. Lens.mapping Lens.coerced++-- | The pattern that defines the metric, specified as a JSON object. RUM+-- checks events that happen in a user\'s session against the pattern, and+-- events that match the pattern are sent to the metric destination.+--+-- When you define extended metrics, the metric definition is not valid if+-- @EventPattern@ is omitted.+--+-- Example event patterns:+--+-- - @\'{ \"event_type\": [\"com.amazon.rum.js_error_event\"], \"metadata\": { \"browserName\": [ \"Chrome\", \"Safari\" ], } }\'@+--+-- - @\'{ \"event_type\": [\"com.amazon.rum.performance_navigation_event\"], \"metadata\": { \"browserName\": [ \"Chrome\", \"Firefox\" ] }, \"event_details\": { \"duration\": [{ \"numeric\": [ \"\<\", 2000 ] }] } }\'@+--+-- - @\'{ \"event_type\": [\"com.amazon.rum.performance_navigation_event\"], \"metadata\": { \"browserName\": [ \"Chrome\", \"Safari\" ], \"countryCode\": [ \"US\" ] }, \"event_details\": { \"duration\": [{ \"numeric\": [ \">=\", 2000, \"\<\", 8000 ] }] } }\'@+--+-- If the metrics destination\' is @CloudWatch@ and the event also matches+-- a value in @DimensionKeys@, then the metric is published with the+-- specified dimensions.+metricDefinitionRequest_eventPattern :: Lens.Lens' MetricDefinitionRequest (Prelude.Maybe Prelude.Text)+metricDefinitionRequest_eventPattern = Lens.lens (\MetricDefinitionRequest' {eventPattern} -> eventPattern) (\s@MetricDefinitionRequest' {} a -> s {eventPattern = a} :: MetricDefinitionRequest)++-- | The CloudWatch metric unit to use for this metric. If you omit this+-- field, the metric is recorded with no unit.+metricDefinitionRequest_unitLabel :: Lens.Lens' MetricDefinitionRequest (Prelude.Maybe Prelude.Text)+metricDefinitionRequest_unitLabel = Lens.lens (\MetricDefinitionRequest' {unitLabel} -> unitLabel) (\s@MetricDefinitionRequest' {} a -> s {unitLabel = a} :: MetricDefinitionRequest)++-- | The field within the event object that the metric value is sourced from.+--+-- If you omit this field, a hardcoded value of 1 is pushed as the metric+-- value. This is useful if you just want to count the number of events+-- that the filter catches.+--+-- If this metric is sent to CloudWatch Evidently, this field will be+-- passed to Evidently raw and Evidently will handle data extraction from+-- the event.+metricDefinitionRequest_valueKey :: Lens.Lens' MetricDefinitionRequest (Prelude.Maybe Prelude.Text)+metricDefinitionRequest_valueKey = Lens.lens (\MetricDefinitionRequest' {valueKey} -> valueKey) (\s@MetricDefinitionRequest' {} a -> s {valueKey = a} :: MetricDefinitionRequest)++-- | The name for the metric that is defined in this structure. Valid values+-- are the following:+--+-- - @PerformanceNavigationDuration@+--+-- - @PerformanceResourceDuration @+--+-- - @NavigationSatisfiedTransaction@+--+-- - @NavigationToleratedTransaction@+--+-- - @NavigationFrustratedTransaction@+--+-- - @WebVitalsCumulativeLayoutShift@+--+-- - @WebVitalsFirstInputDelay@+--+-- - @WebVitalsLargestContentfulPaint@+--+-- - @JsErrorCount@+--+-- - @HttpErrorCount@+--+-- - @SessionCount@+metricDefinitionRequest_name :: Lens.Lens' MetricDefinitionRequest Prelude.Text+metricDefinitionRequest_name = Lens.lens (\MetricDefinitionRequest' {name} -> name) (\s@MetricDefinitionRequest' {} a -> s {name = a} :: MetricDefinitionRequest)++instance Data.FromJSON MetricDefinitionRequest where+ parseJSON =+ Data.withObject+ "MetricDefinitionRequest"+ ( \x ->+ MetricDefinitionRequest'+ Prelude.<$> (x Data..:? "DimensionKeys" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "EventPattern")+ Prelude.<*> (x Data..:? "UnitLabel")+ Prelude.<*> (x Data..:? "ValueKey")+ Prelude.<*> (x Data..: "Name")+ )++instance Prelude.Hashable MetricDefinitionRequest where+ hashWithSalt _salt MetricDefinitionRequest' {..} =+ _salt+ `Prelude.hashWithSalt` dimensionKeys+ `Prelude.hashWithSalt` eventPattern+ `Prelude.hashWithSalt` unitLabel+ `Prelude.hashWithSalt` valueKey+ `Prelude.hashWithSalt` name++instance Prelude.NFData MetricDefinitionRequest where+ rnf MetricDefinitionRequest' {..} =+ Prelude.rnf dimensionKeys+ `Prelude.seq` Prelude.rnf eventPattern+ `Prelude.seq` Prelude.rnf unitLabel+ `Prelude.seq` Prelude.rnf valueKey+ `Prelude.seq` Prelude.rnf name++instance Data.ToJSON MetricDefinitionRequest where+ toJSON MetricDefinitionRequest' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("DimensionKeys" Data..=) Prelude.<$> dimensionKeys,+ ("EventPattern" Data..=) Prelude.<$> eventPattern,+ ("UnitLabel" Data..=) Prelude.<$> unitLabel,+ ("ValueKey" Data..=) Prelude.<$> valueKey,+ Prelude.Just ("Name" Data..= name)+ ]+ )
+ gen/Amazonka/Rum/Types/MetricDestination.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.Rum.Types.MetricDestination+-- 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.Rum.Types.MetricDestination+ ( MetricDestination+ ( ..,+ MetricDestination_CloudWatch,+ MetricDestination_Evidently+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype MetricDestination = MetricDestination'+ { fromMetricDestination ::+ 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 MetricDestination_CloudWatch :: MetricDestination+pattern MetricDestination_CloudWatch = MetricDestination' "CloudWatch"++pattern MetricDestination_Evidently :: MetricDestination+pattern MetricDestination_Evidently = MetricDestination' "Evidently"++{-# COMPLETE+ MetricDestination_CloudWatch,+ MetricDestination_Evidently,+ MetricDestination'+ #-}
+ gen/Amazonka/Rum/Types/MetricDestinationSummary.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.Rum.Types.MetricDestinationSummary+-- 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.Rum.Types.MetricDestinationSummary 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+import Amazonka.Rum.Types.MetricDestination++-- | A structure that displays information about one destination that+-- CloudWatch RUM sends extended metrics to.+--+-- /See:/ 'newMetricDestinationSummary' smart constructor.+data MetricDestinationSummary = MetricDestinationSummary'+ { -- | Specifies whether the destination is @CloudWatch@ or @Evidently@.+ destination :: Prelude.Maybe MetricDestination,+ -- | If the destination is @Evidently@, this specifies the ARN of the+ -- Evidently experiment that receives the metrics.+ destinationArn :: Prelude.Maybe Prelude.Text,+ -- | This field appears only when the destination is @Evidently@. It+ -- specifies the ARN of the IAM role that is used to write to the Evidently+ -- experiment that receives the metrics.+ iamRoleArn :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'MetricDestinationSummary' 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', 'metricDestinationSummary_destination' - Specifies whether the destination is @CloudWatch@ or @Evidently@.+--+-- 'destinationArn', 'metricDestinationSummary_destinationArn' - If the destination is @Evidently@, this specifies the ARN of the+-- Evidently experiment that receives the metrics.+--+-- 'iamRoleArn', 'metricDestinationSummary_iamRoleArn' - This field appears only when the destination is @Evidently@. It+-- specifies the ARN of the IAM role that is used to write to the Evidently+-- experiment that receives the metrics.+newMetricDestinationSummary ::+ MetricDestinationSummary+newMetricDestinationSummary =+ MetricDestinationSummary'+ { destination =+ Prelude.Nothing,+ destinationArn = Prelude.Nothing,+ iamRoleArn = Prelude.Nothing+ }++-- | Specifies whether the destination is @CloudWatch@ or @Evidently@.+metricDestinationSummary_destination :: Lens.Lens' MetricDestinationSummary (Prelude.Maybe MetricDestination)+metricDestinationSummary_destination = Lens.lens (\MetricDestinationSummary' {destination} -> destination) (\s@MetricDestinationSummary' {} a -> s {destination = a} :: MetricDestinationSummary)++-- | If the destination is @Evidently@, this specifies the ARN of the+-- Evidently experiment that receives the metrics.+metricDestinationSummary_destinationArn :: Lens.Lens' MetricDestinationSummary (Prelude.Maybe Prelude.Text)+metricDestinationSummary_destinationArn = Lens.lens (\MetricDestinationSummary' {destinationArn} -> destinationArn) (\s@MetricDestinationSummary' {} a -> s {destinationArn = a} :: MetricDestinationSummary)++-- | This field appears only when the destination is @Evidently@. It+-- specifies the ARN of the IAM role that is used to write to the Evidently+-- experiment that receives the metrics.+metricDestinationSummary_iamRoleArn :: Lens.Lens' MetricDestinationSummary (Prelude.Maybe Prelude.Text)+metricDestinationSummary_iamRoleArn = Lens.lens (\MetricDestinationSummary' {iamRoleArn} -> iamRoleArn) (\s@MetricDestinationSummary' {} a -> s {iamRoleArn = a} :: MetricDestinationSummary)++instance Data.FromJSON MetricDestinationSummary where+ parseJSON =+ Data.withObject+ "MetricDestinationSummary"+ ( \x ->+ MetricDestinationSummary'+ Prelude.<$> (x Data..:? "Destination")+ Prelude.<*> (x Data..:? "DestinationArn")+ Prelude.<*> (x Data..:? "IamRoleArn")+ )++instance Prelude.Hashable MetricDestinationSummary where+ hashWithSalt _salt MetricDestinationSummary' {..} =+ _salt+ `Prelude.hashWithSalt` destination+ `Prelude.hashWithSalt` destinationArn+ `Prelude.hashWithSalt` iamRoleArn++instance Prelude.NFData MetricDestinationSummary where+ rnf MetricDestinationSummary' {..} =+ Prelude.rnf destination+ `Prelude.seq` Prelude.rnf destinationArn+ `Prelude.seq` Prelude.rnf iamRoleArn
+ gen/Amazonka/Rum/Types/QueryFilter.hs view
@@ -0,0 +1,109 @@+{-# 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.Rum.Types.QueryFilter+-- 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.Rum.Types.QueryFilter where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A structure that defines a key and values that you can use to filter the+-- results. The only performance events that are returned are those that+-- have values matching the ones that you specify in one of your+-- @QueryFilter@ structures.+--+-- For example, you could specify @Browser@ as the @Name@ and specify+-- @Chrome,Firefox@ as the @Values@ to return events generated only from+-- those browsers.+--+-- Specifying @Invert@ as the @Name@ works as a \"not equal to\" filter.+-- For example, specify @Invert@ as the @Name@ and specify @Chrome@ as the+-- value to return all events except events from user sessions with the+-- Chrome browser.+--+-- /See:/ 'newQueryFilter' smart constructor.+data QueryFilter = QueryFilter'+ { -- | The name of a key to search for. The filter returns only the events that+ -- match the @Name@ and @Values@ that you specify.+ --+ -- Valid values for @Name@ are @Browser@ | @Device@ | @Country@ | @Page@ |+ -- @OS@ | @EventType@ | @Invert@+ name :: Prelude.Maybe Prelude.Text,+ -- | The values of the @Name@ that are to be be included in the returned+ -- results.+ values :: Prelude.Maybe [Prelude.Text]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'QueryFilter' 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', 'queryFilter_name' - The name of a key to search for. The filter returns only the events that+-- match the @Name@ and @Values@ that you specify.+--+-- Valid values for @Name@ are @Browser@ | @Device@ | @Country@ | @Page@ |+-- @OS@ | @EventType@ | @Invert@+--+-- 'values', 'queryFilter_values' - The values of the @Name@ that are to be be included in the returned+-- results.+newQueryFilter ::+ QueryFilter+newQueryFilter =+ QueryFilter'+ { name = Prelude.Nothing,+ values = Prelude.Nothing+ }++-- | The name of a key to search for. The filter returns only the events that+-- match the @Name@ and @Values@ that you specify.+--+-- Valid values for @Name@ are @Browser@ | @Device@ | @Country@ | @Page@ |+-- @OS@ | @EventType@ | @Invert@+queryFilter_name :: Lens.Lens' QueryFilter (Prelude.Maybe Prelude.Text)+queryFilter_name = Lens.lens (\QueryFilter' {name} -> name) (\s@QueryFilter' {} a -> s {name = a} :: QueryFilter)++-- | The values of the @Name@ that are to be be included in the returned+-- results.+queryFilter_values :: Lens.Lens' QueryFilter (Prelude.Maybe [Prelude.Text])+queryFilter_values = Lens.lens (\QueryFilter' {values} -> values) (\s@QueryFilter' {} a -> s {values = a} :: QueryFilter) Prelude.. Lens.mapping Lens.coerced++instance Prelude.Hashable QueryFilter where+ hashWithSalt _salt QueryFilter' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` values++instance Prelude.NFData QueryFilter where+ rnf QueryFilter' {..} =+ Prelude.rnf name `Prelude.seq` Prelude.rnf values++instance Data.ToJSON QueryFilter where+ toJSON QueryFilter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("Name" Data..=) Prelude.<$> name,+ ("Values" Data..=) Prelude.<$> values+ ]+ )
+ gen/Amazonka/Rum/Types/RumEvent.hs view
@@ -0,0 +1,140 @@+{-# 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.Rum.Types.RumEvent+-- 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.Rum.Types.RumEvent where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A structure that contains the information for one performance event that+-- RUM collects from a user session with your application.+--+-- /See:/ 'newRumEvent' smart constructor.+data RumEvent = RumEvent'+ { -- | Metadata about this event, which contains a JSON serialization of the+ -- identity of the user for this session. The user information comes from+ -- information such as the HTTP user-agent request header and document+ -- interface.+ metadata :: Prelude.Maybe Prelude.Text,+ -- | A string containing details about the event.+ details :: Prelude.Text,+ -- | A unique ID for this event.+ id :: Prelude.Text,+ -- | The exact time that this event occurred.+ timestamp :: Data.POSIX,+ -- | The JSON schema that denotes the type of event this is, such as a page+ -- load or a new session.+ type' :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RumEvent' 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:+--+-- 'metadata', 'rumEvent_metadata' - Metadata about this event, which contains a JSON serialization of the+-- identity of the user for this session. The user information comes from+-- information such as the HTTP user-agent request header and document+-- interface.+--+-- 'details', 'rumEvent_details' - A string containing details about the event.+--+-- 'id', 'rumEvent_id' - A unique ID for this event.+--+-- 'timestamp', 'rumEvent_timestamp' - The exact time that this event occurred.+--+-- 'type'', 'rumEvent_type' - The JSON schema that denotes the type of event this is, such as a page+-- load or a new session.+newRumEvent ::+ -- | 'details'+ Prelude.Text ->+ -- | 'id'+ Prelude.Text ->+ -- | 'timestamp'+ Prelude.UTCTime ->+ -- | 'type''+ Prelude.Text ->+ RumEvent+newRumEvent pDetails_ pId_ pTimestamp_ pType_ =+ RumEvent'+ { metadata = Prelude.Nothing,+ details = pDetails_,+ id = pId_,+ timestamp = Data._Time Lens.# pTimestamp_,+ type' = pType_+ }++-- | Metadata about this event, which contains a JSON serialization of the+-- identity of the user for this session. The user information comes from+-- information such as the HTTP user-agent request header and document+-- interface.+rumEvent_metadata :: Lens.Lens' RumEvent (Prelude.Maybe Prelude.Text)+rumEvent_metadata = Lens.lens (\RumEvent' {metadata} -> metadata) (\s@RumEvent' {} a -> s {metadata = a} :: RumEvent)++-- | A string containing details about the event.+rumEvent_details :: Lens.Lens' RumEvent Prelude.Text+rumEvent_details = Lens.lens (\RumEvent' {details} -> details) (\s@RumEvent' {} a -> s {details = a} :: RumEvent)++-- | A unique ID for this event.+rumEvent_id :: Lens.Lens' RumEvent Prelude.Text+rumEvent_id = Lens.lens (\RumEvent' {id} -> id) (\s@RumEvent' {} a -> s {id = a} :: RumEvent)++-- | The exact time that this event occurred.+rumEvent_timestamp :: Lens.Lens' RumEvent Prelude.UTCTime+rumEvent_timestamp = Lens.lens (\RumEvent' {timestamp} -> timestamp) (\s@RumEvent' {} a -> s {timestamp = a} :: RumEvent) Prelude.. Data._Time++-- | The JSON schema that denotes the type of event this is, such as a page+-- load or a new session.+rumEvent_type :: Lens.Lens' RumEvent Prelude.Text+rumEvent_type = Lens.lens (\RumEvent' {type'} -> type') (\s@RumEvent' {} a -> s {type' = a} :: RumEvent)++instance Prelude.Hashable RumEvent where+ hashWithSalt _salt RumEvent' {..} =+ _salt+ `Prelude.hashWithSalt` metadata+ `Prelude.hashWithSalt` details+ `Prelude.hashWithSalt` id+ `Prelude.hashWithSalt` timestamp+ `Prelude.hashWithSalt` type'++instance Prelude.NFData RumEvent where+ rnf RumEvent' {..} =+ Prelude.rnf metadata+ `Prelude.seq` Prelude.rnf details+ `Prelude.seq` Prelude.rnf id+ `Prelude.seq` Prelude.rnf timestamp+ `Prelude.seq` Prelude.rnf type'++instance Data.ToJSON RumEvent where+ toJSON RumEvent' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("metadata" Data..=) Prelude.<$> metadata,+ Prelude.Just ("details" Data..= details),+ Prelude.Just ("id" Data..= id),+ Prelude.Just ("timestamp" Data..= timestamp),+ Prelude.Just ("type" Data..= type')+ ]+ )
+ gen/Amazonka/Rum/Types/StateEnum.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.Rum.Types.StateEnum+-- 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.Rum.Types.StateEnum+ ( StateEnum+ ( ..,+ StateEnum_ACTIVE,+ StateEnum_CREATED,+ StateEnum_DELETING+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype StateEnum = StateEnum'+ { fromStateEnum ::+ 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 StateEnum_ACTIVE :: StateEnum+pattern StateEnum_ACTIVE = StateEnum' "ACTIVE"++pattern StateEnum_CREATED :: StateEnum+pattern StateEnum_CREATED = StateEnum' "CREATED"++pattern StateEnum_DELETING :: StateEnum+pattern StateEnum_DELETING = StateEnum' "DELETING"++{-# COMPLETE+ StateEnum_ACTIVE,+ StateEnum_CREATED,+ StateEnum_DELETING,+ StateEnum'+ #-}
+ gen/Amazonka/Rum/Types/Telemetry.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.Rum.Types.Telemetry+-- 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.Rum.Types.Telemetry+ ( Telemetry+ ( ..,+ Telemetry_Errors,+ Telemetry_Http,+ Telemetry_Performance+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype Telemetry = Telemetry'+ { fromTelemetry ::+ 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 Telemetry_Errors :: Telemetry+pattern Telemetry_Errors = Telemetry' "errors"++pattern Telemetry_Http :: Telemetry+pattern Telemetry_Http = Telemetry' "http"++pattern Telemetry_Performance :: Telemetry+pattern Telemetry_Performance = Telemetry' "performance"++{-# COMPLETE+ Telemetry_Errors,+ Telemetry_Http,+ Telemetry_Performance,+ Telemetry'+ #-}
+ gen/Amazonka/Rum/Types/TimeRange.hs view
@@ -0,0 +1,91 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Rum.Types.TimeRange+-- 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.Rum.Types.TimeRange where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A structure that defines the time range that you want to retrieve+-- results from.+--+-- /See:/ 'newTimeRange' smart constructor.+data TimeRange = TimeRange'+ { -- | The end of the time range to retrieve performance events from. If you+ -- omit this, the time range extends to the time that this operation is+ -- performed.+ before :: Prelude.Maybe Prelude.Integer,+ -- | The beginning of the time range to retrieve performance events from.+ after :: Prelude.Integer+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TimeRange' 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:+--+-- 'before', 'timeRange_before' - The end of the time range to retrieve performance events from. If you+-- omit this, the time range extends to the time that this operation is+-- performed.+--+-- 'after', 'timeRange_after' - The beginning of the time range to retrieve performance events from.+newTimeRange ::+ -- | 'after'+ Prelude.Integer ->+ TimeRange+newTimeRange pAfter_ =+ TimeRange'+ { before = Prelude.Nothing,+ after = pAfter_+ }++-- | The end of the time range to retrieve performance events from. If you+-- omit this, the time range extends to the time that this operation is+-- performed.+timeRange_before :: Lens.Lens' TimeRange (Prelude.Maybe Prelude.Integer)+timeRange_before = Lens.lens (\TimeRange' {before} -> before) (\s@TimeRange' {} a -> s {before = a} :: TimeRange)++-- | The beginning of the time range to retrieve performance events from.+timeRange_after :: Lens.Lens' TimeRange Prelude.Integer+timeRange_after = Lens.lens (\TimeRange' {after} -> after) (\s@TimeRange' {} a -> s {after = a} :: TimeRange)++instance Prelude.Hashable TimeRange where+ hashWithSalt _salt TimeRange' {..} =+ _salt+ `Prelude.hashWithSalt` before+ `Prelude.hashWithSalt` after++instance Prelude.NFData TimeRange where+ rnf TimeRange' {..} =+ Prelude.rnf before `Prelude.seq` Prelude.rnf after++instance Data.ToJSON TimeRange where+ toJSON TimeRange' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("Before" Data..=) Prelude.<$> before,+ Prelude.Just ("After" Data..= after)+ ]+ )
+ gen/Amazonka/Rum/Types/UserDetails.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.Rum.Types.UserDetails+-- 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.Rum.Types.UserDetails where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | A structure that contains information about the user session that this+-- batch of events was collected from.+--+-- /See:/ 'newUserDetails' smart constructor.+data UserDetails = UserDetails'+ { -- | The session ID that the performance events are from.+ sessionId :: Prelude.Maybe Prelude.Text,+ -- | The ID of the user for this user session. This ID is generated by RUM+ -- and does not include any personally identifiable information about the+ -- user.+ userId :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UserDetails' 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:+--+-- 'sessionId', 'userDetails_sessionId' - The session ID that the performance events are from.+--+-- 'userId', 'userDetails_userId' - The ID of the user for this user session. This ID is generated by RUM+-- and does not include any personally identifiable information about the+-- user.+newUserDetails ::+ UserDetails+newUserDetails =+ UserDetails'+ { sessionId = Prelude.Nothing,+ userId = Prelude.Nothing+ }++-- | The session ID that the performance events are from.+userDetails_sessionId :: Lens.Lens' UserDetails (Prelude.Maybe Prelude.Text)+userDetails_sessionId = Lens.lens (\UserDetails' {sessionId} -> sessionId) (\s@UserDetails' {} a -> s {sessionId = a} :: UserDetails)++-- | The ID of the user for this user session. This ID is generated by RUM+-- and does not include any personally identifiable information about the+-- user.+userDetails_userId :: Lens.Lens' UserDetails (Prelude.Maybe Prelude.Text)+userDetails_userId = Lens.lens (\UserDetails' {userId} -> userId) (\s@UserDetails' {} a -> s {userId = a} :: UserDetails)++instance Prelude.Hashable UserDetails where+ hashWithSalt _salt UserDetails' {..} =+ _salt+ `Prelude.hashWithSalt` sessionId+ `Prelude.hashWithSalt` userId++instance Prelude.NFData UserDetails where+ rnf UserDetails' {..} =+ Prelude.rnf sessionId+ `Prelude.seq` Prelude.rnf userId++instance Data.ToJSON UserDetails where+ toJSON UserDetails' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("sessionId" Data..=) Prelude.<$> sessionId,+ ("userId" Data..=) Prelude.<$> userId+ ]+ )
+ gen/Amazonka/Rum/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.Rum.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 one or more tags from the specified resource.+module Amazonka.Rum.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 qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.Rum.Types++-- | /See:/ 'newUntagResource' smart constructor.+data UntagResource = UntagResource'+ { -- | The ARN of the CloudWatch RUM resource that you\'re removing tags from.+ resourceArn :: Prelude.Text,+ -- | The list of 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 ARN of the CloudWatch RUM resource that you\'re removing tags from.+--+-- 'tagKeys', 'untagResource_tagKeys' - The list of tag keys to remove from the resource.+newUntagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ UntagResource+newUntagResource pResourceArn_ =+ UntagResource'+ { resourceArn = pResourceArn_,+ tagKeys = Prelude.mempty+ }++-- | The ARN of the CloudWatch RUM resource that you\'re removing tags from.+untagResource_resourceArn :: Lens.Lens' UntagResource Prelude.Text+untagResource_resourceArn = Lens.lens (\UntagResource' {resourceArn} -> resourceArn) (\s@UntagResource' {} a -> s {resourceArn = a} :: UntagResource)++-- | The list of 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/Rum/UpdateAppMonitor.hs view
@@ -0,0 +1,271 @@+{-# 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.Rum.UpdateAppMonitor+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Updates the configuration of an existing app monitor. When you use this+-- operation, only the parts of the app monitor configuration that you+-- specify in this operation are changed. For any parameters that you omit,+-- the existing values are kept.+--+-- You can\'t use this operation to change the tags of an existing app+-- monitor. To change the tags of an existing app monitor, use+-- <https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_TagResource.html TagResource>.+--+-- To create a new app monitor, use+-- <https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_CreateAppMonitor.html CreateAppMonitor>.+--+-- After you update an app monitor, sign in to the CloudWatch RUM console+-- to get the updated JavaScript code snippet to add to your web+-- application. For more information, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-find-code-snippet.html How do I find a code snippet that I\'ve already generated?>+module Amazonka.Rum.UpdateAppMonitor+ ( -- * Creating a Request+ UpdateAppMonitor (..),+ newUpdateAppMonitor,++ -- * Request Lenses+ updateAppMonitor_appMonitorConfiguration,+ updateAppMonitor_customEvents,+ updateAppMonitor_cwLogEnabled,+ updateAppMonitor_domain,+ updateAppMonitor_name,++ -- * Destructuring the Response+ UpdateAppMonitorResponse (..),+ newUpdateAppMonitorResponse,++ -- * Response Lenses+ updateAppMonitorResponse_httpStatus,+ )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.Rum.Types++-- | /See:/ 'newUpdateAppMonitor' smart constructor.+data UpdateAppMonitor = UpdateAppMonitor'+ { -- | A structure that contains much of the configuration data for the app+ -- monitor. If you are using Amazon Cognito for authorization, you must+ -- include this structure in your request, and it must include the ID of+ -- the Amazon Cognito identity pool to use for authorization. If you don\'t+ -- include @AppMonitorConfiguration@, you must set up your own+ -- authorization method. For more information, see+ -- <https://docs.aws.amazon.com/monitoring/CloudWatch-RUM-get-started-authorization.html Authorize your application to send data to Amazon Web Services>.+ appMonitorConfiguration :: Prelude.Maybe AppMonitorConfiguration,+ -- | Specifies whether this app monitor allows the web client to define and+ -- send custom events. The default is for custom events to be @DISABLED@.+ --+ -- For more information about custom events, see+ -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-custom-events.html Send custom events>.+ customEvents :: Prelude.Maybe CustomEvents,+ -- | Data collected by RUM is kept by RUM for 30 days and then deleted. This+ -- parameter specifies whether RUM sends a copy of this telemetry data to+ -- Amazon CloudWatch Logs in your account. This enables you to keep the+ -- telemetry data for more than 30 days, but it does incur Amazon+ -- CloudWatch Logs charges.+ cwLogEnabled :: Prelude.Maybe Prelude.Bool,+ -- | The top-level internet domain name for which your application has+ -- administrative authority.+ domain :: Prelude.Maybe Prelude.Text,+ -- | The name of the app monitor to update.+ name :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateAppMonitor' 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:+--+-- 'appMonitorConfiguration', 'updateAppMonitor_appMonitorConfiguration' - A structure that contains much of the configuration data for the app+-- monitor. If you are using Amazon Cognito for authorization, you must+-- include this structure in your request, and it must include the ID of+-- the Amazon Cognito identity pool to use for authorization. If you don\'t+-- include @AppMonitorConfiguration@, you must set up your own+-- authorization method. For more information, see+-- <https://docs.aws.amazon.com/monitoring/CloudWatch-RUM-get-started-authorization.html Authorize your application to send data to Amazon Web Services>.+--+-- 'customEvents', 'updateAppMonitor_customEvents' - Specifies whether this app monitor allows the web client to define and+-- send custom events. The default is for custom events to be @DISABLED@.+--+-- For more information about custom events, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-custom-events.html Send custom events>.+--+-- 'cwLogEnabled', 'updateAppMonitor_cwLogEnabled' - Data collected by RUM is kept by RUM for 30 days and then deleted. This+-- parameter specifies whether RUM sends a copy of this telemetry data to+-- Amazon CloudWatch Logs in your account. This enables you to keep the+-- telemetry data for more than 30 days, but it does incur Amazon+-- CloudWatch Logs charges.+--+-- 'domain', 'updateAppMonitor_domain' - The top-level internet domain name for which your application has+-- administrative authority.+--+-- 'name', 'updateAppMonitor_name' - The name of the app monitor to update.+newUpdateAppMonitor ::+ -- | 'name'+ Prelude.Text ->+ UpdateAppMonitor+newUpdateAppMonitor pName_ =+ UpdateAppMonitor'+ { appMonitorConfiguration =+ Prelude.Nothing,+ customEvents = Prelude.Nothing,+ cwLogEnabled = Prelude.Nothing,+ domain = Prelude.Nothing,+ name = pName_+ }++-- | A structure that contains much of the configuration data for the app+-- monitor. If you are using Amazon Cognito for authorization, you must+-- include this structure in your request, and it must include the ID of+-- the Amazon Cognito identity pool to use for authorization. If you don\'t+-- include @AppMonitorConfiguration@, you must set up your own+-- authorization method. For more information, see+-- <https://docs.aws.amazon.com/monitoring/CloudWatch-RUM-get-started-authorization.html Authorize your application to send data to Amazon Web Services>.+updateAppMonitor_appMonitorConfiguration :: Lens.Lens' UpdateAppMonitor (Prelude.Maybe AppMonitorConfiguration)+updateAppMonitor_appMonitorConfiguration = Lens.lens (\UpdateAppMonitor' {appMonitorConfiguration} -> appMonitorConfiguration) (\s@UpdateAppMonitor' {} a -> s {appMonitorConfiguration = a} :: UpdateAppMonitor)++-- | Specifies whether this app monitor allows the web client to define and+-- send custom events. The default is for custom events to be @DISABLED@.+--+-- For more information about custom events, see+-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-custom-events.html Send custom events>.+updateAppMonitor_customEvents :: Lens.Lens' UpdateAppMonitor (Prelude.Maybe CustomEvents)+updateAppMonitor_customEvents = Lens.lens (\UpdateAppMonitor' {customEvents} -> customEvents) (\s@UpdateAppMonitor' {} a -> s {customEvents = a} :: UpdateAppMonitor)++-- | Data collected by RUM is kept by RUM for 30 days and then deleted. This+-- parameter specifies whether RUM sends a copy of this telemetry data to+-- Amazon CloudWatch Logs in your account. This enables you to keep the+-- telemetry data for more than 30 days, but it does incur Amazon+-- CloudWatch Logs charges.+updateAppMonitor_cwLogEnabled :: Lens.Lens' UpdateAppMonitor (Prelude.Maybe Prelude.Bool)+updateAppMonitor_cwLogEnabled = Lens.lens (\UpdateAppMonitor' {cwLogEnabled} -> cwLogEnabled) (\s@UpdateAppMonitor' {} a -> s {cwLogEnabled = a} :: UpdateAppMonitor)++-- | The top-level internet domain name for which your application has+-- administrative authority.+updateAppMonitor_domain :: Lens.Lens' UpdateAppMonitor (Prelude.Maybe Prelude.Text)+updateAppMonitor_domain = Lens.lens (\UpdateAppMonitor' {domain} -> domain) (\s@UpdateAppMonitor' {} a -> s {domain = a} :: UpdateAppMonitor)++-- | The name of the app monitor to update.+updateAppMonitor_name :: Lens.Lens' UpdateAppMonitor Prelude.Text+updateAppMonitor_name = Lens.lens (\UpdateAppMonitor' {name} -> name) (\s@UpdateAppMonitor' {} a -> s {name = a} :: UpdateAppMonitor)++instance Core.AWSRequest UpdateAppMonitor where+ type+ AWSResponse UpdateAppMonitor =+ UpdateAppMonitorResponse+ request overrides =+ Request.patchJSON (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ UpdateAppMonitorResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdateAppMonitor where+ hashWithSalt _salt UpdateAppMonitor' {..} =+ _salt+ `Prelude.hashWithSalt` appMonitorConfiguration+ `Prelude.hashWithSalt` customEvents+ `Prelude.hashWithSalt` cwLogEnabled+ `Prelude.hashWithSalt` domain+ `Prelude.hashWithSalt` name++instance Prelude.NFData UpdateAppMonitor where+ rnf UpdateAppMonitor' {..} =+ Prelude.rnf appMonitorConfiguration+ `Prelude.seq` Prelude.rnf customEvents+ `Prelude.seq` Prelude.rnf cwLogEnabled+ `Prelude.seq` Prelude.rnf domain+ `Prelude.seq` Prelude.rnf name++instance Data.ToHeaders UpdateAppMonitor where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateAppMonitor where+ toJSON UpdateAppMonitor' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("AppMonitorConfiguration" Data..=)+ Prelude.<$> appMonitorConfiguration,+ ("CustomEvents" Data..=) Prelude.<$> customEvents,+ ("CwLogEnabled" Data..=) Prelude.<$> cwLogEnabled,+ ("Domain" Data..=) Prelude.<$> domain+ ]+ )++instance Data.ToPath UpdateAppMonitor where+ toPath UpdateAppMonitor' {..} =+ Prelude.mconcat ["/appmonitor/", Data.toBS name]++instance Data.ToQuery UpdateAppMonitor where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateAppMonitorResponse' smart constructor.+data UpdateAppMonitorResponse = UpdateAppMonitorResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateAppMonitorResponse' 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', 'updateAppMonitorResponse_httpStatus' - The response's http status code.+newUpdateAppMonitorResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdateAppMonitorResponse+newUpdateAppMonitorResponse pHttpStatus_ =+ UpdateAppMonitorResponse'+ { httpStatus =+ pHttpStatus_+ }++-- | The response's http status code.+updateAppMonitorResponse_httpStatus :: Lens.Lens' UpdateAppMonitorResponse Prelude.Int+updateAppMonitorResponse_httpStatus = Lens.lens (\UpdateAppMonitorResponse' {httpStatus} -> httpStatus) (\s@UpdateAppMonitorResponse' {} a -> s {httpStatus = a} :: UpdateAppMonitorResponse)++instance Prelude.NFData UpdateAppMonitorResponse where+ rnf UpdateAppMonitorResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/Rum/UpdateRumMetricDefinition.hs view
@@ -0,0 +1,262 @@+{-# 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.Rum.UpdateRumMetricDefinition+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Modifies one existing metric definition for CloudWatch RUM extended+-- metrics. For more information about extended metrics, see+-- <https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_BatchCreateRumMetricsDefinitions.html BatchCreateRumMetricsDefinitions>.+module Amazonka.Rum.UpdateRumMetricDefinition+ ( -- * Creating a Request+ UpdateRumMetricDefinition (..),+ newUpdateRumMetricDefinition,++ -- * Request Lenses+ updateRumMetricDefinition_destinationArn,+ updateRumMetricDefinition_appMonitorName,+ updateRumMetricDefinition_destination,+ updateRumMetricDefinition_metricDefinition,+ updateRumMetricDefinition_metricDefinitionId,++ -- * Destructuring the Response+ UpdateRumMetricDefinitionResponse (..),+ newUpdateRumMetricDefinitionResponse,++ -- * Response Lenses+ updateRumMetricDefinitionResponse_httpStatus,+ )+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+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.Rum.Types++-- | /See:/ 'newUpdateRumMetricDefinition' smart constructor.+data UpdateRumMetricDefinition = UpdateRumMetricDefinition'+ { -- | This parameter is required if @Destination@ is @Evidently@. If+ -- @Destination@ is @CloudWatch@, do not use this parameter.+ --+ -- This parameter specifies the ARN of the Evidently experiment that is to+ -- receive the metrics. You must have already defined this experiment as a+ -- valid destination. For more information, see+ -- <https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_PutRumMetricsDestination.html PutRumMetricsDestination>.+ destinationArn :: Prelude.Maybe Prelude.Text,+ -- | The name of the CloudWatch RUM app monitor that sends these metrics.+ appMonitorName :: Prelude.Text,+ -- | The destination to send the metrics to. Valid values are @CloudWatch@+ -- and @Evidently@. If you specify @Evidently@, you must also specify the+ -- ARN of the CloudWatchEvidently experiment that will receive the metrics+ -- and an IAM role that has permission to write to the experiment.+ destination :: MetricDestination,+ -- | A structure that contains the new definition that you want to use for+ -- this metric.+ metricDefinition :: MetricDefinitionRequest,+ -- | The ID of the metric definition to update.+ metricDefinitionId :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateRumMetricDefinition' 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:+--+-- 'destinationArn', 'updateRumMetricDefinition_destinationArn' - This parameter is required if @Destination@ is @Evidently@. If+-- @Destination@ is @CloudWatch@, do not use this parameter.+--+-- This parameter specifies the ARN of the Evidently experiment that is to+-- receive the metrics. You must have already defined this experiment as a+-- valid destination. For more information, see+-- <https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_PutRumMetricsDestination.html PutRumMetricsDestination>.+--+-- 'appMonitorName', 'updateRumMetricDefinition_appMonitorName' - The name of the CloudWatch RUM app monitor that sends these metrics.+--+-- 'destination', 'updateRumMetricDefinition_destination' - The destination to send the metrics to. Valid values are @CloudWatch@+-- and @Evidently@. If you specify @Evidently@, you must also specify the+-- ARN of the CloudWatchEvidently experiment that will receive the metrics+-- and an IAM role that has permission to write to the experiment.+--+-- 'metricDefinition', 'updateRumMetricDefinition_metricDefinition' - A structure that contains the new definition that you want to use for+-- this metric.+--+-- 'metricDefinitionId', 'updateRumMetricDefinition_metricDefinitionId' - The ID of the metric definition to update.+newUpdateRumMetricDefinition ::+ -- | 'appMonitorName'+ Prelude.Text ->+ -- | 'destination'+ MetricDestination ->+ -- | 'metricDefinition'+ MetricDefinitionRequest ->+ -- | 'metricDefinitionId'+ Prelude.Text ->+ UpdateRumMetricDefinition+newUpdateRumMetricDefinition+ pAppMonitorName_+ pDestination_+ pMetricDefinition_+ pMetricDefinitionId_ =+ UpdateRumMetricDefinition'+ { destinationArn =+ Prelude.Nothing,+ appMonitorName = pAppMonitorName_,+ destination = pDestination_,+ metricDefinition = pMetricDefinition_,+ metricDefinitionId = pMetricDefinitionId_+ }++-- | This parameter is required if @Destination@ is @Evidently@. If+-- @Destination@ is @CloudWatch@, do not use this parameter.+--+-- This parameter specifies the ARN of the Evidently experiment that is to+-- receive the metrics. You must have already defined this experiment as a+-- valid destination. For more information, see+-- <https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_PutRumMetricsDestination.html PutRumMetricsDestination>.+updateRumMetricDefinition_destinationArn :: Lens.Lens' UpdateRumMetricDefinition (Prelude.Maybe Prelude.Text)+updateRumMetricDefinition_destinationArn = Lens.lens (\UpdateRumMetricDefinition' {destinationArn} -> destinationArn) (\s@UpdateRumMetricDefinition' {} a -> s {destinationArn = a} :: UpdateRumMetricDefinition)++-- | The name of the CloudWatch RUM app monitor that sends these metrics.+updateRumMetricDefinition_appMonitorName :: Lens.Lens' UpdateRumMetricDefinition Prelude.Text+updateRumMetricDefinition_appMonitorName = Lens.lens (\UpdateRumMetricDefinition' {appMonitorName} -> appMonitorName) (\s@UpdateRumMetricDefinition' {} a -> s {appMonitorName = a} :: UpdateRumMetricDefinition)++-- | The destination to send the metrics to. Valid values are @CloudWatch@+-- and @Evidently@. If you specify @Evidently@, you must also specify the+-- ARN of the CloudWatchEvidently experiment that will receive the metrics+-- and an IAM role that has permission to write to the experiment.+updateRumMetricDefinition_destination :: Lens.Lens' UpdateRumMetricDefinition MetricDestination+updateRumMetricDefinition_destination = Lens.lens (\UpdateRumMetricDefinition' {destination} -> destination) (\s@UpdateRumMetricDefinition' {} a -> s {destination = a} :: UpdateRumMetricDefinition)++-- | A structure that contains the new definition that you want to use for+-- this metric.+updateRumMetricDefinition_metricDefinition :: Lens.Lens' UpdateRumMetricDefinition MetricDefinitionRequest+updateRumMetricDefinition_metricDefinition = Lens.lens (\UpdateRumMetricDefinition' {metricDefinition} -> metricDefinition) (\s@UpdateRumMetricDefinition' {} a -> s {metricDefinition = a} :: UpdateRumMetricDefinition)++-- | The ID of the metric definition to update.+updateRumMetricDefinition_metricDefinitionId :: Lens.Lens' UpdateRumMetricDefinition Prelude.Text+updateRumMetricDefinition_metricDefinitionId = Lens.lens (\UpdateRumMetricDefinition' {metricDefinitionId} -> metricDefinitionId) (\s@UpdateRumMetricDefinition' {} a -> s {metricDefinitionId = a} :: UpdateRumMetricDefinition)++instance Core.AWSRequest UpdateRumMetricDefinition where+ type+ AWSResponse UpdateRumMetricDefinition =+ UpdateRumMetricDefinitionResponse+ request overrides =+ Request.patchJSON (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ UpdateRumMetricDefinitionResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable UpdateRumMetricDefinition where+ hashWithSalt _salt UpdateRumMetricDefinition' {..} =+ _salt+ `Prelude.hashWithSalt` destinationArn+ `Prelude.hashWithSalt` appMonitorName+ `Prelude.hashWithSalt` destination+ `Prelude.hashWithSalt` metricDefinition+ `Prelude.hashWithSalt` metricDefinitionId++instance Prelude.NFData UpdateRumMetricDefinition where+ rnf UpdateRumMetricDefinition' {..} =+ Prelude.rnf destinationArn+ `Prelude.seq` Prelude.rnf appMonitorName+ `Prelude.seq` Prelude.rnf destination+ `Prelude.seq` Prelude.rnf metricDefinition+ `Prelude.seq` Prelude.rnf metricDefinitionId++instance Data.ToHeaders UpdateRumMetricDefinition where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateRumMetricDefinition where+ toJSON UpdateRumMetricDefinition' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("DestinationArn" Data..=)+ Prelude.<$> destinationArn,+ Prelude.Just ("Destination" Data..= destination),+ Prelude.Just+ ("MetricDefinition" Data..= metricDefinition),+ Prelude.Just+ ("MetricDefinitionId" Data..= metricDefinitionId)+ ]+ )++instance Data.ToPath UpdateRumMetricDefinition where+ toPath UpdateRumMetricDefinition' {..} =+ Prelude.mconcat+ [ "/rummetrics/",+ Data.toBS appMonitorName,+ "/metrics"+ ]++instance Data.ToQuery UpdateRumMetricDefinition where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateRumMetricDefinitionResponse' smart constructor.+data UpdateRumMetricDefinitionResponse = UpdateRumMetricDefinitionResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateRumMetricDefinitionResponse' 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', 'updateRumMetricDefinitionResponse_httpStatus' - The response's http status code.+newUpdateRumMetricDefinitionResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ UpdateRumMetricDefinitionResponse+newUpdateRumMetricDefinitionResponse pHttpStatus_ =+ UpdateRumMetricDefinitionResponse'+ { httpStatus =+ pHttpStatus_+ }++-- | The response's http status code.+updateRumMetricDefinitionResponse_httpStatus :: Lens.Lens' UpdateRumMetricDefinitionResponse Prelude.Int+updateRumMetricDefinitionResponse_httpStatus = Lens.lens (\UpdateRumMetricDefinitionResponse' {httpStatus} -> httpStatus) (\s@UpdateRumMetricDefinitionResponse' {} a -> s {httpStatus = a} :: UpdateRumMetricDefinitionResponse)++instance+ Prelude.NFData+ UpdateRumMetricDefinitionResponse+ where+ rnf UpdateRumMetricDefinitionResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/Rum/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.Rum.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.Rum.Waiters 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+import Amazonka.Rum.Lens+import Amazonka.Rum.Types
+ 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.Rum+import Test.Amazonka.Rum.Internal+import Test.Tasty++main :: IO ()+main =+ defaultMain $+ testGroup+ "Rum"+ [ testGroup "tests" tests,+ testGroup "fixtures" fixtures+ ]
+ test/Test/Amazonka/Gen/Rum.hs view
@@ -0,0 +1,378 @@+{-# 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.Rum+-- 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.Rum where++import Amazonka.Rum+import qualified Data.Proxy as Proxy+import Test.Amazonka.Fixture+import Test.Amazonka.Prelude+import Test.Amazonka.Rum.Internal+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"+-- [ requestBatchCreateRumMetricDefinitions $+-- newBatchCreateRumMetricDefinitions+--+-- , requestBatchDeleteRumMetricDefinitions $+-- newBatchDeleteRumMetricDefinitions+--+-- , requestBatchGetRumMetricDefinitions $+-- newBatchGetRumMetricDefinitions+--+-- , requestCreateAppMonitor $+-- newCreateAppMonitor+--+-- , requestDeleteAppMonitor $+-- newDeleteAppMonitor+--+-- , requestDeleteRumMetricsDestination $+-- newDeleteRumMetricsDestination+--+-- , requestGetAppMonitor $+-- newGetAppMonitor+--+-- , requestGetAppMonitorData $+-- newGetAppMonitorData+--+-- , requestListAppMonitors $+-- newListAppMonitors+--+-- , requestListRumMetricsDestinations $+-- newListRumMetricsDestinations+--+-- , requestListTagsForResource $+-- newListTagsForResource+--+-- , requestPutRumEvents $+-- newPutRumEvents+--+-- , requestPutRumMetricsDestination $+-- newPutRumMetricsDestination+--+-- , requestTagResource $+-- newTagResource+--+-- , requestUntagResource $+-- newUntagResource+--+-- , requestUpdateAppMonitor $+-- newUpdateAppMonitor+--+-- , requestUpdateRumMetricDefinition $+-- newUpdateRumMetricDefinition+--+-- ]++-- , testGroup "response"+-- [ responseBatchCreateRumMetricDefinitions $+-- newBatchCreateRumMetricDefinitionsResponse+--+-- , responseBatchDeleteRumMetricDefinitions $+-- newBatchDeleteRumMetricDefinitionsResponse+--+-- , responseBatchGetRumMetricDefinitions $+-- newBatchGetRumMetricDefinitionsResponse+--+-- , responseCreateAppMonitor $+-- newCreateAppMonitorResponse+--+-- , responseDeleteAppMonitor $+-- newDeleteAppMonitorResponse+--+-- , responseDeleteRumMetricsDestination $+-- newDeleteRumMetricsDestinationResponse+--+-- , responseGetAppMonitor $+-- newGetAppMonitorResponse+--+-- , responseGetAppMonitorData $+-- newGetAppMonitorDataResponse+--+-- , responseListAppMonitors $+-- newListAppMonitorsResponse+--+-- , responseListRumMetricsDestinations $+-- newListRumMetricsDestinationsResponse+--+-- , responseListTagsForResource $+-- newListTagsForResourceResponse+--+-- , responsePutRumEvents $+-- newPutRumEventsResponse+--+-- , responsePutRumMetricsDestination $+-- newPutRumMetricsDestinationResponse+--+-- , responseTagResource $+-- newTagResourceResponse+--+-- , responseUntagResource $+-- newUntagResourceResponse+--+-- , responseUpdateAppMonitor $+-- newUpdateAppMonitorResponse+--+-- , responseUpdateRumMetricDefinition $+-- newUpdateRumMetricDefinitionResponse+--+-- ]+-- ]++-- Requests++requestBatchCreateRumMetricDefinitions :: BatchCreateRumMetricDefinitions -> TestTree+requestBatchCreateRumMetricDefinitions =+ req+ "BatchCreateRumMetricDefinitions"+ "fixture/BatchCreateRumMetricDefinitions.yaml"++requestBatchDeleteRumMetricDefinitions :: BatchDeleteRumMetricDefinitions -> TestTree+requestBatchDeleteRumMetricDefinitions =+ req+ "BatchDeleteRumMetricDefinitions"+ "fixture/BatchDeleteRumMetricDefinitions.yaml"++requestBatchGetRumMetricDefinitions :: BatchGetRumMetricDefinitions -> TestTree+requestBatchGetRumMetricDefinitions =+ req+ "BatchGetRumMetricDefinitions"+ "fixture/BatchGetRumMetricDefinitions.yaml"++requestCreateAppMonitor :: CreateAppMonitor -> TestTree+requestCreateAppMonitor =+ req+ "CreateAppMonitor"+ "fixture/CreateAppMonitor.yaml"++requestDeleteAppMonitor :: DeleteAppMonitor -> TestTree+requestDeleteAppMonitor =+ req+ "DeleteAppMonitor"+ "fixture/DeleteAppMonitor.yaml"++requestDeleteRumMetricsDestination :: DeleteRumMetricsDestination -> TestTree+requestDeleteRumMetricsDestination =+ req+ "DeleteRumMetricsDestination"+ "fixture/DeleteRumMetricsDestination.yaml"++requestGetAppMonitor :: GetAppMonitor -> TestTree+requestGetAppMonitor =+ req+ "GetAppMonitor"+ "fixture/GetAppMonitor.yaml"++requestGetAppMonitorData :: GetAppMonitorData -> TestTree+requestGetAppMonitorData =+ req+ "GetAppMonitorData"+ "fixture/GetAppMonitorData.yaml"++requestListAppMonitors :: ListAppMonitors -> TestTree+requestListAppMonitors =+ req+ "ListAppMonitors"+ "fixture/ListAppMonitors.yaml"++requestListRumMetricsDestinations :: ListRumMetricsDestinations -> TestTree+requestListRumMetricsDestinations =+ req+ "ListRumMetricsDestinations"+ "fixture/ListRumMetricsDestinations.yaml"++requestListTagsForResource :: ListTagsForResource -> TestTree+requestListTagsForResource =+ req+ "ListTagsForResource"+ "fixture/ListTagsForResource.yaml"++requestPutRumEvents :: PutRumEvents -> TestTree+requestPutRumEvents =+ req+ "PutRumEvents"+ "fixture/PutRumEvents.yaml"++requestPutRumMetricsDestination :: PutRumMetricsDestination -> TestTree+requestPutRumMetricsDestination =+ req+ "PutRumMetricsDestination"+ "fixture/PutRumMetricsDestination.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+ req+ "TagResource"+ "fixture/TagResource.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+ req+ "UntagResource"+ "fixture/UntagResource.yaml"++requestUpdateAppMonitor :: UpdateAppMonitor -> TestTree+requestUpdateAppMonitor =+ req+ "UpdateAppMonitor"+ "fixture/UpdateAppMonitor.yaml"++requestUpdateRumMetricDefinition :: UpdateRumMetricDefinition -> TestTree+requestUpdateRumMetricDefinition =+ req+ "UpdateRumMetricDefinition"+ "fixture/UpdateRumMetricDefinition.yaml"++-- Responses++responseBatchCreateRumMetricDefinitions :: BatchCreateRumMetricDefinitionsResponse -> TestTree+responseBatchCreateRumMetricDefinitions =+ res+ "BatchCreateRumMetricDefinitionsResponse"+ "fixture/BatchCreateRumMetricDefinitionsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy BatchCreateRumMetricDefinitions)++responseBatchDeleteRumMetricDefinitions :: BatchDeleteRumMetricDefinitionsResponse -> TestTree+responseBatchDeleteRumMetricDefinitions =+ res+ "BatchDeleteRumMetricDefinitionsResponse"+ "fixture/BatchDeleteRumMetricDefinitionsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy BatchDeleteRumMetricDefinitions)++responseBatchGetRumMetricDefinitions :: BatchGetRumMetricDefinitionsResponse -> TestTree+responseBatchGetRumMetricDefinitions =+ res+ "BatchGetRumMetricDefinitionsResponse"+ "fixture/BatchGetRumMetricDefinitionsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy BatchGetRumMetricDefinitions)++responseCreateAppMonitor :: CreateAppMonitorResponse -> TestTree+responseCreateAppMonitor =+ res+ "CreateAppMonitorResponse"+ "fixture/CreateAppMonitorResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateAppMonitor)++responseDeleteAppMonitor :: DeleteAppMonitorResponse -> TestTree+responseDeleteAppMonitor =+ res+ "DeleteAppMonitorResponse"+ "fixture/DeleteAppMonitorResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteAppMonitor)++responseDeleteRumMetricsDestination :: DeleteRumMetricsDestinationResponse -> TestTree+responseDeleteRumMetricsDestination =+ res+ "DeleteRumMetricsDestinationResponse"+ "fixture/DeleteRumMetricsDestinationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteRumMetricsDestination)++responseGetAppMonitor :: GetAppMonitorResponse -> TestTree+responseGetAppMonitor =+ res+ "GetAppMonitorResponse"+ "fixture/GetAppMonitorResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetAppMonitor)++responseGetAppMonitorData :: GetAppMonitorDataResponse -> TestTree+responseGetAppMonitorData =+ res+ "GetAppMonitorDataResponse"+ "fixture/GetAppMonitorDataResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetAppMonitorData)++responseListAppMonitors :: ListAppMonitorsResponse -> TestTree+responseListAppMonitors =+ res+ "ListAppMonitorsResponse"+ "fixture/ListAppMonitorsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListAppMonitors)++responseListRumMetricsDestinations :: ListRumMetricsDestinationsResponse -> TestTree+responseListRumMetricsDestinations =+ res+ "ListRumMetricsDestinationsResponse"+ "fixture/ListRumMetricsDestinationsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListRumMetricsDestinations)++responseListTagsForResource :: ListTagsForResourceResponse -> TestTree+responseListTagsForResource =+ res+ "ListTagsForResourceResponse"+ "fixture/ListTagsForResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListTagsForResource)++responsePutRumEvents :: PutRumEventsResponse -> TestTree+responsePutRumEvents =+ res+ "PutRumEventsResponse"+ "fixture/PutRumEventsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy PutRumEvents)++responsePutRumMetricsDestination :: PutRumMetricsDestinationResponse -> TestTree+responsePutRumMetricsDestination =+ res+ "PutRumMetricsDestinationResponse"+ "fixture/PutRumMetricsDestinationResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy PutRumMetricsDestination)++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)++responseUpdateAppMonitor :: UpdateAppMonitorResponse -> TestTree+responseUpdateAppMonitor =+ res+ "UpdateAppMonitorResponse"+ "fixture/UpdateAppMonitorResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateAppMonitor)++responseUpdateRumMetricDefinition :: UpdateRumMetricDefinitionResponse -> TestTree+responseUpdateRumMetricDefinition =+ res+ "UpdateRumMetricDefinitionResponse"+ "fixture/UpdateRumMetricDefinitionResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateRumMetricDefinition)
+ test/Test/Amazonka/Rum.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.Amazonka.Rum+-- 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.Rum+ ( tests,+ fixtures,+ )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/Rum/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module : Test.Amazonka.Rum.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.Rum.Internal where