amazonka-mediastore (empty) → 1.6.0
raw patch · 44 files changed
+2800/−0 lines, 44 filesdep +amazonka-coredep +amazonka-mediastoredep +amazonka-testsetup-changed
Dependencies added: amazonka-core, amazonka-mediastore, amazonka-test, base, bytestring, tasty, tasty-hunit, text, time, unordered-containers
Files
- LICENSE +367/−0
- README.md +45/−0
- Setup.hs +2/−0
- amazonka-mediastore.cabal +95/−0
- fixture/CreateContainer.yaml +10/−0
- fixture/CreateContainerResponse.proto +0/−0
- fixture/DeleteCORSPolicy.yaml +10/−0
- fixture/DeleteCORSPolicyResponse.proto +0/−0
- fixture/DeleteContainer.yaml +10/−0
- fixture/DeleteContainerPolicy.yaml +10/−0
- fixture/DeleteContainerPolicyResponse.proto +0/−0
- fixture/DeleteContainerResponse.proto +0/−0
- fixture/DescribeContainer.yaml +10/−0
- fixture/DescribeContainerResponse.proto +0/−0
- fixture/GetCORSPolicy.yaml +10/−0
- fixture/GetCORSPolicyResponse.proto +0/−0
- fixture/GetContainerPolicy.yaml +10/−0
- fixture/GetContainerPolicyResponse.proto +0/−0
- fixture/ListContainers.yaml +10/−0
- fixture/ListContainersResponse.proto +0/−0
- fixture/PutCORSPolicy.yaml +10/−0
- fixture/PutCORSPolicyResponse.proto +0/−0
- fixture/PutContainerPolicy.yaml +10/−0
- fixture/PutContainerPolicyResponse.proto +0/−0
- gen/Network/AWS/MediaStore.hs +147/−0
- gen/Network/AWS/MediaStore/CreateContainer.hs +135/−0
- gen/Network/AWS/MediaStore/DeleteCORSPolicy.hs +126/−0
- gen/Network/AWS/MediaStore/DeleteContainer.hs +124/−0
- gen/Network/AWS/MediaStore/DeleteContainerPolicy.hs +126/−0
- gen/Network/AWS/MediaStore/DescribeContainer.hs +132/−0
- gen/Network/AWS/MediaStore/GetCORSPolicy.hs +138/−0
- gen/Network/AWS/MediaStore/GetContainerPolicy.hs +136/−0
- gen/Network/AWS/MediaStore/ListContainers.hs +157/−0
- gen/Network/AWS/MediaStore/PutCORSPolicy.hs +138/−0
- gen/Network/AWS/MediaStore/PutContainerPolicy.hs +137/−0
- gen/Network/AWS/MediaStore/Types.hs +140/−0
- gen/Network/AWS/MediaStore/Types/Product.hs +179/−0
- gen/Network/AWS/MediaStore/Types/Sum.hs +86/−0
- gen/Network/AWS/MediaStore/Waiters.hs +21/−0
- src/.gitkeep +0/−0
- test/Main.hs +21/−0
- test/Test/AWS/Gen/MediaStore.hs +219/−0
- test/Test/AWS/MediaStore.hs +20/−0
- test/Test/AWS/MediaStore/Internal.hs +9/−0
+ LICENSE view
@@ -0,0 +1,367 @@+Mozilla Public License Version 2.0+==================================++1. Definitions+--------------++1.1. "Contributor"+ means each individual or legal entity that creates, contributes to+ the creation of, or owns Covered Software.++1.2. "Contributor Version"+ means the combination of the Contributions of others (if any) used+ by a Contributor and that particular Contributor's Contribution.++1.3. "Contribution"+ means Covered Software of a particular Contributor.++1.4. "Covered Software"+ means Source Code Form to which the initial Contributor has attached+ the notice in Exhibit A, the Executable Form of such Source Code+ Form, and Modifications of such Source Code Form, in each case+ including portions thereof.++1.5. "Incompatible With Secondary Licenses"+ means++ (a) that the initial Contributor has attached the notice described+ in Exhibit B to the Covered Software; or++ (b) that the Covered Software was made available under the terms of+ version 1.1 or earlier of the License, but not also under the+ terms of a Secondary License.++1.6. "Executable Form"+ means any form of the work other than Source Code Form.++1.7. "Larger Work"+ means a work that combines Covered Software with other material, in+ a separate file or files, that is not Covered Software.++1.8. "License"+ means this document.++1.9. "Licensable"+ means having the right to grant, to the maximum extent possible,+ whether at the time of the initial grant or subsequently, any and+ all of the rights conveyed by this License.++1.10. "Modifications"+ means any of the following:++ (a) any file in Source Code Form that results from an addition to,+ deletion from, or modification of the contents of Covered+ Software; or++ (b) any new file in Source Code Form that contains any Covered+ Software.++1.11. "Patent Claims" of a Contributor+ means any patent claim(s), including without limitation, method,+ process, and apparatus claims, in any patent Licensable by such+ Contributor that would be infringed, but for the grant of the+ License, by the making, using, selling, offering for sale, having+ made, import, or transfer of either its Contributions or its+ Contributor Version.++1.12. "Secondary License"+ means either the GNU General Public License, Version 2.0, the GNU+ Lesser General Public License, Version 2.1, the GNU Affero General+ Public License, Version 3.0, or any later versions of those+ licenses.++1.13. "Source Code Form"+ means the form of the work preferred for making modifications.++1.14. "You" (or "Your")+ means an individual or a legal entity exercising rights under this+ License. For legal entities, "You" includes any entity that+ controls, is controlled by, or is under common control with You. For+ purposes of this definition, "control" means (a) the power, direct+ or indirect, to cause the direction or management of such entity,+ whether by contract or otherwise, or (b) ownership of more than+ fifty percent (50%) of the outstanding shares or beneficial+ ownership of such entity.++2. License Grants and Conditions+--------------------------------++2.1. Grants++Each Contributor hereby grants You a world-wide, royalty-free,+non-exclusive license:++(a) under intellectual property rights (other than patent or trademark)+ Licensable by such Contributor to use, reproduce, make available,+ modify, display, perform, distribute, and otherwise exploit its+ Contributions, either on an unmodified basis, with Modifications, or+ as part of a Larger Work; and++(b) under Patent Claims of such Contributor to make, use, sell, offer+ for sale, have made, import, and otherwise transfer either its+ Contributions or its Contributor Version.++2.2. Effective Date++The licenses granted in Section 2.1 with respect to any Contribution+become effective for each Contribution on the date the Contributor first+distributes such Contribution.++2.3. Limitations on Grant Scope++The licenses granted in this Section 2 are the only rights granted under+this License. No additional rights or licenses will be implied from the+distribution or licensing of Covered Software under this License.+Notwithstanding Section 2.1(b) above, no patent license is granted by a+Contributor:++(a) for any code that a Contributor has removed from Covered Software;+ or++(b) for infringements caused by: (i) Your and any other third party's+ modifications of Covered Software, or (ii) the combination of its+ Contributions with other software (except as part of its Contributor+ Version); or++(c) under Patent Claims infringed by Covered Software in the absence of+ its Contributions.++This License does not grant any rights in the trademarks, service marks,+or logos of any Contributor (except as may be necessary to comply with+the notice requirements in Section 3.4).++2.4. Subsequent Licenses++No Contributor makes additional grants as a result of Your choice to+distribute the Covered Software under a subsequent version of this+License (see Section 10.2) or under the terms of a Secondary License (if+permitted under the terms of Section 3.3).++2.5. Representation++Each Contributor represents that the Contributor believes its+Contributions are its original creation(s) or it has sufficient rights+to grant the rights to its Contributions conveyed by this License.++2.6. Fair Use++This License is not intended to limit any rights You have under+applicable copyright doctrines of fair use, fair dealing, or other+equivalents.++2.7. Conditions++Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted+in Section 2.1.++3. Responsibilities+-------------------++3.1. Distribution of Source Form++All distribution of Covered Software in Source Code Form, including any+Modifications that You create or to which You contribute, must be under+the terms of this License. You must inform recipients that the Source+Code Form of the Covered Software is governed by the terms of this+License, and how they can obtain a copy of this License. You may not+attempt to alter or restrict the recipients' rights in the Source Code+Form.++3.2. Distribution of Executable Form++If You distribute Covered Software in Executable Form then:++(a) such Covered Software must also be made available in Source Code+ Form, as described in Section 3.1, and You must inform recipients of+ the Executable Form how they can obtain a copy of such Source Code+ Form by reasonable means in a timely manner, at a charge no more+ than the cost of distribution to the recipient; and++(b) You may distribute such Executable Form under the terms of this+ License, or sublicense it under different terms, provided that the+ license for the Executable Form does not attempt to limit or alter+ the recipients' rights in the Source Code Form under this License.++3.3. Distribution of a Larger Work++You may create and distribute a Larger Work under terms of Your choice,+provided that You also comply with the requirements of this License for+the Covered Software. If the Larger Work is a combination of Covered+Software with a work governed by one or more Secondary Licenses, and the+Covered Software is not Incompatible With Secondary Licenses, this+License permits You to additionally distribute such Covered Software+under the terms of such Secondary License(s), so that the recipient of+the Larger Work may, at their option, further distribute the Covered+Software under the terms of either this License or such Secondary+License(s).++3.4. Notices++You may not remove or alter the substance of any license notices+(including copyright notices, patent notices, disclaimers of warranty,+or limitations of liability) contained within the Source Code Form of+the Covered Software, except that You may alter any license notices to+the extent required to remedy known factual inaccuracies.++3.5. Application of Additional Terms++You may choose to offer, and to charge a fee for, warranty, support,+indemnity or liability obligations to one or more recipients of Covered+Software. However, You may do so only on Your own behalf, and not on+behalf of any Contributor. You must make it absolutely clear that any+such warranty, support, indemnity, or liability obligation is offered by+You alone, and You hereby agree to indemnify every Contributor for any+liability incurred by such Contributor as a result of warranty, support,+indemnity or liability terms You offer. You may include additional+disclaimers of warranty and limitations of liability specific to any+jurisdiction.++4. Inability to Comply Due to Statute or Regulation+---------------------------------------------------++If it is impossible for You to comply with any of the terms of this+License with respect to some or all of the Covered Software due to+statute, judicial order, or regulation then You must: (a) comply with+the terms of this License to the maximum extent possible; and (b)+describe the limitations and the code they affect. Such description must+be placed in a text file included with all distributions of the Covered+Software under this License. Except to the extent prohibited by statute+or regulation, such description must be sufficiently detailed for a+recipient of ordinary skill to be able to understand it.++5. Termination+--------------++5.1. The rights granted under this License will terminate automatically+if You fail to comply with any of its terms. However, if You become+compliant, then the rights granted under this License from a particular+Contributor are reinstated (a) provisionally, unless and until such+Contributor explicitly and finally terminates Your grants, and (b) on an+ongoing basis, if such Contributor fails to notify You of the+non-compliance by some reasonable means prior to 60 days after You have+come back into compliance. Moreover, Your grants from a particular+Contributor are reinstated on an ongoing basis if such Contributor+notifies You of the non-compliance by some reasonable means, this is the+first time You have received notice of non-compliance with this License+from such Contributor, and You become compliant prior to 30 days after+Your receipt of the notice.++5.2. If You initiate litigation against any entity by asserting a patent+infringement claim (excluding declaratory judgment actions,+counter-claims, and cross-claims) alleging that a Contributor Version+directly or indirectly infringes any patent, then the rights granted to+You by any and all Contributors for the Covered Software under Section+2.1 of this License shall terminate.++5.3. In the event of termination under Sections 5.1 or 5.2 above, all+end user license agreements (excluding distributors and resellers) which+have been validly granted by You or Your distributors under this License+prior to termination shall survive termination.++************************************************************************+* *+* 6. Disclaimer of Warranty *+* ------------------------- *+* *+* Covered Software is provided under this License on an "as is" *+* basis, without warranty of any kind, either expressed, implied, or *+* statutory, including, without limitation, warranties that the *+* Covered Software is free of defects, merchantable, fit for a *+* particular purpose or non-infringing. The entire risk as to the *+* quality and performance of the Covered Software is with You. *+* Should any Covered Software prove defective in any respect, You *+* (not any Contributor) assume the cost of any necessary servicing, *+* repair, or correction. This disclaimer of warranty constitutes an *+* essential part of this License. No use of any Covered Software is *+* authorized under this License except under this disclaimer. *+* *+************************************************************************++************************************************************************+* *+* 7. Limitation of Liability *+* -------------------------- *+* *+* Under no circumstances and under no legal theory, whether tort *+* (including negligence), contract, or otherwise, shall any *+* Contributor, or anyone who distributes Covered Software as *+* permitted above, be liable to You for any direct, indirect, *+* special, incidental, or consequential damages of any character *+* including, without limitation, damages for lost profits, loss of *+* goodwill, work stoppage, computer failure or malfunction, or any *+* and all other commercial damages or losses, even if such party *+* shall have been informed of the possibility of such damages. This *+* limitation of liability shall not apply to liability for death or *+* personal injury resulting from such party's negligence to the *+* extent applicable law prohibits such limitation. Some *+* jurisdictions do not allow the exclusion or limitation of *+* incidental or consequential damages, so this exclusion and *+* limitation may not apply to You. *+* *+************************************************************************++8. Litigation+-------------++Any litigation relating to this License may be brought only in the+courts of a jurisdiction where the defendant maintains its principal+place of business and such litigation shall be governed by laws of that+jurisdiction, without reference to its conflict-of-law provisions.+Nothing in this Section shall prevent a party's ability to bring+cross-claims or counter-claims.++9. Miscellaneous+----------------++This License represents the complete agreement concerning the subject+matter hereof. If any provision of this License is held to be+unenforceable, such provision shall be reformed only to the extent+necessary to make it enforceable. Any law or regulation which provides+that the language of a contract shall be construed against the drafter+shall not be used to construe this License against a Contributor.++10. Versions of the License+---------------------------++10.1. New Versions++Mozilla Foundation is the license steward. Except as provided in Section+10.3, no one other than the license steward has the right to modify or+publish new versions of this License. Each version will be given a+distinguishing version number.++10.2. Effect of New Versions++You may distribute the Covered Software under the terms of the version+of the License under which You originally received the Covered Software,+or under the terms of any subsequent version published by the license+steward.++10.3. Modified Versions++If you create software not governed by this License, and you want to+create a new license for such software, you may create and use a+modified version of this License if you rename the license and remove+any references to the name of the license steward (except to note that+such modified license differs from this License).++10.4. Distributing Source Code Form that is Incompatible With Secondary+Licenses++If You choose to distribute Source Code Form that is Incompatible With+Secondary Licenses under the terms of this version of the License, the+notice described in Exhibit B of this License must be attached.++Exhibit A - Source Code Form License Notice+-------------------------------------------++ This Source Code Form is subject to the terms of the Mozilla Public+ License, v. 2.0. If a copy of the MPL was not distributed with this+ file, You can obtain one at http://mozilla.org/MPL/2.0/.++If it is not possible or desirable to put the notice in a particular+file, then You may include the notice in a location (such as a LICENSE+file in a relevant directory) where a recipient would be likely to look+for such a notice.++You may add additional accurate notices of copyright ownership.
+ README.md view
@@ -0,0 +1,45 @@+# Amazon Elemental MediaStore SDK++* [Version](#version)+* [Description](#description)+* [Contribute](#contribute)+* [Licence](#licence)+++## Version++`1.6.0`+++## Description++Documentation is available via [Hackage](http://hackage.haskell.org/package/amazonka-mediastore)+and the [AWS API Reference](https://aws.amazon.com/documentation/).++The types from this library are intended to be used with [amazonka](http://hackage.haskell.org/package/amazonka),+which provides mechanisms for specifying AuthN/AuthZ information, sending requests,+and receiving responses.++Lenses are used for constructing and manipulating types,+due to the depth of nesting of AWS types and transparency regarding+de/serialisation into more palatable Haskell values.+The provided lenses should be compatible with any of the major lens libraries+[lens](http://hackage.haskell.org/package/lens) or [lens-family-core](http://hackage.haskell.org/package/lens-family-core).++See [Network.AWS.MediaStore](http://hackage.haskell.org/package/amazonka-mediastore/docs/Network-AWS-MediaStore.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-mediastore` is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/).++Parts of the code are derived from AWS service descriptions, licensed under Apache 2.0.+Source files subject to this contain an additional licensing clause in their header.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ amazonka-mediastore.cabal view
@@ -0,0 +1,95 @@+name: amazonka-mediastore+version: 1.6.0+synopsis: Amazon Elemental MediaStore SDK.+homepage: https://github.com/brendanhay/amazonka+bug-reports: https://github.com/brendanhay/amazonka/issues+license: MPL-2.0+license-file: LICENSE+author: Brendan Hay+maintainer: Brendan Hay <brendan.g.hay+amazonka@gmail.com>+copyright: Copyright (c) 2013-2018 Brendan Hay+category: Network, AWS, Cloud, Distributed Computing+build-type: Simple+cabal-version: >= 1.10+extra-source-files: README.md fixture/*.yaml fixture/*.proto src/.gitkeep+description:+ The types from this library are intended to be used with+ <http://hackage.haskell.org/package/amazonka amazonka>, which provides+ mechanisms for specifying AuthN/AuthZ information, sending requests,+ and receiving responses.+ .+ Lenses are used for constructing and manipulating types,+ due to the depth of nesting of AWS types and transparency regarding+ de/serialisation into more palatable Haskell values.+ The provided lenses should be compatible with any of the major lens libraries+ such as <http://hackage.haskell.org/package/lens lens> or+ <http://hackage.haskell.org/package/lens-family-core lens-family-core>.+ .+ See "Network.AWS.MediaStore" or <https://aws.amazon.com/documentation/ the AWS documentation>+ to get started.++source-repository head+ type: git+ location: git://github.com/brendanhay/amazonka.git+ subdir: amazonka-mediastore++library+ default-language: Haskell2010+ hs-source-dirs: src gen++ ghc-options:+ -Wall+ -fwarn-incomplete-uni-patterns+ -fwarn-incomplete-record-updates+ -funbox-strict-fields++ exposed-modules:+ Network.AWS.MediaStore+ , Network.AWS.MediaStore.CreateContainer+ , Network.AWS.MediaStore.DeleteCORSPolicy+ , Network.AWS.MediaStore.DeleteContainer+ , Network.AWS.MediaStore.DeleteContainerPolicy+ , Network.AWS.MediaStore.DescribeContainer+ , Network.AWS.MediaStore.GetCORSPolicy+ , Network.AWS.MediaStore.GetContainerPolicy+ , Network.AWS.MediaStore.ListContainers+ , Network.AWS.MediaStore.PutCORSPolicy+ , Network.AWS.MediaStore.PutContainerPolicy+ , Network.AWS.MediaStore.Types+ , Network.AWS.MediaStore.Waiters++ other-modules:+ Network.AWS.MediaStore.Types.Product+ , Network.AWS.MediaStore.Types.Sum++ build-depends:+ amazonka-core == 1.6.0.*+ , base >= 4.7 && < 5++test-suite amazonka-mediastore-test+ type: exitcode-stdio-1.0+ default-language: Haskell2010+ hs-source-dirs: test+ main-is: Main.hs++ ghc-options: -Wall -threaded++ -- This section is encoded by the template and any modules added by+ -- hand outside these namespaces will not correctly be added to the+ -- distribution package.+ other-modules:+ Test.AWS.MediaStore+ , Test.AWS.Gen.MediaStore+ , Test.AWS.MediaStore.Internal++ build-depends:+ amazonka-core == 1.6.0.*+ , amazonka-test == 1.6.0.*+ , amazonka-mediastore+ , base+ , bytestring+ , tasty+ , tasty-hunit+ , text+ , time+ , unordered-containers
+ fixture/CreateContainer.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mediastore/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mediastore.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/CreateContainerResponse.proto view
+ fixture/DeleteCORSPolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mediastore/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mediastore.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/DeleteCORSPolicyResponse.proto view
+ fixture/DeleteContainer.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mediastore/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mediastore.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/DeleteContainerPolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mediastore/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mediastore.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/DeleteContainerPolicyResponse.proto view
+ fixture/DeleteContainerResponse.proto view
+ fixture/DescribeContainer.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mediastore/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mediastore.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/DescribeContainerResponse.proto view
+ fixture/GetCORSPolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mediastore/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mediastore.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/GetCORSPolicyResponse.proto view
+ fixture/GetContainerPolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mediastore/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mediastore.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/GetContainerPolicyResponse.proto view
+ fixture/ListContainers.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mediastore/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mediastore.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/ListContainersResponse.proto view
+ fixture/PutCORSPolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mediastore/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mediastore.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/PutCORSPolicyResponse.proto view
+ fixture/PutContainerPolicy.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+ Authorization: AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/mediastore/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+ Host: mediastore.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/PutContainerPolicyResponse.proto view
+ gen/Network/AWS/MediaStore.hs view
@@ -0,0 +1,147 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MediaStore+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- An AWS Elemental MediaStore container is a namespace that holds folders and objects. You use a container endpoint to create, read, and delete objects.+--+--+module Network.AWS.MediaStore+ (+ -- * Service Configuration+ mediaStore++ -- * Errors+ -- $errors++ -- ** PolicyNotFoundException+ , _PolicyNotFoundException++ -- ** CORSPolicyNotFoundException+ , _CORSPolicyNotFoundException++ -- ** ContainerInUseException+ , _ContainerInUseException++ -- ** InternalServerError+ , _InternalServerError++ -- ** ContainerNotFoundException+ , _ContainerNotFoundException++ -- ** LimitExceededException+ , _LimitExceededException++ -- * Waiters+ -- $waiters++ -- * Operations+ -- $operations++ -- ** CreateContainer+ , module Network.AWS.MediaStore.CreateContainer++ -- ** ListContainers+ , module Network.AWS.MediaStore.ListContainers++ -- ** DeleteContainer+ , module Network.AWS.MediaStore.DeleteContainer++ -- ** PutCORSPolicy+ , module Network.AWS.MediaStore.PutCORSPolicy++ -- ** DeleteCORSPolicy+ , module Network.AWS.MediaStore.DeleteCORSPolicy++ -- ** DescribeContainer+ , module Network.AWS.MediaStore.DescribeContainer++ -- ** GetCORSPolicy+ , module Network.AWS.MediaStore.GetCORSPolicy++ -- ** DeleteContainerPolicy+ , module Network.AWS.MediaStore.DeleteContainerPolicy++ -- ** PutContainerPolicy+ , module Network.AWS.MediaStore.PutContainerPolicy++ -- ** GetContainerPolicy+ , module Network.AWS.MediaStore.GetContainerPolicy++ -- * Types++ -- ** ContainerStatus+ , ContainerStatus (..)++ -- ** MethodName+ , MethodName (..)++ -- ** CORSRule+ , CORSRule+ , corsRule+ , crAllowedMethods+ , crMaxAgeSeconds+ , crAllowedHeaders+ , crAllowedOrigins+ , crExposeHeaders++ -- ** Container+ , Container+ , container+ , cCreationTime+ , cStatus+ , cARN+ , cName+ , cEndpoint+ ) where++import Network.AWS.MediaStore.CreateContainer+import Network.AWS.MediaStore.DeleteContainer+import Network.AWS.MediaStore.DeleteContainerPolicy+import Network.AWS.MediaStore.DeleteCORSPolicy+import Network.AWS.MediaStore.DescribeContainer+import Network.AWS.MediaStore.GetContainerPolicy+import Network.AWS.MediaStore.GetCORSPolicy+import Network.AWS.MediaStore.ListContainers+import Network.AWS.MediaStore.PutContainerPolicy+import Network.AWS.MediaStore.PutCORSPolicy+import Network.AWS.MediaStore.Types+import Network.AWS.MediaStore.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 'MediaStore'.+-}++{- $operations+Some AWS operations return results that are incomplete and require subsequent+requests in order to obtain the entire result set. The process of sending+subsequent requests to continue where a previous request left off is called+pagination. For example, the 'ListObjects' operation of Amazon S3 returns up to+1000 objects at a time, and you must send subsequent requests with the+appropriate Marker in order to retrieve the next page of results.++Operations that have an 'AWSPager' instance can transparently perform subsequent+requests, correctly setting Markers and other request facets to iterate through+the entire result set of a truncated API operation. Operations which support+this have an additional note in the documentation.++Many operations have the ability to filter results on the server side. See the+individual operation parameters for details.+-}++{- $waiters+Waiters poll by repeatedly sending a request until some remote success condition+configured by the 'Wait' specification is fulfilled. The 'Wait' specification+determines how many attempts should be made, in addition to delay and retry strategies.+-}
+ gen/Network/AWS/MediaStore/CreateContainer.hs view
@@ -0,0 +1,135 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MediaStore.CreateContainer+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates a storage container to hold objects. A container is similar to a bucket in the Amazon S3 service.+--+--+module Network.AWS.MediaStore.CreateContainer+ (+ -- * Creating a Request+ createContainer+ , CreateContainer+ -- * Request Lenses+ , ccContainerName++ -- * Destructuring the Response+ , createContainerResponse+ , CreateContainerResponse+ -- * Response Lenses+ , ccrsResponseStatus+ , ccrsContainer+ ) where++import Network.AWS.Lens+import Network.AWS.MediaStore.Types+import Network.AWS.MediaStore.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'createContainer' smart constructor.+newtype CreateContainer = CreateContainer'+ { _ccContainerName :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateContainer' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ccContainerName' - The name for the container. The name must be from 1 to 255 characters. Container names must be unique to your AWS account within a specific region. As an example, you could create a container named @movies@ in every region, as long as you don’t have an existing container with that name.+createContainer+ :: Text -- ^ 'ccContainerName'+ -> CreateContainer+createContainer pContainerName_ =+ CreateContainer' {_ccContainerName = pContainerName_}+++-- | The name for the container. The name must be from 1 to 255 characters. Container names must be unique to your AWS account within a specific region. As an example, you could create a container named @movies@ in every region, as long as you don’t have an existing container with that name.+ccContainerName :: Lens' CreateContainer Text+ccContainerName = lens _ccContainerName (\ s a -> s{_ccContainerName = a})++instance AWSRequest CreateContainer where+ type Rs CreateContainer = CreateContainerResponse+ request = postJSON mediaStore+ response+ = receiveJSON+ (\ s h x ->+ CreateContainerResponse' <$>+ (pure (fromEnum s)) <*> (x .:> "Container"))++instance Hashable CreateContainer where++instance NFData CreateContainer where++instance ToHeaders CreateContainer where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MediaStore_20170901.CreateContainer" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON CreateContainer where+ toJSON CreateContainer'{..}+ = object+ (catMaybes+ [Just ("ContainerName" .= _ccContainerName)])++instance ToPath CreateContainer where+ toPath = const "/"++instance ToQuery CreateContainer where+ toQuery = const mempty++-- | /See:/ 'createContainerResponse' smart constructor.+data CreateContainerResponse = CreateContainerResponse'+ { _ccrsResponseStatus :: !Int+ , _ccrsContainer :: !Container+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CreateContainerResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'ccrsResponseStatus' - -- | The response status code.+--+-- * 'ccrsContainer' - ContainerARN: The Amazon Resource Name (ARN) of the newly created container. The ARN has the following format: arn:aws:<region>:<account that owns this container>:container/<name of container>. For example: arn:aws:mediastore:us-west-2:111122223333:container/movies ContainerName: The container name as specified in the request. CreationTime: Unix time stamp. Status: The status of container creation or deletion. The status is one of the following: @CREATING@ , @ACTIVE@ , or @DELETING@ . While the service is creating the container, the status is @CREATING@ . When an endpoint is available, the status changes to @ACTIVE@ . The return value does not include the container's endpoint. To make downstream requests, you must obtain this value by using 'DescribeContainer' or 'ListContainers' .+createContainerResponse+ :: Int -- ^ 'ccrsResponseStatus'+ -> Container -- ^ 'ccrsContainer'+ -> CreateContainerResponse+createContainerResponse pResponseStatus_ pContainer_ =+ CreateContainerResponse'+ {_ccrsResponseStatus = pResponseStatus_, _ccrsContainer = pContainer_}+++-- | -- | The response status code.+ccrsResponseStatus :: Lens' CreateContainerResponse Int+ccrsResponseStatus = lens _ccrsResponseStatus (\ s a -> s{_ccrsResponseStatus = a})++-- | ContainerARN: The Amazon Resource Name (ARN) of the newly created container. The ARN has the following format: arn:aws:<region>:<account that owns this container>:container/<name of container>. For example: arn:aws:mediastore:us-west-2:111122223333:container/movies ContainerName: The container name as specified in the request. CreationTime: Unix time stamp. Status: The status of container creation or deletion. The status is one of the following: @CREATING@ , @ACTIVE@ , or @DELETING@ . While the service is creating the container, the status is @CREATING@ . When an endpoint is available, the status changes to @ACTIVE@ . The return value does not include the container's endpoint. To make downstream requests, you must obtain this value by using 'DescribeContainer' or 'ListContainers' .+ccrsContainer :: Lens' CreateContainerResponse Container+ccrsContainer = lens _ccrsContainer (\ s a -> s{_ccrsContainer = a})++instance NFData CreateContainerResponse where
+ gen/Network/AWS/MediaStore/DeleteCORSPolicy.hs view
@@ -0,0 +1,126 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MediaStore.DeleteCORSPolicy+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the cross-origin resource sharing (CORS) configuration information that is set for the container.+--+--+-- To use this operation, you must have permission to perform the @MediaStore:DeleteCorsPolicy@ action. The container owner has this permission by default and can grant this permission to others.+--+module Network.AWS.MediaStore.DeleteCORSPolicy+ (+ -- * Creating a Request+ deleteCORSPolicy+ , DeleteCORSPolicy+ -- * Request Lenses+ , dcpContainerName++ -- * Destructuring the Response+ , deleteCORSPolicyResponse+ , DeleteCORSPolicyResponse+ -- * Response Lenses+ , dcorsprsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MediaStore.Types+import Network.AWS.MediaStore.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'deleteCORSPolicy' smart constructor.+newtype DeleteCORSPolicy = DeleteCORSPolicy'+ { _dcpContainerName :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteCORSPolicy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dcpContainerName' - The name of the container to remove the policy from.+deleteCORSPolicy+ :: Text -- ^ 'dcpContainerName'+ -> DeleteCORSPolicy+deleteCORSPolicy pContainerName_ =+ DeleteCORSPolicy' {_dcpContainerName = pContainerName_}+++-- | The name of the container to remove the policy from.+dcpContainerName :: Lens' DeleteCORSPolicy Text+dcpContainerName = lens _dcpContainerName (\ s a -> s{_dcpContainerName = a})++instance AWSRequest DeleteCORSPolicy where+ type Rs DeleteCORSPolicy = DeleteCORSPolicyResponse+ request = postJSON mediaStore+ response+ = receiveEmpty+ (\ s h x ->+ DeleteCORSPolicyResponse' <$> (pure (fromEnum s)))++instance Hashable DeleteCORSPolicy where++instance NFData DeleteCORSPolicy where++instance ToHeaders DeleteCORSPolicy where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MediaStore_20170901.DeleteCorsPolicy" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteCORSPolicy where+ toJSON DeleteCORSPolicy'{..}+ = object+ (catMaybes+ [Just ("ContainerName" .= _dcpContainerName)])++instance ToPath DeleteCORSPolicy where+ toPath = const "/"++instance ToQuery DeleteCORSPolicy where+ toQuery = const mempty++-- | /See:/ 'deleteCORSPolicyResponse' smart constructor.+newtype DeleteCORSPolicyResponse = DeleteCORSPolicyResponse'+ { _dcorsprsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteCORSPolicyResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dcorsprsResponseStatus' - -- | The response status code.+deleteCORSPolicyResponse+ :: Int -- ^ 'dcorsprsResponseStatus'+ -> DeleteCORSPolicyResponse+deleteCORSPolicyResponse pResponseStatus_ =+ DeleteCORSPolicyResponse' {_dcorsprsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+dcorsprsResponseStatus :: Lens' DeleteCORSPolicyResponse Int+dcorsprsResponseStatus = lens _dcorsprsResponseStatus (\ s a -> s{_dcorsprsResponseStatus = a})++instance NFData DeleteCORSPolicyResponse where
+ gen/Network/AWS/MediaStore/DeleteContainer.hs view
@@ -0,0 +1,124 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MediaStore.DeleteContainer+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the specified container. Before you make a @DeleteContainer@ request, delete any objects in the container or in any folders in the container. You can delete only empty containers.+--+--+module Network.AWS.MediaStore.DeleteContainer+ (+ -- * Creating a Request+ deleteContainer+ , DeleteContainer+ -- * Request Lenses+ , dcContainerName++ -- * Destructuring the Response+ , deleteContainerResponse+ , DeleteContainerResponse+ -- * Response Lenses+ , dcrsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MediaStore.Types+import Network.AWS.MediaStore.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'deleteContainer' smart constructor.+newtype DeleteContainer = DeleteContainer'+ { _dcContainerName :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteContainer' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dcContainerName' - The name of the container to delete.+deleteContainer+ :: Text -- ^ 'dcContainerName'+ -> DeleteContainer+deleteContainer pContainerName_ =+ DeleteContainer' {_dcContainerName = pContainerName_}+++-- | The name of the container to delete.+dcContainerName :: Lens' DeleteContainer Text+dcContainerName = lens _dcContainerName (\ s a -> s{_dcContainerName = a})++instance AWSRequest DeleteContainer where+ type Rs DeleteContainer = DeleteContainerResponse+ request = postJSON mediaStore+ response+ = receiveEmpty+ (\ s h x ->+ DeleteContainerResponse' <$> (pure (fromEnum s)))++instance Hashable DeleteContainer where++instance NFData DeleteContainer where++instance ToHeaders DeleteContainer where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MediaStore_20170901.DeleteContainer" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteContainer where+ toJSON DeleteContainer'{..}+ = object+ (catMaybes+ [Just ("ContainerName" .= _dcContainerName)])++instance ToPath DeleteContainer where+ toPath = const "/"++instance ToQuery DeleteContainer where+ toQuery = const mempty++-- | /See:/ 'deleteContainerResponse' smart constructor.+newtype DeleteContainerResponse = DeleteContainerResponse'+ { _dcrsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteContainerResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dcrsResponseStatus' - -- | The response status code.+deleteContainerResponse+ :: Int -- ^ 'dcrsResponseStatus'+ -> DeleteContainerResponse+deleteContainerResponse pResponseStatus_ =+ DeleteContainerResponse' {_dcrsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+dcrsResponseStatus :: Lens' DeleteContainerResponse Int+dcrsResponseStatus = lens _dcrsResponseStatus (\ s a -> s{_dcrsResponseStatus = a})++instance NFData DeleteContainerResponse where
+ gen/Network/AWS/MediaStore/DeleteContainerPolicy.hs view
@@ -0,0 +1,126 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MediaStore.DeleteContainerPolicy+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Deletes the access policy that is associated with the specified container.+--+--+module Network.AWS.MediaStore.DeleteContainerPolicy+ (+ -- * Creating a Request+ deleteContainerPolicy+ , DeleteContainerPolicy+ -- * Request Lenses+ , delContainerName++ -- * Destructuring the Response+ , deleteContainerPolicyResponse+ , DeleteContainerPolicyResponse+ -- * Response Lenses+ , dcprsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MediaStore.Types+import Network.AWS.MediaStore.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'deleteContainerPolicy' smart constructor.+newtype DeleteContainerPolicy = DeleteContainerPolicy'+ { _delContainerName :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteContainerPolicy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'delContainerName' - The name of the container that holds the policy.+deleteContainerPolicy+ :: Text -- ^ 'delContainerName'+ -> DeleteContainerPolicy+deleteContainerPolicy pContainerName_ =+ DeleteContainerPolicy' {_delContainerName = pContainerName_}+++-- | The name of the container that holds the policy.+delContainerName :: Lens' DeleteContainerPolicy Text+delContainerName = lens _delContainerName (\ s a -> s{_delContainerName = a})++instance AWSRequest DeleteContainerPolicy where+ type Rs DeleteContainerPolicy =+ DeleteContainerPolicyResponse+ request = postJSON mediaStore+ response+ = receiveEmpty+ (\ s h x ->+ DeleteContainerPolicyResponse' <$>+ (pure (fromEnum s)))++instance Hashable DeleteContainerPolicy where++instance NFData DeleteContainerPolicy where++instance ToHeaders DeleteContainerPolicy where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MediaStore_20170901.DeleteContainerPolicy" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DeleteContainerPolicy where+ toJSON DeleteContainerPolicy'{..}+ = object+ (catMaybes+ [Just ("ContainerName" .= _delContainerName)])++instance ToPath DeleteContainerPolicy where+ toPath = const "/"++instance ToQuery DeleteContainerPolicy where+ toQuery = const mempty++-- | /See:/ 'deleteContainerPolicyResponse' smart constructor.+newtype DeleteContainerPolicyResponse = DeleteContainerPolicyResponse'+ { _dcprsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DeleteContainerPolicyResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dcprsResponseStatus' - -- | The response status code.+deleteContainerPolicyResponse+ :: Int -- ^ 'dcprsResponseStatus'+ -> DeleteContainerPolicyResponse+deleteContainerPolicyResponse pResponseStatus_ =+ DeleteContainerPolicyResponse' {_dcprsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+dcprsResponseStatus :: Lens' DeleteContainerPolicyResponse Int+dcprsResponseStatus = lens _dcprsResponseStatus (\ s a -> s{_dcprsResponseStatus = a})++instance NFData DeleteContainerPolicyResponse where
+ gen/Network/AWS/MediaStore/DescribeContainer.hs view
@@ -0,0 +1,132 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MediaStore.DescribeContainer+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves the properties of the requested container. This request is commonly used to retrieve the endpoint of a container. An endpoint is a value assigned by the service when a new container is created. A container's endpoint does not change after it has been assigned. The @DescribeContainer@ request returns a single @Container@ object based on @ContainerName@ . To return all @Container@ objects that are associated with a specified AWS account, use 'ListContainers' .+--+--+module Network.AWS.MediaStore.DescribeContainer+ (+ -- * Creating a Request+ describeContainer+ , DescribeContainer+ -- * Request Lenses+ , dContainerName++ -- * Destructuring the Response+ , describeContainerResponse+ , DescribeContainerResponse+ -- * Response Lenses+ , drsContainer+ , drsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MediaStore.Types+import Network.AWS.MediaStore.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'describeContainer' smart constructor.+newtype DescribeContainer = DescribeContainer'+ { _dContainerName :: Maybe Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeContainer' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'dContainerName' - The name of the container to query.+describeContainer+ :: DescribeContainer+describeContainer = DescribeContainer' {_dContainerName = Nothing}+++-- | The name of the container to query.+dContainerName :: Lens' DescribeContainer (Maybe Text)+dContainerName = lens _dContainerName (\ s a -> s{_dContainerName = a})++instance AWSRequest DescribeContainer where+ type Rs DescribeContainer = DescribeContainerResponse+ request = postJSON mediaStore+ response+ = receiveJSON+ (\ s h x ->+ DescribeContainerResponse' <$>+ (x .?> "Container") <*> (pure (fromEnum s)))++instance Hashable DescribeContainer where++instance NFData DescribeContainer where++instance ToHeaders DescribeContainer where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MediaStore_20170901.DescribeContainer" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON DescribeContainer where+ toJSON DescribeContainer'{..}+ = object+ (catMaybes+ [("ContainerName" .=) <$> _dContainerName])++instance ToPath DescribeContainer where+ toPath = const "/"++instance ToQuery DescribeContainer where+ toQuery = const mempty++-- | /See:/ 'describeContainerResponse' smart constructor.+data DescribeContainerResponse = DescribeContainerResponse'+ { _drsContainer :: !(Maybe Container)+ , _drsResponseStatus :: !Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'DescribeContainerResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'drsContainer' - The name of the queried container.+--+-- * 'drsResponseStatus' - -- | The response status code.+describeContainerResponse+ :: Int -- ^ 'drsResponseStatus'+ -> DescribeContainerResponse+describeContainerResponse pResponseStatus_ =+ DescribeContainerResponse'+ {_drsContainer = Nothing, _drsResponseStatus = pResponseStatus_}+++-- | The name of the queried container.+drsContainer :: Lens' DescribeContainerResponse (Maybe Container)+drsContainer = lens _drsContainer (\ s a -> s{_drsContainer = a})++-- | -- | The response status code.+drsResponseStatus :: Lens' DescribeContainerResponse Int+drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a})++instance NFData DescribeContainerResponse where
+ gen/Network/AWS/MediaStore/GetCORSPolicy.hs view
@@ -0,0 +1,138 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MediaStore.GetCORSPolicy+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Returns the cross-origin resource sharing (CORS) configuration information that is set for the container.+--+--+-- To use this operation, you must have permission to perform the @MediaStore:GetCorsPolicy@ action. By default, the container owner has this permission and can grant it to others.+--+module Network.AWS.MediaStore.GetCORSPolicy+ (+ -- * Creating a Request+ getCORSPolicy+ , GetCORSPolicy+ -- * Request Lenses+ , gcpContainerName++ -- * Destructuring the Response+ , getCORSPolicyResponse+ , GetCORSPolicyResponse+ -- * Response Lenses+ , gcorsprsResponseStatus+ , gcorsprsCORSPolicy+ ) where++import Network.AWS.Lens+import Network.AWS.MediaStore.Types+import Network.AWS.MediaStore.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'getCORSPolicy' smart constructor.+newtype GetCORSPolicy = GetCORSPolicy'+ { _gcpContainerName :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetCORSPolicy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gcpContainerName' - The name of the container that the policy is assigned to.+getCORSPolicy+ :: Text -- ^ 'gcpContainerName'+ -> GetCORSPolicy+getCORSPolicy pContainerName_ =+ GetCORSPolicy' {_gcpContainerName = pContainerName_}+++-- | The name of the container that the policy is assigned to.+gcpContainerName :: Lens' GetCORSPolicy Text+gcpContainerName = lens _gcpContainerName (\ s a -> s{_gcpContainerName = a})++instance AWSRequest GetCORSPolicy where+ type Rs GetCORSPolicy = GetCORSPolicyResponse+ request = postJSON mediaStore+ response+ = receiveJSON+ (\ s h x ->+ GetCORSPolicyResponse' <$>+ (pure (fromEnum s)) <*> (x .:> "CorsPolicy"))++instance Hashable GetCORSPolicy where++instance NFData GetCORSPolicy where++instance ToHeaders GetCORSPolicy where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MediaStore_20170901.GetCorsPolicy" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetCORSPolicy where+ toJSON GetCORSPolicy'{..}+ = object+ (catMaybes+ [Just ("ContainerName" .= _gcpContainerName)])++instance ToPath GetCORSPolicy where+ toPath = const "/"++instance ToQuery GetCORSPolicy where+ toQuery = const mempty++-- | /See:/ 'getCORSPolicyResponse' smart constructor.+data GetCORSPolicyResponse = GetCORSPolicyResponse'+ { _gcorsprsResponseStatus :: !Int+ , _gcorsprsCORSPolicy :: !(List1 CORSRule)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetCORSPolicyResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gcorsprsResponseStatus' - -- | The response status code.+--+-- * 'gcorsprsCORSPolicy' - Undocumented member.+getCORSPolicyResponse+ :: Int -- ^ 'gcorsprsResponseStatus'+ -> NonEmpty CORSRule -- ^ 'gcorsprsCORSPolicy'+ -> GetCORSPolicyResponse+getCORSPolicyResponse pResponseStatus_ pCORSPolicy_ =+ GetCORSPolicyResponse'+ { _gcorsprsResponseStatus = pResponseStatus_+ , _gcorsprsCORSPolicy = _List1 # pCORSPolicy_+ }+++-- | -- | The response status code.+gcorsprsResponseStatus :: Lens' GetCORSPolicyResponse Int+gcorsprsResponseStatus = lens _gcorsprsResponseStatus (\ s a -> s{_gcorsprsResponseStatus = a})++-- | Undocumented member.+gcorsprsCORSPolicy :: Lens' GetCORSPolicyResponse (NonEmpty CORSRule)+gcorsprsCORSPolicy = lens _gcorsprsCORSPolicy (\ s a -> s{_gcorsprsCORSPolicy = a}) . _List1++instance NFData GetCORSPolicyResponse where
+ gen/Network/AWS/MediaStore/GetContainerPolicy.hs view
@@ -0,0 +1,136 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MediaStore.GetContainerPolicy+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves the access policy for the specified container. For information about the data that is included in an access policy, see the <https://aws.amazon.com/documentation/iam/ AWS Identity and Access Management User Guide> .+--+--+module Network.AWS.MediaStore.GetContainerPolicy+ (+ -- * Creating a Request+ getContainerPolicy+ , GetContainerPolicy+ -- * Request Lenses+ , gContainerName++ -- * Destructuring the Response+ , getContainerPolicyResponse+ , GetContainerPolicyResponse+ -- * Response Lenses+ , gcprsResponseStatus+ , gcprsPolicy+ ) where++import Network.AWS.Lens+import Network.AWS.MediaStore.Types+import Network.AWS.MediaStore.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'getContainerPolicy' smart constructor.+newtype GetContainerPolicy = GetContainerPolicy'+ { _gContainerName :: Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetContainerPolicy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gContainerName' - The name of the container.+getContainerPolicy+ :: Text -- ^ 'gContainerName'+ -> GetContainerPolicy+getContainerPolicy pContainerName_ =+ GetContainerPolicy' {_gContainerName = pContainerName_}+++-- | The name of the container.+gContainerName :: Lens' GetContainerPolicy Text+gContainerName = lens _gContainerName (\ s a -> s{_gContainerName = a})++instance AWSRequest GetContainerPolicy where+ type Rs GetContainerPolicy =+ GetContainerPolicyResponse+ request = postJSON mediaStore+ response+ = receiveJSON+ (\ s h x ->+ GetContainerPolicyResponse' <$>+ (pure (fromEnum s)) <*> (x .:> "Policy"))++instance Hashable GetContainerPolicy where++instance NFData GetContainerPolicy where++instance ToHeaders GetContainerPolicy where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MediaStore_20170901.GetContainerPolicy" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON GetContainerPolicy where+ toJSON GetContainerPolicy'{..}+ = object+ (catMaybes+ [Just ("ContainerName" .= _gContainerName)])++instance ToPath GetContainerPolicy where+ toPath = const "/"++instance ToQuery GetContainerPolicy where+ toQuery = const mempty++-- | /See:/ 'getContainerPolicyResponse' smart constructor.+data GetContainerPolicyResponse = GetContainerPolicyResponse'+ { _gcprsResponseStatus :: !Int+ , _gcprsPolicy :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'GetContainerPolicyResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'gcprsResponseStatus' - -- | The response status code.+--+-- * 'gcprsPolicy' - The contents of the access policy.+getContainerPolicyResponse+ :: Int -- ^ 'gcprsResponseStatus'+ -> Text -- ^ 'gcprsPolicy'+ -> GetContainerPolicyResponse+getContainerPolicyResponse pResponseStatus_ pPolicy_ =+ GetContainerPolicyResponse'+ {_gcprsResponseStatus = pResponseStatus_, _gcprsPolicy = pPolicy_}+++-- | -- | The response status code.+gcprsResponseStatus :: Lens' GetContainerPolicyResponse Int+gcprsResponseStatus = lens _gcprsResponseStatus (\ s a -> s{_gcprsResponseStatus = a})++-- | The contents of the access policy.+gcprsPolicy :: Lens' GetContainerPolicyResponse Text+gcprsPolicy = lens _gcprsPolicy (\ s a -> s{_gcprsPolicy = a})++instance NFData GetContainerPolicyResponse where
+ gen/Network/AWS/MediaStore/ListContainers.hs view
@@ -0,0 +1,157 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MediaStore.ListContainers+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Lists the properties of all containers in AWS Elemental MediaStore.+--+--+-- You can query to receive all the containers in one response. Or you can include the @MaxResults@ parameter to receive a limited number of containers in each response. In this case, the response includes a token. To get the next set of containers, send the command again, this time with the @NextToken@ parameter (with the returned token as its value). The next set of responses appears, with a token if there are still more containers to receive.+--+-- See also 'DescribeContainer' , which gets the properties of one container.+--+module Network.AWS.MediaStore.ListContainers+ (+ -- * Creating a Request+ listContainers+ , ListContainers+ -- * Request Lenses+ , lcNextToken+ , lcMaxResults++ -- * Destructuring the Response+ , listContainersResponse+ , ListContainersResponse+ -- * Response Lenses+ , lcrsNextToken+ , lcrsResponseStatus+ , lcrsContainers+ ) where++import Network.AWS.Lens+import Network.AWS.MediaStore.Types+import Network.AWS.MediaStore.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'listContainers' smart constructor.+data ListContainers = ListContainers'+ { _lcNextToken :: !(Maybe Text)+ , _lcMaxResults :: !(Maybe Nat)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListContainers' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lcNextToken' - Only if you used @MaxResults@ in the first command, enter the token (which was included in the previous response) to obtain the next set of containers. This token is included in a response only if there actually are more containers to list.+--+-- * 'lcMaxResults' - Enter the maximum number of containers in the response. Use from 1 to 255 characters.+listContainers+ :: ListContainers+listContainers =+ ListContainers' {_lcNextToken = Nothing, _lcMaxResults = Nothing}+++-- | Only if you used @MaxResults@ in the first command, enter the token (which was included in the previous response) to obtain the next set of containers. This token is included in a response only if there actually are more containers to list.+lcNextToken :: Lens' ListContainers (Maybe Text)+lcNextToken = lens _lcNextToken (\ s a -> s{_lcNextToken = a})++-- | Enter the maximum number of containers in the response. Use from 1 to 255 characters.+lcMaxResults :: Lens' ListContainers (Maybe Natural)+lcMaxResults = lens _lcMaxResults (\ s a -> s{_lcMaxResults = a}) . mapping _Nat++instance AWSRequest ListContainers where+ type Rs ListContainers = ListContainersResponse+ request = postJSON mediaStore+ response+ = receiveJSON+ (\ s h x ->+ ListContainersResponse' <$>+ (x .?> "NextToken") <*> (pure (fromEnum s)) <*>+ (x .?> "Containers" .!@ mempty))++instance Hashable ListContainers where++instance NFData ListContainers where++instance ToHeaders ListContainers where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MediaStore_20170901.ListContainers" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON ListContainers where+ toJSON ListContainers'{..}+ = object+ (catMaybes+ [("NextToken" .=) <$> _lcNextToken,+ ("MaxResults" .=) <$> _lcMaxResults])++instance ToPath ListContainers where+ toPath = const "/"++instance ToQuery ListContainers where+ toQuery = const mempty++-- | /See:/ 'listContainersResponse' smart constructor.+data ListContainersResponse = ListContainersResponse'+ { _lcrsNextToken :: !(Maybe Text)+ , _lcrsResponseStatus :: !Int+ , _lcrsContainers :: ![Container]+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'ListContainersResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'lcrsNextToken' - @NextToken@ is the token to use in the next call to @ListContainers@ . This token is returned only if you included the @MaxResults@ tag in the original command, and only if there are still containers to return.+--+-- * 'lcrsResponseStatus' - -- | The response status code.+--+-- * 'lcrsContainers' - The names of the containers.+listContainersResponse+ :: Int -- ^ 'lcrsResponseStatus'+ -> ListContainersResponse+listContainersResponse pResponseStatus_ =+ ListContainersResponse'+ { _lcrsNextToken = Nothing+ , _lcrsResponseStatus = pResponseStatus_+ , _lcrsContainers = mempty+ }+++-- | @NextToken@ is the token to use in the next call to @ListContainers@ . This token is returned only if you included the @MaxResults@ tag in the original command, and only if there are still containers to return.+lcrsNextToken :: Lens' ListContainersResponse (Maybe Text)+lcrsNextToken = lens _lcrsNextToken (\ s a -> s{_lcrsNextToken = a})++-- | -- | The response status code.+lcrsResponseStatus :: Lens' ListContainersResponse Int+lcrsResponseStatus = lens _lcrsResponseStatus (\ s a -> s{_lcrsResponseStatus = a})++-- | The names of the containers.+lcrsContainers :: Lens' ListContainersResponse [Container]+lcrsContainers = lens _lcrsContainers (\ s a -> s{_lcrsContainers = a}) . _Coerce++instance NFData ListContainersResponse where
+ gen/Network/AWS/MediaStore/PutCORSPolicy.hs view
@@ -0,0 +1,138 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MediaStore.PutCORSPolicy+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Sets the cross-origin resource sharing (CORS) configuration on a container so that the container can service cross-origin requests. For example, you might want to enable a request whose origin is http://www.example.com to access your AWS Elemental MediaStore container at my.example.container.com by using the browser's XMLHttpRequest capability.+--+--+-- To enable CORS on a container, you attach a CORS policy to the container. In the CORS policy, you configure rules that identify origins and the HTTP methods that can be executed on your container. The policy can contain up to 398,000 characters. You can add up to 100 rules to a CORS policy. If more than one rule applies, the service uses the first applicable rule listed.+--+module Network.AWS.MediaStore.PutCORSPolicy+ (+ -- * Creating a Request+ putCORSPolicy+ , PutCORSPolicy+ -- * Request Lenses+ , pcpContainerName+ , pcpCORSPolicy++ -- * Destructuring the Response+ , putCORSPolicyResponse+ , PutCORSPolicyResponse+ -- * Response Lenses+ , pcorsprsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MediaStore.Types+import Network.AWS.MediaStore.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'putCORSPolicy' smart constructor.+data PutCORSPolicy = PutCORSPolicy'+ { _pcpContainerName :: !Text+ , _pcpCORSPolicy :: !(List1 CORSRule)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'PutCORSPolicy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'pcpContainerName' - The name of the container that you want to assign the CORS policy to.+--+-- * 'pcpCORSPolicy' - The CORS policy to apply to the container.+putCORSPolicy+ :: Text -- ^ 'pcpContainerName'+ -> NonEmpty CORSRule -- ^ 'pcpCORSPolicy'+ -> PutCORSPolicy+putCORSPolicy pContainerName_ pCORSPolicy_ =+ PutCORSPolicy'+ { _pcpContainerName = pContainerName_+ , _pcpCORSPolicy = _List1 # pCORSPolicy_+ }+++-- | The name of the container that you want to assign the CORS policy to.+pcpContainerName :: Lens' PutCORSPolicy Text+pcpContainerName = lens _pcpContainerName (\ s a -> s{_pcpContainerName = a})++-- | The CORS policy to apply to the container.+pcpCORSPolicy :: Lens' PutCORSPolicy (NonEmpty CORSRule)+pcpCORSPolicy = lens _pcpCORSPolicy (\ s a -> s{_pcpCORSPolicy = a}) . _List1++instance AWSRequest PutCORSPolicy where+ type Rs PutCORSPolicy = PutCORSPolicyResponse+ request = postJSON mediaStore+ response+ = receiveEmpty+ (\ s h x ->+ PutCORSPolicyResponse' <$> (pure (fromEnum s)))++instance Hashable PutCORSPolicy where++instance NFData PutCORSPolicy where++instance ToHeaders PutCORSPolicy where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MediaStore_20170901.PutCorsPolicy" :: ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON PutCORSPolicy where+ toJSON PutCORSPolicy'{..}+ = object+ (catMaybes+ [Just ("ContainerName" .= _pcpContainerName),+ Just ("CorsPolicy" .= _pcpCORSPolicy)])++instance ToPath PutCORSPolicy where+ toPath = const "/"++instance ToQuery PutCORSPolicy where+ toQuery = const mempty++-- | /See:/ 'putCORSPolicyResponse' smart constructor.+newtype PutCORSPolicyResponse = PutCORSPolicyResponse'+ { _pcorsprsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'PutCORSPolicyResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'pcorsprsResponseStatus' - -- | The response status code.+putCORSPolicyResponse+ :: Int -- ^ 'pcorsprsResponseStatus'+ -> PutCORSPolicyResponse+putCORSPolicyResponse pResponseStatus_ =+ PutCORSPolicyResponse' {_pcorsprsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+pcorsprsResponseStatus :: Lens' PutCORSPolicyResponse Int+pcorsprsResponseStatus = lens _pcorsprsResponseStatus (\ s a -> s{_pcorsprsResponseStatus = a})++instance NFData PutCORSPolicyResponse where
+ gen/Network/AWS/MediaStore/PutContainerPolicy.hs view
@@ -0,0 +1,137 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MediaStore.PutContainerPolicy+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Creates an access policy for the specified container to restrict the users and clients that can access it. For information about the data that is included in an access policy, see the <https://aws.amazon.com/documentation/iam/ AWS Identity and Access Management User Guide> .+--+--+-- For this release of the REST API, you can create only one policy for a container. If you enter @PutContainerPolicy@ twice, the second command modifies the existing policy.+--+module Network.AWS.MediaStore.PutContainerPolicy+ (+ -- * Creating a Request+ putContainerPolicy+ , PutContainerPolicy+ -- * Request Lenses+ , pContainerName+ , pPolicy++ -- * Destructuring the Response+ , putContainerPolicyResponse+ , PutContainerPolicyResponse+ -- * Response Lenses+ , pcprsResponseStatus+ ) where++import Network.AWS.Lens+import Network.AWS.MediaStore.Types+import Network.AWS.MediaStore.Types.Product+import Network.AWS.Prelude+import Network.AWS.Request+import Network.AWS.Response++-- | /See:/ 'putContainerPolicy' smart constructor.+data PutContainerPolicy = PutContainerPolicy'+ { _pContainerName :: !Text+ , _pPolicy :: !Text+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'PutContainerPolicy' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'pContainerName' - The name of the container.+--+-- * 'pPolicy' - The contents of the policy, which includes the following: * One @Version@ tag * One @Statement@ tag that contains the standard tags for the policy.+putContainerPolicy+ :: Text -- ^ 'pContainerName'+ -> Text -- ^ 'pPolicy'+ -> PutContainerPolicy+putContainerPolicy pContainerName_ pPolicy_ =+ PutContainerPolicy' {_pContainerName = pContainerName_, _pPolicy = pPolicy_}+++-- | The name of the container.+pContainerName :: Lens' PutContainerPolicy Text+pContainerName = lens _pContainerName (\ s a -> s{_pContainerName = a})++-- | The contents of the policy, which includes the following: * One @Version@ tag * One @Statement@ tag that contains the standard tags for the policy.+pPolicy :: Lens' PutContainerPolicy Text+pPolicy = lens _pPolicy (\ s a -> s{_pPolicy = a})++instance AWSRequest PutContainerPolicy where+ type Rs PutContainerPolicy =+ PutContainerPolicyResponse+ request = postJSON mediaStore+ response+ = receiveEmpty+ (\ s h x ->+ PutContainerPolicyResponse' <$> (pure (fromEnum s)))++instance Hashable PutContainerPolicy where++instance NFData PutContainerPolicy where++instance ToHeaders PutContainerPolicy where+ toHeaders+ = const+ (mconcat+ ["X-Amz-Target" =#+ ("MediaStore_20170901.PutContainerPolicy" ::+ ByteString),+ "Content-Type" =#+ ("application/x-amz-json-1.1" :: ByteString)])++instance ToJSON PutContainerPolicy where+ toJSON PutContainerPolicy'{..}+ = object+ (catMaybes+ [Just ("ContainerName" .= _pContainerName),+ Just ("Policy" .= _pPolicy)])++instance ToPath PutContainerPolicy where+ toPath = const "/"++instance ToQuery PutContainerPolicy where+ toQuery = const mempty++-- | /See:/ 'putContainerPolicyResponse' smart constructor.+newtype PutContainerPolicyResponse = PutContainerPolicyResponse'+ { _pcprsResponseStatus :: Int+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'PutContainerPolicyResponse' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'pcprsResponseStatus' - -- | The response status code.+putContainerPolicyResponse+ :: Int -- ^ 'pcprsResponseStatus'+ -> PutContainerPolicyResponse+putContainerPolicyResponse pResponseStatus_ =+ PutContainerPolicyResponse' {_pcprsResponseStatus = pResponseStatus_}+++-- | -- | The response status code.+pcprsResponseStatus :: Lens' PutContainerPolicyResponse Int+pcprsResponseStatus = lens _pcprsResponseStatus (\ s a -> s{_pcprsResponseStatus = a})++instance NFData PutContainerPolicyResponse where
+ gen/Network/AWS/MediaStore/Types.hs view
@@ -0,0 +1,140 @@+{-# LANGUAGE OverloadedStrings #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MediaStore.Types+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.MediaStore.Types+ (+ -- * Service Configuration+ mediaStore++ -- * Errors+ , _PolicyNotFoundException+ , _CORSPolicyNotFoundException+ , _ContainerInUseException+ , _InternalServerError+ , _ContainerNotFoundException+ , _LimitExceededException++ -- * ContainerStatus+ , ContainerStatus (..)++ -- * MethodName+ , MethodName (..)++ -- * CORSRule+ , CORSRule+ , corsRule+ , crAllowedMethods+ , crMaxAgeSeconds+ , crAllowedHeaders+ , crAllowedOrigins+ , crExposeHeaders++ -- * Container+ , Container+ , container+ , cCreationTime+ , cStatus+ , cARN+ , cName+ , cEndpoint+ ) where++import Network.AWS.Lens+import Network.AWS.MediaStore.Types.Product+import Network.AWS.MediaStore.Types.Sum+import Network.AWS.Prelude+import Network.AWS.Sign.V4++-- | API version @2017-09-01@ of the Amazon Elemental MediaStore SDK configuration.+mediaStore :: Service+mediaStore =+ Service+ { _svcAbbrev = "MediaStore"+ , _svcSigner = v4+ , _svcPrefix = "mediastore"+ , _svcVersion = "2017-09-01"+ , _svcEndpoint = defaultEndpoint mediaStore+ , _svcTimeout = Just 70+ , _svcCheck = statusSuccess+ , _svcError = parseJSONError "MediaStore"+ , _svcRetry = retry+ }+ where+ retry =+ Exponential+ { _retryBase = 5.0e-2+ , _retryGrowth = 2+ , _retryAttempts = 5+ , _retryCheck = check+ }+ check e+ | has (hasCode "ThrottledException" . hasStatus 400) e =+ Just "throttled_exception"+ | has (hasStatus 429) e = Just "too_many_requests"+ | has (hasCode "ThrottlingException" . hasStatus 400) e =+ Just "throttling_exception"+ | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"+ | has (hasStatus 504) e = Just "gateway_timeout"+ | has (hasCode "RequestThrottledException" . hasStatus 400) e =+ Just "request_throttled_exception"+ | has (hasStatus 502) e = Just "bad_gateway"+ | has (hasStatus 503) e = Just "service_unavailable"+ | has (hasStatus 500) e = Just "general_server_error"+ | has (hasStatus 509) e = Just "limit_exceeded"+ | otherwise = Nothing+++-- | Could not perform an operation on a policy that does not exist.+--+--+_PolicyNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_PolicyNotFoundException =+ _MatchServiceError mediaStore "PolicyNotFoundException"+++-- | Could not perform an operation on a policy that does not exist.+--+--+_CORSPolicyNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_CORSPolicyNotFoundException =+ _MatchServiceError mediaStore "CorsPolicyNotFoundException"+++-- | Resource already exists or is being updated.+--+--+_ContainerInUseException :: AsError a => Getting (First ServiceError) a ServiceError+_ContainerInUseException =+ _MatchServiceError mediaStore "ContainerInUseException"+++-- | The service is temporarily unavailable.+--+--+_InternalServerError :: AsError a => Getting (First ServiceError) a ServiceError+_InternalServerError = _MatchServiceError mediaStore "InternalServerError"+++-- | Could not perform an operation on a container that does not exist.+--+--+_ContainerNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError+_ContainerNotFoundException =+ _MatchServiceError mediaStore "ContainerNotFoundException"+++-- | A service limit has been exceeded.+--+--+_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError+_LimitExceededException = _MatchServiceError mediaStore "LimitExceededException"+
+ gen/Network/AWS/MediaStore/Types/Product.hs view
@@ -0,0 +1,179 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MediaStore.Types.Product+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.MediaStore.Types.Product where++import Network.AWS.Lens+import Network.AWS.MediaStore.Types.Sum+import Network.AWS.Prelude++-- | A rule for a CORS policy. You can add up to 100 rules to a CORS policy. If more than one rule applies, the service uses the first applicable rule listed.+--+--+--+-- /See:/ 'corsRule' smart constructor.+data CORSRule = CORSRule'+ { _crAllowedMethods :: !(Maybe [MethodName])+ , _crMaxAgeSeconds :: !(Maybe Nat)+ , _crAllowedHeaders :: !(Maybe [Text])+ , _crAllowedOrigins :: !(Maybe [Text])+ , _crExposeHeaders :: !(Maybe [Text])+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'CORSRule' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'crAllowedMethods' - Identifies an HTTP method that the origin that is specified in the rule is allowed to execute. Each CORS rule must contain at least one @AllowedMethod@ and one @AllowedOrigin@ element.+--+-- * 'crMaxAgeSeconds' - The time in seconds that your browser caches the preflight response for the specified resource. A CORS rule can have only one @MaxAgeSeconds@ element.+--+-- * 'crAllowedHeaders' - Specifies which headers are allowed in a preflight @OPTIONS@ request through the @Access-Control-Request-Headers@ header. Each header name that is specified in @Access-Control-Request-Headers@ must have a corresponding entry in the rule. Only the headers that were requested are sent back. This element can contain only one wildcard character (*).+--+-- * 'crAllowedOrigins' - One or more response headers that you want users to be able to access from their applications (for example, from a JavaScript @XMLHttpRequest@ object). Each CORS rule must have at least one @AllowedOrigin@ element. The string value can include only one wildcard character (*), for example, http://*.example.com. Additionally, you can specify only one wildcard character to allow cross-origin access for all origins.+--+-- * 'crExposeHeaders' - One or more headers in the response that you want users to be able to access from their applications (for example, from a JavaScript @XMLHttpRequest@ object). This element is optional for each rule.+corsRule+ :: CORSRule+corsRule =+ CORSRule'+ { _crAllowedMethods = Nothing+ , _crMaxAgeSeconds = Nothing+ , _crAllowedHeaders = Nothing+ , _crAllowedOrigins = Nothing+ , _crExposeHeaders = Nothing+ }+++-- | Identifies an HTTP method that the origin that is specified in the rule is allowed to execute. Each CORS rule must contain at least one @AllowedMethod@ and one @AllowedOrigin@ element.+crAllowedMethods :: Lens' CORSRule [MethodName]+crAllowedMethods = lens _crAllowedMethods (\ s a -> s{_crAllowedMethods = a}) . _Default . _Coerce++-- | The time in seconds that your browser caches the preflight response for the specified resource. A CORS rule can have only one @MaxAgeSeconds@ element.+crMaxAgeSeconds :: Lens' CORSRule (Maybe Natural)+crMaxAgeSeconds = lens _crMaxAgeSeconds (\ s a -> s{_crMaxAgeSeconds = a}) . mapping _Nat++-- | Specifies which headers are allowed in a preflight @OPTIONS@ request through the @Access-Control-Request-Headers@ header. Each header name that is specified in @Access-Control-Request-Headers@ must have a corresponding entry in the rule. Only the headers that were requested are sent back. This element can contain only one wildcard character (*).+crAllowedHeaders :: Lens' CORSRule [Text]+crAllowedHeaders = lens _crAllowedHeaders (\ s a -> s{_crAllowedHeaders = a}) . _Default . _Coerce++-- | One or more response headers that you want users to be able to access from their applications (for example, from a JavaScript @XMLHttpRequest@ object). Each CORS rule must have at least one @AllowedOrigin@ element. The string value can include only one wildcard character (*), for example, http://*.example.com. Additionally, you can specify only one wildcard character to allow cross-origin access for all origins.+crAllowedOrigins :: Lens' CORSRule [Text]+crAllowedOrigins = lens _crAllowedOrigins (\ s a -> s{_crAllowedOrigins = a}) . _Default . _Coerce++-- | One or more headers in the response that you want users to be able to access from their applications (for example, from a JavaScript @XMLHttpRequest@ object). This element is optional for each rule.+crExposeHeaders :: Lens' CORSRule [Text]+crExposeHeaders = lens _crExposeHeaders (\ s a -> s{_crExposeHeaders = a}) . _Default . _Coerce++instance FromJSON CORSRule where+ parseJSON+ = withObject "CORSRule"+ (\ x ->+ CORSRule' <$>+ (x .:? "AllowedMethods" .!= mempty) <*>+ (x .:? "MaxAgeSeconds")+ <*> (x .:? "AllowedHeaders" .!= mempty)+ <*> (x .:? "AllowedOrigins" .!= mempty)+ <*> (x .:? "ExposeHeaders" .!= mempty))++instance Hashable CORSRule where++instance NFData CORSRule where++instance ToJSON CORSRule where+ toJSON CORSRule'{..}+ = object+ (catMaybes+ [("AllowedMethods" .=) <$> _crAllowedMethods,+ ("MaxAgeSeconds" .=) <$> _crMaxAgeSeconds,+ ("AllowedHeaders" .=) <$> _crAllowedHeaders,+ ("AllowedOrigins" .=) <$> _crAllowedOrigins,+ ("ExposeHeaders" .=) <$> _crExposeHeaders])++-- | This section describes operations that you can perform on an AWS Elemental MediaStore container.+--+--+--+-- /See:/ 'container' smart constructor.+data Container = Container'+ { _cCreationTime :: !(Maybe POSIX)+ , _cStatus :: !(Maybe ContainerStatus)+ , _cARN :: !(Maybe Text)+ , _cName :: !(Maybe Text)+ , _cEndpoint :: !(Maybe Text)+ } deriving (Eq, Read, Show, Data, Typeable, Generic)+++-- | Creates a value of 'Container' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'cCreationTime' - Unix timestamp.+--+-- * 'cStatus' - The status of container creation or deletion. The status is one of the following: @CREATING@ , @ACTIVE@ , or @DELETING@ . While the service is creating the container, the status is @CREATING@ . When the endpoint is available, the status changes to @ACTIVE@ .+--+-- * 'cARN' - The Amazon Resource Name (ARN) of the container. The ARN has the following format: arn:aws:<region>:<account that owns this container>:container/<name of container> For example: arn:aws:mediastore:us-west-2:111122223333:container/movies+--+-- * 'cName' - The name of the container.+--+-- * 'cEndpoint' - The DNS endpoint of the container. Use the endpoint to identify the specific container when sending requests to the data plane. The service assigns this value when the container is created. Once the value has been assigned, it does not change.+container+ :: Container+container =+ Container'+ { _cCreationTime = Nothing+ , _cStatus = Nothing+ , _cARN = Nothing+ , _cName = Nothing+ , _cEndpoint = Nothing+ }+++-- | Unix timestamp.+cCreationTime :: Lens' Container (Maybe UTCTime)+cCreationTime = lens _cCreationTime (\ s a -> s{_cCreationTime = a}) . mapping _Time++-- | The status of container creation or deletion. The status is one of the following: @CREATING@ , @ACTIVE@ , or @DELETING@ . While the service is creating the container, the status is @CREATING@ . When the endpoint is available, the status changes to @ACTIVE@ .+cStatus :: Lens' Container (Maybe ContainerStatus)+cStatus = lens _cStatus (\ s a -> s{_cStatus = a})++-- | The Amazon Resource Name (ARN) of the container. The ARN has the following format: arn:aws:<region>:<account that owns this container>:container/<name of container> For example: arn:aws:mediastore:us-west-2:111122223333:container/movies+cARN :: Lens' Container (Maybe Text)+cARN = lens _cARN (\ s a -> s{_cARN = a})++-- | The name of the container.+cName :: Lens' Container (Maybe Text)+cName = lens _cName (\ s a -> s{_cName = a})++-- | The DNS endpoint of the container. Use the endpoint to identify the specific container when sending requests to the data plane. The service assigns this value when the container is created. Once the value has been assigned, it does not change.+cEndpoint :: Lens' Container (Maybe Text)+cEndpoint = lens _cEndpoint (\ s a -> s{_cEndpoint = a})++instance FromJSON Container where+ parseJSON+ = withObject "Container"+ (\ x ->+ Container' <$>+ (x .:? "CreationTime") <*> (x .:? "Status") <*>+ (x .:? "ARN")+ <*> (x .:? "Name")+ <*> (x .:? "Endpoint"))++instance Hashable Container where++instance NFData Container where
+ gen/Network/AWS/MediaStore/Types/Sum.hs view
@@ -0,0 +1,86 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MediaStore.Types.Sum+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.MediaStore.Types.Sum where++import Network.AWS.Prelude++data ContainerStatus+ = Active+ | Creating+ | Deleting+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText ContainerStatus where+ parser = takeLowerText >>= \case+ "active" -> pure Active+ "creating" -> pure Creating+ "deleting" -> pure Deleting+ e -> fromTextError $ "Failure parsing ContainerStatus from value: '" <> e+ <> "'. Accepted values: active, creating, deleting"++instance ToText ContainerStatus where+ toText = \case+ Active -> "ACTIVE"+ Creating -> "CREATING"+ Deleting -> "DELETING"++instance Hashable ContainerStatus+instance NFData ContainerStatus+instance ToByteString ContainerStatus+instance ToQuery ContainerStatus+instance ToHeader ContainerStatus++instance FromJSON ContainerStatus where+ parseJSON = parseJSONText "ContainerStatus"++data MethodName+ = Delete+ | Get+ | Head+ | Put+ deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Typeable, Generic)+++instance FromText MethodName where+ parser = takeLowerText >>= \case+ "delete" -> pure Delete+ "get" -> pure Get+ "head" -> pure Head+ "put" -> pure Put+ e -> fromTextError $ "Failure parsing MethodName from value: '" <> e+ <> "'. Accepted values: delete, get, head, put"++instance ToText MethodName where+ toText = \case+ Delete -> "DELETE"+ Get -> "GET"+ Head -> "HEAD"+ Put -> "PUT"++instance Hashable MethodName+instance NFData MethodName+instance ToByteString MethodName+instance ToQuery MethodName+instance ToHeader MethodName++instance ToJSON MethodName where+ toJSON = toJSONText++instance FromJSON MethodName where+ parseJSON = parseJSONText "MethodName"
+ gen/Network/AWS/MediaStore/Waiters.hs view
@@ -0,0 +1,21 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TypeFamilies #-}++{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Network.AWS.MediaStore.Waiters+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Network.AWS.MediaStore.Waiters where++import Network.AWS.Lens+import Network.AWS.MediaStore.Types+import Network.AWS.Prelude+import Network.AWS.Waiter
+ src/.gitkeep view
+ test/Main.hs view
@@ -0,0 +1,21 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module : Main+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Main (main) where++import Test.Tasty+import Test.AWS.MediaStore+import Test.AWS.MediaStore.Internal++main :: IO ()+main = defaultMain $ testGroup "MediaStore"+ [ testGroup "tests" tests+ , testGroup "fixtures" fixtures+ ]
+ test/Test/AWS/Gen/MediaStore.hs view
@@ -0,0 +1,219 @@+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module : Test.AWS.Gen.MediaStore+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.Gen.MediaStore where++import Data.Proxy+import Network.AWS.MediaStore+import Test.AWS.Fixture+import Test.AWS.MediaStore.Internal+import Test.AWS.Prelude+import Test.Tasty++-- Auto-generated: the actual test selection needs to be manually placed into+-- the top-level so that real test data can be incrementally added.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+-- [ testGroup "request"+-- [ requestCreateContainer $+-- createContainer+--+-- , requestListContainers $+-- listContainers+--+-- , requestDeleteContainer $+-- deleteContainer+--+-- , requestPutCORSPolicy $+-- putCORSPolicy+--+-- , requestDeleteCORSPolicy $+-- deleteCORSPolicy+--+-- , requestDescribeContainer $+-- describeContainer+--+-- , requestGetCORSPolicy $+-- getCORSPolicy+--+-- , requestDeleteContainerPolicy $+-- deleteContainerPolicy+--+-- , requestPutContainerPolicy $+-- putContainerPolicy+--+-- , requestGetContainerPolicy $+-- getContainerPolicy+--+-- ]++-- , testGroup "response"+-- [ responseCreateContainer $+-- createContainerResponse+--+-- , responseListContainers $+-- listContainersResponse+--+-- , responseDeleteContainer $+-- deleteContainerResponse+--+-- , responsePutCORSPolicy $+-- putCORSPolicyResponse+--+-- , responseDeleteCORSPolicy $+-- deleteCORSPolicyResponse+--+-- , responseDescribeContainer $+-- describeContainerResponse+--+-- , responseGetCORSPolicy $+-- getCORSPolicyResponse+--+-- , responseDeleteContainerPolicy $+-- deleteContainerPolicyResponse+--+-- , responsePutContainerPolicy $+-- putContainerPolicyResponse+--+-- , responseGetContainerPolicy $+-- getContainerPolicyResponse+--+-- ]+-- ]++-- Requests++requestCreateContainer :: CreateContainer -> TestTree+requestCreateContainer = req+ "CreateContainer"+ "fixture/CreateContainer.yaml"++requestListContainers :: ListContainers -> TestTree+requestListContainers = req+ "ListContainers"+ "fixture/ListContainers.yaml"++requestDeleteContainer :: DeleteContainer -> TestTree+requestDeleteContainer = req+ "DeleteContainer"+ "fixture/DeleteContainer.yaml"++requestPutCORSPolicy :: PutCORSPolicy -> TestTree+requestPutCORSPolicy = req+ "PutCORSPolicy"+ "fixture/PutCORSPolicy.yaml"++requestDeleteCORSPolicy :: DeleteCORSPolicy -> TestTree+requestDeleteCORSPolicy = req+ "DeleteCORSPolicy"+ "fixture/DeleteCORSPolicy.yaml"++requestDescribeContainer :: DescribeContainer -> TestTree+requestDescribeContainer = req+ "DescribeContainer"+ "fixture/DescribeContainer.yaml"++requestGetCORSPolicy :: GetCORSPolicy -> TestTree+requestGetCORSPolicy = req+ "GetCORSPolicy"+ "fixture/GetCORSPolicy.yaml"++requestDeleteContainerPolicy :: DeleteContainerPolicy -> TestTree+requestDeleteContainerPolicy = req+ "DeleteContainerPolicy"+ "fixture/DeleteContainerPolicy.yaml"++requestPutContainerPolicy :: PutContainerPolicy -> TestTree+requestPutContainerPolicy = req+ "PutContainerPolicy"+ "fixture/PutContainerPolicy.yaml"++requestGetContainerPolicy :: GetContainerPolicy -> TestTree+requestGetContainerPolicy = req+ "GetContainerPolicy"+ "fixture/GetContainerPolicy.yaml"++-- Responses++responseCreateContainer :: CreateContainerResponse -> TestTree+responseCreateContainer = res+ "CreateContainerResponse"+ "fixture/CreateContainerResponse.proto"+ mediaStore+ (Proxy :: Proxy CreateContainer)++responseListContainers :: ListContainersResponse -> TestTree+responseListContainers = res+ "ListContainersResponse"+ "fixture/ListContainersResponse.proto"+ mediaStore+ (Proxy :: Proxy ListContainers)++responseDeleteContainer :: DeleteContainerResponse -> TestTree+responseDeleteContainer = res+ "DeleteContainerResponse"+ "fixture/DeleteContainerResponse.proto"+ mediaStore+ (Proxy :: Proxy DeleteContainer)++responsePutCORSPolicy :: PutCORSPolicyResponse -> TestTree+responsePutCORSPolicy = res+ "PutCORSPolicyResponse"+ "fixture/PutCORSPolicyResponse.proto"+ mediaStore+ (Proxy :: Proxy PutCORSPolicy)++responseDeleteCORSPolicy :: DeleteCORSPolicyResponse -> TestTree+responseDeleteCORSPolicy = res+ "DeleteCORSPolicyResponse"+ "fixture/DeleteCORSPolicyResponse.proto"+ mediaStore+ (Proxy :: Proxy DeleteCORSPolicy)++responseDescribeContainer :: DescribeContainerResponse -> TestTree+responseDescribeContainer = res+ "DescribeContainerResponse"+ "fixture/DescribeContainerResponse.proto"+ mediaStore+ (Proxy :: Proxy DescribeContainer)++responseGetCORSPolicy :: GetCORSPolicyResponse -> TestTree+responseGetCORSPolicy = res+ "GetCORSPolicyResponse"+ "fixture/GetCORSPolicyResponse.proto"+ mediaStore+ (Proxy :: Proxy GetCORSPolicy)++responseDeleteContainerPolicy :: DeleteContainerPolicyResponse -> TestTree+responseDeleteContainerPolicy = res+ "DeleteContainerPolicyResponse"+ "fixture/DeleteContainerPolicyResponse.proto"+ mediaStore+ (Proxy :: Proxy DeleteContainerPolicy)++responsePutContainerPolicy :: PutContainerPolicyResponse -> TestTree+responsePutContainerPolicy = res+ "PutContainerPolicyResponse"+ "fixture/PutContainerPolicyResponse.proto"+ mediaStore+ (Proxy :: Proxy PutContainerPolicy)++responseGetContainerPolicy :: GetContainerPolicyResponse -> TestTree+responseGetContainerPolicy = res+ "GetContainerPolicyResponse"+ "fixture/GetContainerPolicyResponse.proto"+ mediaStore+ (Proxy :: Proxy GetContainerPolicy)
+ test/Test/AWS/MediaStore.hs view
@@ -0,0 +1,20 @@+-- |+-- Module : Test.AWS.MediaStore+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.MediaStore+ ( tests+ , fixtures+ ) where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/AWS/MediaStore/Internal.hs view
@@ -0,0 +1,9 @@+-- |+-- Module : Test.AWS.MediaStore.Internal+-- Copyright : (c) 2013-2018 Brendan Hay+-- License : Mozilla Public License, v. 2.0.+-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Stability : auto-generated+-- Portability : non-portable (GHC extensions)+--+module Test.AWS.MediaStore.Internal where