amazonka-scheduler (empty) → 2.0
raw patch · 75 files changed
+8004/−0 lines, 75 filesdep +amazonka-coredep +amazonka-schedulerdep +amazonka-test
Dependencies added: amazonka-core, amazonka-scheduler, amazonka-test, base, bytestring, case-insensitive, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +44/−0
- amazonka-scheduler.cabal +122/−0
- fixture/CreateSchedule.yaml +10/−0
- fixture/CreateScheduleGroup.yaml +10/−0
- fixture/CreateScheduleGroupResponse.proto +0/−0
- fixture/CreateScheduleResponse.proto +0/−0
- fixture/DeleteSchedule.yaml +10/−0
- fixture/DeleteScheduleGroup.yaml +10/−0
- fixture/DeleteScheduleGroupResponse.proto +0/−0
- fixture/DeleteScheduleResponse.proto +0/−0
- fixture/GetSchedule.yaml +10/−0
- fixture/GetScheduleGroup.yaml +10/−0
- fixture/GetScheduleGroupResponse.proto +0/−0
- fixture/GetScheduleResponse.proto +0/−0
- fixture/ListScheduleGroups.yaml +10/−0
- fixture/ListScheduleGroupsResponse.proto +0/−0
- fixture/ListSchedules.yaml +10/−0
- fixture/ListSchedulesResponse.proto +0/−0
- fixture/ListTagsForResource.yaml +10/−0
- fixture/ListTagsForResourceResponse.proto +0/−0
- fixture/TagResource.yaml +10/−0
- fixture/TagResourceResponse.proto +0/−0
- fixture/UntagResource.yaml +10/−0
- fixture/UntagResourceResponse.proto +0/−0
- fixture/UpdateSchedule.yaml +10/−0
- fixture/UpdateScheduleResponse.proto +0/−0
- gen/Amazonka/Scheduler.hs +268/−0
- gen/Amazonka/Scheduler/CreateSchedule.hs +443/−0
- gen/Amazonka/Scheduler/CreateScheduleGroup.hs +209/−0
- gen/Amazonka/Scheduler/DeleteSchedule.hs +187/−0
- gen/Amazonka/Scheduler/DeleteScheduleGroup.hs +181/−0
- gen/Amazonka/Scheduler/GetSchedule.hs +439/−0
- gen/Amazonka/Scheduler/GetScheduleGroup.hs +206/−0
- gen/Amazonka/Scheduler/Lens.hs +262/−0
- gen/Amazonka/Scheduler/ListScheduleGroups.hs +241/−0
- gen/Amazonka/Scheduler/ListSchedules.hs +264/−0
- gen/Amazonka/Scheduler/ListTagsForResource.hs +162/−0
- gen/Amazonka/Scheduler/TagResource.hs +167/−0
- gen/Amazonka/Scheduler/Types.hs +340/−0
- gen/Amazonka/Scheduler/Types/AssignPublicIp.hs +71/−0
- gen/Amazonka/Scheduler/Types/AwsVpcConfiguration.hs +132/−0
- gen/Amazonka/Scheduler/Types/CapacityProviderStrategyItem.hs +131/−0
- gen/Amazonka/Scheduler/Types/DeadLetterConfig.hs +78/−0
- gen/Amazonka/Scheduler/Types/EcsParameters.hs +355/−0
- gen/Amazonka/Scheduler/Types/EventBridgeParameters.hs +102/−0
- gen/Amazonka/Scheduler/Types/FlexibleTimeWindow.hs +102/−0
- gen/Amazonka/Scheduler/Types/FlexibleTimeWindowMode.hs +71/−0
- gen/Amazonka/Scheduler/Types/KinesisParameters.hs +88/−0
- gen/Amazonka/Scheduler/Types/LaunchType.hs +76/−0
- gen/Amazonka/Scheduler/Types/NetworkConfiguration.hs +88/−0
- gen/Amazonka/Scheduler/Types/PlacementConstraint.hs +112/−0
- gen/Amazonka/Scheduler/Types/PlacementConstraintType.hs +71/−0
- gen/Amazonka/Scheduler/Types/PlacementStrategy.hs +132/−0
- gen/Amazonka/Scheduler/Types/PlacementStrategyType.hs +76/−0
- gen/Amazonka/Scheduler/Types/PropagateTags.hs +66/−0
- gen/Amazonka/Scheduler/Types/RetryPolicy.hs +111/−0
- gen/Amazonka/Scheduler/Types/SageMakerPipelineParameter.hs +103/−0
- gen/Amazonka/Scheduler/Types/SageMakerPipelineParameters.hs +90/−0
- gen/Amazonka/Scheduler/Types/ScheduleGroupState.hs +71/−0
- gen/Amazonka/Scheduler/Types/ScheduleGroupSummary.hs +121/−0
- gen/Amazonka/Scheduler/Types/ScheduleState.hs +71/−0
- gen/Amazonka/Scheduler/Types/ScheduleSummary.hs +146/−0
- gen/Amazonka/Scheduler/Types/SqsParameters.hs +84/−0
- gen/Amazonka/Scheduler/Types/Tag.hs +93/−0
- gen/Amazonka/Scheduler/Types/Target.hs +297/−0
- gen/Amazonka/Scheduler/Types/TargetSummary.hs +66/−0
- gen/Amazonka/Scheduler/UntagResource.hs +165/−0
- gen/Amazonka/Scheduler/UpdateSchedule.hs +460/−0
- gen/Amazonka/Scheduler/Waiters.hs +24/−0
- src/.gitkeep +0/−0
- test/Main.hs +23/−0
- test/Test/Amazonka/Gen/Scheduler.hs +278/−0
- test/Test/Amazonka/Scheduler.hs +20/−0
- test/Test/Amazonka/Scheduler/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 EventBridge Scheduler SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version+ +`2.0` - Derived from API version @2021-06-30@ of the AWS service descriptions, licensed under Apache 2.0.++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-scheduler)+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.Scheduler](http://hackage.haskell.org/package/amazonka-scheduler/docs/Amazonka-Scheduler.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-scheduler` 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-scheduler.cabal view
@@ -0,0 +1,122 @@+cabal-version: 2.2+name: amazonka-scheduler+version: 2.0+synopsis: Amazon EventBridge Scheduler 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 @2021-06-30@ 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.Scheduler.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.Scheduler" 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-scheduler++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.Scheduler+ Amazonka.Scheduler.CreateSchedule+ Amazonka.Scheduler.CreateScheduleGroup+ Amazonka.Scheduler.DeleteSchedule+ Amazonka.Scheduler.DeleteScheduleGroup+ Amazonka.Scheduler.GetSchedule+ Amazonka.Scheduler.GetScheduleGroup+ Amazonka.Scheduler.Lens+ Amazonka.Scheduler.ListScheduleGroups+ Amazonka.Scheduler.ListSchedules+ Amazonka.Scheduler.ListTagsForResource+ Amazonka.Scheduler.TagResource+ Amazonka.Scheduler.Types+ Amazonka.Scheduler.Types.AssignPublicIp+ Amazonka.Scheduler.Types.AwsVpcConfiguration+ Amazonka.Scheduler.Types.CapacityProviderStrategyItem+ Amazonka.Scheduler.Types.DeadLetterConfig+ Amazonka.Scheduler.Types.EcsParameters+ Amazonka.Scheduler.Types.EventBridgeParameters+ Amazonka.Scheduler.Types.FlexibleTimeWindow+ Amazonka.Scheduler.Types.FlexibleTimeWindowMode+ Amazonka.Scheduler.Types.KinesisParameters+ Amazonka.Scheduler.Types.LaunchType+ Amazonka.Scheduler.Types.NetworkConfiguration+ Amazonka.Scheduler.Types.PlacementConstraint+ Amazonka.Scheduler.Types.PlacementConstraintType+ Amazonka.Scheduler.Types.PlacementStrategy+ Amazonka.Scheduler.Types.PlacementStrategyType+ Amazonka.Scheduler.Types.PropagateTags+ Amazonka.Scheduler.Types.RetryPolicy+ Amazonka.Scheduler.Types.SageMakerPipelineParameter+ Amazonka.Scheduler.Types.SageMakerPipelineParameters+ Amazonka.Scheduler.Types.ScheduleGroupState+ Amazonka.Scheduler.Types.ScheduleGroupSummary+ Amazonka.Scheduler.Types.ScheduleState+ Amazonka.Scheduler.Types.ScheduleSummary+ Amazonka.Scheduler.Types.SqsParameters+ Amazonka.Scheduler.Types.Tag+ Amazonka.Scheduler.Types.Target+ Amazonka.Scheduler.Types.TargetSummary+ Amazonka.Scheduler.UntagResource+ Amazonka.Scheduler.UpdateSchedule+ Amazonka.Scheduler.Waiters++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , base >=4.12 && <5++test-suite amazonka-scheduler-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.Scheduler+ Test.Amazonka.Scheduler+ Test.Amazonka.Scheduler.Internal++ build-depends:+ , amazonka-core >=2.0 && <2.1+ , amazonka-scheduler+ , amazonka-test >=2.0 && <2.1+ , base+ , bytestring+ , case-insensitive+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/CreateSchedule.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/scheduler/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: scheduler.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/CreateScheduleGroup.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/scheduler/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: scheduler.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/CreateScheduleGroupResponse.proto view
+ fixture/CreateScheduleResponse.proto view
+ fixture/DeleteSchedule.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/scheduler/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: scheduler.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/DeleteScheduleGroup.yaml view
@@ -0,0 +1,10 @@+---+method: DELETE+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/scheduler/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: scheduler.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/DeleteScheduleGroupResponse.proto view
+ fixture/DeleteScheduleResponse.proto view
+ fixture/GetSchedule.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/scheduler/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: scheduler.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/GetScheduleGroup.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/scheduler/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: scheduler.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/GetScheduleGroupResponse.proto view
+ fixture/GetScheduleResponse.proto view
+ fixture/ListScheduleGroups.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/scheduler/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: scheduler.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/ListScheduleGroupsResponse.proto view
+ fixture/ListSchedules.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/scheduler/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: scheduler.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/ListSchedulesResponse.proto view
+ fixture/ListTagsForResource.yaml view
@@ -0,0 +1,10 @@+---+method: GET+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/scheduler/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: scheduler.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/TagResource.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/scheduler/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: scheduler.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/scheduler/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: scheduler.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/UpdateSchedule.yaml view
@@ -0,0 +1,10 @@+---+method: PUT+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/scheduler/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: scheduler.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/UpdateScheduleResponse.proto view
+ gen/Amazonka/Scheduler.hs view
@@ -0,0 +1,268 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Amazonka.Scheduler+-- 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 @2021-06-30@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- Amazon EventBridge Scheduler is a serverless scheduler that allows you+-- to create, run, and manage tasks from one central, managed service.+-- EventBridge Scheduler delivers your tasks reliably, with built-in+-- mechanisms that adjust your schedules based on the availability of+-- downstream targets. The following reference lists the available API+-- actions, and data types for EventBridge Scheduler.+module Amazonka.Scheduler+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ -- $errors++ -- ** ConflictException+ _ConflictException,++ -- ** InternalServerException+ _InternalServerException,++ -- ** ResourceNotFoundException+ _ResourceNotFoundException,++ -- ** ServiceQuotaExceededException+ _ServiceQuotaExceededException,++ -- ** ThrottlingException+ _ThrottlingException,++ -- ** ValidationException+ _ValidationException,++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** CreateSchedule+ CreateSchedule (CreateSchedule'),+ newCreateSchedule,+ CreateScheduleResponse (CreateScheduleResponse'),+ newCreateScheduleResponse,++ -- ** CreateScheduleGroup+ CreateScheduleGroup (CreateScheduleGroup'),+ newCreateScheduleGroup,+ CreateScheduleGroupResponse (CreateScheduleGroupResponse'),+ newCreateScheduleGroupResponse,++ -- ** DeleteSchedule+ DeleteSchedule (DeleteSchedule'),+ newDeleteSchedule,+ DeleteScheduleResponse (DeleteScheduleResponse'),+ newDeleteScheduleResponse,++ -- ** DeleteScheduleGroup+ DeleteScheduleGroup (DeleteScheduleGroup'),+ newDeleteScheduleGroup,+ DeleteScheduleGroupResponse (DeleteScheduleGroupResponse'),+ newDeleteScheduleGroupResponse,++ -- ** GetSchedule+ GetSchedule (GetSchedule'),+ newGetSchedule,+ GetScheduleResponse (GetScheduleResponse'),+ newGetScheduleResponse,++ -- ** GetScheduleGroup+ GetScheduleGroup (GetScheduleGroup'),+ newGetScheduleGroup,+ GetScheduleGroupResponse (GetScheduleGroupResponse'),+ newGetScheduleGroupResponse,++ -- ** ListScheduleGroups (Paginated)+ ListScheduleGroups (ListScheduleGroups'),+ newListScheduleGroups,+ ListScheduleGroupsResponse (ListScheduleGroupsResponse'),+ newListScheduleGroupsResponse,++ -- ** ListSchedules (Paginated)+ ListSchedules (ListSchedules'),+ newListSchedules,+ ListSchedulesResponse (ListSchedulesResponse'),+ newListSchedulesResponse,++ -- ** ListTagsForResource+ ListTagsForResource (ListTagsForResource'),+ newListTagsForResource,+ ListTagsForResourceResponse (ListTagsForResourceResponse'),+ newListTagsForResourceResponse,++ -- ** TagResource+ TagResource (TagResource'),+ newTagResource,+ TagResourceResponse (TagResourceResponse'),+ newTagResourceResponse,++ -- ** UntagResource+ UntagResource (UntagResource'),+ newUntagResource,+ UntagResourceResponse (UntagResourceResponse'),+ newUntagResourceResponse,++ -- ** UpdateSchedule+ UpdateSchedule (UpdateSchedule'),+ newUpdateSchedule,+ UpdateScheduleResponse (UpdateScheduleResponse'),+ newUpdateScheduleResponse,++ -- * Types++ -- ** AssignPublicIp+ AssignPublicIp (..),++ -- ** FlexibleTimeWindowMode+ FlexibleTimeWindowMode (..),++ -- ** LaunchType+ LaunchType (..),++ -- ** PlacementConstraintType+ PlacementConstraintType (..),++ -- ** PlacementStrategyType+ PlacementStrategyType (..),++ -- ** PropagateTags+ PropagateTags (..),++ -- ** ScheduleGroupState+ ScheduleGroupState (..),++ -- ** ScheduleState+ ScheduleState (..),++ -- ** AwsVpcConfiguration+ AwsVpcConfiguration (AwsVpcConfiguration'),+ newAwsVpcConfiguration,++ -- ** CapacityProviderStrategyItem+ CapacityProviderStrategyItem (CapacityProviderStrategyItem'),+ newCapacityProviderStrategyItem,++ -- ** DeadLetterConfig+ DeadLetterConfig (DeadLetterConfig'),+ newDeadLetterConfig,++ -- ** EcsParameters+ EcsParameters (EcsParameters'),+ newEcsParameters,++ -- ** EventBridgeParameters+ EventBridgeParameters (EventBridgeParameters'),+ newEventBridgeParameters,++ -- ** FlexibleTimeWindow+ FlexibleTimeWindow (FlexibleTimeWindow'),+ newFlexibleTimeWindow,++ -- ** KinesisParameters+ KinesisParameters (KinesisParameters'),+ newKinesisParameters,++ -- ** NetworkConfiguration+ NetworkConfiguration (NetworkConfiguration'),+ newNetworkConfiguration,++ -- ** PlacementConstraint+ PlacementConstraint (PlacementConstraint'),+ newPlacementConstraint,++ -- ** PlacementStrategy+ PlacementStrategy (PlacementStrategy'),+ newPlacementStrategy,++ -- ** RetryPolicy+ RetryPolicy (RetryPolicy'),+ newRetryPolicy,++ -- ** SageMakerPipelineParameter+ SageMakerPipelineParameter (SageMakerPipelineParameter'),+ newSageMakerPipelineParameter,++ -- ** SageMakerPipelineParameters+ SageMakerPipelineParameters (SageMakerPipelineParameters'),+ newSageMakerPipelineParameters,++ -- ** ScheduleGroupSummary+ ScheduleGroupSummary (ScheduleGroupSummary'),+ newScheduleGroupSummary,++ -- ** ScheduleSummary+ ScheduleSummary (ScheduleSummary'),+ newScheduleSummary,++ -- ** SqsParameters+ SqsParameters (SqsParameters'),+ newSqsParameters,++ -- ** Tag+ Tag (Tag'),+ newTag,++ -- ** Target+ Target (Target'),+ newTarget,++ -- ** TargetSummary+ TargetSummary (TargetSummary'),+ newTargetSummary,+ )+where++import Amazonka.Scheduler.CreateSchedule+import Amazonka.Scheduler.CreateScheduleGroup+import Amazonka.Scheduler.DeleteSchedule+import Amazonka.Scheduler.DeleteScheduleGroup+import Amazonka.Scheduler.GetSchedule+import Amazonka.Scheduler.GetScheduleGroup+import Amazonka.Scheduler.Lens+import Amazonka.Scheduler.ListScheduleGroups+import Amazonka.Scheduler.ListSchedules+import Amazonka.Scheduler.ListTagsForResource+import Amazonka.Scheduler.TagResource+import Amazonka.Scheduler.Types+import Amazonka.Scheduler.UntagResource+import Amazonka.Scheduler.UpdateSchedule+import Amazonka.Scheduler.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 'Scheduler'.++-- $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/Scheduler/CreateSchedule.hs view
@@ -0,0 +1,443 @@+{-# 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.Scheduler.CreateSchedule+-- 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 the specified schedule.+module Amazonka.Scheduler.CreateSchedule+ ( -- * Creating a Request+ CreateSchedule (..),+ newCreateSchedule,++ -- * Request Lenses+ createSchedule_clientToken,+ createSchedule_description,+ createSchedule_endDate,+ createSchedule_groupName,+ createSchedule_kmsKeyArn,+ createSchedule_scheduleExpressionTimezone,+ createSchedule_startDate,+ createSchedule_state,+ createSchedule_flexibleTimeWindow,+ createSchedule_name,+ createSchedule_scheduleExpression,+ createSchedule_target,++ -- * Destructuring the Response+ CreateScheduleResponse (..),+ newCreateScheduleResponse,++ -- * Response Lenses+ createScheduleResponse_httpStatus,+ createScheduleResponse_scheduleArn,+ )+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.Scheduler.Types++-- | /See:/ 'newCreateSchedule' smart constructor.+data CreateSchedule = CreateSchedule'+ { -- | Unique, case-sensitive identifier you provide to ensure the idempotency+ -- of the request. If you do not specify a client token, EventBridge+ -- Scheduler uses a randomly generated token for the request to ensure+ -- idempotency.+ clientToken :: Prelude.Maybe Prelude.Text,+ -- | The description you specify for the schedule.+ description :: Prelude.Maybe Prelude.Text,+ -- | The date, in UTC, before which the schedule can invoke its target.+ -- Depending on the schedule\'s recurrence expression, invocations might+ -- stop on, or before, the @EndDate@ you specify. EventBridge Scheduler+ -- ignores @EndDate@ for one-time schedules.+ endDate :: Prelude.Maybe Data.POSIX,+ -- | The name of the schedule group to associate with this schedule. If you+ -- omit this, the default schedule group is used.+ groupName :: Prelude.Maybe Prelude.Text,+ -- | The Amazon Resource Name (ARN) for the customer managed KMS key that+ -- EventBridge Scheduler will use to encrypt and decrypt your data.+ kmsKeyArn :: Prelude.Maybe Prelude.Text,+ -- | The timezone in which the scheduling expression is evaluated.+ scheduleExpressionTimezone :: Prelude.Maybe Prelude.Text,+ -- | The date, in UTC, after which the schedule can begin invoking its+ -- target. Depending on the schedule\'s recurrence expression, invocations+ -- might occur on, or after, the @StartDate@ you specify. EventBridge+ -- Scheduler ignores @StartDate@ for one-time schedules.+ startDate :: Prelude.Maybe Data.POSIX,+ -- | Specifies whether the schedule is enabled or disabled.+ state :: Prelude.Maybe ScheduleState,+ -- | Allows you to configure a time window during which EventBridge Scheduler+ -- invokes the schedule.+ flexibleTimeWindow :: FlexibleTimeWindow,+ -- | The name of the schedule that you are creating.+ name :: Prelude.Text,+ -- | The expression that defines when the schedule runs. The following+ -- formats are supported.+ --+ -- - @at@ expression - @at(yyyy-mm-ddThh:mm:ss)@+ --+ -- - @rate@ expression - @rate(unit value)@+ --+ -- - @cron@ expression - @cron(fields)@+ --+ -- You can use @at@ expressions to create one-time schedules that invoke a+ -- target once, at the time and in the time zone, that you specify. You can+ -- use @rate@ and @cron@ expressions to create recurring schedules.+ -- Rate-based schedules are useful when you want to invoke a target at+ -- regular intervals, such as every 15 minutes or every five days.+ -- Cron-based schedules are useful when you want to invoke a target+ -- periodically at a specific time, such as at 8:00 am (UTC+0) every 1st+ -- day of the month.+ --+ -- A @cron@ expression consists of six fields separated by white spaces:+ -- @(minutes hours day_of_month month day_of_week year)@.+ --+ -- A @rate@ expression consists of a /value/ as a positive integer, and a+ -- /unit/ with the following options: @minute@ | @minutes@ | @hour@ |+ -- @hours@ | @day@ | @days@+ --+ -- For more information and examples, see+ -- <https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html Schedule types on EventBridge Scheduler>+ -- in the /EventBridge Scheduler User Guide/.+ scheduleExpression :: Prelude.Text,+ -- | The schedule\'s target.+ target :: Target+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateSchedule' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'createSchedule_clientToken' - Unique, case-sensitive identifier you provide to ensure the idempotency+-- of the request. If you do not specify a client token, EventBridge+-- Scheduler uses a randomly generated token for the request to ensure+-- idempotency.+--+-- 'description', 'createSchedule_description' - The description you specify for the schedule.+--+-- 'endDate', 'createSchedule_endDate' - The date, in UTC, before which the schedule can invoke its target.+-- Depending on the schedule\'s recurrence expression, invocations might+-- stop on, or before, the @EndDate@ you specify. EventBridge Scheduler+-- ignores @EndDate@ for one-time schedules.+--+-- 'groupName', 'createSchedule_groupName' - The name of the schedule group to associate with this schedule. If you+-- omit this, the default schedule group is used.+--+-- 'kmsKeyArn', 'createSchedule_kmsKeyArn' - The Amazon Resource Name (ARN) for the customer managed KMS key that+-- EventBridge Scheduler will use to encrypt and decrypt your data.+--+-- 'scheduleExpressionTimezone', 'createSchedule_scheduleExpressionTimezone' - The timezone in which the scheduling expression is evaluated.+--+-- 'startDate', 'createSchedule_startDate' - The date, in UTC, after which the schedule can begin invoking its+-- target. Depending on the schedule\'s recurrence expression, invocations+-- might occur on, or after, the @StartDate@ you specify. EventBridge+-- Scheduler ignores @StartDate@ for one-time schedules.+--+-- 'state', 'createSchedule_state' - Specifies whether the schedule is enabled or disabled.+--+-- 'flexibleTimeWindow', 'createSchedule_flexibleTimeWindow' - Allows you to configure a time window during which EventBridge Scheduler+-- invokes the schedule.+--+-- 'name', 'createSchedule_name' - The name of the schedule that you are creating.+--+-- 'scheduleExpression', 'createSchedule_scheduleExpression' - The expression that defines when the schedule runs. The following+-- formats are supported.+--+-- - @at@ expression - @at(yyyy-mm-ddThh:mm:ss)@+--+-- - @rate@ expression - @rate(unit value)@+--+-- - @cron@ expression - @cron(fields)@+--+-- You can use @at@ expressions to create one-time schedules that invoke a+-- target once, at the time and in the time zone, that you specify. You can+-- use @rate@ and @cron@ expressions to create recurring schedules.+-- Rate-based schedules are useful when you want to invoke a target at+-- regular intervals, such as every 15 minutes or every five days.+-- Cron-based schedules are useful when you want to invoke a target+-- periodically at a specific time, such as at 8:00 am (UTC+0) every 1st+-- day of the month.+--+-- A @cron@ expression consists of six fields separated by white spaces:+-- @(minutes hours day_of_month month day_of_week year)@.+--+-- A @rate@ expression consists of a /value/ as a positive integer, and a+-- /unit/ with the following options: @minute@ | @minutes@ | @hour@ |+-- @hours@ | @day@ | @days@+--+-- For more information and examples, see+-- <https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html Schedule types on EventBridge Scheduler>+-- in the /EventBridge Scheduler User Guide/.+--+-- 'target', 'createSchedule_target' - The schedule\'s target.+newCreateSchedule ::+ -- | 'flexibleTimeWindow'+ FlexibleTimeWindow ->+ -- | 'name'+ Prelude.Text ->+ -- | 'scheduleExpression'+ Prelude.Text ->+ -- | 'target'+ Target ->+ CreateSchedule+newCreateSchedule+ pFlexibleTimeWindow_+ pName_+ pScheduleExpression_+ pTarget_ =+ CreateSchedule'+ { clientToken = Prelude.Nothing,+ description = Prelude.Nothing,+ endDate = Prelude.Nothing,+ groupName = Prelude.Nothing,+ kmsKeyArn = Prelude.Nothing,+ scheduleExpressionTimezone = Prelude.Nothing,+ startDate = Prelude.Nothing,+ state = Prelude.Nothing,+ flexibleTimeWindow = pFlexibleTimeWindow_,+ name = pName_,+ scheduleExpression = pScheduleExpression_,+ target = pTarget_+ }++-- | Unique, case-sensitive identifier you provide to ensure the idempotency+-- of the request. If you do not specify a client token, EventBridge+-- Scheduler uses a randomly generated token for the request to ensure+-- idempotency.+createSchedule_clientToken :: Lens.Lens' CreateSchedule (Prelude.Maybe Prelude.Text)+createSchedule_clientToken = Lens.lens (\CreateSchedule' {clientToken} -> clientToken) (\s@CreateSchedule' {} a -> s {clientToken = a} :: CreateSchedule)++-- | The description you specify for the schedule.+createSchedule_description :: Lens.Lens' CreateSchedule (Prelude.Maybe Prelude.Text)+createSchedule_description = Lens.lens (\CreateSchedule' {description} -> description) (\s@CreateSchedule' {} a -> s {description = a} :: CreateSchedule)++-- | The date, in UTC, before which the schedule can invoke its target.+-- Depending on the schedule\'s recurrence expression, invocations might+-- stop on, or before, the @EndDate@ you specify. EventBridge Scheduler+-- ignores @EndDate@ for one-time schedules.+createSchedule_endDate :: Lens.Lens' CreateSchedule (Prelude.Maybe Prelude.UTCTime)+createSchedule_endDate = Lens.lens (\CreateSchedule' {endDate} -> endDate) (\s@CreateSchedule' {} a -> s {endDate = a} :: CreateSchedule) Prelude.. Lens.mapping Data._Time++-- | The name of the schedule group to associate with this schedule. If you+-- omit this, the default schedule group is used.+createSchedule_groupName :: Lens.Lens' CreateSchedule (Prelude.Maybe Prelude.Text)+createSchedule_groupName = Lens.lens (\CreateSchedule' {groupName} -> groupName) (\s@CreateSchedule' {} a -> s {groupName = a} :: CreateSchedule)++-- | The Amazon Resource Name (ARN) for the customer managed KMS key that+-- EventBridge Scheduler will use to encrypt and decrypt your data.+createSchedule_kmsKeyArn :: Lens.Lens' CreateSchedule (Prelude.Maybe Prelude.Text)+createSchedule_kmsKeyArn = Lens.lens (\CreateSchedule' {kmsKeyArn} -> kmsKeyArn) (\s@CreateSchedule' {} a -> s {kmsKeyArn = a} :: CreateSchedule)++-- | The timezone in which the scheduling expression is evaluated.+createSchedule_scheduleExpressionTimezone :: Lens.Lens' CreateSchedule (Prelude.Maybe Prelude.Text)+createSchedule_scheduleExpressionTimezone = Lens.lens (\CreateSchedule' {scheduleExpressionTimezone} -> scheduleExpressionTimezone) (\s@CreateSchedule' {} a -> s {scheduleExpressionTimezone = a} :: CreateSchedule)++-- | The date, in UTC, after which the schedule can begin invoking its+-- target. Depending on the schedule\'s recurrence expression, invocations+-- might occur on, or after, the @StartDate@ you specify. EventBridge+-- Scheduler ignores @StartDate@ for one-time schedules.+createSchedule_startDate :: Lens.Lens' CreateSchedule (Prelude.Maybe Prelude.UTCTime)+createSchedule_startDate = Lens.lens (\CreateSchedule' {startDate} -> startDate) (\s@CreateSchedule' {} a -> s {startDate = a} :: CreateSchedule) Prelude.. Lens.mapping Data._Time++-- | Specifies whether the schedule is enabled or disabled.+createSchedule_state :: Lens.Lens' CreateSchedule (Prelude.Maybe ScheduleState)+createSchedule_state = Lens.lens (\CreateSchedule' {state} -> state) (\s@CreateSchedule' {} a -> s {state = a} :: CreateSchedule)++-- | Allows you to configure a time window during which EventBridge Scheduler+-- invokes the schedule.+createSchedule_flexibleTimeWindow :: Lens.Lens' CreateSchedule FlexibleTimeWindow+createSchedule_flexibleTimeWindow = Lens.lens (\CreateSchedule' {flexibleTimeWindow} -> flexibleTimeWindow) (\s@CreateSchedule' {} a -> s {flexibleTimeWindow = a} :: CreateSchedule)++-- | The name of the schedule that you are creating.+createSchedule_name :: Lens.Lens' CreateSchedule Prelude.Text+createSchedule_name = Lens.lens (\CreateSchedule' {name} -> name) (\s@CreateSchedule' {} a -> s {name = a} :: CreateSchedule)++-- | The expression that defines when the schedule runs. The following+-- formats are supported.+--+-- - @at@ expression - @at(yyyy-mm-ddThh:mm:ss)@+--+-- - @rate@ expression - @rate(unit value)@+--+-- - @cron@ expression - @cron(fields)@+--+-- You can use @at@ expressions to create one-time schedules that invoke a+-- target once, at the time and in the time zone, that you specify. You can+-- use @rate@ and @cron@ expressions to create recurring schedules.+-- Rate-based schedules are useful when you want to invoke a target at+-- regular intervals, such as every 15 minutes or every five days.+-- Cron-based schedules are useful when you want to invoke a target+-- periodically at a specific time, such as at 8:00 am (UTC+0) every 1st+-- day of the month.+--+-- A @cron@ expression consists of six fields separated by white spaces:+-- @(minutes hours day_of_month month day_of_week year)@.+--+-- A @rate@ expression consists of a /value/ as a positive integer, and a+-- /unit/ with the following options: @minute@ | @minutes@ | @hour@ |+-- @hours@ | @day@ | @days@+--+-- For more information and examples, see+-- <https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html Schedule types on EventBridge Scheduler>+-- in the /EventBridge Scheduler User Guide/.+createSchedule_scheduleExpression :: Lens.Lens' CreateSchedule Prelude.Text+createSchedule_scheduleExpression = Lens.lens (\CreateSchedule' {scheduleExpression} -> scheduleExpression) (\s@CreateSchedule' {} a -> s {scheduleExpression = a} :: CreateSchedule)++-- | The schedule\'s target.+createSchedule_target :: Lens.Lens' CreateSchedule Target+createSchedule_target = Lens.lens (\CreateSchedule' {target} -> target) (\s@CreateSchedule' {} a -> s {target = a} :: CreateSchedule)++instance Core.AWSRequest CreateSchedule where+ type+ AWSResponse CreateSchedule =+ CreateScheduleResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateScheduleResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "ScheduleArn")+ )++instance Prelude.Hashable CreateSchedule where+ hashWithSalt _salt CreateSchedule' {..} =+ _salt+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` description+ `Prelude.hashWithSalt` endDate+ `Prelude.hashWithSalt` groupName+ `Prelude.hashWithSalt` kmsKeyArn+ `Prelude.hashWithSalt` scheduleExpressionTimezone+ `Prelude.hashWithSalt` startDate+ `Prelude.hashWithSalt` state+ `Prelude.hashWithSalt` flexibleTimeWindow+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` scheduleExpression+ `Prelude.hashWithSalt` target++instance Prelude.NFData CreateSchedule where+ rnf CreateSchedule' {..} =+ Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf description+ `Prelude.seq` Prelude.rnf endDate+ `Prelude.seq` Prelude.rnf groupName+ `Prelude.seq` Prelude.rnf kmsKeyArn+ `Prelude.seq` Prelude.rnf scheduleExpressionTimezone+ `Prelude.seq` Prelude.rnf startDate+ `Prelude.seq` Prelude.rnf state+ `Prelude.seq` Prelude.rnf flexibleTimeWindow+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf scheduleExpression+ `Prelude.seq` Prelude.rnf target++instance Data.ToHeaders CreateSchedule where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateSchedule where+ toJSON CreateSchedule' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ClientToken" Data..=) Prelude.<$> clientToken,+ ("Description" Data..=) Prelude.<$> description,+ ("EndDate" Data..=) Prelude.<$> endDate,+ ("GroupName" Data..=) Prelude.<$> groupName,+ ("KmsKeyArn" Data..=) Prelude.<$> kmsKeyArn,+ ("ScheduleExpressionTimezone" Data..=)+ Prelude.<$> scheduleExpressionTimezone,+ ("StartDate" Data..=) Prelude.<$> startDate,+ ("State" Data..=) Prelude.<$> state,+ Prelude.Just+ ("FlexibleTimeWindow" Data..= flexibleTimeWindow),+ Prelude.Just+ ("ScheduleExpression" Data..= scheduleExpression),+ Prelude.Just ("Target" Data..= target)+ ]+ )++instance Data.ToPath CreateSchedule where+ toPath CreateSchedule' {..} =+ Prelude.mconcat ["/schedules/", Data.toBS name]++instance Data.ToQuery CreateSchedule where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateScheduleResponse' smart constructor.+data CreateScheduleResponse = CreateScheduleResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The Amazon Resource Name (ARN) of the schedule.+ scheduleArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateScheduleResponse' with all optional fields 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', 'createScheduleResponse_httpStatus' - The response's http status code.+--+-- 'scheduleArn', 'createScheduleResponse_scheduleArn' - The Amazon Resource Name (ARN) of the schedule.+newCreateScheduleResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'scheduleArn'+ Prelude.Text ->+ CreateScheduleResponse+newCreateScheduleResponse pHttpStatus_ pScheduleArn_ =+ CreateScheduleResponse'+ { httpStatus = pHttpStatus_,+ scheduleArn = pScheduleArn_+ }++-- | The response's http status code.+createScheduleResponse_httpStatus :: Lens.Lens' CreateScheduleResponse Prelude.Int+createScheduleResponse_httpStatus = Lens.lens (\CreateScheduleResponse' {httpStatus} -> httpStatus) (\s@CreateScheduleResponse' {} a -> s {httpStatus = a} :: CreateScheduleResponse)++-- | The Amazon Resource Name (ARN) of the schedule.+createScheduleResponse_scheduleArn :: Lens.Lens' CreateScheduleResponse Prelude.Text+createScheduleResponse_scheduleArn = Lens.lens (\CreateScheduleResponse' {scheduleArn} -> scheduleArn) (\s@CreateScheduleResponse' {} a -> s {scheduleArn = a} :: CreateScheduleResponse)++instance Prelude.NFData CreateScheduleResponse where+ rnf CreateScheduleResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf scheduleArn
+ gen/Amazonka/Scheduler/CreateScheduleGroup.hs view
@@ -0,0 +1,209 @@+{-# 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.Scheduler.CreateScheduleGroup+-- 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 the specified schedule group.+module Amazonka.Scheduler.CreateScheduleGroup+ ( -- * Creating a Request+ CreateScheduleGroup (..),+ newCreateScheduleGroup,++ -- * Request Lenses+ createScheduleGroup_clientToken,+ createScheduleGroup_tags,+ createScheduleGroup_name,++ -- * Destructuring the Response+ CreateScheduleGroupResponse (..),+ newCreateScheduleGroupResponse,++ -- * Response Lenses+ createScheduleGroupResponse_httpStatus,+ createScheduleGroupResponse_scheduleGroupArn,+ )+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.Scheduler.Types++-- | /See:/ 'newCreateScheduleGroup' smart constructor.+data CreateScheduleGroup = CreateScheduleGroup'+ { -- | Unique, case-sensitive identifier you provide to ensure the idempotency+ -- of the request. If you do not specify a client token, EventBridge+ -- Scheduler uses a randomly generated token for the request to ensure+ -- idempotency.+ clientToken :: Prelude.Maybe Prelude.Text,+ -- | The list of tags to associate with the schedule group.+ tags :: Prelude.Maybe [Tag],+ -- | The name of the schedule group that you are creating.+ name :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateScheduleGroup' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'createScheduleGroup_clientToken' - Unique, case-sensitive identifier you provide to ensure the idempotency+-- of the request. If you do not specify a client token, EventBridge+-- Scheduler uses a randomly generated token for the request to ensure+-- idempotency.+--+-- 'tags', 'createScheduleGroup_tags' - The list of tags to associate with the schedule group.+--+-- 'name', 'createScheduleGroup_name' - The name of the schedule group that you are creating.+newCreateScheduleGroup ::+ -- | 'name'+ Prelude.Text ->+ CreateScheduleGroup+newCreateScheduleGroup pName_ =+ CreateScheduleGroup'+ { clientToken = Prelude.Nothing,+ tags = Prelude.Nothing,+ name = pName_+ }++-- | Unique, case-sensitive identifier you provide to ensure the idempotency+-- of the request. If you do not specify a client token, EventBridge+-- Scheduler uses a randomly generated token for the request to ensure+-- idempotency.+createScheduleGroup_clientToken :: Lens.Lens' CreateScheduleGroup (Prelude.Maybe Prelude.Text)+createScheduleGroup_clientToken = Lens.lens (\CreateScheduleGroup' {clientToken} -> clientToken) (\s@CreateScheduleGroup' {} a -> s {clientToken = a} :: CreateScheduleGroup)++-- | The list of tags to associate with the schedule group.+createScheduleGroup_tags :: Lens.Lens' CreateScheduleGroup (Prelude.Maybe [Tag])+createScheduleGroup_tags = Lens.lens (\CreateScheduleGroup' {tags} -> tags) (\s@CreateScheduleGroup' {} a -> s {tags = a} :: CreateScheduleGroup) Prelude.. Lens.mapping Lens.coerced++-- | The name of the schedule group that you are creating.+createScheduleGroup_name :: Lens.Lens' CreateScheduleGroup Prelude.Text+createScheduleGroup_name = Lens.lens (\CreateScheduleGroup' {name} -> name) (\s@CreateScheduleGroup' {} a -> s {name = a} :: CreateScheduleGroup)++instance Core.AWSRequest CreateScheduleGroup where+ type+ AWSResponse CreateScheduleGroup =+ CreateScheduleGroupResponse+ request overrides =+ Request.postJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ CreateScheduleGroupResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "ScheduleGroupArn")+ )++instance Prelude.Hashable CreateScheduleGroup where+ hashWithSalt _salt CreateScheduleGroup' {..} =+ _salt+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` name++instance Prelude.NFData CreateScheduleGroup where+ rnf CreateScheduleGroup' {..} =+ Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf name++instance Data.ToHeaders CreateScheduleGroup where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON CreateScheduleGroup where+ toJSON CreateScheduleGroup' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ClientToken" Data..=) Prelude.<$> clientToken,+ ("Tags" Data..=) Prelude.<$> tags+ ]+ )++instance Data.ToPath CreateScheduleGroup where+ toPath CreateScheduleGroup' {..} =+ Prelude.mconcat+ ["/schedule-groups/", Data.toBS name]++instance Data.ToQuery CreateScheduleGroup where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newCreateScheduleGroupResponse' smart constructor.+data CreateScheduleGroupResponse = CreateScheduleGroupResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The Amazon Resource Name (ARN) of the schedule group.+ scheduleGroupArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CreateScheduleGroupResponse' with all optional fields 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', 'createScheduleGroupResponse_httpStatus' - The response's http status code.+--+-- 'scheduleGroupArn', 'createScheduleGroupResponse_scheduleGroupArn' - The Amazon Resource Name (ARN) of the schedule group.+newCreateScheduleGroupResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'scheduleGroupArn'+ Prelude.Text ->+ CreateScheduleGroupResponse+newCreateScheduleGroupResponse+ pHttpStatus_+ pScheduleGroupArn_ =+ CreateScheduleGroupResponse'+ { httpStatus =+ pHttpStatus_,+ scheduleGroupArn = pScheduleGroupArn_+ }++-- | The response's http status code.+createScheduleGroupResponse_httpStatus :: Lens.Lens' CreateScheduleGroupResponse Prelude.Int+createScheduleGroupResponse_httpStatus = Lens.lens (\CreateScheduleGroupResponse' {httpStatus} -> httpStatus) (\s@CreateScheduleGroupResponse' {} a -> s {httpStatus = a} :: CreateScheduleGroupResponse)++-- | The Amazon Resource Name (ARN) of the schedule group.+createScheduleGroupResponse_scheduleGroupArn :: Lens.Lens' CreateScheduleGroupResponse Prelude.Text+createScheduleGroupResponse_scheduleGroupArn = Lens.lens (\CreateScheduleGroupResponse' {scheduleGroupArn} -> scheduleGroupArn) (\s@CreateScheduleGroupResponse' {} a -> s {scheduleGroupArn = a} :: CreateScheduleGroupResponse)++instance Prelude.NFData CreateScheduleGroupResponse where+ rnf CreateScheduleGroupResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf scheduleGroupArn
+ gen/Amazonka/Scheduler/DeleteSchedule.hs view
@@ -0,0 +1,187 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Scheduler.DeleteSchedule+-- 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 the specified schedule.+module Amazonka.Scheduler.DeleteSchedule+ ( -- * Creating a Request+ DeleteSchedule (..),+ newDeleteSchedule,++ -- * Request Lenses+ deleteSchedule_clientToken,+ deleteSchedule_groupName,+ deleteSchedule_name,++ -- * Destructuring the Response+ DeleteScheduleResponse (..),+ newDeleteScheduleResponse,++ -- * Response Lenses+ deleteScheduleResponse_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.Scheduler.Types++-- | /See:/ 'newDeleteSchedule' smart constructor.+data DeleteSchedule = DeleteSchedule'+ { -- | Unique, case-sensitive identifier you provide to ensure the idempotency+ -- of the request. If you do not specify a client token, EventBridge+ -- Scheduler uses a randomly generated token for the request to ensure+ -- idempotency.+ clientToken :: Prelude.Maybe Prelude.Text,+ -- | The name of the schedule group associated with this schedule. If you+ -- omit this, the default schedule group is used.+ groupName :: Prelude.Maybe Prelude.Text,+ -- | The name of the schedule to delete.+ name :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteSchedule' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'deleteSchedule_clientToken' - Unique, case-sensitive identifier you provide to ensure the idempotency+-- of the request. If you do not specify a client token, EventBridge+-- Scheduler uses a randomly generated token for the request to ensure+-- idempotency.+--+-- 'groupName', 'deleteSchedule_groupName' - The name of the schedule group associated with this schedule. If you+-- omit this, the default schedule group is used.+--+-- 'name', 'deleteSchedule_name' - The name of the schedule to delete.+newDeleteSchedule ::+ -- | 'name'+ Prelude.Text ->+ DeleteSchedule+newDeleteSchedule pName_ =+ DeleteSchedule'+ { clientToken = Prelude.Nothing,+ groupName = Prelude.Nothing,+ name = pName_+ }++-- | Unique, case-sensitive identifier you provide to ensure the idempotency+-- of the request. If you do not specify a client token, EventBridge+-- Scheduler uses a randomly generated token for the request to ensure+-- idempotency.+deleteSchedule_clientToken :: Lens.Lens' DeleteSchedule (Prelude.Maybe Prelude.Text)+deleteSchedule_clientToken = Lens.lens (\DeleteSchedule' {clientToken} -> clientToken) (\s@DeleteSchedule' {} a -> s {clientToken = a} :: DeleteSchedule)++-- | The name of the schedule group associated with this schedule. If you+-- omit this, the default schedule group is used.+deleteSchedule_groupName :: Lens.Lens' DeleteSchedule (Prelude.Maybe Prelude.Text)+deleteSchedule_groupName = Lens.lens (\DeleteSchedule' {groupName} -> groupName) (\s@DeleteSchedule' {} a -> s {groupName = a} :: DeleteSchedule)++-- | The name of the schedule to delete.+deleteSchedule_name :: Lens.Lens' DeleteSchedule Prelude.Text+deleteSchedule_name = Lens.lens (\DeleteSchedule' {name} -> name) (\s@DeleteSchedule' {} a -> s {name = a} :: DeleteSchedule)++instance Core.AWSRequest DeleteSchedule where+ type+ AWSResponse DeleteSchedule =+ DeleteScheduleResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ DeleteScheduleResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeleteSchedule where+ hashWithSalt _salt DeleteSchedule' {..} =+ _salt+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` groupName+ `Prelude.hashWithSalt` name++instance Prelude.NFData DeleteSchedule where+ rnf DeleteSchedule' {..} =+ Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf groupName+ `Prelude.seq` Prelude.rnf name++instance Data.ToHeaders DeleteSchedule where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DeleteSchedule where+ toPath DeleteSchedule' {..} =+ Prelude.mconcat ["/schedules/", Data.toBS name]++instance Data.ToQuery DeleteSchedule where+ toQuery DeleteSchedule' {..} =+ Prelude.mconcat+ [ "clientToken" Data.=: clientToken,+ "groupName" Data.=: groupName+ ]++-- | /See:/ 'newDeleteScheduleResponse' smart constructor.+data DeleteScheduleResponse = DeleteScheduleResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteScheduleResponse' with all optional fields 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', 'deleteScheduleResponse_httpStatus' - The response's http status code.+newDeleteScheduleResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteScheduleResponse+newDeleteScheduleResponse pHttpStatus_ =+ DeleteScheduleResponse' {httpStatus = pHttpStatus_}++-- | The response's http status code.+deleteScheduleResponse_httpStatus :: Lens.Lens' DeleteScheduleResponse Prelude.Int+deleteScheduleResponse_httpStatus = Lens.lens (\DeleteScheduleResponse' {httpStatus} -> httpStatus) (\s@DeleteScheduleResponse' {} a -> s {httpStatus = a} :: DeleteScheduleResponse)++instance Prelude.NFData DeleteScheduleResponse where+ rnf DeleteScheduleResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/Scheduler/DeleteScheduleGroup.hs view
@@ -0,0 +1,181 @@+{-# 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.Scheduler.DeleteScheduleGroup+-- 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 the specified schedule group. Deleting a schedule group results+-- in EventBridge Scheduler deleting all schedules associated with the+-- group. When you delete a group, it remains in a @DELETING@ state until+-- all of its associated schedules are deleted. Schedules associated with+-- the group that are set to run while the schedule group is in the process+-- of being deleted might continue to invoke their targets until the+-- schedule group and its associated schedules are deleted.+--+-- This operation is eventually consistent.+module Amazonka.Scheduler.DeleteScheduleGroup+ ( -- * Creating a Request+ DeleteScheduleGroup (..),+ newDeleteScheduleGroup,++ -- * Request Lenses+ deleteScheduleGroup_clientToken,+ deleteScheduleGroup_name,++ -- * Destructuring the Response+ DeleteScheduleGroupResponse (..),+ newDeleteScheduleGroupResponse,++ -- * Response Lenses+ deleteScheduleGroupResponse_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.Scheduler.Types++-- | /See:/ 'newDeleteScheduleGroup' smart constructor.+data DeleteScheduleGroup = DeleteScheduleGroup'+ { -- | Unique, case-sensitive identifier you provide to ensure the idempotency+ -- of the request. If you do not specify a client token, EventBridge+ -- Scheduler uses a randomly generated token for the request to ensure+ -- idempotency.+ clientToken :: Prelude.Maybe Prelude.Text,+ -- | The name of the schedule group to delete.+ name :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteScheduleGroup' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'deleteScheduleGroup_clientToken' - Unique, case-sensitive identifier you provide to ensure the idempotency+-- of the request. If you do not specify a client token, EventBridge+-- Scheduler uses a randomly generated token for the request to ensure+-- idempotency.+--+-- 'name', 'deleteScheduleGroup_name' - The name of the schedule group to delete.+newDeleteScheduleGroup ::+ -- | 'name'+ Prelude.Text ->+ DeleteScheduleGroup+newDeleteScheduleGroup pName_ =+ DeleteScheduleGroup'+ { clientToken = Prelude.Nothing,+ name = pName_+ }++-- | Unique, case-sensitive identifier you provide to ensure the idempotency+-- of the request. If you do not specify a client token, EventBridge+-- Scheduler uses a randomly generated token for the request to ensure+-- idempotency.+deleteScheduleGroup_clientToken :: Lens.Lens' DeleteScheduleGroup (Prelude.Maybe Prelude.Text)+deleteScheduleGroup_clientToken = Lens.lens (\DeleteScheduleGroup' {clientToken} -> clientToken) (\s@DeleteScheduleGroup' {} a -> s {clientToken = a} :: DeleteScheduleGroup)++-- | The name of the schedule group to delete.+deleteScheduleGroup_name :: Lens.Lens' DeleteScheduleGroup Prelude.Text+deleteScheduleGroup_name = Lens.lens (\DeleteScheduleGroup' {name} -> name) (\s@DeleteScheduleGroup' {} a -> s {name = a} :: DeleteScheduleGroup)++instance Core.AWSRequest DeleteScheduleGroup where+ type+ AWSResponse DeleteScheduleGroup =+ DeleteScheduleGroupResponse+ request overrides =+ Request.delete (overrides defaultService)+ response =+ Response.receiveEmpty+ ( \s h x ->+ DeleteScheduleGroupResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable DeleteScheduleGroup where+ hashWithSalt _salt DeleteScheduleGroup' {..} =+ _salt+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` name++instance Prelude.NFData DeleteScheduleGroup where+ rnf DeleteScheduleGroup' {..} =+ Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf name++instance Data.ToHeaders DeleteScheduleGroup where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath DeleteScheduleGroup where+ toPath DeleteScheduleGroup' {..} =+ Prelude.mconcat+ ["/schedule-groups/", Data.toBS name]++instance Data.ToQuery DeleteScheduleGroup where+ toQuery DeleteScheduleGroup' {..} =+ Prelude.mconcat ["clientToken" Data.=: clientToken]++-- | /See:/ 'newDeleteScheduleGroupResponse' smart constructor.+data DeleteScheduleGroupResponse = DeleteScheduleGroupResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeleteScheduleGroupResponse' with all optional fields 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', 'deleteScheduleGroupResponse_httpStatus' - The response's http status code.+newDeleteScheduleGroupResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ DeleteScheduleGroupResponse+newDeleteScheduleGroupResponse pHttpStatus_ =+ DeleteScheduleGroupResponse'+ { httpStatus =+ pHttpStatus_+ }++-- | The response's http status code.+deleteScheduleGroupResponse_httpStatus :: Lens.Lens' DeleteScheduleGroupResponse Prelude.Int+deleteScheduleGroupResponse_httpStatus = Lens.lens (\DeleteScheduleGroupResponse' {httpStatus} -> httpStatus) (\s@DeleteScheduleGroupResponse' {} a -> s {httpStatus = a} :: DeleteScheduleGroupResponse)++instance Prelude.NFData DeleteScheduleGroupResponse where+ rnf DeleteScheduleGroupResponse' {..} =+ Prelude.rnf httpStatus
+ gen/Amazonka/Scheduler/GetSchedule.hs view
@@ -0,0 +1,439 @@+{-# 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.Scheduler.GetSchedule+-- 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 specified schedule.+module Amazonka.Scheduler.GetSchedule+ ( -- * Creating a Request+ GetSchedule (..),+ newGetSchedule,++ -- * Request Lenses+ getSchedule_groupName,+ getSchedule_name,++ -- * Destructuring the Response+ GetScheduleResponse (..),+ newGetScheduleResponse,++ -- * Response Lenses+ getScheduleResponse_arn,+ getScheduleResponse_creationDate,+ getScheduleResponse_description,+ getScheduleResponse_endDate,+ getScheduleResponse_flexibleTimeWindow,+ getScheduleResponse_groupName,+ getScheduleResponse_kmsKeyArn,+ getScheduleResponse_lastModificationDate,+ getScheduleResponse_name,+ getScheduleResponse_scheduleExpression,+ getScheduleResponse_scheduleExpressionTimezone,+ getScheduleResponse_startDate,+ getScheduleResponse_state,+ getScheduleResponse_target,+ getScheduleResponse_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.Scheduler.Types++-- | /See:/ 'newGetSchedule' smart constructor.+data GetSchedule = GetSchedule'+ { -- | The name of the schedule group associated with this schedule. If you+ -- omit this, EventBridge Scheduler assumes that the schedule is associated+ -- with the default group.+ groupName :: Prelude.Maybe Prelude.Text,+ -- | The name of the schedule to retrieve.+ name :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetSchedule' with all optional fields 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:+--+-- 'groupName', 'getSchedule_groupName' - The name of the schedule group associated with this schedule. If you+-- omit this, EventBridge Scheduler assumes that the schedule is associated+-- with the default group.+--+-- 'name', 'getSchedule_name' - The name of the schedule to retrieve.+newGetSchedule ::+ -- | 'name'+ Prelude.Text ->+ GetSchedule+newGetSchedule pName_ =+ GetSchedule'+ { groupName = Prelude.Nothing,+ name = pName_+ }++-- | The name of the schedule group associated with this schedule. If you+-- omit this, EventBridge Scheduler assumes that the schedule is associated+-- with the default group.+getSchedule_groupName :: Lens.Lens' GetSchedule (Prelude.Maybe Prelude.Text)+getSchedule_groupName = Lens.lens (\GetSchedule' {groupName} -> groupName) (\s@GetSchedule' {} a -> s {groupName = a} :: GetSchedule)++-- | The name of the schedule to retrieve.+getSchedule_name :: Lens.Lens' GetSchedule Prelude.Text+getSchedule_name = Lens.lens (\GetSchedule' {name} -> name) (\s@GetSchedule' {} a -> s {name = a} :: GetSchedule)++instance Core.AWSRequest GetSchedule where+ type AWSResponse GetSchedule = GetScheduleResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetScheduleResponse'+ Prelude.<$> (x Data..?> "Arn")+ Prelude.<*> (x Data..?> "CreationDate")+ Prelude.<*> (x Data..?> "Description")+ Prelude.<*> (x Data..?> "EndDate")+ Prelude.<*> (x Data..?> "FlexibleTimeWindow")+ Prelude.<*> (x Data..?> "GroupName")+ Prelude.<*> (x Data..?> "KmsKeyArn")+ Prelude.<*> (x Data..?> "LastModificationDate")+ Prelude.<*> (x Data..?> "Name")+ Prelude.<*> (x Data..?> "ScheduleExpression")+ Prelude.<*> (x Data..?> "ScheduleExpressionTimezone")+ Prelude.<*> (x Data..?> "StartDate")+ Prelude.<*> (x Data..?> "State")+ Prelude.<*> (x Data..?> "Target")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetSchedule where+ hashWithSalt _salt GetSchedule' {..} =+ _salt+ `Prelude.hashWithSalt` groupName+ `Prelude.hashWithSalt` name++instance Prelude.NFData GetSchedule where+ rnf GetSchedule' {..} =+ Prelude.rnf groupName+ `Prelude.seq` Prelude.rnf name++instance Data.ToHeaders GetSchedule where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath GetSchedule where+ toPath GetSchedule' {..} =+ Prelude.mconcat ["/schedules/", Data.toBS name]++instance Data.ToQuery GetSchedule where+ toQuery GetSchedule' {..} =+ Prelude.mconcat ["groupName" Data.=: groupName]++-- | /See:/ 'newGetScheduleResponse' smart constructor.+data GetScheduleResponse = GetScheduleResponse'+ { -- | The Amazon Resource Name (ARN) of the schedule.+ arn :: Prelude.Maybe Prelude.Text,+ -- | The time at which the schedule was created.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | The description of the schedule.+ description :: Prelude.Maybe Prelude.Text,+ -- | The date, in UTC, before which the schedule can invoke its target.+ -- Depending on the schedule\'s recurrence expression, invocations might+ -- stop on, or before, the @EndDate@ you specify. EventBridge Scheduler+ -- ignores @EndDate@ for one-time schedules.+ endDate :: Prelude.Maybe Data.POSIX,+ -- | Allows you to configure a time window during which EventBridge Scheduler+ -- invokes the schedule.+ flexibleTimeWindow :: Prelude.Maybe FlexibleTimeWindow,+ -- | The name of the schedule group associated with this schedule.+ groupName :: Prelude.Maybe Prelude.Text,+ -- | The ARN for a customer managed KMS Key that is be used to encrypt and+ -- decrypt your data.+ kmsKeyArn :: Prelude.Maybe Prelude.Text,+ -- | The time at which the schedule was last modified.+ lastModificationDate :: Prelude.Maybe Data.POSIX,+ -- | The name of the schedule.+ name :: Prelude.Maybe Prelude.Text,+ -- | The expression that defines when the schedule runs. The following+ -- formats are supported.+ --+ -- - @at@ expression - @at(yyyy-mm-ddThh:mm:ss)@+ --+ -- - @rate@ expression - @rate(unit value)@+ --+ -- - @cron@ expression - @cron(fields)@+ --+ -- You can use @at@ expressions to create one-time schedules that invoke a+ -- target once, at the time and in the time zone, that you specify. You can+ -- use @rate@ and @cron@ expressions to create recurring schedules.+ -- Rate-based schedules are useful when you want to invoke a target at+ -- regular intervals, such as every 15 minutes or every five days.+ -- Cron-based schedules are useful when you want to invoke a target+ -- periodically at a specific time, such as at 8:00 am (UTC+0) every 1st+ -- day of the month.+ --+ -- A @cron@ expression consists of six fields separated by white spaces:+ -- @(minutes hours day_of_month month day_of_week year)@.+ --+ -- A @rate@ expression consists of a /value/ as a positive integer, and a+ -- /unit/ with the following options: @minute@ | @minutes@ | @hour@ |+ -- @hours@ | @day@ | @days@+ --+ -- For more information and examples, see+ -- <https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html Schedule types on EventBridge Scheduler>+ -- in the /EventBridge Scheduler User Guide/.+ scheduleExpression :: Prelude.Maybe Prelude.Text,+ -- | The timezone in which the scheduling expression is evaluated.+ scheduleExpressionTimezone :: Prelude.Maybe Prelude.Text,+ -- | The date, in UTC, after which the schedule can begin invoking its+ -- target. Depending on the schedule\'s recurrence expression, invocations+ -- might occur on, or after, the @StartDate@ you specify. EventBridge+ -- Scheduler ignores @StartDate@ for one-time schedules.+ startDate :: Prelude.Maybe Data.POSIX,+ -- | Specifies whether the schedule is enabled or disabled.+ state :: Prelude.Maybe ScheduleState,+ -- | The schedule target.+ target :: Prelude.Maybe Target,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetScheduleResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'getScheduleResponse_arn' - The Amazon Resource Name (ARN) of the schedule.+--+-- 'creationDate', 'getScheduleResponse_creationDate' - The time at which the schedule was created.+--+-- 'description', 'getScheduleResponse_description' - The description of the schedule.+--+-- 'endDate', 'getScheduleResponse_endDate' - The date, in UTC, before which the schedule can invoke its target.+-- Depending on the schedule\'s recurrence expression, invocations might+-- stop on, or before, the @EndDate@ you specify. EventBridge Scheduler+-- ignores @EndDate@ for one-time schedules.+--+-- 'flexibleTimeWindow', 'getScheduleResponse_flexibleTimeWindow' - Allows you to configure a time window during which EventBridge Scheduler+-- invokes the schedule.+--+-- 'groupName', 'getScheduleResponse_groupName' - The name of the schedule group associated with this schedule.+--+-- 'kmsKeyArn', 'getScheduleResponse_kmsKeyArn' - The ARN for a customer managed KMS Key that is be used to encrypt and+-- decrypt your data.+--+-- 'lastModificationDate', 'getScheduleResponse_lastModificationDate' - The time at which the schedule was last modified.+--+-- 'name', 'getScheduleResponse_name' - The name of the schedule.+--+-- 'scheduleExpression', 'getScheduleResponse_scheduleExpression' - The expression that defines when the schedule runs. The following+-- formats are supported.+--+-- - @at@ expression - @at(yyyy-mm-ddThh:mm:ss)@+--+-- - @rate@ expression - @rate(unit value)@+--+-- - @cron@ expression - @cron(fields)@+--+-- You can use @at@ expressions to create one-time schedules that invoke a+-- target once, at the time and in the time zone, that you specify. You can+-- use @rate@ and @cron@ expressions to create recurring schedules.+-- Rate-based schedules are useful when you want to invoke a target at+-- regular intervals, such as every 15 minutes or every five days.+-- Cron-based schedules are useful when you want to invoke a target+-- periodically at a specific time, such as at 8:00 am (UTC+0) every 1st+-- day of the month.+--+-- A @cron@ expression consists of six fields separated by white spaces:+-- @(minutes hours day_of_month month day_of_week year)@.+--+-- A @rate@ expression consists of a /value/ as a positive integer, and a+-- /unit/ with the following options: @minute@ | @minutes@ | @hour@ |+-- @hours@ | @day@ | @days@+--+-- For more information and examples, see+-- <https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html Schedule types on EventBridge Scheduler>+-- in the /EventBridge Scheduler User Guide/.+--+-- 'scheduleExpressionTimezone', 'getScheduleResponse_scheduleExpressionTimezone' - The timezone in which the scheduling expression is evaluated.+--+-- 'startDate', 'getScheduleResponse_startDate' - The date, in UTC, after which the schedule can begin invoking its+-- target. Depending on the schedule\'s recurrence expression, invocations+-- might occur on, or after, the @StartDate@ you specify. EventBridge+-- Scheduler ignores @StartDate@ for one-time schedules.+--+-- 'state', 'getScheduleResponse_state' - Specifies whether the schedule is enabled or disabled.+--+-- 'target', 'getScheduleResponse_target' - The schedule target.+--+-- 'httpStatus', 'getScheduleResponse_httpStatus' - The response's http status code.+newGetScheduleResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetScheduleResponse+newGetScheduleResponse pHttpStatus_ =+ GetScheduleResponse'+ { arn = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ description = Prelude.Nothing,+ endDate = Prelude.Nothing,+ flexibleTimeWindow = Prelude.Nothing,+ groupName = Prelude.Nothing,+ kmsKeyArn = Prelude.Nothing,+ lastModificationDate = Prelude.Nothing,+ name = Prelude.Nothing,+ scheduleExpression = Prelude.Nothing,+ scheduleExpressionTimezone = Prelude.Nothing,+ startDate = Prelude.Nothing,+ state = Prelude.Nothing,+ target = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the schedule.+getScheduleResponse_arn :: Lens.Lens' GetScheduleResponse (Prelude.Maybe Prelude.Text)+getScheduleResponse_arn = Lens.lens (\GetScheduleResponse' {arn} -> arn) (\s@GetScheduleResponse' {} a -> s {arn = a} :: GetScheduleResponse)++-- | The time at which the schedule was created.+getScheduleResponse_creationDate :: Lens.Lens' GetScheduleResponse (Prelude.Maybe Prelude.UTCTime)+getScheduleResponse_creationDate = Lens.lens (\GetScheduleResponse' {creationDate} -> creationDate) (\s@GetScheduleResponse' {} a -> s {creationDate = a} :: GetScheduleResponse) Prelude.. Lens.mapping Data._Time++-- | The description of the schedule.+getScheduleResponse_description :: Lens.Lens' GetScheduleResponse (Prelude.Maybe Prelude.Text)+getScheduleResponse_description = Lens.lens (\GetScheduleResponse' {description} -> description) (\s@GetScheduleResponse' {} a -> s {description = a} :: GetScheduleResponse)++-- | The date, in UTC, before which the schedule can invoke its target.+-- Depending on the schedule\'s recurrence expression, invocations might+-- stop on, or before, the @EndDate@ you specify. EventBridge Scheduler+-- ignores @EndDate@ for one-time schedules.+getScheduleResponse_endDate :: Lens.Lens' GetScheduleResponse (Prelude.Maybe Prelude.UTCTime)+getScheduleResponse_endDate = Lens.lens (\GetScheduleResponse' {endDate} -> endDate) (\s@GetScheduleResponse' {} a -> s {endDate = a} :: GetScheduleResponse) Prelude.. Lens.mapping Data._Time++-- | Allows you to configure a time window during which EventBridge Scheduler+-- invokes the schedule.+getScheduleResponse_flexibleTimeWindow :: Lens.Lens' GetScheduleResponse (Prelude.Maybe FlexibleTimeWindow)+getScheduleResponse_flexibleTimeWindow = Lens.lens (\GetScheduleResponse' {flexibleTimeWindow} -> flexibleTimeWindow) (\s@GetScheduleResponse' {} a -> s {flexibleTimeWindow = a} :: GetScheduleResponse)++-- | The name of the schedule group associated with this schedule.+getScheduleResponse_groupName :: Lens.Lens' GetScheduleResponse (Prelude.Maybe Prelude.Text)+getScheduleResponse_groupName = Lens.lens (\GetScheduleResponse' {groupName} -> groupName) (\s@GetScheduleResponse' {} a -> s {groupName = a} :: GetScheduleResponse)++-- | The ARN for a customer managed KMS Key that is be used to encrypt and+-- decrypt your data.+getScheduleResponse_kmsKeyArn :: Lens.Lens' GetScheduleResponse (Prelude.Maybe Prelude.Text)+getScheduleResponse_kmsKeyArn = Lens.lens (\GetScheduleResponse' {kmsKeyArn} -> kmsKeyArn) (\s@GetScheduleResponse' {} a -> s {kmsKeyArn = a} :: GetScheduleResponse)++-- | The time at which the schedule was last modified.+getScheduleResponse_lastModificationDate :: Lens.Lens' GetScheduleResponse (Prelude.Maybe Prelude.UTCTime)+getScheduleResponse_lastModificationDate = Lens.lens (\GetScheduleResponse' {lastModificationDate} -> lastModificationDate) (\s@GetScheduleResponse' {} a -> s {lastModificationDate = a} :: GetScheduleResponse) Prelude.. Lens.mapping Data._Time++-- | The name of the schedule.+getScheduleResponse_name :: Lens.Lens' GetScheduleResponse (Prelude.Maybe Prelude.Text)+getScheduleResponse_name = Lens.lens (\GetScheduleResponse' {name} -> name) (\s@GetScheduleResponse' {} a -> s {name = a} :: GetScheduleResponse)++-- | The expression that defines when the schedule runs. The following+-- formats are supported.+--+-- - @at@ expression - @at(yyyy-mm-ddThh:mm:ss)@+--+-- - @rate@ expression - @rate(unit value)@+--+-- - @cron@ expression - @cron(fields)@+--+-- You can use @at@ expressions to create one-time schedules that invoke a+-- target once, at the time and in the time zone, that you specify. You can+-- use @rate@ and @cron@ expressions to create recurring schedules.+-- Rate-based schedules are useful when you want to invoke a target at+-- regular intervals, such as every 15 minutes or every five days.+-- Cron-based schedules are useful when you want to invoke a target+-- periodically at a specific time, such as at 8:00 am (UTC+0) every 1st+-- day of the month.+--+-- A @cron@ expression consists of six fields separated by white spaces:+-- @(minutes hours day_of_month month day_of_week year)@.+--+-- A @rate@ expression consists of a /value/ as a positive integer, and a+-- /unit/ with the following options: @minute@ | @minutes@ | @hour@ |+-- @hours@ | @day@ | @days@+--+-- For more information and examples, see+-- <https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html Schedule types on EventBridge Scheduler>+-- in the /EventBridge Scheduler User Guide/.+getScheduleResponse_scheduleExpression :: Lens.Lens' GetScheduleResponse (Prelude.Maybe Prelude.Text)+getScheduleResponse_scheduleExpression = Lens.lens (\GetScheduleResponse' {scheduleExpression} -> scheduleExpression) (\s@GetScheduleResponse' {} a -> s {scheduleExpression = a} :: GetScheduleResponse)++-- | The timezone in which the scheduling expression is evaluated.+getScheduleResponse_scheduleExpressionTimezone :: Lens.Lens' GetScheduleResponse (Prelude.Maybe Prelude.Text)+getScheduleResponse_scheduleExpressionTimezone = Lens.lens (\GetScheduleResponse' {scheduleExpressionTimezone} -> scheduleExpressionTimezone) (\s@GetScheduleResponse' {} a -> s {scheduleExpressionTimezone = a} :: GetScheduleResponse)++-- | The date, in UTC, after which the schedule can begin invoking its+-- target. Depending on the schedule\'s recurrence expression, invocations+-- might occur on, or after, the @StartDate@ you specify. EventBridge+-- Scheduler ignores @StartDate@ for one-time schedules.+getScheduleResponse_startDate :: Lens.Lens' GetScheduleResponse (Prelude.Maybe Prelude.UTCTime)+getScheduleResponse_startDate = Lens.lens (\GetScheduleResponse' {startDate} -> startDate) (\s@GetScheduleResponse' {} a -> s {startDate = a} :: GetScheduleResponse) Prelude.. Lens.mapping Data._Time++-- | Specifies whether the schedule is enabled or disabled.+getScheduleResponse_state :: Lens.Lens' GetScheduleResponse (Prelude.Maybe ScheduleState)+getScheduleResponse_state = Lens.lens (\GetScheduleResponse' {state} -> state) (\s@GetScheduleResponse' {} a -> s {state = a} :: GetScheduleResponse)++-- | The schedule target.+getScheduleResponse_target :: Lens.Lens' GetScheduleResponse (Prelude.Maybe Target)+getScheduleResponse_target = Lens.lens (\GetScheduleResponse' {target} -> target) (\s@GetScheduleResponse' {} a -> s {target = a} :: GetScheduleResponse)++-- | The response's http status code.+getScheduleResponse_httpStatus :: Lens.Lens' GetScheduleResponse Prelude.Int+getScheduleResponse_httpStatus = Lens.lens (\GetScheduleResponse' {httpStatus} -> httpStatus) (\s@GetScheduleResponse' {} a -> s {httpStatus = a} :: GetScheduleResponse)++instance Prelude.NFData GetScheduleResponse where+ rnf GetScheduleResponse' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf description+ `Prelude.seq` Prelude.rnf endDate+ `Prelude.seq` Prelude.rnf flexibleTimeWindow+ `Prelude.seq` Prelude.rnf groupName+ `Prelude.seq` Prelude.rnf kmsKeyArn+ `Prelude.seq` Prelude.rnf lastModificationDate+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf scheduleExpression+ `Prelude.seq` Prelude.rnf scheduleExpressionTimezone+ `Prelude.seq` Prelude.rnf startDate+ `Prelude.seq` Prelude.rnf state+ `Prelude.seq` Prelude.rnf target+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Scheduler/GetScheduleGroup.hs view
@@ -0,0 +1,206 @@+{-# 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.Scheduler.GetScheduleGroup+-- 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 specified schedule group.+module Amazonka.Scheduler.GetScheduleGroup+ ( -- * Creating a Request+ GetScheduleGroup (..),+ newGetScheduleGroup,++ -- * Request Lenses+ getScheduleGroup_name,++ -- * Destructuring the Response+ GetScheduleGroupResponse (..),+ newGetScheduleGroupResponse,++ -- * Response Lenses+ getScheduleGroupResponse_arn,+ getScheduleGroupResponse_creationDate,+ getScheduleGroupResponse_lastModificationDate,+ getScheduleGroupResponse_name,+ getScheduleGroupResponse_state,+ getScheduleGroupResponse_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.Scheduler.Types++-- | /See:/ 'newGetScheduleGroup' smart constructor.+data GetScheduleGroup = GetScheduleGroup'+ { -- | The name of the schedule group to retrieve.+ name :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetScheduleGroup' with all optional fields 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', 'getScheduleGroup_name' - The name of the schedule group to retrieve.+newGetScheduleGroup ::+ -- | 'name'+ Prelude.Text ->+ GetScheduleGroup+newGetScheduleGroup pName_ =+ GetScheduleGroup' {name = pName_}++-- | The name of the schedule group to retrieve.+getScheduleGroup_name :: Lens.Lens' GetScheduleGroup Prelude.Text+getScheduleGroup_name = Lens.lens (\GetScheduleGroup' {name} -> name) (\s@GetScheduleGroup' {} a -> s {name = a} :: GetScheduleGroup)++instance Core.AWSRequest GetScheduleGroup where+ type+ AWSResponse GetScheduleGroup =+ GetScheduleGroupResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ GetScheduleGroupResponse'+ Prelude.<$> (x Data..?> "Arn")+ Prelude.<*> (x Data..?> "CreationDate")+ Prelude.<*> (x Data..?> "LastModificationDate")+ Prelude.<*> (x Data..?> "Name")+ Prelude.<*> (x Data..?> "State")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable GetScheduleGroup where+ hashWithSalt _salt GetScheduleGroup' {..} =+ _salt `Prelude.hashWithSalt` name++instance Prelude.NFData GetScheduleGroup where+ rnf GetScheduleGroup' {..} = Prelude.rnf name++instance Data.ToHeaders GetScheduleGroup where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath GetScheduleGroup where+ toPath GetScheduleGroup' {..} =+ Prelude.mconcat+ ["/schedule-groups/", Data.toBS name]++instance Data.ToQuery GetScheduleGroup where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newGetScheduleGroupResponse' smart constructor.+data GetScheduleGroupResponse = GetScheduleGroupResponse'+ { -- | The Amazon Resource Name (ARN) of the schedule group.+ arn :: Prelude.Maybe Prelude.Text,+ -- | The time at which the schedule group was created.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | The time at which the schedule group was last modified.+ lastModificationDate :: Prelude.Maybe Data.POSIX,+ -- | The name of the schedule group.+ name :: Prelude.Maybe Prelude.Text,+ -- | Specifies the state of the schedule group.+ state :: Prelude.Maybe ScheduleGroupState,+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'GetScheduleGroupResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'getScheduleGroupResponse_arn' - The Amazon Resource Name (ARN) of the schedule group.+--+-- 'creationDate', 'getScheduleGroupResponse_creationDate' - The time at which the schedule group was created.+--+-- 'lastModificationDate', 'getScheduleGroupResponse_lastModificationDate' - The time at which the schedule group was last modified.+--+-- 'name', 'getScheduleGroupResponse_name' - The name of the schedule group.+--+-- 'state', 'getScheduleGroupResponse_state' - Specifies the state of the schedule group.+--+-- 'httpStatus', 'getScheduleGroupResponse_httpStatus' - The response's http status code.+newGetScheduleGroupResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ GetScheduleGroupResponse+newGetScheduleGroupResponse pHttpStatus_ =+ GetScheduleGroupResponse'+ { arn = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ lastModificationDate = Prelude.Nothing,+ name = Prelude.Nothing,+ state = Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The Amazon Resource Name (ARN) of the schedule group.+getScheduleGroupResponse_arn :: Lens.Lens' GetScheduleGroupResponse (Prelude.Maybe Prelude.Text)+getScheduleGroupResponse_arn = Lens.lens (\GetScheduleGroupResponse' {arn} -> arn) (\s@GetScheduleGroupResponse' {} a -> s {arn = a} :: GetScheduleGroupResponse)++-- | The time at which the schedule group was created.+getScheduleGroupResponse_creationDate :: Lens.Lens' GetScheduleGroupResponse (Prelude.Maybe Prelude.UTCTime)+getScheduleGroupResponse_creationDate = Lens.lens (\GetScheduleGroupResponse' {creationDate} -> creationDate) (\s@GetScheduleGroupResponse' {} a -> s {creationDate = a} :: GetScheduleGroupResponse) Prelude.. Lens.mapping Data._Time++-- | The time at which the schedule group was last modified.+getScheduleGroupResponse_lastModificationDate :: Lens.Lens' GetScheduleGroupResponse (Prelude.Maybe Prelude.UTCTime)+getScheduleGroupResponse_lastModificationDate = Lens.lens (\GetScheduleGroupResponse' {lastModificationDate} -> lastModificationDate) (\s@GetScheduleGroupResponse' {} a -> s {lastModificationDate = a} :: GetScheduleGroupResponse) Prelude.. Lens.mapping Data._Time++-- | The name of the schedule group.+getScheduleGroupResponse_name :: Lens.Lens' GetScheduleGroupResponse (Prelude.Maybe Prelude.Text)+getScheduleGroupResponse_name = Lens.lens (\GetScheduleGroupResponse' {name} -> name) (\s@GetScheduleGroupResponse' {} a -> s {name = a} :: GetScheduleGroupResponse)++-- | Specifies the state of the schedule group.+getScheduleGroupResponse_state :: Lens.Lens' GetScheduleGroupResponse (Prelude.Maybe ScheduleGroupState)+getScheduleGroupResponse_state = Lens.lens (\GetScheduleGroupResponse' {state} -> state) (\s@GetScheduleGroupResponse' {} a -> s {state = a} :: GetScheduleGroupResponse)++-- | The response's http status code.+getScheduleGroupResponse_httpStatus :: Lens.Lens' GetScheduleGroupResponse Prelude.Int+getScheduleGroupResponse_httpStatus = Lens.lens (\GetScheduleGroupResponse' {httpStatus} -> httpStatus) (\s@GetScheduleGroupResponse' {} a -> s {httpStatus = a} :: GetScheduleGroupResponse)++instance Prelude.NFData GetScheduleGroupResponse where+ rnf GetScheduleGroupResponse' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf lastModificationDate+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf state+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Scheduler/Lens.hs view
@@ -0,0 +1,262 @@+{-# 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.Scheduler.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.Scheduler.Lens+ ( -- * Operations++ -- ** CreateSchedule+ createSchedule_clientToken,+ createSchedule_description,+ createSchedule_endDate,+ createSchedule_groupName,+ createSchedule_kmsKeyArn,+ createSchedule_scheduleExpressionTimezone,+ createSchedule_startDate,+ createSchedule_state,+ createSchedule_flexibleTimeWindow,+ createSchedule_name,+ createSchedule_scheduleExpression,+ createSchedule_target,+ createScheduleResponse_httpStatus,+ createScheduleResponse_scheduleArn,++ -- ** CreateScheduleGroup+ createScheduleGroup_clientToken,+ createScheduleGroup_tags,+ createScheduleGroup_name,+ createScheduleGroupResponse_httpStatus,+ createScheduleGroupResponse_scheduleGroupArn,++ -- ** DeleteSchedule+ deleteSchedule_clientToken,+ deleteSchedule_groupName,+ deleteSchedule_name,+ deleteScheduleResponse_httpStatus,++ -- ** DeleteScheduleGroup+ deleteScheduleGroup_clientToken,+ deleteScheduleGroup_name,+ deleteScheduleGroupResponse_httpStatus,++ -- ** GetSchedule+ getSchedule_groupName,+ getSchedule_name,+ getScheduleResponse_arn,+ getScheduleResponse_creationDate,+ getScheduleResponse_description,+ getScheduleResponse_endDate,+ getScheduleResponse_flexibleTimeWindow,+ getScheduleResponse_groupName,+ getScheduleResponse_kmsKeyArn,+ getScheduleResponse_lastModificationDate,+ getScheduleResponse_name,+ getScheduleResponse_scheduleExpression,+ getScheduleResponse_scheduleExpressionTimezone,+ getScheduleResponse_startDate,+ getScheduleResponse_state,+ getScheduleResponse_target,+ getScheduleResponse_httpStatus,++ -- ** GetScheduleGroup+ getScheduleGroup_name,+ getScheduleGroupResponse_arn,+ getScheduleGroupResponse_creationDate,+ getScheduleGroupResponse_lastModificationDate,+ getScheduleGroupResponse_name,+ getScheduleGroupResponse_state,+ getScheduleGroupResponse_httpStatus,++ -- ** ListScheduleGroups+ listScheduleGroups_maxResults,+ listScheduleGroups_namePrefix,+ listScheduleGroups_nextToken,+ listScheduleGroupsResponse_nextToken,+ listScheduleGroupsResponse_httpStatus,+ listScheduleGroupsResponse_scheduleGroups,++ -- ** ListSchedules+ listSchedules_groupName,+ listSchedules_maxResults,+ listSchedules_namePrefix,+ listSchedules_nextToken,+ listSchedules_state,+ listSchedulesResponse_nextToken,+ listSchedulesResponse_httpStatus,+ listSchedulesResponse_schedules,++ -- ** ListTagsForResource+ listTagsForResource_resourceArn,+ listTagsForResourceResponse_tags,+ listTagsForResourceResponse_httpStatus,++ -- ** TagResource+ tagResource_resourceArn,+ tagResource_tags,+ tagResourceResponse_httpStatus,++ -- ** UntagResource+ untagResource_resourceArn,+ untagResource_tagKeys,+ untagResourceResponse_httpStatus,++ -- ** UpdateSchedule+ updateSchedule_clientToken,+ updateSchedule_description,+ updateSchedule_endDate,+ updateSchedule_groupName,+ updateSchedule_kmsKeyArn,+ updateSchedule_scheduleExpressionTimezone,+ updateSchedule_startDate,+ updateSchedule_state,+ updateSchedule_flexibleTimeWindow,+ updateSchedule_name,+ updateSchedule_scheduleExpression,+ updateSchedule_target,+ updateScheduleResponse_httpStatus,+ updateScheduleResponse_scheduleArn,++ -- * Types++ -- ** AwsVpcConfiguration+ awsVpcConfiguration_assignPublicIp,+ awsVpcConfiguration_securityGroups,+ awsVpcConfiguration_subnets,++ -- ** CapacityProviderStrategyItem+ capacityProviderStrategyItem_base,+ capacityProviderStrategyItem_weight,+ capacityProviderStrategyItem_capacityProvider,++ -- ** DeadLetterConfig+ deadLetterConfig_arn,++ -- ** EcsParameters+ ecsParameters_capacityProviderStrategy,+ ecsParameters_enableECSManagedTags,+ ecsParameters_enableExecuteCommand,+ ecsParameters_group,+ ecsParameters_launchType,+ ecsParameters_networkConfiguration,+ ecsParameters_placementConstraints,+ ecsParameters_placementStrategy,+ ecsParameters_platformVersion,+ ecsParameters_propagateTags,+ ecsParameters_referenceId,+ ecsParameters_tags,+ ecsParameters_taskCount,+ ecsParameters_taskDefinitionArn,++ -- ** EventBridgeParameters+ eventBridgeParameters_detailType,+ eventBridgeParameters_source,++ -- ** FlexibleTimeWindow+ flexibleTimeWindow_maximumWindowInMinutes,+ flexibleTimeWindow_mode,++ -- ** KinesisParameters+ kinesisParameters_partitionKey,++ -- ** NetworkConfiguration+ networkConfiguration_awsvpcConfiguration,++ -- ** PlacementConstraint+ placementConstraint_expression,+ placementConstraint_type,++ -- ** PlacementStrategy+ placementStrategy_field,+ placementStrategy_type,++ -- ** RetryPolicy+ retryPolicy_maximumEventAgeInSeconds,+ retryPolicy_maximumRetryAttempts,++ -- ** SageMakerPipelineParameter+ sageMakerPipelineParameter_name,+ sageMakerPipelineParameter_value,++ -- ** SageMakerPipelineParameters+ sageMakerPipelineParameters_pipelineParameterList,++ -- ** ScheduleGroupSummary+ scheduleGroupSummary_arn,+ scheduleGroupSummary_creationDate,+ scheduleGroupSummary_lastModificationDate,+ scheduleGroupSummary_name,+ scheduleGroupSummary_state,++ -- ** ScheduleSummary+ scheduleSummary_arn,+ scheduleSummary_creationDate,+ scheduleSummary_groupName,+ scheduleSummary_lastModificationDate,+ scheduleSummary_name,+ scheduleSummary_state,+ scheduleSummary_target,++ -- ** SqsParameters+ sqsParameters_messageGroupId,++ -- ** Tag+ tag_key,+ tag_value,++ -- ** Target+ target_deadLetterConfig,+ target_ecsParameters,+ target_eventBridgeParameters,+ target_input,+ target_kinesisParameters,+ target_retryPolicy,+ target_sageMakerPipelineParameters,+ target_sqsParameters,+ target_arn,+ target_roleArn,++ -- ** TargetSummary+ targetSummary_arn,+ )+where++import Amazonka.Scheduler.CreateSchedule+import Amazonka.Scheduler.CreateScheduleGroup+import Amazonka.Scheduler.DeleteSchedule+import Amazonka.Scheduler.DeleteScheduleGroup+import Amazonka.Scheduler.GetSchedule+import Amazonka.Scheduler.GetScheduleGroup+import Amazonka.Scheduler.ListScheduleGroups+import Amazonka.Scheduler.ListSchedules+import Amazonka.Scheduler.ListTagsForResource+import Amazonka.Scheduler.TagResource+import Amazonka.Scheduler.Types.AwsVpcConfiguration+import Amazonka.Scheduler.Types.CapacityProviderStrategyItem+import Amazonka.Scheduler.Types.DeadLetterConfig+import Amazonka.Scheduler.Types.EcsParameters+import Amazonka.Scheduler.Types.EventBridgeParameters+import Amazonka.Scheduler.Types.FlexibleTimeWindow+import Amazonka.Scheduler.Types.KinesisParameters+import Amazonka.Scheduler.Types.NetworkConfiguration+import Amazonka.Scheduler.Types.PlacementConstraint+import Amazonka.Scheduler.Types.PlacementStrategy+import Amazonka.Scheduler.Types.RetryPolicy+import Amazonka.Scheduler.Types.SageMakerPipelineParameter+import Amazonka.Scheduler.Types.SageMakerPipelineParameters+import Amazonka.Scheduler.Types.ScheduleGroupSummary+import Amazonka.Scheduler.Types.ScheduleSummary+import Amazonka.Scheduler.Types.SqsParameters+import Amazonka.Scheduler.Types.Tag+import Amazonka.Scheduler.Types.Target+import Amazonka.Scheduler.Types.TargetSummary+import Amazonka.Scheduler.UntagResource+import Amazonka.Scheduler.UpdateSchedule
+ gen/Amazonka/Scheduler/ListScheduleGroups.hs view
@@ -0,0 +1,241 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Scheduler.ListScheduleGroups+-- 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 paginated list of your schedule groups.+--+-- This operation returns paginated results.+module Amazonka.Scheduler.ListScheduleGroups+ ( -- * Creating a Request+ ListScheduleGroups (..),+ newListScheduleGroups,++ -- * Request Lenses+ listScheduleGroups_maxResults,+ listScheduleGroups_namePrefix,+ listScheduleGroups_nextToken,++ -- * Destructuring the Response+ ListScheduleGroupsResponse (..),+ newListScheduleGroupsResponse,++ -- * Response Lenses+ listScheduleGroupsResponse_nextToken,+ listScheduleGroupsResponse_httpStatus,+ listScheduleGroupsResponse_scheduleGroups,+ )+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.Scheduler.Types++-- | /See:/ 'newListScheduleGroups' smart constructor.+data ListScheduleGroups = ListScheduleGroups'+ { -- | If specified, limits the number of results returned by this operation.+ -- The operation also returns a @NextToken@ which you can use in a+ -- subsequent operation to retrieve the next set of results.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | The name prefix that you can use to return a filtered list of your+ -- schedule groups.+ namePrefix :: Prelude.Maybe Prelude.Text,+ -- | The token returned by a previous call to retrieve the next set of+ -- results.+ nextToken :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListScheduleGroups' with all optional fields 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', 'listScheduleGroups_maxResults' - If specified, limits the number of results returned by this operation.+-- The operation also returns a @NextToken@ which you can use in a+-- subsequent operation to retrieve the next set of results.+--+-- 'namePrefix', 'listScheduleGroups_namePrefix' - The name prefix that you can use to return a filtered list of your+-- schedule groups.+--+-- 'nextToken', 'listScheduleGroups_nextToken' - The token returned by a previous call to retrieve the next set of+-- results.+newListScheduleGroups ::+ ListScheduleGroups+newListScheduleGroups =+ ListScheduleGroups'+ { maxResults = Prelude.Nothing,+ namePrefix = Prelude.Nothing,+ nextToken = Prelude.Nothing+ }++-- | If specified, limits the number of results returned by this operation.+-- The operation also returns a @NextToken@ which you can use in a+-- subsequent operation to retrieve the next set of results.+listScheduleGroups_maxResults :: Lens.Lens' ListScheduleGroups (Prelude.Maybe Prelude.Natural)+listScheduleGroups_maxResults = Lens.lens (\ListScheduleGroups' {maxResults} -> maxResults) (\s@ListScheduleGroups' {} a -> s {maxResults = a} :: ListScheduleGroups)++-- | The name prefix that you can use to return a filtered list of your+-- schedule groups.+listScheduleGroups_namePrefix :: Lens.Lens' ListScheduleGroups (Prelude.Maybe Prelude.Text)+listScheduleGroups_namePrefix = Lens.lens (\ListScheduleGroups' {namePrefix} -> namePrefix) (\s@ListScheduleGroups' {} a -> s {namePrefix = a} :: ListScheduleGroups)++-- | The token returned by a previous call to retrieve the next set of+-- results.+listScheduleGroups_nextToken :: Lens.Lens' ListScheduleGroups (Prelude.Maybe Prelude.Text)+listScheduleGroups_nextToken = Lens.lens (\ListScheduleGroups' {nextToken} -> nextToken) (\s@ListScheduleGroups' {} a -> s {nextToken = a} :: ListScheduleGroups)++instance Core.AWSPager ListScheduleGroups where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listScheduleGroupsResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ ( rs+ Lens.^. listScheduleGroupsResponse_scheduleGroups+ ) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listScheduleGroups_nextToken+ Lens..~ rs+ Lens.^? listScheduleGroupsResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListScheduleGroups where+ type+ AWSResponse ListScheduleGroups =+ ListScheduleGroupsResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListScheduleGroupsResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> ( x+ Data..?> "ScheduleGroups"+ Core..!@ Prelude.mempty+ )+ )++instance Prelude.Hashable ListScheduleGroups where+ hashWithSalt _salt ListScheduleGroups' {..} =+ _salt+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` namePrefix+ `Prelude.hashWithSalt` nextToken++instance Prelude.NFData ListScheduleGroups where+ rnf ListScheduleGroups' {..} =+ Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf namePrefix+ `Prelude.seq` Prelude.rnf nextToken++instance Data.ToHeaders ListScheduleGroups where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListScheduleGroups where+ toPath = Prelude.const "/schedule-groups"++instance Data.ToQuery ListScheduleGroups where+ toQuery ListScheduleGroups' {..} =+ Prelude.mconcat+ [ "MaxResults" Data.=: maxResults,+ "NamePrefix" Data.=: namePrefix,+ "NextToken" Data.=: nextToken+ ]++-- | /See:/ 'newListScheduleGroupsResponse' smart constructor.+data ListScheduleGroupsResponse = ListScheduleGroupsResponse'+ { -- | Indicates whether there are additional results to retrieve. If the value+ -- is null, there are no more results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The schedule groups that match the specified criteria.+ scheduleGroups :: [ScheduleGroupSummary]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListScheduleGroupsResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'nextToken', 'listScheduleGroupsResponse_nextToken' - Indicates whether there are additional results to retrieve. If the value+-- is null, there are no more results.+--+-- 'httpStatus', 'listScheduleGroupsResponse_httpStatus' - The response's http status code.+--+-- 'scheduleGroups', 'listScheduleGroupsResponse_scheduleGroups' - The schedule groups that match the specified criteria.+newListScheduleGroupsResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListScheduleGroupsResponse+newListScheduleGroupsResponse pHttpStatus_ =+ ListScheduleGroupsResponse'+ { nextToken =+ Prelude.Nothing,+ httpStatus = pHttpStatus_,+ scheduleGroups = Prelude.mempty+ }++-- | Indicates whether there are additional results to retrieve. If the value+-- is null, there are no more results.+listScheduleGroupsResponse_nextToken :: Lens.Lens' ListScheduleGroupsResponse (Prelude.Maybe Prelude.Text)+listScheduleGroupsResponse_nextToken = Lens.lens (\ListScheduleGroupsResponse' {nextToken} -> nextToken) (\s@ListScheduleGroupsResponse' {} a -> s {nextToken = a} :: ListScheduleGroupsResponse)++-- | The response's http status code.+listScheduleGroupsResponse_httpStatus :: Lens.Lens' ListScheduleGroupsResponse Prelude.Int+listScheduleGroupsResponse_httpStatus = Lens.lens (\ListScheduleGroupsResponse' {httpStatus} -> httpStatus) (\s@ListScheduleGroupsResponse' {} a -> s {httpStatus = a} :: ListScheduleGroupsResponse)++-- | The schedule groups that match the specified criteria.+listScheduleGroupsResponse_scheduleGroups :: Lens.Lens' ListScheduleGroupsResponse [ScheduleGroupSummary]+listScheduleGroupsResponse_scheduleGroups = Lens.lens (\ListScheduleGroupsResponse' {scheduleGroups} -> scheduleGroups) (\s@ListScheduleGroupsResponse' {} a -> s {scheduleGroups = a} :: ListScheduleGroupsResponse) Prelude.. Lens.coerced++instance Prelude.NFData ListScheduleGroupsResponse where+ rnf ListScheduleGroupsResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf scheduleGroups
+ gen/Amazonka/Scheduler/ListSchedules.hs view
@@ -0,0 +1,264 @@+{-# 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.Scheduler.ListSchedules+-- 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 paginated list of your EventBridge Scheduler schedules.+--+-- This operation returns paginated results.+module Amazonka.Scheduler.ListSchedules+ ( -- * Creating a Request+ ListSchedules (..),+ newListSchedules,++ -- * Request Lenses+ listSchedules_groupName,+ listSchedules_maxResults,+ listSchedules_namePrefix,+ listSchedules_nextToken,+ listSchedules_state,++ -- * Destructuring the Response+ ListSchedulesResponse (..),+ newListSchedulesResponse,++ -- * Response Lenses+ listSchedulesResponse_nextToken,+ listSchedulesResponse_httpStatus,+ listSchedulesResponse_schedules,+ )+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.Scheduler.Types++-- | /See:/ 'newListSchedules' smart constructor.+data ListSchedules = ListSchedules'+ { -- | If specified, only lists the schedules whose associated schedule group+ -- matches the given filter.+ groupName :: Prelude.Maybe Prelude.Text,+ -- | If specified, limits the number of results returned by this operation.+ -- The operation also returns a @NextToken@ which you can use in a+ -- subsequent operation to retrieve the next set of results.+ maxResults :: Prelude.Maybe Prelude.Natural,+ -- | Schedule name prefix to return the filtered list of resources.+ namePrefix :: Prelude.Maybe Prelude.Text,+ -- | The token returned by a previous call to retrieve the next set of+ -- results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | If specified, only lists the schedules whose current state matches the+ -- given filter.+ state :: Prelude.Maybe ScheduleState+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListSchedules' with all optional fields 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:+--+-- 'groupName', 'listSchedules_groupName' - If specified, only lists the schedules whose associated schedule group+-- matches the given filter.+--+-- 'maxResults', 'listSchedules_maxResults' - If specified, limits the number of results returned by this operation.+-- The operation also returns a @NextToken@ which you can use in a+-- subsequent operation to retrieve the next set of results.+--+-- 'namePrefix', 'listSchedules_namePrefix' - Schedule name prefix to return the filtered list of resources.+--+-- 'nextToken', 'listSchedules_nextToken' - The token returned by a previous call to retrieve the next set of+-- results.+--+-- 'state', 'listSchedules_state' - If specified, only lists the schedules whose current state matches the+-- given filter.+newListSchedules ::+ ListSchedules+newListSchedules =+ ListSchedules'+ { groupName = Prelude.Nothing,+ maxResults = Prelude.Nothing,+ namePrefix = Prelude.Nothing,+ nextToken = Prelude.Nothing,+ state = Prelude.Nothing+ }++-- | If specified, only lists the schedules whose associated schedule group+-- matches the given filter.+listSchedules_groupName :: Lens.Lens' ListSchedules (Prelude.Maybe Prelude.Text)+listSchedules_groupName = Lens.lens (\ListSchedules' {groupName} -> groupName) (\s@ListSchedules' {} a -> s {groupName = a} :: ListSchedules)++-- | If specified, limits the number of results returned by this operation.+-- The operation also returns a @NextToken@ which you can use in a+-- subsequent operation to retrieve the next set of results.+listSchedules_maxResults :: Lens.Lens' ListSchedules (Prelude.Maybe Prelude.Natural)+listSchedules_maxResults = Lens.lens (\ListSchedules' {maxResults} -> maxResults) (\s@ListSchedules' {} a -> s {maxResults = a} :: ListSchedules)++-- | Schedule name prefix to return the filtered list of resources.+listSchedules_namePrefix :: Lens.Lens' ListSchedules (Prelude.Maybe Prelude.Text)+listSchedules_namePrefix = Lens.lens (\ListSchedules' {namePrefix} -> namePrefix) (\s@ListSchedules' {} a -> s {namePrefix = a} :: ListSchedules)++-- | The token returned by a previous call to retrieve the next set of+-- results.+listSchedules_nextToken :: Lens.Lens' ListSchedules (Prelude.Maybe Prelude.Text)+listSchedules_nextToken = Lens.lens (\ListSchedules' {nextToken} -> nextToken) (\s@ListSchedules' {} a -> s {nextToken = a} :: ListSchedules)++-- | If specified, only lists the schedules whose current state matches the+-- given filter.+listSchedules_state :: Lens.Lens' ListSchedules (Prelude.Maybe ScheduleState)+listSchedules_state = Lens.lens (\ListSchedules' {state} -> state) (\s@ListSchedules' {} a -> s {state = a} :: ListSchedules)++instance Core.AWSPager ListSchedules where+ page rq rs+ | Core.stop+ ( rs+ Lens.^? listSchedulesResponse_nextToken+ Prelude.. Lens._Just+ ) =+ Prelude.Nothing+ | Core.stop+ (rs Lens.^. listSchedulesResponse_schedules) =+ Prelude.Nothing+ | Prelude.otherwise =+ Prelude.Just+ Prelude.$ rq+ Prelude.& listSchedules_nextToken+ Lens..~ rs+ Lens.^? listSchedulesResponse_nextToken+ Prelude.. Lens._Just++instance Core.AWSRequest ListSchedules where+ type+ AWSResponse ListSchedules =+ ListSchedulesResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListSchedulesResponse'+ Prelude.<$> (x Data..?> "NextToken")+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..?> "Schedules" Core..!@ Prelude.mempty)+ )++instance Prelude.Hashable ListSchedules where+ hashWithSalt _salt ListSchedules' {..} =+ _salt+ `Prelude.hashWithSalt` groupName+ `Prelude.hashWithSalt` maxResults+ `Prelude.hashWithSalt` namePrefix+ `Prelude.hashWithSalt` nextToken+ `Prelude.hashWithSalt` state++instance Prelude.NFData ListSchedules where+ rnf ListSchedules' {..} =+ Prelude.rnf groupName+ `Prelude.seq` Prelude.rnf maxResults+ `Prelude.seq` Prelude.rnf namePrefix+ `Prelude.seq` Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf state++instance Data.ToHeaders ListSchedules where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListSchedules where+ toPath = Prelude.const "/schedules"++instance Data.ToQuery ListSchedules where+ toQuery ListSchedules' {..} =+ Prelude.mconcat+ [ "ScheduleGroup" Data.=: groupName,+ "MaxResults" Data.=: maxResults,+ "NamePrefix" Data.=: namePrefix,+ "NextToken" Data.=: nextToken,+ "State" Data.=: state+ ]++-- | /See:/ 'newListSchedulesResponse' smart constructor.+data ListSchedulesResponse = ListSchedulesResponse'+ { -- | Indicates whether there are additional results to retrieve. If the value+ -- is null, there are no more results.+ nextToken :: Prelude.Maybe Prelude.Text,+ -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The schedules that match the specified criteria.+ schedules :: [ScheduleSummary]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListSchedulesResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'nextToken', 'listSchedulesResponse_nextToken' - Indicates whether there are additional results to retrieve. If the value+-- is null, there are no more results.+--+-- 'httpStatus', 'listSchedulesResponse_httpStatus' - The response's http status code.+--+-- 'schedules', 'listSchedulesResponse_schedules' - The schedules that match the specified criteria.+newListSchedulesResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListSchedulesResponse+newListSchedulesResponse pHttpStatus_ =+ ListSchedulesResponse'+ { nextToken = Prelude.Nothing,+ httpStatus = pHttpStatus_,+ schedules = Prelude.mempty+ }++-- | Indicates whether there are additional results to retrieve. If the value+-- is null, there are no more results.+listSchedulesResponse_nextToken :: Lens.Lens' ListSchedulesResponse (Prelude.Maybe Prelude.Text)+listSchedulesResponse_nextToken = Lens.lens (\ListSchedulesResponse' {nextToken} -> nextToken) (\s@ListSchedulesResponse' {} a -> s {nextToken = a} :: ListSchedulesResponse)++-- | The response's http status code.+listSchedulesResponse_httpStatus :: Lens.Lens' ListSchedulesResponse Prelude.Int+listSchedulesResponse_httpStatus = Lens.lens (\ListSchedulesResponse' {httpStatus} -> httpStatus) (\s@ListSchedulesResponse' {} a -> s {httpStatus = a} :: ListSchedulesResponse)++-- | The schedules that match the specified criteria.+listSchedulesResponse_schedules :: Lens.Lens' ListSchedulesResponse [ScheduleSummary]+listSchedulesResponse_schedules = Lens.lens (\ListSchedulesResponse' {schedules} -> schedules) (\s@ListSchedulesResponse' {} a -> s {schedules = a} :: ListSchedulesResponse) Prelude.. Lens.coerced++instance Prelude.NFData ListSchedulesResponse where+ rnf ListSchedulesResponse' {..} =+ Prelude.rnf nextToken+ `Prelude.seq` Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf schedules
+ gen/Amazonka/Scheduler/ListTagsForResource.hs view
@@ -0,0 +1,162 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Scheduler.ListTagsForResource+-- Copyright : (c) 2013-2023 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the tags associated with the Scheduler resource.+module Amazonka.Scheduler.ListTagsForResource+ ( -- * Creating a Request+ ListTagsForResource (..),+ newListTagsForResource,++ -- * Request Lenses+ listTagsForResource_resourceArn,++ -- * Destructuring the Response+ ListTagsForResourceResponse (..),+ newListTagsForResourceResponse,++ -- * Response Lenses+ listTagsForResourceResponse_tags,+ listTagsForResourceResponse_httpStatus,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.Scheduler.Types++-- | /See:/ 'newListTagsForResource' smart constructor.+data ListTagsForResource = ListTagsForResource'+ { -- | The ARN of the EventBridge Scheduler resource for which you want to view+ -- tags.+ 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 EventBridge Scheduler resource for which you want to view+-- tags.+newListTagsForResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ ListTagsForResource+newListTagsForResource pResourceArn_ =+ ListTagsForResource' {resourceArn = pResourceArn_}++-- | The ARN of the EventBridge Scheduler resource for which you want to view+-- tags.+listTagsForResource_resourceArn :: Lens.Lens' ListTagsForResource Prelude.Text+listTagsForResource_resourceArn = Lens.lens (\ListTagsForResource' {resourceArn} -> resourceArn) (\s@ListTagsForResource' {} a -> s {resourceArn = a} :: ListTagsForResource)++instance Core.AWSRequest ListTagsForResource where+ type+ AWSResponse ListTagsForResource =+ ListTagsForResourceResponse+ request overrides =+ Request.get (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ ListTagsForResourceResponse'+ Prelude.<$> (x Data..?> "Tags" Core..!@ Prelude.mempty)+ Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+ )++instance Prelude.Hashable ListTagsForResource where+ hashWithSalt _salt ListTagsForResource' {..} =+ _salt `Prelude.hashWithSalt` resourceArn++instance Prelude.NFData ListTagsForResource where+ rnf ListTagsForResource' {..} =+ Prelude.rnf resourceArn++instance Data.ToHeaders ListTagsForResource where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToPath ListTagsForResource where+ toPath ListTagsForResource' {..} =+ Prelude.mconcat ["/tags/", Data.toBS resourceArn]++instance Data.ToQuery ListTagsForResource where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newListTagsForResourceResponse' smart constructor.+data ListTagsForResourceResponse = ListTagsForResourceResponse'+ { -- | The list of tags associated with the specified resource.+ tags :: Prelude.Maybe [Tag],+ -- | The response's http status code.+ httpStatus :: Prelude.Int+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ListTagsForResourceResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'tags', 'listTagsForResourceResponse_tags' - The list of tags associated with the specified resource.+--+-- 'httpStatus', 'listTagsForResourceResponse_httpStatus' - The response's http status code.+newListTagsForResourceResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ ListTagsForResourceResponse+newListTagsForResourceResponse pHttpStatus_ =+ ListTagsForResourceResponse'+ { tags =+ Prelude.Nothing,+ httpStatus = pHttpStatus_+ }++-- | The list of tags associated with the specified resource.+listTagsForResourceResponse_tags :: Lens.Lens' ListTagsForResourceResponse (Prelude.Maybe [Tag])+listTagsForResourceResponse_tags = Lens.lens (\ListTagsForResourceResponse' {tags} -> tags) (\s@ListTagsForResourceResponse' {} a -> s {tags = a} :: ListTagsForResourceResponse) Prelude.. Lens.mapping Lens.coerced++-- | The response's http status code.+listTagsForResourceResponse_httpStatus :: Lens.Lens' ListTagsForResourceResponse Prelude.Int+listTagsForResourceResponse_httpStatus = Lens.lens (\ListTagsForResourceResponse' {httpStatus} -> httpStatus) (\s@ListTagsForResourceResponse' {} a -> s {httpStatus = a} :: ListTagsForResourceResponse)++instance Prelude.NFData ListTagsForResourceResponse where+ rnf ListTagsForResourceResponse' {..} =+ Prelude.rnf tags+ `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/Scheduler/TagResource.hs view
@@ -0,0 +1,167 @@+{-# 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.Scheduler.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 EventBridge+-- Scheduler resource. You can only assign tags to schedule groups.+module Amazonka.Scheduler.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.Scheduler.Types++-- | /See:/ 'newTagResource' smart constructor.+data TagResource = TagResource'+ { -- | The Amazon Resource Name (ARN) of the schedule group that you are adding+ -- tags to.+ resourceArn :: Prelude.Text,+ -- | The list of tags to associate with the schedule group.+ tags :: [Tag]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TagResource' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'resourceArn', 'tagResource_resourceArn' - The Amazon Resource Name (ARN) of the schedule group that you are adding+-- tags to.+--+-- 'tags', 'tagResource_tags' - The list of tags to associate with the schedule group.+newTagResource ::+ -- | 'resourceArn'+ Prelude.Text ->+ TagResource+newTagResource pResourceArn_ =+ TagResource'+ { resourceArn = pResourceArn_,+ tags = Prelude.mempty+ }++-- | The Amazon Resource Name (ARN) of the schedule group that you are 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 tags to associate with the schedule group.+tagResource_tags :: Lens.Lens' TagResource [Tag]+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/Scheduler/Types.hs view
@@ -0,0 +1,340 @@+{-# 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.Scheduler.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.Scheduler.Types+ ( -- * Service Configuration+ defaultService,++ -- * Errors+ _ConflictException,+ _InternalServerException,+ _ResourceNotFoundException,+ _ServiceQuotaExceededException,+ _ThrottlingException,+ _ValidationException,++ -- * AssignPublicIp+ AssignPublicIp (..),++ -- * FlexibleTimeWindowMode+ FlexibleTimeWindowMode (..),++ -- * LaunchType+ LaunchType (..),++ -- * PlacementConstraintType+ PlacementConstraintType (..),++ -- * PlacementStrategyType+ PlacementStrategyType (..),++ -- * PropagateTags+ PropagateTags (..),++ -- * ScheduleGroupState+ ScheduleGroupState (..),++ -- * ScheduleState+ ScheduleState (..),++ -- * AwsVpcConfiguration+ AwsVpcConfiguration (..),+ newAwsVpcConfiguration,+ awsVpcConfiguration_assignPublicIp,+ awsVpcConfiguration_securityGroups,+ awsVpcConfiguration_subnets,++ -- * CapacityProviderStrategyItem+ CapacityProviderStrategyItem (..),+ newCapacityProviderStrategyItem,+ capacityProviderStrategyItem_base,+ capacityProviderStrategyItem_weight,+ capacityProviderStrategyItem_capacityProvider,++ -- * DeadLetterConfig+ DeadLetterConfig (..),+ newDeadLetterConfig,+ deadLetterConfig_arn,++ -- * EcsParameters+ EcsParameters (..),+ newEcsParameters,+ ecsParameters_capacityProviderStrategy,+ ecsParameters_enableECSManagedTags,+ ecsParameters_enableExecuteCommand,+ ecsParameters_group,+ ecsParameters_launchType,+ ecsParameters_networkConfiguration,+ ecsParameters_placementConstraints,+ ecsParameters_placementStrategy,+ ecsParameters_platformVersion,+ ecsParameters_propagateTags,+ ecsParameters_referenceId,+ ecsParameters_tags,+ ecsParameters_taskCount,+ ecsParameters_taskDefinitionArn,++ -- * EventBridgeParameters+ EventBridgeParameters (..),+ newEventBridgeParameters,+ eventBridgeParameters_detailType,+ eventBridgeParameters_source,++ -- * FlexibleTimeWindow+ FlexibleTimeWindow (..),+ newFlexibleTimeWindow,+ flexibleTimeWindow_maximumWindowInMinutes,+ flexibleTimeWindow_mode,++ -- * KinesisParameters+ KinesisParameters (..),+ newKinesisParameters,+ kinesisParameters_partitionKey,++ -- * NetworkConfiguration+ NetworkConfiguration (..),+ newNetworkConfiguration,+ networkConfiguration_awsvpcConfiguration,++ -- * PlacementConstraint+ PlacementConstraint (..),+ newPlacementConstraint,+ placementConstraint_expression,+ placementConstraint_type,++ -- * PlacementStrategy+ PlacementStrategy (..),+ newPlacementStrategy,+ placementStrategy_field,+ placementStrategy_type,++ -- * RetryPolicy+ RetryPolicy (..),+ newRetryPolicy,+ retryPolicy_maximumEventAgeInSeconds,+ retryPolicy_maximumRetryAttempts,++ -- * SageMakerPipelineParameter+ SageMakerPipelineParameter (..),+ newSageMakerPipelineParameter,+ sageMakerPipelineParameter_name,+ sageMakerPipelineParameter_value,++ -- * SageMakerPipelineParameters+ SageMakerPipelineParameters (..),+ newSageMakerPipelineParameters,+ sageMakerPipelineParameters_pipelineParameterList,++ -- * ScheduleGroupSummary+ ScheduleGroupSummary (..),+ newScheduleGroupSummary,+ scheduleGroupSummary_arn,+ scheduleGroupSummary_creationDate,+ scheduleGroupSummary_lastModificationDate,+ scheduleGroupSummary_name,+ scheduleGroupSummary_state,++ -- * ScheduleSummary+ ScheduleSummary (..),+ newScheduleSummary,+ scheduleSummary_arn,+ scheduleSummary_creationDate,+ scheduleSummary_groupName,+ scheduleSummary_lastModificationDate,+ scheduleSummary_name,+ scheduleSummary_state,+ scheduleSummary_target,++ -- * SqsParameters+ SqsParameters (..),+ newSqsParameters,+ sqsParameters_messageGroupId,++ -- * Tag+ Tag (..),+ newTag,+ tag_key,+ tag_value,++ -- * Target+ Target (..),+ newTarget,+ target_deadLetterConfig,+ target_ecsParameters,+ target_eventBridgeParameters,+ target_input,+ target_kinesisParameters,+ target_retryPolicy,+ target_sageMakerPipelineParameters,+ target_sqsParameters,+ target_arn,+ target_roleArn,++ -- * TargetSummary+ TargetSummary (..),+ newTargetSummary,+ targetSummary_arn,+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Prelude as Prelude+import Amazonka.Scheduler.Types.AssignPublicIp+import Amazonka.Scheduler.Types.AwsVpcConfiguration+import Amazonka.Scheduler.Types.CapacityProviderStrategyItem+import Amazonka.Scheduler.Types.DeadLetterConfig+import Amazonka.Scheduler.Types.EcsParameters+import Amazonka.Scheduler.Types.EventBridgeParameters+import Amazonka.Scheduler.Types.FlexibleTimeWindow+import Amazonka.Scheduler.Types.FlexibleTimeWindowMode+import Amazonka.Scheduler.Types.KinesisParameters+import Amazonka.Scheduler.Types.LaunchType+import Amazonka.Scheduler.Types.NetworkConfiguration+import Amazonka.Scheduler.Types.PlacementConstraint+import Amazonka.Scheduler.Types.PlacementConstraintType+import Amazonka.Scheduler.Types.PlacementStrategy+import Amazonka.Scheduler.Types.PlacementStrategyType+import Amazonka.Scheduler.Types.PropagateTags+import Amazonka.Scheduler.Types.RetryPolicy+import Amazonka.Scheduler.Types.SageMakerPipelineParameter+import Amazonka.Scheduler.Types.SageMakerPipelineParameters+import Amazonka.Scheduler.Types.ScheduleGroupState+import Amazonka.Scheduler.Types.ScheduleGroupSummary+import Amazonka.Scheduler.Types.ScheduleState+import Amazonka.Scheduler.Types.ScheduleSummary+import Amazonka.Scheduler.Types.SqsParameters+import Amazonka.Scheduler.Types.Tag+import Amazonka.Scheduler.Types.Target+import Amazonka.Scheduler.Types.TargetSummary+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2021-06-30@ of the Amazon EventBridge Scheduler SDK configuration.+defaultService :: Core.Service+defaultService =+ Core.Service+ { Core.abbrev = "Scheduler",+ Core.signer = Sign.v4,+ Core.endpointPrefix = "scheduler",+ Core.signingName = "scheduler",+ Core.version = "2021-06-30",+ Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+ Core.endpoint = Core.defaultEndpoint defaultService,+ Core.timeout = Prelude.Just 70,+ Core.check = Core.statusSuccess,+ Core.error = Core.parseJSONError "Scheduler",+ 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++-- | Updating or deleting the resource can cause an inconsistent state.+_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ConflictException =+ Core._MatchServiceError+ defaultService+ "ConflictException"+ Prelude.. Core.hasStatus 409++-- | Unexpected error encountered while processing the request.+_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalServerException =+ Core._MatchServiceError+ defaultService+ "InternalServerException"+ Prelude.. Core.hasStatus 500++-- | The request references a resource which does not exist.+_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ResourceNotFoundException =+ Core._MatchServiceError+ defaultService+ "ResourceNotFoundException"+ Prelude.. Core.hasStatus 404++-- | The 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 denied due to request throttling.+_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ThrottlingException =+ Core._MatchServiceError+ defaultService+ "ThrottlingException"+ Prelude.. Core.hasStatus 429++-- | The input fails to satisfy the constraints specified by an AWS service.+_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ValidationException =+ Core._MatchServiceError+ defaultService+ "ValidationException"+ Prelude.. Core.hasStatus 400
+ gen/Amazonka/Scheduler/Types/AssignPublicIp.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.Scheduler.Types.AssignPublicIp+-- 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.Scheduler.Types.AssignPublicIp+ ( AssignPublicIp+ ( ..,+ AssignPublicIp_DISABLED,+ AssignPublicIp_ENABLED+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype AssignPublicIp = AssignPublicIp'+ { fromAssignPublicIp ::+ 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 AssignPublicIp_DISABLED :: AssignPublicIp+pattern AssignPublicIp_DISABLED = AssignPublicIp' "DISABLED"++pattern AssignPublicIp_ENABLED :: AssignPublicIp+pattern AssignPublicIp_ENABLED = AssignPublicIp' "ENABLED"++{-# COMPLETE+ AssignPublicIp_DISABLED,+ AssignPublicIp_ENABLED,+ AssignPublicIp'+ #-}
+ gen/Amazonka/Scheduler/Types/AwsVpcConfiguration.hs view
@@ -0,0 +1,132 @@+{-# 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.Scheduler.Types.AwsVpcConfiguration+-- 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.Scheduler.Types.AwsVpcConfiguration 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.Scheduler.Types.AssignPublicIp++-- | This structure specifies the VPC subnets and security groups for the+-- task, and whether a public IP address is to be used. This structure is+-- relevant only for ECS tasks that use the awsvpc network mode.+--+-- /See:/ 'newAwsVpcConfiguration' smart constructor.+data AwsVpcConfiguration = AwsVpcConfiguration'+ { -- | Specifies whether the task\'s elastic network interface receives a+ -- public IP address. You can specify @ENABLED@ only when @LaunchType@ in+ -- @EcsParameters@ is set to @FARGATE@.+ assignPublicIp :: Prelude.Maybe AssignPublicIp,+ -- | Specifies the security groups associated with the task. These security+ -- groups must all be in the same VPC. You can specify as many as five+ -- security groups. If you do not specify a security group, the default+ -- security group for the VPC is used.+ securityGroups :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),+ -- | Specifies the subnets associated with the task. These subnets must all+ -- be in the same VPC. You can specify as many as 16 subnets.+ subnets :: Prelude.NonEmpty Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'AwsVpcConfiguration' with all optional fields 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:+--+-- 'assignPublicIp', 'awsVpcConfiguration_assignPublicIp' - Specifies whether the task\'s elastic network interface receives a+-- public IP address. You can specify @ENABLED@ only when @LaunchType@ in+-- @EcsParameters@ is set to @FARGATE@.+--+-- 'securityGroups', 'awsVpcConfiguration_securityGroups' - Specifies the security groups associated with the task. These security+-- groups must all be in the same VPC. You can specify as many as five+-- security groups. If you do not specify a security group, the default+-- security group for the VPC is used.+--+-- 'subnets', 'awsVpcConfiguration_subnets' - Specifies the subnets associated with the task. These subnets must all+-- be in the same VPC. You can specify as many as 16 subnets.+newAwsVpcConfiguration ::+ -- | 'subnets'+ Prelude.NonEmpty Prelude.Text ->+ AwsVpcConfiguration+newAwsVpcConfiguration pSubnets_ =+ AwsVpcConfiguration'+ { assignPublicIp =+ Prelude.Nothing,+ securityGroups = Prelude.Nothing,+ subnets = Lens.coerced Lens.# pSubnets_+ }++-- | Specifies whether the task\'s elastic network interface receives a+-- public IP address. You can specify @ENABLED@ only when @LaunchType@ in+-- @EcsParameters@ is set to @FARGATE@.+awsVpcConfiguration_assignPublicIp :: Lens.Lens' AwsVpcConfiguration (Prelude.Maybe AssignPublicIp)+awsVpcConfiguration_assignPublicIp = Lens.lens (\AwsVpcConfiguration' {assignPublicIp} -> assignPublicIp) (\s@AwsVpcConfiguration' {} a -> s {assignPublicIp = a} :: AwsVpcConfiguration)++-- | Specifies the security groups associated with the task. These security+-- groups must all be in the same VPC. You can specify as many as five+-- security groups. If you do not specify a security group, the default+-- security group for the VPC is used.+awsVpcConfiguration_securityGroups :: Lens.Lens' AwsVpcConfiguration (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))+awsVpcConfiguration_securityGroups = Lens.lens (\AwsVpcConfiguration' {securityGroups} -> securityGroups) (\s@AwsVpcConfiguration' {} a -> s {securityGroups = a} :: AwsVpcConfiguration) Prelude.. Lens.mapping Lens.coerced++-- | Specifies the subnets associated with the task. These subnets must all+-- be in the same VPC. You can specify as many as 16 subnets.+awsVpcConfiguration_subnets :: Lens.Lens' AwsVpcConfiguration (Prelude.NonEmpty Prelude.Text)+awsVpcConfiguration_subnets = Lens.lens (\AwsVpcConfiguration' {subnets} -> subnets) (\s@AwsVpcConfiguration' {} a -> s {subnets = a} :: AwsVpcConfiguration) Prelude.. Lens.coerced++instance Data.FromJSON AwsVpcConfiguration where+ parseJSON =+ Data.withObject+ "AwsVpcConfiguration"+ ( \x ->+ AwsVpcConfiguration'+ Prelude.<$> (x Data..:? "AssignPublicIp")+ Prelude.<*> (x Data..:? "SecurityGroups")+ Prelude.<*> (x Data..: "Subnets")+ )++instance Prelude.Hashable AwsVpcConfiguration where+ hashWithSalt _salt AwsVpcConfiguration' {..} =+ _salt+ `Prelude.hashWithSalt` assignPublicIp+ `Prelude.hashWithSalt` securityGroups+ `Prelude.hashWithSalt` subnets++instance Prelude.NFData AwsVpcConfiguration where+ rnf AwsVpcConfiguration' {..} =+ Prelude.rnf assignPublicIp+ `Prelude.seq` Prelude.rnf securityGroups+ `Prelude.seq` Prelude.rnf subnets++instance Data.ToJSON AwsVpcConfiguration where+ toJSON AwsVpcConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("AssignPublicIp" Data..=)+ Prelude.<$> assignPublicIp,+ ("SecurityGroups" Data..=)+ Prelude.<$> securityGroups,+ Prelude.Just ("Subnets" Data..= subnets)+ ]+ )
+ gen/Amazonka/Scheduler/Types/CapacityProviderStrategyItem.hs view
@@ -0,0 +1,131 @@+{-# 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.Scheduler.Types.CapacityProviderStrategyItem+-- 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.Scheduler.Types.CapacityProviderStrategyItem where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | The details of a capacity provider strategy.+--+-- /See:/ 'newCapacityProviderStrategyItem' smart constructor.+data CapacityProviderStrategyItem = CapacityProviderStrategyItem'+ { -- | The base value designates how many tasks, at a minimum, to run on the+ -- specified capacity provider. Only one capacity provider in a capacity+ -- provider strategy can have a base defined. If no value is specified, the+ -- default value of @0@ is used.+ base :: Prelude.Maybe Prelude.Natural,+ -- | The weight value designates the relative percentage of the total number+ -- of tasks launched that should use the specified capacity provider. The+ -- weight value is taken into consideration after the base value, if+ -- defined, is satisfied.+ weight :: Prelude.Maybe Prelude.Natural,+ -- | The short name of the capacity provider.+ capacityProvider :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'CapacityProviderStrategyItem' with all optional fields 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:+--+-- 'base', 'capacityProviderStrategyItem_base' - The base value designates how many tasks, at a minimum, to run on the+-- specified capacity provider. Only one capacity provider in a capacity+-- provider strategy can have a base defined. If no value is specified, the+-- default value of @0@ is used.+--+-- 'weight', 'capacityProviderStrategyItem_weight' - The weight value designates the relative percentage of the total number+-- of tasks launched that should use the specified capacity provider. The+-- weight value is taken into consideration after the base value, if+-- defined, is satisfied.+--+-- 'capacityProvider', 'capacityProviderStrategyItem_capacityProvider' - The short name of the capacity provider.+newCapacityProviderStrategyItem ::+ -- | 'capacityProvider'+ Prelude.Text ->+ CapacityProviderStrategyItem+newCapacityProviderStrategyItem pCapacityProvider_ =+ CapacityProviderStrategyItem'+ { base =+ Prelude.Nothing,+ weight = Prelude.Nothing,+ capacityProvider = pCapacityProvider_+ }++-- | The base value designates how many tasks, at a minimum, to run on the+-- specified capacity provider. Only one capacity provider in a capacity+-- provider strategy can have a base defined. If no value is specified, the+-- default value of @0@ is used.+capacityProviderStrategyItem_base :: Lens.Lens' CapacityProviderStrategyItem (Prelude.Maybe Prelude.Natural)+capacityProviderStrategyItem_base = Lens.lens (\CapacityProviderStrategyItem' {base} -> base) (\s@CapacityProviderStrategyItem' {} a -> s {base = a} :: CapacityProviderStrategyItem)++-- | The weight value designates the relative percentage of the total number+-- of tasks launched that should use the specified capacity provider. The+-- weight value is taken into consideration after the base value, if+-- defined, is satisfied.+capacityProviderStrategyItem_weight :: Lens.Lens' CapacityProviderStrategyItem (Prelude.Maybe Prelude.Natural)+capacityProviderStrategyItem_weight = Lens.lens (\CapacityProviderStrategyItem' {weight} -> weight) (\s@CapacityProviderStrategyItem' {} a -> s {weight = a} :: CapacityProviderStrategyItem)++-- | The short name of the capacity provider.+capacityProviderStrategyItem_capacityProvider :: Lens.Lens' CapacityProviderStrategyItem Prelude.Text+capacityProviderStrategyItem_capacityProvider = Lens.lens (\CapacityProviderStrategyItem' {capacityProvider} -> capacityProvider) (\s@CapacityProviderStrategyItem' {} a -> s {capacityProvider = a} :: CapacityProviderStrategyItem)++instance Data.FromJSON CapacityProviderStrategyItem where+ parseJSON =+ Data.withObject+ "CapacityProviderStrategyItem"+ ( \x ->+ CapacityProviderStrategyItem'+ Prelude.<$> (x Data..:? "base")+ Prelude.<*> (x Data..:? "weight")+ Prelude.<*> (x Data..: "capacityProvider")+ )++instance+ Prelude.Hashable+ CapacityProviderStrategyItem+ where+ hashWithSalt _salt CapacityProviderStrategyItem' {..} =+ _salt+ `Prelude.hashWithSalt` base+ `Prelude.hashWithSalt` weight+ `Prelude.hashWithSalt` capacityProvider++instance Prelude.NFData CapacityProviderStrategyItem where+ rnf CapacityProviderStrategyItem' {..} =+ Prelude.rnf base+ `Prelude.seq` Prelude.rnf weight+ `Prelude.seq` Prelude.rnf capacityProvider++instance Data.ToJSON CapacityProviderStrategyItem where+ toJSON CapacityProviderStrategyItem' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("base" Data..=) Prelude.<$> base,+ ("weight" Data..=) Prelude.<$> weight,+ Prelude.Just+ ("capacityProvider" Data..= capacityProvider)+ ]+ )
+ gen/Amazonka/Scheduler/Types/DeadLetterConfig.hs view
@@ -0,0 +1,78 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Scheduler.Types.DeadLetterConfig+-- 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.Scheduler.Types.DeadLetterConfig where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | An object that contains information about an Amazon SQS queue that+-- EventBridge Scheduler uses as a dead-letter queue for your schedule. If+-- specified, EventBridge Scheduler delivers failed events that could not+-- be successfully delivered to a target to the queue.+--+-- /See:/ 'newDeadLetterConfig' smart constructor.+data DeadLetterConfig = DeadLetterConfig'+ { -- | The Amazon Resource Name (ARN) of the SQS queue specified as the+ -- destination for the dead-letter queue.+ arn :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'DeadLetterConfig' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'deadLetterConfig_arn' - The Amazon Resource Name (ARN) of the SQS queue specified as the+-- destination for the dead-letter queue.+newDeadLetterConfig ::+ DeadLetterConfig+newDeadLetterConfig =+ DeadLetterConfig' {arn = Prelude.Nothing}++-- | The Amazon Resource Name (ARN) of the SQS queue specified as the+-- destination for the dead-letter queue.+deadLetterConfig_arn :: Lens.Lens' DeadLetterConfig (Prelude.Maybe Prelude.Text)+deadLetterConfig_arn = Lens.lens (\DeadLetterConfig' {arn} -> arn) (\s@DeadLetterConfig' {} a -> s {arn = a} :: DeadLetterConfig)++instance Data.FromJSON DeadLetterConfig where+ parseJSON =+ Data.withObject+ "DeadLetterConfig"+ ( \x ->+ DeadLetterConfig' Prelude.<$> (x Data..:? "Arn")+ )++instance Prelude.Hashable DeadLetterConfig where+ hashWithSalt _salt DeadLetterConfig' {..} =+ _salt `Prelude.hashWithSalt` arn++instance Prelude.NFData DeadLetterConfig where+ rnf DeadLetterConfig' {..} = Prelude.rnf arn++instance Data.ToJSON DeadLetterConfig where+ toJSON DeadLetterConfig' {..} =+ Data.object+ (Prelude.catMaybes [("Arn" Data..=) Prelude.<$> arn])
+ gen/Amazonka/Scheduler/Types/EcsParameters.hs view
@@ -0,0 +1,355 @@+{-# 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.Scheduler.Types.EcsParameters+-- 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.Scheduler.Types.EcsParameters 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.Scheduler.Types.CapacityProviderStrategyItem+import Amazonka.Scheduler.Types.LaunchType+import Amazonka.Scheduler.Types.NetworkConfiguration+import Amazonka.Scheduler.Types.PlacementConstraint+import Amazonka.Scheduler.Types.PlacementStrategy+import Amazonka.Scheduler.Types.PropagateTags++-- | The templated target type for the Amazon ECS+-- <https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html RunTask>+-- API operation.+--+-- /See:/ 'newEcsParameters' smart constructor.+data EcsParameters = EcsParameters'+ { -- | The capacity provider strategy to use for the task.+ capacityProviderStrategy :: Prelude.Maybe [CapacityProviderStrategyItem],+ -- | Specifies whether to enable Amazon ECS managed tags for the task. For+ -- more information, see+ -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html Tagging Your Amazon ECS Resources>+ -- in the /Amazon ECS Developer Guide/.+ enableECSManagedTags :: Prelude.Maybe Prelude.Bool,+ -- | Whether or not to enable the execute command functionality for the+ -- containers in this task. If true, this enables execute command+ -- functionality on all containers in the task.+ enableExecuteCommand :: Prelude.Maybe Prelude.Bool,+ -- | Specifies an ECS task group for the task. The maximum length is 255+ -- characters.+ group' :: Prelude.Maybe Prelude.Text,+ -- | Specifies the launch type on which your task is running. The launch type+ -- that you specify here must match one of the launch type+ -- (compatibilities) of the target task. The @FARGATE@ value is supported+ -- only in the Regions where Fargate with Amazon ECS is supported. For more+ -- information, see+ -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html AWS Fargate on Amazon ECS>+ -- in the /Amazon ECS Developer Guide/.+ launchType :: Prelude.Maybe LaunchType,+ -- | This structure specifies the network configuration for an ECS task.+ networkConfiguration :: Prelude.Maybe NetworkConfiguration,+ -- | An array of placement constraint objects to use for the task. You can+ -- specify up to 10 constraints per task (including constraints in the task+ -- definition and those specified at runtime).+ placementConstraints :: Prelude.Maybe [PlacementConstraint],+ -- | The task placement strategy for a task or service.+ placementStrategy :: Prelude.Maybe [PlacementStrategy],+ -- | Specifies the platform version for the task. Specify only the numeric+ -- portion of the platform version, such as @1.1.0@.+ platformVersion :: Prelude.Maybe Prelude.Text,+ -- | Specifies whether to propagate the tags from the task definition to the+ -- task. If no value is specified, the tags are not propagated. Tags can+ -- only be propagated to the task during task creation. To add tags to a+ -- task after task creation, use Amazon ECS\'s+ -- <https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html TagResource>+ -- API action.+ propagateTags :: Prelude.Maybe PropagateTags,+ -- | The reference ID to use for the task.+ referenceId :: Prelude.Maybe Prelude.Text,+ -- | The metadata that you apply to the task to help you categorize and+ -- organize them. Each tag consists of a key and an optional value, both of+ -- which you define. For more information, see+ -- <https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html RunTask>+ -- in the /Amazon ECS API Reference/.+ tags :: Prelude.Maybe [Prelude.HashMap Prelude.Text Prelude.Text],+ -- | The number of tasks to create based on @TaskDefinition@. The default is+ -- @1@.+ taskCount :: Prelude.Maybe Prelude.Natural,+ -- | The Amazon Resource Name (ARN) of the task definition to use if the+ -- event target is an Amazon ECS task.+ taskDefinitionArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EcsParameters' with all optional fields 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:+--+-- 'capacityProviderStrategy', 'ecsParameters_capacityProviderStrategy' - The capacity provider strategy to use for the task.+--+-- 'enableECSManagedTags', 'ecsParameters_enableECSManagedTags' - Specifies whether to enable Amazon ECS managed tags for the task. For+-- more information, see+-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html Tagging Your Amazon ECS Resources>+-- in the /Amazon ECS Developer Guide/.+--+-- 'enableExecuteCommand', 'ecsParameters_enableExecuteCommand' - Whether or not to enable the execute command functionality for the+-- containers in this task. If true, this enables execute command+-- functionality on all containers in the task.+--+-- 'group'', 'ecsParameters_group' - Specifies an ECS task group for the task. The maximum length is 255+-- characters.+--+-- 'launchType', 'ecsParameters_launchType' - Specifies the launch type on which your task is running. The launch type+-- that you specify here must match one of the launch type+-- (compatibilities) of the target task. The @FARGATE@ value is supported+-- only in the Regions where Fargate with Amazon ECS is supported. For more+-- information, see+-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html AWS Fargate on Amazon ECS>+-- in the /Amazon ECS Developer Guide/.+--+-- 'networkConfiguration', 'ecsParameters_networkConfiguration' - This structure specifies the network configuration for an ECS task.+--+-- 'placementConstraints', 'ecsParameters_placementConstraints' - An array of placement constraint objects to use for the task. You can+-- specify up to 10 constraints per task (including constraints in the task+-- definition and those specified at runtime).+--+-- 'placementStrategy', 'ecsParameters_placementStrategy' - The task placement strategy for a task or service.+--+-- 'platformVersion', 'ecsParameters_platformVersion' - Specifies the platform version for the task. Specify only the numeric+-- portion of the platform version, such as @1.1.0@.+--+-- 'propagateTags', 'ecsParameters_propagateTags' - Specifies whether to propagate the tags from the task definition to the+-- task. If no value is specified, the tags are not propagated. Tags can+-- only be propagated to the task during task creation. To add tags to a+-- task after task creation, use Amazon ECS\'s+-- <https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html TagResource>+-- API action.+--+-- 'referenceId', 'ecsParameters_referenceId' - The reference ID to use for the task.+--+-- 'tags', 'ecsParameters_tags' - The metadata that you apply to the task to help you categorize and+-- organize them. Each tag consists of a key and an optional value, both of+-- which you define. For more information, see+-- <https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html RunTask>+-- in the /Amazon ECS API Reference/.+--+-- 'taskCount', 'ecsParameters_taskCount' - The number of tasks to create based on @TaskDefinition@. The default is+-- @1@.+--+-- 'taskDefinitionArn', 'ecsParameters_taskDefinitionArn' - The Amazon Resource Name (ARN) of the task definition to use if the+-- event target is an Amazon ECS task.+newEcsParameters ::+ -- | 'taskDefinitionArn'+ Prelude.Text ->+ EcsParameters+newEcsParameters pTaskDefinitionArn_ =+ EcsParameters'+ { capacityProviderStrategy =+ Prelude.Nothing,+ enableECSManagedTags = Prelude.Nothing,+ enableExecuteCommand = Prelude.Nothing,+ group' = Prelude.Nothing,+ launchType = Prelude.Nothing,+ networkConfiguration = Prelude.Nothing,+ placementConstraints = Prelude.Nothing,+ placementStrategy = Prelude.Nothing,+ platformVersion = Prelude.Nothing,+ propagateTags = Prelude.Nothing,+ referenceId = Prelude.Nothing,+ tags = Prelude.Nothing,+ taskCount = Prelude.Nothing,+ taskDefinitionArn = pTaskDefinitionArn_+ }++-- | The capacity provider strategy to use for the task.+ecsParameters_capacityProviderStrategy :: Lens.Lens' EcsParameters (Prelude.Maybe [CapacityProviderStrategyItem])+ecsParameters_capacityProviderStrategy = Lens.lens (\EcsParameters' {capacityProviderStrategy} -> capacityProviderStrategy) (\s@EcsParameters' {} a -> s {capacityProviderStrategy = a} :: EcsParameters) Prelude.. Lens.mapping Lens.coerced++-- | Specifies whether to enable Amazon ECS managed tags for the task. For+-- more information, see+-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html Tagging Your Amazon ECS Resources>+-- in the /Amazon ECS Developer Guide/.+ecsParameters_enableECSManagedTags :: Lens.Lens' EcsParameters (Prelude.Maybe Prelude.Bool)+ecsParameters_enableECSManagedTags = Lens.lens (\EcsParameters' {enableECSManagedTags} -> enableECSManagedTags) (\s@EcsParameters' {} a -> s {enableECSManagedTags = a} :: EcsParameters)++-- | Whether or not to enable the execute command functionality for the+-- containers in this task. If true, this enables execute command+-- functionality on all containers in the task.+ecsParameters_enableExecuteCommand :: Lens.Lens' EcsParameters (Prelude.Maybe Prelude.Bool)+ecsParameters_enableExecuteCommand = Lens.lens (\EcsParameters' {enableExecuteCommand} -> enableExecuteCommand) (\s@EcsParameters' {} a -> s {enableExecuteCommand = a} :: EcsParameters)++-- | Specifies an ECS task group for the task. The maximum length is 255+-- characters.+ecsParameters_group :: Lens.Lens' EcsParameters (Prelude.Maybe Prelude.Text)+ecsParameters_group = Lens.lens (\EcsParameters' {group'} -> group') (\s@EcsParameters' {} a -> s {group' = a} :: EcsParameters)++-- | Specifies the launch type on which your task is running. The launch type+-- that you specify here must match one of the launch type+-- (compatibilities) of the target task. The @FARGATE@ value is supported+-- only in the Regions where Fargate with Amazon ECS is supported. For more+-- information, see+-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html AWS Fargate on Amazon ECS>+-- in the /Amazon ECS Developer Guide/.+ecsParameters_launchType :: Lens.Lens' EcsParameters (Prelude.Maybe LaunchType)+ecsParameters_launchType = Lens.lens (\EcsParameters' {launchType} -> launchType) (\s@EcsParameters' {} a -> s {launchType = a} :: EcsParameters)++-- | This structure specifies the network configuration for an ECS task.+ecsParameters_networkConfiguration :: Lens.Lens' EcsParameters (Prelude.Maybe NetworkConfiguration)+ecsParameters_networkConfiguration = Lens.lens (\EcsParameters' {networkConfiguration} -> networkConfiguration) (\s@EcsParameters' {} a -> s {networkConfiguration = a} :: EcsParameters)++-- | An array of placement constraint objects to use for the task. You can+-- specify up to 10 constraints per task (including constraints in the task+-- definition and those specified at runtime).+ecsParameters_placementConstraints :: Lens.Lens' EcsParameters (Prelude.Maybe [PlacementConstraint])+ecsParameters_placementConstraints = Lens.lens (\EcsParameters' {placementConstraints} -> placementConstraints) (\s@EcsParameters' {} a -> s {placementConstraints = a} :: EcsParameters) Prelude.. Lens.mapping Lens.coerced++-- | The task placement strategy for a task or service.+ecsParameters_placementStrategy :: Lens.Lens' EcsParameters (Prelude.Maybe [PlacementStrategy])+ecsParameters_placementStrategy = Lens.lens (\EcsParameters' {placementStrategy} -> placementStrategy) (\s@EcsParameters' {} a -> s {placementStrategy = a} :: EcsParameters) Prelude.. Lens.mapping Lens.coerced++-- | Specifies the platform version for the task. Specify only the numeric+-- portion of the platform version, such as @1.1.0@.+ecsParameters_platformVersion :: Lens.Lens' EcsParameters (Prelude.Maybe Prelude.Text)+ecsParameters_platformVersion = Lens.lens (\EcsParameters' {platformVersion} -> platformVersion) (\s@EcsParameters' {} a -> s {platformVersion = a} :: EcsParameters)++-- | Specifies whether to propagate the tags from the task definition to the+-- task. If no value is specified, the tags are not propagated. Tags can+-- only be propagated to the task during task creation. To add tags to a+-- task after task creation, use Amazon ECS\'s+-- <https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html TagResource>+-- API action.+ecsParameters_propagateTags :: Lens.Lens' EcsParameters (Prelude.Maybe PropagateTags)+ecsParameters_propagateTags = Lens.lens (\EcsParameters' {propagateTags} -> propagateTags) (\s@EcsParameters' {} a -> s {propagateTags = a} :: EcsParameters)++-- | The reference ID to use for the task.+ecsParameters_referenceId :: Lens.Lens' EcsParameters (Prelude.Maybe Prelude.Text)+ecsParameters_referenceId = Lens.lens (\EcsParameters' {referenceId} -> referenceId) (\s@EcsParameters' {} a -> s {referenceId = a} :: EcsParameters)++-- | The metadata that you apply to the task to help you categorize and+-- organize them. Each tag consists of a key and an optional value, both of+-- which you define. For more information, see+-- <https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html RunTask>+-- in the /Amazon ECS API Reference/.+ecsParameters_tags :: Lens.Lens' EcsParameters (Prelude.Maybe [Prelude.HashMap Prelude.Text Prelude.Text])+ecsParameters_tags = Lens.lens (\EcsParameters' {tags} -> tags) (\s@EcsParameters' {} a -> s {tags = a} :: EcsParameters) Prelude.. Lens.mapping Lens.coerced++-- | The number of tasks to create based on @TaskDefinition@. The default is+-- @1@.+ecsParameters_taskCount :: Lens.Lens' EcsParameters (Prelude.Maybe Prelude.Natural)+ecsParameters_taskCount = Lens.lens (\EcsParameters' {taskCount} -> taskCount) (\s@EcsParameters' {} a -> s {taskCount = a} :: EcsParameters)++-- | The Amazon Resource Name (ARN) of the task definition to use if the+-- event target is an Amazon ECS task.+ecsParameters_taskDefinitionArn :: Lens.Lens' EcsParameters Prelude.Text+ecsParameters_taskDefinitionArn = Lens.lens (\EcsParameters' {taskDefinitionArn} -> taskDefinitionArn) (\s@EcsParameters' {} a -> s {taskDefinitionArn = a} :: EcsParameters)++instance Data.FromJSON EcsParameters where+ parseJSON =+ Data.withObject+ "EcsParameters"+ ( \x ->+ EcsParameters'+ Prelude.<$> ( x+ Data..:? "CapacityProviderStrategy"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..:? "EnableECSManagedTags")+ Prelude.<*> (x Data..:? "EnableExecuteCommand")+ Prelude.<*> (x Data..:? "Group")+ Prelude.<*> (x Data..:? "LaunchType")+ Prelude.<*> (x Data..:? "NetworkConfiguration")+ Prelude.<*> ( x+ Data..:? "PlacementConstraints"+ Data..!= Prelude.mempty+ )+ Prelude.<*> ( x+ Data..:? "PlacementStrategy"+ Data..!= Prelude.mempty+ )+ Prelude.<*> (x Data..:? "PlatformVersion")+ Prelude.<*> (x Data..:? "PropagateTags")+ Prelude.<*> (x Data..:? "ReferenceId")+ Prelude.<*> (x Data..:? "Tags" Data..!= Prelude.mempty)+ Prelude.<*> (x Data..:? "TaskCount")+ Prelude.<*> (x Data..: "TaskDefinitionArn")+ )++instance Prelude.Hashable EcsParameters where+ hashWithSalt _salt EcsParameters' {..} =+ _salt+ `Prelude.hashWithSalt` capacityProviderStrategy+ `Prelude.hashWithSalt` enableECSManagedTags+ `Prelude.hashWithSalt` enableExecuteCommand+ `Prelude.hashWithSalt` group'+ `Prelude.hashWithSalt` launchType+ `Prelude.hashWithSalt` networkConfiguration+ `Prelude.hashWithSalt` placementConstraints+ `Prelude.hashWithSalt` placementStrategy+ `Prelude.hashWithSalt` platformVersion+ `Prelude.hashWithSalt` propagateTags+ `Prelude.hashWithSalt` referenceId+ `Prelude.hashWithSalt` tags+ `Prelude.hashWithSalt` taskCount+ `Prelude.hashWithSalt` taskDefinitionArn++instance Prelude.NFData EcsParameters where+ rnf EcsParameters' {..} =+ Prelude.rnf capacityProviderStrategy+ `Prelude.seq` Prelude.rnf enableECSManagedTags+ `Prelude.seq` Prelude.rnf enableExecuteCommand+ `Prelude.seq` Prelude.rnf group'+ `Prelude.seq` Prelude.rnf launchType+ `Prelude.seq` Prelude.rnf networkConfiguration+ `Prelude.seq` Prelude.rnf placementConstraints+ `Prelude.seq` Prelude.rnf placementStrategy+ `Prelude.seq` Prelude.rnf platformVersion+ `Prelude.seq` Prelude.rnf propagateTags+ `Prelude.seq` Prelude.rnf referenceId+ `Prelude.seq` Prelude.rnf tags+ `Prelude.seq` Prelude.rnf taskCount+ `Prelude.seq` Prelude.rnf taskDefinitionArn++instance Data.ToJSON EcsParameters where+ toJSON EcsParameters' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("CapacityProviderStrategy" Data..=)+ Prelude.<$> capacityProviderStrategy,+ ("EnableECSManagedTags" Data..=)+ Prelude.<$> enableECSManagedTags,+ ("EnableExecuteCommand" Data..=)+ Prelude.<$> enableExecuteCommand,+ ("Group" Data..=) Prelude.<$> group',+ ("LaunchType" Data..=) Prelude.<$> launchType,+ ("NetworkConfiguration" Data..=)+ Prelude.<$> networkConfiguration,+ ("PlacementConstraints" Data..=)+ Prelude.<$> placementConstraints,+ ("PlacementStrategy" Data..=)+ Prelude.<$> placementStrategy,+ ("PlatformVersion" Data..=)+ Prelude.<$> platformVersion,+ ("PropagateTags" Data..=) Prelude.<$> propagateTags,+ ("ReferenceId" Data..=) Prelude.<$> referenceId,+ ("Tags" Data..=) Prelude.<$> tags,+ ("TaskCount" Data..=) Prelude.<$> taskCount,+ Prelude.Just+ ("TaskDefinitionArn" Data..= taskDefinitionArn)+ ]+ )
+ gen/Amazonka/Scheduler/Types/EventBridgeParameters.hs view
@@ -0,0 +1,102 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Scheduler.Types.EventBridgeParameters+-- 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.Scheduler.Types.EventBridgeParameters where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | The templated target type for the EventBridge+-- <https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html PutEvents>+-- API operation.+--+-- /See:/ 'newEventBridgeParameters' smart constructor.+data EventBridgeParameters = EventBridgeParameters'+ { -- | A free-form string, with a maximum of 128 characters, used to decide+ -- what fields to expect in the event detail.+ detailType :: Prelude.Text,+ -- | The source of the event.+ source :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'EventBridgeParameters' with all optional fields 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:+--+-- 'detailType', 'eventBridgeParameters_detailType' - A free-form string, with a maximum of 128 characters, used to decide+-- what fields to expect in the event detail.+--+-- 'source', 'eventBridgeParameters_source' - The source of the event.+newEventBridgeParameters ::+ -- | 'detailType'+ Prelude.Text ->+ -- | 'source'+ Prelude.Text ->+ EventBridgeParameters+newEventBridgeParameters pDetailType_ pSource_ =+ EventBridgeParameters'+ { detailType = pDetailType_,+ source = pSource_+ }++-- | A free-form string, with a maximum of 128 characters, used to decide+-- what fields to expect in the event detail.+eventBridgeParameters_detailType :: Lens.Lens' EventBridgeParameters Prelude.Text+eventBridgeParameters_detailType = Lens.lens (\EventBridgeParameters' {detailType} -> detailType) (\s@EventBridgeParameters' {} a -> s {detailType = a} :: EventBridgeParameters)++-- | The source of the event.+eventBridgeParameters_source :: Lens.Lens' EventBridgeParameters Prelude.Text+eventBridgeParameters_source = Lens.lens (\EventBridgeParameters' {source} -> source) (\s@EventBridgeParameters' {} a -> s {source = a} :: EventBridgeParameters)++instance Data.FromJSON EventBridgeParameters where+ parseJSON =+ Data.withObject+ "EventBridgeParameters"+ ( \x ->+ EventBridgeParameters'+ Prelude.<$> (x Data..: "DetailType")+ Prelude.<*> (x Data..: "Source")+ )++instance Prelude.Hashable EventBridgeParameters where+ hashWithSalt _salt EventBridgeParameters' {..} =+ _salt+ `Prelude.hashWithSalt` detailType+ `Prelude.hashWithSalt` source++instance Prelude.NFData EventBridgeParameters where+ rnf EventBridgeParameters' {..} =+ Prelude.rnf detailType+ `Prelude.seq` Prelude.rnf source++instance Data.ToJSON EventBridgeParameters where+ toJSON EventBridgeParameters' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("DetailType" Data..= detailType),+ Prelude.Just ("Source" Data..= source)+ ]+ )
+ gen/Amazonka/Scheduler/Types/FlexibleTimeWindow.hs view
@@ -0,0 +1,102 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Scheduler.Types.FlexibleTimeWindow+-- 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.Scheduler.Types.FlexibleTimeWindow 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.Scheduler.Types.FlexibleTimeWindowMode++-- | Allows you to configure a time window during which EventBridge Scheduler+-- invokes the schedule.+--+-- /See:/ 'newFlexibleTimeWindow' smart constructor.+data FlexibleTimeWindow = FlexibleTimeWindow'+ { -- | The maximum time window during which a schedule can be invoked.+ maximumWindowInMinutes :: Prelude.Maybe Prelude.Natural,+ -- | Determines whether the schedule is invoked within a flexible time+ -- window.+ mode :: FlexibleTimeWindowMode+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'FlexibleTimeWindow' with all optional fields 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:+--+-- 'maximumWindowInMinutes', 'flexibleTimeWindow_maximumWindowInMinutes' - The maximum time window during which a schedule can be invoked.+--+-- 'mode', 'flexibleTimeWindow_mode' - Determines whether the schedule is invoked within a flexible time+-- window.+newFlexibleTimeWindow ::+ -- | 'mode'+ FlexibleTimeWindowMode ->+ FlexibleTimeWindow+newFlexibleTimeWindow pMode_ =+ FlexibleTimeWindow'+ { maximumWindowInMinutes =+ Prelude.Nothing,+ mode = pMode_+ }++-- | The maximum time window during which a schedule can be invoked.+flexibleTimeWindow_maximumWindowInMinutes :: Lens.Lens' FlexibleTimeWindow (Prelude.Maybe Prelude.Natural)+flexibleTimeWindow_maximumWindowInMinutes = Lens.lens (\FlexibleTimeWindow' {maximumWindowInMinutes} -> maximumWindowInMinutes) (\s@FlexibleTimeWindow' {} a -> s {maximumWindowInMinutes = a} :: FlexibleTimeWindow)++-- | Determines whether the schedule is invoked within a flexible time+-- window.+flexibleTimeWindow_mode :: Lens.Lens' FlexibleTimeWindow FlexibleTimeWindowMode+flexibleTimeWindow_mode = Lens.lens (\FlexibleTimeWindow' {mode} -> mode) (\s@FlexibleTimeWindow' {} a -> s {mode = a} :: FlexibleTimeWindow)++instance Data.FromJSON FlexibleTimeWindow where+ parseJSON =+ Data.withObject+ "FlexibleTimeWindow"+ ( \x ->+ FlexibleTimeWindow'+ Prelude.<$> (x Data..:? "MaximumWindowInMinutes")+ Prelude.<*> (x Data..: "Mode")+ )++instance Prelude.Hashable FlexibleTimeWindow where+ hashWithSalt _salt FlexibleTimeWindow' {..} =+ _salt+ `Prelude.hashWithSalt` maximumWindowInMinutes+ `Prelude.hashWithSalt` mode++instance Prelude.NFData FlexibleTimeWindow where+ rnf FlexibleTimeWindow' {..} =+ Prelude.rnf maximumWindowInMinutes+ `Prelude.seq` Prelude.rnf mode++instance Data.ToJSON FlexibleTimeWindow where+ toJSON FlexibleTimeWindow' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("MaximumWindowInMinutes" Data..=)+ Prelude.<$> maximumWindowInMinutes,+ Prelude.Just ("Mode" Data..= mode)+ ]+ )
+ gen/Amazonka/Scheduler/Types/FlexibleTimeWindowMode.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.Scheduler.Types.FlexibleTimeWindowMode+-- 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.Scheduler.Types.FlexibleTimeWindowMode+ ( FlexibleTimeWindowMode+ ( ..,+ FlexibleTimeWindowMode_FLEXIBLE,+ FlexibleTimeWindowMode_OFF+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype FlexibleTimeWindowMode = FlexibleTimeWindowMode'+ { fromFlexibleTimeWindowMode ::+ 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 FlexibleTimeWindowMode_FLEXIBLE :: FlexibleTimeWindowMode+pattern FlexibleTimeWindowMode_FLEXIBLE = FlexibleTimeWindowMode' "FLEXIBLE"++pattern FlexibleTimeWindowMode_OFF :: FlexibleTimeWindowMode+pattern FlexibleTimeWindowMode_OFF = FlexibleTimeWindowMode' "OFF"++{-# COMPLETE+ FlexibleTimeWindowMode_FLEXIBLE,+ FlexibleTimeWindowMode_OFF,+ FlexibleTimeWindowMode'+ #-}
+ gen/Amazonka/Scheduler/Types/KinesisParameters.hs view
@@ -0,0 +1,88 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Scheduler.Types.KinesisParameters+-- 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.Scheduler.Types.KinesisParameters where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | The templated target type for the Amazon Kinesis+-- <kinesis/latest/APIReference/API_PutRecord.html PutRecord> API+-- operation.+--+-- /See:/ 'newKinesisParameters' smart constructor.+data KinesisParameters = KinesisParameters'+ { -- | Specifies the shard to which EventBridge Scheduler sends the event. For+ -- more information, see+ -- <https://docs.aws.amazon.com/streams/latest/dev/key-concepts.html Amazon Kinesis Data Streams terminology and concepts>+ -- in the /Amazon Kinesis Streams Developer Guide/.+ partitionKey :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'KinesisParameters' with all optional fields 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:+--+-- 'partitionKey', 'kinesisParameters_partitionKey' - Specifies the shard to which EventBridge Scheduler sends the event. For+-- more information, see+-- <https://docs.aws.amazon.com/streams/latest/dev/key-concepts.html Amazon Kinesis Data Streams terminology and concepts>+-- in the /Amazon Kinesis Streams Developer Guide/.+newKinesisParameters ::+ -- | 'partitionKey'+ Prelude.Text ->+ KinesisParameters+newKinesisParameters pPartitionKey_ =+ KinesisParameters' {partitionKey = pPartitionKey_}++-- | Specifies the shard to which EventBridge Scheduler sends the event. For+-- more information, see+-- <https://docs.aws.amazon.com/streams/latest/dev/key-concepts.html Amazon Kinesis Data Streams terminology and concepts>+-- in the /Amazon Kinesis Streams Developer Guide/.+kinesisParameters_partitionKey :: Lens.Lens' KinesisParameters Prelude.Text+kinesisParameters_partitionKey = Lens.lens (\KinesisParameters' {partitionKey} -> partitionKey) (\s@KinesisParameters' {} a -> s {partitionKey = a} :: KinesisParameters)++instance Data.FromJSON KinesisParameters where+ parseJSON =+ Data.withObject+ "KinesisParameters"+ ( \x ->+ KinesisParameters'+ Prelude.<$> (x Data..: "PartitionKey")+ )++instance Prelude.Hashable KinesisParameters where+ hashWithSalt _salt KinesisParameters' {..} =+ _salt `Prelude.hashWithSalt` partitionKey++instance Prelude.NFData KinesisParameters where+ rnf KinesisParameters' {..} = Prelude.rnf partitionKey++instance Data.ToJSON KinesisParameters where+ toJSON KinesisParameters' {..} =+ Data.object+ ( Prelude.catMaybes+ [Prelude.Just ("PartitionKey" Data..= partitionKey)]+ )
+ gen/Amazonka/Scheduler/Types/LaunchType.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.Scheduler.Types.LaunchType+-- 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.Scheduler.Types.LaunchType+ ( LaunchType+ ( ..,+ LaunchType_EC2,+ LaunchType_EXTERNAL,+ LaunchType_FARGATE+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype LaunchType = LaunchType'+ { fromLaunchType ::+ 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 LaunchType_EC2 :: LaunchType+pattern LaunchType_EC2 = LaunchType' "EC2"++pattern LaunchType_EXTERNAL :: LaunchType+pattern LaunchType_EXTERNAL = LaunchType' "EXTERNAL"++pattern LaunchType_FARGATE :: LaunchType+pattern LaunchType_FARGATE = LaunchType' "FARGATE"++{-# COMPLETE+ LaunchType_EC2,+ LaunchType_EXTERNAL,+ LaunchType_FARGATE,+ LaunchType'+ #-}
+ gen/Amazonka/Scheduler/Types/NetworkConfiguration.hs view
@@ -0,0 +1,88 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Scheduler.Types.NetworkConfiguration+-- 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.Scheduler.Types.NetworkConfiguration 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.Scheduler.Types.AwsVpcConfiguration++-- | Specifies the network configuration for an ECS task.+--+-- /See:/ 'newNetworkConfiguration' smart constructor.+data NetworkConfiguration = NetworkConfiguration'+ { -- | Specifies the Amazon VPC subnets and security groups for the task, and+ -- whether a public IP address is to be used. This structure is relevant+ -- only for ECS tasks that use the awsvpc network mode.+ awsvpcConfiguration :: Prelude.Maybe AwsVpcConfiguration+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'NetworkConfiguration' with all optional fields 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:+--+-- 'awsvpcConfiguration', 'networkConfiguration_awsvpcConfiguration' - Specifies the Amazon VPC subnets and security groups for the task, and+-- whether a public IP address is to be used. This structure is relevant+-- only for ECS tasks that use the awsvpc network mode.+newNetworkConfiguration ::+ NetworkConfiguration+newNetworkConfiguration =+ NetworkConfiguration'+ { awsvpcConfiguration =+ Prelude.Nothing+ }++-- | Specifies the Amazon VPC subnets and security groups for the task, and+-- whether a public IP address is to be used. This structure is relevant+-- only for ECS tasks that use the awsvpc network mode.+networkConfiguration_awsvpcConfiguration :: Lens.Lens' NetworkConfiguration (Prelude.Maybe AwsVpcConfiguration)+networkConfiguration_awsvpcConfiguration = Lens.lens (\NetworkConfiguration' {awsvpcConfiguration} -> awsvpcConfiguration) (\s@NetworkConfiguration' {} a -> s {awsvpcConfiguration = a} :: NetworkConfiguration)++instance Data.FromJSON NetworkConfiguration where+ parseJSON =+ Data.withObject+ "NetworkConfiguration"+ ( \x ->+ NetworkConfiguration'+ Prelude.<$> (x Data..:? "awsvpcConfiguration")+ )++instance Prelude.Hashable NetworkConfiguration where+ hashWithSalt _salt NetworkConfiguration' {..} =+ _salt `Prelude.hashWithSalt` awsvpcConfiguration++instance Prelude.NFData NetworkConfiguration where+ rnf NetworkConfiguration' {..} =+ Prelude.rnf awsvpcConfiguration++instance Data.ToJSON NetworkConfiguration where+ toJSON NetworkConfiguration' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("awsvpcConfiguration" Data..=)+ Prelude.<$> awsvpcConfiguration+ ]+ )
+ gen/Amazonka/Scheduler/Types/PlacementConstraint.hs view
@@ -0,0 +1,112 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Scheduler.Types.PlacementConstraint+-- 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.Scheduler.Types.PlacementConstraint 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.Scheduler.Types.PlacementConstraintType++-- | An object representing a constraint on task placement.+--+-- /See:/ 'newPlacementConstraint' smart constructor.+data PlacementConstraint = PlacementConstraint'+ { -- | A cluster query language expression to apply to the constraint. You+ -- cannot specify an expression if the constraint type is+ -- @distinctInstance@. For more information, see+ -- <https://docs.aws.amazon.com/latest/developerguide/cluster-query-language.html Cluster query language>+ -- in the /Amazon ECS Developer Guide/.+ expression :: Prelude.Maybe Prelude.Text,+ -- | The type of constraint. Use @distinctInstance@ to ensure that each task+ -- in a particular group is running on a different container instance. Use+ -- @memberOf@ to restrict the selection to a group of valid candidates.+ type' :: Prelude.Maybe PlacementConstraintType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PlacementConstraint' with all optional fields 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:+--+-- 'expression', 'placementConstraint_expression' - A cluster query language expression to apply to the constraint. You+-- cannot specify an expression if the constraint type is+-- @distinctInstance@. For more information, see+-- <https://docs.aws.amazon.com/latest/developerguide/cluster-query-language.html Cluster query language>+-- in the /Amazon ECS Developer Guide/.+--+-- 'type'', 'placementConstraint_type' - The type of constraint. Use @distinctInstance@ to ensure that each task+-- in a particular group is running on a different container instance. Use+-- @memberOf@ to restrict the selection to a group of valid candidates.+newPlacementConstraint ::+ PlacementConstraint+newPlacementConstraint =+ PlacementConstraint'+ { expression = Prelude.Nothing,+ type' = Prelude.Nothing+ }++-- | A cluster query language expression to apply to the constraint. You+-- cannot specify an expression if the constraint type is+-- @distinctInstance@. For more information, see+-- <https://docs.aws.amazon.com/latest/developerguide/cluster-query-language.html Cluster query language>+-- in the /Amazon ECS Developer Guide/.+placementConstraint_expression :: Lens.Lens' PlacementConstraint (Prelude.Maybe Prelude.Text)+placementConstraint_expression = Lens.lens (\PlacementConstraint' {expression} -> expression) (\s@PlacementConstraint' {} a -> s {expression = a} :: PlacementConstraint)++-- | The type of constraint. Use @distinctInstance@ to ensure that each task+-- in a particular group is running on a different container instance. Use+-- @memberOf@ to restrict the selection to a group of valid candidates.+placementConstraint_type :: Lens.Lens' PlacementConstraint (Prelude.Maybe PlacementConstraintType)+placementConstraint_type = Lens.lens (\PlacementConstraint' {type'} -> type') (\s@PlacementConstraint' {} a -> s {type' = a} :: PlacementConstraint)++instance Data.FromJSON PlacementConstraint where+ parseJSON =+ Data.withObject+ "PlacementConstraint"+ ( \x ->+ PlacementConstraint'+ Prelude.<$> (x Data..:? "expression")+ Prelude.<*> (x Data..:? "type")+ )++instance Prelude.Hashable PlacementConstraint where+ hashWithSalt _salt PlacementConstraint' {..} =+ _salt+ `Prelude.hashWithSalt` expression+ `Prelude.hashWithSalt` type'++instance Prelude.NFData PlacementConstraint where+ rnf PlacementConstraint' {..} =+ Prelude.rnf expression+ `Prelude.seq` Prelude.rnf type'++instance Data.ToJSON PlacementConstraint where+ toJSON PlacementConstraint' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("expression" Data..=) Prelude.<$> expression,+ ("type" Data..=) Prelude.<$> type'+ ]+ )
+ gen/Amazonka/Scheduler/Types/PlacementConstraintType.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.Scheduler.Types.PlacementConstraintType+-- 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.Scheduler.Types.PlacementConstraintType+ ( PlacementConstraintType+ ( ..,+ PlacementConstraintType_DistinctInstance,+ PlacementConstraintType_MemberOf+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype PlacementConstraintType = PlacementConstraintType'+ { fromPlacementConstraintType ::+ 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 PlacementConstraintType_DistinctInstance :: PlacementConstraintType+pattern PlacementConstraintType_DistinctInstance = PlacementConstraintType' "distinctInstance"++pattern PlacementConstraintType_MemberOf :: PlacementConstraintType+pattern PlacementConstraintType_MemberOf = PlacementConstraintType' "memberOf"++{-# COMPLETE+ PlacementConstraintType_DistinctInstance,+ PlacementConstraintType_MemberOf,+ PlacementConstraintType'+ #-}
+ gen/Amazonka/Scheduler/Types/PlacementStrategy.hs view
@@ -0,0 +1,132 @@+{-# 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.Scheduler.Types.PlacementStrategy+-- 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.Scheduler.Types.PlacementStrategy 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.Scheduler.Types.PlacementStrategyType++-- | The task placement strategy for a task or service.+--+-- /See:/ 'newPlacementStrategy' smart constructor.+data PlacementStrategy = PlacementStrategy'+ { -- | The field to apply the placement strategy against. For the spread+ -- placement strategy, valid values are @instanceId@ (or @instanceId@,+ -- which has the same effect), or any platform or custom attribute that is+ -- applied to a container instance, such as+ -- @attribute:ecs.availability-zone@. For the binpack placement strategy,+ -- valid values are @cpu@ and @memory@. For the random placement strategy,+ -- this field is not used.+ field :: Prelude.Maybe Prelude.Text,+ -- | The type of placement strategy. The random placement strategy randomly+ -- places tasks on available candidates. The spread placement strategy+ -- spreads placement across available candidates evenly based on the field+ -- parameter. The binpack strategy places tasks on available candidates+ -- that have the least available amount of the resource that is specified+ -- with the field parameter. For example, if you binpack on memory, a task+ -- is placed on the instance with the least amount of remaining memory (but+ -- still enough to run the task).+ type' :: Prelude.Maybe PlacementStrategyType+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'PlacementStrategy' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'field', 'placementStrategy_field' - The field to apply the placement strategy against. For the spread+-- placement strategy, valid values are @instanceId@ (or @instanceId@,+-- which has the same effect), or any platform or custom attribute that is+-- applied to a container instance, such as+-- @attribute:ecs.availability-zone@. For the binpack placement strategy,+-- valid values are @cpu@ and @memory@. For the random placement strategy,+-- this field is not used.+--+-- 'type'', 'placementStrategy_type' - The type of placement strategy. The random placement strategy randomly+-- places tasks on available candidates. The spread placement strategy+-- spreads placement across available candidates evenly based on the field+-- parameter. The binpack strategy places tasks on available candidates+-- that have the least available amount of the resource that is specified+-- with the field parameter. For example, if you binpack on memory, a task+-- is placed on the instance with the least amount of remaining memory (but+-- still enough to run the task).+newPlacementStrategy ::+ PlacementStrategy+newPlacementStrategy =+ PlacementStrategy'+ { field = Prelude.Nothing,+ type' = Prelude.Nothing+ }++-- | The field to apply the placement strategy against. For the spread+-- placement strategy, valid values are @instanceId@ (or @instanceId@,+-- which has the same effect), or any platform or custom attribute that is+-- applied to a container instance, such as+-- @attribute:ecs.availability-zone@. For the binpack placement strategy,+-- valid values are @cpu@ and @memory@. For the random placement strategy,+-- this field is not used.+placementStrategy_field :: Lens.Lens' PlacementStrategy (Prelude.Maybe Prelude.Text)+placementStrategy_field = Lens.lens (\PlacementStrategy' {field} -> field) (\s@PlacementStrategy' {} a -> s {field = a} :: PlacementStrategy)++-- | The type of placement strategy. The random placement strategy randomly+-- places tasks on available candidates. The spread placement strategy+-- spreads placement across available candidates evenly based on the field+-- parameter. The binpack strategy places tasks on available candidates+-- that have the least available amount of the resource that is specified+-- with the field parameter. For example, if you binpack on memory, a task+-- is placed on the instance with the least amount of remaining memory (but+-- still enough to run the task).+placementStrategy_type :: Lens.Lens' PlacementStrategy (Prelude.Maybe PlacementStrategyType)+placementStrategy_type = Lens.lens (\PlacementStrategy' {type'} -> type') (\s@PlacementStrategy' {} a -> s {type' = a} :: PlacementStrategy)++instance Data.FromJSON PlacementStrategy where+ parseJSON =+ Data.withObject+ "PlacementStrategy"+ ( \x ->+ PlacementStrategy'+ Prelude.<$> (x Data..:? "field")+ Prelude.<*> (x Data..:? "type")+ )++instance Prelude.Hashable PlacementStrategy where+ hashWithSalt _salt PlacementStrategy' {..} =+ _salt+ `Prelude.hashWithSalt` field+ `Prelude.hashWithSalt` type'++instance Prelude.NFData PlacementStrategy where+ rnf PlacementStrategy' {..} =+ Prelude.rnf field `Prelude.seq` Prelude.rnf type'++instance Data.ToJSON PlacementStrategy where+ toJSON PlacementStrategy' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("field" Data..=) Prelude.<$> field,+ ("type" Data..=) Prelude.<$> type'+ ]+ )
+ gen/Amazonka/Scheduler/Types/PlacementStrategyType.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.Scheduler.Types.PlacementStrategyType+-- 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.Scheduler.Types.PlacementStrategyType+ ( PlacementStrategyType+ ( ..,+ PlacementStrategyType_Binpack,+ PlacementStrategyType_Random,+ PlacementStrategyType_Spread+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype PlacementStrategyType = PlacementStrategyType'+ { fromPlacementStrategyType ::+ 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 PlacementStrategyType_Binpack :: PlacementStrategyType+pattern PlacementStrategyType_Binpack = PlacementStrategyType' "binpack"++pattern PlacementStrategyType_Random :: PlacementStrategyType+pattern PlacementStrategyType_Random = PlacementStrategyType' "random"++pattern PlacementStrategyType_Spread :: PlacementStrategyType+pattern PlacementStrategyType_Spread = PlacementStrategyType' "spread"++{-# COMPLETE+ PlacementStrategyType_Binpack,+ PlacementStrategyType_Random,+ PlacementStrategyType_Spread,+ PlacementStrategyType'+ #-}
+ gen/Amazonka/Scheduler/Types/PropagateTags.hs view
@@ -0,0 +1,66 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Scheduler.Types.PropagateTags+-- 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.Scheduler.Types.PropagateTags+ ( PropagateTags+ ( ..,+ PropagateTags_TASK_DEFINITION+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype PropagateTags = PropagateTags'+ { fromPropagateTags ::+ 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 PropagateTags_TASK_DEFINITION :: PropagateTags+pattern PropagateTags_TASK_DEFINITION = PropagateTags' "TASK_DEFINITION"++{-# COMPLETE+ PropagateTags_TASK_DEFINITION,+ PropagateTags'+ #-}
+ gen/Amazonka/Scheduler/Types/RetryPolicy.hs view
@@ -0,0 +1,111 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Scheduler.Types.RetryPolicy+-- 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.Scheduler.Types.RetryPolicy 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 @RetryPolicy@ object that includes information about the retry policy+-- settings, including the maximum age of an event, and the maximum number+-- of times EventBridge Scheduler will try to deliver the event to a+-- target.+--+-- /See:/ 'newRetryPolicy' smart constructor.+data RetryPolicy = RetryPolicy'+ { -- | The maximum amount of time, in seconds, to continue to make retry+ -- attempts.+ maximumEventAgeInSeconds :: Prelude.Maybe Prelude.Natural,+ -- | The maximum number of retry attempts to make before the request fails.+ -- Retry attempts with exponential backoff continue until either the+ -- maximum number of attempts is made or until the duration of the+ -- @MaximumEventAgeInSeconds@ is reached.+ maximumRetryAttempts :: Prelude.Maybe Prelude.Natural+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'RetryPolicy' with all optional fields 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:+--+-- 'maximumEventAgeInSeconds', 'retryPolicy_maximumEventAgeInSeconds' - The maximum amount of time, in seconds, to continue to make retry+-- attempts.+--+-- 'maximumRetryAttempts', 'retryPolicy_maximumRetryAttempts' - The maximum number of retry attempts to make before the request fails.+-- Retry attempts with exponential backoff continue until either the+-- maximum number of attempts is made or until the duration of the+-- @MaximumEventAgeInSeconds@ is reached.+newRetryPolicy ::+ RetryPolicy+newRetryPolicy =+ RetryPolicy'+ { maximumEventAgeInSeconds =+ Prelude.Nothing,+ maximumRetryAttempts = Prelude.Nothing+ }++-- | The maximum amount of time, in seconds, to continue to make retry+-- attempts.+retryPolicy_maximumEventAgeInSeconds :: Lens.Lens' RetryPolicy (Prelude.Maybe Prelude.Natural)+retryPolicy_maximumEventAgeInSeconds = Lens.lens (\RetryPolicy' {maximumEventAgeInSeconds} -> maximumEventAgeInSeconds) (\s@RetryPolicy' {} a -> s {maximumEventAgeInSeconds = a} :: RetryPolicy)++-- | The maximum number of retry attempts to make before the request fails.+-- Retry attempts with exponential backoff continue until either the+-- maximum number of attempts is made or until the duration of the+-- @MaximumEventAgeInSeconds@ is reached.+retryPolicy_maximumRetryAttempts :: Lens.Lens' RetryPolicy (Prelude.Maybe Prelude.Natural)+retryPolicy_maximumRetryAttempts = Lens.lens (\RetryPolicy' {maximumRetryAttempts} -> maximumRetryAttempts) (\s@RetryPolicy' {} a -> s {maximumRetryAttempts = a} :: RetryPolicy)++instance Data.FromJSON RetryPolicy where+ parseJSON =+ Data.withObject+ "RetryPolicy"+ ( \x ->+ RetryPolicy'+ Prelude.<$> (x Data..:? "MaximumEventAgeInSeconds")+ Prelude.<*> (x Data..:? "MaximumRetryAttempts")+ )++instance Prelude.Hashable RetryPolicy where+ hashWithSalt _salt RetryPolicy' {..} =+ _salt+ `Prelude.hashWithSalt` maximumEventAgeInSeconds+ `Prelude.hashWithSalt` maximumRetryAttempts++instance Prelude.NFData RetryPolicy where+ rnf RetryPolicy' {..} =+ Prelude.rnf maximumEventAgeInSeconds+ `Prelude.seq` Prelude.rnf maximumRetryAttempts++instance Data.ToJSON RetryPolicy where+ toJSON RetryPolicy' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("MaximumEventAgeInSeconds" Data..=)+ Prelude.<$> maximumEventAgeInSeconds,+ ("MaximumRetryAttempts" Data..=)+ Prelude.<$> maximumRetryAttempts+ ]+ )
+ gen/Amazonka/Scheduler/Types/SageMakerPipelineParameter.hs view
@@ -0,0 +1,103 @@+{-# 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.Scheduler.Types.SageMakerPipelineParameter+-- 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.Scheduler.Types.SageMakerPipelineParameter where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | The name and value pair of a parameter to use to start execution of a+-- SageMaker Model Building Pipeline.+--+-- /See:/ 'newSageMakerPipelineParameter' smart constructor.+data SageMakerPipelineParameter = SageMakerPipelineParameter'+ { -- | Name of parameter to start execution of a SageMaker Model Building+ -- Pipeline.+ name :: Prelude.Text,+ -- | Value of parameter to start execution of a SageMaker Model Building+ -- Pipeline.+ value :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SageMakerPipelineParameter' with all optional fields 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', 'sageMakerPipelineParameter_name' - Name of parameter to start execution of a SageMaker Model Building+-- Pipeline.+--+-- 'value', 'sageMakerPipelineParameter_value' - Value of parameter to start execution of a SageMaker Model Building+-- Pipeline.+newSageMakerPipelineParameter ::+ -- | 'name'+ Prelude.Text ->+ -- | 'value'+ Prelude.Text ->+ SageMakerPipelineParameter+newSageMakerPipelineParameter pName_ pValue_ =+ SageMakerPipelineParameter'+ { name = pName_,+ value = pValue_+ }++-- | Name of parameter to start execution of a SageMaker Model Building+-- Pipeline.+sageMakerPipelineParameter_name :: Lens.Lens' SageMakerPipelineParameter Prelude.Text+sageMakerPipelineParameter_name = Lens.lens (\SageMakerPipelineParameter' {name} -> name) (\s@SageMakerPipelineParameter' {} a -> s {name = a} :: SageMakerPipelineParameter)++-- | Value of parameter to start execution of a SageMaker Model Building+-- Pipeline.+sageMakerPipelineParameter_value :: Lens.Lens' SageMakerPipelineParameter Prelude.Text+sageMakerPipelineParameter_value = Lens.lens (\SageMakerPipelineParameter' {value} -> value) (\s@SageMakerPipelineParameter' {} a -> s {value = a} :: SageMakerPipelineParameter)++instance Data.FromJSON SageMakerPipelineParameter where+ parseJSON =+ Data.withObject+ "SageMakerPipelineParameter"+ ( \x ->+ SageMakerPipelineParameter'+ Prelude.<$> (x Data..: "Name")+ Prelude.<*> (x Data..: "Value")+ )++instance Prelude.Hashable SageMakerPipelineParameter where+ hashWithSalt _salt SageMakerPipelineParameter' {..} =+ _salt+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` value++instance Prelude.NFData SageMakerPipelineParameter where+ rnf SageMakerPipelineParameter' {..} =+ Prelude.rnf name `Prelude.seq` Prelude.rnf value++instance Data.ToJSON SageMakerPipelineParameter where+ toJSON SageMakerPipelineParameter' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("Name" Data..= name),+ Prelude.Just ("Value" Data..= value)+ ]+ )
+ gen/Amazonka/Scheduler/Types/SageMakerPipelineParameters.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.Scheduler.Types.SageMakerPipelineParameters+-- 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.Scheduler.Types.SageMakerPipelineParameters 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.Scheduler.Types.SageMakerPipelineParameter++-- | The templated target type for the Amazon SageMaker+-- <https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StartPipelineExecution.html StartPipelineExecution>+-- API operation.+--+-- /See:/ 'newSageMakerPipelineParameters' smart constructor.+data SageMakerPipelineParameters = SageMakerPipelineParameters'+ { -- | List of parameter names and values to use when executing the SageMaker+ -- Model Building Pipeline.+ pipelineParameterList :: Prelude.Maybe [SageMakerPipelineParameter]+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SageMakerPipelineParameters' with all optional fields 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:+--+-- 'pipelineParameterList', 'sageMakerPipelineParameters_pipelineParameterList' - List of parameter names and values to use when executing the SageMaker+-- Model Building Pipeline.+newSageMakerPipelineParameters ::+ SageMakerPipelineParameters+newSageMakerPipelineParameters =+ SageMakerPipelineParameters'+ { pipelineParameterList =+ Prelude.Nothing+ }++-- | List of parameter names and values to use when executing the SageMaker+-- Model Building Pipeline.+sageMakerPipelineParameters_pipelineParameterList :: Lens.Lens' SageMakerPipelineParameters (Prelude.Maybe [SageMakerPipelineParameter])+sageMakerPipelineParameters_pipelineParameterList = Lens.lens (\SageMakerPipelineParameters' {pipelineParameterList} -> pipelineParameterList) (\s@SageMakerPipelineParameters' {} a -> s {pipelineParameterList = a} :: SageMakerPipelineParameters) Prelude.. Lens.mapping Lens.coerced++instance Data.FromJSON SageMakerPipelineParameters where+ parseJSON =+ Data.withObject+ "SageMakerPipelineParameters"+ ( \x ->+ SageMakerPipelineParameters'+ Prelude.<$> ( x+ Data..:? "PipelineParameterList"+ Data..!= Prelude.mempty+ )+ )++instance Prelude.Hashable SageMakerPipelineParameters where+ hashWithSalt _salt SageMakerPipelineParameters' {..} =+ _salt `Prelude.hashWithSalt` pipelineParameterList++instance Prelude.NFData SageMakerPipelineParameters where+ rnf SageMakerPipelineParameters' {..} =+ Prelude.rnf pipelineParameterList++instance Data.ToJSON SageMakerPipelineParameters where+ toJSON SageMakerPipelineParameters' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("PipelineParameterList" Data..=)+ Prelude.<$> pipelineParameterList+ ]+ )
+ gen/Amazonka/Scheduler/Types/ScheduleGroupState.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.Scheduler.Types.ScheduleGroupState+-- 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.Scheduler.Types.ScheduleGroupState+ ( ScheduleGroupState+ ( ..,+ ScheduleGroupState_ACTIVE,+ ScheduleGroupState_DELETING+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ScheduleGroupState = ScheduleGroupState'+ { fromScheduleGroupState ::+ 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 ScheduleGroupState_ACTIVE :: ScheduleGroupState+pattern ScheduleGroupState_ACTIVE = ScheduleGroupState' "ACTIVE"++pattern ScheduleGroupState_DELETING :: ScheduleGroupState+pattern ScheduleGroupState_DELETING = ScheduleGroupState' "DELETING"++{-# COMPLETE+ ScheduleGroupState_ACTIVE,+ ScheduleGroupState_DELETING,+ ScheduleGroupState'+ #-}
+ gen/Amazonka/Scheduler/Types/ScheduleGroupSummary.hs view
@@ -0,0 +1,121 @@+{-# 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.Scheduler.Types.ScheduleGroupSummary+-- 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.Scheduler.Types.ScheduleGroupSummary 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.Scheduler.Types.ScheduleGroupState++-- | The details of a schedule group.+--+-- /See:/ 'newScheduleGroupSummary' smart constructor.+data ScheduleGroupSummary = ScheduleGroupSummary'+ { -- | The Amazon Resource Name (ARN) of the schedule group.+ arn :: Prelude.Maybe Prelude.Text,+ -- | The time at which the schedule group was created.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | The time at which the schedule group was last modified.+ lastModificationDate :: Prelude.Maybe Data.POSIX,+ -- | The name of the schedule group.+ name :: Prelude.Maybe Prelude.Text,+ -- | Specifies the state of the schedule group.+ state :: Prelude.Maybe ScheduleGroupState+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ScheduleGroupSummary' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'scheduleGroupSummary_arn' - The Amazon Resource Name (ARN) of the schedule group.+--+-- 'creationDate', 'scheduleGroupSummary_creationDate' - The time at which the schedule group was created.+--+-- 'lastModificationDate', 'scheduleGroupSummary_lastModificationDate' - The time at which the schedule group was last modified.+--+-- 'name', 'scheduleGroupSummary_name' - The name of the schedule group.+--+-- 'state', 'scheduleGroupSummary_state' - Specifies the state of the schedule group.+newScheduleGroupSummary ::+ ScheduleGroupSummary+newScheduleGroupSummary =+ ScheduleGroupSummary'+ { arn = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ lastModificationDate = Prelude.Nothing,+ name = Prelude.Nothing,+ state = Prelude.Nothing+ }++-- | The Amazon Resource Name (ARN) of the schedule group.+scheduleGroupSummary_arn :: Lens.Lens' ScheduleGroupSummary (Prelude.Maybe Prelude.Text)+scheduleGroupSummary_arn = Lens.lens (\ScheduleGroupSummary' {arn} -> arn) (\s@ScheduleGroupSummary' {} a -> s {arn = a} :: ScheduleGroupSummary)++-- | The time at which the schedule group was created.+scheduleGroupSummary_creationDate :: Lens.Lens' ScheduleGroupSummary (Prelude.Maybe Prelude.UTCTime)+scheduleGroupSummary_creationDate = Lens.lens (\ScheduleGroupSummary' {creationDate} -> creationDate) (\s@ScheduleGroupSummary' {} a -> s {creationDate = a} :: ScheduleGroupSummary) Prelude.. Lens.mapping Data._Time++-- | The time at which the schedule group was last modified.+scheduleGroupSummary_lastModificationDate :: Lens.Lens' ScheduleGroupSummary (Prelude.Maybe Prelude.UTCTime)+scheduleGroupSummary_lastModificationDate = Lens.lens (\ScheduleGroupSummary' {lastModificationDate} -> lastModificationDate) (\s@ScheduleGroupSummary' {} a -> s {lastModificationDate = a} :: ScheduleGroupSummary) Prelude.. Lens.mapping Data._Time++-- | The name of the schedule group.+scheduleGroupSummary_name :: Lens.Lens' ScheduleGroupSummary (Prelude.Maybe Prelude.Text)+scheduleGroupSummary_name = Lens.lens (\ScheduleGroupSummary' {name} -> name) (\s@ScheduleGroupSummary' {} a -> s {name = a} :: ScheduleGroupSummary)++-- | Specifies the state of the schedule group.+scheduleGroupSummary_state :: Lens.Lens' ScheduleGroupSummary (Prelude.Maybe ScheduleGroupState)+scheduleGroupSummary_state = Lens.lens (\ScheduleGroupSummary' {state} -> state) (\s@ScheduleGroupSummary' {} a -> s {state = a} :: ScheduleGroupSummary)++instance Data.FromJSON ScheduleGroupSummary where+ parseJSON =+ Data.withObject+ "ScheduleGroupSummary"+ ( \x ->+ ScheduleGroupSummary'+ Prelude.<$> (x Data..:? "Arn")+ Prelude.<*> (x Data..:? "CreationDate")+ Prelude.<*> (x Data..:? "LastModificationDate")+ Prelude.<*> (x Data..:? "Name")+ Prelude.<*> (x Data..:? "State")+ )++instance Prelude.Hashable ScheduleGroupSummary where+ hashWithSalt _salt ScheduleGroupSummary' {..} =+ _salt+ `Prelude.hashWithSalt` arn+ `Prelude.hashWithSalt` creationDate+ `Prelude.hashWithSalt` lastModificationDate+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` state++instance Prelude.NFData ScheduleGroupSummary where+ rnf ScheduleGroupSummary' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf lastModificationDate+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf state
+ gen/Amazonka/Scheduler/Types/ScheduleState.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.Scheduler.Types.ScheduleState+-- 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.Scheduler.Types.ScheduleState+ ( ScheduleState+ ( ..,+ ScheduleState_DISABLED,+ ScheduleState_ENABLED+ ),+ )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++newtype ScheduleState = ScheduleState'+ { fromScheduleState ::+ 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 ScheduleState_DISABLED :: ScheduleState+pattern ScheduleState_DISABLED = ScheduleState' "DISABLED"++pattern ScheduleState_ENABLED :: ScheduleState+pattern ScheduleState_ENABLED = ScheduleState' "ENABLED"++{-# COMPLETE+ ScheduleState_DISABLED,+ ScheduleState_ENABLED,+ ScheduleState'+ #-}
+ gen/Amazonka/Scheduler/Types/ScheduleSummary.hs view
@@ -0,0 +1,146 @@+{-# 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.Scheduler.Types.ScheduleSummary+-- 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.Scheduler.Types.ScheduleSummary 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.Scheduler.Types.ScheduleState+import Amazonka.Scheduler.Types.TargetSummary++-- | The details of a schedule.+--+-- /See:/ 'newScheduleSummary' smart constructor.+data ScheduleSummary = ScheduleSummary'+ { -- | The Amazon Resource Name (ARN) of the schedule.+ arn :: Prelude.Maybe Prelude.Text,+ -- | The time at which the schedule was created.+ creationDate :: Prelude.Maybe Data.POSIX,+ -- | The name of the schedule group associated with this schedule.+ groupName :: Prelude.Maybe Prelude.Text,+ -- | The time at which the schedule was last modified.+ lastModificationDate :: Prelude.Maybe Data.POSIX,+ -- | The name of the schedule.+ name :: Prelude.Maybe Prelude.Text,+ -- | Specifies whether the schedule is enabled or disabled.+ state :: Prelude.Maybe ScheduleState,+ -- | The schedule\'s target details.+ target :: Prelude.Maybe TargetSummary+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'ScheduleSummary' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'scheduleSummary_arn' - The Amazon Resource Name (ARN) of the schedule.+--+-- 'creationDate', 'scheduleSummary_creationDate' - The time at which the schedule was created.+--+-- 'groupName', 'scheduleSummary_groupName' - The name of the schedule group associated with this schedule.+--+-- 'lastModificationDate', 'scheduleSummary_lastModificationDate' - The time at which the schedule was last modified.+--+-- 'name', 'scheduleSummary_name' - The name of the schedule.+--+-- 'state', 'scheduleSummary_state' - Specifies whether the schedule is enabled or disabled.+--+-- 'target', 'scheduleSummary_target' - The schedule\'s target details.+newScheduleSummary ::+ ScheduleSummary+newScheduleSummary =+ ScheduleSummary'+ { arn = Prelude.Nothing,+ creationDate = Prelude.Nothing,+ groupName = Prelude.Nothing,+ lastModificationDate = Prelude.Nothing,+ name = Prelude.Nothing,+ state = Prelude.Nothing,+ target = Prelude.Nothing+ }++-- | The Amazon Resource Name (ARN) of the schedule.+scheduleSummary_arn :: Lens.Lens' ScheduleSummary (Prelude.Maybe Prelude.Text)+scheduleSummary_arn = Lens.lens (\ScheduleSummary' {arn} -> arn) (\s@ScheduleSummary' {} a -> s {arn = a} :: ScheduleSummary)++-- | The time at which the schedule was created.+scheduleSummary_creationDate :: Lens.Lens' ScheduleSummary (Prelude.Maybe Prelude.UTCTime)+scheduleSummary_creationDate = Lens.lens (\ScheduleSummary' {creationDate} -> creationDate) (\s@ScheduleSummary' {} a -> s {creationDate = a} :: ScheduleSummary) Prelude.. Lens.mapping Data._Time++-- | The name of the schedule group associated with this schedule.+scheduleSummary_groupName :: Lens.Lens' ScheduleSummary (Prelude.Maybe Prelude.Text)+scheduleSummary_groupName = Lens.lens (\ScheduleSummary' {groupName} -> groupName) (\s@ScheduleSummary' {} a -> s {groupName = a} :: ScheduleSummary)++-- | The time at which the schedule was last modified.+scheduleSummary_lastModificationDate :: Lens.Lens' ScheduleSummary (Prelude.Maybe Prelude.UTCTime)+scheduleSummary_lastModificationDate = Lens.lens (\ScheduleSummary' {lastModificationDate} -> lastModificationDate) (\s@ScheduleSummary' {} a -> s {lastModificationDate = a} :: ScheduleSummary) Prelude.. Lens.mapping Data._Time++-- | The name of the schedule.+scheduleSummary_name :: Lens.Lens' ScheduleSummary (Prelude.Maybe Prelude.Text)+scheduleSummary_name = Lens.lens (\ScheduleSummary' {name} -> name) (\s@ScheduleSummary' {} a -> s {name = a} :: ScheduleSummary)++-- | Specifies whether the schedule is enabled or disabled.+scheduleSummary_state :: Lens.Lens' ScheduleSummary (Prelude.Maybe ScheduleState)+scheduleSummary_state = Lens.lens (\ScheduleSummary' {state} -> state) (\s@ScheduleSummary' {} a -> s {state = a} :: ScheduleSummary)++-- | The schedule\'s target details.+scheduleSummary_target :: Lens.Lens' ScheduleSummary (Prelude.Maybe TargetSummary)+scheduleSummary_target = Lens.lens (\ScheduleSummary' {target} -> target) (\s@ScheduleSummary' {} a -> s {target = a} :: ScheduleSummary)++instance Data.FromJSON ScheduleSummary where+ parseJSON =+ Data.withObject+ "ScheduleSummary"+ ( \x ->+ ScheduleSummary'+ Prelude.<$> (x Data..:? "Arn")+ Prelude.<*> (x Data..:? "CreationDate")+ Prelude.<*> (x Data..:? "GroupName")+ Prelude.<*> (x Data..:? "LastModificationDate")+ Prelude.<*> (x Data..:? "Name")+ Prelude.<*> (x Data..:? "State")+ Prelude.<*> (x Data..:? "Target")+ )++instance Prelude.Hashable ScheduleSummary where+ hashWithSalt _salt ScheduleSummary' {..} =+ _salt+ `Prelude.hashWithSalt` arn+ `Prelude.hashWithSalt` creationDate+ `Prelude.hashWithSalt` groupName+ `Prelude.hashWithSalt` lastModificationDate+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` state+ `Prelude.hashWithSalt` target++instance Prelude.NFData ScheduleSummary where+ rnf ScheduleSummary' {..} =+ Prelude.rnf arn+ `Prelude.seq` Prelude.rnf creationDate+ `Prelude.seq` Prelude.rnf groupName+ `Prelude.seq` Prelude.rnf lastModificationDate+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf state+ `Prelude.seq` Prelude.rnf target
+ gen/Amazonka/Scheduler/Types/SqsParameters.hs view
@@ -0,0 +1,84 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Scheduler.Types.SqsParameters+-- 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.Scheduler.Types.SqsParameters where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | The templated target type for the Amazon SQS+-- <https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html SendMessage>+-- API operation. Contains the message group ID to use when the target is a+-- FIFO queue. If you specify an Amazon SQS FIFO queue as a target, the+-- queue must have content-based deduplication enabled. For more+-- information, see+-- <https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagededuplicationid-property.html Using the Amazon SQS message deduplication ID>+-- in the /Amazon SQS Developer Guide/.+--+-- /See:/ 'newSqsParameters' smart constructor.+data SqsParameters = SqsParameters'+ { -- | The FIFO message group ID to use as the target.+ messageGroupId :: Prelude.Maybe Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'SqsParameters' with all optional fields 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:+--+-- 'messageGroupId', 'sqsParameters_messageGroupId' - The FIFO message group ID to use as the target.+newSqsParameters ::+ SqsParameters+newSqsParameters =+ SqsParameters' {messageGroupId = Prelude.Nothing}++-- | The FIFO message group ID to use as the target.+sqsParameters_messageGroupId :: Lens.Lens' SqsParameters (Prelude.Maybe Prelude.Text)+sqsParameters_messageGroupId = Lens.lens (\SqsParameters' {messageGroupId} -> messageGroupId) (\s@SqsParameters' {} a -> s {messageGroupId = a} :: SqsParameters)++instance Data.FromJSON SqsParameters where+ parseJSON =+ Data.withObject+ "SqsParameters"+ ( \x ->+ SqsParameters'+ Prelude.<$> (x Data..:? "MessageGroupId")+ )++instance Prelude.Hashable SqsParameters where+ hashWithSalt _salt SqsParameters' {..} =+ _salt `Prelude.hashWithSalt` messageGroupId++instance Prelude.NFData SqsParameters where+ rnf SqsParameters' {..} = Prelude.rnf messageGroupId++instance Data.ToJSON SqsParameters where+ toJSON SqsParameters' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("MessageGroupId" Data..=)+ Prelude.<$> messageGroupId+ ]+ )
+ gen/Amazonka/Scheduler/Types/Tag.hs view
@@ -0,0 +1,93 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Amazonka.Scheduler.Types.Tag+-- 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.Scheduler.Types.Tag 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++-- | Tag to associate with a schedule group.+--+-- /See:/ 'newTag' smart constructor.+data Tag = Tag'+ { -- | The key for the tag.+ key :: Prelude.Text,+ -- | The value for the tag.+ value :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Tag' with all optional fields 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:+--+-- 'key', 'tag_key' - The key for the tag.+--+-- 'value', 'tag_value' - The value for the tag.+newTag ::+ -- | 'key'+ Prelude.Text ->+ -- | 'value'+ Prelude.Text ->+ Tag+newTag pKey_ pValue_ =+ Tag' {key = pKey_, value = pValue_}++-- | The key for the tag.+tag_key :: Lens.Lens' Tag Prelude.Text+tag_key = Lens.lens (\Tag' {key} -> key) (\s@Tag' {} a -> s {key = a} :: Tag)++-- | The value for the tag.+tag_value :: Lens.Lens' Tag Prelude.Text+tag_value = Lens.lens (\Tag' {value} -> value) (\s@Tag' {} a -> s {value = a} :: Tag)++instance Data.FromJSON Tag where+ parseJSON =+ Data.withObject+ "Tag"+ ( \x ->+ Tag'+ Prelude.<$> (x Data..: "Key")+ Prelude.<*> (x Data..: "Value")+ )++instance Prelude.Hashable Tag where+ hashWithSalt _salt Tag' {..} =+ _salt+ `Prelude.hashWithSalt` key+ `Prelude.hashWithSalt` value++instance Prelude.NFData Tag where+ rnf Tag' {..} =+ Prelude.rnf key `Prelude.seq` Prelude.rnf value++instance Data.ToJSON Tag where+ toJSON Tag' {..} =+ Data.object+ ( Prelude.catMaybes+ [ Prelude.Just ("Key" Data..= key),+ Prelude.Just ("Value" Data..= value)+ ]+ )
+ gen/Amazonka/Scheduler/Types/Target.hs view
@@ -0,0 +1,297 @@+{-# 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.Scheduler.Types.Target+-- 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.Scheduler.Types.Target 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.Scheduler.Types.DeadLetterConfig+import Amazonka.Scheduler.Types.EcsParameters+import Amazonka.Scheduler.Types.EventBridgeParameters+import Amazonka.Scheduler.Types.KinesisParameters+import Amazonka.Scheduler.Types.RetryPolicy+import Amazonka.Scheduler.Types.SageMakerPipelineParameters+import Amazonka.Scheduler.Types.SqsParameters++-- | The schedule\'s target. EventBridge Scheduler supports templated target+-- that invoke common API operations, as well as universal targets that you+-- can customize to invoke over 6,000 API operations across more than 270+-- services. You can only specify one templated or universal target for a+-- schedule.+--+-- /See:/ 'newTarget' smart constructor.+data Target = Target'+ { -- | An object that contains information about an Amazon SQS queue that+ -- EventBridge Scheduler uses as a dead-letter queue for your schedule. If+ -- specified, EventBridge Scheduler delivers failed events that could not+ -- be successfully delivered to a target to the queue.+ deadLetterConfig :: Prelude.Maybe DeadLetterConfig,+ -- | The templated target type for the Amazon ECS+ -- <https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html RunTask>+ -- API operation.+ ecsParameters :: Prelude.Maybe EcsParameters,+ -- | The templated target type for the EventBridge+ -- <https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html PutEvents>+ -- API operation.+ eventBridgeParameters :: Prelude.Maybe EventBridgeParameters,+ -- | The text, or well-formed JSON, passed to the target. If you are+ -- configuring a templated Lambda, AWS Step Functions, or Amazon+ -- EventBridge target, the input must be a well-formed JSON. For all other+ -- target types, a JSON is not required. If you do not specify anything for+ -- this field, EventBridge Scheduler delivers a default notification to the+ -- target.+ input :: Prelude.Maybe Prelude.Text,+ -- | The templated target type for the Amazon Kinesis+ -- <kinesis/latest/APIReference/API_PutRecord.html PutRecord> API+ -- operation.+ kinesisParameters :: Prelude.Maybe KinesisParameters,+ -- | A @RetryPolicy@ object that includes information about the retry policy+ -- settings, including the maximum age of an event, and the maximum number+ -- of times EventBridge Scheduler will try to deliver the event to a+ -- target.+ retryPolicy :: Prelude.Maybe RetryPolicy,+ -- | The templated target type for the Amazon SageMaker+ -- <https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StartPipelineExecution.html StartPipelineExecution>+ -- API operation.+ sageMakerPipelineParameters :: Prelude.Maybe SageMakerPipelineParameters,+ -- | The templated target type for the Amazon SQS+ -- <https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html SendMessage>+ -- API operation. Contains the message group ID to use when the target is a+ -- FIFO queue. If you specify an Amazon SQS FIFO queue as a target, the+ -- queue must have content-based deduplication enabled. For more+ -- information, see+ -- <https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagededuplicationid-property.html Using the Amazon SQS message deduplication ID>+ -- in the /Amazon SQS Developer Guide/.+ sqsParameters :: Prelude.Maybe SqsParameters,+ -- | The Amazon Resource Name (ARN) of the target.+ arn :: Prelude.Text,+ -- | The Amazon Resource Name (ARN) of the IAM role that EventBridge+ -- Scheduler will use for this target when the schedule is invoked.+ roleArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'Target' with all optional fields 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:+--+-- 'deadLetterConfig', 'target_deadLetterConfig' - An object that contains information about an Amazon SQS queue that+-- EventBridge Scheduler uses as a dead-letter queue for your schedule. If+-- specified, EventBridge Scheduler delivers failed events that could not+-- be successfully delivered to a target to the queue.+--+-- 'ecsParameters', 'target_ecsParameters' - The templated target type for the Amazon ECS+-- <https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html RunTask>+-- API operation.+--+-- 'eventBridgeParameters', 'target_eventBridgeParameters' - The templated target type for the EventBridge+-- <https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html PutEvents>+-- API operation.+--+-- 'input', 'target_input' - The text, or well-formed JSON, passed to the target. If you are+-- configuring a templated Lambda, AWS Step Functions, or Amazon+-- EventBridge target, the input must be a well-formed JSON. For all other+-- target types, a JSON is not required. If you do not specify anything for+-- this field, EventBridge Scheduler delivers a default notification to the+-- target.+--+-- 'kinesisParameters', 'target_kinesisParameters' - The templated target type for the Amazon Kinesis+-- <kinesis/latest/APIReference/API_PutRecord.html PutRecord> API+-- operation.+--+-- 'retryPolicy', 'target_retryPolicy' - A @RetryPolicy@ object that includes information about the retry policy+-- settings, including the maximum age of an event, and the maximum number+-- of times EventBridge Scheduler will try to deliver the event to a+-- target.+--+-- 'sageMakerPipelineParameters', 'target_sageMakerPipelineParameters' - The templated target type for the Amazon SageMaker+-- <https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StartPipelineExecution.html StartPipelineExecution>+-- API operation.+--+-- 'sqsParameters', 'target_sqsParameters' - The templated target type for the Amazon SQS+-- <https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html SendMessage>+-- API operation. Contains the message group ID to use when the target is a+-- FIFO queue. If you specify an Amazon SQS FIFO queue as a target, the+-- queue must have content-based deduplication enabled. For more+-- information, see+-- <https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagededuplicationid-property.html Using the Amazon SQS message deduplication ID>+-- in the /Amazon SQS Developer Guide/.+--+-- 'arn', 'target_arn' - The Amazon Resource Name (ARN) of the target.+--+-- 'roleArn', 'target_roleArn' - The Amazon Resource Name (ARN) of the IAM role that EventBridge+-- Scheduler will use for this target when the schedule is invoked.+newTarget ::+ -- | 'arn'+ Prelude.Text ->+ -- | 'roleArn'+ Prelude.Text ->+ Target+newTarget pArn_ pRoleArn_ =+ Target'+ { deadLetterConfig = Prelude.Nothing,+ ecsParameters = Prelude.Nothing,+ eventBridgeParameters = Prelude.Nothing,+ input = Prelude.Nothing,+ kinesisParameters = Prelude.Nothing,+ retryPolicy = Prelude.Nothing,+ sageMakerPipelineParameters = Prelude.Nothing,+ sqsParameters = Prelude.Nothing,+ arn = pArn_,+ roleArn = pRoleArn_+ }++-- | An object that contains information about an Amazon SQS queue that+-- EventBridge Scheduler uses as a dead-letter queue for your schedule. If+-- specified, EventBridge Scheduler delivers failed events that could not+-- be successfully delivered to a target to the queue.+target_deadLetterConfig :: Lens.Lens' Target (Prelude.Maybe DeadLetterConfig)+target_deadLetterConfig = Lens.lens (\Target' {deadLetterConfig} -> deadLetterConfig) (\s@Target' {} a -> s {deadLetterConfig = a} :: Target)++-- | The templated target type for the Amazon ECS+-- <https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html RunTask>+-- API operation.+target_ecsParameters :: Lens.Lens' Target (Prelude.Maybe EcsParameters)+target_ecsParameters = Lens.lens (\Target' {ecsParameters} -> ecsParameters) (\s@Target' {} a -> s {ecsParameters = a} :: Target)++-- | The templated target type for the EventBridge+-- <https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html PutEvents>+-- API operation.+target_eventBridgeParameters :: Lens.Lens' Target (Prelude.Maybe EventBridgeParameters)+target_eventBridgeParameters = Lens.lens (\Target' {eventBridgeParameters} -> eventBridgeParameters) (\s@Target' {} a -> s {eventBridgeParameters = a} :: Target)++-- | The text, or well-formed JSON, passed to the target. If you are+-- configuring a templated Lambda, AWS Step Functions, or Amazon+-- EventBridge target, the input must be a well-formed JSON. For all other+-- target types, a JSON is not required. If you do not specify anything for+-- this field, EventBridge Scheduler delivers a default notification to the+-- target.+target_input :: Lens.Lens' Target (Prelude.Maybe Prelude.Text)+target_input = Lens.lens (\Target' {input} -> input) (\s@Target' {} a -> s {input = a} :: Target)++-- | The templated target type for the Amazon Kinesis+-- <kinesis/latest/APIReference/API_PutRecord.html PutRecord> API+-- operation.+target_kinesisParameters :: Lens.Lens' Target (Prelude.Maybe KinesisParameters)+target_kinesisParameters = Lens.lens (\Target' {kinesisParameters} -> kinesisParameters) (\s@Target' {} a -> s {kinesisParameters = a} :: Target)++-- | A @RetryPolicy@ object that includes information about the retry policy+-- settings, including the maximum age of an event, and the maximum number+-- of times EventBridge Scheduler will try to deliver the event to a+-- target.+target_retryPolicy :: Lens.Lens' Target (Prelude.Maybe RetryPolicy)+target_retryPolicy = Lens.lens (\Target' {retryPolicy} -> retryPolicy) (\s@Target' {} a -> s {retryPolicy = a} :: Target)++-- | The templated target type for the Amazon SageMaker+-- <https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StartPipelineExecution.html StartPipelineExecution>+-- API operation.+target_sageMakerPipelineParameters :: Lens.Lens' Target (Prelude.Maybe SageMakerPipelineParameters)+target_sageMakerPipelineParameters = Lens.lens (\Target' {sageMakerPipelineParameters} -> sageMakerPipelineParameters) (\s@Target' {} a -> s {sageMakerPipelineParameters = a} :: Target)++-- | The templated target type for the Amazon SQS+-- <https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html SendMessage>+-- API operation. Contains the message group ID to use when the target is a+-- FIFO queue. If you specify an Amazon SQS FIFO queue as a target, the+-- queue must have content-based deduplication enabled. For more+-- information, see+-- <https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagededuplicationid-property.html Using the Amazon SQS message deduplication ID>+-- in the /Amazon SQS Developer Guide/.+target_sqsParameters :: Lens.Lens' Target (Prelude.Maybe SqsParameters)+target_sqsParameters = Lens.lens (\Target' {sqsParameters} -> sqsParameters) (\s@Target' {} a -> s {sqsParameters = a} :: Target)++-- | The Amazon Resource Name (ARN) of the target.+target_arn :: Lens.Lens' Target Prelude.Text+target_arn = Lens.lens (\Target' {arn} -> arn) (\s@Target' {} a -> s {arn = a} :: Target)++-- | The Amazon Resource Name (ARN) of the IAM role that EventBridge+-- Scheduler will use for this target when the schedule is invoked.+target_roleArn :: Lens.Lens' Target Prelude.Text+target_roleArn = Lens.lens (\Target' {roleArn} -> roleArn) (\s@Target' {} a -> s {roleArn = a} :: Target)++instance Data.FromJSON Target where+ parseJSON =+ Data.withObject+ "Target"+ ( \x ->+ Target'+ Prelude.<$> (x Data..:? "DeadLetterConfig")+ Prelude.<*> (x Data..:? "EcsParameters")+ Prelude.<*> (x Data..:? "EventBridgeParameters")+ Prelude.<*> (x Data..:? "Input")+ Prelude.<*> (x Data..:? "KinesisParameters")+ Prelude.<*> (x Data..:? "RetryPolicy")+ Prelude.<*> (x Data..:? "SageMakerPipelineParameters")+ Prelude.<*> (x Data..:? "SqsParameters")+ Prelude.<*> (x Data..: "Arn")+ Prelude.<*> (x Data..: "RoleArn")+ )++instance Prelude.Hashable Target where+ hashWithSalt _salt Target' {..} =+ _salt+ `Prelude.hashWithSalt` deadLetterConfig+ `Prelude.hashWithSalt` ecsParameters+ `Prelude.hashWithSalt` eventBridgeParameters+ `Prelude.hashWithSalt` input+ `Prelude.hashWithSalt` kinesisParameters+ `Prelude.hashWithSalt` retryPolicy+ `Prelude.hashWithSalt` sageMakerPipelineParameters+ `Prelude.hashWithSalt` sqsParameters+ `Prelude.hashWithSalt` arn+ `Prelude.hashWithSalt` roleArn++instance Prelude.NFData Target where+ rnf Target' {..} =+ Prelude.rnf deadLetterConfig+ `Prelude.seq` Prelude.rnf ecsParameters+ `Prelude.seq` Prelude.rnf eventBridgeParameters+ `Prelude.seq` Prelude.rnf input+ `Prelude.seq` Prelude.rnf kinesisParameters+ `Prelude.seq` Prelude.rnf retryPolicy+ `Prelude.seq` Prelude.rnf sageMakerPipelineParameters+ `Prelude.seq` Prelude.rnf sqsParameters+ `Prelude.seq` Prelude.rnf arn+ `Prelude.seq` Prelude.rnf roleArn++instance Data.ToJSON Target where+ toJSON Target' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("DeadLetterConfig" Data..=)+ Prelude.<$> deadLetterConfig,+ ("EcsParameters" Data..=) Prelude.<$> ecsParameters,+ ("EventBridgeParameters" Data..=)+ Prelude.<$> eventBridgeParameters,+ ("Input" Data..=) Prelude.<$> input,+ ("KinesisParameters" Data..=)+ Prelude.<$> kinesisParameters,+ ("RetryPolicy" Data..=) Prelude.<$> retryPolicy,+ ("SageMakerPipelineParameters" Data..=)+ Prelude.<$> sageMakerPipelineParameters,+ ("SqsParameters" Data..=) Prelude.<$> sqsParameters,+ Prelude.Just ("Arn" Data..= arn),+ Prelude.Just ("RoleArn" Data..= roleArn)+ ]+ )
+ gen/Amazonka/Scheduler/Types/TargetSummary.hs view
@@ -0,0 +1,66 @@+{-# 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.Scheduler.Types.TargetSummary+-- 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.Scheduler.Types.TargetSummary where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude++-- | The details of a target.+--+-- /See:/ 'newTargetSummary' smart constructor.+data TargetSummary = TargetSummary'+ { -- | The Amazon Resource Name (ARN) of the target.+ arn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'TargetSummary' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'arn', 'targetSummary_arn' - The Amazon Resource Name (ARN) of the target.+newTargetSummary ::+ -- | 'arn'+ Prelude.Text ->+ TargetSummary+newTargetSummary pArn_ = TargetSummary' {arn = pArn_}++-- | The Amazon Resource Name (ARN) of the target.+targetSummary_arn :: Lens.Lens' TargetSummary Prelude.Text+targetSummary_arn = Lens.lens (\TargetSummary' {arn} -> arn) (\s@TargetSummary' {} a -> s {arn = a} :: TargetSummary)++instance Data.FromJSON TargetSummary where+ parseJSON =+ Data.withObject+ "TargetSummary"+ (\x -> TargetSummary' Prelude.<$> (x Data..: "Arn"))++instance Prelude.Hashable TargetSummary where+ hashWithSalt _salt TargetSummary' {..} =+ _salt `Prelude.hashWithSalt` arn++instance Prelude.NFData TargetSummary where+ rnf TargetSummary' {..} = Prelude.rnf arn
+ gen/Amazonka/Scheduler/UntagResource.hs view
@@ -0,0 +1,165 @@+{-# 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.Scheduler.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 EventBridge Scheduler+-- schedule group.+module Amazonka.Scheduler.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.Scheduler.Types++-- | /See:/ 'newUntagResource' smart constructor.+data UntagResource = UntagResource'+ { -- | The Amazon Resource Name (ARN) of the schedule group from which you are+ -- removing tags.+ 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 Amazon Resource Name (ARN) of the schedule group from which you are+-- removing tags.+--+-- '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 Amazon Resource Name (ARN) of the schedule group from which you are+-- removing tags.+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/Scheduler/UpdateSchedule.hs view
@@ -0,0 +1,460 @@+{-# 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.Scheduler.UpdateSchedule+-- 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 specified schedule. When you call @UpdateSchedule@,+-- EventBridge Scheduler uses all values, including empty values, specified+-- in the request and overrides the existing schedule. This is by design.+-- This means that if you do not set an optional field in your request,+-- that field will be set to its system-default value after the update.+--+-- Before calling this operation, we recommend that you call the+-- @GetSchedule@ API operation and make a note of all optional parameters+-- for your @UpdateSchedule@ call.+module Amazonka.Scheduler.UpdateSchedule+ ( -- * Creating a Request+ UpdateSchedule (..),+ newUpdateSchedule,++ -- * Request Lenses+ updateSchedule_clientToken,+ updateSchedule_description,+ updateSchedule_endDate,+ updateSchedule_groupName,+ updateSchedule_kmsKeyArn,+ updateSchedule_scheduleExpressionTimezone,+ updateSchedule_startDate,+ updateSchedule_state,+ updateSchedule_flexibleTimeWindow,+ updateSchedule_name,+ updateSchedule_scheduleExpression,+ updateSchedule_target,++ -- * Destructuring the Response+ UpdateScheduleResponse (..),+ newUpdateScheduleResponse,++ -- * Response Lenses+ updateScheduleResponse_httpStatus,+ updateScheduleResponse_scheduleArn,+ )+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.Scheduler.Types++-- | /See:/ 'newUpdateSchedule' smart constructor.+data UpdateSchedule = UpdateSchedule'+ { -- | Unique, case-sensitive identifier you provide to ensure the idempotency+ -- of the request. If you do not specify a client token, EventBridge+ -- Scheduler uses a randomly generated token for the request to ensure+ -- idempotency.+ clientToken :: Prelude.Maybe Prelude.Text,+ -- | The description you specify for the schedule.+ description :: Prelude.Maybe Prelude.Text,+ -- | The date, in UTC, before which the schedule can invoke its target.+ -- Depending on the schedule\'s recurrence expression, invocations might+ -- stop on, or before, the @EndDate@ you specify. EventBridge Scheduler+ -- ignores @EndDate@ for one-time schedules.+ endDate :: Prelude.Maybe Data.POSIX,+ -- | The name of the schedule group with which the schedule is associated.+ -- You must provide this value in order for EventBridge Scheduler to find+ -- the schedule you want to update. If you omit this value, EventBridge+ -- Scheduler assumes the group is associated to the default group.+ groupName :: Prelude.Maybe Prelude.Text,+ -- | The ARN for the customer managed KMS key that that you want EventBridge+ -- Scheduler to use to encrypt and decrypt your data.+ kmsKeyArn :: Prelude.Maybe Prelude.Text,+ -- | The timezone in which the scheduling expression is evaluated.+ scheduleExpressionTimezone :: Prelude.Maybe Prelude.Text,+ -- | The date, in UTC, after which the schedule can begin invoking its+ -- target. Depending on the schedule\'s recurrence expression, invocations+ -- might occur on, or after, the @StartDate@ you specify. EventBridge+ -- Scheduler ignores @StartDate@ for one-time schedules.+ startDate :: Prelude.Maybe Data.POSIX,+ -- | Specifies whether the schedule is enabled or disabled.+ state :: Prelude.Maybe ScheduleState,+ -- | Allows you to configure a time window during which EventBridge Scheduler+ -- invokes the schedule.+ flexibleTimeWindow :: FlexibleTimeWindow,+ -- | The name of the schedule that you are updating.+ name :: Prelude.Text,+ -- | The expression that defines when the schedule runs. The following+ -- formats are supported.+ --+ -- - @at@ expression - @at(yyyy-mm-ddThh:mm:ss)@+ --+ -- - @rate@ expression - @rate(unit value)@+ --+ -- - @cron@ expression - @cron(fields)@+ --+ -- You can use @at@ expressions to create one-time schedules that invoke a+ -- target once, at the time and in the time zone, that you specify. You can+ -- use @rate@ and @cron@ expressions to create recurring schedules.+ -- Rate-based schedules are useful when you want to invoke a target at+ -- regular intervals, such as every 15 minutes or every five days.+ -- Cron-based schedules are useful when you want to invoke a target+ -- periodically at a specific time, such as at 8:00 am (UTC+0) every 1st+ -- day of the month.+ --+ -- A @cron@ expression consists of six fields separated by white spaces:+ -- @(minutes hours day_of_month month day_of_week year)@.+ --+ -- A @rate@ expression consists of a /value/ as a positive integer, and a+ -- /unit/ with the following options: @minute@ | @minutes@ | @hour@ |+ -- @hours@ | @day@ | @days@+ --+ -- For more information and examples, see+ -- <https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html Schedule types on EventBridge Scheduler>+ -- in the /EventBridge Scheduler User Guide/.+ scheduleExpression :: Prelude.Text,+ -- | The schedule target. You can use this operation to change the target+ -- that your schedule invokes.+ target :: Target+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateSchedule' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'clientToken', 'updateSchedule_clientToken' - Unique, case-sensitive identifier you provide to ensure the idempotency+-- of the request. If you do not specify a client token, EventBridge+-- Scheduler uses a randomly generated token for the request to ensure+-- idempotency.+--+-- 'description', 'updateSchedule_description' - The description you specify for the schedule.+--+-- 'endDate', 'updateSchedule_endDate' - The date, in UTC, before which the schedule can invoke its target.+-- Depending on the schedule\'s recurrence expression, invocations might+-- stop on, or before, the @EndDate@ you specify. EventBridge Scheduler+-- ignores @EndDate@ for one-time schedules.+--+-- 'groupName', 'updateSchedule_groupName' - The name of the schedule group with which the schedule is associated.+-- You must provide this value in order for EventBridge Scheduler to find+-- the schedule you want to update. If you omit this value, EventBridge+-- Scheduler assumes the group is associated to the default group.+--+-- 'kmsKeyArn', 'updateSchedule_kmsKeyArn' - The ARN for the customer managed KMS key that that you want EventBridge+-- Scheduler to use to encrypt and decrypt your data.+--+-- 'scheduleExpressionTimezone', 'updateSchedule_scheduleExpressionTimezone' - The timezone in which the scheduling expression is evaluated.+--+-- 'startDate', 'updateSchedule_startDate' - The date, in UTC, after which the schedule can begin invoking its+-- target. Depending on the schedule\'s recurrence expression, invocations+-- might occur on, or after, the @StartDate@ you specify. EventBridge+-- Scheduler ignores @StartDate@ for one-time schedules.+--+-- 'state', 'updateSchedule_state' - Specifies whether the schedule is enabled or disabled.+--+-- 'flexibleTimeWindow', 'updateSchedule_flexibleTimeWindow' - Allows you to configure a time window during which EventBridge Scheduler+-- invokes the schedule.+--+-- 'name', 'updateSchedule_name' - The name of the schedule that you are updating.+--+-- 'scheduleExpression', 'updateSchedule_scheduleExpression' - The expression that defines when the schedule runs. The following+-- formats are supported.+--+-- - @at@ expression - @at(yyyy-mm-ddThh:mm:ss)@+--+-- - @rate@ expression - @rate(unit value)@+--+-- - @cron@ expression - @cron(fields)@+--+-- You can use @at@ expressions to create one-time schedules that invoke a+-- target once, at the time and in the time zone, that you specify. You can+-- use @rate@ and @cron@ expressions to create recurring schedules.+-- Rate-based schedules are useful when you want to invoke a target at+-- regular intervals, such as every 15 minutes or every five days.+-- Cron-based schedules are useful when you want to invoke a target+-- periodically at a specific time, such as at 8:00 am (UTC+0) every 1st+-- day of the month.+--+-- A @cron@ expression consists of six fields separated by white spaces:+-- @(minutes hours day_of_month month day_of_week year)@.+--+-- A @rate@ expression consists of a /value/ as a positive integer, and a+-- /unit/ with the following options: @minute@ | @minutes@ | @hour@ |+-- @hours@ | @day@ | @days@+--+-- For more information and examples, see+-- <https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html Schedule types on EventBridge Scheduler>+-- in the /EventBridge Scheduler User Guide/.+--+-- 'target', 'updateSchedule_target' - The schedule target. You can use this operation to change the target+-- that your schedule invokes.+newUpdateSchedule ::+ -- | 'flexibleTimeWindow'+ FlexibleTimeWindow ->+ -- | 'name'+ Prelude.Text ->+ -- | 'scheduleExpression'+ Prelude.Text ->+ -- | 'target'+ Target ->+ UpdateSchedule+newUpdateSchedule+ pFlexibleTimeWindow_+ pName_+ pScheduleExpression_+ pTarget_ =+ UpdateSchedule'+ { clientToken = Prelude.Nothing,+ description = Prelude.Nothing,+ endDate = Prelude.Nothing,+ groupName = Prelude.Nothing,+ kmsKeyArn = Prelude.Nothing,+ scheduleExpressionTimezone = Prelude.Nothing,+ startDate = Prelude.Nothing,+ state = Prelude.Nothing,+ flexibleTimeWindow = pFlexibleTimeWindow_,+ name = pName_,+ scheduleExpression = pScheduleExpression_,+ target = pTarget_+ }++-- | Unique, case-sensitive identifier you provide to ensure the idempotency+-- of the request. If you do not specify a client token, EventBridge+-- Scheduler uses a randomly generated token for the request to ensure+-- idempotency.+updateSchedule_clientToken :: Lens.Lens' UpdateSchedule (Prelude.Maybe Prelude.Text)+updateSchedule_clientToken = Lens.lens (\UpdateSchedule' {clientToken} -> clientToken) (\s@UpdateSchedule' {} a -> s {clientToken = a} :: UpdateSchedule)++-- | The description you specify for the schedule.+updateSchedule_description :: Lens.Lens' UpdateSchedule (Prelude.Maybe Prelude.Text)+updateSchedule_description = Lens.lens (\UpdateSchedule' {description} -> description) (\s@UpdateSchedule' {} a -> s {description = a} :: UpdateSchedule)++-- | The date, in UTC, before which the schedule can invoke its target.+-- Depending on the schedule\'s recurrence expression, invocations might+-- stop on, or before, the @EndDate@ you specify. EventBridge Scheduler+-- ignores @EndDate@ for one-time schedules.+updateSchedule_endDate :: Lens.Lens' UpdateSchedule (Prelude.Maybe Prelude.UTCTime)+updateSchedule_endDate = Lens.lens (\UpdateSchedule' {endDate} -> endDate) (\s@UpdateSchedule' {} a -> s {endDate = a} :: UpdateSchedule) Prelude.. Lens.mapping Data._Time++-- | The name of the schedule group with which the schedule is associated.+-- You must provide this value in order for EventBridge Scheduler to find+-- the schedule you want to update. If you omit this value, EventBridge+-- Scheduler assumes the group is associated to the default group.+updateSchedule_groupName :: Lens.Lens' UpdateSchedule (Prelude.Maybe Prelude.Text)+updateSchedule_groupName = Lens.lens (\UpdateSchedule' {groupName} -> groupName) (\s@UpdateSchedule' {} a -> s {groupName = a} :: UpdateSchedule)++-- | The ARN for the customer managed KMS key that that you want EventBridge+-- Scheduler to use to encrypt and decrypt your data.+updateSchedule_kmsKeyArn :: Lens.Lens' UpdateSchedule (Prelude.Maybe Prelude.Text)+updateSchedule_kmsKeyArn = Lens.lens (\UpdateSchedule' {kmsKeyArn} -> kmsKeyArn) (\s@UpdateSchedule' {} a -> s {kmsKeyArn = a} :: UpdateSchedule)++-- | The timezone in which the scheduling expression is evaluated.+updateSchedule_scheduleExpressionTimezone :: Lens.Lens' UpdateSchedule (Prelude.Maybe Prelude.Text)+updateSchedule_scheduleExpressionTimezone = Lens.lens (\UpdateSchedule' {scheduleExpressionTimezone} -> scheduleExpressionTimezone) (\s@UpdateSchedule' {} a -> s {scheduleExpressionTimezone = a} :: UpdateSchedule)++-- | The date, in UTC, after which the schedule can begin invoking its+-- target. Depending on the schedule\'s recurrence expression, invocations+-- might occur on, or after, the @StartDate@ you specify. EventBridge+-- Scheduler ignores @StartDate@ for one-time schedules.+updateSchedule_startDate :: Lens.Lens' UpdateSchedule (Prelude.Maybe Prelude.UTCTime)+updateSchedule_startDate = Lens.lens (\UpdateSchedule' {startDate} -> startDate) (\s@UpdateSchedule' {} a -> s {startDate = a} :: UpdateSchedule) Prelude.. Lens.mapping Data._Time++-- | Specifies whether the schedule is enabled or disabled.+updateSchedule_state :: Lens.Lens' UpdateSchedule (Prelude.Maybe ScheduleState)+updateSchedule_state = Lens.lens (\UpdateSchedule' {state} -> state) (\s@UpdateSchedule' {} a -> s {state = a} :: UpdateSchedule)++-- | Allows you to configure a time window during which EventBridge Scheduler+-- invokes the schedule.+updateSchedule_flexibleTimeWindow :: Lens.Lens' UpdateSchedule FlexibleTimeWindow+updateSchedule_flexibleTimeWindow = Lens.lens (\UpdateSchedule' {flexibleTimeWindow} -> flexibleTimeWindow) (\s@UpdateSchedule' {} a -> s {flexibleTimeWindow = a} :: UpdateSchedule)++-- | The name of the schedule that you are updating.+updateSchedule_name :: Lens.Lens' UpdateSchedule Prelude.Text+updateSchedule_name = Lens.lens (\UpdateSchedule' {name} -> name) (\s@UpdateSchedule' {} a -> s {name = a} :: UpdateSchedule)++-- | The expression that defines when the schedule runs. The following+-- formats are supported.+--+-- - @at@ expression - @at(yyyy-mm-ddThh:mm:ss)@+--+-- - @rate@ expression - @rate(unit value)@+--+-- - @cron@ expression - @cron(fields)@+--+-- You can use @at@ expressions to create one-time schedules that invoke a+-- target once, at the time and in the time zone, that you specify. You can+-- use @rate@ and @cron@ expressions to create recurring schedules.+-- Rate-based schedules are useful when you want to invoke a target at+-- regular intervals, such as every 15 minutes or every five days.+-- Cron-based schedules are useful when you want to invoke a target+-- periodically at a specific time, such as at 8:00 am (UTC+0) every 1st+-- day of the month.+--+-- A @cron@ expression consists of six fields separated by white spaces:+-- @(minutes hours day_of_month month day_of_week year)@.+--+-- A @rate@ expression consists of a /value/ as a positive integer, and a+-- /unit/ with the following options: @minute@ | @minutes@ | @hour@ |+-- @hours@ | @day@ | @days@+--+-- For more information and examples, see+-- <https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html Schedule types on EventBridge Scheduler>+-- in the /EventBridge Scheduler User Guide/.+updateSchedule_scheduleExpression :: Lens.Lens' UpdateSchedule Prelude.Text+updateSchedule_scheduleExpression = Lens.lens (\UpdateSchedule' {scheduleExpression} -> scheduleExpression) (\s@UpdateSchedule' {} a -> s {scheduleExpression = a} :: UpdateSchedule)++-- | The schedule target. You can use this operation to change the target+-- that your schedule invokes.+updateSchedule_target :: Lens.Lens' UpdateSchedule Target+updateSchedule_target = Lens.lens (\UpdateSchedule' {target} -> target) (\s@UpdateSchedule' {} a -> s {target = a} :: UpdateSchedule)++instance Core.AWSRequest UpdateSchedule where+ type+ AWSResponse UpdateSchedule =+ UpdateScheduleResponse+ request overrides =+ Request.putJSON (overrides defaultService)+ response =+ Response.receiveJSON+ ( \s h x ->+ UpdateScheduleResponse'+ Prelude.<$> (Prelude.pure (Prelude.fromEnum s))+ Prelude.<*> (x Data..:> "ScheduleArn")+ )++instance Prelude.Hashable UpdateSchedule where+ hashWithSalt _salt UpdateSchedule' {..} =+ _salt+ `Prelude.hashWithSalt` clientToken+ `Prelude.hashWithSalt` description+ `Prelude.hashWithSalt` endDate+ `Prelude.hashWithSalt` groupName+ `Prelude.hashWithSalt` kmsKeyArn+ `Prelude.hashWithSalt` scheduleExpressionTimezone+ `Prelude.hashWithSalt` startDate+ `Prelude.hashWithSalt` state+ `Prelude.hashWithSalt` flexibleTimeWindow+ `Prelude.hashWithSalt` name+ `Prelude.hashWithSalt` scheduleExpression+ `Prelude.hashWithSalt` target++instance Prelude.NFData UpdateSchedule where+ rnf UpdateSchedule' {..} =+ Prelude.rnf clientToken+ `Prelude.seq` Prelude.rnf description+ `Prelude.seq` Prelude.rnf endDate+ `Prelude.seq` Prelude.rnf groupName+ `Prelude.seq` Prelude.rnf kmsKeyArn+ `Prelude.seq` Prelude.rnf scheduleExpressionTimezone+ `Prelude.seq` Prelude.rnf startDate+ `Prelude.seq` Prelude.rnf state+ `Prelude.seq` Prelude.rnf flexibleTimeWindow+ `Prelude.seq` Prelude.rnf name+ `Prelude.seq` Prelude.rnf scheduleExpression+ `Prelude.seq` Prelude.rnf target++instance Data.ToHeaders UpdateSchedule where+ toHeaders =+ Prelude.const+ ( Prelude.mconcat+ [ "Content-Type"+ Data.=# ( "application/x-amz-json-1.1" ::+ Prelude.ByteString+ )+ ]+ )++instance Data.ToJSON UpdateSchedule where+ toJSON UpdateSchedule' {..} =+ Data.object+ ( Prelude.catMaybes+ [ ("ClientToken" Data..=) Prelude.<$> clientToken,+ ("Description" Data..=) Prelude.<$> description,+ ("EndDate" Data..=) Prelude.<$> endDate,+ ("GroupName" Data..=) Prelude.<$> groupName,+ ("KmsKeyArn" Data..=) Prelude.<$> kmsKeyArn,+ ("ScheduleExpressionTimezone" Data..=)+ Prelude.<$> scheduleExpressionTimezone,+ ("StartDate" Data..=) Prelude.<$> startDate,+ ("State" Data..=) Prelude.<$> state,+ Prelude.Just+ ("FlexibleTimeWindow" Data..= flexibleTimeWindow),+ Prelude.Just+ ("ScheduleExpression" Data..= scheduleExpression),+ Prelude.Just ("Target" Data..= target)+ ]+ )++instance Data.ToPath UpdateSchedule where+ toPath UpdateSchedule' {..} =+ Prelude.mconcat ["/schedules/", Data.toBS name]++instance Data.ToQuery UpdateSchedule where+ toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newUpdateScheduleResponse' smart constructor.+data UpdateScheduleResponse = UpdateScheduleResponse'+ { -- | The response's http status code.+ httpStatus :: Prelude.Int,+ -- | The Amazon Resource Name (ARN) of the schedule that you updated.+ scheduleArn :: Prelude.Text+ }+ deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'UpdateScheduleResponse' with all optional fields 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', 'updateScheduleResponse_httpStatus' - The response's http status code.+--+-- 'scheduleArn', 'updateScheduleResponse_scheduleArn' - The Amazon Resource Name (ARN) of the schedule that you updated.+newUpdateScheduleResponse ::+ -- | 'httpStatus'+ Prelude.Int ->+ -- | 'scheduleArn'+ Prelude.Text ->+ UpdateScheduleResponse+newUpdateScheduleResponse pHttpStatus_ pScheduleArn_ =+ UpdateScheduleResponse'+ { httpStatus = pHttpStatus_,+ scheduleArn = pScheduleArn_+ }++-- | The response's http status code.+updateScheduleResponse_httpStatus :: Lens.Lens' UpdateScheduleResponse Prelude.Int+updateScheduleResponse_httpStatus = Lens.lens (\UpdateScheduleResponse' {httpStatus} -> httpStatus) (\s@UpdateScheduleResponse' {} a -> s {httpStatus = a} :: UpdateScheduleResponse)++-- | The Amazon Resource Name (ARN) of the schedule that you updated.+updateScheduleResponse_scheduleArn :: Lens.Lens' UpdateScheduleResponse Prelude.Text+updateScheduleResponse_scheduleArn = Lens.lens (\UpdateScheduleResponse' {scheduleArn} -> scheduleArn) (\s@UpdateScheduleResponse' {} a -> s {scheduleArn = a} :: UpdateScheduleResponse)++instance Prelude.NFData UpdateScheduleResponse where+ rnf UpdateScheduleResponse' {..} =+ Prelude.rnf httpStatus+ `Prelude.seq` Prelude.rnf scheduleArn
+ gen/Amazonka/Scheduler/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.Scheduler.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.Scheduler.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.Scheduler.Lens+import Amazonka.Scheduler.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.Scheduler+import Test.Amazonka.Scheduler.Internal+import Test.Tasty++main :: IO ()+main =+ defaultMain $+ testGroup+ "Scheduler"+ [ testGroup "tests" tests,+ testGroup "fixtures" fixtures+ ]
+ test/Test/Amazonka/Gen/Scheduler.hs view
@@ -0,0 +1,278 @@+{-# 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.Scheduler+-- 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.Scheduler where++import Amazonka.Scheduler+import qualified Data.Proxy as Proxy+import Test.Amazonka.Fixture+import Test.Amazonka.Prelude+import Test.Amazonka.Scheduler.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"+-- [ requestCreateSchedule $+-- newCreateSchedule+--+-- , requestCreateScheduleGroup $+-- newCreateScheduleGroup+--+-- , requestDeleteSchedule $+-- newDeleteSchedule+--+-- , requestDeleteScheduleGroup $+-- newDeleteScheduleGroup+--+-- , requestGetSchedule $+-- newGetSchedule+--+-- , requestGetScheduleGroup $+-- newGetScheduleGroup+--+-- , requestListScheduleGroups $+-- newListScheduleGroups+--+-- , requestListSchedules $+-- newListSchedules+--+-- , requestListTagsForResource $+-- newListTagsForResource+--+-- , requestTagResource $+-- newTagResource+--+-- , requestUntagResource $+-- newUntagResource+--+-- , requestUpdateSchedule $+-- newUpdateSchedule+--+-- ]++-- , testGroup "response"+-- [ responseCreateSchedule $+-- newCreateScheduleResponse+--+-- , responseCreateScheduleGroup $+-- newCreateScheduleGroupResponse+--+-- , responseDeleteSchedule $+-- newDeleteScheduleResponse+--+-- , responseDeleteScheduleGroup $+-- newDeleteScheduleGroupResponse+--+-- , responseGetSchedule $+-- newGetScheduleResponse+--+-- , responseGetScheduleGroup $+-- newGetScheduleGroupResponse+--+-- , responseListScheduleGroups $+-- newListScheduleGroupsResponse+--+-- , responseListSchedules $+-- newListSchedulesResponse+--+-- , responseListTagsForResource $+-- newListTagsForResourceResponse+--+-- , responseTagResource $+-- newTagResourceResponse+--+-- , responseUntagResource $+-- newUntagResourceResponse+--+-- , responseUpdateSchedule $+-- newUpdateScheduleResponse+--+-- ]+-- ]++-- Requests++requestCreateSchedule :: CreateSchedule -> TestTree+requestCreateSchedule =+ req+ "CreateSchedule"+ "fixture/CreateSchedule.yaml"++requestCreateScheduleGroup :: CreateScheduleGroup -> TestTree+requestCreateScheduleGroup =+ req+ "CreateScheduleGroup"+ "fixture/CreateScheduleGroup.yaml"++requestDeleteSchedule :: DeleteSchedule -> TestTree+requestDeleteSchedule =+ req+ "DeleteSchedule"+ "fixture/DeleteSchedule.yaml"++requestDeleteScheduleGroup :: DeleteScheduleGroup -> TestTree+requestDeleteScheduleGroup =+ req+ "DeleteScheduleGroup"+ "fixture/DeleteScheduleGroup.yaml"++requestGetSchedule :: GetSchedule -> TestTree+requestGetSchedule =+ req+ "GetSchedule"+ "fixture/GetSchedule.yaml"++requestGetScheduleGroup :: GetScheduleGroup -> TestTree+requestGetScheduleGroup =+ req+ "GetScheduleGroup"+ "fixture/GetScheduleGroup.yaml"++requestListScheduleGroups :: ListScheduleGroups -> TestTree+requestListScheduleGroups =+ req+ "ListScheduleGroups"+ "fixture/ListScheduleGroups.yaml"++requestListSchedules :: ListSchedules -> TestTree+requestListSchedules =+ req+ "ListSchedules"+ "fixture/ListSchedules.yaml"++requestListTagsForResource :: ListTagsForResource -> TestTree+requestListTagsForResource =+ req+ "ListTagsForResource"+ "fixture/ListTagsForResource.yaml"++requestTagResource :: TagResource -> TestTree+requestTagResource =+ req+ "TagResource"+ "fixture/TagResource.yaml"++requestUntagResource :: UntagResource -> TestTree+requestUntagResource =+ req+ "UntagResource"+ "fixture/UntagResource.yaml"++requestUpdateSchedule :: UpdateSchedule -> TestTree+requestUpdateSchedule =+ req+ "UpdateSchedule"+ "fixture/UpdateSchedule.yaml"++-- Responses++responseCreateSchedule :: CreateScheduleResponse -> TestTree+responseCreateSchedule =+ res+ "CreateScheduleResponse"+ "fixture/CreateScheduleResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateSchedule)++responseCreateScheduleGroup :: CreateScheduleGroupResponse -> TestTree+responseCreateScheduleGroup =+ res+ "CreateScheduleGroupResponse"+ "fixture/CreateScheduleGroupResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy CreateScheduleGroup)++responseDeleteSchedule :: DeleteScheduleResponse -> TestTree+responseDeleteSchedule =+ res+ "DeleteScheduleResponse"+ "fixture/DeleteScheduleResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteSchedule)++responseDeleteScheduleGroup :: DeleteScheduleGroupResponse -> TestTree+responseDeleteScheduleGroup =+ res+ "DeleteScheduleGroupResponse"+ "fixture/DeleteScheduleGroupResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy DeleteScheduleGroup)++responseGetSchedule :: GetScheduleResponse -> TestTree+responseGetSchedule =+ res+ "GetScheduleResponse"+ "fixture/GetScheduleResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetSchedule)++responseGetScheduleGroup :: GetScheduleGroupResponse -> TestTree+responseGetScheduleGroup =+ res+ "GetScheduleGroupResponse"+ "fixture/GetScheduleGroupResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy GetScheduleGroup)++responseListScheduleGroups :: ListScheduleGroupsResponse -> TestTree+responseListScheduleGroups =+ res+ "ListScheduleGroupsResponse"+ "fixture/ListScheduleGroupsResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListScheduleGroups)++responseListSchedules :: ListSchedulesResponse -> TestTree+responseListSchedules =+ res+ "ListSchedulesResponse"+ "fixture/ListSchedulesResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListSchedules)++responseListTagsForResource :: ListTagsForResourceResponse -> TestTree+responseListTagsForResource =+ res+ "ListTagsForResourceResponse"+ "fixture/ListTagsForResourceResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy ListTagsForResource)++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)++responseUpdateSchedule :: UpdateScheduleResponse -> TestTree+responseUpdateSchedule =+ res+ "UpdateScheduleResponse"+ "fixture/UpdateScheduleResponse.proto"+ defaultService+ (Proxy.Proxy :: Proxy.Proxy UpdateSchedule)
+ test/Test/Amazonka/Scheduler.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.Amazonka.Scheduler+-- 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.Scheduler+ ( tests,+ fixtures,+ )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/Scheduler/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module : Test.Amazonka.Scheduler.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.Scheduler.Internal where